Monado OpenXR Runtime
Loading...
Searching...
No Matches
pose_metrics.h File Reference

Metrics for constellation tracking poses. More...

Include dependency graph for pose_metrics.h:

Go to the source code of this file.

Data Structures

struct  pose_rect
 
struct  pose_metrics
 
struct  pose_metrics_visible_led_info
 
struct  pose_metrics_blob_match_info
 

Macros

#define MAX_OBJECT_LEDS   64
 
#define POSE_SET_FLAG(score, f)   ((score)->match_flags |= (f))
 
#define POSE_CLEAR_FLAG(score, f)   ((score)->match_flags &= ~(f))
 
#define POSE_HAS_FLAGS(score, f)   (((score)->match_flags & (f)) == (f))
 

Enumerations

enum  pose_match_flags {
  POSE_MATCH_GOOD = 0x1 , POSE_MATCH_STRONG = 0x2 , POSE_MATCH_POSITION = 0x10 , POSE_MATCH_ORIENT = 0x20 ,
  POSE_HAD_PRIOR = 0x100 , POSE_MATCH_LED_IDS = 0x200
}
 

Functions

static XRT_MAYBE_UNUSED bool pose_rect_has_area (struct pose_rect *rect)
 
void pose_metrics_match_pose_to_blobs (struct xrt_pose *pose, struct t_blob *blobs, int num_blobs, struct t_constellation_tracker_led_model *led_model, t_constellation_device_id_t device_id, struct camera_model *calib, struct pose_metrics_blob_match_info *match_info)
 
void pose_metrics_evaluate_pose (struct pose_metrics *score, struct xrt_pose *pose, struct t_blob *blobs, int num_blobs, struct t_constellation_tracker_led_model *leds_model, t_constellation_device_id_t device_id, struct camera_model *calib, struct pose_rect *out_bounds)
 
void pose_metrics_evaluate_pose_with_prior (struct pose_metrics *score, struct xrt_pose *pose, bool prior_must_match, struct xrt_pose *pose_prior, const struct xrt_vec3 *pos_error_thresh, const struct xrt_vec3 *rot_error_thresh, struct t_blob *blobs, int num_blobs, struct t_constellation_tracker_led_model *led_model, t_constellation_device_id_t device_id, struct camera_model *calib, struct pose_rect *out_bounds)
 
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.
 

Detailed Description

Metrics for constellation tracking poses.

Author
Jan Schmidt jan@c.nosp@m.entr.nosp@m.icula.nosp@m.r.co.nosp@m.m
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Enumeration Type Documentation

◆ pose_match_flags

Enumerator
POSE_MATCH_GOOD 

A reasonable pose match - most LEDs matched to within a few pixels error.

POSE_MATCH_STRONG 

A strong pose match is a match with very low error.

POSE_MATCH_POSITION 

The position of the pose matched the prior well.

POSE_MATCH_ORIENT 

The orientation of the pose matched the prior well.

POSE_HAD_PRIOR 

If a pose prior was supplied when calculating the score, then rot/trans_error are set.

POSE_MATCH_LED_IDS 

The LED IDs on the blobs all matched the LEDs we thought (or were unassigned)

Function Documentation

◆ pose_metrics_score_is_better_pose()

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.

Parameters
old_scoreThe old score to compare against.
new_scoreThe new score to compare against the old score.
Returns
true if the new score is a better pose than the old score, false otherwise.

References POSE_HAD_PRIOR, POSE_MATCH_GOOD, and POSE_MATCH_STRONG.