#include <feature_descriptor.h>
◆ FeatureDescriptor() [1/2]
◆ FeatureDescriptor() [2/2]
| apollo::perception::radar4d::FeatureDescriptor::FeatureDescriptor |
( |
| ) |
|
|
inline |
◆ ~FeatureDescriptor()
| apollo::perception::radar4d::FeatureDescriptor::~FeatureDescriptor |
( |
| ) |
|
|
default |
◆ ComputeHistogram()
| void apollo::perception::radar4d::FeatureDescriptor::ComputeHistogram |
( |
int |
bin_size, |
|
|
float * |
feature |
|
) |
| |
|
inline |
在文件 feature_descriptor.h 第 36 行定义.
36 {
37 GetMinMaxCenter();
38 int xstep = bin_size;
39 int ystep = bin_size;
40 int zstep = bin_size;
41 int stat_len = xstep + ystep + zstep;
42 std::vector<int> stat_feat(stat_len, 0);
43 float xsize =
44 (max_pt_.
x - min_pt_.
x) /
static_cast<float>(xstep) + 0.000001f;
45 float ysize =
46 (max_pt_.
y - min_pt_.
y) /
static_cast<float>(ystep) + 0.000001f;
47 float zsize =
48 (max_pt_.
z - min_pt_.
z) /
static_cast<float>(zstep) + 0.000001f;
49
50 int pt_num = static_cast<int>(cloud_->size());
51 for (int i = 0; i < pt_num; ++i) {
53 ++stat_feat[
static_cast<int>((pt.x - min_pt_.
x) / xsize)];
54 ++stat_feat[xstep +
static_cast<int>((pt.y - min_pt_.
y) / ysize)];
55 ++stat_feat[xstep + ystep +
static_cast<int>((pt.z - min_pt_.
z) / zsize)];
56 }
57
58 feature[0] = center_pt_.
x / 10.0f;
59 feature[1] = center_pt_.
y / 10.0f;
60 feature[2] = center_pt_.
z;
61 feature[3] = xsize;
62 feature[4] = ysize;
63 feature[5] = zsize;
64 feature[6] = static_cast<float>(pt_num);
65 for (size_t i = 0; i < stat_feat.size(); ++i) {
66 feature[i + 7] =
67 static_cast<float>(stat_feat[i]) / static_cast<float>(pt_num);
68 }
69 }
RadarPoint< float > RadarPointF
◆ SetCloud()
该类的文档由以下文件生成: