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.
>>

 Réponse acceptée

Image Analyst
Image Analyst le 18 Mar 2012

1 vote

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

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by