【发布时间】:2019-08-30 02:57:58
【问题描述】:
我正在尝试将一些 Matlab 代码移植到 C++。 我遇到过这条线:
edges = edge(gray,'canny',0.1);
示例图像的输出是全黑图像。我想使用 cv::Canny 重现相同的行为。低阈值和高阈值应该使用什么值?
示例:
输出:
【问题讨论】:
-
通常取决于图像的类型,但您可能希望查看这些:kerrywong.com/2009/05/07/canny-edge-detection-auto-thresholding 或 stackoverflow.com/questions/4292249/…
-
我已经尝试了第一个,它检测到很多边缘,而 matlab 代码没有检测到。
-
澄清一下:你是在问如何将 0.1 放入 opencv 中?
-
请以无损格式 (.png) 发布输入和输出图像。
-
我想知道matlab用那个0.1做了什么。
标签: matlab opencv edge-detection threshold