getDepth: return invalid depth when value is zero (for float depth images)
This commit is contained in:
parent
3dae0999bb
commit
75342649fa
@ -332,7 +332,7 @@ cv::Vec3f FindObjectROS::getDepth(const cv::Mat & depthImage,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
depth = depthImage.at<float>(y,x);
|
depth = depthImage.at<float>(y,x);
|
||||||
isValid = std::isfinite(depth);
|
isValid = std::isfinite(depth) && depth > 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for invalid measurements
|
// Check for invalid measurements
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user