Table of Contents
Image Decompress
Decompresses a compressed image into a raw image.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Image Processing/Generic')Description
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'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Important Notes
Output dimensions
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'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Parameters and Dialog Box
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
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'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
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 |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.