2-D cross-correlation of two input matrices
Crosscorrelator object computes 2-D cross-correlation
of two input matrices.
Starting in R2016b, instead of using the
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example,
= step(obj,x) and
y = obj(x) perform
H = vision.Crosscorrelator returns
a System object,
H, that performs two-dimensional
cross-correlation between two inputs.
H = vision.Crosscorrelator( returns
a 2-D cross correlation System object,
H, with each
specified property set to the specified value. You can specify additional
name-value pair arguments in any order as (
Specify dimensions of output
This property controls the size of the output scalar,
vector, or matrix produced as a result of the
cross-correlation between the two inputs. This
property can be set to one of
Set this property to
|step||Compute 2-D correlation of input matrices|
Compute the 2-D correlation of two matrices.
hcorr2d = vision.Crosscorrelator; x1 = [1 2;2 1]; x2 = [1 -1;-1 1]; y = step(hcorr2d,x1,x2);
This object implements the algorithm, inputs, and outputs described on the 2-D Correlation block reference page. The object properties correspond to the block parameters.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).