diff --git a/components/rgbd-sources/src/algorithms/disp2depth.cu b/components/rgbd-sources/src/algorithms/disp2depth.cu index 48e695d97dcca3963910a8afc3afcc1c20a5f7f7..4b707c4795017cdf38999cd6606d53ff4870ccb5 100644 --- a/components/rgbd-sources/src/algorithms/disp2depth.cu +++ b/components/rgbd-sources/src/algorithms/disp2depth.cu @@ -8,7 +8,7 @@ __global__ void d2d_kernel(cv::cuda::PtrStepSz<float> disp, cv::cuda::PtrStepSz< for (STRIDE_Y(v,disp.rows)) { for (STRIDE_X(u,disp.cols)) { float d = disp(v,u); - depth(v,u) = (d == 0) ? 50.0f : ((cam.baseline*cam.fx) / (d + cam.doffs)); + depth(v,u) = (d == 0) ? 50.0f : ((cam.baseline*cam.fx) / (d - cam.doffs)); } } }