主题
:
灰度图像问题
查看单个帖子
2019-12-10, 20:41
#
1
poster
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力:
66
灰度图像问题
当我尝试使用显示灰度图像时:
Img = imread('tr2.png'); subplot(111); imshow(Img); 它不会显示为原始图像。问题出在哪里 ?
回答:
尝试与图像一起读取颜色图:
[Img, map] = imread('tr2.png'); imshow(Img,map); 编辑:
我相信您已经索引了图像,并且必须在进行任何处理之前将其转换为RGB。使用
ind2rgb
或
ind2gray
函数。
例如,参见有关索引图像的
Steve博客
。
更多&回答...
poster
查看公开信息
发送悄悄话给 poster
查找 poster 发表的更多帖子