imattributes
Gets information about an image from its handle using functions defined in the omlimgtoolbox.
Syntax
R = imattributes(handle)
Inputs
- handle
- Handle of an image from the image, imshow, or figure commands. If there is no input, the current image on the gcf will be used.
Outputs
- R
- The resulting structure with information about the image in handle.
R contains the following fields:
- Class
- 'double' if the handle is shown as a result of image command, 'int' otherwise.
- Height (rows)
- Number of rows in the image data or the height.
- Image type
- 'indexed' if handle is created using the image command, 'truecolor' otherwise.
- Maximum intensity
- Optional value indicating the maximum value in handle, if it is shown as a result of the image command.
- Minimum intensity
- Optional value indicating the minimum value in handle, if it is shown as a result of image command.
- Width
- Number of columns in the image data or the width.
Examples
h = imshow('imattr2.jpg');
R = imattributes(h);
R = struct [
Class: int
Height (rows): 667
Image type: truecolor
Width (columns): 1000
]