Strategies
Contains 3 functions for strategies.Functions
validate_strategy
- Validate that strategy string(s) are valid.get_anchor_position
- Get the position of a specific anchor point on the bounding box.check_detection_in_region
- Check if a detection is within a region based on the trigger strategy.
validate_strategy
Validate that strategy string(s) are valid.Function Signature
Returns
The validated strategy (unchanged if valid)
Example
Example
get_anchor_position
Get the position of a specific anchor point on the bounding box.Function Signature
Returns
Tuple of (x, y) coordinates for the anchor point
Example
Example
check_detection_in_region
Check if a detection is within a region based on the trigger strategy.Function Signature
Returns
True if detection is in region according to strategy, False otherwise
Example
Example