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?

  • $\begingroup$ Are the points brighter? Are the pixels values distinctly higher than the neighboring pixels? If they are, you could use a 2d filter that is covering the pixels and than look for the largest value. $\endgroup$
    – Moti
    Commented May 7, 2015 at 18:28
  • $\begingroup$ well the projected points will be within a certain color range of one another to account for differentiation in lighting (lets go with.. 'red'). That's how i'm going to detect the points within the image (i think that's a reasonable aproach). The problem lies in the fact that some points will occupy multiple pixels and while being of one distinct point they will appear within my dataset as two (or more) distinct points. $\endgroup$ Commented May 7, 2015 at 18:45

1 Answer 1


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.

  • $\begingroup$ Great, care to point me in a good direction (slides, readings, libraries, etc)? $\endgroup$ Commented May 11, 2015 at 13:27
  • $\begingroup$ Try a "filter" that looks like a square of "1" or has a Gaussian shape en.wikipedia.org/wiki/2D_Filters try this a starting point $\endgroup$
    – Moti
    Commented May 12, 2015 at 0:18
  • $\begingroup$ Do you think using something like using k-mean clustering where one finds the centroid of a defined number of point clusters would work in this application? It seems like it would be the perfect solution -- I could just use another opinion. So after I find all the 'red' points of, let's say, 20 projected points (which could potentially be between 20 - 100 datapoints) I would then find the centroids of all these clusters and this centroid value would correspond to the location of the projection itself. $\endgroup$ Commented May 14, 2015 at 14:11
  • $\begingroup$ I believe that this could work. You need to try the algorithms you consider and try to drive some measure to PD (probability of detection) and PFAR (Probability of false alarm rate). At the end of the day these two values will provide with accepting or rejecting a certain algorithm. $\endgroup$
    – Moti
    Commented May 14, 2015 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.