ArImage
Provides access to CPU camera images.
Summary
Enumerations |
|
---|---|
ArImageFormat{
|
enum Image formats produced by ARCore. |
Typedefs |
|
---|---|
ArImage
|
typedefstruct ArImage_
Accessing CPU image from the camera (reference type, large data). |
ArImageCubemap[6]
|
typedefArImage *
Convenient definition for cubemap image storage where it is a fixed size array of 6 ArImage . |
Functions |
|
---|---|
ArImage_getFormat(const ArSession *session, const ArImage *image, ArImageFormat *out_format)
|
void
Gets the image format of the provided
ArImage . |
ArImage_getHeight(const ArSession *session, const ArImage *image, int32_t *out_height)
|
void
Gets the height of the input
ArImage . |
ArImage_getNumberOfPlanes(const ArSession *session, const ArImage *image, int32_t *out_num_planes)
|
void
Gets the number of planes in the provided
ArImage . |
ArImage_getPlaneData(const ArSession *session, const ArImage *image, int32_t plane_index, const uint8_t **out_data, int32_t *out_data_length)
|
void
Gets the data pointer of the provided image for direct application access.
|
ArImage_getPlanePixelStride(const ArSession *session, const ArImage *image, int32_t plane_index, int32_t *out_pixel_stride)
|
void
Gets the byte distance between the start of two consecutive pixels in the image.
|
ArImage_getPlaneRowStride(const ArSession *session, const ArImage *image, int32_t plane_index, int32_t *out_row_stride)
|
void
Gets the number of bytes between the start of two consecutive rows of pixels in the image.
|
ArImage_getTimestamp(const ArSession *session, const ArImage *image, int64_t *out_timestamp_ns)
|
void
Gets the source-specific timestamp of the provided
ArImage in nanoseconds. |
ArImage_getWidth(const ArSession *session, const ArImage *image, int32_t *out_width)
|
void
Gets the width of the input
ArImage . |
ArImage_release(ArImage *image)
|
void
Releases an instance of
ArImage returned by ArFrame_acquireCameraImage . |
Enumerations
ArImageFormat
ArImageFormat
Image formats produced by ARCore.
Properties | |
---|---|
AR_IMAGE_FORMAT_DEPTH16
|
Produced by Integer value equal to DEPTH16. |
AR_IMAGE_FORMAT_D_16
|
Produced by Depth range values in units of millimeters. Integer value equal to D_16. |
AR_IMAGE_FORMAT_INVALID
|
Invalid image format. Produced by ARCore when an invalid session/image is given to |
AR_IMAGE_FORMAT_RGBA_FP16
|
Produced by Integer value equal to Android NDK |
AR_IMAGE_FORMAT_Y8
|
Produced by Integer value equal to |
AR_IMAGE_FORMAT_YUV_420_888
|
Produced by Integer value equal to Android NDK |
Typedefs
ArImage
struct ArImage_ ArImage
Accessing CPU image from the camera (reference type, large data).
- Acquire with:
ArFrame_acquireCameraImage
- Release with:
ArImage_release
.
ArImageCubemap
ArImage * ArImageCubemap[6]
Convenient definition for cubemap image storage where it is a fixed size array of 6 ArImage
.
Functions
ArImage_getFormat
void ArImage_getFormat( const ArSession *session, const ArImage *image, ArImageFormat *out_format )
Gets the image format of the provided ArImage
.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getHeight
void ArImage_getHeight( const ArSession *session, const ArImage *image, int32_t *out_height )
ArImage_getNumberOfPlanes
void ArImage_getNumberOfPlanes( const ArSession *session, const ArImage *image, int32_t *out_num_planes )
Gets the number of planes in the provided ArImage
.
The number of planes and format of data in each plane is format dependent. Use ArImage_getFormat
to determine the format.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getPlaneData
void ArImage_getPlaneData( const ArSession *session, const ArImage *image, int32_t plane_index, const uint8_t **out_data, int32_t *out_data_length )
Gets the data pointer of the provided image for direct application access.
Note that once the ArImage
data is released with ArImage_release
, the data pointer from the corresponding ArImage_getPlaneData
call becomes invalid. Do NOT use it after the ArImage
is released.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getPlanePixelStride
void ArImage_getPlanePixelStride( const ArSession *session, const ArImage *image, int32_t plane_index, int32_t *out_pixel_stride )
Gets the byte distance between the start of two consecutive pixels in the image.
The pixel stride is always greater than 0.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getPlaneRowStride
void ArImage_getPlaneRowStride( const ArSession *session, const ArImage *image, int32_t plane_index, int32_t *out_row_stride )
Gets the number of bytes between the start of two consecutive rows of pixels in the image.
The row stride is always greater than 0.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getTimestamp
void ArImage_getTimestamp( const ArSession *session, const ArImage *image, int64_t *out_timestamp_ns )
Gets the source-specific timestamp of the provided ArImage
in nanoseconds.
The timestamp is normally monotonically increasing. The timestamps for the images from different sources may have different timebases and should not be compared with each other. The specific meaning and timebase of the returned timestamp depends on the source providing images.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArImage_getWidth
void ArImage_getWidth( const ArSession *session, const ArImage *image, int32_t *out_width )
ArImage_release
void ArImage_release( ArImage *image )
Releases an instance of ArImage
returned by ArFrame_acquireCameraImage
.