imshow

Displays an image file in a figure.

Syntax

h = imshow(input)

h = imshow(input, property, value, ...)

h = imshow(parent, ...)

h = imshow(input)

Inputs

input
Path of the file that is displayed in a figure or matrix.
Type: string | mat
property, value
'position'
Position and size of h. Value is specified as a vector of the form: [left top width height].
If 'units' has a value of 'normalized', values must be between 0 to 1.
Type: vector
'units'
Specifies units of measurement. Valid values are 'pixels'(default) and 'normalized'.
Value 'pixel' indicates that h has a fixed size and position specified by 'position'.
Value 'normalized' indicates that h will be resized if parent is resized.
Type: string
parent
Handle of a container object, which could be a figure or uipanel.
Type: double | integer

Outputs

h
Handle of the image shown.
Type: double | integer

Examples

Display an image from a file:
close all;
h = imshow('img1.PNG');