Template matching is used in order to find a smaller image (called template) in a bigger image. The tag must be used only for queries related to such tasks.
Questions tagged [matchtemplate]
53 questions
0
votes
1 answer
OpenCV "coordinate specific" match template
I have an image where I need to detect an object as fast as possible. I also know that I only need to detect the object closest to the center.
AFAIK Opencv's MatchTemplate works somewhat like this (pseudocode):
for(x in width):
for(y in…

ChungusKhan
- 25
- 1
- 6
0
votes
0 answers
opencv matchTemplate precision issue?
can anybody help me understanding why matchTemplate does not provide zero output in areas where the template or the image are zero?
Here is an example
void DumpMatToFile(const Mat &in, string filename)
{
ostringstream os;
os << in.size() <<…

user2198397
- 1
- 3
0
votes
1 answer
Interpretation of results using matchTemplate
I am trying to match 2 images using the following matchTemplate code.
int match_method = Imgproc.TM_CCOEFF_NORMED;
int result_colsAB = matB.cols() - matA.cols() + 1;
int result_rowsAB = matB.rows() -…
0
votes
2 answers
Matching template images with masks using OpenCV and C++
How can I match a masked image using matchTemplate() in OpenCV with C++?
This is my masked template image:
And this is my source image:

Jaime Ivan Cervantes
- 3,579
- 1
- 40
- 38
0
votes
1 answer
OCR detection with openCV
I'm trying to create a simpler OCR enginge by using openCV. I have this image: https://dl.dropbox.com/u/63179/opencv/test-image.png
I have saved all possible characters as images and trying to detect this images in input image.
From here I need to…

Magnus O.
- 468
- 5
- 17
0
votes
1 answer
matchTemplate opencv not working as shown in opencv document
I am struggling with the problem as IN the image that I have captured from camera , I need to find the existence and location of some patterns.
For this I found to use matchTemplate method of opencv.I used the images used in the sample of opencv and…

Gypsa
- 11,230
- 6
- 44
- 82
-1
votes
1 answer
use a screenshot on template matching "opencv"
[enter image description here][1]good evening, I would like to make a screenshot and use it on templat matcching but every time i tried i have this error , i'm not a pro programer i just do that for the fun if someone could help me that's will be…

kwalid600
- 21
- 5
-1
votes
1 answer
matchTemplate with resized image does not work:(-215:Assertion failed) _img.size().height <= _templ.size().height
I resize my image before the matchTemplate call
to make sure that both images have the same size.
# -*- coding: utf-8 -*-
import cv2 as cv
import numpy as np
import time
img_rgb = cv.imread('t2.png')
img_gray = cv.cvtColor(img_rgb,…

bob morane
- 650
- 1
- 11
- 24