Image Convert Image Filter navigation bar

Table of Contents

Image Decompress

Decompresses a compressed image into a raw image.

Library

QUARC Targets/Image Processing/Generic

Description

Image Decompress

The Image Decompress block decompresses a compressed image represented as a variable-size uint8 signal into a raw image.

This block may be used to decompress images after they have been transmitted over a communication channel in compressed form. Images may be compressed using the Image Compress block. Compressing images helps to reduce network bandwidth.

The Image Decompress block supports both RGB (HxWx3) and grayscale (HxW) outputs, including both integer and floating-point data types compatible with The MathWorks' Computer Vision System Toolbox. The block is capable of converting between a compressed RGB image and a grayscale output or vice versa.

Important Notes

Output dimensions

Note If the Image resolution does not match the image dimensions of the compressed input then the Image Decompress block may be able to scale the compressed image to the output resolution. Only simple scaling is supported. In particular, the image resolution of the output must maintain the same aspect ratio as the compressed image and can only be scaled by a factor of N/8, where N=1..16. If the aspect ratio is not maintained, then the QERR_SCALING_LOSES_ASPECT_RATIO error will be issued. If the input image cannot be scaled then the QERR_SCALE_FACTOR_NOT_SUPPORTED error will be issued.

Input Ports

image

The input data type and dimensions depend on the Algorithm selected, but the input is typically a variable-size signal of the uint8 data type. The input contains the compressed image.

Output Ports

image

The output may be an RGB image specified as a three-dimensional MxNx3 matrix where M is the image height and N is the image width. It contains the red, green and blue components for each pixel in the image.

It may also be a grayscale image specified as a two-dimensional MxN matrix. where M is the image height and N is the image width. It contains the luminance for each pixel in the image.

The interpretation of the data depends on the data type. Floating-point types have elements in the range 0 to 1. Both single and double floating-point types are supported. For integer types, only unsigned integer types are supported. The range of unsigned integer types should be the full range for the integer type.

The output is compatible with The MathWorks' Computer Vision System Toolbox.

Parameters and Dialog Box

Image Decompress

Algorithm

The decompression algorithm to use. The algorithm will determine the data type of the input, and possibly the dimensions.

Image resolution

The resolution of the image to output. A typical resolution is 640 x 480. The image resolution should match the dimensions of the image that is compressed at the input. It may also be a rational scale factor of the input resolution where the scale factor takes the form N/8 where N=1..16. The aspect ratio must be the same.

To specify a custom resolution, select the custom option and two new fields will appear allowing the width and height to be entered.

Output format

The format of the output image. The output format may be MATLAB RGB, in which the img output is a three-dimensional MxNx3 matrix, or MATLAB Greyscale, in which the img output is a two-dimensional MxN matrix.

Output data type

The data type to use for the img output. Both integral and floating-point data types are supported. The output data types are compatible with The MathWorks' Computer Vision System Toolbox.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

No

No

Not currently supported.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

 

navigation bar