imageinfo

Image Information tool

Use the imageinfo function to create an Image Information tool. The tool displays information about the basic attributes and metadata of the target image in a separate figure.

Syntax

imageinfo
imageinfo(h)
imageinfo(filename)
imageinfo(info)
imageinfo(himage,filename)
imageinfo(himage,info)
htool = imageinfo(___)

Description

imageinfo creates an Image Information tool associated with the image in the current figure. The tool displays information about the basic attributes of the target image in a separate figure.

imageinfo(h) creates an Image Information tool associated with h, where h is a handle to a figure, axes, or image object.

example

imageinfo(filename) creates an Image Information tool containing image metadata from the graphics file filename. The image does not have to be displayed in a figure window.

imageinfo(info) creates an Image Information tool containing the image metadata in the structure info.

imageinfo(himage,filename) creates an Image Information tool containing information about the basic attributes of the image specified by the handle himage and the image metadata from the graphics file filename.

imageinfo(himage,info) creates an Image Information tool containing information about the basic attributes of the image specified by the handle himage and the image metadata in the structure info.

htool = imageinfo(___) returns a handle to the Image Information tool figure.

Examples

collapse all

imageinfo('peppers.png')

h = imshow('bag.png');
info = imfinfo('bag.png');
imageinfo(h,info);

imshow('canoe.tif');
imageinfo;

Input Arguments

collapse all

Handle to a figure, axes, uipanel, or image graphics object, specified as a handle. If h is an axes or figure handle, imageinfo uses the first image returned by findobj(h,'Type','image').

File name, specified as a character vector. filename can be any file type that has been registered with an information function in the file formats registry, imformats, so its information can be read by imfinfo. filename can also be a DICOM, NITF, Interfile, or Analyze file.

Image metadata, specified as a structure returned by the functions imfinfo, dicominfo, nitfinfo, interfileinfo, or analyze75info. info can also be a user-created structure.

Handle to an image graphics object, specified as a handle.

Output Arguments

collapse all

Handle to Image Information tool figure, returned as a handle.

Tips

  • The table lists the basic image attribute information included in the Image Information tool display. Note that the tool contains either four or six fields, depending on the type of image.

    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 the image object converts the CData of these images to double.

    Image type

    One of the image types identified by the Image Processing Toolbox™ software: 'intensity' 'truecolor', 'binary', or 'indexed'.

    Minimum intensity or index

    For grayscale 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.

    This field is not included for 'binary' or 'truecolor' images.

    Maximum intensity or index

    For grayscale 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.

    This field is not included for 'binary' or 'truecolor' images.

  • imageinfo gets information about image attributes by querying the image object's CData. The image object converts the CData for single or int16 images to class double. In these cases, imageinfo(H) displays a'Class' attribute of 'double', even though the image is of class single or int16. For example,

    h = imshow(ones(10,'int16'));
    class(get(h,'CData'))

Introduced before R2006a