IHDC: Idiap Human Detection Code


Version 1.0 release notes:

  • fix: removed input image flipping under windows
  • impr: added robust margin to improve the background subtraction performance when color intensity is very low
  • impr: split robust_LBP_constant into two parameters, one for color and one for LBP
  • impr: added options to produce results in ChangeDetection dataset format
  • impr: suppressed unnecessary memory allocation in the GetBackgroundImage method
  • impr: made the max number of pixel modes private and added getter/setter
  • impr: added options for masking and disabling bilateral filtering
  • impr: aded the semantically correct SetFrameDuration (marked SetFrameRate as deprecated)


Getting the zip file (if you don't use git)

You can obtain the latest buildable sources from a zip archive. You just have to get the zip file (latest version: 1.0_src_2013-02-19) and unzip it using any archive manager.

Cloning the repository (if you use git)

The same content as the zip archive can be obtained from a git repository. You can retrieved the code and the documentation by running:

git clone http://www.idiap.ch/~odobez/human-detection-git

Dependencies and compilation

The human detection code requires at least the OpenCV 2.3 library. CMake is also required to build the human detector.

Installing dependencies

If you have OpenCV and CMake installed, then everything should be ok. In other cases, OpenCV and CMake can be installed in different ways depending on your operating system and you environment. You can refer to the OpenCV wiki and the CMake webpage for download and installation instructions.

If you have installed OpenCV manually, please make sure the “OpenCV_DIR” environment variable points to the opencv installation directory (contains subdirectories bin, include, ...) so CMake will be able to find it.

If your are using Ubuntu and CMake fails to find OpenCV, then you can install better OpenCV packages. Please refer to the dedicated page on the OpenCV wiki for details.

Compiling the background subtraction and the human detector

Once OpenCV is properly installed, everything can be compiled using CMake:

A previous spurious bug (appearing only with some compilation options) has been fixed. Please tell us if you still encounter this problem (send us an email) to help us fix it. (see image below for symptoms)
Pb. Ex.
mkdir build
cd build
cmake ../src -DCMAKE_BUILD_TYPE=Release
cd ..
ls build/bin

You should obtain 3 executables: bgsub_detect, bgsub_learn and human_detect.

Using the programs

Once you have installed and compiled everything you can consult the page about how to use the program.