Skip to content

Commit

Permalink
PR IntelRealSense#11013 from stefanhige: fix possibly uninitialized m…
Browse files Browse the repository at this point in the history
…emory + add documentation
  • Loading branch information
Nir-Az authored Oct 24, 2022
2 parents eb422f2 + 1f4a8bd commit e9a29da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wrappers/python/pyrsutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ void init_util(py::module &m) {
const rs2_extrinsics& color_to_depth, const rs2_extrinsics& depth_to_color,
std::array<float, 2> from_pixel)->std::array<float, 2>
{
std::array<float, 2> to_pixel;
std::array<float, 2> to_pixel{-1.0f, -1.0f};
rs2_project_color_pixel_to_depth_pixel(to_pixel.data(), static_cast<const uint16_t*>(data._ptr),
depth_scale, depth_min, depth_max, &depth_intrin, &color_intrin, &depth_to_color,
&color_to_depth, from_pixel.data());
return to_pixel;
};

m.def("rs2_project_color_pixel_to_depth_pixel", cp_to_dp, "data"_a, "depth_scale"_a,
"depth_min"_a, "depth_max"_a, "depth_intrin"_a, "color_intrin"_a, "depth_to_color"_a,
m.def("rs2_project_color_pixel_to_depth_pixel", cp_to_dp, "Given pixel coordinates of the color image and a minimum and maximum depth, compute the corresponding pixel coordinates in the depth image. Returns [-1 -1] on failure.",
"data"_a, "depth_scale"_a, "depth_min"_a, "depth_max"_a, "depth_intrin"_a, "color_intrin"_a, "depth_to_color"_a,
"color_to_depth"_a, "from_pixel"_a);
/** end rsutil.h **/
}

0 comments on commit e9a29da

Please sign in to comment.