point position

asked 2013-12-07 02:50:27 -0600

tucna gravatar image

updated 2018-01-14 02:09:50 -0600


I am trying to figure out some best and fastet way for position of the point identification. See and image:

image description

There is point "S" and I need to know its x,y coordinates. Well, I have made some operations for results image:

image description

(there is only demonstration, result image is not derived from source image in the figures)

I can say, that first non-black pixel from the bottom is close enough and I am fully satisfied with that.

And there is question. Is there some quick way in OpenCV for obtaining these coordinates? I have made a two for-cycles and manually going thru pixel-by-pixel, but I am not sure if there is something better.

edit retag flag offensive close merge delete


Don't think so, you could some all rows and go from the lowest (last) index of this sum and take the first one larger 0, but I doub't that this is faster.

Guanta gravatar imageGuanta ( 2013-12-11 08:49:50 -0600 )edit