| Image Processing Toolbox™ | ![]() |
I2 = im2uint16(I)
RGB2 = im2uint16(RGB)
I = im2uint16(BW)
X2 = im2uint16(X,'indexed')
I2 = im2uint16(I) converts the intensity image I to uint16, rescaling the data if necessary. If the input image is of class uint16, the output image is identical to it.
RGB2 = im2uint16(RGB) converts the truecolor image RGB to uint16, rescaling the data if necessary.
I = im2uint16(BW) converts the binary image BW to a uint16 intensity image, changing 1-valued elements to 65535.
X2 = im2uint16(X,'indexed') converts the indexed image X to uint16, offsetting the data if necessary. If X is of class double, max(X(:)) must be 65536 or less.
Intensity and truecolor images can be uint8, uint16, double, logical, single, or int16. Indexed images can be uint8, uint16, double, or logical. Binary input images must be logical. The output image is uint16.
I = reshape(linspace(0,1,20),[5 4]) I2 = im2uint16(I)
im2uint8, double, im2double, uint8, uint16, imapprox
![]() | im2single | im2uint8 | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |