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_load_v1_hack (struct t_stereo_camera_calibration **out_data)
 Load a stereo calibration struct from a hardcoded place. More...
 
bool t_file_save_raw_data_hack (struct t_stereo_camera_calibration *data)
 Save raw calibration data to file, hack until prober has storage for such things. 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}, \
}

◆ 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.

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 xrt_frame_sink::push_frame.

◆ t_file_save_raw_data_hack()

bool t_file_save_raw_data_hack ( struct t_stereo_camera_calibration data)

Save raw calibration data to file, hack until prober has storage for such things.

◆ 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 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().

Referenced by t_stereo_camera_calibration_load_v1_hack().

◆ t_stereo_camera_calibration_load_v1_hack()

bool t_stereo_camera_calibration_load_v1_hack ( struct t_stereo_camera_calibration **  out_data)

Load a stereo calibration struct from a hardcoded place.

Todo:
256 maybe not enough
Todo:
Use multiple env vars?
Todo:
Hardcoded 256

References t_stereo_camera_calibration_load_v1().