3D障碍物目标框(中心点坐标XYZ、长宽高lwh、朝向角theta)的非极大值抑制
#include
#include
#include
#include
struct BoundingBox3D
{
double centerX, centerY, centerZ;
double length, width, height;
double theta;
double score;
BoundingBox3D(double x, double y, double z, double l, double w, double h, double t, double s)
: centerX(x), centerY(y), centerZ(z), length(l), width(w), height(h), theta(t), score(s) {
}
};
class NMS3D
{
public:
NMS3D(double iouThreshold) : iouThreshold_(iouThreshold) {
}
std::vector<BoundingBox3D> executeNMS(const std::vector<BoundingBox3D> &boxes)
{
std::vector<BoundingBox3D> resultBoxes;
std::vector<BoundingBox3D> sortedBoxes = sortBoxesByScore(boxes);
while (!sortedBoxes.empty())
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38