Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Image Cross-Correlation
Date: Wed, 8 Jun 2011 17:34:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <isobqc$q4q$1@newscl01ah.mathworks.com>
References: <isl8es$lab$1@newscl01ah.mathworks.com> <isleuv$clu$1@newscl01ah.mathworks.com> <isnvb1$hmj$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1307554444 26778 172.30.248.37 (8 Jun 2011 17:34:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 8 Jun 2011 17:34:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:730887

"Twilighter " <mscmatlab@gmail.com> wrote in message <isnvb1$hmj$1@newscl01ah.mathworks.com>...
> Thank you for your reply ...
> then how can i make the task i want. 
> 
> to do a cross- correlation between the two images to match them or compare them & the result is an image too not one single value?
- - - - - - - - - - -
  I don't quite understand what you are asking.  As you say, performing a cross correlation between two images with 'corr2' will simply give you a single scalar quantity which ranges between -1 and +1.  A value near 0 means the images are uncorrelated, near +1 they are strongly correlated, and near -1 one is strongly correlated with the negative of the other.  Nothing in this will give you another image.

  There is another cross-correlation function in the Image Processing Toolbox called 'normxcorr2' which obtains the cross correlation between a given template and a larger image for each of the possible positions of the template relative to the image.  Users can utilize this to determine areas in the larger image that have a strong correlation with the template.  If this sounds like something that interests you I would recommend a careful study of the pertinent document at:

 http://www.mathworks.com/help/toolbox/images/ref/normxcorr2.html

  One might consider this pattern of cross correlation values from 'normxcorr2' as constituting an image if it were rescaled to fit image ranges, but it would be a rather strange image.

Roger Stafford