Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 15
    FWIW, I used your code here to test something else and it appears to me that the line w, h = template.shape[:-1] should be h, w = template.shape[:-1], at least with my test images (it is consistent across 3 sets of images)
    – JimR
    Commented May 9, 2017 at 22:02
  • 1
    Just grab the source code from the source link in his answer; it is up to date and works.
    – James T.
    Commented Jan 28, 2018 at 7:42
  • 1
    This is the best Commented Oct 10, 2018 at 11:05