Prune matches🔗
Removes matches that have overlapping bounding boxes or too low confidences. This tool implements non-maximum suppression for bounding boxes produced by an object detector.
Inputs🔗
frame
: The location and orientation of each bounding box rectangle of a matched object in world coordinates. A 4*N-by-4 matrix.size
: The size of the bounding box in world coordinates. An N-by-2 matrix.index
: The class index of the matching model. An N-by-1 matrix. If this input is not connected, the index output will be all zeros.confidence
: Confidence of the matched object. The higher the value, the better the match. An N-by-1 matrix.confidenceThreshold
: Minimum confidence for a bounding box to be accepted.overlapRatioThreshold
: If the overlap ratio (intersection over union) of two detections with the same class is greater than this value, the two detections will be merged. Set to one to disable merging.mergeMode
: The way overlapping regions are merged.
Outputs🔗
frame
: Coordinate frames for the remaining detection boxes after the overlapping regions have been merged. A 4M-by-4 matrix.size
: The size of the bounding box in world coordinates. An M-by-2 matrix.index
: The class index of each detection. An M-by-1 matrix.confidence
: The confidence of each detection in descending order within each class. An M-by-1 matrix. The confidence of a region is the maximum of all the merged regions.
The output rows are in descending confidence order within each class, but the classes are in arbitrary order.
-
enum
MergeMode
🔗 Strategies for merging overlapping match region boxes.
Values:
-
enumerator
DiscardWeaker
🔗 Only the box with the highest confidence is used.
-
enumerator
Union
🔗 The resulting box has the same angle as the box with the highest confidence and is large enough to fit all the merged boxes.
The highest confidence is returned for the merged box.
-
enumerator
WeightedAverage
🔗 All the corner points of the resulting box are confidence-weighted averages of the corresponding corner points in the merged boxes.
The highest confidence is returned for the merged box.
-
enumerator