Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

2-D cross-correlation

`C = xcorr2(A,B)`

C = xcorr2(A)

C = xcorr2(gpuArrayA,gpuArrayB)

`C = xcorr2(A,B)`

returns the
cross-correlation of matrices `A`

and `B`

with
no scaling. `xcorr2`

is the two-dimensional version
of `xcorr`

.

`C = xcorr2(A)`

is the autocorrelation
matrix of input matrix `A`

. It is identical to `xcorr2(A,A)`

.

`C = xcorr2(gpuArrayA,gpuArrayB)`

returns
the cross-correlation of two matrices of class `gpuArray`

.
The output cross-correlation matrix, `C`

, is also
a `gpuArray`

object. See Establish Arrays on a GPU (Parallel Computing Toolbox) for
details on `gpuArray`

objects.

Using `xcorr2`

with `gpuArray`

objects
requires Parallel
Computing Toolbox™ software and a CUDA-enabled NVIDIA GPU with compute capability 1.3 or
above. See System
Requirements for details.

Was this topic helpful?