Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Image » Image Conversions » ConvertPixelType

ConvertPixelType


Module: FoundationLite

Changes the type of pixel components.

Name Type Range Description
Input value inImage Image Input image
Input value inRoi Region* Range of pixels to be processed
Input value inNewType PlainType Type of the output image
Input value inDepthDelta Integer -30 - 30 Pixel values will be multiplied by 2^inDepthDelta. For example, use -4 to convert 12-bit to 8-bit images.
Output value outImage Image Output image

Description

The operation alters the pixel component format of the inImage. Available formats are listed in the documentation of the Image data type.

If the value of pixel component doesn't fit in the range of the new type, it is clipped to the nearest proper value, which can lead to the significant loss of information, as demonstrated in the example.

Examples

Description of usage of this filter can be found in examples and tutorial: Fourier Analysis.

ConvertPixelType run on example image of UInt8 type with inNewType being Int8. Note that bright pixels suffered from clipping, while dark ones remained unaltered.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

This operation is optimized for SSE2 technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).

This operation is optimized for AVX2 technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).

This operation is optimized for NEON technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in ConvertPixelType.

Complexity Level

This filter is available on Advanced Complexity Level.