A library by Andre Sier for the Processing and openFrameworks programming environments.
Last update, 20130310.

Fast multi-blob detector and simple skeleton tracker using flood-fill algorithms.

flob is a simple alternative to opencv, for simple blob tracking and skeleton finding

flob is a lib developped in processing 2009
had it's infancy as a max/jitter external called 'a-jit.human', 2006

See also ofxFlob, for openframeworks


Download Flob version 0025b (25) in .zip format.
version in development for processing 1.5.1 & beyond.

looking for older flob for older processing/java? flob001s.
Download Flob for openFrameworks here


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

Keywords. flob, flood-fill, blobs, computer vision, skeleton

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 flob is available at GitHub, and its repository can be browsed here.


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


Platform linux,osx,windows
Processing 1.5.1, 2.0b7
openFrameworks 007x
Dependencies processing.core.PImage, ofImage


Fast multi-blob detector and simple skeleton tracker using flood-fill algorithms. http://s373.net/code/flob

Flob is a continuous frame differencing algorithm using flood fill procedures to calculate blobs.

Basic process is comparing incoming image to a background image. There are two main operating modes @om (flob.setOm()):


incoming image is compared to background. background is unchanged.


incoming image is compared to background. background is set to previous frame.


incoming image is compared to background. previous frame eased onto background pixels.

Flob receives an ARGB Processing PImage as input and converts rgb->luma (luminance, greyscale image) using one of several methods specified through @colormode.

The greyscale luminance image is then binarized (flob.binarize(Image)) using the @videothresh or @videothreshf value as reference.

First the image is mirrored if specified through @mirrorX @mirrorY then the image is converted from argb->luma using @colormode possible @colormode values: @RED @GREEN @BLUE @LUMA601 @LUMA609 @LUMAUSER

In openFrameworks, it's a similar procedure, you pass an image pixels array, and call the binarize method.

To calculate the binary image, now Flob takes @thresholdmode to specify the operation to calculate the binary image. possible values include: - @ABS : absolute diference of incoming pixel versus background - @LESSER : if incoming pixel less than threshold, mark as white pixel in binary image - @GREATER : white if above @videothresh value.

You can also clamp the internal image (@clampGray) to focus on @nearGray and @farGray interval values. Usefull for kinect like clamping.

Once you have the binary image essential for blob tracking, you can call the methods @flob.calc(PImage binImage), which returns a usable list of @ABlob's, or @flob.track(PImage binImage), @flob.tracksimple, @flob.calcsimple, which return a usable list of @TBlob's.