Skip to content

Commit 3a2041e

Browse files
kielninometa-codesync[bot]
authored andcommitted
Correct definition of is_fixed in BundleShotPoses (#1115)
Summary: This is a PR for Issue #1083 As discussed there, the definition of “is_fixed” in BundleShotPoses is probably incorrect, leading to unnecessary runs of the Ceres optimizer. Although the impact is rather minor, a correct definition is preferable. Pull Request resolved: #1115 Differential Revision: D92679317 Pulled By: fabianschenk fbshipit-source-id: d2fd3c75c58ec078b272730353222181cb4bbfdb
1 parent c3c0453 commit 3a2041e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

opensfm/src/sfm/src/ba_helpers.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,9 @@ py::dict BAHelpers::BundleShotPoses(
492492
auto& shot = map.GetShot(shot_id);
493493
shot_cameras[shot_id] = shot.GetCamera()->id;
494494
shot_rig_cameras[shot_id] = shot_n_rig_camera.second->id;
495-
496-
const auto is_fixed = shot_ids.find(shot_id) != shot_ids.end();
495+
// If the shot_id is in the shot_ids we aim to optimize this shot, so
496+
// don't fix it
497+
const auto is_fixed = shot_ids.find(shot_id) == shot_ids.end();
497498
if (!is_fixed) {
498499
if (config["bundle_use_gps"].cast<bool>()) {
499500
const auto pos = shot.GetShotMeasurements().gps_position_;

0 commit comments

Comments
 (0)