View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Template Matching

4.4 | 5 ratings Rate this file 61 Downloads (last 30 days) File Size: 55.1 KB File ID: #20061 Version: 1.0
image thumbnail

Template Matching


Alaa Eleyan (view profile)


27 May 2008 (Updated )

finding template image inside a target image

| Watch this File

File Information

two functions used to implement template matching. the program finds the template image inside the target image using correlation.

Required Products Aerospace Blockset
MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (14)
16 Jun 2016 cgh9046

14 Aug 2013 Thilina Gunawardane

14 Aug 2013 Thilina Gunawardane

Hey Alaa Eleyan,

I'm Thilina a Software Engineering Student. And Im a starter in Image Processing.
I would like to know what do you mean by Power of The Image and DC components in your implementation of Template Matching. I would like get hear from you very soon.

Thank you for the time.


Comment only
03 May 2012 pham bao

you can reference

Comment only
21 Apr 2012 Ahmad

Ahmad (view profile)

did you try fast-fourier?

Comment only
20 Apr 2012 pham bao

hi.It's verry slow. We can using Fast-Fourier.

Comment only
11 Feb 2012 john john

perfect =)

Comment only
06 Feb 2012 lingru celine

may i know the whole coding for this template matching? now i'm doing the project is similar to this...i'm no idea how to do ... thanks

Comment only
25 Aug 2011 Aiden

Aiden (view profile)

hi.. how do you find multiple letters in the template file?

need help

Comment only
13 Apr 2009 Hanaa

Hanaa (view profile)

Hi Everyone,

This is great. But how do you detect facial features using template matching?

I'll be very grateful for your help. Thanks! :)

Comment only
29 Jan 2009 Chen yuan

one of the code in tmp.m file: M(i,j)=corr/sqrt(sum(sum(Nimage.^2))) that used for Nimage(target image) normalization, whether is it lack of a normalizated for image22(template image)? i modified M(i,j):M(i,j)=corr/sqre(sum(sum(Nimage.^2))) *sum(sum(image22.^2)))) , is it necessary?

19 Jan 2009 Lee Borland

Hi there.

Can I ask how to implement this? When you say 2 functions are used, which 2? And you're trying to match image2 to image1? I have to match a scale marking in my image(scale is 10mm). So if i have an image of just the 10mm marking, i call it "image2" and then just rename my origional "image1"??

Sorry, little confused.


Comment only
09 Aug 2008 Jessica Keating

Hello!this was quite useful to me. But the detection ends once it finds one instance. Is there a way to mark a rectangle over all the instances that it finds?

05 Jun 2008 Legesse Zerubabel

Contact us