I need to get a threshold value not by looking at the graph I was told there is a way to calculate the threshold value from the histogram, Can someone help me
I = imread('Test1.tif'); J=rgb2gray(I); figure; imhist(J);
thresholdValue = 100; bw = J > thresholdValue;
I am currently putting a casual 100 inside after looking at the histogram. I need the threshold value to segment the picture into fore and background. Is the a way to calculate a precise threshold value.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/195089-how-to-i-get-a-threshold-value-from-looking-at-histogram#comment_275152
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/195089-how-to-i-get-a-threshold-value-from-looking-at-histogram#comment_275152
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/195089-how-to-i-get-a-threshold-value-from-looking-at-histogram#comment_275153
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/195089-how-to-i-get-a-threshold-value-from-looking-at-histogram#comment_275153
サインインしてコメントする。