CameraFreenect2: added pipelineName parameter

This commit is contained in:
matlabbe
2017-10-11 12:50:57 -04:00
parent 8b3cff9f4c
commit f6315e48d0
6 changed files with 231 additions and 97 deletions

View File

@@ -3821,15 +3821,6 @@ void MainWindow::applyPrefSettings(const rtabmap::ParametersMap & parameters, bo
if(_state != kIdle && parametersModified.size())
{
if(parametersModified.erase(Parameters::kRtabmapWorkingDirectory()) &&
_state != kMonitoring &&
_state != kMonitoringPaused)
{
QMessageBox::information(this, tr("Working memory changed"),
tr("The working directory can't be changed while the "
"detector is running (state=%1). This will be "
"applied when the detector will stop.").arg(_state));
}
if(postParamEvent)
{
this->post(new ParamEvent(parametersModified));

View File

@@ -520,6 +520,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
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->lineEdit_freenect2Pipeline, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->comboBox_realsensePresetRGB, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->comboBox_realsensePresetDepth, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->checkbox_realsenseOdom, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
@@ -1516,6 +1517,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
_ui->checkBox_freenect2BilateralFiltering->setChecked(true);
_ui->checkBox_freenect2EdgeAwareFiltering->setChecked(true);
_ui->checkBox_freenect2NoiseFiltering->setChecked(true);
_ui->lineEdit_freenect2Pipeline->setText("");
_ui->comboBox_realsensePresetRGB->setCurrentIndex(0);
_ui->comboBox_realsensePresetDepth->setCurrentIndex(2);
_ui->checkbox_realsenseOdom->setChecked(false);
@@ -1888,6 +1890,7 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
_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());
_ui->lineEdit_freenect2Pipeline->setText(settings.value("pipeline", _ui->lineEdit_freenect2Pipeline->text()).toString());
settings.endGroup(); // Freenect2
settings.beginGroup("RealSense");
@@ -2279,6 +2282,7 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
settings.setValue("bilateralFiltering", _ui->checkBox_freenect2BilateralFiltering->isChecked());
settings.setValue("edgeAwareFiltering", _ui->checkBox_freenect2EdgeAwareFiltering->isChecked());
settings.setValue("noiseFiltering", _ui->checkBox_freenect2NoiseFiltering->isChecked());
settings.setValue("pipeline", _ui->lineEdit_freenect2Pipeline->text());
settings.endGroup(); // Freenect2
settings.beginGroup("RealSense");
@@ -4740,7 +4744,8 @@ Camera * PreferencesDialog::createCamera(bool useRawImages, bool useColor)
_ui->doubleSpinBox_freenect2MaxDepth->value(),
_ui->checkBox_freenect2BilateralFiltering->isChecked(),
_ui->checkBox_freenect2EdgeAwareFiltering->isChecked(),
_ui->checkBox_freenect2NoiseFiltering->isChecked());
_ui->checkBox_freenect2NoiseFiltering->isChecked(),
_ui->lineEdit_freenect2Pipeline->text().toStdString());
}
else if (driver == kSrcRealSense)
{

View File

@@ -63,16 +63,25 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>2749</height>
<y>-317</y>
<width>677</width>
<height>2682</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -86,7 +95,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>12</number>
<number>5</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
@@ -2741,7 +2750,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<item>
<widget class="QStackedWidget" name="stackedWidget_src">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_41">
<layout class="QVBoxLayout" name="verticalLayout_64">
@@ -2851,7 +2860,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<item>
<widget class="QStackedWidget" name="stackedWidget_rgbd">
<property name="currentIndex">
<number>7</number>
<number>5</number>
</property>
<widget class="QWidget" name="page_32">
<layout class="QVBoxLayout" name="verticalLayout_63">
@@ -3150,10 +3159,10 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<string>Freenect2</string>
</property>
<layout class="QGridLayout" name="gridLayout_56" columnstretch="0,1">
<item row="0" column="1">
<widget class="QLabel" name="label_230">
<item row="4" column="1">
<widget class="QLabel" name="label_269">
<property name="text">
<string>Format.</string>
<string>Depth edge aware filtering.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -3163,18 +3172,15 @@ 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>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MaxDepth">
<property name="maximum">
<double>65.000000000000000</double>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
<property name="value">
<double>12.000000000000000</double>
</property>
</spacer>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="comboBox_freenect2Format">
@@ -3208,6 +3214,16 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</item>
</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="3" column="1">
<widget class="QLabel" name="label_268">
<property name="text">
@@ -3221,6 +3237,16 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</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="1" column="1">
<widget class="QLabel" name="label_266">
<property name="text">
@@ -3234,10 +3260,10 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_269">
<item row="0" column="1">
<widget class="QLabel" name="label_230">
<property name="text">
<string>Depth edge aware filtering.</string>
<string>Format.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -3247,33 +3273,42 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MaxDepth">
<item row="7" 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="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MinDepth">
<property name="maximum">
<double>65.000000000000000</double>
<double>64.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>12.000000000000000</double>
<double>0.300000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_freenect2BilateralFiltering">
<item row="5" column="1">
<widget class="QLabel" name="label_270">
<property name="text">
<string/>
<string>Depth noise filtering.</string>
</property>
<property name="checked">
<property name="wordWrap">
<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 name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
@@ -3290,19 +3325,6 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_freenect2MinDepth">
<property name="maximum">
<double>64.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.300000000000000</double>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBox_freenect2NoiseFiltering">
<property name="text">
@@ -3313,10 +3335,10 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_270">
<item row="6" column="1">
<widget class="QLabel" name="label_434">
<property name="text">
<string>Depth noise filtering.</string>
<string>Pipeline, any one of &quot;gl cl clkde cuda cudakde cpu&quot;. If empty, default one is used. Depending on how libfreenect2 was built, the selected pipeline may not be available.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -3326,6 +3348,13 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLineEdit" name="lineEdit_freenect2Pipeline">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -4561,7 +4590,16 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<string>Directory of images (optional settings)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_93">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -12710,7 +12748,16 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
<widget class="QWidget" name="page_54">
<layout class="QVBoxLayout" name="verticalLayout_85">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -12850,7 +12897,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
</widget>
<widget class="QWidget" name="page_55">
<layout class="QVBoxLayout" name="verticalLayout_86">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -13008,7 +13064,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -13088,7 +13153,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -13200,7 +13274,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>