Pandore - A library of image processing operators

How to program new applications?


This tutorial presents the steps followed to build a new application. An application is a sequence of Pandore operators.
The example provided in this tutorial is an image segmentation by binary thresholding. The threshold value is the one that maximizes the variance between the two classes of pixels: background and objects (Otsu algorithm):
There is three ways to create a Pandore application:

  1. as a commands script (Shell or batch);
  2. as a C++ program;
  3. with a visual programming interface Ariane.

All the files below are available in the 'example' folder of the Pandore folder.

1. Example with UNIX / Linux / Mac OS X / CYGWIN

a. Programming an application as a Shell script

  1. Get the following file: example1.sh

  2. Set the execution right to the file example1.sh: chmod u+x example1.sh

  3. Get the following sample image: tangram.pan

  4. Launch the command: ./example1.sh tangram.pan sortie.pan

  5. Check the result: pvisu sortie.pan

b. Programming an application as a C++ file

  1. Get the following file: example2.cpp

  2. Get the file Makefile.unix : Makefile.unix (or Makefile.sun for Solaris)

  3. Compile the program: make -f Makefile.unix example2

  4. Get the sample image: tangram.pan

  5. Launch the program: ./example2 tangram.pan sortie.pan

  6. Check the result: pvisu sortie.pan

c. Programming an application as a C++ file with interactive display of the intermediate results

  1. Get the following file: viewer_example.cpp

  2. Get the file Makefile.unix : Makefile.unix (or Makefile.sun for Solaris)

  3. Compile the program: make -f Makefile.unix viewer_example

  4. Launch the the command: ./viewer_example

2. Example with Windows

a. Programming an application as a batch file

  1. Get the following file: example1.bat

  2. Get the sample image: tangram.pan

  3. Launch the command: example1 tangram.pan sortie.pan

  4. Check the result: pvisu sortie.pan

b. Programming sous la forme d'un programme C++

  1. Get the file: example2.cpp

  2. Get the file Makefile.msdos : Makefile.msdos

  3. Rename Makefile.msdos to Makefile: ren Makefile.msdos Makefile

  4. Compile the program: nmake example2.exe

  5. Get the sample image: tangram.pan

  6. Launch the command: example2 tangram.pan sortie.pan

  7. Check the result: pvisu sortie.pan

c. Programming an application as a C++ file with interactive display of the intermediate results

  1. Get the following file : viewer_example.cpp

  2. Get the file Makefile.msdos : Makefile.msdos

  3. Rename Makefile.msdos to Makefile: ren Makefile.msdos Makefile

  4. Compile the program with: nmake viewer_example.exe

  5. Launch the program: viewer_example

d. Create a Visual C++ project

  1. Copy the folder Pandore/examples/visual in the target folder

  2. Set the tools::options menu, select the tab Directories
  3. Build the project

The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 27 June 2014