Skip to content

The Drawing From the Example Code is Based on Landscape Right #190

@cod3kid

Description

@cod3kid

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions