22 reconstruction_(nullptr),
24 setWindowFlags(Qt::Dialog);
25 setWindowModality(Qt::ApplicationModal);
26 setWindowTitle(
"Undistortion");
28 output_format_ =
new QComboBox(
this);
29 output_format_->addItem(
"COLMAP");
30 output_format_->addItem(
"PMVS");
31 output_format_->addItem(
"CMP-MVS");
32 output_format_->setFont(font());
47 QPushButton* undistort_button =
new QPushButton(tr(
"Undistort"),
this);
48 connect(undistort_button, &QPushButton::released,
this,
49 &UndistortionWidget::Undistort);
54 reconstruction_ = &reconstruction;
61 void UndistortionWidget::Undistort() {
62 CHECK_NOTNULL(reconstruction_);
67 Thread* undistorter =
nullptr;
69 if (output_format_->currentIndex() == 0) {
71 undistortion_options_,
74 }
else if (output_format_->currentIndex() == 1) {
76 undistortion_options_,
79 }
else if (output_format_->currentIndex() == 2) {
81 undistortion_options_,
85 QMessageBox::critical(
this,
"", tr(
"Invalid output format"));
89 thread_control_widget_->
StartThread(
"Undistorting...",
true,
92 QMessageBox::critical(
this,
"", tr(
"Invalid output path"));
std::shared_ptr< std::string > image_path
Generic file read and write utility for python interface.
bool ExistsDir(const std::string &path)