Skip to main content

associate_greedy_iou

Function associate_greedy_iou 

Source
pub fn associate_greedy_iou(
    detections: &[Detection],
    det_order: &[u16],
    n_order: usize,
    det_eligible: &[bool],
    track_boxes: &[Detection; 32],
    track_class: &[u64; 32],
    track_active: &[bool; 32],
    track_used: &mut [bool; 32],
    class_gated: bool,
    iou_thresh: f32,
    det_matched: &mut [bool],
    det_to_track: &mut [u16],
) -> usize
Expand description

Greedy IoU match for one association pass (high-score or low-score stage).

  • det_order[0..n_order] — detection indices in preferred order (usually score-desc).
  • det_eligible[di] — true if this detection may participate in this stage.
  • track_boxes[ti] / track_class[ti] — geometry and class of active tracks.
  • track_active[ti] — slot occupied; track_used[ti] — already matched this frame.
  • On match: sets track_used[ti], det_matched[di], det_to_track[di] = ti.

Returns the number of pairs formed.