scanning an image for projected points 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?
Assuming that they are adjacent and have a "red" energy/pixel value distinct from not projected areas, you may use a simple 2D filter, that fits the size of expected dispersion, and that way get the local maximum that represents the center of the collection of points that represents a single projection.