Prune matches

Prune matches

Removes matches which have overlapping bounding boxes or too low confidence.

Inputs

frame
The location of the bounding box of a matched object in world coordinates. A 4*N-by-4 matrix.
size
The size of the matched object in world coordinates. An N-by-2 matrix.
index
The class index of the matching model. An N-by-1 matrix.
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
Overlap ratio threshold for pruning overlapping detections (non-maximum suppression). If the overlap ratio (intersection over union) of two detections with the same class is greater than this value, the detection with a lower confidence will be discarded. Set to one to disable non-maximum suppression.

Outputs

frame
Upper left corner of each remaining detection after overlaps have been removed. Given as a coordinate frame that is aligned to the axes of the image coordinate system. 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 in ascending order. An M-by-1 matrix.
confidence
The confidence of each detection in descending order within each class. An M-by-1 matrix.