2D Convolution in Python similar to Matlab's conv2

后端 未结 3 1443
醉话见心
醉话见心 2020-12-03 14:10

I have been trying to do Convolution of a 2D Matrix using SciPy, and Numpy but have failed. For SciPy I tried, sepfir2d and scipy.signal.convolve and Convolve2D for Numpy. I

3条回答
  •  [愿得一人]
    2020-12-03 14:59

    Why don't implement it by yourself?, note that conv2 uses a straightforward formal implementation of the two-dimensional convolution equation in spatial form. If a and b are functions of two discrete variables, n1 and n2, then the formula for the two-dimensional convolution of a and b is: enter image description here

    In practice however, conv2 computes the convolution for finite intervals.

提交回复
热议问题