Skip to content
Olaf S. edited this page May 30, 2014 · 5 revisions

Welcome to the RPIMotionDetection wiki!

The applications

[...]

The blob detection library

This library was developed to get a simple, but fast image analysis tool on weak systems. Primarily, it was used as blob detector on a Beagleboard with Kinect sensor (see KinectGrid repository). Now, the interfaces was improved to use the library on a Raspberry Pi + Camera.

The library contains two different algorithms which differs in the topological interpretation of gray scale images.

  1. The 'threshtree algorithm' splits the image with a thresh value and create a tree of blobs by nesting white and black areas.
  2. The 'depthtree algorithm' distinct the (depth) values into N levels and nesting by the level. Thus, two areas will be identified as same area if they are connected by other areas with levels >= N.

Example with nested areas:

Input Image Gray scale representation of source image

1st variant: The node for the inner white cycle is a parent of the inner black area. Coloring of threshtree variant

2nd variant: The node for the inner white cycle is a direct child of the background node. Coloring of depthtree variant

=========== The depthtree algorithm is more complex, but provides many information with a single run. The tree structure of the result can be used to find all blobs, which fulfill some conditions and return a pixel mask for this blobs. Filtering is just cheap post processing and it's not necessary to rerun the whole algorithm.

More complex example image:

Gray scale representation of the source image Gray scale representation of source image

Display of all areas ids: All ids

Display of area mask for filtered nodes: Filtered ids