imcontour - Create contour plot of image data

Syntax

imcontour(I)
imcontour(I,n)
imcontour(I,v)
imcontour(x,y,...)
imcontour(...,LineSpec)
[C,handle] = imcontour(...)

Description

imcontour(I) draws a contour plot of the grayscale image I, automatically setting up the axes so their orientation and aspect ratio match the image.

imcontour(I,n) draws a contour plot of the grayscale image I, automatically setting up the axes so their orientation and aspect ratio match the image. n is the number of equally spaced contour levels in the plot; if you omit the argument, the number of levels and the values of the levels are chosen automatically.

imcontour(I,v) draws a contour plot of I with contour lines at the data values specified in vector v. The number of contour levels is equal to length(v).

imcontour(x,y,...) uses the vectors x and y to specify the x- and y-axis limits.

imcontour(...,LineSpec) draws the contours using the line type and color specified by LineSpec. Marker symbols are ignored.

[C,handle] = imcontour(...) returns the contour matrix C and a handle to an hggroup object.

Class Support

The input image can be of class uint8, uint16, int16, single, double, or logical.

Examples

I = imread('circuit.tif');
imcontour(I,3)

See Also

clabel, contour, LineSpec in the MATLAB Function Reference

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS