Module used for reading an image (or sequences of images) from a JPEG file or a sequence of JPEG files. The files can be either gray-scale or RGB.

Example XML definition

Read a single file once

      class = "InputJPEG"
      name = "IN"
      filename = "image.jpg"

Read a sequence of three files ten times (e. g. image00.jpg, image01.jpg, image02.jpg)

      class = "InputJPEG"
      name = "IN"
      filename = "image%02d.jpg"
      filecount = "3"
      iterations = "10"


classThe class name for the module; must be "InputJPEG".string
nameThe name of this instance of the module.string
filenameFile to read the image from. If a sequence will be produced %d must be included in the name. It will be replaced with the sequence number of each file. Standard C formats can be used, e. g. %02d will insert the number with two figures and an initial '0'.string
filecountNumber of files to readint1
iterationsNumber of times to read the image(s)intinf
read_onceMakes the module only read each JPEG image once.boolyes

Module Connections


INTENSITYThe intensity of the image.
REDThe red channel of the image (or intensity for a gray image)
GREENThe green channel of the image (or intensity for a gray image)
BLUEThe blue channel of the image (or intensity for a gray image)


The module calculates the intensity as the average of the R, G, and B channels incorrectly.


This software is based in part on the work of the Independent JPEG Group.


Christian Balkenius
Lund University Cognitive Science



blog comments powered by Disqus