24#define MAX_OBJECT_LEDS 64
26#define WORST_REPROJECTION_ERROR 10.0
36XRT_MAYBE_UNUSED
static bool
39 return rect->left != rect->right && rect->top != rect->bottom;
58#define POSE_SET_FLAG(score, f) ((score)->match_flags |= (f))
59#define POSE_CLEAR_FLAG(score, f) ((score)->match_flags &= ~(f))
60#define POSE_HAS_FLAGS(score, f) (((score)->match_flags & (f)) == (f))
66 uint32_t matched_blobs;
67 uint32_t unmatched_blobs;
68 uint32_t visible_leds;
70 double reprojection_error;
85 struct t_blob *matched_blob;
93 bool all_led_ids_matched;
94 uint32_t matched_blobs;
95 uint32_t unmatched_blobs;
97 double reprojection_error;
102pose_metrics_match_pose_to_blobs(
const struct xrt_pose *pose,
106 t_constellation_device_id_t device_id,
116 t_constellation_device_id_t device_id,
121pose_metrics_evaluate_pose_with_prior(
struct pose_metrics *score,
123 bool prior_must_match,
125 const struct xrt_vec3 *pos_error_thresh,
126 const struct xrt_vec3 *rot_error_thresh,
130 t_constellation_device_id_t device_id,
Constellation tracker's camera model storage.
pose_match_flags
Definition pose_metrics.h:43
@ POSE_MATCH_LED_IDS
The LED IDs on the blobs all matched the LEDs we thought (or were unassigned)
Definition pose_metrics.h:55
@ POSE_MATCH_ORIENT
The orientation of the pose matched the prior well.
Definition pose_metrics.h:51
@ POSE_HAD_PRIOR
If a pose prior was supplied when calculating the score, then rot/trans_error are set.
Definition pose_metrics.h:53
@ POSE_MATCH_POSITION
The position of the pose matched the prior well.
Definition pose_metrics.h:49
@ POSE_MATCH_GOOD
A reasonable pose match - most LEDs matched to within a few pixels error.
Definition pose_metrics.h:45
@ POSE_MATCH_STRONG
A strong pose match is a match with very low error.
Definition pose_metrics.h:47
bool pose_metrics_score_is_better_pose(struct pose_metrics *old_score, struct pose_metrics *new_score)
Compares whether new_score is a better pose than old_score.
Definition pose_metrics.c:484
Definition camera_model.h:19
Definition pose_metrics.h:89
Definition pose_metrics.h:79
Definition pose_metrics.h:63
struct xrt_vec3 pos_error
Translation error (compared to a prior)
Definition pose_metrics.h:75
struct xrt_vec3 orient_error
Rotation error (compared to a prior)
Definition pose_metrics.h:73
Definition pose_metrics.h:29
A blob is a 2d position in a camera sensor's view that is being tracked.
Definition t_constellation.h:37
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:266
Definition t_constellation.h:245
A pose composed of a position and orientation.
Definition xrt_defines.h:492
A 2 element vector with single floats.
Definition xrt_defines.h:268
A 3 element vector with single floats.
Definition xrt_defines.h:289
Header defining the tracking system integration in Monado.
Common defines and enums for XRT.