Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The idea is that whatever method you are using to find the contours may not start and end at the same place, or may have additional or missing points. So it provides the matches vector to allow you to specify exactly which points match. In your case, it doesn't matter so much. Just create a vector of DMatch with the index set to the same number.

matches.push_back(DMatch(0,0,0));
matches.push_back(DMatch(1,1,0));
matches.push_back(DMatch(2,2,0));
matches.push_back(DMatch(3,3,0));
...