can u please tell how to clear it
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
poongothai rajan
am 23 Apr. 2014
Kommentiert: Image Analyst
am 23 Apr. 2014
% Load entire mat file contents into a structure. % The structure has a member "I" that is a double 512x512 array. storedStructure = load('te.mat');
Reference to non-existent field 's'.
Error in Untitled3 (line 7) imageArray = storedStructure.s.I; % Or storedStructure.I depending on what members your structure has.
% Extract out the image from the structure into its own variable. % Don't use I as the variable name - bad for several reasons. imageArray = storedStructure.s.I; % Or storedStructure.I depending on what members your structure has.
% Display the image in a brand new figure window. figure(1); % Display double image, scaled appropriately. % No need to cast to uint8 - could even be bad % if your double numbers don't span the 0-255 range nicely. imshow(imageArray, []);
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 23 Apr. 2014
Just have storedStructure be on its own line after you call load. See what fields it reports to the command window. Then I think you'll see what member to extract. Maybe there is no "s" field and it's called something else, like "I" or "imageArray".
2 Kommentare
Image Analyst
am 23 Apr. 2014
Which one of those fields is an image? Can you do this:
theImage = storedStructure.TestingTargetDataSetC;
imshow(theImage);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!