Error -Reference to non-existent field

조회 수: 14 (최근 30일)
kash
kash 2012년 5월 3일
I have a code taken from internet
filename=Lenna.bmp
info=imfinfo(filename);
mingrayvalue=info.MinSampleValue;
maxgrayvalue=info.MaxSampleValue;
graynum=maxgrayvalue-mingrayvalue+1;
I get error
Reference to non-existent field 'MinSampleValue'.
Please provide assistance
  댓글 수: 1
Jan
Jan 2012년 5월 3일
You forgot to ask a question.

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

채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 3일
imfinfo() only has 9 fields that are certain to be returned by every file format. MinSampleValue is not one of them. It appears that that field is returned for TIFF files but not for (e.g.) JPG files.

추가 답변 (1개)

Jan
Jan 2012년 5월 3일
Does the reply of IMFINFO provide a field "MinSampleValue" for other pictures? See http://www.mathworks.com/help/techdoc/ref/imfinfo.html
  댓글 수: 1
kash
kash 2012년 5월 3일
No jan iminfo doesnot provide those fileds which i had mentioned..
since i have got those codings from internet,thst why i have posted that question

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by