Shape context matching in OpenCV

Have OpenCV implementation of shape context matching? I've found only matchShapes() function which do not work for me. I want to get from shape context matching set of corresponding features. Is it good idea to compare and find rotation and displacement of detected contour on two different images.

Also some example code will be very helpfull for me.

I want to detect for example pink square, and in the second case pen. Other examples could be squares with some holes, stars etc.


The basic steps of Image Processing is

Image Acquisition > Preprocessing > Segmentation > Representation > Recognition

And what you are asking for seems to lie within the representation part os this general algorithm. You want some features that descripes the objects you are interested in, right? Before sharing what I've done for simple hand-gesture recognition, I would like you to consider what you actually need. A lot of times simplicity will make it a lot easier. Consider a fixed color on your objects, consider background subtraction (these two main ties to preprocessing and segmentation). As for representation, what features are you interested in? and can you exclude the need of some of these features.

My project group and I have taken a simple approach to preprocessing and segmentation, choosing a green glove for our hand. Here's and example of the glove, camera and detection on the screen: 我们有 - 右边看到的绿色丁香,左下角的相机,以及显示实时输入的屏幕,以及我们在控制台中打印的功能

We have used a threshold on defects, and specified it to find defects from fingers, and we have calculated the ratio of a rotated rectangular boundingbox, to see how quadratic our blod is. With only four different hand gestures chosen, we are able to distinguish these with only these two features.

The functions we have used, and the measurements are all available in the documentation on structural analysis for OpenCV, and for acces of values in vectors (which we've used a lot), can be found in the documentation for vectors in c++

I hope you can use the train of thought put into this; if you want more specific info I'll be happy to comment, Enjoy.

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

上一篇: 用OpenCV过滤凸包和凸面缺陷

下一篇: OpenCV中的形状上下文匹配