42 main_window_(main_window),
44 reconstruction_(nullptr),
46 setWindowTitle(
"Bundle adjustment");
49 "max_num_iterations");
52 "max_linear_solver_iterations");
56 "function_tolerance [10eX]", -1000, 1000);
59 "gradient_tolerance [10eX]", -1000, 1000);
62 "parameter_tolerance [10eX]", -1000, 1000);
65 "refine_focal_length");
67 "refine_principal_point");
69 "refine_extra_params");
73 QPushButton* run_button =
new QPushButton(tr(
"Run"),
this);
75 connect(run_button, &QPushButton::released,
this,
76 &BundleAdjustmentWidget::Run);
78 render_action_ =
new QAction(
this);
79 connect(render_action_, &QAction::triggered,
this,
80 &BundleAdjustmentWidget::Render, Qt::QueuedConnection);
84 reconstruction_ = reconstruction;
89 void BundleAdjustmentWidget::Run() {
90 CHECK_NOTNULL(reconstruction_);
96 [
this]() { render_action_->trigger(); });
102 thread_control_widget_->
StartThread(
"Bundle adjusting...",
true, thread);
105 void BundleAdjustmentWidget::Render() { main_window_->RenderNow(); }
std::shared_ptr< BundleAdjustmentOptions > bundle_adjustment
void Normalize(const double extent=10.0, const double p0=0.1, const double p1=0.9, const bool use_images=true)
void AddCallback(const int id, const std::function< void()> &func)
colmap::BundleAdjustmentController BundleAdjustmentController