Template matching is the process of finding a smaller known template image in another larger image.
Questions tagged [template-matching]
363 questions
1
vote
3 answers
OpenCV Notehead detection from note Mat/image
I am doing a project where I need to detect musical elements from stave lines, and I am in the point where I know what duration an note element has (quarter, octet, etc) and I what to detect the center of the note-head so that I can found out what…

Ambrozie Beniamin Paval
- 115
- 1
- 10
1
vote
0 answers
OpenCV-Python Real-time template matching on screen (simple)
So here is the scenario: In my browser I have a small red rectangle floating around at a relatively slow speed, after a random amount of time it disappears and later reappears.
I want OpenCV to search for the rectangle until it is found and then…

Disguised
- 21
- 2
1
vote
1 answer
Template matching with distortions
I have a pattern/image that's printed on a piece of paper and multiple copies are stuck on the wall (ImageA) and I have a larger image (B) of the wall with all these pieces of paper. I want to find the locations of these patterns. Due to apparent…

SEU
- 1,304
- 4
- 15
- 36
1
vote
0 answers
MatchTemplate selects the same region multiple times
My environment:
I'm doing some image processing using Emgu CV (v 3.2), which is just an OpenCV C# wrapper API, in Visual Studio 2013 for Windows 10.
What I'm intending to do:
Given an image (of a floor plan), the user selects a region (a symbol on…

Matthew Fishman
- 23
- 7
1
vote
0 answers
Stereo Image Alignment
I am wanting to automatically align stereo images for best fit. The images are taken only a few inches apart and in the same lighting conditions etc but there might be slight rotations and shifts etc. Can someone describe the best approach for this…

Andrew King
- 375
- 2
- 15
1
vote
0 answers
SIFT/SURF/ORB for detection and orientation of simple pattern
My project is centered on positioning of several small objects with a stationary camera. I've drawn some crisp, simple graphical pattern images (like this), printed them out and try to detect them in the image. My straightforward method:
color…

Nolemocius
- 21
- 4
1
vote
1 answer
OpenCv matching template in Video [Java]
please i try to make a new application in java for matching picture and video, the matching of template in picture working fine , but when i try to do it for video i always have this error message :
OpenCV Error: Assertion failed ((depth == CV_8U…

Malek Ben el ouafi
- 995
- 12
- 37
1
vote
1 answer
exact position of match with OpenCV ORB matcher
I have built a simple algorithm for visual mark detection with OpenCV on Python, that uses their ORB detector as the second step. I use ORB with the BFmatcher, the code is borrowed from this project:…

Nolemocius
- 21
- 4
1
vote
1 answer
How to measure rotation angle of an image compared to a known template
I've succeeded on it by using the below method, but I'm sure there must be other more time-efficient alternatives to provide exact angle of rotation instead of an approximation as the method below. I'll be pleased to hear your feedback.
The…

Oscar
- 11
- 1
- 2
1
vote
1 answer
matching multiple object using OpenCV
I am trying to match multiple object using only one template.
But the problem is my program is matching multiple occurance for evrey object in the input image.
How do i match multiple objects and evrey objects for just one time in the input image?…

Malek Ben el ouafi
- 995
- 12
- 37
1
vote
1 answer
TypeError while template matching in opencv python
Part of my code is :
import pyscreenshot as ImageGrab
img=ImageGrab.grab()
img = img.load()
img = np.array(img)
template = cv2.imread('s2_5.jpg',0)
res = cv2.matchTemplate(img,template,cv2.TM_CCOEFF)
I'm getting the following error…
user4893562
1
vote
0 answers
OpenCV Template Matching error in Android
I am trying to compare two faces using matchTemplate function of opencv . I have the following code :
Mat img1 = new Mat();
Utils.bitmapToMat(bmpimg1, img1);
Mat img2 = new Mat();
Utils.bitmapToMat(bmpimg2, img2);
Mat img = new…

Christopher Marlowe
- 2,098
- 6
- 38
- 68
1
vote
0 answers
SURF performance parameters for template matching
I am working on SURF based template matching in MATLAB. For performance parameters often Repeatability, Precision and recall are considered. But for template which is sub-image of a big image,how to find number of correspondences in Repeatability…

Debabrata Pal
- 91
- 5
1
vote
2 answers
OpenCV cv2.matchTemplate crash: Unhandled exception at 0x74B5E4E4 in python.exe: 0xC0000005
When I try to use the template matching method TM_CCOEFF of opencv package, my python crashed. However no error message was shown on my terminal. I can use the normed method TM_CCOEFF_NOMRED without any issue. I really need the implementation of…

Sirius
- 11
- 3
1
vote
1 answer
Recognize hand drawn shape in OpenCV
I have the following task: recognize a set of simple hand-drawn shapes on a sheet of paper from a still image (not a video stream), so they might not be exactly identically pixelwise.
Those shapes are basically symbols for doors, windows, etc. in a…

Paul Latzelsperger
- 711
- 1
- 6
- 8