Skip to content

Commit 159575d

Browse files
committed
Include zone models and refactored patch into an object.
1 parent 88e3967 commit 159575d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

include/patchwork/patchwork.hpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <pcl/common/centroid.h>
1212
#include <pcl/io/pcd_io.h>
1313

14+
#include "zone_models.hpp"
1415
#include <tbb/parallel_for.h>
1516
#include <tbb/blocked_range.h>
1617

@@ -97,6 +98,27 @@ struct PCAFeature {
9798
float planarity_;
9899
};
99100

101+
template<typename PointT>
102+
struct Patch {
103+
bool is_close_to_origin_ = false; // If so, we can set threshold more conservatively
104+
int ring_idx_ = NOT_ASSIGNED;
105+
int sector_idx_ = NOT_ASSIGNED;
106+
107+
int status_ = NOT_ASSIGNED;
108+
109+
PCAFeature feature_;
110+
111+
pcl::PointCloud<PointT> cloud_;
112+
pcl::PointCloud<PointT> ground_;
113+
pcl::PointCloud<PointT> non_ground_;
114+
115+
void clear() {
116+
if (!cloud_.empty()) cloud_.clear();
117+
if (!ground_.empty()) ground_.clear();
118+
if (!non_ground_.empty()) non_ground_.clear();
119+
}
120+
};
121+
100122
template<typename PointT>
101123
class PatchWork {
102124

0 commit comments

Comments
 (0)