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.

5
  • 2
    I agree with Moshe but I believe it should be cv2.matchtemplate(large_image, small_image, method). Also here is another good source of information for template matching in python. Commented Feb 6, 2014 at 3:20
  • 1
    Weirdly enough from cv2 import cv raises ImportError: cannot import name 'cv' while import cv2 works just fine…
    – jeromej
    Commented Feb 12, 2016 at 11:46
  • 1
    SOLUTION: Ok so as I'm using Py3, it actually uses OpenCV3 despite it still imports as cv2 so some stuff have changed places/names.
    – jeromej
    Commented Feb 12, 2016 at 12:20
  • Will it work if one of the image is present as low opacity in other image.(On of the input images is watermarked in other image.) Commented Dec 26, 2016 at 13:16
  • I had to sudo apt-get install python3-opencv for this to work on Ubuntu 20.04
    – brewmanz
    Commented Sep 5, 2022 at 3:38