A library by Giovanni Tarducci and Alessio Barducci for the programming environment Processing. Last update, 06/12/2009.

Histograms are a popular tool used in a wide range of image and video analysis applications, mainly due to easy of use and implementation, and to some degree of invariance to photometric and geometric transformations. A color histogram is a representation of the distribution of colors in an image, derived by counting the number of pixels of each set of color ranges in a given color space. Similarly, an intensity histogram models the distribution of the brightness values of an image.

The integral histogram method allows to obtain (in a computationally efficient way) the color or intensity histogram of all possible target regions in a Cartesian data space (i.e., an image). The method was initially proposed in [1], as a generic method to match image patches efficiently. It has been successively adopted to more specific problems, such as visual tracking [2].

This project provides an implementation of the method in the form of a library for the Processing programming environment. The library can be used without limitations from any Java program as well.

[1] Porikli, F., "Integral Histogram: A Fast Way to Extract Histograms in Cartesian Spaces", proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2005.
[2] Amit Adam, Ehud Rivlin, Ilan Shimshoni, "Robust Fragments-based Tracking using the Integral Histogram," proceeding of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2006.

Keywords computer vision,image analysis,Integral Histogram,Search,Fast,Histogram

Reference. Have a look at the javadoc reference here. a copy of the reference is included in the .zip as well.

Source. The source code of integralhistogram is available at bitBucket, and its repository can be browsed here.


Platform Windows XP, Mac OSX 10.5, Linux
Processing 1.0.5
Dependencies no dependences


Download integralhistogram version 0.1 in .zip format.


Unzip and put the extracted integralhistogram folder into the libraries folder of your processing sketches. Reference and examples are included in the integralhistogram folder.


Find a list of examples in the current .zip distribution of integralhistogram, or have a look at them by following the links below.

below you can see in evidence the lines of code you will need to use the whole library:


find a list of online demo applets below:

Flickr Applet

Game Applet

Images and Video

Integral Histogram from Giovanni Tarducci on Vimeo.

IntegralHistogram@pacMan from Giovanni Tarducci on Vimeo.

download Video Sample

Follow the links below to see some screenshots of the Libary's test applications

Image Sample
Image Sample
Image Sample
Game Applet screenshot
Video test screenshot


by Giovanni Tarducci, Alessio Barducci, 2009.