0

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.

    y = scipy.ndimage.convolve1d(x1, x2, mode="constant")
Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128

1 Answers1

-1

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.

Marco Maia
  • 25
  • 1
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – abdo Salm Sep 28 '22 at 17:40