下载
中文
注册

NmsSortByArea

函数功能

根据面积大小过滤重复目标。

函数原型

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);

参数说明

参数名

输入/输出

说明

detBoxes

输入/输出

待过滤DetectBox(中心点) / ObjectInfo(边角点)。输出过滤后的目标信息。

iouThresh

输入

过滤阀值。

method

输入

IOU计算方式:

  • MAX 重叠区域除以两者中面积大的。
  • MIN 重叠区域除以两者中面积小的。
  • UNION 重叠区域除以两者面积并集。
  • DIOU 重叠区域除以两者面积并集减去距离的交并比。