Image Processing Toolbox | ![]() ![]() |
Correlation
The operation called correlation is closely related to convolution. In correlation, the value of an output pixel is also computed as a weighted sum of neighboring pixels. The difference is that the matrix of weights, in this case called the correlation kernel, is not rotated during the computation. Figure 7-2 shows how to compute the (2,4) output pixel of the correlation of A
, assuming h
is correlation kernel instead of a convolution kernel, using these steps:
A
underneath.
The (2,4) output pixel from the correlation is
Figure 7-2: Computing the (2,4) Output of Correlation
![]() | Convolution | Filtering Using imfilter | ![]() |