Why does the "graythresh" function return 0 on input images of type "double"?
Ältere Kommentare anzeigen
The documentation for the "graythresh" function says that it accepts images of type "uint8", and of type "double".
For "uint8", the "graythresh" function works as expected, as follows :
>> I = imread('coins.png');
>> level = graythresh(I)
level =
0.4941
>>imshow(im2bw(I, level));
However, when the input image is of type "double", the level is 0 as follows :
>> I = imread('coins.png');
>> level = graythresh(double(I))
level =
0
Why does this happen even though the "graythresh" function can accept inputs of type "double"?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!