-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Description
Required Info | |
---|---|
Camera Model | D455 |
Firmware Version | 05.13.00.50 |
Operating System & Version | Win10 |
Kernel Version (Linux Only) | -- |
Platform | PC |
SDK Version | 2.50.0 |
Language | python |
Segment | -- |
Issue Description
Python utility function rs2_project_color_pixel_to_depth_pixel defined here
librealsense/wrappers/python/pyrsutil.cpp
Line 52 in af7510c
m.def("rs2_project_color_pixel_to_depth_pixel", cp_to_dp, "data"_a, "depth_scale"_a, |
returns possibly uninitialized memory from line
librealsense/wrappers/python/pyrsutil.cpp
Line 45 in af7510c
std::array<float, 2> to_pixel; |
if the equivalent cpp function rs2_project_color_pixel_to_depth_pixel iterates through a trajectory that maps to all-zero depth values.
Line 3772 in af7510c
if (depth == 0) |
This also happens in practice in my application.
Possible fix would be
std::array<float, 2> to_pixel{-1.0f, -1.0f};
or similar, indicating to the caller that no valid pixel could be found.