Skip to content

Commit

Permalink
[cosmetic] Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Mar 20, 2021
1 parent a9972e1 commit dafdedd
Show file tree
Hide file tree
Showing 21 changed files with 85 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void Match
const sfm::Regions_Provider & regions_provider,
const Pair_Set & pairs,
float fDistRatio,
PairWiseMatchesContainer & map_PutativesMatches, // the pairwise photometric corresponding points
PairWiseMatchesContainer & map_PutativeMatches, // the pairwise photometric corresponding points
system::ProgressInterface * my_progress_bar
)
{
Expand Down Expand Up @@ -213,7 +213,7 @@ void Match
{
if (!vec_putative_matches.empty())
{
map_PutativesMatches.insert(
map_PutativeMatches.insert(
{
{I,J},
std::move(vec_putative_matches)
Expand All @@ -230,7 +230,7 @@ void Cascade_Hashing_Matcher_Regions::Match
(
const std::shared_ptr<sfm::Regions_Provider> & regions_provider,
const Pair_Set & pairs,
PairWiseMatchesContainer & map_PutativesMatches, // the pairwise photometric corresponding points
PairWiseMatchesContainer & map_PutativeMatches, // the pairwise photometric corresponding points
system::ProgressInterface * my_progress_bar
)const
{
Expand All @@ -249,7 +249,7 @@ void Cascade_Hashing_Matcher_Regions::Match
*regions_provider.get(),
pairs,
f_dist_ratio_,
map_PutativesMatches,
map_PutativeMatches,
my_progress_bar);
}
else
Expand All @@ -259,7 +259,7 @@ void Cascade_Hashing_Matcher_Regions::Match
*regions_provider.get(),
pairs,
f_dist_ratio_,
map_PutativesMatches,
map_PutativeMatches,
my_progress_bar);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Cascade_Hashing_Matcher_Regions : public Matcher
void Match
(const std::shared_ptr<sfm::Regions_Provider> & regions_provider,
const Pair_Set & pairs,
matching::PairWiseMatchesContainer & map_PutativesMatches, // the pairwise photometric corresponding points
matching::PairWiseMatchesContainer & map_PutativeMatches, // the pairwise photometric corresponding points
system::ProgressInterface * progress = nullptr
) const override;

Expand Down
2 changes: 1 addition & 1 deletion src/openMVG/matching_image_collection/Matcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Matcher
virtual void Match(
const std::shared_ptr<sfm::Regions_Provider> & regions_provider,
const Pair_Set & pairs, // list of pair to consider for matching
matching::PairWiseMatchesContainer & map_putatives_matches, // the output pairwise photometric corresponding points
matching::PairWiseMatchesContainer & map_putative_matches, // the output pairwise photometric corresponding points
system::ProgressInterface * progress = nullptr
)const = 0;
};
Expand Down
10 changes: 5 additions & 5 deletions src/openMVG/matching_image_collection/Matcher_Regions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Matcher_Regions::Matcher_Regions
void Matcher_Regions::Match(
const std::shared_ptr<sfm::Regions_Provider> & regions_provider,
const Pair_Set & pairs,
PairWiseMatchesContainer & map_PutativesMatches,
PairWiseMatchesContainer & map_PutativeMatches,
system::ProgressInterface * my_progress_bar)const
{
if (!my_progress_bar)
Expand Down Expand Up @@ -89,16 +89,16 @@ void Matcher_Regions::Match(
continue;
}

IndMatches vec_putatives_matches;
matcher->MatchDistanceRatio(f_dist_ratio_, *regionsJ.get(), vec_putatives_matches);
IndMatches vec_putative_matches;
matcher->MatchDistanceRatio(f_dist_ratio_, *regionsJ.get(), vec_putative_matches);

#ifdef OPENMVG_USE_OPENMP
#pragma omp critical
#endif
{
if (!vec_putatives_matches.empty())
if (!vec_putative_matches.empty())
{
map_PutativesMatches.insert( { {I,J}, std::move(vec_putatives_matches) } );
map_PutativeMatches.insert( { {I,J}, std::move(vec_putative_matches) } );
}
}
++(*my_progress_bar);
Expand Down
2 changes: 1 addition & 1 deletion src/openMVG/matching_image_collection/Matcher_Regions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Matcher_Regions : public Matcher
(
const std::shared_ptr<sfm::Regions_Provider> & regions_provider,
const Pair_Set & pairs,
matching::PairWiseMatchesContainer & map_PutativesMatches, // the pairwise photometric corresponding points
matching::PairWiseMatchesContainer & map_PutativeMatches, // the pairwise photometric corresponding points
system::ProgressInterface * progress = nullptr
) const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ bool GlobalSfM_Translation_AveragingSolver::Estimate_T_triplet
// compute 3D scene base on motion estimation
SfM_Data tiny_scene;

// intialize poses (which are now shared by a group of images)
// initialize poses (which are now shared by a group of images)
tiny_scene.poses[poses_id.i] = Pose3(vec_global_R_Triplet[0], -vec_global_R_Triplet[0].transpose() * vec_tis[0]);
tiny_scene.poses[poses_id.j] = Pose3(vec_global_R_Triplet[1], -vec_global_R_Triplet[1].transpose() * vec_tis[1]);
tiny_scene.poses[poses_id.k] = Pose3(vec_global_R_Triplet[2], -vec_global_R_Triplet[2].transpose() * vec_tis[2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,10 @@ bool GlobalSfMReconstructionEngine_RelativeMotions::Compute_Initial_Structure
std::ostream_iterator<uint32_t>(osTrack, ", "));
osTrack << "\n------------------\n";

std::map<uint32_t, uint32_t> map_Occurence_TrackLength;
TracksUtilsMap::TracksLength(map_selectedTracks, map_Occurence_TrackLength);
std::map<uint32_t, uint32_t> map_Occurrence_TrackLength;
TracksUtilsMap::TracksLength(map_selectedTracks, map_Occurrence_TrackLength);
osTrack << "TrackLength, Occurrence" << "\n";
for (const auto & iter : map_Occurence_TrackLength) {
for (const auto & iter : map_Occurrence_TrackLength) {
osTrack << "\t" << iter.first << "\t" << iter.second << "\n";
}
osTrack << "\n";
Expand Down Expand Up @@ -417,7 +417,7 @@ bool GlobalSfMReconstructionEngine_RelativeMotions::Compute_Initial_Structure
// Adjust the scene (& remove outliers)
bool GlobalSfMReconstructionEngine_RelativeMotions::Adjust()
{
// Refine sfm_scene (in a 3 iteration process (free the parameters regarding their incertainty order)):
// Refine sfm_scene (in a 3 iteration process (free the parameters regarding their uncertainty order)):

Bundle_Adjustment_Ceres bundle_adjustment_obj;
// - refine only Structure and translations
Expand Down
10 changes: 5 additions & 5 deletions src/openMVG/sfm/pipelines/sequential/sequential_SfM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ bool SequentialSfMReconstructionEngine::InitLandmarkTracks()
std::ostream_iterator<uint32_t>(osTrack, ", "));
osTrack << "\n------------------\n";

std::map<uint32_t, uint32_t> map_Occurence_TrackLength;
tracks::TracksUtilsMap::TracksLength(map_tracks_, map_Occurence_TrackLength);
std::map<uint32_t, uint32_t> map_Occurrence_TrackLength;
tracks::TracksUtilsMap::TracksLength(map_tracks_, map_Occurrence_TrackLength);
osTrack << "TrackLength, Occurrence" << "\n";
for (const auto & it : map_Occurence_TrackLength) {
for (const auto & it : map_Occurrence_TrackLength) {
osTrack << "\t" << it.first << "\t" << it.second << "\n";
}
OPENMVG_LOG_INFO << osTrack.str();
Expand Down Expand Up @@ -1094,7 +1094,7 @@ bool SequentialSfMReconstructionEngine::Resection(const uint32_t viewIndex)
// If view is valid try triangulation
if (J != I && valid_views.count(J) != 0)
{
// If successfuly triangulated add the observation from J view
// If successfully triangulated add the observation from J view
if (sfm_data_.structure.count(trackId) != 0)
{
new_track_observations_valid_views.insert(J);
Expand Down Expand Up @@ -1158,7 +1158,7 @@ bool SequentialSfMReconstructionEngine::Resection(const uint32_t viewIndex)
}// Go through all the views
}// If new point

// If successfuly triangulated, add the valid view observations
// If successfully triangulated, add the valid view observations
if (sfm_data_.structure.count(trackId) != 0 &&
!new_track_observations_valid_views.empty())
{
Expand Down
8 changes: 4 additions & 4 deletions src/openMVG/sfm/pipelines/sequential/sequential_SfM2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ bool SequentialSfMReconstructionEngine2::InitTracksAndLandmarks()
std::ostream_iterator<uint32_t>(osTrack, ", "));
osTrack << "\n------------------" << "\n";

std::map<uint32_t, uint32_t> map_Occurence_TrackLength;
tracks::TracksUtilsMap::TracksLength(map_tracks_, map_Occurence_TrackLength);
std::map<uint32_t, uint32_t> map_Occurrence_TrackLength;
tracks::TracksUtilsMap::TracksLength(map_tracks_, map_Occurrence_TrackLength);
osTrack << "TrackLength, Occurrence" << "\n";
for (const auto & it : map_Occurence_TrackLength) {
for (const auto & it : map_Occurrence_TrackLength) {
osTrack << "\t" << it.first << "\t" << it.second << "\n";
}
osTrack << "\n";
Expand All @@ -242,7 +242,7 @@ bool SequentialSfMReconstructionEngine2::InitTracksAndLandmarks()

// Init the putative landmarks
{
// For every track add the obervations:
// For every track add the observations:
// - views and feature positions that see this landmark
for ( const auto & iterT : map_tracks_ )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void SfM_Data_Structure_Estimation_From_Known_Poses::match(
#pragma omp critical
#endif // OPENMVG_USE_OPENMP
{
putatives_matches[pair].insert(putatives_matches[pair].end(),
putative_matches[pair].insert(putative_matches[pair].end(),
vec_corresponding_indexes.begin(), vec_corresponding_indexes.end());
}
++my_progress_bar;
Expand Down Expand Up @@ -206,14 +206,14 @@ void SfM_Data_Structure_Estimation_From_Known_Poses::filter(
openMVG::tracks::TracksBuilder tracksBuilder;
{
PairWiseMatches map_matchesIJK;
if (putatives_matches.count({I,J}))
map_matchesIJK.insert(*putatives_matches.find({I,J}));
if (putative_matches.count({I,J}))
map_matchesIJK.insert(*putative_matches.find({I,J}));

if (putatives_matches.count({I,K}))
map_matchesIJK.insert(*putatives_matches.find({I,K}));
if (putative_matches.count({I,K}))
map_matchesIJK.insert(*putative_matches.find({I,K}));

if (putatives_matches.count({J,K}))
map_matchesIJK.insert(*putatives_matches.find({J,K}));
if (putative_matches.count({J,K}))
map_matchesIJK.insert(*putative_matches.find({J,K}));

if (map_matchesIJK.size() >= 2) {
tracksBuilder.Build(map_matchesIJK);
Expand Down Expand Up @@ -292,7 +292,7 @@ void SfM_Data_Structure_Estimation_From_Known_Poses::filter(
}
}
// Clear putatives matches since they are no longer required
matching::PairWiseMatches().swap(putatives_matches);
matching::PairWiseMatches().swap(putative_matches);
}

/// Init & triangulate landmark observations from the fused validated 3-view correspondences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SfM_Data_Structure_Estimation_From_Known_Poses
//--
// DATA (temporary)
//--
matching::PairWiseMatches putatives_matches;
matching::PairWiseMatches putative_matches;
matching::PairWiseMatches triplets_matches;
double max_reprojection_error_;
};
Expand Down
2 changes: 1 addition & 1 deletion src/openMVG/sfm/sfm_data_colorization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ bool ColorizeTracks(
std::vector<sort_index_packet_descend<IndexT, IndexT>> packet_vec(vec_cardinal.size());
sort_index_helper(packet_vec, &vec_cardinal[0], 1);

// First image index with the most of occurence
// First image index with the most of occurrence
std::map<IndexT, IndexT>::const_iterator iterTT = map_IndexCardinal.begin();
std::advance(iterTT, packet_vec[0].index);
const size_t view_index = iterTT->first;
Expand Down
2 changes: 1 addition & 1 deletion src/openMVG/sfm/sfm_data_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct SfM_Data;
// Group camera models that share common camera properties
// It modifies the intrinsic_id of the view field and change the sfm_data.intrinsics length
// Grouping is simplified by using a hash function over the camera intrinsics
// - it allow to merge camera model that share common camera parameters & image sizes
// - allow to merge camera model that share common camera parameters & image sizes
void GroupSharedIntrinsics(SfM_Data & sfm_data);

} // namespace sfm
Expand Down
36 changes: 18 additions & 18 deletions src/openMVG/sfm/sfm_filters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
RelativeInfo_Map& map_relatives)
{
RelativeInfo_Map map_relatives_infered;
RelativeInfo_Map map_relatives_inferred;
for (RelativeInfo_Map::const_iterator
iter = map_relatives.begin();
iter != map_relatives.end(); ++iter)
{
if (set_remainingIds.count(iter->first.first) &&
set_remainingIds.count(iter->first.second))
{
map_relatives_infered.insert(*iter);
map_relatives_inferred.insert(*iter);
}
}
map_relatives.swap(map_relatives_infered);
map_relatives.swap(map_relatives_inferred);
}

// Specialization for RelativeInfo_Map
Expand All @@ -67,18 +67,18 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
rotation_averaging::RelativeRotations& relative_info)
{
rotation_averaging::RelativeRotations relatives_infered;
rotation_averaging::RelativeRotations relatives_inferred;
for (rotation_averaging::RelativeRotations::const_iterator
iter = relative_info.begin();
iter != relative_info.end(); ++iter)
{
if (set_remainingIds.count(iter->i) &&
set_remainingIds.count(iter->j))
{
relatives_infered.push_back(*iter);
relatives_inferred.push_back(*iter);
}
}
relative_info.swap(relatives_infered);
relative_info.swap(relatives_inferred);
}

// Specialization for PairWiseMatches
Expand All @@ -88,17 +88,17 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
openMVG::matching::PairWiseMatches& map_matches)
{
openMVG::matching::PairWiseMatches map_matches_E_infered;
openMVG::matching::PairWiseMatches map_matches_E_inferred;
for (openMVG::matching::PairWiseMatches::const_iterator iter = map_matches.begin();
iter != map_matches.end(); ++iter)
{
if (set_remainingIds.count(iter->first.first) &&
set_remainingIds.count(iter->first.second))
{
map_matches_E_infered.insert(*iter);
map_matches_E_inferred.insert(*iter);
}
}
map_matches.swap(map_matches_E_infered);
map_matches.swap(map_matches_E_inferred);
}

// Specialization for std::map<IndexT,Mat3>
Expand All @@ -108,16 +108,16 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
std::map<IndexT,Mat3>& map_Mat3)
{
std::map<IndexT,Mat3> map_infered;
std::map<IndexT,Mat3> map_inferred;
for (std::map<IndexT,Mat3>::const_iterator iter = map_Mat3.begin();
iter != map_Mat3.end(); ++iter)
{
if (set_remainingIds.count(iter->first))
{
map_infered.insert(*iter);
map_inferred.insert(*iter);
}
}
map_Mat3.swap(map_infered);
map_Mat3.swap(map_inferred);
}

// Specialization for RelativeInfo_Vec
Expand All @@ -127,17 +127,17 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
RelativeInfo_Vec & relativeInfo_vec)
{
RelativeInfo_Vec map_infered;
RelativeInfo_Vec map_inferred;
for (RelativeInfo_Vec::const_iterator iter = relativeInfo_vec.begin();
iter != relativeInfo_vec.end(); ++iter)
{
if (set_remainingIds.count(iter->first.first) &&
set_remainingIds.count(iter->first.second))
{
map_infered.push_back(*iter);
map_inferred.push_back(*iter);
}
}
relativeInfo_vec.swap(map_infered);
relativeInfo_vec.swap(map_inferred);
}

// Specialization for std::vector<RelativeInfo_Vec>
Expand All @@ -147,7 +147,7 @@ void KeepOnlyReferencedElement(
const std::set<IndexT> & set_remainingIds,
std::vector<RelativeInfo_Vec> & relative_motion_group)
{
std::vector<RelativeInfo_Vec> infered_relative_motion;
std::vector<RelativeInfo_Vec> inferred_relative_motion;
for (const openMVG::RelativeInfo_Vec & iter : relative_motion_group)
{
RelativeInfo_Vec group;
Expand All @@ -161,10 +161,10 @@ void KeepOnlyReferencedElement(
}
if (!group.empty())
{
infered_relative_motion.push_back(std::move(group));
inferred_relative_motion.push_back(std::move(group));
}
}
relative_motion_group.swap(infered_relative_motion);
relative_motion_group.swap(inferred_relative_motion);
}

} // namespace sfm
Expand Down
Loading

0 comments on commit dafdedd

Please sign in to comment.