19typedef int8_t t_constellation_device_id_t;
20typedef int8_t t_constellation_led_id_it;
22#define XRT_CONSTELLATION_MAX_BLOBS_PER_FRAME 250
29#define XRT_CONSTELLATION_MAX_DEVICES 4
37#define XRT_CONSTELLATION_MAX_LEDS_PER_DEVICE 64
39#define XRT_CONSTELLATION_INVALID_DEVICE_ID -1
40#define XRT_CONSTELLATION_INVALID_LED_ID -1
114 int64_t timestamp_ns;
157XRT_NONNULL_ALL
static inline void
170XRT_NONNULL_ALL
static inline void
200 t_constellation_device_id_t device_id);
215XRT_NONNULL_ALL
static inline void
218 t_constellation_device_id_t device_id)
230XRT_NONNULL_ALL
static inline void
267XRT_NONNULL_ALL
static inline void
273 tracking_source->get_tracked_pose(tracking_source, when_ns, out_relation);
288 t_constellation_led_id_it
id;
344XRT_NONNULL_ALL
static inline bool
418XRT_NONNULL_ALL
static inline void
Definition t_constellation.h:102
uint64_t id
Internal ID for this observation, may be set by the blobwatch implementation if it needs to know this...
Definition t_constellation.h:109
struct xrt_frame * frame
Optional reference to the frame the blobs were extracted from, may be NULL.
Definition t_constellation.h:124
uint64_t sequence_id
The sequence ID of this mosaic, must be stable across all frames of a mosaic. Monotonically increases...
Definition t_constellation.h:112
A generic interface to allow a tracking system to receive "snapshots" of seen t_blob in a frame.
Definition t_constellation.h:134
void(* push_blobs)(struct t_blob_sink *tbs, struct t_blob_observation *observation)
Push a set of blobs into the sink.
Definition t_constellation.h:142
void(* destroy)(struct t_blob_sink *tbs)
Destroy this blob sink.
Definition t_constellation.h:147
static XRT_NONNULL_ALL void t_blob_sink_push_blobs(struct t_blob_sink *tbs, struct t_blob_observation *tbo)
Helper function for t_blob_sink::push_blobs.
Definition t_constellation.h:158
static XRT_NONNULL_ALL void t_blob_sink_destroy(struct t_blob_sink **tbs_ptr)
Helper function for t_blob_sink::destroy.
Definition t_constellation.h:171
A blob is a 2d position in a camera sensor's view that is being tracked.
Definition t_constellation.h:51
float brightness
The brightness of the brightest pixel of the blob, on a scale from 0.0 (black) to 1....
Definition t_constellation.h:96
t_constellation_led_id_it matched_device_led_id
The LED ID this blob is associated with, if any.
Definition t_constellation.h:69
t_constellation_device_id_t matched_device_id
The device ID this blob is associated with, if any.
Definition t_constellation.h:63
struct xrt_vec2 center_undistorted
Center of blob, in undistorted pixels.
Definition t_constellation.h:75
struct xrt_vec2 motion_vector
Estimated motion vector of blob, in distorted pixels per second.
Definition t_constellation.h:84
struct xrt_vec3 center_homogenized
Center of blob, in homogenized coordinates.
Definition t_constellation.h:78
uint32_t blob_id
The ID of a blob, which may be used to track it across frames.
Definition t_constellation.h:57
struct xrt_vec2 center_distorted
Centre of blob, in distorted pixels.
Definition t_constellation.h:72
struct xrt_rect bounding_box
The bounding box of the blob in distorted pixel coordinates.
Definition t_constellation.h:87
Definition t_constellation.h:185
static XRT_NONNULL_ALL void t_blobwatch_mark_blob_device(struct t_blobwatch *tbw, const struct t_blob_observation *tbo, t_constellation_device_id_t device_id)
Helper function for t_blobwatch::mark_blob_device.
Definition t_constellation.h:216
static XRT_NONNULL_ALL void t_blobwatch_destroy(struct t_blobwatch **tbw_ptr)
Helper function for t_blobwatch::destroy.
Definition t_constellation.h:231
void(* destroy)(struct t_blobwatch *tbw)
Destroy this blobwatch.
Definition t_constellation.h:205
void(* mark_blob_device)(struct t_blobwatch *tbw, const struct t_blob_observation *tbo, t_constellation_device_id_t device_id)
Notify the blobwatch that the blobs in the given observation with the correct ID set are associated w...
Definition t_constellation.h:198
A constellation tracker device is a device that the constellation tracker will attempt to track in 6d...
Definition t_constellation.h:396
static XRT_NONNULL_ALL void t_constellation_tracker_device_push_sample(struct t_constellation_tracker_device *device, struct t_constellation_tracker_sample *sample)
Helper function for t_constellation_tracker_device::push_constellation_tracker_sample.
Definition t_constellation.h:419
void(* push_constellation_tracker_sample)(struct t_constellation_tracker_device *connection, struct t_constellation_tracker_sample *sample)
A function that the constellation tracker will call to push the latest sample.
Definition t_constellation.h:407
Definition t_constellation.h:292
uint32_t min_leds_for_correspondence_search_with_prior
The minimum number of LEDs required to accept a brute-force solve with a prior that said solve agrees...
Definition t_constellation.h:300
uint32_t min_leds_for_correspondence_search_without_prior
The minimum number of LEDs required to accept a brute-force solve without a prior.
Definition t_constellation.h:294
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:311
struct t_constellation_tracker_led_model_match_parameters match_parameters
The match parameters to tweak how the tracker works.
Definition t_constellation.h:318
static XRT_NONNULL_ALL bool t_constellation_tracker_led_model_compute_led_visibility(struct t_constellation_tracker_led_model *led_model, uint32_t led, struct xrt_vec3 T_obj_cam)
Helper function for t_constellation_tracker_led_model::compute_led_visibility.
Definition t_constellation.h:345
uint32_t led_count
The number of LEDs in this model.
Definition t_constellation.h:315
bool(* compute_led_visibility)(struct t_constellation_tracker_led_model *led_model, uint32_t led, struct xrt_vec3 T_obj_cam)
A function to compute whether a given LED is visible from a given position.
Definition t_constellation.h:332
struct t_constellation_tracker_led * leds
The LEDs in this model.
Definition t_constellation.h:313
Definition t_constellation.h:278
float radius_m
The visible radius of the LED in meters.
Definition t_constellation.h:284
float visibility_angle
The angle from dead on where the LED is no longer visible, in radians.
Definition t_constellation.h:286
struct xrt_vec3 position
The position of the LED in the model.
Definition t_constellation.h:280
t_constellation_led_id_it id
A unique ID for this LED, which distinguishes it from all other LEDs.
Definition t_constellation.h:288
struct xrt_vec3 normal
The normal of the LED, determines where it is facing.
Definition t_constellation.h:282
Definition t_constellation.h:354
uint32_t visible_led_count
The amount of LEDs that should be visible.
Definition t_constellation.h:358
double reprojection_error
The reprojection error of the solve's LEDs to the blobs, in pixels.
Definition t_constellation.h:360
uint32_t matched_blob_count
The amount of blobs that were matched.
Definition t_constellation.h:356
Definition t_constellation.h:364
float average_brightness
Average brightness of the detected blobs, from 0 (black) to 1 (pure white).
Definition t_constellation.h:383
int64_t timestamp_ns
The time the original blobservation was made.
Definition t_constellation.h:366
uint32_t camera_index
The index of the camera in the mosaic that made the blobservation in question.
Definition t_constellation.h:381
bool has_world_pose
Whether the world_pose field is valid or not.
Definition t_constellation.h:374
struct t_constellation_tracker_sample_metrics metrics
Metrics about the sample, such as reprojection error and matched LED count.
Definition t_constellation.h:385
uint32_t mosaic_index
The mosaic index of the camera that made the blobservation in question.
Definition t_constellation.h:379
struct xrt_pose world_pose
The pose of the device at the time of the blobservation.
Definition t_constellation.h:377
uint64_t sequence_id
The sequence ID of the mosaic.
Definition t_constellation.h:368
A constellation tracker tracking source is an arbitrary source of tracking data for the constellation...
Definition t_constellation.h:254
static XRT_NONNULL_ALL void t_constellation_tracker_tracking_source_get_tracked_pose(struct t_constellation_tracker_tracking_source *tracking_source, int64_t when_ns, struct xrt_space_relation *out_relation)
Helper function for t_constellation_tracker_tracking_source::get_tracked_pose.
Definition t_constellation.h:268
Basic frame data structure - holds a pointer to buffer.
Definition xrt_frame.h:25
A pose composed of a position and orientation.
Definition xrt_defines.h:522
Image rectangle.
Definition xrt_defines.h:487
A relation with two spaces, includes velocity and acceleration.
Definition xrt_defines.h:713
A 2 element vector with single floats.
Definition xrt_defines.h:279
A 3 element vector with single floats.
Definition xrt_defines.h:310
Common defines and enums for XRT.