UCM Analysis Scripts — Changelog
Created 2026-05-05
Tags
Related: analysis-plan
2026-05-05 — v1.1
Section titled “2026-05-05 — v1.1”analyze_lunge.py
Section titled “analyze_lunge.py”- Metric change: Replaced Foundation Displacement Index (mean Euclidean displacement, normalized by triangle side length) with Shin Angle Delta — absolute change in front shin angle (toe→knee from vertical) between pos1 and pos2. This better captures the key controlled variable (shin orientation) and is body-proportional without an arbitrary normalization step.
- Output column:
FDI→shin_angle_delta_deg - Added
DIAGNOSTIC = Falsevariable at top of script for in-editor toggle;--diagnosticCLI flag still works and takes OR precedence.
analyze_isolate.py
Section titled “analyze_isolate.py”- Camera calibration: Added optional
--pos1argument. If provided, the trunk tilt angle measured in pos1 is subtracted from pos2 as a camera-level offset. Shear angle is unaffected (both lines undergo the same projection tilt). - Diagnostic labels: Shortened anatomical labels from
R.Shoulder/L.Shoulder/R.Hip/L.HiptoRS/LS/RH/LH. - Label convention: Labels reflect third-person/camera view — image-left = person’s right side.
- Added
DIAGNOSTIC = Falsevariable at top of script.
analyze_tilt.py
Section titled “analyze_tilt.py”- Diagnostic labels: Updated trunk labels to
RS/LS/RH/LHand wrist labels toRW/LW(previouslyR.Wrist/L.Wrist). Shorter labels reduce visual clutter on diagnostic images. - Label convention: Labels reflect third-person/camera view — image-left = person’s right side.
- Added
DIAGNOSTIC = Falsevariable at top of script.
2026-05-05 — v1.0 (initial)
Section titled “2026-05-05 — v1.0 (initial)”All scripts
Section titled “All scripts”- Shared marker detection via HSV thresholding (lime green default, cyan option). Morphological cleanup for partial occlusion. Returns centroids sorted by spatial position.
--diagnosticCLI flag (off by default): saves annotated PNG with markers circled and labelled alongside the input image.--colorCLI flag:green(default) orcyan.
analyze_lunge.py
Section titled “analyze_lunge.py”- Input: pos1.png + pos2.png
- Detects 3 markers (front toe, front knee, back knee); sorts by spatial position.
- Output CSV:
lunge,<filename>,<FDI>
analyze_isolate.py
Section titled “analyze_isolate.py”- Input: pos2.png (single image)
- Detects 4 markers sorted as rectangle (TL/TR/BL/BR).
- Output CSV:
isolate,<filename>,<trunk_tilt_deg>,<shear_angle_deg>
analyze_tilt.py
Section titled “analyze_tilt.py”- Input: pos2.png (single image)
- Detects 6 markers; identifies wrists as outermost by x-coordinate; inner 4 = trunk rectangle.
- Output CSV:
tilt,<filename>,<shear_angle_deg>,<arm_decoupling_deg>