is it im2double() have the same result with double()?
Ältere Kommentare anzeigen
i read a image name it 'lena'
is it im2double(lena) == double(lena)?
1 Kommentar
Stephen23
am 4 Apr. 2017
No.
Antworten (2)
Jan
am 4 Apr. 2017
While double() converts the type of the data only, im2double() cares for the values also:
img = uint8([255, 127])
double(img) % >> [255, 127] as double
im2double(img) % >> [1, 0.498] as double
The values are scaled to the range [0.0, 1.0] as wanted.
Spencer Chen
am 4 Apr. 2017
0 Stimmen
Try it and tell us.
Kategorien
Mehr zu Convert Image Type 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!