Monado OpenXR Runtime
Data Structures
t_tracking.h File Reference

Tracking API interface. More...

#include "xrt/xrt_frame.h"
#include "util/u_misc.h"
#include <stdio.h>
Include dependency graph for t_tracking.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_camera_calibration
 Essential calibration data for a single camera, or single lens/sensor of a stereo camera. More...
 
struct  t_stereo_camera_calibration
 Stereo camera calibration data to be given to trackers. More...
 
struct  t_convert_table
 
struct  t_hsv_filter_color
 
struct  t_hsv_filter_params
 
struct  t_hsv_filter_large_table
 
struct  t_hsv_filter_optimized_table
 
struct  t_calibration_status
 
struct  t_calibration_params
 
#define XRT_DISTORTION_MAX_DIM   (5)
 Maximum size of rectilinear distortion coefficient array. More...
 
#define T_HSV_SIZE   32
 
#define T_HSV_STEP   (256 / T_HSV_SIZE)
 
#define T_HSV_DEFAULT_PARAMS()
 
enum  t_board_pattern { T_BOARD_CHECKERS, T_BOARD_CIRCLES, T_BOARD_ASYMMETRIC_CIRCLES }
 Board pattern type. More...
 
void t_stereo_camera_calibration_alloc (struct t_stereo_camera_calibration **calib)
 Allocates a new stereo calibration data, unreferences the old calib. More...
 
void t_stereo_camera_calibration_destroy (struct t_stereo_camera_calibration *c)
 Only to be called by t_stereo_camera_calibration_reference. More...
 
bool t_stereo_camera_calibration_load_v1 (FILE *calib_file, struct t_stereo_camera_calibration **out_data)
 Load stereo calibration data from a given file. More...
 
bool t_stereo_camera_calibration_save_v1 (FILE *calib_file, struct t_stereo_camera_calibration *data)
 Save the given stereo calibration data to the given file. More...
 
void t_convert_fill_table (struct t_convert_table *t)
 
void t_convert_make_y8u8v8_to_r8g8b8 (struct t_convert_table *t)
 
void t_convert_make_y8u8v8_to_h8s8v8 (struct t_convert_table *t)
 
void t_convert_make_h8s8v8_to_r8g8b8 (struct t_convert_table *t)
 
void t_convert_in_place_y8u8v8_to_r8g8b8 (uint32_t width, uint32_t height, size_t stride, void *data_ptr)
 
void t_convert_in_place_y8u8v8_to_h8s8v8 (uint32_t width, uint32_t height, size_t stride, void *data_ptr)
 
void t_convert_in_place_h8s8v8_to_r8g8b8 (uint32_t width, uint32_t height, size_t stride, void *data_ptr)
 
void t_hsv_build_convert_table (struct t_hsv_filter_params *params, struct t_convert_table *t)
 
void t_hsv_build_large_table (struct t_hsv_filter_params *params, struct t_hsv_filter_large_table *t)
 
void t_hsv_build_optimized_table (struct t_hsv_filter_params *params, struct t_hsv_filter_optimized_table *t)
 
int t_hsv_filter_create (struct xrt_frame_context *xfctx, struct t_hsv_filter_params *params, struct xrt_frame_sink *sinks[4], struct xrt_frame_sink **out_sink)
 
int t_psmv_start (struct xrt_tracked_psmv *xtmv)
 
int t_psmv_create (struct xrt_frame_context *xfctx, struct xrt_colour_rgb_f32 *rgb, struct t_stereo_camera_calibration *data, struct xrt_tracked_psmv **out_xtmv, struct xrt_frame_sink **out_sink)
 
int t_psvr_start (struct xrt_tracked_psvr *xtvr)
 
int t_psvr_create (struct xrt_frame_context *xfctx, struct t_stereo_camera_calibration *data, struct xrt_tracked_psvr **out_xtvr, struct xrt_frame_sink **out_sink)
 
int t_calibration_stereo_create (struct xrt_frame_context *xfctx, const struct t_calibration_params *params, struct t_calibration_status *status, struct xrt_frame_sink *gui, struct xrt_frame_sink **out_sink)
 Create the camera calibration frame sink. More...
 
int t_convert_yuv_or_yuyv_create (struct xrt_frame_sink *next, struct xrt_frame_sink **out_sink)
 
int t_debug_hsv_picker_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
 
int t_debug_hsv_viewer_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
 
int t_debug_hsv_filter_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
 

Detailed Description

Tracking API interface.

Author
Pete Black pblac.nosp@m.k@co.nosp@m.llabo.nosp@m.ra.c.nosp@m.om
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om

Macro Definition Documentation

◆ T_HSV_DEFAULT_PARAMS

#define T_HSV_DEFAULT_PARAMS ( )
Value:
{ \
{ \
{165, 30, 160, 100}, \
{135, 30, 160, 100}, \
{95, 30, 160, 100}, \
}, \
{128, 80}, \
}

Referenced by t_debug_hsv_filter_create(), and t_debug_hsv_viewer_create().

◆ T_HSV_SIZE

#define T_HSV_SIZE   32

◆ T_HSV_STEP

#define T_HSV_STEP   (256 / T_HSV_SIZE)

◆ XRT_DISTORTION_MAX_DIM

#define XRT_DISTORTION_MAX_DIM   (5)

Maximum size of rectilinear distortion coefficient array.

Referenced by CameraCalibrationWrapper::isDataStorageValid().

Enumeration Type Documentation

◆ t_board_pattern

Board pattern type.

Enumerator
T_BOARD_CHECKERS 
T_BOARD_CIRCLES 
T_BOARD_ASYMMETRIC_CIRCLES 

Function Documentation

◆ t_calibration_stereo_create()

int t_calibration_stereo_create ( struct xrt_frame_context xfctx,
const struct t_calibration_params params,
struct t_calibration_status status,
struct xrt_frame_sink gui,
struct xrt_frame_sink **  out_sink 
)

Create the camera calibration frame sink.

Parameters
xfctxContext for frame transport.
paramsParameters to use during calibration. Values copied, pointer not retained.
statusOptional pointer to structure for status information. Pointer retained, and pointed-to struct modified.
guiFrame sink
out_sinkOutput: created frame sink.

References t_calibration_params::asymmetric_circles, Calibration::base, Calibration::board, t_calibration_params::checkers, t_calibration_params::circles, t_calibration_params::cols, t_calibration_params::diagonal_distance_meters, Calibration::dims, t_calibration_params::distance_meters, Calibration::enabled, t_calibration_params::enabled, Calibration::gui, Calibration::load, t_calibration_params::load, Calibration::mirror_rgb_image, t_calibration_params::mirror_rgb_image, Calibration::num_collect_restart, t_calibration_params::num_collect_restart, Calibration::num_collect_total, t_calibration_params::num_collect_total, Calibration::num_cooldown_frames, t_calibration_params::num_cooldown_frames, Calibration::num_images, t_calibration_params::num_images, Calibration::num_wait_for, t_calibration_params::num_wait_for, P, Calibration::pattern, t_calibration_params::pattern, xrt_frame_sink::push_frame, t_calibration_params::rows, Calibration::save_images, t_calibration_params::save_images, Calibration::sink, t_calibration_params::size_meters, Calibration::spacing_meters, Calibration::status, Calibration::stereo_sbs, t_calibration_params::stereo_sbs, Calibration::subpixel_enable, t_calibration_params::subpixel_enable, Calibration::subpixel_size, t_calibration_params::subpixel_size, T_BOARD_ASYMMETRIC_CIRCLES, T_BOARD_CHECKERS, T_BOARD_CIRCLES, t_calibration_frame(), Calibration::use_fisheye, and t_calibration_params::use_fisheye.

◆ t_convert_fill_table()

void t_convert_fill_table ( struct t_convert_table t)

◆ t_convert_in_place_h8s8v8_to_r8g8b8()

void t_convert_in_place_h8s8v8_to_r8g8b8 ( uint32_t  width,
uint32_t  height,
size_t  stride,
void *  data_ptr 
)

◆ t_convert_in_place_y8u8v8_to_h8s8v8()

void t_convert_in_place_y8u8v8_to_h8s8v8 ( uint32_t  width,
uint32_t  height,
size_t  stride,
void *  data_ptr 
)

◆ t_convert_in_place_y8u8v8_to_r8g8b8()

void t_convert_in_place_y8u8v8_to_r8g8b8 ( uint32_t  width,
uint32_t  height,
size_t  stride,
void *  data_ptr 
)

◆ t_convert_make_h8s8v8_to_r8g8b8()

void t_convert_make_h8s8v8_to_r8g8b8 ( struct t_convert_table t)

◆ t_convert_make_y8u8v8_to_h8s8v8()

void t_convert_make_y8u8v8_to_h8s8v8 ( struct t_convert_table t)

◆ t_convert_make_y8u8v8_to_r8g8b8()

void t_convert_make_y8u8v8_to_r8g8b8 ( struct t_convert_table t)

◆ t_convert_yuv_or_yuyv_create()

int t_convert_yuv_or_yuyv_create ( struct xrt_frame_sink next,
struct xrt_frame_sink **  out_sink 
)

◆ t_debug_hsv_filter_create()

int t_debug_hsv_filter_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink passthrough,
struct xrt_frame_sink **  out_sink 
)

◆ t_debug_hsv_picker_create()

int t_debug_hsv_picker_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink passthrough,
struct xrt_frame_sink **  out_sink 
)

◆ t_debug_hsv_viewer_create()

int t_debug_hsv_viewer_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink passthrough,
struct xrt_frame_sink **  out_sink 
)

◆ t_hsv_build_convert_table()

void t_hsv_build_convert_table ( struct t_hsv_filter_params params,
struct t_convert_table t 
)

◆ t_hsv_build_large_table()

void t_hsv_build_large_table ( struct t_hsv_filter_params params,
struct t_hsv_filter_large_table t 
)

◆ t_hsv_build_optimized_table()

void t_hsv_build_optimized_table ( struct t_hsv_filter_params params,
struct t_hsv_filter_optimized_table t 
)

◆ t_hsv_filter_create()

int t_hsv_filter_create ( struct xrt_frame_context xfctx,
struct t_hsv_filter_params params,
struct xrt_frame_sink sinks[4],
struct xrt_frame_sink **  out_sink 
)

◆ t_psmv_create()

int t_psmv_create ( struct xrt_frame_context xfctx,
struct xrt_colour_rgb_f32 rgb,
struct t_stereo_camera_calibration data,
struct xrt_tracked_psmv **  out_xtmv,
struct xrt_frame_sink **  out_sink 
)

◆ t_psmv_start()

int t_psmv_start ( struct xrt_tracked_psmv xtmv)

References container_of.

◆ t_psvr_create()

int t_psvr_create ( struct xrt_frame_context xfctx,
struct t_stereo_camera_calibration data,
struct xrt_tracked_psvr **  out_xtvr,
struct xrt_frame_sink **  out_sink 
)

◆ t_psvr_start()

int t_psvr_start ( struct xrt_tracked_psvr xtvr)

References TrackerPSVR::base, and container_of.

◆ t_stereo_camera_calibration_alloc()

void t_stereo_camera_calibration_alloc ( struct t_stereo_camera_calibration **  calib)

Allocates a new stereo calibration data, unreferences the old calib.

References U_TYPED_CALLOC.

Referenced by StereoCameraCalibrationWrapper::allocData(), and t_stereo_camera_calibration_load_v1().

◆ t_stereo_camera_calibration_destroy()

void t_stereo_camera_calibration_destroy ( struct t_stereo_camera_calibration c)

Only to be called by t_stereo_camera_calibration_reference.

◆ t_stereo_camera_calibration_load_v1()

bool t_stereo_camera_calibration_load_v1 ( FILE *  calib_file,
struct t_stereo_camera_calibration **  out_data 
)

Load stereo calibration data from a given file.

References t_stereo_camera_calibration_alloc().

◆ t_stereo_camera_calibration_save_v1()

bool t_stereo_camera_calibration_save_v1 ( FILE *  calib_file,
struct t_stereo_camera_calibration data 
)

Save the given stereo calibration data to the given file.