2-D Correlation
Compute 2-D correlation of two input matrices
Libraries:
Computer Vision Toolbox /
Statistics
Description
The 2-D Correlation block computes the two-dimensional cross-correlation between two input matrices.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Algorithms
Given two input matrices, I1 and I2, that are size
M-by-N and
P-by-Q, the 2-D cross-correlation value at the point
(k,l)
is given by
The normalized cross-correlation value at the point
(k,l)
is calculated as
Suppose I1 and I2 are matrices with dimensions (4,3)
and (2,2). The following figure shows how the block computes cross-correlation value for the
point I1(1,3)
, which refers to the second row and fourth
column in zero-based indexing.
The cross-correlation value for the point I1(1,3)
is computed using these steps:
Slide the center element of I2 so that it lies on top of the (1,3) element of I1.
Multiply each weight in I2 by the element of I1 underneath.
Sum the individual products from step 2.
The cross-correlation value for the point I1(1,3)
is .
The normalized cross-correlation value for the point
I1(1,3)
is
Extended Capabilities
Version History
Introduced before R2006a
See Also
2-D Autocorrelation | 2-D Mean | 2-D Histogram | 2-D Median | 2-D Standard Deviation | 2-D Variance | 2-D Maximum | 2-D Minimum