Problem with reading colorful images with png format

2 vues (au cours des 30 derniers jours)
Memo Remo
Memo Remo le 15 Juil 2021
Commenté : Memo Remo le 15 Juil 2021
Hi,
When I read the attached image in MATLAB using its imread function, the image is automatically converted to a grayscale image. Please let me know how I can fix this. Many thanks in advance.

Réponse acceptée

KSSV
KSSV le 15 Juil 2021
Modifié(e) : KSSV le 15 Juil 2021
Note thar your image is already a gray scale image, it is not RGB image. If you are expecting to show up the same in MATLAB try:
[I,cmap] = imread('https://in.mathworks.com/matlabcentral/answers/uploaded_files/685098/File.png') ;
imshow(I,cmap)
  1 commentaire
Memo Remo
Memo Remo le 15 Juil 2021
Thanks for your help. Much appreciated.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type 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