how to implement scipy.ndimage.convolve1d

Viewed 16

I have a code on python I like to convert it to c++.

I have a probleme in this line how can I implement it in cpp.

thank you

    y = scipy.ndimage.convolve1d(x1, x2, mode="constant")
1 Answers

You can use OpenCV filter2D function. Also you can try it in python to see if it does the thing that you want, it's pretty fast.

But if you want to implement the 1d convolution, the naïve implementation is just basically two nested for loops. Discrete convolution.

Related