SMAG = im2double(b) %
IM2DOUBLE Convert image to double precision.
IM2DOUBLE takes an image as input, and returns an image of class double. If
the input image is of class double, the output image is identical to it. If
the input image is not double, IM2DOUBLE returns the equivalent image of
class double, rescaling or offsetting the data as necessary.
I2 = IM2DOUBLE(I1) converts the intensity image I1 to double
precision, rescaling the data if necessary.
RGB2 = IM2DOUBLE(RGB1) converts the truecolor image RGB1 to
double precision, rescaling the data if necessary.
I = IM2DOUBLE(BW) converts the binary image BW to a double-
precision intensity image.
X2 = IM2DOUBLE(X1,'indexed') converts the indexed image X1 to
double precision, offsetting the data if necessary.
Class Support
-------------
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.
Example
-------
I1 = reshape(uint8(linspace(1,255,25)),[5 5])
I2 = im2double(I1)
See also DOUBLE.
Documentation for im2double
doc im2double
Other functions named im2double
codistributed/im2double gpuArray/im2double tall/im2double