googlesamples / googlesamples/mlkit
[Bug report] pose.landmarks does not return expected Landmark when retrieved through index
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Retrieving a Pose Landmark by index from `pose.landmarks` does not give expected values.
**To Reproduce**
Example Steps to reproduce the behavior in sample app:
```
let wrist = pose.landmark(ofType: PoseLandmarkType.leftWrist)
print("wrist.x = \(wrist.position.x), .y = \(wrist.position.y)")
print("wrist.x = \(pose.landmarks[15].position.x), .y = \(pose.landmarks[15].position.y)")
```
Running the above should print the same values.
**Expected behavior**
Expected behaviour is that `.landmarks` array in Pose would use same indices as in Documentation (Android uses correct indices). Printing out position values for `pose.landmarks[15]` should give values for LeftWrist as seen in Landmarks image overview from MLKit docs:

**SDK Info:**
- 'GoogleMLKit/PoseDetection', '3.2.0'
**Smartphone:**
- Device: iPhone 11
- iOS Version: 16.1.1
**Development Environment:**
- IDE Eversion: Xcode 14.2
- Laptop/Desktop: MacBook M1 Pro
- OS: MacOS 13.0.1 (22A400)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.