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

Method BundleAdjustmentWidget

src/colmap/ui/bundle_adjustment_widget.cc:41–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace colmap {
40
41BundleAdjustmentWidget::BundleAdjustmentWidget(MainWindow* main_window,
42 OptionManager* options)
43 : OptionsWidget(main_window),
44 main_window_(main_window),
45 options_(options),
46 reconstruction_(nullptr),
47 thread_control_widget_(new ThreadControlWidget(this)) {
48 setWindowFlags(Qt::Dialog);
49 setWindowModality(Qt::ApplicationModal);
50 setWindowTitle("Bundle adjustment");
51
52 AddOptionInt(
53 &options->bundle_adjustment->ceres->solver_options.max_num_iterations,
54 "max_num_iterations");
55 AddOptionInt(&options->bundle_adjustment->ceres->solver_options
56 .max_linear_solver_iterations,
57 "max_linear_solver_iterations");
58
59 AddOptionDoubleLog(
60 &options->bundle_adjustment->ceres->solver_options.function_tolerance,
61 "function_tolerance [10eX]",
62 -1000,
63 1000);
64 AddOptionDoubleLog(
65 &options->bundle_adjustment->ceres->solver_options.gradient_tolerance,
66 "gradient_tolerance [10eX]",
67 -1000,
68 1000);
69 AddOptionDoubleLog(
70 &options->bundle_adjustment->ceres->solver_options.parameter_tolerance,
71 "parameter_tolerance [10eX]",
72 -1000,
73 1000);
74
75 AddOptionBool(&options->bundle_adjustment->refine_focal_length,
76 "refine_focal_length");
77 AddOptionBool(&options->bundle_adjustment->refine_principal_point,
78 "refine_principal_point");
79 AddOptionBool(&options->bundle_adjustment->refine_extra_params,
80 "refine_extra_params");
81 AddOptionBool(&options->bundle_adjustment->refine_rig_from_world,
82 "refine_rig_from_world");
83 AddOptionBool(&options->bundle_adjustment->refine_sensor_from_rig,
84 "refine_sensor_from_rig");
85 AddOptionBool(&options->bundle_adjustment->refine_points3D,
86 "refine_points3D");
87
88#ifdef CASPAR_ENABLED
89 AddSection("Bundle Adjustment Backend");
90 auto* backend_combo = new QComboBox(this);
91 backend_combo->addItem("CERES"); // index 0 == BundleAdjustmentBackend::CERES
92 backend_combo->addItem(
93 "CASPAR"); // index 1 == BundleAdjustmentBackend::CASPAR
94 backend_combo->setCurrentIndex(
95 static_cast<int>(options->bundle_adjustment->backend));
96 connect(backend_combo,
97 QOverload<int>::of(&QComboBox::currentIndexChanged),
98 [options](int idx) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected