Template matching is the process of finding a smaller known template image in another larger image.
Questions tagged [template-matching]
363 questions
2
votes
1 answer
XSL Template-match replace element
I have scoured the forums and and still not clear on this. I'm very new to the topic.
I have HTML output that is being sent to a browser email client (Outlook). Outlook overwrites the characteristics of the
tag and introduces large spacing. I…

solardb
- 21
- 2
2
votes
1 answer
OpenCV template matching flag for failure condition
This link has sample on Template matching.Ideally there is an image and a template for matching.How do I get the result status as True/False if I provide a wrong…

addcolor
- 455
- 8
- 23
2
votes
1 answer
when using opencv cvMatchTemplate, how to choose a good template for more accurate matching?
I am using opencv cvMatchTemplate to find a trademark pattern in a bunch of images.
now what I did is looking at the picture, find some unique patch from the trademark, and use it as my template.
I found using the whole trademark image is not…

user386436
- 45
- 5
2
votes
1 answer
matchShapes using grayscale images opencv
According to the matchShapes documentation, the input can be either gray scale images or contours. But when I tried two gray scale images, I got an assertion failed error. Upon further exploration, I found from here that the Mat object has to be a…

Lakshmi Narayanan
- 5,220
- 13
- 50
- 92
2
votes
1 answer
Detect and count objects in an image
I'm trying to write a script in python to detect and count objects inside an image, but I'm failing miserably.
It is the first time I get interested and try something by means of computer vision. I have tried using cv2 module (open cv) following…

Sabo-Tabby
- 63
- 1
- 6
2
votes
1 answer
How can I detect the mid-field line over the soccer field images?
Given the similar soccer field image, First, I need to detect the midfield line (as I superimposed above) and more the merrier, I would like to learn the image projection for making the midfield line orthogonal evading the perfective distorion as…

erogol
- 13,156
- 33
- 101
- 155
2
votes
1 answer
Arrow recognition in video
I would like to create a program that can identify arrows in a video feed and determine the direction they are pointing at (left or right). My aim is to use this program with an arduino robot in order to determine the direction in which the bot…

Jeremy Borg
- 413
- 2
- 6
- 16
2
votes
1 answer
How to detect specific number from image with OPENCV?
I live in Turkey, and in Turkey, TV commercials are making some countdowns which tells us how many minutes left to the tv program or film starts.
What I'am trying to do is catch the 00:59 seconds or just the 2nd "0" on the counter. The alghoritm…

user3499689
- 77
- 1
- 6
2
votes
1 answer
JavaCV Image Processing error
I am working on a java project which includes match templates in images. I have seen some source codes, both have no errors about imports(I already have the javaCV libs),etc. but when I run it, it gives this error.
Here are the two source codes I…

steven0529
- 1,513
- 1
- 18
- 28
2
votes
4 answers
Vectorize this strfind loop
I'm looking to vectorize this loop:
needle = [1 2 3];
haystack = [0 0 1 2 3 0 1 2 3;
0 1 2 3 0 1 2 3 0;
0 0 0 1 2 3 0 0 0];
for ii = 1:3
indices{ii} = strfind (haystack(ii,:), needle);
end
indices{:}
indices then…

andrelucas
- 678
- 3
- 10
2
votes
2 answers
Find image in another image using javacv
I want to find an image in another image. I already tried a "template matching" approach, but i didn't know how make it invariant to changes in scale, rotation, perspective, etc.
I have read about feature detection and suspect that usage of…

HADEV
- 437
- 8
- 19
2
votes
3 answers
OpenCV: How to determine/detect if I have a necessary object in the photo or not?
How can I determine/detect if I have a necessary object in the photo or not?
I don't need to recognize the class of the object, but I need to know if I have exactly the same object as in the template picture.
Thus far I have tried to use template…

Sghwarzengold
- 21
- 3
2
votes
1 answer
Angle and Scale Invariant template matching using OpenCV
Function rotates the template image from 0 to 180 (or upto 360) degrees to search all related matches(in all angles) in source image even with different scale.
The function had been written in OpenCV C interface. When I tried to port it to openCV…

Sharath
- 99
- 3
- 7
2
votes
1 answer
openCV template matching using CV_TM_CCORR_NORMED
I have this code
cvMatchTemplate(image2, templat2, result, CV_TM_CCORR_NORMED);
How do I make the program execute the following lines if there is a match:
double min_val, max_val;
CvPoint min_loc, max_loc;
cvMinMaxLoc(result, &min_val, &max_val,…

vidzz
- 197
- 2
- 4
- 15
2
votes
1 answer
OpenCV Template Matching Drawing Rectangle Around Match
I want to use template matching, i am utilizing a code that i found that does what i want where it keeps it in bitmap and get a return of bitmap, the problem is im not entirely sure how i can get to drawing in the rectangles. I am using only java,…

Auf Truh
- 51
- 1
- 4