Path: news.mathworks.com!not-for-mail
From: "Dave Robinson" <dave.robinson@somewhere.biz>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Template Matching
Date: Mon, 7 Apr 2008 09:03:03 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 50
Message-ID: <ftco07$9sl$1@fred.mathworks.com>
References: <fsnera$t69$1@fred.mathworks.com> <b725e021-4633-4de8-ad57-abd4fcd9e27c@m36g2000hse.googlegroups.com>  <36d513fb-3cc7-49e7-8397-3b3fefc79825@j1g2000prb.googlegroups.com>
Reply-To: "Dave Robinson" <dave.robinson@somewhere.biz>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1207558983 10133 172.30.248.37 (7 Apr 2008 09:03:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 7 Apr 2008 09:03:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 968489
Xref: news.mathworks.com comp.soft-sys.matlab:461461


androalpha_v7@yahoo.com wrote in message <36d513fb-3cc7-
49e7-8397-3b3fefc79825@j1g2000prb.googlegroups.com>...
> > There are several different image resizing algorithms, 
with
> > different properties. For example, some of the 
algorithms
> > concentrate on preserving sharp edges and some of them 
do not.
> > In your situation, what (if any) characteristics of the 
source image
> > are important to preserve in the enlarged image?
> 
> thanx walter for the advice..
> 
> A=image(image of any ships)
> B=subimage (containing number assigned to a ship)
> 
> the idea of my assignment is like fingerprint 
recognition...but i want
> to implement it using
> matlab template matching..
> so if the image contain the sbimage(no.assigned to 
ships)...then we
> can say its match..
> not only that..
> i have other 2 subimage to match with A before i can say 
this image is
> match...
> 
> so do u have any idea?
> 
For your application you DO NOT want to stretch your images 
to the same size. It is essential that the spatial scale 
between your search image and template remain fixed. Using 
Walter's technique will change the scaling of your 
template, so you will no longer be able to find a match 
between the template and the Search Image. 

What you have to do is embed your template image into a 
blank frame, so that if you view the resulting buffered 
image you see your template, the same size as it started 
and a large region of black pixels. Walters suggestions 
will essentially fill your buffer with a scaled version of 
your template. 

Pete Bone's response tells you how to do what you need.

Regards

Dave Robinson