imagen precessing

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

 Accepted Answer

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

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!