Class depth_frame

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class depth_frame : public rs2::video_frame

Subclassed by rs2::disparity_frame

Public Functions

inline depth_frame(const frame &f)

Extends the video_frame class with additional depth related attributes and functions

Parameters:

frame[in] - existing frame instance

inline float get_distance(int x, int y) const

Provide the depth in meters at the given pixel

Parameters:
  • int[in] x - pixel’s x coordinate.

  • int[in] y - pixel’s y coordinate.

Returns:

float - depth in metric units at given pixel

inline float get_units() const

Provide the scaling factor to use when converting from get_data() units to meters

Returns:

float - depth, in meters, per 1 unit stored in the frame data