InputPNG

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

Example XML definition

A simple example

  <module
      class = "InputPNG"
      name = "InputPNG"
      filename = "image.png"
  />

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

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

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "InputPNG".string
nameThe name of this instance of the module.string
size_xSize of the input images.int0
size_ySize of the input images.int0
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'.int
filecountNumber of files to readint1
iterationsNumber of times to read the image(s)intinf

Module Connections

Outputs

NameDescription
INTENSITYThe gray level image data read from the file
REDThe red channel image data read from the file
GREENThe green channel image data read from the file
BLUEThe blue channel image data read from the file

Acknowledgements

This module borrows heavily from the InputJPEG module by Christian Balkenius.

Author

Jan Moren
jan.moren@lucs.lu.se
Lund University Cognitive Science

Files

InputPNG.h
InputPNG.cc
InputPNG.ikc

blog comments powered by Disqus