Skip to main content

ARDK for Android/com.nianticlabs.ardk.utils/ImageMath/displayTransform

displayTransform

[androidJvm]
fun displayTransform(orientation: Orientation, viewportSize: Size, imageSize: Size): Matrix

Returns an affine transform Matrix that maps normalized image coordinates into a coordinate space suitable for rendering the camera image in the given viewport and orientation.

Return​

A Matrix that converts normalized image coordinates (origin top-left, range 0.0–1.0) into the coordinate space of the viewport.

Parameters​

androidJvm

orientationThe current interface orientation of the device’s UI.
viewportSizeThe size of the viewport in which the image will be rendered, in pixels.
imageSizeThe dimensions of the camera image, in pixels.