来自Soble运营商的轮廓

时间:2018-01-02 13:20:04

标签: c++ opencv

我已经从OPENCV教程中实现了Sobel代码: https://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html 但是我无法在" grad"上实现findContours功能。 Matrix(Sobel opencv的最终结果)。 可以将Sobel与findContours一起使用,或者我必须使用canny(Canny的最大问题是它非常慢) 非常感谢您的帮助

1 个答案:

答案 0 :(得分:1)

主要区别在于Canny返回二进制图像而不是Sobel方法。您只能在二进制图像上执行findContours,如the documentation中所述。

  

Source,一个8位单通道图像。非零像素被视为1。