CameraOpenNI2: Added OpenNI2 stamps/Ids option

This commit is contained in:
matlabbe
2015-10-15 16:40:49 -04:00
parent a8b5311d88
commit 835155e6ae
4 changed files with 44 additions and 9 deletions

View File

@@ -377,6 +377,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
connect(_ui->openni2_exposure, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_gain, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
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->toolButton_cameraRGBDImages_timestamps, SIGNAL(clicked()), this, SLOT(selectSourceRGBDImagesStamps()));
@@ -1134,6 +1135,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
_ui->openni2_exposure->setValue(0);
_ui->openni2_gain->setValue(100);
_ui->openni2_mirroring->setChecked(false);
_ui->openni2_stampsIdsUsed->setChecked(false);
_ui->comboBox_freenect2Format->setCurrentIndex(0);
_ui->lineEdit_openniOniPath->clear();
_ui->lineEdit_openni2OniPath->clear();
@@ -1408,6 +1410,7 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
_ui->openni2_exposure->setValue(settings.value("exposure", _ui->openni2_exposure->value()).toInt());
_ui->openni2_gain->setValue(settings.value("gain", _ui->openni2_gain->value()).toInt());
_ui->openni2_mirroring->setChecked(settings.value("mirroring", _ui->openni2_mirroring->isChecked()).toBool());
_ui->openni2_stampsIdsUsed->setChecked(settings.value("stampsIdsUsed", _ui->openni2_stampsIdsUsed->isChecked()).toBool());
_ui->lineEdit_openni2OniPath->setText(settings.value("oniPath", _ui->lineEdit_openni2OniPath->text()).toString());
settings.endGroup(); // Openni2
@@ -1721,6 +1724,7 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
settings.setValue("exposure", _ui->openni2_exposure->value());
settings.setValue("gain", _ui->openni2_gain->value());
settings.setValue("mirroring", _ui->openni2_mirroring->isChecked());
settings.setValue("stampsIdsUsed", _ui->openni2_stampsIdsUsed->isChecked());
settings.setValue("oniPath", _ui->lineEdit_openni2OniPath->text());
settings.endGroup(); // Openni2
@@ -3733,6 +3737,7 @@ Camera * PreferencesDialog::createCamera(bool useRawImages)
((CameraOpenNI2*)camera)->setAutoWhiteBalance(_ui->openni2_autoWhiteBalance->isChecked());
((CameraOpenNI2*)camera)->setAutoExposure(_ui->openni2_autoExposure->isChecked());
((CameraOpenNI2*)camera)->setMirroring(_ui->openni2_mirroring->isChecked());
((CameraOpenNI2*)camera)->setOpenNI2StampsAndIDsUsed(_ui->openni2_stampsIdsUsed->isChecked());
if(CameraOpenNI2::exposureGainAvailable())
{
((CameraOpenNI2*)camera)->setExposure(_ui->openni2_exposure->value());

View File

@@ -63,7 +63,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-1003</y>
<y>-315</y>
<width>760</width>
<height>1705</height>
</rect>
@@ -86,7 +86,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>19</number>
<number>3</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -1769,7 +1769,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>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_41">
<layout class="QVBoxLayout" name="verticalLayout_64">
@@ -1874,7 +1874,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>6</number>
<number>4</number>
</property>
<widget class="QWidget" name="page_32">
<layout class="QVBoxLayout" name="verticalLayout_63">
@@ -2009,7 +2009,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<spacer name="verticalSpacer_33">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -2042,7 +2042,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QCheckBox" name="openni2_mirroring">
<property name="text">
<string/>
@@ -2052,7 +2052,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QLabel" name="label_223">
<property name="text">
<string>Mirroring.</string>
@@ -2086,6 +2086,26 @@ 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_264">
<property name="text">
<string>Use timestamps and frame IDs from OpenNI2.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="openni2_stampsIdsUsed">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>