From bf40dfb31a9a27dd715d4895dae0d764e262d3ec Mon Sep 17 00:00:00 2001 From: Fabien Servant Date: Fri, 17 Jan 2025 16:43:38 +0100 Subject: [PATCH] Comments and typos --- src/aliceVision/mesh/MeshIntersection.hpp | 6 +++--- src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp | 2 +- src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.hpp | 4 ++-- .../sfm/pipeline/expanding/ExpansionPolicyLegacy.cpp | 2 +- src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp | 3 +-- src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp | 1 - src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp | 1 - src/aliceVision/sfm/sfmFilters.hpp | 2 +- src/aliceVision/sfmData/SfMData.hpp | 8 ++++---- src/software/export/main_exportMatches.cpp | 4 ++-- src/software/pipeline/main_sfmExpanding.cpp | 5 ++--- 11 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/aliceVision/mesh/MeshIntersection.hpp b/src/aliceVision/mesh/MeshIntersection.hpp index 9f5c6f97da..c15182d3d6 100644 --- a/src/aliceVision/mesh/MeshIntersection.hpp +++ b/src/aliceVision/mesh/MeshIntersection.hpp @@ -35,7 +35,7 @@ class MeshIntersection * @param output the output measured point * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' - * @return true if the ray intersect the mesh. + * @return true if the ray intersects the mesh. */ bool pickPoint(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); @@ -44,7 +44,7 @@ class MeshIntersection * @param output the output measured normal * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' - * @return true if the ray intersect the mesh. + * @return true if the ray intersects the mesh. */ bool pickNormal(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); @@ -54,7 +54,7 @@ class MeshIntersection * @param normal the output measured normal * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' - * @return true if the ray intersect the mesh. + * @return true if the ray intersects the mesh. */ bool pickPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); diff --git a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp index b3fbfc9d3a..8f892a40b5 100644 --- a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp +++ b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp @@ -250,7 +250,7 @@ void ExpansionChunk::setConstraints(sfmData::SfMData & sfmData, const track::Tra for (const auto & [trackId, vecInfo] : infoPerLandmark) { - if (vecInfo.size() == 0) + if (vecInfo.empty()) { continue; } diff --git a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.hpp b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.hpp index 29acca4129..3737d087bc 100644 --- a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.hpp +++ b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.hpp @@ -20,7 +20,7 @@ class ExpansionChunk { public: using uptr = std::unique_ptr; - + public: /** @@ -35,7 +35,7 @@ class ExpansionChunk const std::set & viewsChunk); /** - * brief setup the bundle handler + * @brief setup the bundle handler * @param bundleHandler a unique ptr. the Ownership will be taken */ void setBundleHandler(SfmBundle::uptr & bundleHandler) diff --git a/src/aliceVision/sfm/pipeline/expanding/ExpansionPolicyLegacy.cpp b/src/aliceVision/sfm/pipeline/expanding/ExpansionPolicyLegacy.cpp index dcbeaa033b..9a9279f9c8 100644 --- a/src/aliceVision/sfm/pipeline/expanding/ExpansionPolicyLegacy.cpp +++ b/src/aliceVision/sfm/pipeline/expanding/ExpansionPolicyLegacy.cpp @@ -204,7 +204,7 @@ void ExpansionPolicyLegacy::rollback(const std::set & viewsSet) { for (const auto & item : viewsSet) { - ALICEVISION_LOG_INFO("rollback view : " << item); + ALICEVISION_LOG_INFO("Rollback view : " << item); _availableViewsIds.insert(item); } } diff --git a/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp b/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp index a1ccacaa70..089cc7f1ce 100644 --- a/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp +++ b/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp @@ -22,7 +22,7 @@ class PointFetcher public: /** * Set the pose of the camera - * @param the pose of the camera wrt some global coordinates frame + * @param pose the pose of the camera wrt some global coordinates frame */ virtual void setPose(const geometry::Pose3 & pose) = 0; @@ -30,7 +30,6 @@ class PointFetcher * @brief virtual method to get coordinates and normals of a pixel of an image * @param point result point in some global coordinates frame * @param normal result normal in some global coordinates frame - * @param pose pose of the camera wrt some global coordinates frame * @param intrinsic the camera intrinsic object * @param imageCoords the input image pixel coordinates in 2D. * @return false on error diff --git a/src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp b/src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp index bd3e724714..d4ef853489 100644 --- a/src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp +++ b/src/aliceVision/sfm/pipeline/expanding/SfmBundle.cpp @@ -1,5 +1,4 @@ // This file is part of the AliceVision project. -// Copyright (c) 2025 AliceVision contributors. // Copyright (c) 2024 AliceVision contributors. // This Source Code Form is subject to the terms of the Mozilla Public License, // v. 2.0. If a copy of the MPL was not distributed with this file, diff --git a/src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp b/src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp index 9ae3b73212..13f902a92a 100644 --- a/src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp +++ b/src/aliceVision/sfm/pipeline/expanding/SfmBundle.hpp @@ -1,5 +1,4 @@ // This file is part of the AliceVision project. -// Copyright (c) 2025 AliceVision contributors. // Copyright (c) 2024 AliceVision contributors. // This Source Code Form is subject to the terms of the Mozilla Public License, // v. 2.0. If a copy of the MPL was not distributed with this file, diff --git a/src/aliceVision/sfm/sfmFilters.hpp b/src/aliceVision/sfm/sfmFilters.hpp index c5924dc4fa..f878734a59 100644 --- a/src/aliceVision/sfm/sfmFilters.hpp +++ b/src/aliceVision/sfm/sfmFilters.hpp @@ -43,7 +43,7 @@ IndexT removeOutliersWithPixelResidualError(sfmData::SfMData& sfmData, IndexT removeOutliersWithAngleError(sfmData::SfMData& sfmData, const double dMinAcceptedAngle); /** - * @Brief remove all point constraints which are too far away from their associated landmark + * @brief remove all point constraints which are too far away from their associated landmark * @param sfmData the sfmData to update * @param maxDist the maximal allowed distance between the landmark and the constraint * @return the number of constraints removed diff --git a/src/aliceVision/sfmData/SfMData.hpp b/src/aliceVision/sfmData/SfMData.hpp index d760723c08..57c49ab9ee 100644 --- a/src/aliceVision/sfmData/SfMData.hpp +++ b/src/aliceVision/sfmData/SfMData.hpp @@ -70,8 +70,8 @@ class SfMData LandmarksUncertainty _landmarksUncertainty; /// 2D Constraints Constraints2D constraints2d; - /// Point constraintss - ConstraintsPoint constraintspoint; + /// Point constraints + ConstraintsPoint constraintsPoint; /// Rotation priors RotationPriors rotationpriors; @@ -144,8 +144,8 @@ class SfMData * @brief Get ConstraintsPoints * @return ConstraintsPoints */ - const ConstraintsPoint& getConstraintsPoint() const { return constraintspoint; } - ConstraintsPoint& getConstraintsPoint() { return constraintspoint; } + const ConstraintsPoint& getConstraintsPoint() const { return constraintsPoint; } + ConstraintsPoint& getConstraintsPoint() { return constraintsPoint; } /** * @brief Get RotationPriors diff --git a/src/software/export/main_exportMatches.cpp b/src/software/export/main_exportMatches.cpp index 6623756d2c..ef3b4fa9f1 100644 --- a/src/software/export/main_exportMatches.cpp +++ b/src/software/export/main_exportMatches.cpp @@ -148,7 +148,7 @@ int aliceVision_main(int argc, char** argv) indexFilterA = sfmData.findView(filterA); if (indexFilterA == UndefinedIndexT) { - ALICEVISION_LOG_ERROR("Could not find corresponding view for : " + filterA); + ALICEVISION_LOG_ERROR("Could not find corresponding view for: " + filterA); return EXIT_FAILURE; } } @@ -158,7 +158,7 @@ int aliceVision_main(int argc, char** argv) indexFilterB = sfmData.findView(filterB); if (indexFilterB == UndefinedIndexT) { - ALICEVISION_LOG_ERROR("Could not find corresponding view for : " + filterB); + ALICEVISION_LOG_ERROR("Could not find corresponding view for: " + filterB); return EXIT_FAILURE; } } diff --git a/src/software/pipeline/main_sfmExpanding.cpp b/src/software/pipeline/main_sfmExpanding.cpp index fa396db968..7f8c65c73e 100644 --- a/src/software/pipeline/main_sfmExpanding.cpp +++ b/src/software/pipeline/main_sfmExpanding.cpp @@ -48,8 +48,8 @@ class MeshPointFetcher : public sfm::PointFetcher } /** - * Set the pose of the camera - * @param the pose of the camera wrt some global coordinates frame + * @brief Set the pose of the camera + * @param pose the pose of the camera wrt some global coordinates frame */ void setPose(const geometry::Pose3 & pose) override { @@ -60,7 +60,6 @@ class MeshPointFetcher : public sfm::PointFetcher * @brief virtual method to get coordinates and normals of a pixel of an image * @param point result point in some global coordinates frame * @param normal result normal in some global coordinates frame - * @param pose pose of the camera wrt some global coordinates frame * @param intrinsic the camera intrinsic object * @param imageCoords the input image pixel coordinates in 2D. * @return false on error