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:

  1. In your original image Find shapes.
  2. 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.
  3. Then minimum and maximum x and y coordinate for each contour. The
  4. for each contour width = max_x - min_x and height = max_y - min_y
  5. Then each contour Personalize image

    regionOfInterest = rect (min_x, min_y, width, height) Templetmaj = original image (regionOfInterest);

  6. 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.

  7. If you can vary the scale of that template image are you pryUp () or pryDown () Can.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -