This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: restore pre-4.15 Skeleton.width/height contract on iOS (v4.15.6)

v4.15 replaced the old pointForCaptureDevicePointOfInterest-based
mapSkeletonToPreview with direct aspect-fit/fill math and — as a side
effect — changed what Skeleton.width / Skeleton.height mean:

pre-4.15: size of the VISIBLE sensor region projected onto the preview
layer, in preview points.
(abs of pointForCaptureDevicePointOfInterest((0,0))
vs pointForCaptureDevicePointOfInterest((1,1))
= source dims × aspect-fit/fill scale)

v4.15.x: full preview layer bounds in points (too wide in FIT;
too narrow in FILL).

Downstream consumers that normalize via `joint.x / skeleton.width` saw
skeletons drawn at the wrong scale after the bump. Joint x/y values
themselves were unchanged across versions (both return preview points),
so the fix is localized: set width/height = oriW*scale, oriH*scale.

AnalysisObject.boundingBox still goes through the original
pointForCaptureDevicePointOfInterest path (preserved pre-4.15 values);
AnalysisObject.frameSize is unchanged (oriented sensor dims). No
other consumer-visible coord shape changed.

New Skeleton fields (leftHeel / rightHeel / leftToe / rightToe /
leftIndex / rightIndex) are additive — default to null for consumers
that don't reference them.

Version 4.15.6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+14 -3
+1 -1
posedetection/build.gradle.kts
··· 4 4 5 5 mavenPublishing { 6 6 publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) 7 - coordinates("com.performancecoachlab.posedetection", "posedetection-compose", "4.15.5") 7 + coordinates("com.performancecoachlab.posedetection", "posedetection-compose", "4.15.6") 8 8 9 9 pom { 10 10 name.set("Pose Detection")
+13 -2
posedetection/src/iosMain/kotlin/com/performancecoachlab/posedetection/camera/CameraEngine.kt
··· 1523 1523 return Skeleton.SkeletonCoordinate(px.toFloat(), py.toFloat()) 1524 1524 } 1525 1525 1526 + // Width/height preserve the pre-4.15 contract: size of the VISIBLE 1527 + // sensor region as projected onto the preview layer, in preview points. 1528 + // Pre-4.15 derived these from 1529 + // pointForCaptureDevicePointOfInterest((0,0)..(1,1)) 1530 + // diff, which for any videoGravity equals the source dims scaled by the 1531 + // aspect-fit/fill scale factor. Keeping this stable means downstream 1532 + // consumers that normalize via `joint.x / skeleton.width` keep working 1533 + // unchanged across the 4.14 → 4.15+ bump. 1534 + val visibleW = (oriW * scale).toFloat() 1535 + val visibleH = (oriH * scale).toFloat() 1536 + 1526 1537 return Skeleton( 1527 1538 timestamp = skeleton.timestamp, 1528 1539 leftShoulder = mapPoint(skeleton.leftShoulder), ··· 1543 1554 rightToe = mapPoint(skeleton.rightToe), 1544 1555 leftIndex = mapPoint(skeleton.leftIndex), 1545 1556 rightIndex = mapPoint(skeleton.rightIndex), 1546 - width = bw.toFloat(), 1547 - height = bh.toFloat(), 1557 + width = visibleW, 1558 + height = visibleH, 1548 1559 ) 1549 1560 }