General contour detection

I know the title to this may seem general, but I will try to be as specific as possible about what I am looking to accomplish. I would like OpenCV contours to detect geometric objects, closed contours (ie drawing a contour on a piece of paper), and objects that are highly concave such as stars and crosses. In addition, I would like it to detect alphanumerics. When I say closed contours I mean a closed drawn path.

I have tried multiple filtering methods already such as:

-Solidity=contour_area/hull_area->geometric shapes tend to be towards 1

-Perimeter of contour/Enclosing Ellipse->this was a guess and check.

-Convexity Defects-> shapes that were not the ones listed above tended to have a high number of convexity defects and the distances of the defects tend to be high. However, this is also true for stars and crosses and large blobs. So this did not work.

-I then tried performing all analysis on just the Hull, since geometric objects should have hulls that are geometric.In addition, this tries to include stars,crosses, and contours who don't have solidities close to 1. Stars, crosses, and contours tend to have geometric hulls.

Most of these methods do not work. I was wondering if there were other filtering methods and properties of objects to use to filter out the contours of "nothing" and "squiggles," and keep only the shapes specified above.

Hope this is clear enough, Thanks

链接地址: http://www.djcxy.com/p/58726.html

上一篇: 检测视频流上的几何对象并重建其轮廓

下一篇: 一般轮廓检测