- uint8 images are treated as having values from 0 to 255.
- floating point images are treated as having values from 0 to 1.
imshow not working when going from unit8 to double
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
raheem mian
am 9 Jan. 2020
Kommentiert: raheem mian
am 9 Jan. 2020
I converted an image from uint8 to double but when I use imshow on the matrix type double, it shows a white box. Why does that happen ?
0 Kommentare
Akzeptierte Antwort
Stephen23
am 9 Jan. 2020
Most likely because you did not scale the image when you converted the type.
So if you convert to double you will need to divide by 255:
Im_double = double(Im_uint8) / 255
or just use im2double, which does this conversion:
Im_double = im2double(Im_uint8)
Weitere Antworten (1)
Steven Lord
am 9 Jan. 2020
How did you convert the image from uint8 to double? See this page in the Image Processing Toolbox documentation and this one in the MATLAB documentation for more information as to why that matters.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!