mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
CameraK4W2: added depth to color registration. For CameraFreenect2, kTypeColor2DepthSD is now used by default.
This commit is contained in:
@@ -52,7 +52,7 @@ CameraViewer::CameraViewer(QWidget * parent, const ParametersMap & parameters) :
|
||||
imageView_(new ImageView(this)),
|
||||
cloudView_(new CloudViewer(this)),
|
||||
processingImages_(false),
|
||||
validDecimationValue_(1),
|
||||
validDecimationValue_(2),
|
||||
parameters_(parameters)
|
||||
{
|
||||
qRegisterMetaType<rtabmap::SensorData>("rtabmap::SensorData");
|
||||
@@ -68,7 +68,7 @@ CameraViewer::CameraViewer(QWidget * parent, const ParametersMap & parameters) :
|
||||
decimationSpin_ = new QSpinBox(this);
|
||||
decimationSpin_->setMinimum(1);
|
||||
decimationSpin_->setMaximum(16);
|
||||
decimationSpin_->setValue(1);
|
||||
decimationSpin_->setValue(2);
|
||||
|
||||
pause_ = new QPushButton("Pause", this);
|
||||
pause_->setCheckable(true);
|
||||
|
||||
@@ -527,6 +527,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
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_k4w2Format, SIGNAL(currentIndexChanged(int)), 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()));
|
||||
@@ -1519,13 +1520,14 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->openni2_stampsIdsUsed->setChecked(false);
|
||||
_ui->openni2_hshift->setValue(0);
|
||||
_ui->openni2_vshift->setValue(0);
|
||||
_ui->comboBox_freenect2Format->setCurrentIndex(0);
|
||||
_ui->comboBox_freenect2Format->setCurrentIndex(1);
|
||||
_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_freenect2Pipeline->setText("");
|
||||
_ui->comboBox_k4w2Format->setCurrentIndex(1);
|
||||
_ui->comboBox_realsensePresetRGB->setCurrentIndex(0);
|
||||
_ui->comboBox_realsensePresetDepth->setCurrentIndex(2);
|
||||
_ui->checkbox_realsenseOdom->setChecked(false);
|
||||
@@ -1903,6 +1905,10 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
_ui->lineEdit_freenect2Pipeline->setText(settings.value("pipeline", _ui->lineEdit_freenect2Pipeline->text()).toString());
|
||||
settings.endGroup(); // Freenect2
|
||||
|
||||
settings.beginGroup("K4W2");
|
||||
_ui->comboBox_k4w2Format->setCurrentIndex(settings.value("format", _ui->comboBox_k4w2Format->currentIndex()).toInt());
|
||||
settings.endGroup(); // K4W2
|
||||
|
||||
settings.beginGroup("RealSense");
|
||||
_ui->comboBox_realsensePresetRGB->setCurrentIndex(settings.value("presetRGB", _ui->comboBox_realsensePresetRGB->currentIndex()).toInt());
|
||||
_ui->comboBox_realsensePresetDepth->setCurrentIndex(settings.value("presetDepth", _ui->comboBox_realsensePresetDepth->currentIndex()).toInt());
|
||||
@@ -2301,6 +2307,10 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
settings.setValue("pipeline", _ui->lineEdit_freenect2Pipeline->text());
|
||||
settings.endGroup(); // Freenect2
|
||||
|
||||
settings.beginGroup("K4W2");
|
||||
settings.setValue("format", _ui->comboBox_k4w2Format->currentIndex());
|
||||
settings.endGroup(); // K4W2
|
||||
|
||||
settings.beginGroup("RealSense");
|
||||
settings.setValue("presetRGB", _ui->comboBox_realsensePresetRGB->currentIndex());
|
||||
settings.setValue("presetDepth", _ui->comboBox_realsensePresetDepth->currentIndex());
|
||||
@@ -4138,6 +4148,7 @@ void PreferencesDialog::updateSourceGrpVisibility()
|
||||
_ui->comboBox_cameraRGBD->currentIndex() == kSrcOpenNI_PCL-kSrcRGBD));
|
||||
_ui->groupBox_openni2->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcOpenNI2-kSrcRGBD);
|
||||
_ui->groupBox_freenect2->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcFreenect2-kSrcRGBD);
|
||||
_ui->groupBox_k4w2->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcK4W2 - kSrcRGBD);
|
||||
_ui->groupBox_realsense->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcRealSense - kSrcRGBD);
|
||||
_ui->groupBox_cameraRGBDImages->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcRGBDImages-kSrcRGBD);
|
||||
_ui->groupBox_openni->setVisible(_ui->comboBox_sourceType->currentIndex() == 0 && _ui->comboBox_cameraRGBD->currentIndex() == kSrcOpenNI_PCL-kSrcRGBD);
|
||||
@@ -4768,6 +4779,7 @@ Camera * PreferencesDialog::createCamera(bool useRawImages, bool useColor)
|
||||
{
|
||||
camera = new CameraK4W2(
|
||||
this->getSourceDevice().isEmpty() ? 0 : atoi(this->getSourceDevice().toStdString().c_str()),
|
||||
(CameraK4W2::Type)_ui->comboBox_k4w2Format->currentIndex(),
|
||||
this->getGeneralInputRate(),
|
||||
this->getSourceLocalTransform());
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-174</y>
|
||||
<y>-292</y>
|
||||
<width>677</width>
|
||||
<height>2682</height>
|
||||
</rect>
|
||||
@@ -2865,7 +2865,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>8</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_32">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_63">
|
||||
@@ -3640,7 +3640,70 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_72">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_127">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_127" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_k4w2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Kinect for Windows SDK v2</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_96" columnstretch="0,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboBox_k4w2Format">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Color to Depth SD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Depth to Color SD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Registered Depth to Color HD</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_440">
|
||||
<property name="text">
|
||||
<string>Format.</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_68">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_67">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user