OutputJPEG
Module used for writing an image (or sequences of images) to file(s). The files are saved in JPEG format. For a gray scale image, connect only the INTENSITY input. For a color image, connect all of RED, GREEN and BLUE input (but not INTENSITY). It is assumed that the values lies in the range 0..1. This can be adjusted with the scale factor which is multiplied with each intensity value.
Example XML definition
A simple example
<module class = "OutputJPEG" name = "OutputJPEG" filename = "image%02d.jpg" />
Parameters
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "OutputJPEG". | string | |
name | The name of this instance of the module. | string | |
filename | File to write the output to. If a sequence will be produced %d must be included in the name. It will be replaced with the sequence number of the file. Standard C formats can be used, e. g. %02d will insert the number with two figures and an initial '0'. | string | |
scale | Factor to multiply each element of the input matrix with | float | 1.0 |
suppress | Number of initial files to supress. Used to stop the write of the first images in a sequence before any output is available. | int | 0 |
offset | Value to add to the file index | int | none |
quality | Quality of the compression | int | 100 |
Module Connections
Inputs
Name | Description |
---|---|
INTENSITY | The gray level image data to be written to the file |
RED | The red channel image data to be written to the file |
GREEN | The green channel image data to be written to the file |
BLUE | The blue channel image data to be written to the file |
WRITE | Signal to write or suppress a given image. If connected, an image will only actually be written if the value of the WRITE input is greter than 0. The file counter will still increase. |
Bugs
If %d is not in the filename each new file will overwrite the previous. On Unix systems this is actually useful.
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
OutputJPEG.h
OutputJPEG.cc
OutputJPEG.ikc