im2double

Convert image to double precision.

📝 Syntax

  • IM = im2double(I)

  • IM = im2double(I,'indexed')

📥 Input argument

  • I - Input image: scalar, vector, matrix or multidimensional array with type single, double, int16, uint8, uint16 or logical.

📤 Output argument

  • IM - The converted image is returned as a numeric array with the same dimensions as the input image I with type double.

📄 Description

IM = im2double(I) converts the input image I to double precision format. The input image IM can be a grayscale, truecolor, or binary image. When converting,im2double rescales the pixel values from their original integer format to a floating-point range of [0, 1].

For an indexed image,IM = im2double(I, 'indexed') converts the image I to double precision as well, but with an added offset of 1 to the pixel values during the conversion from integer types.

💡 Example

🔗 See also

double, imread.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?