Enabled Source menu on Idle. Fixed calibration file with only the name not found. DBViewer: added max stereo features parameter under Stereo tab.

This commit is contained in:
matlabbe
2015-12-02 11:48:07 -05:00
parent 535cbbac5a
commit 676cd8cbd9
5 changed files with 57 additions and 26 deletions

View File

@@ -258,6 +258,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
connect(ui_->spinBox_stereo_gfttBlockSize, SIGNAL(valueChanged(int)), this, SLOT(updateStereo()));
connect(ui_->doubleSpinBox_stereo_flowEps, SIGNAL(valueChanged(double)), this, SLOT(updateStereo()));
connect(ui_->doubleSpinBox_stereo_gfttMinDistance, SIGNAL(valueChanged(double)), this, SLOT(updateStereo()));
connect(ui_->spinBox_stereo_gfttMaxFeatures, SIGNAL(valueChanged(int)), this, SLOT(updateStereo()));
connect(ui_->doubleSpinBox_stereo_gfttQuality, SIGNAL(valueChanged(double)), this, SLOT(updateStereo()));
connect(ui_->doubleSpinBox_stereo_maxSlope, SIGNAL(valueChanged(double)), this, SLOT(updateStereo()));
connect(ui_->checkBox_stereo_subpix, SIGNAL(stateChanged(int)), this, SLOT(updateStereo()));
@@ -329,6 +330,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
connect(ui_->spinBox_stereo_gfttBlockSize, SIGNAL(valueChanged(int)), this, SLOT(configModified()));
connect(ui_->doubleSpinBox_stereo_flowEps, SIGNAL(valueChanged(double)), this, SLOT(configModified()));
connect(ui_->doubleSpinBox_stereo_gfttMinDistance, SIGNAL(valueChanged(double)), this, SLOT(configModified()));
connect(ui_->spinBox_stereo_gfttMaxFeatures, SIGNAL(valueChanged(int)), this, SLOT(configModified()));
connect(ui_->doubleSpinBox_stereo_gfttQuality, SIGNAL(valueChanged(double)), this, SLOT(configModified()));
connect(ui_->doubleSpinBox_stereo_maxSlope, SIGNAL(valueChanged(double)), this, SLOT(configModified()));
connect(ui_->checkBox_stereo_subpix, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
@@ -476,6 +478,7 @@ void DatabaseViewer::readSettings()
ui_->spinBox_stereo_gfttBlockSize->setValue(settings.value("gfttBlockSize", ui_->spinBox_stereo_gfttBlockSize->value()).toInt());
ui_->doubleSpinBox_stereo_flowEps->setValue(settings.value("flowEps", ui_->doubleSpinBox_stereo_flowEps->value()).toDouble());
ui_->doubleSpinBox_stereo_gfttMinDistance->setValue(settings.value("gfttMinDistance", ui_->doubleSpinBox_stereo_gfttMinDistance->value()).toDouble());
ui_->spinBox_stereo_gfttMaxFeatures->setValue(settings.value("gfttMaxFeatures", ui_->spinBox_stereo_gfttMaxFeatures->value()).toInt());
ui_->doubleSpinBox_stereo_gfttQuality->setValue(settings.value("gfttQuality", ui_->doubleSpinBox_stereo_gfttQuality->value()).toDouble());
ui_->doubleSpinBox_stereo_maxSlope->setValue(settings.value("maxSlope", ui_->doubleSpinBox_stereo_maxSlope->value()).toDouble());
ui_->checkBox_stereo_subpix->setChecked(settings.value("subpix", ui_->checkBox_stereo_subpix->isChecked()).toBool());
@@ -581,6 +584,7 @@ void DatabaseViewer::writeSettings()
settings.setValue("gfttBlockSize", ui_->spinBox_stereo_gfttBlockSize->value());
settings.setValue("flowEps", ui_->doubleSpinBox_stereo_flowEps->value());
settings.setValue("gfttMinDistance", ui_->doubleSpinBox_stereo_gfttMinDistance->value());
settings.setValue("gfttMaxFeatures", ui_->spinBox_stereo_gfttMaxFeatures->value());
settings.setValue("gfttQuality", ui_->doubleSpinBox_stereo_gfttQuality->value());
settings.setValue("maxSlope", ui_->doubleSpinBox_stereo_maxSlope->value());
settings.setValue("subpix", ui_->checkBox_stereo_subpix->isChecked());
@@ -2452,7 +2456,7 @@ void DatabaseViewer::updateStereo(const SensorData * data)
std::vector<cv::KeyPoint> kpts;
cv::Rect roi = Feature2D::computeRoi(leftMono, "0.03 0.03 0.04 0.04");
ParametersMap parameters;
parameters.insert(ParametersPair(Parameters::kKpWordsPerImage(), "0"));
parameters.insert(ParametersPair(Parameters::kKpWordsPerImage(), uNumber2Str(ui_->spinBox_stereo_gfttMaxFeatures->value())));
parameters.insert(ParametersPair(Parameters::kGFTTMinDistance(), uNumber2Str(ui_->doubleSpinBox_stereo_gfttMinDistance->value())));
parameters.insert(ParametersPair(Parameters::kGFTTQualityLevel(), uNumber2Str(ui_->doubleSpinBox_stereo_gfttQuality->value())));
parameters.insert(ParametersPair(Parameters::kGFTTBlockSize(), uNumber2Str(ui_->spinBox_stereo_gfttBlockSize->value())));

View File

@@ -5981,11 +5981,11 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionExport_cameras_in_Bundle_format_out->setEnabled(!_cachedSignatures.empty() && !_currentPosesMap.empty());
_ui->actionDownload_all_clouds->setEnabled(false);
_ui->actionDownload_graph->setEnabled(false);
_ui->menuSelect_source->setEnabled(false);
_ui->menuSelect_source->setEnabled(true);
_ui->actionLabel_current_location->setEnabled(false);
_ui->actionSend_goal->setEnabled(false);
_ui->actionCancel_goal->setEnabled(false);
_ui->toolBar->findChild<QAction*>("toolbar_source")->setEnabled(false);
_ui->toolBar->findChild<QAction*>("toolbar_source")->setEnabled(true);
_ui->actionTrigger_a_new_map->setEnabled(false);
_ui->doubleSpinBox_stats_imgRate->setEnabled(true);
_ui->statusbar->clearMessage();

View File

@@ -3788,11 +3788,12 @@ Camera * PreferencesDialog::createCamera(bool useRawImages)
QString name = QFileInfo(_ui->lineEdit_calibrationFile->text()
.remove("_left.yaml")
.remove("_right.yaml")
.remove("_pose.yaml")).baseName();
.remove("_pose.yaml")
.remove(".yaml")).baseName();
if(!_ui->lineEdit_calibrationFile->text().isEmpty())
{
QDir d = QFileInfo(_ui->lineEdit_calibrationFile->text()).dir();
if(!d.path().isEmpty())
if(!_ui->lineEdit_calibrationFile->text().remove(QFileInfo(_ui->lineEdit_calibrationFile->text()).baseName()).isEmpty())
{
dir = d.absolutePath();
}

View File

@@ -50,7 +50,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>181</width>
<width>196</width>
<height>184</height>
</rect>
</property>
@@ -236,7 +236,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>181</width>
<width>195</width>
<height>184</height>
</rect>
</property>
@@ -869,7 +869,7 @@
<item>
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<number>5</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
@@ -2061,9 +2061,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-57</y>
<width>283</width>
<height>322</height>
<height>356</height>
</rect>
</property>
<attribute name="label">
@@ -2086,10 +2086,10 @@
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_stereo_gfttQuality">
<property name="decimals">
<number>3</number>
<number>4</number>
</property>
<property name="minimum">
<double>0.001000000000000</double>
<double>0.000100000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
@@ -2102,7 +2102,7 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="7" column="1">
<widget class="QLabel" name="label_59">
<property name="text">
<string>Optical Flow eps</string>
@@ -2116,7 +2116,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QSpinBox" name="spinBox_stereo_flowWinSize">
<property name="suffix">
<string> pixels</string>
@@ -2129,14 +2129,14 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QLabel" name="label_56">
<property name="text">
<string>Optical Flow win size</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QSpinBox" name="spinBox_stereo_flowMaxLevel">
<property name="minimum">
<number>1</number>
@@ -2153,7 +2153,7 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_stereo_flowEps">
<property name="decimals">
<number>4</number>
@@ -2169,14 +2169,14 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QLabel" name="label_57">
<property name="text">
<string>Optical Flow max level</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QLabel" name="label_58">
<property name="text">
<string>Optical Flow iterations</string>
@@ -2190,7 +2190,7 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QSpinBox" name="spinBox_stereo_flowIterations">
<property name="minimum">
<number>1</number>
@@ -2203,7 +2203,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_stereo_maxSlope">
<property name="decimals">
<number>2</number>
@@ -2232,21 +2232,21 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QLabel" name="label_62">
<property name="text">
<string>Sub pixel</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="QLabel" name="label_60">
<property name="text">
<string>Matches max slope</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -2259,13 +2259,39 @@
</property>
</spacer>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QCheckBox" name="checkBox_stereo_subpix">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_70">
<property name="text">
<string>GFTT max features</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QSpinBox" name="spinBox_stereo_gfttMaxFeatures">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>99999</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>