OpenCV :: matchShapes () example?

I would like to use a function matchShapes()to search for an object inside a query image.

Let's say I have an image of a book model, I want to extract its shape, and then try to find this book (its shape) inside another image.

I have a lot of googled, but have not found a real example of how to use matchShapesto achieve this. The documentation is not enough. Can someoen make a small example in C ++?

Thank you so much! (Note, I know I can use SIFT / ORB, etc., but I want to use matchShapes ())

+1
source share
1 answer

Step 1: Define the outline of the book and save it to vector<Point>.

Step 2: Detect the outlines in another image.

3: , 1, , . vector<vector<Point> >. , vector<Point> 1 vector<Point> matchShape(). . , matchShape().

, , . , .

+2

All Articles