convolution
Usage: convol in.pgm kernel.pgm [mode] out.pgm
Description: Convolution of in.pgm by kernel.pgm. The result is a float image. Depending on the value given for the (optional) parameter mode:
- mode = 0 (default) : naive algorithm. The image in.pgm is considered as null out of its support.
- mode = 1 : naive algorithm. The boundary of image in.pgm is extended outside its support.
- mode = 2 : convolution using the FFT. The image in.pgm is considered as null out of its support.
- mode = 3 : convolution using the FFT. The boundary of image in.pgm is extended outside its support.
Types supported: byte 2d, int32_t 2d, float 2d
Category: signal
- Warning:
- Naive convolution algorithm is in O(|in|*|kernel|). For large kernels, use FFT version which is in O(n log n) where n = max(|in|,|kernel|)
- Author:
- Michel Couprie