pub fn parse_orientation_angle(
label: &str,
confidence: f32,
threshold: Option<f32>,
valid_angles: &[f32],
) -> OrientationResultExpand description
Parses orientation angle from various label formats
This function provides robust parsing that can handle:
- String labels: “0”, “90”, “180”, “270”
- Numeric strings: “0.0”, “90.0”, etc.
- Direct numeric values when converted to strings
§Arguments
label- The label string to parseconfidence- The confidence score for this predictionthreshold- Optional confidence thresholdvalid_angles- Set of valid angles to accept
§Returns
An OrientationResult containing the parsed angle and confidence information