« View All Resources

Matlab and C++ Source Code for Background Subtraction, camera calibration, dense matching, etc. (by Engin Tola@EPFL)

Computer Vision Central - Posted on December 9, 2011 at 11:06 am.

  • Links: http://cvlab.epfl.ch/~tola/open_source.html
  • Details:
  • here, you can find some small pet programs that may be useful to you. 

    there was some discussion about having non-profit clauses with gpl'd code a while back ago. so i decided to abandon gpl. the new non-profit license is given here. the licence in short is: you can use any code here in your research so long as you cite me. if you'd like to earn money though, you cannot use them without my permission.

    if you would like to have a commercial licence, contact me for details. also, if you use any code from this page in your research, please refer to this page. the bibtex entry for reference should be something like this:

    author = "E. Tola",
    title = "Code Name - http://cvlab.epfl.ch/~tola/open_source.html",
    year = "2010"

    here's some configuration files for the programs i'm using:


    -----i would appreciate any bug information greatly-----


    source code

    a closed-form solution for the uniform sampling of the epipolar line via non-uniform depth sampling (matlab)[top]

    Wednesday, July 28, 2010 16:17:46 +0200

    given two camera calibrations, this report presents a closed form algorithm that computes a sequence of 3D points such that they all project to a single location on one camera and that their projection forms a uniformly sampled line on the other camera.

    you can download the code from here

    for the technical report: go here.

    daisy: a fast local descriptor for dense matching (opencv, c++)[top]
    daisy thumb

    in this work, we present a new descriptor which we call DAISY and a matching algorithm to estimate depth maps from 2 wide baseline images. we show that computing a descriptor at every point of an image is feasible and can be accomplished very efficiently. additionally, using descriptors in stereo matching improves the state-of-the art results and enables us to work on images taken from very different view-points.

    you can download the daisy code from here.

    image r/w: jpg, png, ppm, pgm, bmp (linux, c++)[top]
    bmp thumb

    various image read/write functions with simple prototypes like:

    int load_jpg(string fn, uchar* &body, int &h, int &w, int &ch);


    jpg //Monday, May 12, 2008 14:30:51 +0200 uses libjpeg

    png //Monday, May 12, 2008 14:30:51 +0200 uses linpng

    pnm //Monday, May 12, 2008 14:30:51 +0200

    bmp //Monday, May 12, 2008 14:30:51 +0200

    manual camera calibration v1.0 (opencv + c++)[top]
    camera calibration thumb

    this is an implementation of the zhang's camera calibration algorithm [1]. it depends on opencv.


    source code (windows) v1.0 //Jul 08, 2008 00:15 +0200

    source code (linux) v1.0 //Jul 08, 2008 00:15 +0200


    [1] zhang, z., a flexible new technique for camera calibration. ieee trans on pami 2000

    connected component labeling (c++)[top]
    ccl thumb

    a very simple c++ class that gets unsigned char* binary images and computes ccl objects. it is fast( it passes the image only two times.) and it has the option to merge close components or delete the objects that are smaller than a certain area threshold.


    source code v1.0 //Jul 08, 2008 00:15 +0200


    multiband blending (matlab)[top]
    blend thumb

    in the tgz file you can find the matlab codes for the implementation of burt and adelson's multi-resolution blending algorithm and some test images. do not forget to give a reference to [1] apart from this website if you use this code in your research.


    source code v1.0 //Jul 08, 2008 00:15 +0200


    [1] "a multi-resolution spline with application to image mosaics" by p. j. burt, e. h. adelson. acm transactions on graphics, 1983

    kernel density estimation based background subtraction (c++)[top]
    kde bg thumb

    kernel density estimation based background subtraction algorithm [1] with a command line interface. this algorithm is a somewhat improved version of [2].

    the kmovingobjdetector class within the project is originally written by birant orten who has graciously allowed me to use his code. i just modified it to suit my purposes. so, if you use any material from this program you should refer both [1] and [2] apart from this web-page.

    if you compile with __OPENCV__ flag, you'll be able to open avi files. without this flag, you will be able to open just ppm images. the usage.txt explains the input specifications.

    source code v1.0 //Jul 08, 2008 00:15 +0200


    [1] orten b., soysal m., alatan a.a., "person identification in surveillance video by combining mpeg-7 experts", april 2005 - montreux - switzerland

    [2] elgammal a., harwood d., and davis l., "non-parametric model for background subtraction". in proc. ieee iccv 1999

    k();} ?>