Error -Reference to non-existent field

14 vues (au cours des 30 derniers jours)
kash
kash le 3 Mai 2012
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 commentaire
Jan
Jan le 3 Mai 2012
You forgot to ask a question.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Mai 2012
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.

Plus de réponses (1)

Jan
Jan le 3 Mai 2012
Does the reply of IMFINFO provide a field "MinSampleValue" for other pictures? See http://www.mathworks.com/help/techdoc/ref/imfinfo.html
  1 commentaire
kash
kash le 3 Mai 2012
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

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by