I'm projecting a series of points onto a surface and then recording their locations in the corresponding image. However, if one goes pixel by pixel a single point may, at times, take up multiple pixels and would thus be recorded multiple times. What is the best (least error prone) way to determine the location of a point? I've thought of simply scanning the image line by line checking to see if a pixel corresponds to that of a point, grouping the pixel clusters together based upon distance, and taking the center of this cluster to be the coordinate of the point. Perhaps something like an R-tree where I can order things by distance?
Any suggestions? Or tried and true techniques?