Per-Object Counter Filter
The per-object counter filter calculates the amount of classified pixels in the input data of an object that belong to each defined group.
Category |
|
Node |
|
Parameters |
Ratio: whether to just count the classes (None) or to put the number of classes into a ratio with either the total number of pixels in the object (Total area) or the total number of pixels in the object that could be classified (Classified area). If ratios are used the value range is always between 0 and 1. |
Inputs |
Objects: a list of objects as generated from an object detection filter Classification Pixels: the input classification pixels that should be counted |
Outputs |
Class Counts: the per-object counts of the classes in each object |
Effect of the Filter
The filter takes two inputs: an object list (typically directly from an object detection filter), and a image-based pixel input. The pixel input must have the same image structure that the image has the objects were initially detected on and contain classification data, e.g. from a Distance Classifier Filter.
For all defined groups the filter will count how many pixels in each object were classified given a specific class. In the output it will produce a column of each group that contains that count for that group (or the ratio, if that setting is used).
This filter is most useful in conjunction with the Object Reclassification Filter.
Illustration with Artificial Data
Take the following input data for the object detector:
The detector would generate the following list of objects:
If the pixel input for the object is given by the following classification result (group G1 being red, group G2 being blue):
Then the per-object counting filter will return the following counts for the list of objects:
When Ratio is set to Total area, the output would look like:
When Ratio is set to Classified area, the output would look like:
Handling of Training Data
Similar to the Per-object Averaging Filter this filter will produce a hidden data set where this operation is applied to the individual pixels of each group during training. This is done primarily for consistency; using a group-based classifier after this filter is likely not very useful.
Sequenced Operations (Line Cameras)
The object processing filter also works with line cameras (or in the case of hyperspectral cameras, Push Brooms). The processing framework will automatically keep enough of the input pixel data round in memory that once the line gets processed that causes the object detector to output the object, the pixels that belonged to the object remain accessible to this filter.