Commit b00827fa authored by artificiel's avatar artificiel
Browse files

EuclidianExtractor: skippe l'extraction si cloud->size() < 10

parent 77dcc014
......@@ -61,14 +61,17 @@ class EuclidianExtractor : public ofThread
while (to_extract_.receive(cloud)) {
// if (cloud->size() > 10) {
// TS_START("EuclidianExtraction");
std::vector<pcl::PointIndices> cluster_indices;
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr supercloudFilteredRGBA;
supercloudFilteredRGBA.reset(new pcl::PointCloud<pcl::PointXYZRGBA>);
auto fresh_clouds = make_shared<vector<shared_ptr<SmartCloud>>>();
if (cloud->size() > 10) {
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>);
tree->setInputCloud(cloud);
......@@ -80,9 +83,6 @@ class EuclidianExtractor : public ofThread
ec.setInputCloud(cloud);
ec.extract(cluster_indices);
supercloudFilteredRGBA.reset(new pcl::PointCloud<pcl::PointXYZRGBA>);
auto fresh_clouds = make_shared<vector<shared_ptr<SmartCloud>>>();
for (std::vector<pcl::PointIndices>::const_iterator it = cluster_indices.begin(); it != cluster_indices.end(); ++it) {
// nécessaire de copier, ou simplement passer des indices???
......@@ -101,6 +101,7 @@ class EuclidianExtractor : public ofThread
}
fresh_clouds->back().get()->setup();
}
}
vector<shared_ptr<ClusterMesh>>::iterator clusterMesh;
vector<shared_ptr<SmartCloud>> candidateClouds = newClouds;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment