Matlab gradient equivalent in opencv

前端 未结 5 855
感情败类
感情败类 2020-12-10 21:54

I am trying to migrate some code from Matlab to Opencv and need an exact replica of the gradient function. I have tried the cv::Sobel function but for some reason the values

5条回答
  •  醉梦人生
    2020-12-10 22:39

    Jorrit's answer is partly correct. In some cases, the value of the directional derivative may be negative, and MATLAB will retain these negative numbers, but OpenCV Mat will set the negative number to 0.

提交回复
热议问题