Debian Codegraph @

src/aliceVision/sfm/pipeline/expanding/LbaPolicyConnexity.hpp

raw symbols SCIP
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2024 AliceVision contributors.
3 // This Source Code Form is subject to the terms of the Mozilla Public License,
4 // v. 2.0. If a copy of the MPL was not distributed with this file,
5 // You can obtain one at https://mozilla.org/MPL/2.0/.
6
7 #pragma once
8
9 #include <aliceVision/sfm/pipeline/expanding/LbaPolicy.hpp>
10 #include <aliceVision/sfm/pipeline/expanding/ConnexityGraph.hpp>
11
12 namespace aliceVision {
13 namespace sfm {
14
15 class LbaPolicyConnexity : public LbaPolicy
16 {
17 public:
18 using uptr = std::unique_ptr<LbaPolicyConnexity>;
19
20 public:
21 /**
22 * @brief Build the policy using a scene
23 * @param sfmData the scene to process
24 * @param tracksHandler the tracks for this scene
25 * @param views the list of views of interest
26 */
27 bool build(sfmData::SfMData & sfmData, const track::TracksHandler & tracksHandler, const std::set<IndexT> & viewIds) override;
28
29 /**
30 * @brief set the max distance in the graph to search for connexity
31 * @param distanceLimit is the max number of hops between two element in the graph
32 */
33 void setDistanceLimit(int distanceLimit)
34 {
35 _distanceLimit = distanceLimit;
36 }
37
38
39 private:
40 void upgradeSfmData(sfmData::SfMData & sfmData);
41 void setupIntrinsics(sfmData::SfMData & sfmData);
42
43 private:
44 int _distanceLimit = 1;
45 ConnexityGraph _graph;
46 };
47
48 }
49 }