Answer the question
In order to leave comments, you need to log in
OpenCV, multiple path comparison
There are 2 images. in one, the entire object is covered by the contour, and in the other, the object is covered by 2 contours (or more). How to compare Hu moments? As far as I understand, the moments are calculated from one contour. That is, for the second image, you need to combine the contours into one, and then count the moments. There is also a mention of related components, but all I could find about them is a parameter for the FindContours function. It still finds the same 2 or more koturs due to image quality. What is the right thing to do in such a situation?
Answer the question
In order to leave comments, you need to log in
Alternatively, you can combine the centers of mass of the contours and construct a convex hull for the resulting object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question