Flutter Engine
The Flutter Engine
Typedefs | Functions
ImageMetadata

Typedefs

typedef struct ArImageMetadata_ ArImageMetadata
 
typedef struct ArImage_ ArImage
 
typedef struct AImage AImage
 

Functions

void ArImageMetadata_getNdkCameraMetadata (const ArSession *session, const ArImageMetadata *image_metadata, const ACameraMetadata **out_ndk_metadata)
 
void ArImageMetadata_release (ArImageMetadata *metadata)
 
ArStatus ArFrame_acquireCameraImage (ArSession *session, ArFrame *frame, ArImage **out_image)
 
void ArImage_getNdkImage (const ArImage *image, const AImage **out_ndk_image)
 Converts an ArImage object to an Android NDK AImage object. More...
 
void ArImage_release (ArImage *image)
 Releases an instance of ArImage returned by ArFrame_acquireCameraImage(). More...
 

Detailed Description

Provides access to metadata from the camera image capture result.

Typedef Documentation

◆ AImage

typedef struct AImage AImage

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

Definition at line 256 of file arcore_c_api.h.

◆ ArImage

typedef 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_release().

Definition at line 252 of file arcore_c_api.h.

◆ ArImageMetadata

typedef struct ArImageMetadata_ ArImageMetadata

Camera capture metadata (reference type, large data).

Acquire with ArFrame_acquireImageMetadata()
Release with ArImageMetadata_release()

Definition at line 244 of file arcore_c_api.h.

Function Documentation

◆ 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:

Returns
#AR_SUCCESS or any of:
  • #AR_ERROR_INVALID_ARGUMENT - one more input arguments are invalid.
  • #AR_ERROR_DEADLINE_EXCEEDED - the input frame is not the current frame.
  • #AR_ERROR_RESOURCE_EXHAUSTED - the caller app has exceeded maximum number of images that it can hold without releasing.
  • #AR_ERROR_NOT_YET_AVAILABLE - image with the timestamp of the input frame was not found within a bounded amount of time, or the camera failed to produce the image

◆ 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().

◆ 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.