InputJPEG

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

  <module
      class = "InputJPEG"
      name = "IN"
      filename = "image.jpg"
  />

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

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

Parameters

NameDescriptionTypeDefault
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

Outputs

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

Limitations

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

Acknowledgements

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

Author

Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science

Files

InputJPEG.h
InputJPEG.cc
InputJPEG.ikc

blog comments powered by Disqus