what is the [ threshold] ?

hello , i have this Matlab code
[~, threshold] = edge(I, 'sobel');
but i don't know what is the threshold, can anyone help me ??

4 件のコメント

Geoff Hayes
Geoff Hayes 2016 年 5 月 6 日
Sallam - perhaps the description found at threshold will help clarify what it is.
the cyclist
the cyclist 2016 年 5 月 7 日
編集済み: the cyclist 2016 年 5 月 7 日
Looks like this is pointing to the input threshold argument, but the question is about the output argument.
But, sallam, Geoff is pointing you to the correct page.
Geoff Hayes
Geoff Hayes 2016 年 5 月 7 日
編集済み: Geoff Hayes 2016 年 5 月 7 日
Hmmm...I wa assuming that the description was still valid because of the statement If you do not specify threshold, or if you specify an empty array ([]), edge chooses the value automatically. And so if no threshold is passed in, then the output threshold would be that value that was automatically chosen. If that is all true (?), then the description for the input threshold would describe what the output threshold is.
Image Analyst
Image Analyst 2016 年 5 月 7 日
Yes, all that is true.
grayImage = imread('moon.tif');
[edgeImage, threshold] = edge(grayImage, 'Sobel', 0.5);
threshold % Will show 0.5
Actually the best explanation of how the threshold is automatically chosen is given if you follow the "Tips" link in the input threshold section.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2016 年 5 月 7 日

1 投票

edge() does a Sobel filter, and then thresholds it. The threshold that it picked is returned in threshOut. Here is the link: http://www.mathworks.com/help/images/ref/edge.html#outputarg_threshOut
If you want the actual Sobel filtered image, use imgradient(). It will be a gray scale image, not a binary image composed of thin lines.

質問済み:

2016 年 5 月 6 日

コメント済み:

2016 年 5 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by