M-File Help: idisp View code for idisp

idisp

image display tool

idisp(im, options) displays an image and allows interactive investigation of pixel values, linear profiles, histograms and zooming. The image is displayed in a figure with a toolbar across the top. If im is a cell array of images, they are first concatenated (horizontally).

User interface

Options

'nogui' don't display the GUI
'noaxes' don't display axes on the image
'noframe' don't display axes or frame on the image
'plain' don't display axes, frame or GUI
'axis', A display the image in the axes given by handle A, the 'nogui' option is enforced.
'here' display the image in the current axes
'title', T put the text T in the title bar of the window
'clickfunc', F invoke the function handle F(x,y) on a down-click in the window
'ncolors', N number of colors in the color map (default 256)
'bar' add a color bar to the image
'print', F write the image to file F in EPS format
'square' display aspect ratio so that pixels are squate
'wide' make figure full screen width, useful for displaying stereo pair
'flatten' display image planes (colors or sequence) as horizontally adjacent images
'ynormal' y-axis increases upward, image is inverted
'histeq' apply histogram equalization
'cscale', C C is a 2-vector that specifies the grey value range that spans the colormap.
'xydata', XY XY is a cell array whose elements are vectors that span the x- and y-axes respectively.
'colormap', C set the colormap to C (Nx3)
'grey' color map: greyscale unsigned, zero is black, maximum value is white
'invert' color map: greyscale unsigned, zero is white, maximum value is black
'signed' color map: greyscale signed, positive is blue, negative is red, zero is black
'invsigned' color map: greyscale signed, positive is blue, negative is red, zero is white
'random' color map: random values, highlights fine structure
'dark' color map: greyscale unsigned, darker than 'grey', good for superimposed graphics
'new' create a new figure

Notes

Examples

Display 2 images side by side

idisp({im1, im2})

Display image in a subplot

subplot(211)
idisp(im, 'axis', gca);

Call a user function when you click a pixel

idisp(im, 'clickfunc', @(x,y) fprintf('hello %d %d\n', x,y))

Set a colormap, in this case a MATLAB builtin one

idisp(im, 'colormap', cool);

Display an image which contains a map of a region, perhaps an obstacle grid, that spans real world dimensions x, y in the range -10 to 10.

idisp(map, 'xyscale', {[-10 10], [-10 10]});

See also

image, caxis, colormap, iconcat


 

© 1990-2012 Peter Corke.