This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ImageCorrelate

ImageCorrelate
gives the correlation of image with kernel ker.
ImageCorrelate
computes a generalized correlation in which the function f is used in place of Dot.
  • The correlation kernel is given as a two-dimensional numerical matrix.
  • ImageCorrelate by default gives an image of the same dimensions as image.
  • The kernel ker can be another image.
  • The correlation kernel must have either one channel or the same number of channels as the image.
  • In ImageCorrelate, typical settings for the correlation operator f include:
Dotstandard correlation
ManhattanDistanceManhattan or "city block" distance
EuclideanDistanceEuclidean distance
SquaredEuclideanDistancesquared Euclidean distance
NormalizedSquaredEuclideanDistancenormalized squared Euclidean distance
CosineDistanceangular cosine distance
CorrelationDistancecorrelation coefficient distance
Blur an image by correlating it with a Gaussian matrix:
Find occurrences of a template in an image:
Blur an image by correlating it with a Gaussian matrix:
In[1]:=
Click for copyable input
Out[1]=
 
Find occurrences of a template in an image:
In[1]:=
Click for copyable input
Out[1]=
A basic face detector that uses the normalized correlation with an image of a pair of eyes:
New in 7 | Last modified in 8