Mahotas / Convolution
Type
Requires
Implementation Type
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
has topic
Entry Curator
migration
Post date
10/15/2013 - 12:45
Last modified
03/03/2020 - 11:59