opencv::rgbd

Function rescale_depth_def

Source
pub fn rescale_depth_def(
    in_: &impl ToInputArray,
    depth: i32,
    out: &mut impl ToOutputArray,
) -> Result<()>
Expand description

If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits::quiet_NaN() Otherwise, the image is simply converted to floats

§Parameters

  • in: the depth image (if given as short int CV_U, it is assumed to be the depth in millimeters (as done with the Microsoft Kinect), it is assumed in meters)
  • depth: the desired output depth (floats or double)
  • out: The rescaled float depth image
  • depth_factor: (optional) factor by which depth is converted to distance (by default = 1000.0 for Kinect sensor)

§Note

This alternative version of rescale_depth function uses the following default values for its arguments:

  • depth_factor: 1000.0