Image Data Type Conversion
Convert and scale input image to specified output data type
Libraries:
Computer Vision Toolbox /
Conversions
Description
The Image Data Type Conversion block converts the data type of the input image to the specified data type and scales the pixel values to the dynamic range of the output data. To convert between data types without scaling, use the Data Type Conversion (Simulink) block.
The behavior of the block changes depending on the input and output data types of the image.
When converting between floating-point data types, the block casts the input values into the output data type and clips values below or above the range of the output data type to
0
or1
, respectively.When converting to the
Boolean
data type, the block maps0
values to0
(false
) and all other values to1
(true
).Between all other data types, the block casts and scales the input data type values into the dynamic range of the output data type. For double- and single-precision floating-point data types, the dynamic range is between
0
and1
. For fixed-point data types, the dynamic range is between the minimum and maximum pixel values of that data type.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Extended Capabilities
Version History
Introduced before R2006a