1
我想加载图像并在MATLAB中显示它。它曾经在我的另一台电脑上工作,但在这台电脑上,图片看起来完全错误,我不知道为什么。MatLAB加载图像并正确显示
感谢您提前提供的所有帮助。
这是我加载图像: https://dl.dropboxusercontent.com/u/13524574/(1).png
这是MATLAB是如何显示的: https://dl.dropboxusercontent.com/u/13524574/WrongImage.png
这里是我的代码:
function main()
workingDir = 'E:\MASTERS\MatLAB\FullVideo_R_OF_HOF\Images';
S4A = zeros(360,640,3,256);
%getting 256 frames of the images
for ii = 1:256
S4A(:,:,:,ii) = imread(fullfile(workingDir,'S4A',strcat('(',int2str(ii),').png')));
end
%showing first frame only
imshow(S4A(:,:,:,1));
end
谢谢,这工作得很好。 – Conrad
太棒了!这也是一种稍微更健壮的方式来存储和访问数据。文档是[here](http://www.mathworks.com/help/matlab/cell-arrays.html)。另外,我看到你是新的,欢迎!如果这是您要查找的内容,您可以点击问题旁边的检查来接受我的回答。谢谢! –