Problem with reading colorful images with png format

조회 수: 2 (최근 30일)
Memo Remo
Memo Remo 2021년 7월 15일
댓글: Memo Remo 2021년 7월 15일
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.

채택된 답변

KSSV
KSSV 2021년 7월 15일
편집: KSSV 2021년 7월 15일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by