i am trying to open a picture but every time i tried it send and error "??? No appropriate method or public field mat for class image."
>> imagesc(image.mat) ??? No appropriate method or public field mat for class image.
>>

 採用された回答

Image Analyst
Image Analyst 2012 年 3 月 18 日

1 投票

You need to first load your mat file with the load() function
if exist('image.mat', 'file')
% Load image from mat file.
storedStructure = load('image.mat');
% Get the image.
yourImage = storedStructure.yourImage;
% yourImage is whatever you called your image when you saved your mat file.
% Display it.
imagesc(yourImage);
% Get rid of the goofy default colormap
colormap(gray(256));
else
msgbox('File does not exist.');
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by