| Image Processing Toolbox | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Convert image to double precision
I2 = im2double(I)
RGB2 = im2double(RGB)
I = im2double(BW)
X2 = im2double(X,'indexed')
I2 = im2double(I) converts the intensity image I to double precision, rescaling the data if necessary.
If the input image is of class double, the output image is identical.
RGB2 = im2double(RGB) converts the truecolor image RGB to double precision, rescaling the data if necessary.
I = im2double(BW) converts the binary image BW to a double-precision intensity image.
X2 = im2double(X,'indexed') converts the indexed image X to double precision, offsetting the data if necessary.
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 double.
I1 = reshape(uint8(linspace(1,255,25)),[5 5]) I2 = im2double(I1)
double, im2single, im2int16, im2uint8, im2uint16
| im2col | im2int16 | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments