How to build FastHOG

FastHOG is a Histogram of Oriented Gradients (HOG) library that uses CUDA to compute on the GPU. The original source code can be obtained here. However, this code cannot be compiled with recent CUDA SDKs. I’ve made the changes needed to compile it and shared the code here.

To build and install this FastHOG in a few steps:

  • Install 5.5 or a more recent version of CUDA. Instructions can be found here.

  • Install Xinerama and FreeImage libraries:

$ sudo apt install libxinerama-dev libfreeimage-dev
  • Build and install the 2.0 branch of FLTK. This is an abandoned branch of the library and instructions to build it can be found here. Note that FastHOG will not compile with the current 1.x branch of FLTK.

  • Clone the fixed source code of FastHOG, build it and test whether it works:

$ git clone
$ cd fasthog/source/fastHOG
$ make
$ bin/release/fastHOG

The test program displays an image of pedestrians. Click anywhere on it and the detected people will be drawn in red boxes.

Tried with: CUDA 5.5 and Ubuntu 12.04

How to build and install FLTK 2.0

FLTK 2.0 is an experimental new version of the library that was later abandoned. Some other libraries seem to use it, so sometimes you may need to build and install it. Doing that is easy:

  • Download the source code from the SVN repository:
$ svn co fltk-2.0

If it asks for username or password, just press Enter.

  • Configure and build the code:
$ cd fltk-2.0
$ autoconf
$ ./configure
$ make
  • You might get this error:
=== making test ===
Compiling mandelbrot_ui.cxx...
In file included from mandelbrot_ui.cxx:3:0:
mandelbrot_ui.h:15:5: error: β€˜Drawing_Area’ does not name a type

Open Makefile and remove test from this line:

DIRS = src $(LOCALIMAGES) images OpenGL fluid glut test
  • Build again, it should succeed. Install the files:
$ make
$ sudo make install

Tried with: Ubuntu 12.04 LTS