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:
matlabbe
2014-07-30 17:51:05 +00:00
parent 8e65812324
commit a0da05a352

View File

@@ -458,7 +458,7 @@ pcl::PointXYZ getDepth(
else else
{ {
// Interpolate x axis // Interpolate x axis
float depthX; float depthX = 0.0f;
float first; float first;
float second; float second;
if(int(x) == int(x+0.5f)) if(int(x) == int(x+0.5f))
@@ -488,7 +488,7 @@ pcl::PointXYZ getDepth(
else else
{ {
// Interpolate y axis // Interpolate y axis
float depthY; float depthY = 0.0f;
if(int(y) == int(y+0.5f)) 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)); 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; depth = depthY;
} }
else
{
//UWARN("Could not compute depth for x=%f, y=%f", x,y);
}
} }
} }