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 Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by