Error -Reference to non-existent field
14 次查看(过去 30 天)
显示 更早的评论
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
采纳的回答
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.
0 个评论
更多回答(1 个)
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!