Authors: Sebastien Marcel (,
Yann Rodriguez (
Contributors: Fabien Cardinaux,
Olivier Masson,
Julien Tiphaigne,
Marc Barnard.
Packages available
vision reads and writes basic image formats (pgm, ppm, gif, tif, jpeg), image processing and feature extraction such as edge detection, rotation, flip, photometric normalisations, PCA, LDA, 2D-DCT, ...
geometry creates, manipulates and draws 2D objects
face face modeling and extraction
video video package for decoding and encoding video files
matrix double matrix package in double precision (required for efficient PCA/LDA)
examples program examples of the above features
Packages under development
  • face detection and verification tools and algorithms
  • stump classifiers for boosting algorithms
  • connected components and morphological operators
  • video acquisition (frame grabber, USB, DV)
Install from tarballs
Install from CVS
  1. You need a clean version of Torch3

  2. Install Torch3vision packages as follows
    cd Torch
    setenv CVS_RSH ssh
    cvs -d checkout vision geometry video examples_vision

  3. Makefiles
    1. make
      copy the file Makefile_vision_Linux in your Torch directory and add the following line into your Makefile_options_Linux:
      include $(TORCHDIR)/Makefile_vision_$(OS)

    2. xmake
      modify the file Linux.cfg.

      !! Warning !! the video package is unusable for the moment when using xmake. We are not enable to link the external ffmpeg library when building program examples. Any help is welcome !

  4. External libraries for the video package
    You can use the default libraries specified in Makefile_vision_Linux (then continue to section 5) or install them yourself in your favorite directories. In that case, you will have to edit and change Makefile_vision_Linux by yourself.

    1. avilib
      tar -zxvf avilib.tar.gz
      cd avilib

    2. ffmpeg
      tar -zxvf ffmpeg.tar.gz
      cd ffmpeg
      ./configure --disable-zlib

      !! Warning !! YOU SHOULD USE --disable-zlib to avoid any problems when linking program examples.

      # edit config.mak to change compiling options defaults are in debug mode
      # OPTFLAGS=-O2 -g -Wall
      # SHCFLAGS=-O2 -g -Wall
      # but if you are compiling Torch in OPT mode you should change the line by
      # OPTFLAGS=-O2 -Wall -ffast-math -mcpu=i686 -march=i686 -malign-double
      # SHCFLAGS=-O2 -Wall -ffast-math -mcpu=i686 -march=i686 -malign-double


  5. Compile Torch
    make clean ; make depend ; make

  6. Building examples
    cd examples_vision/image

    # compiling the program
    make ppm2pgm

    # compiling all the programs

  7. Updates

    go directly in directories vision, geometry, video or examples_vision and do:
    cvs update -d -P