mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
fixed some not initialised variables
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1626 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -458,7 +458,7 @@ pcl::PointXYZ getDepth(
|
||||
else
|
||||
{
|
||||
// Interpolate x axis
|
||||
float depthX;
|
||||
float depthX = 0.0f;
|
||||
float first;
|
||||
float second;
|
||||
if(int(x) == int(x+0.5f))
|
||||
@@ -488,7 +488,7 @@ pcl::PointXYZ getDepth(
|
||||
else
|
||||
{
|
||||
// Interpolate y axis
|
||||
float depthY;
|
||||
float depthY = 0.0f;
|
||||
if(int(y) == int(y+0.5f))
|
||||
{
|
||||
first = isInMM?(float)depthImage.at<uint16_t>(int(y)-1,int(x)):depthImage.at<float>(int(y)-1,int(x));
|
||||
@@ -512,6 +512,10 @@ pcl::PointXYZ getDepth(
|
||||
{
|
||||
depth = depthY;
|
||||
}
|
||||
else
|
||||
{
|
||||
//UWARN("Could not compute depth for x=%f, y=%f", x,y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user