From ae6604a2283cd1754bc95e8b723439fd3d9a99ae Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Sun, 24 Mar 2024 17:54:46 +0100 Subject: [PATCH] [sfm] statistics: remove unused vars --- src/aliceVision/sfm/sfmStatistics.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/aliceVision/sfm/sfmStatistics.cpp b/src/aliceVision/sfm/sfmStatistics.cpp index 84ccc7d5b4..06edcfbaae 100644 --- a/src/aliceVision/sfm/sfmStatistics.cpp +++ b/src/aliceVision/sfm/sfmStatistics.cpp @@ -365,9 +365,10 @@ void computeResidualsPerView(const sfmData::SfMData& sfmData, continue; const std::vector& residuals = it->second; BoxStats residualStats(residuals.begin(), residuals.end()); - utils::Histogram residual_histogram = - utils::Histogram(residualStats.min, residualStats.max + 1, residualStats.max - residualStats.min + 1); - residual_histogram.Add(residuals.begin(), residuals.end()); + + // const double maxSize = std::min(residualStats.max + 1, 30); // clamp max value in case of nonsense value + // utils::Histogram residual_histogram(residualStats.min, maxSize, 100); + // residual_histogram.Add(residuals.begin(), residuals.end()); nbResidualsPerViewMin[viewIdx] = residualStats.min; nbResidualsPerViewMax[viewIdx] = residualStats.max; @@ -420,9 +421,11 @@ void computeObservationsLengthsPerView(const sfmData::SfMData& sfmData, const IndexT viewId = viewKeys[viewIdx]; const std::vector& nbObservations = observationLengthsPerView[viewId]; BoxStats observationsLengthsStats(nbObservations.begin(), nbObservations.end()); - utils::Histogram observationsLengthsHistogram( - observationsLengthsStats.min, observationsLengthsStats.max + 1, observationsLengthsStats.max - observationsLengthsStats.min + 1); - observationsLengthsHistogram.Add(nbObservations.begin(), nbObservations.end()); + + // const double maxSize = std::min(observationsLengthsStats.max + 1, 500); // clamp max value in case of nonsense value + // utils::Histogram observationsLengthsHistogram( + // observationsLengthsStats.min, maxSize, maxSize - observationsLengthsStats.min); + // observationsLengthsHistogram.Add(nbObservations.begin(), nbObservations.end()); nbObservationsLengthsPerViewMin[viewIdx] = observationsLengthsStats.min; nbObservationsLengthsPerViewMax[viewIdx] = observationsLengthsStats.max;