Module used to find clusters in an image. Clusters are made up of pixels of value 1. The maximum number of clusters to be found as well as the minimu area of the cluster that is filled with 1's can be set. In addition, the module can track clusters between frames to give consistent numbering of the clusters. The output is a table of target coordinates.

Example XML definition

A simple example

      class = "SpatialClustering"
      name = "SpatialClustering"
      cluster_radius = "0.1"
      no_of_clusters = "6"


classThe class name for the module; must be "SpatialClustering".string
nameThe name of this instance of the module.string
no_of_clustersThe maximum number of clusters to find in the scene. No of rows in the output matrixint1.0
cluster_radiusThe radius of a cluster (in relation to the width input image).float0.1
min_cluster_areaThe minimium filled region of a cluster (in relation to the area of the input image).float0.2
tracking_distanceThe maximum movement of a cluster between frames in relaion to image width.float0.25
sortingShould the clusters be sorted according to size? This will select the largets clusters regardless of position.boolfalse

Module Connections


INPUTThe input image with white for target elements


OUTPUTThe positions of the found objects, (x, y) for each object.
CONFIDENCEThe fraction of the circle area around the center of each cluster filled with pixels.


Christian Balkenius
Lund University Cognitive Science



blog comments powered by Disqus