Computes the 2D convolution of two arrays using the FFT method.
FCONV2D(array1, array2)
array1 |
- |
An array. |
array2 |
- |
An array. |
An array, the convolved result.
W1: randn(30)
W2: randn(30)
W3: conv2d(w1, w2)
W4: fconv2d(w1, w2)
Performs the 2D convolution of two random arrays. W3 performs direct convolution in the time domain and W4 performs the same convolution using the FFT method.
For an image
FCONV2D performs the two-dimensional linear convolution in the frequency domain by computing the 2D FFTs of the input arrays. This method is usually faster than CONV2D for when both inputs are relatively large arrays.
See CONV2D for a time domain implementation.
See IMCONV for image convolution that handles individual RGB components.