25#define MAX_OBJECT_LEDS 64
27#define WORST_REPROJECTION_ERROR 10.0
29#define CLOSEST_ACCEPTABLE_POSE_M 0.05
31#define FARTHEST_ACCEPTABLE_POSE_M 15.0
41XRT_MAYBE_UNUSED
static bool
44 return rect->left != rect->right && rect->top != rect->bottom;
72#define POSE_SET_FLAGS(score, f) ((score)->match_flags |= (f))
73#define POSE_CLEAR_FLAGS(score, f) ((score)->match_flags &= ~(f))
74#define POSE_HAS_FLAGS(score, f) (((score)->match_flags & (f)) == (f))
76#define POSE_CLEAR_VALID(score) POSE_CLEAR_FLAGS(score, POSE_MATCH_GOOD | POSE_MATCH_STRONG)
82 uint32_t matched_blobs;
83 uint32_t unmatched_blobs;
84 uint32_t visible_leds;
86 double reprojection_error;
101 struct t_blob *matched_blob;
107 int num_visible_leds;
109 bool all_led_ids_matched;
110 uint32_t matched_blobs;
111 uint32_t unmatched_blobs;
113 double reprojection_error;
116 bool degenerate_solution;
120pose_metrics_match_pose_to_blobs(
const struct xrt_pose *pose,
124 t_constellation_device_id_t device_id,
134 t_constellation_device_id_t device_id,
139pose_metrics_evaluate_pose_with_prior(
struct pose_metrics *score,
141 bool prior_must_match,
143 const struct xrt_vec3 *pos_error_thresh,
144 const struct xrt_vec3 *rot_error_thresh,
148 t_constellation_device_id_t device_id,
Constellation tracker's camera model storage.
pose_match_flags
Definition pose_metrics.h:48
@ POSE_MATCH_LED_IDS
The LED IDs on the blobs all matched the LEDs we thought (or were unassigned)
Definition pose_metrics.h:60
@ POSE_MATCH_DEGENERATE
Set when the pose cannot explain the device entirely on it's own.
Definition pose_metrics.h:69
@ POSE_MATCH_ORIENT
The orientation of the pose matched the prior well.
Definition pose_metrics.h:56
@ POSE_HAD_PRIOR
If a pose prior was supplied when calculating the score, then rot/trans_error are set.
Definition pose_metrics.h:58
@ POSE_MATCH_POSITION
The position of the pose matched the prior well.
Definition pose_metrics.h:54
@ POSE_MATCH_GOOD
A reasonable pose match - most LEDs matched to within a few pixels error.
Definition pose_metrics.h:50
@ POSE_MATCH_STRONG
A strong pose match is a match with very low error.
Definition pose_metrics.h:52
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:502
Definition camera_model.h:19
Definition pose_metrics.h:105
Definition pose_metrics.h:95
Definition pose_metrics.h:79
struct xrt_vec3 pos_error
Translation error (compared to a prior)
Definition pose_metrics.h:91
struct xrt_vec3 orient_error
Rotation error (compared to a prior)
Definition pose_metrics.h:89
Definition pose_metrics.h:34
A blob is a 2d position in a camera sensor's view that is being tracked.
Definition t_constellation.h:45
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:286
Definition t_constellation.h:253
A pose composed of a position and orientation.
Definition xrt_defines.h:513
A 2 element vector with single floats.
Definition xrt_defines.h:279
A 3 element vector with single floats.
Definition xrt_defines.h:310
Header defining the tracking system integration in Monado.
Common defines and enums for XRT.