scipy.signal.correlate2d

scipy.signal.correlate2d(in1, in2, mode='full', boundary='fill', fillvalue=0, old_behavior=True)

Cross-correlate two 2-dimensional arrays.

Description:

Cross correlate in1 and in2 with output size determined by mode and boundary conditions determined by boundary and fillvalue.

Inputs:

in1 – a 2-dimensional array. in2 – a 2-dimensional array. mode – a flag indicating the size of the output

‘valid’ (0): The output consists only of those elements that
do not rely on the zero-padding.
‘same’ (1): The output is the same size as the input centered
with respect to the ‘full’ output.
‘full’ (2): The output is the full discrete linear convolution
of the inputs. (Default)
boundary – a flag indicating how to handle boundaries
‘fill’ : pad input arrays with fillvalue. (Default) ‘wrap’ : circular boundary conditions. ‘symm’ : symmetrical boundary conditions.

fillvalue – value to fill pad input arrays with (Default = 0)

Outputs: (out,)

out – a 2-dimensional array containing a subset of the discrete linear
cross-correlation of in1 with in2.

Previous topic

scipy.signal.convolve2d

Next topic

scipy.signal.sepfir2d

This Page