Fix `to_remove`. (#143)

master
scturtle 2016-11-24 22:16:35 +08:00 committed by Holger Rapp
parent 4c9c77034b
commit 17a3393694
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ void OutlierRemovingPointsProcessor::ProcessInPhaseThree(
std::vector<int> to_remove;
for (size_t i = 0; i < batch->points.size(); ++i) {
const auto voxel = voxels_.value(voxels_.GetCellIndex(batch->points[i]));
to_remove.push_back(!(voxel.rays < kMissPerHitLimit * voxel.hits));
if (!(voxel.rays < kMissPerHitLimit * voxel.hits)) {
to_remove.push_back(i);
}
}
RemovePoints(to_remove, batch.get());
next_->Process(std::move(batch));