Home / TangoPosture Community Edition / Technical Docs / Metrics Technical Specification
Metrics Technical Specification¶
| Provenance | Value |
|---|---|
| Source repository | TangoMovementLabs/TangoPostureOpenCommunity |
| Application version | 0.5.3 |
| Source commit SHA | 09038960daee |
| Generated / updated (UTC) | 2026-11-27T19:38:11Z |
Head Forward (head_forward)¶
- Definition: Measured
head_forwardposture observable defined insrc/tango_posture/domain.py. - Validation status:
verified_from_source - Input landmarks:
unverified - Mathematical formula:
unverified - Units:
torso_lengths - Coordinate system: unverified
- Preconditions: Landmark visibility >= configured confidence threshold
- Calibration requirements: Normalized against user-approved calibration baseline when configured.
- Confidence handling: Marks observation UNKNOWN when required landmarks fail reliability checks.
- Missing data handling: Explicitly emits None / UNKNOWN; does not fabricate approximations.
- Temporal aggregation: Exponential smoothing + entry/clear hysteresis when evaluated over time.
- Thresholds:
head_down_duration=Field(default=3.0, gt=0),head_down_angle=Field(default=-15.0, lt=0),head_forward=Threshold(entry=0.08, clear=0.05) - Associated events: DeviationEvent
- Associated episodes: Session practice episodes
- Known limitations: Single-camera monocular pose estimation degrades under occlusion or low lighting.
- Test coverage: tests/integration/test_storage_session.py, tests/qt/test_analytics.py, tests/qt/test_calibration_editor.py, tests/qt/test_couple_qt.py, tests/qt/test_practice_worker.py, tests/qt/test_shell.py, tests/qt/test_solo_camera_calibration_ui.py, tests/unit/test_geometry_quality.py, tests/unit/test_range_profiles.py, tests/unit/test_settings.py, tests/unit/test_solo_camera_session.py, tests/unit/test_temporal_calibration.py
- Source implementation:
src/tango_posture/calibration/baseline.py#L1 - Discrepancies flagged for review: Existing doc
assets/docs/SOLO_AND_COUPLE_METRICS_MANUAL.htmlmentions 'degrees' on line referencinghead_forward, whereas source definestorso_lengths.
Head Inclination (head_inclination)¶
- Definition: Measured
head_inclinationposture observable defined insrc/tango_posture/domain.py. - Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
unverified - Units:
degrees - Coordinate system: unverified
- Preconditions: Landmark visibility >= configured confidence threshold
- Calibration requirements: Normalized against user-approved calibration baseline when configured.
- Confidence handling: Marks observation UNKNOWN when required landmarks fail reliability checks.
- Missing data handling: Explicitly emits None / UNKNOWN; does not fabricate approximations.
- Temporal aggregation: Exponential smoothing + entry/clear hysteresis when evaluated over time.
- Thresholds:
head_down_duration=Field(default=3.0, gt=0),head_down_angle=Field(default=-15.0, lt=0),head_inclination=Threshold(entry=10, clear=6) - Associated events: DeviationEvent
- Associated episodes: Session practice episodes
- Known limitations: Single-camera monocular pose estimation degrades under occlusion or low lighting.
- Test coverage: tests/qt/test_analytics.py, tests/qt/test_calibration_editor.py, tests/qt/test_practice_worker.py, tests/qt/test_shell.py, tests/qt/test_solo_camera_calibration_ui.py, tests/unit/test_geometry_quality.py, tests/unit/test_measurement_normalization.py, tests/unit/test_range_profiles.py, tests/unit/test_settings.py, tests/unit/test_solo_camera_session.py, tests/unit/test_temporal_calibration.py
- Source implementation:
src/tango_posture/calibration/camera_session.py#L1
Trunk Inclination (trunk_inclination)¶
- Definition: Measured
trunk_inclinationposture observable defined insrc/tango_posture/domain.py. - Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
unverified - Units:
degrees - Coordinate system: unverified
- Preconditions: Landmark visibility >= configured confidence threshold
- Calibration requirements: Normalized against user-approved calibration baseline when configured.
- Confidence handling: Marks observation UNKNOWN when required landmarks fail reliability checks.
- Missing data handling: Explicitly emits None / UNKNOWN; does not fabricate approximations.
- Temporal aggregation: Exponential smoothing + entry/clear hysteresis when evaluated over time.
- Thresholds:
trunk_inclination=Threshold(entry=8, clear=5) - Associated events: DeviationEvent
- Associated episodes: Session practice episodes
- Known limitations: Single-camera monocular pose estimation degrades under occlusion or low lighting.
- Test coverage: tests/qt/test_analytics.py, tests/qt/test_calibration_editor.py, tests/qt/test_practice_worker.py, tests/qt/test_shell.py, tests/qt/test_solo_camera_calibration_ui.py, tests/unit/test_geometry_quality.py, tests/unit/test_measurement_normalization.py, tests/unit/test_range_profiles.py, tests/unit/test_settings.py, tests/unit/test_solo_camera_session.py
- Source implementation:
src/tango_posture/calibration/camera_session.py#L1
Prepare Side Measurement Frame (prepare_side_measurement_frame)¶
- Definition: Repair occluded far-side torso joints in side view so near-side measurements stay valid.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/calibration/camera_session.py#L445
Ledger Metric Samples (ledger_metric_samples)¶
- Definition: Compute metric time series honoring per-phase side/facing ledger entries.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_solo_camera_session.py
- Source implementation:
src/tango_posture/calibration/camera_session.py#L627
Evaluate Metric Repeat Check (evaluate_metric_repeat_check)¶
- Definition: Run repeat_check() on neutral A, changed A, neutral B, changed B plus optional sign check.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/qt/test_calibration_editor.py, tests/unit/test_solo_camera_session.py
- Source implementation:
src/tango_posture/calibration/camera_session.py#L851
Measure Ranges (measure_ranges)¶
- Definition: Use only confidence-qualified landmarks and existing measurement definitions.
- Validation status:
verified_from_source - Input landmarks:
unverified - Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/integration/test_app.py, tests/qt/test_analytics.py, tests/qt/test_calibration_editor.py, tests/unit/test_range_profiles.py
- Source implementation:
src/tango_posture/calibration/measurements.py#L30
Measure Profile (measure_profile)¶
- Definition: Use the same per-view measurement path in approval and subsequent scoring.
- Validation status:
verified_from_source - Input landmarks:
unverified - Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_range_profiles.py
- Source implementation:
src/tango_posture/calibration/measurements.py#L93
Measure Targets (measure_targets)¶
- Definition: Metric computation
measure_targetsextracted fromsrc/tango_posture/calibration/measurements.py. - Validation status:
partially_verified - Input landmarks:
unverified - Mathematical formula:
unverified - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_range_profiles.py
- Source implementation:
src/tango_posture/calibration/measurements.py#L98
Metric Samples (metric_samples)¶
- Definition: Metric computation
metric_samplesextracted fromsrc/tango_posture/calibration/measurements.py. - Validation status:
partially_verified - Input landmarks:
unverified - Mathematical formula:
unverified - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_range_profiles.py, tests/unit/test_solo_camera_session.py
- Source implementation:
src/tango_posture/calibration/measurements.py#L120
Measure Hold Window (measure_hold_window)¶
- Definition: Measure one hold window on real frames without interpolation.
- Validation status:
verified_from_source - Input landmarks: nose
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/calibration/normalization.py#L480
Metric Offset Between (metric_offset_between)¶
- Definition: Compute signed offset
bmappingpractice_value + b -> reference_value. - Validation status:
verified_from_source - Input landmarks: nose
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
ratio - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_measurement_normalization.py
- Source implementation:
src/tango_posture/calibration/normalization.py#L538
Metric Error (metric_error)¶
- Definition: Distance between two metric values on
metric's domain. - Validation status:
verified_from_source - Input landmarks: nose
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/calibration/normalization.py#L544
Apply Metric Offset (apply_metric_offset)¶
- Definition: Apply additive adjustment
offsetcleanly for linear or cyclic metrics. - Validation status:
verified_from_source - Input landmarks: nose
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
ratio - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_measurement_normalization.py
- Source implementation:
src/tango_posture/calibration/normalization.py#L563
Normalize Metric Observation (normalize_metric_observation)¶
- Definition: Resolve one frame's raw value, applied adjustment, and Evaluator input.
- Validation status:
verified_from_source - Input landmarks: nose
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/calibration/normalization.py#L847
Resolve Close Embrace Frame Poses (resolve_close_embrace_frame_poses)¶
- Definition: Split a merged close-embrace single detection into left/right dancer poses when valid.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_hip, right_hip, left_knee, right_knee, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/couple/tracking.py#L989
Head Horizontal Alignment (head_horizontal_alignment)¶
- Definition: Return (angle_degrees_from_horizontal, ear_landmark, nose_landmark).
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
degrees - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
head_down_duration=Field(default=3.0, gt=0),head_down_angle=Field(default=-15.0, lt=0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L46
Shoulder Tension Alignment (shoulder_tension_alignment)¶
- Definition: Return (elevation_pct, raw_clearance_ratio, ear_landmark, shoulder_landmark).
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
percent - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
shoulder_tension_duration=Field(default=1.0, gt=0),shoulder_raise_threshold=Field(default=10.0, gt=0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L107
Embrace Openness Score (embrace_openness_score)¶
- Definition: Compute a continuous openness score in [0.0, 1.5] for an active
LEADERorFOLLOWERembrace. - Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
ratio - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
embrace_closed_threshold=Field(default=0.72, gt=0, le=1.0),embrace_hysteresis_seconds=Field(default=1.0, ge=0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/geometry.py#L251
Detect Embrace Type (detect_embrace_type)¶
- Definition: Classify an active embrace (
LEADERorFOLLOWER) asCLOSEDorOPEN. - Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L369
Knee Bend Alignment (knee_bend_alignment)¶
- Definition: Return (knee_bend_degrees, visible_leg_triplets).
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
degrees - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Return (knee_bend_degrees, visible_leg_triplets).; Uses the minimum bend across visible reliable legs (or the camera-facing side when the
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
knee_straight_duration=Field(default=1.0, gt=0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L470
Ankle Lift Alignment (ankle_lift_alignment)¶
- Definition: Return (lift_ratio_of_leg_length, lifted_ankle, grounded_ankle).
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
ratio - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
ankle_high_lift_ratio=Field(default=0.06, gt=0, le=1.0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L540
Torso Axis Alignment (torso_axis_alignment)¶
- Definition: Return (tilt_degrees, shoulder_midpoint, hip_midpoint) for the visible torso.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
degrees - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Return (tilt_degrees, shoulder_midpoint, hip_midpoint) for the visible torso.
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/qt/test_calibration_editor.py, tests/unit/test_range_profiles.py, tests/unit/test_torso_axis.py
- Source implementation:
src/tango_posture/geometry.py#L738
Axis Curve Alignment (axis_curve_alignment)¶
- Definition: Return (deviation_ratio, raw_offset_ratio, head_back_landmark, hip_landmark, ankle_landmark, proj_landmark).
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_ankle, right_ankle
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
ratio - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
axis_curve_duration=Field(default=1.5, gt=0),axis_curve_clear_duration=Field(default=0.75, gt=0) - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_geometry_quality.py
- Source implementation:
src/tango_posture/geometry.py#L765
Wrapped Angle Diff (wrapped_angle_diff)¶
- Definition: Return signed shortest angular difference
current_deg - previous_degin(-180, 180]. - Validation status:
verified_from_source - Input landmarks: left_shoulder, right_shoulder, left_hip, right_hip
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
degrees - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_movement.py
- Source implementation:
src/tango_posture/movement.py#L99
Unwrap Angles (unwrap_angles)¶
- Definition: Unwrap a sequence of angles in degrees across the
±180°boundary. - Validation status:
verified_from_source - Input landmarks: left_shoulder, right_shoulder, left_hip, right_hip
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
degrees - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage: tests/unit/test_movement.py
- Source implementation:
src/tango_posture/movement.py#L105
Draw Head Alignment (draw_head_alignment)¶
- Definition: Draw ear-to-nose head alignment lines relative to horizontal.
- Validation status:
verified_from_source - Input landmarks: nose, left_ear, right_ear, left_shoulder, right_shoulder
- Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/overlay.py#L172
Render Coach Head Alignment (render_coach_head_alignment)¶
- Definition: Draw head alignment lines from raw cached landmarks, independent of posture coaching.
- Validation status:
verified_from_source - Input landmarks:
unverified - Mathematical formula:
Computed geometrically from 2D landmark vectors (see docstring and source line). - Units:
unverified - Coordinate system: Normalized image coordinates [0, 1] scaled to frame dimensions
- Preconditions: Required landmarks must pass visibility floor
- Calibration requirements: Optional personal neutral offset / baseline normalization.
- Confidence handling: Returns None when required landmarks fall below visibility floor.
- Missing data handling: Returns None (explicitly untracked) rather than synthetic values.
- Temporal aggregation: Smoothed with exponential time-constant filter and hysteresis where applicable.
- Thresholds:
unverified - Associated events:
none / unverified - Associated episodes:
none / unverified - Known limitations: Subject to camera framing, clothing contrast, and landmark occlusion.
- Test coverage:
unverified - Source implementation:
src/tango_posture/references/coach.py#L728
Code vs. Documentation Discrepancies¶
- head_forward: Existing doc
assets/docs/SOLO_AND_COUPLE_METRICS_MANUAL.htmlmentions 'degrees' on line referencinghead_forward, whereas source definestorso_lengths. (src/tango_posture/calibration/baseline.py)
Source References¶
src/tango_posture/calibration/baseline.pysrc/tango_posture/calibration/camera_session.pysrc/tango_posture/calibration/measurements.pysrc/tango_posture/calibration/normalization.pysrc/tango_posture/couple/tracking.pysrc/tango_posture/geometry.pysrc/tango_posture/movement.pysrc/tango_posture/overlay.pysrc/tango_posture/references/coach.py
← Previous: Package Structure & API Reference · Next: Data Contracts & Configuration Reference →