Permalink
Browse files

Resolved bug with ModelOutlierRemoval using indices

  • Loading branch information...
1 parent dd532fe commit 9dc9d076207b6680058ee99773240de5e8114a00 Daniel Garcia committed Oct 17, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 filters/include/pcl/filters/impl/model_outlier_removal.hpp
@@ -216,7 +216,9 @@ pcl::ModelOutlierRemoval<PointT>::applyFilterIndices (std::vector<int> &indices)
// check distance of pointcloud to model
std::vector<double> distances;
//TODO: get signed distances !
+ model_->setIndices(indices_); // added to reduce computation and arrange distances with indices
model_->getDistancesToModel (model_coefficients_, distances);
+
bool thresh_result;
// Filter for non-finite entries and the specified field limits
@@ -230,7 +232,7 @@ pcl::ModelOutlierRemoval<PointT>::applyFilterIndices (std::vector<int> &indices)
continue;
}
- // use threshold function to seperate outliers from inliers:
+ // use threshold function to separate outliers from inliers:
thresh_result = threshold_function_ (distances[iii]);
// in normal mode: define outliers as false thresh_result

0 comments on commit 9dc9d07

Please sign in to comment.