Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: image correlation matching
Date: Fri, 3 Apr 2009 13:15:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gr524n$pm2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1238764503 26306 172.30.248.37 (3 Apr 2009 13:15:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Apr 2009 13:15:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1658297
Xref: news.mathworks.com comp.soft-sys.matlab:530033


i try to perform matching correlation in the frequency domain between two images(date base images of road  & stop sign template ) 
i try to find the location  of the 'stop sign template' inside the database images using FFT's.
This is my code : 
stop = imread('stop2.jpg');
imshow(stop)
st1 = rgb2gray(stop);
figure,imshow(st1)
temp1 = st1(299:376,110:177);
figure,imshow(temp1);
[m,n]=size(st1)
C = real(ifft2(fft2(double(st1)) .* fft2(rot90(double(temp1),2),m,n)));
figure,imshow(C,[])
mx=max(C(:))
thresh = mx-10
figure,imshow(C> thresh)
% End of the code .
anybody help me & tell me the correct way to use fft2 function to make correlation between two images ?!