Image Processing Toolbox User's Guide Previous page   Next Page
imattributes

Return information about image attributes

Syntax

Description

attrs = imattributes returns information about an image in the current figure. If the current figure does not contain an image, 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.

Attribute Name
Value
Width (columns)
Number of columns in the image
Height (rows)
Number of rows in the image
Class
Data type used by the image, such as uint8.

Note: For single or int16 images, imageinfo returns a class value of double, because image objects convert CData of these classes to double.
Image type
One of the image types identified by the Image Processing Toolbox: 'intensity', 'truecolor', 'binary', or 'indexed'.
Minimum intensity
For intensity images, this value represents the lowest intensity value of any pixel.
For indexed images, this value represents the lowest index value into a color map.
Not included for 'binary' or 'truecolor' images.
Maximum intensity
For intensity images, this value represents the highest intensity value of any pixel.
For indexed images, this value represents the highest index value into a color map.
Not included for 'binary' or 'truecolor' images.

attrs = imattributes(imgmodel) returns information about the image represented by the image model object, imgmodel.

Example

Retrieve the attributes of an intensity image.

Creates an image model object for a truecolor image and then get the attributes from the image model object.

See Also

imagemodel


Previous page  imapprox imbothat Next page

© 1994-2005 The MathWorks, Inc.