imread() wrong gray values

When I tried to imread an simple gray scale image I drew in paint.net, the gray scale of the image data was totally off -- the background changed from origianl white (255) to some random gray value (55).

1 comentario

Image Analyst
Image Analyst el 27 de Mzo. de 2020
Unfortunately you forgot to attach your image with the paper clip icon. I'll check back tomorrow.

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Mzo. de 2020

1 voto

The image file is not RGB, it is an colormapped image.
[img,cmap] = imread('image.png');
RGB = ind2rgb(img,cmap);
imshow(RGB)

Más respuestas (0)

Categorías

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

Etiquetas

Preguntada:

el 26 de Mzo. de 2020

Respondida:

el 27 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by