Similarity-Based Object Detector Filter

Detects objects in an image based on differences between neighboring pixels.

Category

category_object_detection Object Detection

Node

similaritybasedobjectdetector_node

Parameters

Distance Method: how to calculate distances between neighboring pixels (see below)

Threshold: the similarity threshold to use when comparing neighboring pixels

Minimum Object Area: the minimum number of pixels that must belong to an object. If the object is smaller it will be ignored.

Maximum Object Area: the maximum number of pixels that may belong to an object. If the object is larger it will be ignored

Minimum Object Height: the minimum number of pixels an object must extend in the y direction; if it is smaller it will be ignored

Maximum Object Height: the maximum number of pixels an object may extend in the y direction; if it is larger it will be ignored

Minimum Object Width: the minimum number of pixels an object must extend in the x direction; if it is smaller it will be ignored

Maximum Object Width: the maximum number of pixels an object may extend in the x direction; if it is larger it will be ignored

Inputs

Input the input pixels

Outputs

Objects: the detected objects

Effect of the Filter

The input of this filter must be an image with multiple channels. The filter will compare each pixel to its neighbors according to the distance method specified in the parameters. If the pixels are sufficiently similar (according to the specified Threshold parameter) they will be considered part of the same object. Otherwise they will be considered part of a different object or part of the background.

The Distance Method may be Cosine or Euclidean. See the documentation of the Distance Classifier Filter for further details on how the distance calculations work. (In contrast to the classifier this filter does not use training data, but uses the same algorithms for comparing neighboring pixels.)

Warning

This filter has a decent chance of assuming that the background is part of a large object consisting only of the background itself.

In contrast to the Mask-Based Object Detector Filter this filter will find objects that are fully encompassed by other objects.

The output of this filter will always be a table with the following columns:

Internal Name

Human-Readable Name

Explanation

CenterOfGravity.X

Center (x)

The center of gravity of the object in pixels, but as a set of floating point numbers.

CenterOfGravity.Y

Center (y)

Area

Area

The area of the object in pixels.

BoundingBox.X

Left (x)

The rectangular bounding box of the object with coordinates in pixels.

BoundingBox.Y

Top (y)

BoundingBox.Width

Width (x)

BoundingBox.Height

Height (y)

Mask

Mask

A mask that is the size of the bounding box of the object, that defines which pixels belong to the object, and which pixels within the bounding box do not belong to the object. Filters that use detected objects may use this mask to look up pixel-based data that belongs to the object.

Sequenced Operations (Line Cameras)

The object detection filter also works with line cameras (or in the case of hyperspectral cameras, Push Brooms). In contrast to processing an entire image at the time, the filter will process each line individually. Once it is clear that an object has completed (i.e. the line after no more pixels belonging to that object have appeared) the filter will output that object during that specific line.