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$>
References: <isl8es$lab$> <isleuv$clu$> <isnvb1$hmj$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1307554444 26778 (8 Jun 2011 17:34:04 GMT)
NNTP-Posting-Date: Wed, 8 Jun 2011 17:34:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:730887

"Twilighter " <> wrote in message <isnvb1$hmj$>...
> 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:

  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