Image Processing Toolbox User's Guide |
Return information about image attributes
Syntax
Description
returns information about an image in the current figure. If the current figure does not contain an image, attrs
= imattributes
imattributes
returns an empty array.
attrs = imattributes(himage)
returns information about the image specified by himage
, a handle to an image object. imattributes
gets the image attributes by querying the image object's CData.
imattributes
returns image attribute information in attrs
, a 4-by-2 or 6-by-2 cell array, depending on the image type. The first column of the cell array contains the name of the attribute as a text string. The second column contains the value of the attribute, also represented as a text string. The following table lists these attributes in the order they appear in the cell array.
attrs = imattributes(imgmodel)
returns information about the image represented by the image model object, imgmodel
.
Example
Retrieve the attributes of an intensity image.
h = imshow('liftingbody.png'); attrs = imattributes(h) attrs = 'Width (columns)' '512' 'Height (rows)' '512' 'Class' 'uint8' 'Image type' 'intensity' 'Minimum intensity' '0' 'Maximum intensity' '255'
Creates an image model object for a truecolor image and then get the attributes from the image model object.
h = imshow('gantrycrane.png'); im = imagemodel(h); attrs = imattributes(im) attrs = 'Width (columns)' '400' 'Height (rows)' '264' 'Class' 'uint8' 'Image type' 'truecolor'
See Also
imapprox | imbothat |
© 1994-2005 The MathWorks, Inc.