Image Processing Toolbox User's Guide Previous page   Next Page
axes2pix

Interactive image contrast and brightness adjustment tool

Syntax

Description

pixelx = axes2pix(DIM, XDATA, AXESX) converts an axes coordinate into a pixel coordinate. For example if pt = get(gca,'CurrentPoint') then AXESX could be pt(1,1) or pt(1,2). AXESX must be in pixel coordinates. XDATA is a two-element vector returned by get(image_handle, 'XData') or get(image_handle,'YData'). DIM is the number of image columns for the x coordinate, or the number of image rows for the y coordinate.

Class Support

DIM, XDATA, and AXESX can be double. The output is double.

Note

axes2pix performs minimal checking on the validity of AXESX, DIM, or XDATA. For example, axes2pix returns a negative coordinate if AXESX is less than XDATA(1). The function calling axes2pix bears responsibility for error checking.

Examples

Example with default XData and YData.

Example with non-default XData and YData.

See Also

impixelinfo, bwselect, imfill, impixel, improfile, pixval, roipoly


Previous page  applylut bestblk Next page

© 1994-2005 The MathWorks, Inc.