mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-10 21:40:19 +08:00
0.15.1: CameraImages: added ground truth time diff, fixed memory leak when loading binary scans. CameraRGBDImages and CameraStereoImages: fixed start id. Feature2D: added grid rows and cols parameters (Kp/GridRows, Kp/GridCols, Vis/GridRows, Vis/GridCols). OdomInfo: publish bundle frames. OdometryORBSLAM2: added OdomORBSLAM2/Fps and OdomORBSLAM2/MaxFeatures parameters. Registration: added Reg/RepeatOnce parameter and removed variance normalization. For util2d::getDepth() and util3d::projectDepthTo3D(), maxZError parameter is now depthErrorRatio to be dependent of the sensor range. Database: save image width and height from stereo calibration. OptimizerG2O: fixed SBA optimization when using g2o built from ORBSLAM2 library. OptimizerGTSAM: to increase optimization stability, all rotations in information matrix are divided by 100000. Added rtabmap-report tool.
This commit is contained in:
+12
-5
@@ -942,7 +942,7 @@ float getDepth(
|
||||
const cv::Mat & depthImage,
|
||||
float x, float y,
|
||||
bool smoothing,
|
||||
float maxZError,
|
||||
float depthErrorRatio,
|
||||
bool estWithNeighborsIfNull)
|
||||
{
|
||||
UASSERT(!depthImage.empty());
|
||||
@@ -1024,10 +1024,15 @@ float getDepth(
|
||||
tmp = d;
|
||||
++count;
|
||||
}
|
||||
else if(fabs(d - tmp/float(count)) < maxZError)
|
||||
else
|
||||
{
|
||||
tmp += d;
|
||||
++count;
|
||||
float depthError = depthErrorRatio * tmp;
|
||||
if(fabs(d - tmp/float(count)) < depthError)
|
||||
|
||||
{
|
||||
tmp += d;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1065,8 +1070,10 @@ float getDepth(
|
||||
d = depthImage.at<float>(vv,uu);
|
||||
}
|
||||
|
||||
float depthError = depthErrorRatio * depth;
|
||||
|
||||
// ignore if not valid or depth difference is too high
|
||||
if(d != 0.0f && uIsFinite(d) && fabs(d - depth) < maxZError)
|
||||
if(d != 0.0f && uIsFinite(d) && fabs(d - depth) < depthError)
|
||||
{
|
||||
if(uu == u || vv == v)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user