diff --git a/src/surface_normal_impl.hpp b/src/surface_normal_impl.hpp index 2f2899a..dc6f24f 100644 --- a/src/surface_normal_impl.hpp +++ b/src/surface_normal_impl.hpp @@ -38,7 +38,7 @@ depth_to_normals_rgb_inner(const ImageView &depth, ImageView= depth.width || y >= depth.height) { + if (x < 0 || x >= depth.width || y < 0 || y >= depth.height) { continue; } @@ -81,4 +81,4 @@ depth_to_normals_rgb_inner(const ImageView &depth, ImageView