41 int stat_len = xstep + ystep + zstep;
42 std::vector<int> stat_feat(stat_len, 0);
44 (max_pt_.
x - min_pt_.
x) /
static_cast<float>(xstep) + 0.000001f;
46 (max_pt_.
y - min_pt_.
y) /
static_cast<float>(ystep) + 0.000001f;
48 (max_pt_.
z - min_pt_.
z) /
static_cast<float>(zstep) + 0.000001f;
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)];
58 feature[0] = center_pt_.
x / 10.0f;
59 feature[1] = center_pt_.
y / 10.0f;
60 feature[2] = center_pt_.
z;
64 feature[6] =
static_cast<float>(pt_num);
65 for (
size_t i = 0; i < stat_feat.size(); ++i) {
67 static_cast<float>(stat_feat[i]) /
static_cast<float>(pt_num);