MATLAB边缘函数

时间:2014-07-04 12:04:02

标签: matlab edge threshold

我对 edge 函数中的参数有疑问。

 edge(img,'sobel',threshold);
 edge(img,'prewitt',threshold) ;
 edge(img,'roberts',threshold);
 edge(img,'canny',thresh_canny,sigma);

如何选择前3种类型的阈值?是否有一个方面可以帮助选择此阈值(例如直方图)?我知道函数 graythresh 但我想手动设置它。到目前为止,我知道这是0-1之间的值,但我不知道如何解释它。

Canny也一样。我试图为thresh_canny = [low_limit,high_limit]输入一个数组。但不知道如何看待这些价值观。西格玛值如何影响图像?

1 个答案:

答案 0 :(得分:0)

这实际上取决于您想要在输出中看到的边缘类型。如果你想看到真正强大的边缘,在threshold的较高端(比如0.9-1)使用较小的间隔,这与图像的最高梯度幅度有关。

sigma而言,它用于在传递给edge之前过滤输入图像。这是为了减少输入图像中的噪声。