Skip to main content

calculate_overlap

Function calculate_overlap 

Source
pub fn calculate_overlap(match1: &PatternMatch, match2: &PatternMatch) -> f64
Expand description

Calculate overlap between two pattern matches

Computes the Intersection over Union (IoU) between two rectangular regions. This is a standard metric for measuring overlap in computer vision.

§Arguments

  • match1 - First pattern match
  • match2 - Second pattern match

§Returns

  • f64 - Overlap score between 0.0 (no overlap) and 1.0 (complete overlap)