Ask Your Question
0

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 circles...so 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
1

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

bpp gravatar image
edit flag offensive delete link more

Comments

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

thx...how 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:

http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/warp_affine/warp_affine.html#warp-affine

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

http://docs.opencv.org/trunk/doc/tutorials/imgproc/shapedescriptors/hull/hull.html

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

Stats

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

Seen: 869 times

Last updated: Dec 05 '13