mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Add RGBD mode for OAK camera (#1179)
* update depthai params * add color+depth mode * workarounds to avoid performance issues
This commit is contained in:
@@ -804,8 +804,9 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->spinBox_stereoMyntEye_irControl, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
|
||||
connect(_ui->comboBox_depthai_resolution, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_depthai_depth, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_depthai_confidence, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->comboBox_depthai_output_mode, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_depthai_conf_threshold, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_depthai_lrc_threshold, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_depthai_use_spec_translation, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_depthai_alpha_scaling, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_depthai_imu_published, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
@@ -2142,8 +2143,9 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->spinBox_stereoMyntEye_contrast->setValue(116);
|
||||
_ui->spinBox_stereoMyntEye_irControl->setValue(0);
|
||||
_ui->comboBox_depthai_resolution->setCurrentIndex(1);
|
||||
_ui->checkBox_depthai_depth->setChecked(false);
|
||||
_ui->spinBox_depthai_confidence->setValue(200);
|
||||
_ui->comboBox_depthai_output_mode->setCurrentIndex(0);
|
||||
_ui->spinBox_depthai_conf_threshold->setValue(200);
|
||||
_ui->spinBox_depthai_lrc_threshold->setValue(5);
|
||||
_ui->checkBox_depthai_use_spec_translation->setChecked(false);
|
||||
_ui->doubleSpinBox_depthai_alpha_scaling->setValue(0.0);
|
||||
_ui->checkBox_depthai_imu_published->setChecked(true);
|
||||
@@ -2633,8 +2635,9 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
|
||||
settings.beginGroup("DepthAI");
|
||||
_ui->comboBox_depthai_resolution->setCurrentIndex(settings.value("resolution", _ui->comboBox_depthai_resolution->currentIndex()).toInt());
|
||||
_ui->checkBox_depthai_depth->setChecked(settings.value("depth", _ui->checkBox_depthai_depth->isChecked()).toBool());
|
||||
_ui->spinBox_depthai_confidence->setValue(settings.value("confidence", _ui->spinBox_depthai_confidence->value()).toInt());
|
||||
_ui->comboBox_depthai_output_mode->setCurrentIndex(settings.value("output_mode", _ui->comboBox_depthai_output_mode->currentIndex()).toInt());
|
||||
_ui->spinBox_depthai_conf_threshold->setValue(settings.value("conf_threshold", _ui->spinBox_depthai_conf_threshold->value()).toInt());
|
||||
_ui->spinBox_depthai_lrc_threshold->setValue(settings.value("lrc_threshold", _ui->spinBox_depthai_lrc_threshold->value()).toInt());
|
||||
_ui->checkBox_depthai_use_spec_translation->setChecked(settings.value("use_spec_translation", _ui->checkBox_depthai_use_spec_translation->isChecked()).toBool());
|
||||
_ui->doubleSpinBox_depthai_alpha_scaling->setValue(settings.value("alpha_scaling", _ui->doubleSpinBox_depthai_alpha_scaling->value()).toDouble());
|
||||
_ui->checkBox_depthai_imu_published->setChecked(settings.value("imu_published", _ui->checkBox_depthai_imu_published->isChecked()).toBool());
|
||||
@@ -3167,8 +3170,9 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
|
||||
settings.beginGroup("DepthAI");
|
||||
settings.setValue("resolution", _ui->comboBox_depthai_resolution->currentIndex());
|
||||
settings.setValue("depth", _ui->checkBox_depthai_depth->isChecked());
|
||||
settings.setValue("confidence", _ui->spinBox_depthai_confidence->value());
|
||||
settings.setValue("output_mode", _ui->comboBox_depthai_output_mode->currentIndex());
|
||||
settings.setValue("conf_threshold", _ui->spinBox_depthai_conf_threshold->value());
|
||||
settings.setValue("lrc_threshold", _ui->spinBox_depthai_lrc_threshold->value());
|
||||
settings.setValue("use_spec_translation", _ui->checkBox_depthai_use_spec_translation->isChecked());
|
||||
settings.setValue("alpha_scaling", _ui->doubleSpinBox_depthai_alpha_scaling->value());
|
||||
settings.setValue("imu_published", _ui->checkBox_depthai_imu_published->isChecked());
|
||||
@@ -6486,13 +6490,11 @@ Camera * PreferencesDialog::createCamera(
|
||||
_ui->comboBox_depthai_resolution->currentIndex(),
|
||||
this->getGeneralInputRate(),
|
||||
this->getSourceLocalTransform());
|
||||
((CameraDepthAI*)camera)->setOutputDepth(_ui->checkBox_depthai_depth->isChecked(), _ui->spinBox_depthai_confidence->value());
|
||||
((CameraDepthAI*)camera)->setUseSpecTranslation(_ui->checkBox_depthai_use_spec_translation->isChecked());
|
||||
((CameraDepthAI*)camera)->setAlphaScaling(_ui->doubleSpinBox_depthai_alpha_scaling->value());
|
||||
((CameraDepthAI*)camera)->setIMUPublished(_ui->checkBox_depthai_imu_published->isChecked());
|
||||
((CameraDepthAI*)camera)->publishInterIMU(_ui->checkbox_publishInterIMU->isChecked());
|
||||
((CameraDepthAI*)camera)->setLaserDotBrightness(_ui->doubleSpinBox_depthai_laser_dot_brightness->value());
|
||||
((CameraDepthAI*)camera)->setFloodLightBrightness(_ui->doubleSpinBox_depthai_floodlight_brightness->value());
|
||||
((CameraDepthAI*)camera)->setOutputMode(_ui->comboBox_depthai_output_mode->currentIndex());
|
||||
((CameraDepthAI*)camera)->setDepthProfile(_ui->spinBox_depthai_conf_threshold->value(), _ui->spinBox_depthai_lrc_threshold->value());
|
||||
((CameraDepthAI*)camera)->setRectification(_ui->checkBox_depthai_use_spec_translation->isChecked(), _ui->doubleSpinBox_depthai_alpha_scaling->value());
|
||||
((CameraDepthAI*)camera)->setIMU(_ui->checkBox_depthai_imu_published->isChecked(), _ui->checkbox_publishInterIMU->isChecked());
|
||||
((CameraDepthAI*)camera)->setIrBrightness(_ui->doubleSpinBox_depthai_laser_dot_brightness->value(), _ui->doubleSpinBox_depthai_floodlight_brightness->value());
|
||||
((CameraDepthAI*)camera)->setDetectFeatures(_ui->comboBox_depthai_detect_features->currentIndex());
|
||||
((CameraDepthAI*)camera)->setBlobPath(_ui->lineEdit_depthai_blob_path->text().toStdString());
|
||||
if(_ui->comboBox_depthai_detect_features->currentIndex() == 1)
|
||||
|
||||
@@ -5905,7 +5905,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_depthai_alpha_scaling">
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
@@ -5924,7 +5924,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_627">
|
||||
<property name="text">
|
||||
<string>Depth confidence.</string>
|
||||
<string>Confidence threshold.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -5934,7 +5934,20 @@ 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="3" column="1">
|
||||
<widget class="QLabel" name="label_741">
|
||||
<property name="text">
|
||||
<string>Left-right check threshold.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_depthai_laser_dot_brightness">
|
||||
<property name="suffix">
|
||||
<string> mA</string>
|
||||
@@ -5947,14 +5960,14 @@ 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="checkBox_depthai_imu_published">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_677">
|
||||
<property name="text">
|
||||
<string>Floodlight brightness.</string>
|
||||
@@ -5967,7 +5980,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_676">
|
||||
<property name="text">
|
||||
<string>Laser dot brightness.</string>
|
||||
@@ -5980,7 +5993,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_646">
|
||||
<property name="text">
|
||||
<string>Use the translation information from the board design data (not the calibration data).</string>
|
||||
@@ -6007,13 +6020,31 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_depthai_depth">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<widget class="QComboBox" name="comboBox_depthai_output_mode">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Stereo</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Mono+Depth</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Color+Depth</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_678">
|
||||
<property name="text">
|
||||
<string>Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image). On some high distortion lenses, and/or due to rectification (image rotated) invalid areas may appear even with alpha=0, in these cases alpha < 0.0 helps removing invalid areas. If alpha is set to -1, old rectification policy is used.</string>
|
||||
@@ -6027,7 +6058,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_depthai_confidence">
|
||||
<widget class="QSpinBox" name="spinBox_depthai_conf_threshold">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -6039,7 +6070,20 @@ 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="3" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_depthai_lrc_threshold">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_650">
|
||||
<property name="text">
|
||||
<string>IMU published</string>
|
||||
@@ -6052,7 +6096,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_depthai_use_spec_translation">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -6062,7 +6106,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_625">
|
||||
<property name="text">
|
||||
<string>Output depth.</string>
|
||||
<string>Output mode.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -6072,7 +6116,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_depthai_floodlight_brightness">
|
||||
<property name="suffix">
|
||||
<string> mA</string>
|
||||
@@ -6085,7 +6129,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QComboBox" name="comboBox_depthai_detect_features">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
@@ -6110,7 +6154,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_679">
|
||||
<property name="text">
|
||||
<string>On-device feature detector.</string>
|
||||
@@ -6123,7 +6167,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_depthai_blob_path">
|
||||
@@ -6147,7 +6191,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="label_680">
|
||||
<property name="text">
|
||||
<string>Path to SuperPoint blob file.</string>
|
||||
|
||||
Reference in New Issue
Block a user