GoogleARCore.Frame.CameraImage

Container for state related to the ARCore camera for the frame.

Summary

Properties

ImageDisplayUvs
Gets UVs that map the orientation and aspect ratio of the image returned by Frame.CameraImage.AcquireCameraImageBytes to that of the device's display.
ImageIntrinsics
Gets the unrotated and uncropped intrinsics for the image (CPU) stream.
Texture
static Texture
Gets a texture used from the device's rear camera.
TextureDisplayUvs
Gets UVs that map the orientation and aspect ratio of Frame.CameraImage.Texture to those of the device's display.
TextureIntrinsics
Gets the unrotated and uncropped intrinsics for the texture (GPU) stream.

Public static functions

AcquireCameraImageBytes()
Attempts to acquire the camera image for CPU access.
GetCameraProjectionMatrix(float nearClipping, float farClipping)
Matrix4x4
Gets the projection matrix for the frame.
TransformCoordinate(Vector2 coordinate, DisplayUvCoordinateType sourceType, DisplayUvCoordinateType targetType)
Vector2
Transforms a coordinate between the source and target display UV coordinate types.

Properties

ImageDisplayUvs

static DisplayUvCoords ImageDisplayUvs

Gets UVs that map the orientation and aspect ratio of the image returned by Frame.CameraImage.AcquireCameraImageBytes to that of the device's display.

ImageIntrinsics

static CameraIntrinsics ImageIntrinsics

Gets the unrotated and uncropped intrinsics for the image (CPU) stream.

Texture

static Texture Texture

Gets a texture used from the device's rear camera.

TextureDisplayUvs

static DisplayUvCoords TextureDisplayUvs

Gets UVs that map the orientation and aspect ratio of Frame.CameraImage.Texture to those of the device's display.

TextureIntrinsics

static CameraIntrinsics TextureIntrinsics

Gets the unrotated and uncropped intrinsics for the texture (GPU) stream.

Public static functions

AcquireCameraImageBytes

GoogleARCore.CameraImageBytes AcquireCameraImageBytes()

Attempts to acquire the camera image for CPU access.

Not supported on all devices (see https://developers.google.com/ar/discover/supported-devices).

Details
Returns
A CameraImageBytes struct with IsAvailable property set to true if successful and false if the image could not be acquired.

GetCameraProjectionMatrix

Matrix4x4 GetCameraProjectionMatrix(
  float nearClipping,
  float farClipping
)

Gets the projection matrix for the frame.

Details
Parameters
nearClipping
The near clipping plane for the projection matrix.
farClipping
The far clipping plane for the projection matrix.
Returns
The projection matrix for the frame.

TransformCoordinate

Vector2 TransformCoordinate(
  Vector2 coordinate,
  DisplayUvCoordinateType sourceType,
  DisplayUvCoordinateType targetType
)

Transforms a coordinate between the source and target display UV coordinate types.

This can be used for the conversion of coordinates accessed in the same Unity update.

Details
Parameters
coordinate
The coordinate to transform.
sourceType
The source type of the desired transformation matrix.
targetType
The target type of the desired transformation matrix.
Returns
A corresponding position in the target frame.

Send feedback about...