Monado OpenXR Runtime
xrt::auxiliary::tracking::FrameMat Class Reference

This class implements the xrt_frame interface, allowing interfacing to cv::Mat from C code. More...

#include <tracking/t_frame_cv_mat_wrapper.hpp>

Collaboration diagram for xrt::auxiliary::tracking::FrameMat:

Data Structures

class  Params
 Additional optional parameters for frame creation. More...
 

Static Public Member Functions

static void wrapR8G8B8 (const cv::Mat &mat, xrt_frame **fm_out, Params params={})
 Wraps the given cv::Mat assuming it's a 24bit RGB format matrix. More...
 
static void wrapL8 (const cv::Mat &mat, xrt_frame **fm_out, Params params={})
 Wraps the given cv::Mat assuming it's a 8bit format matrix. More...
 

Data Fields

struct xrt_frame frame = {}
 Exposed xrt_frame API. More...
 
cv::Mat matrix = cv::Mat()
 

Detailed Description

This class implements the xrt_frame interface, allowing interfacing to cv::Mat from C code.

Keeps a reference to the cv::Mat and so the data alive, this class is freed when the reference count reaches zero.

Member Function Documentation

◆ wrapL8()

void xrt::auxiliary::tracking::FrameMat::wrapL8 ( const cv::Mat &  mat,
xrt_frame **  fm_out,
Params  params = {} 
)
static

Wraps the given cv::Mat assuming it's a 8bit format matrix.

In all but the most strange cases you probably want the pointer pointed to by xf_ptr to be nullptr, if not nullptr it will have its reference count decremented so make sure it's a valid pointer.

◆ wrapR8G8B8()

void xrt::auxiliary::tracking::FrameMat::wrapR8G8B8 ( const cv::Mat &  mat,
xrt_frame **  fm_out,
Params  params = {} 
)
static

Wraps the given cv::Mat assuming it's a 24bit RGB format matrix.

In all but the most strange cases you probably want the pointer pointed to by xf_ptr to be nullptr, if not nullptr it will have its reference count decremented so make sure it's a valid pointer.

Field Documentation

◆ frame

struct xrt_frame xrt::auxiliary::tracking::FrameMat::frame = {}

Exposed xrt_frame API.


The documentation for this class was generated from the following files: