AliceVision
Photogrammetric Computer Vision Framework
StructureEstimationFromKnownPoses.hpp
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2016 AliceVision contributors.
3 // Copyright (c) 2012 openMVG contributors.
4 // This Source Code Form is subject to the terms of the Mozilla Public License,
5 // v. 2.0. If a copy of the MPL was not distributed with this file,
6 // You can obtain one at https://mozilla.org/MPL/2.0/.
7 
8 #pragma once
9 
10 #include <aliceVision/sfmData/SfMData.hpp>
11 #include <aliceVision/feature/RegionsPerView.hpp>
12 #include <aliceVision/matching/MatchesCollections.hpp>
13 
14 namespace aliceVision {
15 namespace sfm {
16 
18 {
19  public:
21  void run(sfmData::SfMData& sfmData,
22  const PairSet& pairs,
23  const feature::RegionsPerView& regionsPerView,
24  std::mt19937& randomNumberGenerator,
25  double geometricErrorMax);
26 
27  public:
29  void match(const sfmData::SfMData& sfmData, const PairSet& pairs, const feature::RegionsPerView& regionsPerView, double geometricErrorMax);
30 
32  void filter(const sfmData::SfMData& sfmData, const PairSet& pairs, const feature::RegionsPerView& regionsPerView);
33 
35  void triangulate(sfmData::SfMData& sfmData, const feature::RegionsPerView& regionsPerView, std::mt19937& randomNumberGenerator);
36 
37  const matching::PairwiseMatches& getPutativesMatches() const { return _putativeMatches; }
38 
39  private:
40  //--
41  // DATA (temporary)
42  //--
43  matching::PairwiseMatches _putativeMatches;
44  matching::PairwiseMatches _tripletMatches;
45 };
46 
47 } // namespace sfm
48 } // namespace aliceVision
aliceVision::sfm::StructureEstimationFromKnownPoses
Definition: StructureEstimationFromKnownPoses.hpp:17
aliceVision::sfm::StructureEstimationFromKnownPoses::filter
void filter(const sfmData::SfMData &sfmData, const PairSet &pairs, const feature::RegionsPerView &regionsPerView)
Filter inconsistent correspondences by using 3-view correspondences on view triplets.
Definition: StructureEstimationFromKnownPoses.cpp:167
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::sfm::StructureEstimationFromKnownPoses::triangulate
void triangulate(sfmData::SfMData &sfmData, const feature::RegionsPerView &regionsPerView, std::mt19937 &randomNumberGenerator)
Init & triangulate landmark observations from validated 3-view correspondences.
Definition: StructureEstimationFromKnownPoses.cpp:261
aliceVision::sfmData::SfMData
SfMData container Store structure and camera properties.
Definition: SfMData.hpp:75
aliceVision::sfm::StructureEstimationFromKnownPoses::run
void run(sfmData::SfMData &sfmData, const PairSet &pairs, const feature::RegionsPerView &regionsPerView, std::mt19937 &randomNumberGenerator, double geometricErrorMax)
Use geometry of the views to compute a putative structure from features and descriptors.
Definition: StructureEstimationFromKnownPoses.cpp:57
aliceVision::feature::RegionsPerView
Container for all Regions (Features and Descriptors) for each View.
Definition: RegionsPerView.hpp:65
aliceVision::sfm::StructureEstimationFromKnownPoses::match
void match(const sfmData::SfMData &sfmData, const PairSet &pairs, const feature::RegionsPerView &regionsPerView, double geometricErrorMax)
Use guided matching to find corresponding 2-view correspondences.
Definition: StructureEstimationFromKnownPoses.cpp:73