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

Respuestas (2)

Jan
Jan el 4 de Abr. de 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 el 4 de Abr. de 2017

0 votos

Try it and tell us.

3 comentarios

budi agung
budi agung el 4 de Abr. de 2017
it give different result what should i choose best for image processing ?
budi agung
budi agung el 4 de Abr. de 2017
ok thx

Iniciar sesión para comentar.

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 4 de Abr. de 2017

Respondida:

Jan
el 4 de Abr. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by