detecting shapes that are placed on another shape

asked 2014-05-09 04:59:03 -0500

mehddi gravatar image

updated 2014-05-09 05:06:21 -0500

berak gravatar image

hi everyone.

i am trying to detect a shape like image below. i want to detect the circle shape and return its details. i use cvFindContours to do this. but this function return whole shape as result. how i can separate circle shape from remained area?

image description

edit retag flag offensive close merge delete


berak gravatar imageberak ( 2014-05-09 05:07:34 -0500 )edit

... and use findContours instead of cvFindContours. The C++ API is way more stable!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-09 07:05:58 -0500 )edit

I think before using cvFindContours ,first you use dilate and erode to clear curve.

wuling gravatar imagewuling ( 2014-05-09 23:41:45 -0500 )edit

That could work yes :)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-10 07:27:39 -0500 )edit