From 660a72b93886a5e4e20de87570c4a5e094b728fe Mon Sep 17 00:00:00 2001 From: Philippe Babin Date: Tue, 9 Oct 2018 14:12:35 -0400 Subject: [PATCH] Fix typo --- pointmatcher/OutlierFiltersImpl.cpp | 14 +++++++------- pointmatcher/OutlierFiltersImpl.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pointmatcher/OutlierFiltersImpl.cpp b/pointmatcher/OutlierFiltersImpl.cpp index 41be8b65..a8e362f3 100644 --- a/pointmatcher/OutlierFiltersImpl.cpp +++ b/pointmatcher/OutlierFiltersImpl.cpp @@ -460,7 +460,7 @@ typename PointMatcher::OutlierWeights OutlierFiltersImpl::RobustOutlierFil template typename PointMatcher::Matrix -OutlierFiltersImpl::RobustOutlierFilter::computePointToPlanDistance( +OutlierFiltersImpl::RobustOutlierFilter::computePointToPlaneDistance( const DataPoints& reading, const DataPoints& reference, const Matches& input) { @@ -536,14 +536,14 @@ typename PointMatcher::OutlierWeights OutlierFiltersImpl::RobustOutlierFil } iteration++; - Matrix dists = distanceType == "point2point" ? input.dists : computePointToPlanDistance(filteredReading, filteredReference, input); + Matrix dists = distanceType == "point2point" ? input.dists : computePointToPlaneDistance(filteredReading, filteredReference, input); // e² = scaled squared distance Array e2 = dists.array() / (scale * scale); T k = tuning; const T k2 = k * k; - Array w, aboveThres, bellowThres; + Array w, aboveThres, belowThres; switch (robustFctId) { case RobustFctId::Cauchy: // 1/(1 + e²/k²) w = (1 + e2 / k2).inverse(); @@ -551,16 +551,16 @@ typename PointMatcher::OutlierWeights OutlierFiltersImpl::RobustOutlierFil case RobustFctId::Welsch: // exp(-e²/k²) w = (-e2 / k2).exp(); break; - case RobustFctId::SwitchableConstraint: // if e² > k² then 4 * k²/(k + e²)² + case RobustFctId::SwitchableConstraint: // if e² > k then 4 * k²/(k + e²)² aboveThres = 4.0 * k2 * ((k + e2).square()).inverse(); w = (e2 >= k).select(aboveThres, 1.0); break; case RobustFctId::GM: // k²/(k + e²)² w = k2*((k + e2).square()).inverse(); break; - case RobustFctId::Tukey: // if e² < k then (1-e²/k²)² - bellowThres = (1 - e2 / k2).square(); - w = (e2 >= k2).select(0.0, bellowThres); + case RobustFctId::Tukey: // if e² < k² then (1-e²/k²)² + belowThres = (1 - e2 / k2).square(); + w = (e2 >= k2).select(0.0, belowThres); break; case RobustFctId::Huber: // if |e| >= k then k/|e| = k/sqrt(e²) aboveThres = k * (e2.sqrt().inverse()); diff --git a/pointmatcher/OutlierFiltersImpl.h b/pointmatcher/OutlierFiltersImpl.h index 21f44ee4..1d8906be 100644 --- a/pointmatcher/OutlierFiltersImpl.h +++ b/pointmatcher/OutlierFiltersImpl.h @@ -243,7 +243,7 @@ struct OutlierFiltersImpl ; } - Matrix computePointToPlanDistance(const DataPoints& filteredReading, const DataPoints& filteredReference, const Matches& input); + Matrix computePointToPlaneDistance(const DataPoints& filteredReading, const DataPoints& filteredReference, const Matches& input); virtual OutlierWeights compute(const DataPoints& filteredReading, const DataPoints& filteredReference, const Matches& input); RobustOutlierFilter(const std::string& className, const ParametersDoc paramsDoc, const Parameters& params); RobustOutlierFilter(const Parameters& params = Parameters());