MCPcopy Create free account
hub / github.com/colmap/colmap / Load

Method Load

src/colmap/scene/pose_graph.cc:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace colmap {
6
7void PoseGraph::Load(const CorrespondenceGraph& corr_graph) {
8 for (const auto& [pair_id, num_matches] :
9 corr_graph.NumMatchesBetweenAllImages()) {
10 const auto [image_id1, image_id2] = PairIdToImagePair(pair_id);
11 const TwoViewGeometry two_view_geometry = corr_graph.ExtractTwoViewGeometry(
12 image_id1, image_id2, /*extract_inlier_matches=*/false);
13 if (two_view_geometry.cam2_from_cam1.has_value()) {
14 Edge edge;
15 edge.cam2_from_cam1 = *two_view_geometry.cam2_from_cam1;
16 edge.num_matches = num_matches;
17 AddEdge(image_id1, image_id2, std::move(edge));
18 }
19 }
20
21 LOG(INFO) << "Loaded " << edges_.size() << " edges into pose graph";
22}
23
24std::unordered_set<frame_t> PoseGraph::ComputeLargestConnectedFrameComponent(
25 const Reconstruction& reconstruction, bool filter_unregistered) const {

Callers 3

TESTFunction · 0.45
BeginReconstructionMethod · 0.45
BeginReconstructionMethod · 0.45

Calls 4

PairIdToImagePairFunction · 0.85
sizeMethod · 0.80

Tested by 1

TESTFunction · 0.36