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

Method UpdateEdge

src/colmap/scene/pose_graph.h:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void PoseGraph::UpdateEdge(image_t image_id1,
167 image_t image_id2,
168 PoseGraph::Edge edge) {
169 if (ShouldSwapImagePair(image_id1, image_id2)) {
170 edge.Invert();
171 }
172 const image_pair_t pair_id = ImagePairToPairId(image_id1, image_id2);
173 auto it = edges_.find(pair_id);
174 if (it == edges_.end()) {
175 throw std::runtime_error(
176 "Image pair does not exist: " + std::to_string(image_id1) + ", " +
177 std::to_string(image_id2));
178 }
179 it->second = std::move(edge);
180}
181
182bool PoseGraph::IsValid(image_pair_t pair_id) const {
183 auto it = edges_.find(pair_id);

Callers 1

TESTFunction · 0.80

Calls 4

ShouldSwapImagePairFunction · 0.85
ImagePairToPairIdFunction · 0.85
InvertMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.64