Table of Contents
Image Convert
Converts from one image format to another.
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 Convert block converts from one image format to another. For example, it can convert from interleaved RGB888 (3XWxH) format to planar, MATLAB RGB (HxWx3) format.
The Image Convert block supports both MATLAB RGB (HxWx3) and MATLAB grayscale (HxW) outputs. A variety of different output data types are supported that 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;It also supports some other output image formats that are not compatible with the Computer Vision System Toolbox but may be useful for interfacing to custom S-functions or other systems.
The currently supported input formats are tabulated below:
Input Format |
Description |
---|---|
MATLAB grayscale (HxW) |
A grayscale HxW column-major image i.e., the first column of pixels is stored first, followed by the next column of pixels, etc. All the image data types used by the Computer Vision Toolbox are supported: uint8, uint16, uint32, single and double. |
MATLAB RGB (HxWx3) |
A color HxWx3 column-major image containing planar RGB values i.e., the red plane is stored first, the green next and the blue last. Each plane is stored with the first column of pixels first, followed by the next column of pixels, etc. All the image data types used by the Computer Vision Toolbox are supported: uint8, uint16, uint32, single and double. |
RGB888 (3xWxH) |
A color 3xWxH row-major image containing packed RGB values i.e., the first element in memory is the red pixel value, followed by the green pixel value, followed by the blue pixel value. The first row of pixels is stored first, followed by the next row, etc. Only the uint8 data type is currently supported for this input. |
BGR888 (3xWxH) |
A color 3xWxH row-major image containing packed BGR values i.e., the first element in memory is the blue pixel value, followed by the green pixel value, followed by the red pixel value. The first row of pixels is stored first, followed by the next row, etc. Only the uint8 data type is currently supported for this input. This image format matches the standard CV_8UC3 format used by OpenCV. |
Y (luminescence only, WxH) |
A grayscale WxH row-major image containing the luminescence values. The first row of pixels is stored first, followed by the next row, etc. Both uint8 and uint16 data types are supported for this input. The uint16 data type is typical of depth images. |
A subset of the input image formats are supported as output image formats. Not all conversions are possible and not all combinations of input and output data types are supported. The block will report if a particular combination is not supported.
Input Ports
image
This input is an image whose number of dimensions and supported data types depend on the Input format parameter.
u
This input is the U chroma component whose number of dimensions and supported data types depend on the Input format parameter. This input is only present for certain input formats.
v
This input is the V chroma component whose number of dimensions and supported data types depend on the Input format parameter. This input is only present for certain input formats.
Output Ports
image
The output data type and dimensions depend on the Output format selected. The output may be an RGB or grayscale 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 is 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
Input format
The format of the input image.
Padding
The number of bytes of padding at the end of each row in the input image. The width in bytes of the image plus the padding is equal to the stride. The padding is set to zero by default. This parameter is disabled for the MATLAB image formats because their padding is always zero.
Output format
The format of the output image.
Output data type
The data type of the output image.
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 |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
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.