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

NameDescriptionTypeDefault
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

Inputs

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

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

blog comments powered by Disqus