NmsSortByArea

Function Usage

Filters repeated objects based on the area size.

Prototype

void NmsSortByArea(std::vector<DetectBox>& detBoxes, const float iouThresh, const IOUMethod method = UNION);
void NmsSortByArea(std::vector<ObjectInfo>& detBoxes, const float iouThresh, const IOUMethod method = UNION);

Parameter Description

Parameter

Input/Output

Description

detBoxes

Input/Output

DetectBox (central point)/ObjectInfo (corner point) to be filtered. The filtered object information is output.

iouThresh

Input

Filtering threshold.

method

Input

IOU is calculated as follows:

  • MAX: The overlapped area is divided by the larger one of the two areas.
  • MIN: The overlapped area is divided by the smaller one of the two areas.
  • UNION: The overlapped area is divided by the union of the two areas.
  • DIOU: The value equals the value of UNION minus the IoU of the distances.