diff --git a/modules/rgbd/src/hash_tsdf.cpp b/modules/rgbd/src/hash_tsdf.cpp index b414500217f..b09dc63329f 100644 --- a/modules/rgbd/src/hash_tsdf.cpp +++ b/modules/rgbd/src/hash_tsdf.cpp @@ -99,7 +99,7 @@ void HashTSDFVolumeCPU::integrate(InputArray _depth, float depthFactor, const Ma for (int i = lower_bound[0]; i <= upper_bound[0]; i++) for (int j = lower_bound[1]; j <= upper_bound[1]; j++) - for (int k = lower_bound[2]; k <= lower_bound[2]; k++) + for (int k = lower_bound[2]; k <= upper_bound[2]; k++) { const Vec3i tsdf_idx = Vec3i(i, j, k); if (!localAccessVolUnits.count(tsdf_idx))