| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Image Processing Toolbox |
| Contents | Index |
| Learn more about Image Processing Toolbox |
I2 = im2single(I)
RGB2 = im2single(RGB)
I = im2single(BW)
X2 = im2single(X,'indexed')
I2 = im2single(I) converts the intensity image I to single, rescaling the data if necessary. If the input image is of class single, the output image is identical to it.
RGB2 = im2single(RGB) converts the truecolor image RGB to single, rescaling the data if necessary.
I = im2single(BW) converts the binary image BW to a single-precision intensity image.
X2 = im2single(X,'indexed') converts the indexed image X to single precision, offsetting the data if necessary.
Intensity and truecolor images can be uint8, uint16, int16, single, double, or logical. Indexed images can be uint8, uint16, double or logical. Binary input images must be logical. The output image is single.
I = reshape(uint8(linspace(1,255,25)),[5 5]) I2 = im2single(I)
im2double, im2int16, im2uint8, im2uint16, single
![]() | im2java2d | im2uint16 | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |