Added bilateral filtering option. CloudViewer: lighting and edge visibility options.

This commit is contained in:
matlabbe
2016-11-03 17:04:31 -04:00
parent 70dbac10c7
commit a7971373a6
14 changed files with 593 additions and 28 deletions

View File

@@ -46,6 +46,7 @@ public:
timeImageDecimation(0.0f),
timeScanFromDepth(0.0f),
timeUndistortDepth(0.0f),
timeBilateralFiltering(0.0f),
timeTotal(0.0f),
odomCovariance(cv::Mat::eye(6,6,CV_64FC1))
{
@@ -61,6 +62,7 @@ public:
float timeImageDecimation;
float timeScanFromDepth;
float timeUndistortDepth;
float timeBilateralFiltering;
float timeTotal;
Transform odomPose;
cv::Mat odomCovariance;

View File

@@ -63,6 +63,8 @@ public:
void setStereoToDepth(bool enabled) {_stereoToDepth = enabled;}
void setImageRate(float imageRate);
void setDistortionModel(const std::string & path);
void enableBilateralFiltering(float sigmaS, float sigmaR);
void disableBilateralFiltering() {_bilateralFiltering = false;}
void setScanFromDepth(
bool enabled,
@@ -102,6 +104,9 @@ private:
int _scanNormalsK;
StereoDense * _stereoDense;
clams::DiscreteDepthDistortionModel * _distortionModel;
bool _bilateralFiltering;
float _bilateralSigmaS;
float _bilateralSigmaR;
};
} // namespace rtabmap

View File

@@ -136,6 +136,12 @@ void RTABMAP_EXP fillRegisteredDepthHoles(
bool horizontal,
bool fillDoubleHoles = false);
cv::Mat RTABMAP_EXP fastBilateralFiltering(
const cv::Mat & depth,
float sigmaS = 15.0f,
float sigmaR = 0.05f,
bool earlyDivision = false);
} // namespace util3d
} // namespace rtabmap