LIDAR Scan Match End of trail navigation bar

Table of Contents

Vision Write JPEG File

Beta

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

QUARC Targets Beta/Image Processing/Generic

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

Vision Write JPEG File

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

Vision Write JPEG File

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

QUARC Win32 Target

No

No

Not supported.

QUARC Win64 Target

No

No

Not supported.

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 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

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

See Also

 

navigation bar