mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added more Freenect2 options
This commit is contained in:
@@ -379,6 +379,11 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->openni2_mirroring, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->openni2_stampsIdsUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->comboBox_freenect2Format, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_freenect2MinDepth, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_freenect2MaxDepth, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_freenect2BilateralFiltering, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_freenect2EdgeAwareFiltering, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_freenect2NoiseFiltering, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
|
||||
connect(_ui->toolButton_cameraRGBDImages_timestamps, SIGNAL(clicked()), this, SLOT(selectSourceRGBDImagesStamps()));
|
||||
connect(_ui->lineEdit_cameraRGBDImages_timestamps, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
@@ -1095,8 +1100,8 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->checkBox_rgbVideo_rectify->setChecked(false);
|
||||
|
||||
_ui->source_checkBox_ignoreOdometry->setChecked(false);
|
||||
_ui->source_checkBox_ignoreGoalDelay->setChecked(false);
|
||||
_ui->source_checkBox_ignoreGoals->setChecked(false);
|
||||
_ui->source_checkBox_ignoreGoalDelay->setChecked(true);
|
||||
_ui->source_checkBox_ignoreGoals->setChecked(true);
|
||||
_ui->source_spinBox_databaseStartPos->setValue(0);
|
||||
_ui->source_checkBox_useDbStamps->setChecked(true);
|
||||
|
||||
@@ -1138,6 +1143,11 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->openni2_mirroring->setChecked(false);
|
||||
_ui->openni2_stampsIdsUsed->setChecked(false);
|
||||
_ui->comboBox_freenect2Format->setCurrentIndex(0);
|
||||
_ui->doubleSpinBox_freenect2MinDepth->setValue(0.3);
|
||||
_ui->doubleSpinBox_freenect2MaxDepth->setValue(12.0);
|
||||
_ui->checkBox_freenect2BilateralFiltering->setChecked(true);
|
||||
_ui->checkBox_freenect2EdgeAwareFiltering->setChecked(true);
|
||||
_ui->checkBox_freenect2NoiseFiltering->setChecked(true);
|
||||
_ui->lineEdit_openniOniPath->clear();
|
||||
_ui->lineEdit_openni2OniPath->clear();
|
||||
_ui->lineEdit_cameraRGBDImages_path_rgb->setText("");
|
||||
@@ -1417,6 +1427,11 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
|
||||
settings.beginGroup("Freenect2");
|
||||
_ui->comboBox_freenect2Format->setCurrentIndex(settings.value("format", _ui->comboBox_freenect2Format->currentIndex()).toInt());
|
||||
_ui->doubleSpinBox_freenect2MinDepth->setValue(settings.value("minDepth", _ui->doubleSpinBox_freenect2MinDepth->value()).toDouble());
|
||||
_ui->doubleSpinBox_freenect2MaxDepth->setValue(settings.value("maxDepth", _ui->doubleSpinBox_freenect2MaxDepth->value()).toDouble());
|
||||
_ui->checkBox_freenect2BilateralFiltering->setChecked(settings.value("bilateralFiltering", _ui->checkBox_freenect2BilateralFiltering->isChecked()).toBool());
|
||||
_ui->checkBox_freenect2EdgeAwareFiltering->setChecked(settings.value("edgeAwareFiltering", _ui->checkBox_freenect2EdgeAwareFiltering->isChecked()).toBool());
|
||||
_ui->checkBox_freenect2NoiseFiltering->setChecked(settings.value("noiseFiltering", _ui->checkBox_freenect2NoiseFiltering->isChecked()).toBool());
|
||||
settings.endGroup(); // Freenect2
|
||||
|
||||
settings.beginGroup("RGBDImages");
|
||||
@@ -1730,7 +1745,12 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
settings.endGroup(); // Openni2
|
||||
|
||||
settings.beginGroup("Freenect2");
|
||||
settings.setValue("format", _ui->comboBox_freenect2Format->currentIndex());
|
||||
settings.setValue("format", _ui->comboBox_freenect2Format->currentIndex());
|
||||
settings.setValue("minDepth", _ui->doubleSpinBox_freenect2MinDepth->value());
|
||||
settings.setValue("maxDepth", _ui->doubleSpinBox_freenect2MaxDepth->value());
|
||||
settings.setValue("bilateralFiltering", _ui->checkBox_freenect2BilateralFiltering->isChecked());
|
||||
settings.setValue("edgeAwareFiltering", _ui->checkBox_freenect2EdgeAwareFiltering->isChecked());
|
||||
settings.setValue("noiseFiltering", _ui->checkBox_freenect2NoiseFiltering->isChecked());
|
||||
settings.endGroup(); // Freenect2
|
||||
|
||||
settings.beginGroup("RGBDImages");
|
||||
@@ -1952,8 +1972,7 @@ bool PreferencesDialog::validateForm()
|
||||
_ui->odom_bin_nn->setCurrentIndex(VWDictionary::kNNBruteForce);
|
||||
}
|
||||
|
||||
if(_ui->groupBox_odometry1->isEnabled() &&
|
||||
_ui->loopClosure_bowVarianceFromInliersCount->isChecked() != _ui->odom_varianceFromInliersCount->isChecked())
|
||||
if(_ui->loopClosure_bowVarianceFromInliersCount->isChecked() != _ui->odom_varianceFromInliersCount->isChecked())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Parameter warning"),
|
||||
tr("Odometry %1 variance from inliers count but Loop Closure constraint %2. "
|
||||
@@ -1963,6 +1982,16 @@ bool PreferencesDialog::validateForm()
|
||||
_ui->loopClosure_bowVarianceFromInliersCount->setChecked(_ui->odom_varianceFromInliersCount->isChecked());
|
||||
}
|
||||
|
||||
if(_ui->doubleSpinBox_freenect2MinDepth->value() >= _ui->doubleSpinBox_freenect2MaxDepth->value())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Parameter warning"),
|
||||
tr("Freenect2 minimum depth (%1 m) should be lower than maximum depth (%2 m). Setting maximum depth to %3 m.")
|
||||
.arg(_ui->doubleSpinBox_freenect2MinDepth->value())
|
||||
.arg(_ui->doubleSpinBox_freenect2MaxDepth->value())
|
||||
.arg(_ui->doubleSpinBox_freenect2MaxDepth->value()+1));
|
||||
_ui->doubleSpinBox_freenect2MaxDepth->setValue(_ui->doubleSpinBox_freenect2MaxDepth->value()+1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3628,7 +3657,12 @@ Camera * PreferencesDialog::createCamera(bool useRawImages)
|
||||
this->getSourceDevice().isEmpty()?0:atoi(this->getSourceDevice().toStdString().c_str()),
|
||||
useRawImages?CameraFreenect2::kTypeColorIR:(CameraFreenect2::Type)_ui->comboBox_freenect2Format->currentIndex(),
|
||||
this->getGeneralInputRate(),
|
||||
this->getSourceLocalTransform());
|
||||
this->getSourceLocalTransform(),
|
||||
_ui->doubleSpinBox_freenect2MinDepth->value(),
|
||||
_ui->doubleSpinBox_freenect2MaxDepth->value(),
|
||||
_ui->checkBox_freenect2BilateralFiltering->isChecked(),
|
||||
_ui->checkBox_freenect2EdgeAwareFiltering->isChecked(),
|
||||
_ui->checkBox_freenect2NoiseFiltering->isChecked());
|
||||
}
|
||||
else if(driver == kSrcRGBDImages)
|
||||
{
|
||||
|
||||
@@ -2138,6 +2138,19 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="verticalSpacer_32">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboBox_freenect2Format">
|
||||
<property name="sizeAdjustPolicy">
|
||||
@@ -2148,6 +2161,11 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
<string>Registered Color to Depth SD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Depth to Color SD (old way)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Depth to Color HD</string>
|
||||
@@ -2155,7 +2173,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Depth to Color SD</string>
|
||||
<string>Registered Depth to Color HD (old way)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -2165,18 +2183,123 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_268">
|
||||
<property name="text">
|
||||
<string>Depth bilateral filtering.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_266">
|
||||
<property name="text">
|
||||
<string>Min depth.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_269">
|
||||
<property name="text">
|
||||
<string>Depth edge aware filtering.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MaxDepth">
|
||||
<property name="maximum">
|
||||
<double>65.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>12.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_freenect2BilateralFiltering">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_freenect2EdgeAwareFiltering">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_267">
|
||||
<property name="text">
|
||||
<string>Max depth.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_32">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MinDepth">
|
||||
<property name="maximum">
|
||||
<double>64.000000000000000</double>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="value">
|
||||
<double>0.300000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_freenect2NoiseFiltering">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_270">
|
||||
<property name="text">
|
||||
<string>Depth noise filtering.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user