imread() wrong gray values

27 ビュー (過去 30 日間)
Kaijun
Kaijun 2020 年 3 月 26 日
回答済み: Walter Roberson 2020 年 3 月 27 日
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 件のコメント
Image Analyst
Image Analyst 2020 年 3 月 27 日
Unfortunately you forgot to attach your image with the paper clip icon. I'll check back tomorrow.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2020 年 3 月 27 日
The image file is not RGB, it is an colormapped image.
[img,cmap] = imread('image.png');
RGB = ind2rgb(img,cmap);
imshow(RGB)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by