![]() |
灰度图像问题
当我尝试使用显示灰度图像时:
Img = imread('tr2.png'); subplot(111); imshow(Img); 它不会显示为原始图像。问题出在哪里 ? [B]回答:[/B] 尝试与图像一起读取颜色图: [Img, map] = imread('tr2.png'); imshow(Img,map); 编辑: 我相信您已经索引了图像,并且必须在进行任何处理之前将其转换为RGB。使用[URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ind2rgb.html"]ind2rgb[/URL]或[URL="http://www.mathworks.com/access/helpdesk/help/toolbox/images/ind2gray.html"]ind2gray[/URL]函数。 例如,参见有关索引图像的[URL="http://blogs.mathworks.com/steve/2006/02/03/all-about-pixel-colors-part-2/"]Steve博客[/URL] 。 [url=https://stackoverflow.com/questions/2884832]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 01:11。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.