The Problem
The Skia drawing was appearing in landscape orientation even when holding the phone in portrait mode. The bounding boxes from object detection were drawn in the wrong position/orientation.
Root Cause
The issue was a coordinate space mismatch between:
MediaPipe's bounding boxes: Returned in the raw camera buffer coordinates (landscape 1920×1080)
Reported image dimensions: MPImage.width/height was returning the orientation-adjusted dimensions (portrait 1080×1920)
No rotation transformation: The bounding box coordinates were never rotated to match the displayed portrait orientation