opencv - How to compare two contours translated from one another's position? -
Image: Hi all,
I want to compare two settings; To find the similarity between the two patterns, find the distance between them, when I take the template contour on the right side, IA ???? to find the same parallelism from the left in the form of the context sarant contour. I get an error because the scene contour points are transliterated from the contour point. Actually, taking the straight point from the two pictures directly, as you can see that I can not just cut the contour area because it affects the neighboring settings. .
Should I create an empty image with the size of the visual image and make my template contour slide on the visual image to find the match? Or is there any better way? Regards, Balaji. R
You can do the following:
- In your original image Find shapes.
- Get shape sequence / points for each contour. For example, let's say that the debut is stored as parity 1 (only a rough example), point 1, point 2, point -3 etc.
- Then minimum and maximum x and y coordinate for each contour. The
- for each contour
width = max_x - min_x and
height = max_y - min_y
Then each contour Personalize image
regionOfInterest = rect (min_x, min_y, width, height) Templetmaj = original image (regionOfInterest);
Now, match the matchplate (); In between each individual template image (made from each contour) and the original image, and then you can find the place of maximum coaching.
- If you can vary the scale of that template image are you
pryUp () or
pryDown () Can.
Comments
Post a Comment