Properties of object returned by imageinfo in MATLAB
In MatLab R2010B, how do I reference fields in the object returned by the function call to imageinfo? I'm
Example of the code:
imagePropObj = imageinfo('imageFile.tif');
This pops up a window showing the various properties of the image file. Then I try accessing the Width property using
imagePropObj.Width
开发者_C百科
but I get the error
??? Attempt to reference field of non-structure array.
I'm not sure what I'm doing wrong. Please help. Thanks.
imageinfo
returns the handle to the figure. That is not what you want. I assume that you'd actually want to use IMFINFO, which does return a structure with a field 'Width'.
精彩评论