# xeucn

## PURPOSE

n-dimensional euclidean distance between each window in A and template T.

## SYNOPSIS

function C = xeucn( A, T, shape )

## DESCRIPTION

     n-dimensional euclidean distance between each window in A and template T.

     Similar to normxcorrn, except at each point (i,j) calculates the
     euclidean distance between the T and the window in A surrounding the
     point, storing the result in C(i,j).

     USAGE
      C = xeucn( 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=normxcorrn(T,A);  C2=xcorrn(A,T);  C3=xeucn(A,T);
      figure(1); im(C1);  figure(2); im(C2);  figure(3); im(-C3);

     See also XCORRN, CONVNFAST

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2008 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Lesser GPL [see external/lgpl.txt]

## CROSS-REFERENCE INFORMATION

This function calls:

- convnFast Fast convolution, replacement for both conv2 and convn.
- localSum Fast routine for box filtering.

This function is called by: