how to calculate scale with matchTemplate

asked 2020-08-16 03:47:13 -0600

aligoglos gravatar image

I have problem that I hope someone give me a idea. In general I want to use matchTemplate to find template in image but with that we can find location but how measure how mush template scaled? suppose this is template:

image description

and this is area that I found in new image :

image description

As you can see founded area is smaller than template, But my problem is that how calculate resize scale !?

These images are samples, Is a way to solve this problem in general?

thanks for your advice.

edit retag flag offensive close merge delete

Comments

unfortunately, there is no direct dependance between the matching response and the scale.

berak gravatar imageberak ( 2020-08-16 07:01:57 -0600 )edit

matchTemplate assumes same scale. if you need to find objects at different scales, you need to rescale either image in small increments and retry matchTemplate using that

crackwitz gravatar imagecrackwitz ( 2020-08-17 20:54:17 -0600 )edit