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

      class = "OutputJPEG"
      name = "OutputJPEG"
      filename = "image%02d.jpg"


classThe class name for the module; must be "OutputJPEG".string
nameThe name of this instance of the module.string
filenameFile 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
scaleFactor to multiply each element of the input matrix withfloat1.0
suppressNumber of initial files to supress. Used to stop the write of the first images in a sequence before any output is available.int0
offsetValue to add to the file indexintnone
qualityQuality of the compressionint100

Module Connections


INTENSITYThe gray level image data to be written to the file
REDThe red channel image data to be written to the file
GREENThe green channel image data to be written to the file
BLUEThe blue channel image data to be written to the file
WRITESignal 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.


If %d is not in the filename each new file will overwrite the previous. On Unix systems this is actually useful.


Christian Balkenius
Lund University Cognitive Science



blog comments powered by Disqus