Mathematics & signal processing
Coordinates, normalization, temporal change and adaptive evidence floors from actual source.
Keep the coordinate paths separate
Legacy calibration-relative calculations in PoseNormalizer differ from V3 aspect-correct geometry. Do not mix variables with different length units in one equation. This article covers only formulas located in the implementation.
Image aspect-ratio correction
ImagePlaneGeometry.Project converts normalized image coordinates into an isotropic plane measured in image-height units.
| Notation | Source variable | Units and meaning |
|---|---|---|
CanonicalNormalizedPoint.X/Y | Coordinates normalized to each image extent | |
PoseImageDimensions.Width/Height | Pixel dimensions | |
AspectCorrectImagePoint.X/Y | Image-height units, not meters |
return new AspectCorrectImagePoint(
point.X * dimensions.AspectRatio, point.Y);
The transform corrects unequal image extents. It does not reconstruct depth or world distance. Invalid dimensions cause an exception or TryProject failure. This path’s default joint-confidence gate is 0.50, distinct from the legacy calibration value of 0.45.
Legacy body-relative displacement
PoseNormalizer.TryNormalize divides filtered hip displacement by calibrated shoulder width.
h_{x,t} is filteredHip.X, h_{x,0} is profile.HipCenter.X, and S_0 is profile.ShoulderWidth. The result is a shoulder-width ratio. It does not independently commit a lateral action; shoulder co-motion, torso lean and time gates also apply.
Time-based smoothing
dt is the monotonic capture-time difference in seconds. tau is SmoothingTimeConstantSeconds, with a legacy default of 0.045 s. filteredShoulder and filteredHip, among others, use this update. The weight adapts to the actual sample interval.
The first sample or a timestamp gap above the default 0.35 s uses alpha = 1, breaking continuity with the old filter state. Nonpositive time differences and duplicate or out-of-order sequences are rejected. These settings are not a latency guarantee.
Legacy torso upward velocity
torsoCenter.Y and previousTorsoCenter.Y are midpoints of the filtered shoulder and hip centers; T_0 is profile.TorsoLength. Units are torso lengths per second. First samples, gap resets and unavailable derivatives initialize velocity to zero. That initialization is not observed proof of physical stillness.
V3 adaptive jump evidence floors
JumpV3Parameters incorporates local-rest noise while preserving an absolute floor.
f is the signal’s absolute floor, m is restMedian, and MAD is rawRestMad. RobustStatistics.GaussianConsistencyFactor is 1.4826. Median absolute deviation is computed as . Displacement and velocity floors retain the units of their respective signals.
Negative or nonfinite floors and MAD values, or a nonfinite median, return NaN. The formula does not imply physically validated thresholds. Some V3 absolute floors derive from synthetic evidence.
Numerical edge cases
The aspect-correct AngleDegrees returns NaN when its denominator is at most 1e-12. Legacy MotionMath.Angle returns zero if either segment length is at most 1e-6. Both clamp the cosine to [-1,1] before inverse cosine, but their degenerate outputs differ. Do not treat them as equivalent when changing paths.