Image Processing Toolbox User's Guide |
Convert image to 16-bit signed integers
Syntax
Description
im2int16
takes an image as input and returns an image of class int16
. If the input image is of class int16
, the output image is identical to it. If the input image is not of class int16
, im2int16
returns the equivalent image of class int16
, rescaling or offsetting the data as necessary.
I2 = im2int16(I)
converts the intensity image I
to int16
, rescaling the data if necessary.
RGB2 = im2int16(RGB)
converts the truecolor image RGB
to int16
, rescaling the data if necessary.
I = im2int16(BW)
converts the binary image BW
to an int16
intensity image, changing false-valued elements to -32768 and true-valued elements to 32767.
Class Support
Intensity and truecolor images can be uint8
, uint16
, int16
, single
, double
, or logical
. Binary input images must be logical
. The output image is int16
.
Example
See Also
im2double
, im2single
, im2uint8
, im2uint16
, int16
im2double | im2java |
© 1994-2005 The MathWorks, Inc.