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
1
vote
0 answers
OpenCV Error: Assertion failed ((depth == CV_8U || depth == CV_32F)
I know this question has been asked many times before but none of them addresses the problem below. I have two np arrays that are both uint8 but opencv seems to incorrectly think one is 32F. Why is that and how can I fix it in python if I want the…

Nickpick
- 6,163
- 16
- 65
- 116
1
vote
1 answer
Access violation/Program not responding when Matching template from Camera capture. (C# EmguCV)
Here is the code i'm currently using in C# and EmguCV included:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using…

hyhae
- 43
- 7
1
vote
1 answer
how to get the result in template matching code?
I am a beginner to Computer vision .I am currently working on a project to find the match between two images using matchTemplate in iOS.The problem that I am facing is with finding a way to determine whether the two images are matching or not…

AlBandery
- 11
- 2
1
vote
0 answers
Ambient Lighting matchTemplate in Opencv Producing false positives
I am trying to have a video stream taking one frame and then using smaller sub sections of that image to look for the same objects in the next frame.
When using synthetic data in a controlled environment it works well.
When I actually take real…

JoeCodeCreations
- 660
- 2
- 6
- 19
1
vote
1 answer
gpu::matchTemplate versus cvMatchTemplate
I've implemented a software for searching a pattern inside an image. With cvMatchTemplate the execution time is around 10ms (because I'm taking a pattern of 40x40 in a search window of 120x160 pixels. The image is 640x480 so I'm not considering the…

Cesare Mercurio
- 11
- 1
- 6
0
votes
0 answers
Increase the detection performance of matchTemplate() in openCV
I'm writing a script for symbol recognition using openCV. The aim is to get engineering schematics such as P&IDs and detect the different symbols within them. As of now I've successfully implemented the part of the code which gets the wanted…

thedoris
- 1
- 1
0
votes
0 answers
Faster Image with OpenCV?
I am working on a project that would help me learn python. I wanted to create a program that would automate a minigame. The minigame have a pointer above a bar and the bar will have three colors in it (green, yellow, red). The point of the game is…
0
votes
0 answers
Opencv matchTemplate fails to detect similar objects
I'm using OpenCV 4.5.4 to locate an image in another image. And for that the matchTemplate function.
The task is to find "Chips" on a table, for a robot to sort them into magazines for automated production. There is only one type of "Chips" on the…
0
votes
0 answers
opencv image processing method recommendation
so im working on a program thats comparing a screen shot with a template image. ive finished the image recognition code ( most of it atleast ( from what i know )) but it keeps getting false positives. right now im using CV_TM_CCOEFF but i still dont…
0
votes
1 answer
Trying to understand match_template from skimage.feature
I'm trying to understand someone's code from match_template, but I couldn't understand the below process. Let's say there's a picture he's going to chop several parts. The picture is saved in:
ImagenTotal =…

Li-Ting Liao
- 3
- 1
0
votes
1 answer
Function matchTemplate used with screen capture in OpenCV
I would like to use an OpenCV function called matchTemplate to match a template picture with my current screen. My current screen and template picture are saved in files. I am using the code below to match my template with the screen:
Mat screen =…

Michal
- 627
- 3
- 13
0
votes
1 answer
matchtemplate openCv2 python not match similar look
I have an Image that change it random the color, so some time the OpenCV recognize the object and sometimes it isn’t:
My code:
grey_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
grey_temp = cv2.cvtColor(temp, cv2.COLOR_BGR2GRAY)
w, h =…

Mayli
- 93
- 9
0
votes
0 answers
Template Matching not working in different images
I am trying to compare different photos of faces to develop some kind of Face Recognition in Android. I am using OpenCV3 and match-Template , the problem is that if I cut a face in an image and use the same full image I get a match and all it's ok,…

Gerard E
- 27
- 9
0
votes
1 answer
Multi-Scale Template Matching without looping through every size
What are the different ways to Match an image to a template on different size screens?
For instance, if I have a template from a 720p screen and try to use it on a 1080p screen it would never find it
I tried Sift before, but there were way too many…

Bilal Abdullah
- 136
- 1
- 1
- 5
0
votes
1 answer
OpenCv finding similar image
I'm trying to play with the match_template in opencv,
i try to match this two image,
this is the image > https://i.stack.imgur.com/3SzBo.jpg
the stars I want to search >https://i.stack.imgur.com/X1vjD.jpg.
The result is over 0.9 which is really good…

Chocobi
- 3
- 1