필터 지우기
필터 지우기

can u please tell how to clear it

조회 수: 1 (최근 30일)
poongothai rajan
poongothai rajan 2014년 4월 23일
댓글: Image Analyst 2014년 4월 23일
% 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, []);

채택된 답변

Image Analyst
Image Analyst 2014년 4월 23일
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
poongothai rajan
poongothai rajan 2014년 4월 23일
편집: Image Analyst 2014년 4월 23일
thank you so much...when i run i load my .mat i got the fields like
GalleryDataSetC: [2784x50 double]
TestingTargetDataSetC: [2784x134 double]
TrainingTargetDataSetC: [2784x292 double]
CountOfGalleryTargetSamples: [1x50 double]
CountOfTestingTargetSamples: [1x50 double]
CountOfTrainingTargetSamples: [1x69 double]
but i want images ..can u please clarify once
actually sir..i have a database with .mat file...but i could not implement my code with full database because its very large my lap get hang...i just want to reduce the images...for this only am asking how to view the images
Image Analyst
Image Analyst 2014년 4월 23일
Which one of those fields is an image? Can you do this:
theImage = storedStructure.TestingTargetDataSetC;
imshow(theImage);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by