为什么我的图像在MATLAB中没有正确加载? [英] Why doesn't my image load properly in MATLAB?

查看:174
本文介绍了为什么我的图像在MATLAB中没有正确加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的原始图片:

但是当我在MATLAB上加载它并在其上使用imshow()时,我就是这样看的:

But when I load it up on MATLAB and use imshow() on it, this is how I see it:

这是我正在使用的代码:

This is the code I'm using:

I=imread('D:\Matty\pout.gif')
 imshow(I)


推荐答案

GIF是索引格式,每个图像都有自己的色彩映射。因此,您需要将图像与图像一起阅读:

GIF is indexed format, and each image can have its own colormap. So you need to read the colormap together with the image:

[I, Imap] = imread('D:\Matty\pout.gif');
imshow(I,Imap)

我已经在你的图像上测试了它并且它有效很好。我不明白@Lucas在答案中描述的问题是什么。

I've tested it on your image and it works very well. i don't understand what was the problem @Lucas described in his answer.

这篇关于为什么我的图像在MATLAB中没有正确加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆