-
Notifications
You must be signed in to change notification settings - Fork 21
/
features.cpp
37 lines (30 loc) · 1.76 KB
/
features.cpp
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
#include "features.hpp"
std::vector<Feature *> getFeatures(const std::vector<Scale *> &scales) {
std::vector<Feature *> feats;
for (size_t i = 0; i < scales.size(); i++) {
// Covariance
feats.push_back(reinterpret_cast<Feature *>(new Omnivariance(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Eigenentropy(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Anisotropy(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Planarity(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Linearity(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new SurfaceVariation(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Scatter(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new Verticality(scales[i])));
// Moments
feats.push_back(reinterpret_cast<Feature *>(new OrderAxis(scales[i], 1, 1)));
feats.push_back(reinterpret_cast<Feature *>(new OrderAxis(scales[i], 1, 2)));
feats.push_back(reinterpret_cast<Feature *>(new OrderAxis(scales[i], 2, 1)));
feats.push_back(reinterpret_cast<Feature *>(new OrderAxis(scales[i], 2, 2)));
// Height
feats.push_back(reinterpret_cast<Feature *>(new VerticalRange(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new HeightBelow(scales[i])));
feats.push_back(reinterpret_cast<Feature *>(new HeightAbove(scales[i])));
// Color (using data from first scale only)
for (size_t c = 0; c < 3; c++) {
feats.push_back(reinterpret_cast<Feature *>(new PointColor(scales[0], c)));
feats.push_back(reinterpret_cast<Feature *>(new NeighborhoodColors(scales[0], c)));
}
}
return feats;
}