CameraThread: Added stereo to depth option. Added parameter "Mem/SaveDepth16Format".

This commit is contained in:
matlabbe
2015-08-27 17:16:12 -04:00
parent 0651d5dfbd
commit ce2bbd8feb
16 changed files with 343 additions and 230 deletions

View File

@@ -41,7 +41,8 @@ namespace util2d
cv::Mat RTABMAP_EXP disparityFromStereoImages(
const cv::Mat & leftImage,
const cv::Mat & rightImage);
const cv::Mat & rightImage,
int type = CV_32FC1); // CV_32FC1 or CV_16SC1
cv::Mat RTABMAP_EXP disparityFromStereoImages(
const cv::Mat & leftImage,
@@ -53,6 +54,10 @@ cv::Mat RTABMAP_EXP disparityFromStereoImages(
double flowEps = 0.02,
float maxCorrespondencesSlope = 0.1f);
cv::Mat RTABMAP_EXP depthFromDisparity(const cv::Mat & disparity,
float fx, float baseline,
int type = CV_32FC1); // CV_32FC1 or CV_16UC1
cv::Mat RTABMAP_EXP depthFromStereoImages(
const cv::Mat & leftImage,
const cv::Mat & rightImage,
@@ -78,6 +83,9 @@ cv::Mat RTABMAP_EXP depthFromStereoCorrespondences(
const std::vector<unsigned char> & mask,
float fx, float baseline);
cv::Mat RTABMAP_EXP cvtDepthFromFloat(const cv::Mat & depth32F);
cv::Mat RTABMAP_EXP cvtDepthToFloat(const cv::Mat & depth16U);
float RTABMAP_EXP getDepth(
const cv::Mat & depthImage,
float x, float y,