Effacer les filtres
Effacer les filtres

is it im2double() have the same result with double()?

1 vue (au cours des 30 derniers jours)
budi agung
budi agung le 4 Avr 2017
Réponse apportée : Jan le 4 Avr 2017
i read a image name it 'lena'
is it im2double(lena) == double(lena)?

Réponses (2)

Jan
Jan le 4 Avr 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
Spencer Chen le 4 Avr 2017
Try it and tell us.
  3 commentaires
Stephen23
Stephen23 le 4 Avr 2017
budi agung
budi agung le 4 Avr 2017
ok thx

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by