Normalize an image from 0 to 1

14 visualizaciones (últimos 30 días)
Bárbara Maurício
Bárbara Maurício el 10 de En. de 2021
Comentada: Bárbara Maurício el 10 de En. de 2021
Im trying to normalize an image from 0 to 1,after having used rgb2gray. However using mat2gray and im2double is only giving me 0 and 1 values, nothing in between. I also need to use the equation (I-min(I))/(max(I)-min(I)) and somehow I still can only get zeros and ones.

Respuesta aceptada

Image Analyst
Image Analyst el 10 de En. de 2021
mat2gray() and rescale() will both work. If you're only getting 0 and 1 then you have only two gray levels in your image. Post your image so I can check it.
  1 comentario
Bárbara Maurício
Bárbara Maurício el 10 de En. de 2021
Thank you for answering I have now managed to solve it but still appreciated!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by