Mahotas / Convolution

Type
Author
Luis Pedro Coelho
Requires
Execution Platform
Implementation Type
Programming Language
Interaction Level
License/Openness
Description

mahotas.convolve(f, weights, mode='reflect', cval=0.0, out={new array})

Convolution of f and weights

Convolution is performed in doubles to avoid over/underflow, but the result is then cast to f.dtype. This conversion may result in over/underflow when using small integer types or unsigned types (if the output is negative). Converting to a floating point representation avoids this issue:

c = convolve(f.astype(float), kernel)
has function
Entry Curator
migration
Last modified
03/03/2020 - 11:59