1

Tried this multi scale template matching example but its inaccurate with this image

I want to locate my template in an input image where the template might show at different scales, so that I can perform affine transformations later.

ias
  • 314
  • 2
  • 14
SATYAM
  • 19
  • 1
  • 4

1 Answers1

2

Your question is a little confusing. The title asks for improving accuracy and in your text you mention the template matching is lagging (slow?).

The example you link is a bare bones trick that might work, but it really isn't efficient matching at all.

If you want to improve accuracy, the correct term for what you want is scale invariant template matching. This can be done by detecting features (like edges) and comparing them.

See link1 and link2 for one example of this.

ias
  • 314
  • 2
  • 14
  • can I map coordinates of a banner with the different aspect ratio (multi-scale )using invariant template matching? – SATYAM Nov 04 '18 at 21:31
  • You want to match things in one image (banner) with the same things in another image of a different size? – ias Nov 05 '18 at 01:40
  • Yes ,I want to get coordinate of banner inside image after matching things in other image of a different size!. – SATYAM Nov 06 '18 at 07:27
  • Yes this will let you do that. – ias Nov 06 '18 at 15:49
  • If possible , please brief how to get coordinate ,i have tried above link . Instead of SURF used orb = cv2.ORB_create(nfeatures=1000, scoreType=cv2.ORB_FAST_SCORE) but it's mapping only image feature such as name and logo. please elaborate in steps. – SATYAM Nov 08 '18 at 12:17
  • The problem with these methods are that they give a result with skew and rotation mixed in. As far as I know there is no way to extract the size from the homography matrix? – Jugbot Jan 16 '20 at 18:24
  • @SATYAM I have the same issue, did you already found a way to get coordinates or not? – ircham Apr 11 '20 at 10:46