Documentation Center

  • 評価版
  • 製品アップデート

Image Data Type Conversion

Convert and scale input image to specified output data type

Library

Conversions

visionconversions

Description

The Image Data Type Conversion block changes the data type of the input to the user-specified data type and scales the values to the new data type's dynamic range. To convert between data types without scaling, use the Simulink® Data Type Conversion block.

When converting between floating-point data types, the block casts the input into the output data type and clips values outside the range to 0 or 1. When converting to the Boolean data type, the block maps 0 values to 0 and all other values to one. When converting to or between all other data types, the block casts the input into the output data type and scales the 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 and 1. For fixed-point data types, the dynamic range is between the minimum and maximum values that can be represented by the data type.

    Note:   This block supports intensity and color images on its ports.

PortInput/OutputSupported Data TypesComplex Values Supported

Input

M-by-N matrix of intensity values or an M-by-N-by-P color video signal where P is the number of color planes

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (word length less than or equal to 16)

  • Boolean

  • 8-, 16-bit signed integer

  • 8-, 16-bit unsigned integer

No

Output

M-by-N matrix of intensity values or an M-by-N-by-P color video signal where P is the number of color planes

Same as Input port

No

The dimensions, complexity, and frame status of the input and output signals are the same.

Use the Output data type parameter to specify the data type of your output signal values.

Dialog Box

The Image Data Type Conversion dialog box appears as shown in the following figure.

Output data type

Use this parameter to specify the data type of your output signal.

Signed

Select this check box if you want the output fixed-point data to be signed. This parameter is visible if, for the Output data type parameter, you choose Fixed-point.

Word length

Use this parameter to specify the word length of your fixed-point output. This parameter is visible if, for the Output data type parameter, you choose Fixed-point.

Fraction length

Use this parameter to specify the fraction length of your fixed-point output. This parameter is visible if, for the Output data type parameter, you choose Fixed-point.

See Also

Autothreshold

Computer Vision System Toolbox™ software

Was this topic helpful?