mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Source depth from scan: filling holes is now optional (though still true by default)
This commit is contained in:
@@ -99,10 +99,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDepthFromScan(bool enabled, bool fillHolesVertical = true, bool fillHolesFromBorder = false)
|
void setDepthFromScan(bool enabled, int fillHoles = 1, bool fillHolesFromBorder = false)
|
||||||
{
|
{
|
||||||
_depthFromScan = enabled;
|
_depthFromScan = enabled;
|
||||||
_depthFromScanFillHolesVertical = fillHolesVertical;
|
_depthFromScanFillHoles = fillHoles;
|
||||||
_depthFromScanFillHolesFromBorder = fillHolesFromBorder;
|
_depthFromScanFillHolesFromBorder = fillHolesFromBorder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
int _scanNormalsK;
|
int _scanNormalsK;
|
||||||
|
|
||||||
bool _depthFromScan;
|
bool _depthFromScan;
|
||||||
bool _depthFromScanFillHolesVertical;
|
int _depthFromScanFillHoles; // <0:horizontal 0:disabled >0:vertical
|
||||||
bool _depthFromScanFillHolesFromBorder;
|
bool _depthFromScanFillHolesFromBorder;
|
||||||
|
|
||||||
bool _filenamesAreTimestamps;
|
bool _filenamesAreTimestamps;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(Mem, RehearsalSimilarity, float, 0.6, "Rehearsal similarity.");
|
RTABMAP_PARAM(Mem, RehearsalSimilarity, float, 0.6, "Rehearsal similarity.");
|
||||||
RTABMAP_PARAM(Mem, ImageKept, bool, false, "Keep raw images in RAM.");
|
RTABMAP_PARAM(Mem, ImageKept, bool, false, "Keep raw images in RAM.");
|
||||||
RTABMAP_PARAM(Mem, BinDataKept, bool, true, "Keep binary data in db.");
|
RTABMAP_PARAM(Mem, BinDataKept, bool, true, "Keep binary data in db.");
|
||||||
RTABMAP_PARAM(Mem, RawDescriptorsKept, bool, false, "Raw descriptors kept in memory.");
|
RTABMAP_PARAM(Mem, RawDescriptorsKept, bool, true, "Raw descriptors kept in memory.");
|
||||||
RTABMAP_PARAM(Mem, MapLabelsAdded, bool, true, "Create map labels. The first node of a map will be labelled as \"map#\" where # is the map ID.");
|
RTABMAP_PARAM(Mem, MapLabelsAdded, bool, true, "Create map labels. The first node of a map will be labelled as \"map#\" where # is the map ID.");
|
||||||
RTABMAP_PARAM(Mem, SaveDepth16Format, bool, true, "Save depth image into 16 bits format to reduce memory used. Warning: values over ~65 meters are ignored (maximum 65535 millimeters).");
|
RTABMAP_PARAM(Mem, SaveDepth16Format, bool, true, "Save depth image into 16 bits format to reduce memory used. Warning: values over ~65 meters are ignored (maximum 65535 millimeters).");
|
||||||
RTABMAP_PARAM(Mem, NotLinkedNodesKept, bool, true, "Keep not linked nodes in db (rehearsed nodes and deleted nodes).");
|
RTABMAP_PARAM(Mem, NotLinkedNodesKept, bool, true, "Keep not linked nodes in db (rehearsed nodes and deleted nodes).");
|
||||||
@@ -317,7 +317,7 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(RGBD, LocalImmunizationRatio, float, 0.25, "Ratio of working memory for which local nodes are immunized from transfer.");
|
RTABMAP_PARAM(RGBD, LocalImmunizationRatio, float, 0.25, "Ratio of working memory for which local nodes are immunized from transfer.");
|
||||||
RTABMAP_PARAM(RGBD, ScanMatchingIdsSavedInLinks, bool, true, "Save scan matching IDs in link's user data.");
|
RTABMAP_PARAM(RGBD, ScanMatchingIdsSavedInLinks, bool, true, "Save scan matching IDs in link's user data.");
|
||||||
RTABMAP_PARAM(RGBD, NeighborLinkRefining, bool, false, "When a new node is added to the graph, the transformation of its neighbor link to the previous node is refined using ICP (laser scans required!).");
|
RTABMAP_PARAM(RGBD, NeighborLinkRefining, bool, false, "When a new node is added to the graph, the transformation of its neighbor link to the previous node is refined using ICP (laser scans required!).");
|
||||||
RTABMAP_PARAM(RGBD, LoopClosureReextractFeatures, bool, true, "Extract features even if there are some already in the nodes.");
|
RTABMAP_PARAM(RGBD, LoopClosureReextractFeatures, bool, false, "Extract features even if there are some already in the nodes.");
|
||||||
|
|
||||||
// Local/Proximity loop closure detection
|
// Local/Proximity loop closure detection
|
||||||
RTABMAP_PARAM(RGBD, ProximityByTime, bool, false, "Detection over all locations in STM.");
|
RTABMAP_PARAM(RGBD, ProximityByTime, bool, false, "Detection over all locations in STM.");
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ CameraImages::CameraImages() :
|
|||||||
_scanVoxelSize(0.0f),
|
_scanVoxelSize(0.0f),
|
||||||
_scanNormalsK(0),
|
_scanNormalsK(0),
|
||||||
_depthFromScan(false),
|
_depthFromScan(false),
|
||||||
_depthFromScanFillHolesVertical(true),
|
_depthFromScanFillHoles(1),
|
||||||
_depthFromScanFillHolesFromBorder(false),
|
_depthFromScanFillHolesFromBorder(false),
|
||||||
_filenamesAreTimestamps(false),
|
_filenamesAreTimestamps(false),
|
||||||
syncImageRateWithStamps_(true),
|
syncImageRateWithStamps_(true),
|
||||||
@@ -95,7 +95,7 @@ CameraImages::CameraImages(const std::string & path,
|
|||||||
_scanVoxelSize(0.0f),
|
_scanVoxelSize(0.0f),
|
||||||
_scanNormalsK(0),
|
_scanNormalsK(0),
|
||||||
_depthFromScan(false),
|
_depthFromScan(false),
|
||||||
_depthFromScanFillHolesVertical(true),
|
_depthFromScanFillHoles(1),
|
||||||
_depthFromScanFillHolesFromBorder(false),
|
_depthFromScanFillHolesFromBorder(false),
|
||||||
_filenamesAreTimestamps(false),
|
_filenamesAreTimestamps(false),
|
||||||
syncImageRateWithStamps_(true),
|
syncImageRateWithStamps_(true),
|
||||||
@@ -640,7 +640,10 @@ SensorData CameraImages::captureImage()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
depthFromScan = util3d::projectCloudToCamera(img.size(), _model.K(), cloud, _model.localTransform());
|
depthFromScan = util3d::projectCloudToCamera(img.size(), _model.K(), cloud, _model.localTransform());
|
||||||
util3d::fillProjectedCloudHoles(depthFromScan, _depthFromScanFillHolesVertical, _depthFromScanFillHolesFromBorder);
|
if(_depthFromScanFillHoles!=0)
|
||||||
|
{
|
||||||
|
util3d::fillProjectedCloudHoles(depthFromScan, _depthFromScanFillHoles>0, _depthFromScanFillHolesFromBorder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// filter the scan after registration
|
// filter the scan after registration
|
||||||
|
|||||||
@@ -440,7 +440,9 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
connect(_ui->lineEdit_cameraImages_gt, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
connect(_ui->lineEdit_cameraImages_gt, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
connect(_ui->comboBox_cameraImages_gtFormat, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
connect(_ui->comboBox_cameraImages_gtFormat, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
connect(_ui->groupBox_depthFromScan, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
|
connect(_ui->groupBox_depthFromScan, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
connect(_ui->checkBox_depthFromScan_vertical, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
connect(_ui->groupBox_depthFromScan_fillHoles, SIGNAL(toggled(bool)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
|
connect(_ui->radioButton_depthFromScan_vertical, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
|
connect(_ui->radioButton_depthFromScan_horizontal, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
connect(_ui->checkBox_depthFromScan_fillBorders, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
connect(_ui->checkBox_depthFromScan_fillBorders, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||||
|
|
||||||
connect(_ui->toolButton_cameraStereoImages_path_left, SIGNAL(clicked()), this, SLOT(selectSourceStereoImagesPathLeft()));
|
connect(_ui->toolButton_cameraStereoImages_path_left, SIGNAL(clicked()), this, SLOT(selectSourceStereoImagesPathLeft()));
|
||||||
@@ -1278,7 +1280,9 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
|||||||
_ui->spinBox_cameraImages_scanNormalsK->setValue(0);
|
_ui->spinBox_cameraImages_scanNormalsK->setValue(0);
|
||||||
|
|
||||||
_ui->groupBox_depthFromScan->setChecked(false);
|
_ui->groupBox_depthFromScan->setChecked(false);
|
||||||
_ui->checkBox_depthFromScan_vertical->setChecked(true);
|
_ui->groupBox_depthFromScan_fillHoles->setChecked(true);
|
||||||
|
_ui->radioButton_depthFromScan_vertical->setChecked(true);
|
||||||
|
_ui->radioButton_depthFromScan_horizontal->setChecked(false);
|
||||||
_ui->checkBox_depthFromScan_fillBorders->setChecked(false);
|
_ui->checkBox_depthFromScan_fillBorders->setChecked(false);
|
||||||
}
|
}
|
||||||
else if(groupBox->objectName() == _ui->groupBox_rtabmap_basic0->objectName())
|
else if(groupBox->objectName() == _ui->groupBox_rtabmap_basic0->objectName())
|
||||||
@@ -1614,7 +1618,9 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
|||||||
|
|
||||||
settings.beginGroup("DepthFromScan");
|
settings.beginGroup("DepthFromScan");
|
||||||
_ui->groupBox_depthFromScan->setChecked(settings.value("depthFromScan", _ui->groupBox_depthFromScan->isChecked()).toBool());
|
_ui->groupBox_depthFromScan->setChecked(settings.value("depthFromScan", _ui->groupBox_depthFromScan->isChecked()).toBool());
|
||||||
_ui->checkBox_depthFromScan_vertical->setChecked(settings.value("depthFromScanVertical", _ui->checkBox_depthFromScan_vertical->isChecked()).toBool());
|
_ui->groupBox_depthFromScan_fillHoles->setChecked(settings.value("depthFromScanFillHoles", _ui->groupBox_depthFromScan_fillHoles->isChecked()).toBool());
|
||||||
|
_ui->radioButton_depthFromScan_vertical->setChecked(settings.value("depthFromScanVertical", _ui->radioButton_depthFromScan_vertical->isChecked()).toBool());
|
||||||
|
_ui->radioButton_depthFromScan_horizontal->setChecked(settings.value("depthFromScanHorizontal", _ui->radioButton_depthFromScan_horizontal->isChecked()).toBool());
|
||||||
_ui->checkBox_depthFromScan_fillBorders->setChecked(settings.value("depthFromScanFillBorders", _ui->checkBox_depthFromScan_fillBorders->isChecked()).toBool());
|
_ui->checkBox_depthFromScan_fillBorders->setChecked(settings.value("depthFromScanFillBorders", _ui->checkBox_depthFromScan_fillBorders->isChecked()).toBool());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
@@ -1994,7 +2000,9 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
|||||||
|
|
||||||
settings.beginGroup("DepthFromScan");
|
settings.beginGroup("DepthFromScan");
|
||||||
settings.setValue("depthFromScan", _ui->groupBox_depthFromScan->isChecked());
|
settings.setValue("depthFromScan", _ui->groupBox_depthFromScan->isChecked());
|
||||||
settings.setValue("depthFromScanVertical", _ui->checkBox_depthFromScan_vertical->isChecked());
|
settings.setValue("depthFromScanFillHoles", _ui->groupBox_depthFromScan_fillHoles->isChecked());
|
||||||
|
settings.setValue("depthFromScanVertical", _ui->radioButton_depthFromScan_vertical->isChecked());
|
||||||
|
settings.setValue("depthFromScanHorizontal", _ui->radioButton_depthFromScan_horizontal->isChecked());
|
||||||
settings.setValue("depthFromScanFillBorders", _ui->checkBox_depthFromScan_fillBorders->isChecked());
|
settings.setValue("depthFromScanFillBorders", _ui->checkBox_depthFromScan_fillBorders->isChecked());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
@@ -3980,7 +3988,7 @@ Camera * PreferencesDialog::createCamera(bool useRawImages)
|
|||||||
this->getLaserLocalTransform());
|
this->getLaserLocalTransform());
|
||||||
((CameraImages*)camera)->setDepthFromScan(
|
((CameraImages*)camera)->setDepthFromScan(
|
||||||
_ui->groupBox_depthFromScan->isChecked(),
|
_ui->groupBox_depthFromScan->isChecked(),
|
||||||
_ui->checkBox_depthFromScan_vertical->isChecked(),
|
!_ui->groupBox_depthFromScan_fillHoles->isChecked()?0:_ui->radioButton_depthFromScan_vertical->isChecked()?1:-1,
|
||||||
_ui->checkBox_depthFromScan_fillBorders->isChecked());
|
_ui->checkBox_depthFromScan_fillBorders->isChecked());
|
||||||
((CameraImages*)camera)->setTimestamps(
|
((CameraImages*)camera)->setTimestamps(
|
||||||
_ui->checkBox_cameraImages_timestamps->isChecked(),
|
_ui->checkBox_cameraImages_timestamps->isChecked(),
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-1161</y>
|
||||||
<width>681</width>
|
<width>681</width>
|
||||||
<height>2010</height>
|
<height>2010</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>7</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_22">
|
<widget class="QWidget" name="page_22">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
||||||
@@ -3666,45 +3666,41 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
|||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_67" columnstretch="0,1">
|
<layout class="QVBoxLayout" name="verticalLayout_100">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_depthFromScan_vertical">
|
<widget class="QGroupBox" name="groupBox_depthFromScan_fillHoles">
|
||||||
<property name="text">
|
<property name="title">
|
||||||
<string/>
|
<string>Interpolate depth values to fill holes</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="checkable">
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="label_305">
|
|
||||||
<property name="text">
|
|
||||||
<string>Fill holes vertically, otherwise fill horizontally.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<layout class="QVBoxLayout" name="verticalLayout_99">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
<item>
|
||||||
</property>
|
<widget class="QRadioButton" name="radioButton_depthFromScan_vertical">
|
||||||
|
<property name="text">
|
||||||
|
<string>Vertically</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_depthFromScan_horizontal">
|
||||||
|
<property name="text">
|
||||||
|
<string>Horizontally</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_depthFromScan_fillBorders">
|
<widget class="QCheckBox" name="checkBox_depthFromScan_fillBorders">
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="label_306">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Fill holes from the image border.</string>
|
<string>Fill holes from the image border.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user