xcorrn

PURPOSE ^

n-dimensional cross-correlation. Generalized version of xcorr2.

SYNOPSIS ^

function C = xcorrn( A, T, shape )

DESCRIPTION ^

 n-dimensional cross-correlation.  Generalized version of xcorr2.

 For 2 dimensional inputs this function is exactly the same as xcorr2,
 but also works in higher dimensions.   Can also be more efficient
 because it performs convolution using convnFast.

 The order of parameters is reversed from normxcorrn.  This is to be
 compatible with the matlab functions normxcorr2 and xcorr2 (which take
 parameters in different orders).

 USAGE
  C = xcorrn( A, T, [shape] )

 INPUTS
  A           - first d-dimensional matrix
  T           - second d-dimensional matrix
  shape       - ['full'] 'valid', or 'same' (see convn)

 OUTPUTS
  C           - correlation matrix

 EXAMPLE
  T=gaussSmooth(rand(20),2); A=repmat(T,[3 3]);
  C1=xcorr2(A,T); C2=xcorrn(A,T); C3=rot90(xcorrn(T,A),2);
  figure(1); im(C1);  figure(2); im(C2);  figure(3); im(C3);

 See also XCORR2, NORMXCORRN, XEUCN, CONVNFAST

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-Oct-2007 13:09:09 by m2html © 2003