mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Reverted change of cloudFromStereoImages() decimation, should be done after StereoBM to avoid backward compatibility problems
This commit is contained in:
@@ -129,7 +129,7 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_EXP cloudFromStereoImages(
|
||||
const cv::Mat & imageLeft,
|
||||
const cv::Mat & imageRight,
|
||||
const StereoCameraModel & model,
|
||||
float decimation = 1.0f,
|
||||
int decimation = 1,
|
||||
float maxDepth = 0.0f,
|
||||
float minDepth = 0.0f,
|
||||
std::vector<int> * validIndices = 0,
|
||||
|
||||
@@ -759,7 +759,7 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudFromStereoImages(
|
||||
const cv::Mat & imageLeft,
|
||||
const cv::Mat & imageRight,
|
||||
const StereoCameraModel & model,
|
||||
float decimation,
|
||||
int decimation,
|
||||
float maxDepth,
|
||||
float minDepth,
|
||||
std::vector<int> * validIndices,
|
||||
@@ -775,19 +775,6 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudFromStereoImages(
|
||||
cv::Mat leftColor = imageLeft;
|
||||
cv::Mat rightMono = imageRight;
|
||||
|
||||
StereoCameraModel modelDecimation = model;
|
||||
|
||||
if(decimation>1.0f)
|
||||
{
|
||||
cv::Mat resized;
|
||||
cv::resize(leftColor, resized, cv::Size(), 1.0f/decimation, 1.0f/decimation, cv::INTER_AREA);
|
||||
leftColor = resized;
|
||||
resized = cv::Mat();
|
||||
cv::resize(rightMono, resized, cv::Size(), 1.0f/decimation, 1.0f/decimation, cv::INTER_AREA);
|
||||
rightMono = resized;
|
||||
modelDecimation.scale(1/float(decimation));
|
||||
}
|
||||
|
||||
cv::Mat leftMono;
|
||||
if(leftColor.channels() == 3)
|
||||
{
|
||||
@@ -801,8 +788,8 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudFromStereoImages(
|
||||
return cloudFromDisparityRGB(
|
||||
leftColor,
|
||||
util2d::disparityFromStereoImages(leftMono, rightMono, parameters),
|
||||
modelDecimation,
|
||||
1,
|
||||
model,
|
||||
decimation,
|
||||
maxDepth,
|
||||
minDepth,
|
||||
validIndices);
|
||||
|
||||
Reference in New Issue
Block a user