Skip to content

Commit

Permalink
[sfm] statistics: remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencastan committed Mar 24, 2024
1 parent bc8a1c4 commit ae6604a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/aliceVision/sfm/sfmStatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,10 @@ void computeResidualsPerView(const sfmData::SfMData& sfmData,
continue;
const std::vector<double>& residuals = it->second;
BoxStats<double> residualStats(residuals.begin(), residuals.end());
utils::Histogram<double> residual_histogram =
utils::Histogram<double>(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<double> residual_histogram(residualStats.min, maxSize, 100);
// residual_histogram.Add(residuals.begin(), residuals.end());

nbResidualsPerViewMin[viewIdx] = residualStats.min;
nbResidualsPerViewMax[viewIdx] = residualStats.max;
Expand Down Expand Up @@ -420,9 +421,11 @@ void computeObservationsLengthsPerView(const sfmData::SfMData& sfmData,
const IndexT viewId = viewKeys[viewIdx];
const std::vector<int>& nbObservations = observationLengthsPerView[viewId];
BoxStats<double> observationsLengthsStats(nbObservations.begin(), nbObservations.end());
utils::Histogram<double> 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<double> observationsLengthsHistogram(
// observationsLengthsStats.min, maxSize, maxSize - observationsLengthsStats.min);
// observationsLengthsHistogram.Add(nbObservations.begin(), nbObservations.end());

nbObservationsLengthsPerViewMin[viewIdx] = observationsLengthsStats.min;
nbObservationsLengthsPerViewMax[viewIdx] = observationsLengthsStats.max;
Expand Down

0 comments on commit ae6604a

Please sign in to comment.