Why does the "graythresh" function return 0 on input images of type "double"?
Mostrar comentarios más antiguos
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"?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Segmentation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!