SpatialClustering
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
<module class = "SpatialClustering" name = "SpatialClustering" cluster_radius = "0.1" no_of_clusters = "6" />
Parameters
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "SpatialClustering". | string | |
name | The name of this instance of the module. | string | |
no_of_clusters | The maximum number of clusters to find in the scene. No of rows in the output matrix | int | 1.0 |
cluster_radius | The radius of a cluster (in relation to the width input image). | float | 0.1 |
min_cluster_area | The minimium filled region of a cluster (in relation to the area of the input image). | float | 0.2 |
tracking_distance | The maximum movement of a cluster between frames in relaion to image width. | float | 0.25 |
sorting | Should the clusters be sorted according to size? This will select the largets clusters regardless of position. | bool | false |
Module Connections
Inputs
Name | Description |
---|---|
INPUT | The input image with white for target elements |
Outputs
Name | Description |
---|---|
OUTPUT | The positions of the found objects, (x, y) for each object. |
CONFIDENCE | The fraction of the circle area around the center of each cluster filled with pixels. |
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
SpatialClustering.h
SpatialClustering.cc
SpatialClustering.ikc