83 #define XRT_DISTORTION_MAX_DIM (5) 120 double camera_translation[3];
122 double camera_rotation[3][3];
125 double camera_essential[3][3];
127 double camera_fundamental[3][3];
157 if (old_dst == src) {
168 if (xrt_reference_dec(&old_dst->
reference)) {
197 uint8_t v[256][256][256][3];
237 #define T_HSV_SIZE 32 238 #define T_HSV_STEP (256 / T_HSV_SIZE) 240 #define T_HSV_DEFAULT_PARAMS() \ 243 {165, 30, 160, 100}, \ 244 {135, 30, 160, 100}, \ 245 {95, 30, 160, 100}, \ 273 uint8_t v[256][256][256];
293 static inline uint8_t
398 } asymmetric_circles;
int subpixel_size
Definition: t_tracking.h:383
uint8_t hue_min
Definition: t_tracking.h:252
int num_collect_restart
Definition: t_tracking.h:409
struct t_stereo_camera_calibration * stereo_data
Stereo calibration data that was produced.
Definition: t_tracking.h:364
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)
Definition: t_hsv_filter.c:339
int t_psmv_start(struct xrt_tracked_psmv *xtmv)
Definition: t_tracker_psmv.cpp:521
#define T_HSV_STEP
Definition: t_tracking.h:238
void t_hsv_build_large_table(struct t_hsv_filter_params *params, struct t_hsv_filter_large_table *t)
Definition: t_hsv_filter.c:62
double distortion[XRT_DISTORTION_MAX_DIM]
Rectilinear distortion coefficients: k1, k2, p1, p2[, k3[, k4, k5, k6[, s1, s2, s3, s4]].
Definition: t_tracking.h:99
struct t_calibration_params::@11 circles
t_board_pattern
Board pattern type.
Definition: t_tracking.h:344
uint8_t s_max
Definition: t_tracking.h:266
bool stereo_sbs
Is the camera a stereo sbs camera, mostly for image loading.
Definition: t_tracking.h:372
Essential calibration data for a single camera, or single lens/sensor of a stereo camera...
Definition: t_tracking.h:89
float distance_meters
Definition: t_tracking.h:390
bool mirror_rgb_image
Should we mirror the RGB image?
Definition: t_tracking.h:416
int t_convert_yuv_or_yuyv_create(struct xrt_frame_sink *next, struct xrt_frame_sink **out_sink)
int num_collected
Number of frames collected.
Definition: t_tracking.h:358
Definition: t_tracking.h:367
uint8_t hue_range
Definition: t_tracking.h:253
int t_debug_hsv_picker_create(struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
Definition: t_debug_hsv_picker.cpp:216
float diagonal_distance_meters
Definition: t_tracking.h:397
Definition: t_tracking.h:260
void t_convert_make_h8s8v8_to_r8g8b8(struct t_convert_table *t)
Definition: t_convert.cpp:57
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)
Definition: t_tracker_psvr.cpp:263
void t_hsv_build_convert_table(struct t_hsv_filter_params *params, struct t_convert_table *t)
Definition: t_hsv_filter.c:35
int t_debug_hsv_viewer_create(struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
Definition: t_debug_hsv_viewer.cpp:172
A object that is sent frames.
Definition: xrt_frame.h:51
float size_meters
Definition: t_tracking.h:380
int num_images
Definition: t_tracking.h:403
Definition: t_tracking.h:347
struct t_calibration_params::@10 checkers
Definition: t_tracking.h:271
uint8_t s_min
Definition: t_tracking.h:255
double distortion_fisheye[4]
Fisheye camera distortion coefficients.
Definition: t_tracking.h:102
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.
Definition: t_file.cpp:268
int rows
Definition: t_tracking.h:379
Definition: t_tracking.h:250
bool enabled
Definition: t_tracking.h:402
int t_psvr_start(struct xrt_tracked_psvr *xtvr)
Definition: t_tracker_psvr.cpp:249
Stereo camera calibration data to be given to trackers.
Definition: t_tracking.h:111
uint8_t v[T_HSV_SIZE][T_HSV_SIZE][T_HSV_SIZE]
Definition: t_tracking.h:278
void t_convert_in_place_y8u8v8_to_r8g8b8(uint32_t width, uint32_t height, size_t stride, void *data_ptr)
Definition: t_convert.cpp:66
Image size.
Definition: xrt_defines.h:218
bool save_images
Definition: t_tracking.h:418
void t_stereo_camera_calibration_destroy(struct t_stereo_camera_calibration *c)
Only to be called by t_stereo_camera_calibration_reference.
Definition: t_data_utils.c:25
#define XRT_DISTORTION_MAX_DIM
Maximum size of rectilinear distortion coefficient array.
Definition: t_tracking.h:83
bool use_fisheye
Should we use fisheye version of the calibration functions.
Definition: t_tracking.h:370
int t_debug_hsv_filter_create(struct xrt_frame_context *xfctx, struct xrt_frame_sink *passthrough, struct xrt_frame_sink **out_sink)
Definition: t_debug_hsv_filter.cpp:101
Definition: t_tracking.h:276
struct t_calibration_params::@12 asymmetric_circles
bool found
Was the target found this frame?
Definition: t_tracking.h:356
double intrinsics[3][3]
Camera intrinsics matrix.
Definition: t_tracking.h:95
Definition: t_tracking.h:348
int num_wait_for
Definition: t_tracking.h:407
Object used to track all sinks and frame producers in a graph.
Definition: xrt_frame.h:87
Definition: t_tracking.h:195
void t_convert_fill_table(struct t_convert_table *t)
Definition: t_convert.cpp:22
struct t_calibration_params::@13 load
void t_convert_make_y8u8v8_to_r8g8b8(struct t_convert_table *t)
Definition: t_convert.cpp:39
enum t_board_pattern pattern
What type of pattern are we using for calibration.
Definition: t_tracking.h:374
Definition: t_tracking.h:351
uint8_t v_min
Definition: t_tracking.h:267
bool use_fisheye
Is the camera fisheye?
Definition: t_tracking.h:105
int cols
Definition: t_tracking.h:378
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.
Definition: t_calibration.cpp:1241
A 3 element colour with floating point channels.
Definition: xrt_defines.h:193
void t_convert_in_place_y8u8v8_to_h8s8v8(uint32_t width, uint32_t height, size_t stride, void *data_ptr)
Definition: t_convert.cpp:76
A base class for reference counted objects.
Definition: xrt_defines.h:25
int num_cooldown_frames
Definition: t_tracking.h:406
A tracked PSVR headset.
Definition: xrt_tracking.h:147
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.
Definition: t_file.cpp:187
A single tracked PS Move controller, camera and ball are not synced.
Definition: xrt_tracking.h:105
void t_hsv_build_optimized_table(struct t_hsv_filter_params *params, struct t_hsv_filter_optimized_table *t)
Definition: t_hsv_filter.c:96
int cooldown
Number of moving frames before another capture.
Definition: t_tracking.h:360
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)
Definition: t_tracker_psmv.cpp:528
int waits_remaining
Number of non-moving frames before capture.
Definition: t_tracking.h:362
void t_convert_make_y8u8v8_to_h8s8v8(struct t_convert_table *t)
Definition: t_convert.cpp:48
bool subpixel_enable
Definition: t_tracking.h:382
void t_stereo_camera_calibration_alloc(struct t_stereo_camera_calibration **calib)
Allocates a new stereo calibration data, unreferences the old calib.
Definition: t_data_utils.c:17
uint8_t v_min
Definition: t_tracking.h:257
void t_convert_in_place_h8s8v8_to_r8g8b8(uint32_t width, uint32_t height, size_t stride, void *data_ptr)
Definition: t_convert.cpp:88
struct xrt_size image_size_pixels
Source image size.
Definition: t_tracking.h:92
int num_collect_total
Definition: t_tracking.h:408
bool finished
Is calibration finished?
Definition: t_tracking.h:354
Definition: t_tracking.h:346
struct xrt_reference reference
Ref counting.
Definition: t_tracking.h:114
#define T_HSV_SIZE
Definition: t_tracking.h:237