Questions tagged [template-matching]

Template matching is the process of finding a smaller known template image in another larger image.

363 questions
1
vote
1 answer

Chamfer Matching error in python opencv

I've been trying out various algorithms for my thesis. And now i'm currently focusing in template matching (where the main focus in matching would be the edge). Then I found out about chamfer matching. I'm torn between coding it myself, or using…
htinez
  • 34
  • 8
1
vote
1 answer

How to generate an image using parts of another image?

Before clarifying my question, please just consider these two generative portraits by Sergio Albiac: Since I really like this kind of portraits I wanted to find a way of producing them myself. I don't have much for now, the only things I can…
1
vote
2 answers

Simple template matching with python-openCv

I am trying to detect some simple 'red patterns' in an image. Here is the algorithm I follow: 1) filter out all other colors rather than 'red' and creating a balck&white image. I used 'cvtColor' with appropriate masking then I applied…
Danial
  • 703
  • 1
  • 11
  • 26
1
vote
2 answers

Identify largest cluster of SURF Points in MatLab

I have two images: a large image of a puppy (the scene) and a small crop of its nose (the target): I have gathered SURF points for both the target and the scene and then matched them. I have displayed the best matches on the scene image as…
1
vote
2 answers

Template matching algorithms

Please suggest any template matching algorithms, which are independent of size and rotation. (any source codes as examples if possible please) EDIT 1: Actually I understand how the algorithm works, we can resize template and rotate it. It is…
maximus
  • 4,201
  • 15
  • 64
  • 117
1
vote
1 answer

Is there an algorithm where I can match scale and rotation rotateRect in opencv

I have a template image , with white background and black shape over it.I also have an image which have a similar shape but in different rotation and scale,also have some noise in image.Just like the pic as follow!I want to use a rotateRect to get a…
1
vote
1 answer

Template Matching - Why the result matrix is smaller than specified?

So I'm doing the template matching for specific region from input image using OpenCVCameraView. Below is what my code looks like. Mat input; Rect bigRect = ...; //specific size public Mat onCameraFrame(CvCameraViewFrame inputFrame) { input =…
1
vote
0 answers

Need explanation about results produced from Python's sci-kit template matching library

EDIT: template url: http://c.nordstromimage.com/Assets/IDEV/common/00-00-00-free-shipping-evergreen-cid0330153898-7-adam-a4c331d8-38ab-4337-baf9-a46801899b3e-fil-file.png?Version=1 image url:http://shop.nordstrom.com/ I read through a sample…
lollerskates
  • 964
  • 1
  • 11
  • 28
1
vote
1 answer

OpenCV Template Matching - How to determine the angle of the matched template

I'm using OpenCV template matching for an industrial pattern matching scenario. How can I determine the angle between my template image and the display image? My routine is using matchTemplate -> normalize -> minMaxLoc. Can anyone please give me an…
Raedle
  • 11
  • 3
1
vote
0 answers

Subimage localization

Let me describe the problem as follows. I have a robot which moves across a known 2D board. The board is painted with several colors. The paintings are larger squares, circles and lines. The robot has a camera mounted so that it looks down towards…
1
vote
2 answers

Detecting All Occurrences of Subimage Within Image

Recently, I've been developing a small side project that needs the ability to find the X & Y coordinates of a subimage within another image. The images might be in different resolutions, but overall the image resolutions will be similar and the…
Spencer D
  • 3,376
  • 2
  • 27
  • 43
1
vote
0 answers

Template matching not necessarily invariant to rotation and scale, but should detect artifacts (of 3X3 pixels or more)

I want to compare a specific pattern (as on template image) and output "yes"/"no" according to the match. I don't require the method to be scale invariant. It just has to be translation invariant and rotation invariant (only till +/-2 degrees…
Saania
  • 625
  • 1
  • 6
  • 26
1
vote
0 answers

Get correspondences using Chamfer matching opencv

I am using chamfer matching to match a template with a reference image. I am using OpenCV'r chamermatching() method. I get the matching scores, but how can I get the correspondences ? In other words, corresponding to each cost, how can I get the…
1
vote
1 answer

Template matching results when the template is not on the original image

For testing purposes I'm building a bot that clicks on buttons in the screen. I have a folder with all the possible buttons that needs to be pressed and the application being tested only has one button shown at a time. There is no situations where…
1
vote
0 answers

Error Converting a CtvColor on Android and OpenCV on Eclipse

i'm developing to Android using openCV in Eclipse. I'm trying do template matching Frame a Frame. I can't convert the template and doing the match template on it. I'm using that function: public void initialize(){ if (src.empty()) …
NatsuDragonEye
  • 109
  • 5
  • 18