imread() wrong gray values
2 次查看(过去 30 天)
显示 更早的评论
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
2020-3-27
Unfortunately you forgot to attach your image with the paper clip icon. I'll check back tomorrow.
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!