Class video_frame

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class video_frame : public rs2::frame

Subclassed by rs2::depth_frame

Public Functions

inline video_frame(const frame &f)

Extends the frame class with additional video related attributes and functions

Parameters:

frame[in] - existing frame instance

inline int get_width() const

returns image width in pixels

Returns:

frame width in pixels

inline int get_height() const

returns image height in pixels

Returns:

frame height in pixels

inline int get_stride_in_bytes() const

retrieve frame stride, meaning the actual line width in memory in bytes (not the logical image width)

Returns:

stride in bytes

inline int get_bits_per_pixel() const

retrieve bits per pixel

Returns:

number of bits per one pixel

inline int get_bytes_per_pixel() const

retrieve bytes per pixel

Returns:

number of bytes per one pixel

inline bool extract_target_dimensions(rs2_calib_target_type calib_type, float *target_dims, unsigned int target_dims_size) const

Extract the dimensions on the specific target

Parameters:
  • frame[in] Left or right camera frame of specified size based on the target type

  • calib_type[in] Calibration target type

  • target_dims_size[in] Target dimension array size. 4 for RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES and 8 for RS2_CALIB_TARGET_POS_GAUSSIAN_DOT_VERTICES

  • target_dims[out] The array to hold the result target dimensions calculated. For type RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES and RS2_CALIB_TARGET_ROI_RECT_GAUSSIAN_DOT_VERTICES, the four rectangle side sizes in pixels with the order of top, bottom, left, and right For type RS2_CALIB_TARGET_POS_GAUSSIAN_DOT_VERTICES, the four vertices coordinates in pixels with the order of top, bottom, left, and right

  • error[out] If non-null, receives any error that occurs during this call, otherwise, errors are ignored