[][src]Function opencv::rgbd::rescale_depth

pub fn rescale_depth(
    in_: &dyn ToInputArray,
    depth: i32,
    out: &mut dyn ToOutputArray,
    depth_factor: f64
) -> Result<()>

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)

C++ default parameters

  • depth_factor: 1000.0