Skip to main content

ARDK for Android/com.nianticlabs.ardk.objectdetection/ObjectDetectionSession/calculateViewportMapping

calculateViewportMapping

[androidJvm]
fun calculateViewportMapping(viewportSize: Size, orientation: Orientation): Matrix?

Compute a transform Matrix that maps detection boxes from model frame coordinates into viewport coordinates.

Return​

A Matrix mapping from model space → source image frame space → viewport space.

Parameters​

androidJvm

viewportSizeThe dimensions of the Compose/Android view you are drawing into.
orientationThe current UI Orientation.