Ask Your Question

how to detect middle circle in IOS OpenCV

asked 2013-12-05 04:16:36 -0600

Hello masters, i have one question..i have one image who contain lot of how can i get one particular image...?and also how can i get boundary of the circle..?

Thanks In Advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-05 04:58:59 -0600

bpp gravatar image
edit flag offensive delete link more


hii thx for your support..actually now i have square on my image and approxPolyDP method gave me that square..but my question is how can i get all circles who are i nside my square..?

arunios gravatar imagearunios ( 2013-12-11 04:08:05 -0600 )edit

If the square has sides parallel to the borders of the image you could extract a region of interest of the original image, using for example: using namespace cv;

Mat img_orginal; Rect region = rect(x,y,w,h); Mat sub_img(region);

and then use hough_circle to find the circles inside that region. x,y : Coordinates of the top-left corner w,h : Rectangle width and height

bpp gravatar imagebpp ( 2013-12-11 11:05:55 -0600 )edit can i fit octagon to square... i means i detected my biggest Contours(octagon)..but how can i apply warpperspective on that contour?

arunios gravatar imagearunios ( 2013-12-13 01:26:19 -0600 )edit

If I understood correctly your question, you extract contours from an image and the contours correspond to a warped octagon, and you want to unwarp it. To unwrap you could see this tutorial:

I don't know if there is a specific function to fit octagon with a square, maybe you could try to see convex hull:

however I think that if you have the sorted vertexes of the octagon you can use three of them to unwrap it.

bpp gravatar imagebpp ( 2013-12-14 10:27:05 -0600 )edit

Question Tools


Asked: 2013-12-05 04:16:36 -0600

Seen: 809 times

Last updated: Dec 05 '13