2D crosscorrelation of two input matrices
The Crosscorrelator
object computes 2D crosscorrelation
of two input matrices.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
H = vision.Crosscorrelator
returns
a System object, H
, that performs twodimensional
crosscorrelation between two inputs.
H = vision.Crosscorrelator(
returns
a 2D cross correlation System object, Name
,Value
)H
, with each
specified property set to the specified value. You can specify additional
namevalue pair arguments in any order as (Name1
, Value1
,...,NameN
,ValueN
).

Specify dimensions of output This property controls the size of the output scalar,
vector, or matrix produced as a result of the
crosscorrelation between the two inputs. This
property can be set to one of


Normalize output Set this property to 
step  Compute 2D correlation of input matrices 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
Compute the 2D 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 2D Correlation block reference page. The object properties correspond to the block parameters.