mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Memory: added some warnings about pre-postdecimation parameters, updated their description (removed negative decimation comment)
This commit is contained in:
@@ -216,8 +216,8 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(Mem, BadSignaturesIgnored, bool, false, "Bad signatures are ignored.");
|
RTABMAP_PARAM(Mem, BadSignaturesIgnored, bool, false, "Bad signatures are ignored.");
|
||||||
RTABMAP_PARAM(Mem, InitWMWithAllNodes, bool, false, "Initialize the Working Memory with all nodes in Long-Term Memory. When false, it is initialized with nodes of the previous session.");
|
RTABMAP_PARAM(Mem, InitWMWithAllNodes, bool, false, "Initialize the Working Memory with all nodes in Long-Term Memory. When false, it is initialized with nodes of the previous session.");
|
||||||
RTABMAP_PARAM(Mem, DepthAsMask, bool, true, "Use depth image as mask when extracting features for vocabulary.");
|
RTABMAP_PARAM(Mem, DepthAsMask, bool, true, "Use depth image as mask when extracting features for vocabulary.");
|
||||||
RTABMAP_PARAM(Mem, ImagePreDecimation, int, 1, "Image decimation (>=1) before features extraction. Negative decimation is done from RGB size instead of depth size (if depth is smaller than RGB, it may be interpolated depending of the decimation value).");
|
RTABMAP_PARAM(Mem, ImagePreDecimation, int, 1, "Image decimation (>=1) before features extraction.");
|
||||||
RTABMAP_PARAM(Mem, ImagePostDecimation, int, 1, "Image decimation (>=1) of saved data in created signatures (after features extraction). Decimation is done from the original image. Negative decimation is done from RGB size instead of depth size (if depth is smaller than RGB, it may be interpolated depending of the decimation value).");
|
RTABMAP_PARAM(Mem, ImagePostDecimation, int, 1, "Image decimation (>=1) of saved data in created signatures (after features extraction). Decimation is done from the original image.");
|
||||||
RTABMAP_PARAM(Mem, CompressionParallelized, bool, true, "Compression of sensor data is multi-threaded.");
|
RTABMAP_PARAM(Mem, CompressionParallelized, bool, true, "Compression of sensor data is multi-threaded.");
|
||||||
RTABMAP_PARAM(Mem, LaserScanDownsampleStepSize, int, 1, "If > 1, downsample the laser scans when creating a signature.");
|
RTABMAP_PARAM(Mem, LaserScanDownsampleStepSize, int, 1, "If > 1, downsample the laser scans when creating a signature.");
|
||||||
RTABMAP_PARAM(Mem, LaserScanVoxelSize, float, 0.0, uFormat("If > 0 m, voxel filtering is done on laser scans when creating a signature. If the laser scan had normals, they will be removed. To recompute the normals, make sure to use \"%s\" or \"%s\" parameters.", kMemLaserScanNormalK().c_str(), kMemLaserScanNormalRadius().c_str()));
|
RTABMAP_PARAM(Mem, LaserScanVoxelSize, float, 0.0, uFormat("If > 0 m, voxel filtering is done on laser scans when creating a signature. If the laser scan had normals, they will be removed. To recompute the normals, make sure to use \"%s\" or \"%s\" parameters.", kMemLaserScanNormalK().c_str(), kMemLaserScanNormalRadius().c_str()));
|
||||||
|
|||||||
@@ -3998,8 +3998,9 @@ Signature * Memory::createSignature(const SensorData & inputData, const Transfor
|
|||||||
data.depthOrRightRaw().type() == CV_8UC1)
|
data.depthOrRightRaw().type() == CV_8UC1)
|
||||||
&&
|
&&
|
||||||
( (data.imageRaw().empty() && data.depthOrRightRaw().type() != CV_8UC1) ||
|
( (data.imageRaw().empty() && data.depthOrRightRaw().type() != CV_8UC1) ||
|
||||||
(data.imageRaw().rows % data.depthOrRightRaw().rows == 0 && data.imageRaw().cols % data.depthOrRightRaw().cols == 0))),
|
(data.imageRaw().rows % data.depthOrRightRaw().rows == 0 && data.imageRaw().cols % data.depthOrRightRaw().cols == 0 &&
|
||||||
uFormat("image=(%d/%d) depth=(%d/%d, type=%d [accepted=%d,%d,%d])",
|
data.depthOrRightRaw().rows <= data.imageRaw().rows && data.depthOrRightRaw().cols <= data.imageRaw().cols))),
|
||||||
|
uFormat("image=(%d/%d) depth=(%d/%d, type=%d [accepted=%d,%d,%d]) RGB should be",
|
||||||
data.imageRaw().cols,
|
data.imageRaw().cols,
|
||||||
data.imageRaw().rows,
|
data.imageRaw().rows,
|
||||||
data.depthOrRightRaw().cols,
|
data.depthOrRightRaw().cols,
|
||||||
@@ -4219,6 +4220,14 @@ Signature * Memory::createSignature(const SensorData & inputData, const Transfor
|
|||||||
{
|
{
|
||||||
depthMask = util2d::interpolate(decimatedData.depthRaw(), imageMono.rows/decimatedData.depthRaw().rows, 0.1f);
|
depthMask = util2d::interpolate(decimatedData.depthRaw(), imageMono.rows/decimatedData.depthRaw().rows, 0.1f);
|
||||||
}
|
}
|
||||||
|
else if(_imagePreDecimation > 1)
|
||||||
|
{
|
||||||
|
UWARN("%s=%d is not compatible between RGB and depth images, the depth mask cannot be used! (decimated RGB=%dx%d, depth=%dx%d)",
|
||||||
|
Parameters::kMemImagePreDecimation().c_str(),
|
||||||
|
_imagePreDecimation,
|
||||||
|
imageMono.cols, imageMono.rows,
|
||||||
|
decimatedData.depthRaw().cols, decimatedData.depthRaw().rows);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int oldMaxFeatures = _feature2D->getMaxFeatures();
|
int oldMaxFeatures = _feature2D->getMaxFeatures();
|
||||||
@@ -4610,7 +4619,7 @@ Signature * Memory::createSignature(const SensorData & inputData, const Transfor
|
|||||||
}
|
}
|
||||||
|
|
||||||
Landmarks landmarks = data.landmarks();
|
Landmarks landmarks = data.landmarks();
|
||||||
if(_detectMarkers && !isIntermediateNode)
|
if(_detectMarkers && !isIntermediateNode && !data.imageRaw().empty())
|
||||||
{
|
{
|
||||||
UDEBUG("Detecting markers...");
|
UDEBUG("Detecting markers...");
|
||||||
if(landmarks.empty())
|
if(landmarks.empty())
|
||||||
@@ -4692,6 +4701,13 @@ Signature * Memory::createSignature(const SensorData & inputData, const Transfor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!image.empty() && (depthOrRightImage.cols > image.cols || depthOrRightImage.rows > image.rows))
|
||||||
|
{
|
||||||
|
UWARN("Depth image is bigger than RGB image after post decimation, %s=%d is too high! RGB=%dx%d, depth=%dx%d",
|
||||||
|
Parameters::kMemImagePostDecimation().c_str(), _imagePostDecimation,
|
||||||
|
image.cols, image.rows, depthOrRightImage.cols, depthOrRightImage.rows);
|
||||||
|
}
|
||||||
|
|
||||||
t = timer.ticks();
|
t = timer.ticks();
|
||||||
if(stats) stats->addStatistic(Statistics::kTimingMemPost_decimation(), t*1000.0f);
|
if(stats) stats->addStatistic(Statistics::kTimingMemPost_decimation(), t*1000.0f);
|
||||||
UDEBUG("time post-decimation = %fs", t);
|
UDEBUG("time post-decimation = %fs", t);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-132</y>
|
||||||
<width>681</width>
|
<width>681</width>
|
||||||
<height>3071</height>
|
<height>3071</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>21</number>
|
<number>8</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">
|
||||||
@@ -7515,7 +7515,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
|||||||
<item row="14" column="0">
|
<item row="14" column="0">
|
||||||
<widget class="QSpinBox" name="spinBox_imagePreDecimation">
|
<widget class="QSpinBox" name="spinBox_imagePreDecimation">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-16</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>16</number>
|
<number>16</number>
|
||||||
@@ -7525,7 +7525,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
|||||||
<item row="15" column="0">
|
<item row="15" column="0">
|
||||||
<widget class="QSpinBox" name="spinBox_imagePostDecimation">
|
<widget class="QSpinBox" name="spinBox_imagePostDecimation">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-16</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>16</number>
|
<number>16</number>
|
||||||
@@ -7708,7 +7708,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
|||||||
<item row="14" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QLabel" name="label_retrieved_13">
|
<widget class="QLabel" name="label_retrieved_13">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image pre decimation. This option can be used to reduce image size before features extraction. Negative decimation is done from RGB size instead of depth size (if depth is smaller than RGB, it may be interpolated depending of the decimation value).</string>
|
<string>Image pre decimation. This option can be used to reduce image size before features extraction.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -7826,7 +7826,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
|||||||
<item row="15" column="1">
|
<item row="15" column="1">
|
||||||
<widget class="QLabel" name="label_retrieved_6">
|
<widget class="QLabel" name="label_retrieved_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image post decimation. This option can be used to save images in lower resolution (size/decimation). It is done on the original image. Negative decimation is done from RGB size instead of depth size (if depth is smaller than RGB, it may be interpolated depending of the decimation value).</string>
|
<string>Image post decimation. This option can be used to save images in lower resolution (size/decimation). It is done on the original image.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|||||||
Reference in New Issue
Block a user