ImageMetadata

Provides access to metadata from the camera image capture result.

Summary

Typedefs

AImage typedef
struct AImage
Forward declaring the AImage struct from Android NDK, which is used in ArImage_getNdkImage().
ArImage typedef
struct ArImage_
Accessing CPU image from the tracking camera (reference type, large data).
ArImageMetadata typedef
struct ArImageMetadata_
Camera capture metadata (reference type, large data).

Functions

ArFrame_acquireCameraImage(ArSession *session, ArFrame *frame, ArImage **out_image)
Gets the image of the tracking camera relative to the input session and frame.
ArImageMetadata_getNdkCameraMetadata(const ArSession *session, const ArImageMetadata *image_metadata, const ACameraMetadata **out_ndk_metadata)
void
Retrieves the capture metadata for the current camera image.
ArImageMetadata_release(ArImageMetadata *metadata)
void
Releases a reference to the metadata.
ArImage_getNdkImage(const ArImage *image, const AImage **out_ndk_image)
void
Converts an ArImage object to an Android NDK AImage object.
ArImage_release(ArImage *image)
void
Releases an instance of ArImage returned by ArFrame_acquireCameraImage().

Typedefs

AImage

struct AImage AImage

Forward declaring the AImage struct from Android NDK, which is used in ArImage_getNdkImage().

ArImage

struct ArImage_ ArImage

Accessing CPU image from the tracking camera (reference type, large data).

Acquire with ArFrame_acquireCameraImage()
Convert to NDK AImage with ArImage_getNdkImage()
Release with ArImage_releaseImage()

ArImageMetadata

struct ArImageMetadata_ ArImageMetadata

Camera capture metadata (reference type, large data).

Acquire with ArFrame_acquireImageMetadata()
Release with ArImageMetadata_release()

Functions

ArFrame_acquireCameraImage

ArStatus ArFrame_acquireCameraImage(
  ArSession *session,
  ArFrame *frame,
  ArImage **out_image
)

Gets the image of the tracking camera relative to the input session and frame.

Return values:

Details
Returns
AR_SUCCESS or any of:

ArImageMetadata_getNdkCameraMetadata

void ArImageMetadata_getNdkCameraMetadata(
  const ArSession *session,
  const ArImageMetadata *image_metadata,
  const ACameraMetadata **out_ndk_metadata
)

Retrieves the capture metadata for the current camera image.

ACameraMetadata is a struct in Android NDK. Include NdkCameraMetadata.h to use this type.

Note: that the ACameraMetadata returned from this function will be invalid after its ArImageMetadata object is released.

ArImageMetadata_release

void ArImageMetadata_release(
  ArImageMetadata *metadata
)

Releases a reference to the metadata.

This must match a call to ArFrame_acquireImageMetadata().

This method may safely be called with nullptr - it will do nothing.

ArImage_getNdkImage

void ArImage_getNdkImage(
  const ArImage *image,
  const AImage **out_ndk_image
)

Converts an ArImage object to an Android NDK AImage object.

ArImage_release

void ArImage_release(
  ArImage *image
)

Releases an instance of ArImage returned by ArFrame_acquireCameraImage().

Send feedback about...