Table of Contents
PGR Image Convert
Converts the given image to a format that can be displayed with the Video Display or Display Image block.
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/Point Grey Research')Description
The PGR Image Convert block converts a source image to a format that can be displayed in Matlab using
the Video Display or Display Image blocks. Source images are
given as a matrix of uint8
values whose dimensions determine the image width and height. Color
images (RGB8 and BGR8) and grayscale images are supported.
It is recommended that the PGR Image Convert block be run with a sample time of 0.1 seconds or slower. Depending on the size of the image, the block may not be able to convert the image if the sample time is too fast. Therefore, sample times of 0.1s or slower are recommended.
Input Ports
A matrix of type uint8
that represents a source image to be converted. The source image should be given
in row major order. If the source image is color (RGB8 or BGR8), the source matrix should have three dimensions
(eg., 3x640x480 for a color image of width 640 pixels and height 480 pixels). If the source image is a grayscale
image, the source matrix should have two dimensions (eg., 640x480 for a grayscale image of width 640 pixels and height 480 pixels).
Output Ports
A matrix of type uint8
that represents the converted image. The converted image is given in column major
order in a format that can be displayed in Matlab using the Display Image block.
Parameters and Dialog Box
Source image format
The format of the source image. The options for source image formats are: RGB8, BGR8, and Greyscale. RGB8 images use three unsigned bytes (integer values 0 to 255) to store the red (R), green (G), and blue (B) color information of each pixel in the specific order RGB. BGR8 images also use three unsigned bytes to store the R, G, and B color information of each pixel, but in the order BGR. Greyscale images use one byte to store the luminosity value of each pixel (0 representing black and 255 representing white).
Convert to
The type of output image that will be produced from the source image. Valid options for this parameter are: Greyscale and Matlab RGB. Color source images may be converted to either grayscale or Matlab RGB images, where as grayscale source images can only be converted to grayscale images. Greyscale images using row major format must still be converted before they can be displayed using the Display Image block.
Sample time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time. A sample time of -1 indicates that the block inherits its sample time.
This block is computationally intensive and may require slower sampling rates than the rest of the model to avoid delaying the model execution. Alternatively, the block could be placed in an asynchronous subsystem (see the Asynchronous Thread block).
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 |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.