HoughCircle Location

asked 2017-03-22 13:52:05 -0500

I am successfully detecting red only circles using the HoughCircles() method. I would like to know the direction/location of the circle in the captured image taken from the iPhone video. The circle vector is returning X,Y coordinates which are positive no matter the location where the circle was detected, can you tell me if there is a way to detect the direction/location? For example, if the red circle appears in the lower left portion of the image, I would like to know how to determine it's location.

edit retag flag offensive close merge delete

Comments

you are using houghcircles. Results are center coordinates relative to upper left image corner. what do you want to know exactly?

LBerger gravatar imageLBerger ( 2017-03-22 15:23:42 -0500 )edit

I would like to know from the center point of the image, if the detected circle is in the upper left, bottom right, etc., of the image.

Bill Ceglia gravatar imageBill Ceglia ( 2017-03-22 15:56:11 -0500 )edit

Now if I understand your question upper left corner is (0,0)=(cols,rows) if size image is (width,height) image center is at (width/2,height/2).

Now circle is at (x,y) if x-width/2< 0 center is on the left part of image

if y-height/2 <0 center is on the upper part of image

LBerger gravatar imageLBerger ( 2017-03-22 16:06:13 -0500 )edit