Table of Contents
Vision Write JPEG File
This block is currently a beta version. If you are using this block, we would appreciate any feedback at tech@quanser.com. |
Saves files in JPEG format.
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_beta/Image Processing/Generic')Description
The Vision Write JPEG File block saves the image data in JPEG format according to the specified parameters. This block automatically generates an increasing index for the input image data obtained at each sample instance and adds the index to the end of the specified filename.
This software is based in part on the work of the Independent JPEG Group. For a full discussion of the legal issues refer to The Independent JPEG Group's JPEG software.
Input Ports
image_data
A matrix of type uint8 that represents a source image to be saved. The source image should be given in row major order. The source image must be color (RGB8 or BGR8) and the source matrix should have three dimensions (eg., 3x640x480 for a color image of width 640 pixels and height 480 pixels). Use PGR Grab Image block as the input of this block.
Output Ports
err
This signal is negative in case of memory allocation error for the output file.
Parameters and Dialog Box
Image height
Specifies height of the saved image in pixels.
Image width
Specifies width of the saved image in pixels.
Color space
Specifies the (24-bit) color space of the image data. The avaiable options are RGB8 and BGR8.
Filename
Name of the output file to be saved. The output file is saved in JPEG file format with an increasing index added at the end of the specified filename. For example, the filename "Test-" indicates that the image sequence is saved in the same folder with filenames Test-0000000001.jpg, Test-0000000002.jpg, and so on.
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.
To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.
The default sample time is set to qc_get_step_size.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
No |
No |
Not supported. |
|
No |
No |
Not supported. |
|
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 supported. |
|
Rapid Simulation (RSIM) Target |
No |
No |
Not supported. |
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.