Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Template Matching
Date: Mon, 7 Apr 2008 14:27:01 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 35
Message-ID: <ftdavl$7dc$1@canopus.cc.umanitoba.ca>
References: <fsnera$t69$1@fred.mathworks.com> <b725e021-4633-4de8-ad57-abd4fcd9e27c@m36g2000hse.googlegroups.com> <36d513fb-3cc7-49e7-8397-3b3fefc79825@j1g2000prb.googlegroups.com> <ftco07$9sl$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1207578421 7596 192.70.172.160 (7 Apr 2008 14:27:01 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Mon, 7 Apr 2008 14:27:01 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:461515


In article <ftco07$9sl$1@fred.mathworks.com>,
Dave Robinson <dave.robinson@somewhere.biz> wrote:

>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. 

You are not representing what I said accurately. What I wrote was,

>>You have a problem that those two images do not have the same
>>aspect ratio. Therefor in order to expand the size of A, you
>>are either going to need to leave some empty space in the enlarged
>>image, or you are going to have to stretch the x and y axes
>>unequally.

and I then proceeded to ask what characteristics were important
in the image expansion, so that we could figure out what kind
of expansion to use. Your "blank frame" option is the same as
my conditional "empty space" option, and my image magnification
option was accompanied by a warning that it would stretch the
axes unequally.
-- 
  "It is surprising what a man can do when he has to, and how
  little most men will do when they don't have to."
                                              -- Walter Linn