ArCameraConfigFilter

Filters available camera configurations.

Summary

Enumerations

ArCameraConfigDepthSensorUsage{
  AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_REQUIRE_AND_USE = 0x0001,
  AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE = 0x0002
}
enum
Depth sensor usage.
ArCameraConfigStereoCameraUsage{
  AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_REQUIRE_AND_USE = 0x0001,
  AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_DO_NOT_USE = 0x0002
}
enum
Stereo camera usage.
ArCameraConfigTargetFps{
  AR_CAMERA_CONFIG_TARGET_FPS_30 = 0x0001,
  AR_CAMERA_CONFIG_TARGET_FPS_60 = 0x0002
}
enum
Target camera capture frame rates.

Typedefs

ArCameraConfigFilter typedef
struct ArCameraConfigFilter_
A camera config filter struct contains the filters that are desired by the application.

Functions

ArCameraConfigFilter_create(const ArSession *session, ArCameraConfigFilter **out_filter)
void
Creates a camera config filter object.
ArCameraConfigFilter_destroy(ArCameraConfigFilter *filter)
void
Releases memory used by the provided camera config filter object.
ArCameraConfigFilter_getDepthSensorUsage(const ArSession *session, ArCameraConfigFilter *filter, uint32_t *out_depth_sensor_usage)
void
Gets the desired depth sensor usages to allow.
ArCameraConfigFilter_getFacingDirection(const ArSession *session, ArCameraConfigFilter *filter, ArCameraConfigFacingDirection *out_facing_direction_filter)
void
Gets the desired camera facing direction to allow.
ArCameraConfigFilter_getStereoCameraUsage(const ArSession *session, ArCameraConfigFilter *filter, uint32_t *out_stereo_camera_usage)
void
Get the stereo multi-camera (https://source.android.com/devices/camera/multi-camera) usage filter state.
ArCameraConfigFilter_getTargetFps(const ArSession *session, ArCameraConfigFilter *filter, uint32_t *out_fps_filters)
void
Gets the desired framerates to allow.
ArCameraConfigFilter_setDepthSensorUsage(const ArSession *session, ArCameraConfigFilter *filter, uint32_t depth_sensor_usage_filters)
void
Sets the desired depth sensor usages to allow.
ArCameraConfigFilter_setFacingDirection(const ArSession *session, ArCameraConfigFilter *filter, ArCameraConfigFacingDirection facing_direction_filter)
void
Sets the desired camera facing direction to allow.
ArCameraConfigFilter_setStereoCameraUsage(const ArSession *session, ArCameraConfigFilter *filter, uint32_t stereo_camera_usage_filters)
void
Sets the stereo multi-camera (https://source.android.com/devices/camera/multi-camera) usage filter.
ArCameraConfigFilter_setTargetFps(const ArSession *session, ArCameraConfigFilter *filter, uint32_t fps_filters)
void
Sets the desired framerates to allow.

Enumerations

ArCameraConfigDepthSensorUsage

 ArCameraConfigDepthSensorUsage

Depth sensor usage.

Properties
AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE

When used as a camera filter, via ArCameraConfigFilter_setDepthSensorUsage, filters for camera configs where a depth sensor is not present, or is present but will not be used by ARCore.

Most commonly used to filter camera configurations when the app requires exclusive access to the depth sensor outside of ARCore, for example to support 3D mesh reconstruction. Available on all ARCore supported devices.

When returned by ArCameraConfig_getDepthSensorUsage, indicates that the camera config will not use a depth sensor, even if it is present.

AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_REQUIRE_AND_USE

When used as a camera filter, via ArCameraConfigFilter_setDepthSensorUsage, filters for camera configs that require a depth sensor to be present on the device, and that will be used by ARCore.

See the ARCore supported devices (https://developers.google.com/ar/devices) page for a list of devices that currently have supported depth sensors.

When returned by ArCameraConfig_getDepthSensorUsage, indicates that a depth sensor is present, and that the camera config will use the available depth sensor.

ArCameraConfigStereoCameraUsage

 ArCameraConfigStereoCameraUsage

Stereo camera usage.

Properties
AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_DO_NOT_USE

When used as a camera filter, via ArCameraConfigFilter_setStereoCameraUsage, indicates that ARCore will not attempt to use a stereo multi-camera (https://source.android.com/devices/camera/multi-camera), even if one is present.

Can be used to limit power consumption. Available on all ARCore supported devices.

When returned by ArCameraConfig_getStereoCameraUsage, indicates that the camera config will not use a stereo camera, even if one is present on the device.

AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_REQUIRE_AND_USE

When used as a camera filter, via ArCameraConfigFilter_setStereoCameraUsage, indicates that a stereo camera must be present on the device, and the stereo multi-camera (https://source.android.com/devices/camera/multi-camera) must be used by ARCore.

Increases CPU and device power consumption. Not supported on all devices.

See the ARCore supported devices (https://developers.google.com/ar/devices) page for a list of devices that currently have supported stereo camera capability.

When returned by ArCameraConfig_getStereoCameraUsage, indicates that a stereo camera is present on the device and that the camera config will use the available stereo camera.

ArCameraConfigTargetFps

 ArCameraConfigTargetFps

Target camera capture frame rates.

The target frame rate represents the maximum or desired frame rate. Actual camera capture frame rates can be lower than the target frame rate under low light conditions in order to accommodate longer exposure times.

Properties
AR_CAMERA_CONFIG_TARGET_FPS_30

Target 30fps camera capture frame rate.

Available on all ARCore supported devices.

Used as a camera filter, via ArCameraConfigFilter_setTargetFps.

AR_CAMERA_CONFIG_TARGET_FPS_60

Target 60fps camera capture frame rate.

Increases power consumption and may increase app memory usage.

See the ARCore supported devices (https://developers.google.com/ar/devices) page for a list of devices that currently support 60fps.

Used as a camera filter, via ArCameraConfigFilter_setTargetFps.

Typedefs

ArCameraConfigFilter

struct ArCameraConfigFilter_ ArCameraConfigFilter

A camera config filter struct contains the filters that are desired by the application.

(value type).

Functions

ArCameraConfigFilter_create

void ArCameraConfigFilter_create(
  const ArSession *session,
  ArCameraConfigFilter **out_filter
)

Creates a camera config filter object.

Details
Parameters
session
The ARCore session
out_filter
A pointer to an ArCameraConfigFilter* to receive the address of the newly allocated ArCameraConfigFilter

ArCameraConfigFilter_destroy

void ArCameraConfigFilter_destroy(
  ArCameraConfigFilter *filter
)

Releases memory used by the provided camera config filter object.

Details
Parameters
filter
The filter to release memory for.

ArCameraConfigFilter_getDepthSensorUsage

void ArCameraConfigFilter_getDepthSensorUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_depth_sensor_usage
)

Gets the desired depth sensor usages to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to query
out_depth_sensor_usage
To be filled in with the desired depth sensor usages allowed

ArCameraConfigFilter_getFacingDirection

void ArCameraConfigFilter_getFacingDirection(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  ArCameraConfigFacingDirection *out_facing_direction_filter
)

Gets the desired camera facing direction to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to query
out_facing_direction_filter
To be filled in with the desired camera facing direction allowed

ArCameraConfigFilter_getStereoCameraUsage

void ArCameraConfigFilter_getStereoCameraUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_stereo_camera_usage
)

Get the stereo multi-camera (https://source.android.com/devices/camera/multi-camera) usage filter state.

Details
Parameters
session
The ARCore session
filter
The filter object to query
out_stereo_camera_usage
To be filled in with the desired stereo camera usages allowed

ArCameraConfigFilter_getTargetFps

void ArCameraConfigFilter_getTargetFps(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_fps_filters
)

Gets the desired framerates to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to query
out_fps_filters
To be filled in with the desired framerates allowed

ArCameraConfigFilter_setDepthSensorUsage

void ArCameraConfigFilter_setDepthSensorUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t depth_sensor_usage_filters
)

Sets the desired depth sensor usages to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to change
depth_sensor_usage_filters
A 32bit integer representing multiple ArCameraConfigDepthSensorUsage values, bitwise-or'd together

ArCameraConfigFilter_setFacingDirection

void ArCameraConfigFilter_setFacingDirection(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  ArCameraConfigFacingDirection facing_direction_filter
)

Sets the desired camera facing direction to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to change
facing_direction_filter
A valid ArCameraConfigFacingDirection enum value

ArCameraConfigFilter_setStereoCameraUsage

void ArCameraConfigFilter_setStereoCameraUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t stereo_camera_usage_filters
)

Sets the stereo multi-camera (https://source.android.com/devices/camera/multi-camera) usage filter.

Default is to not filter.

Details
Parameters
session
The ARCore session
filter
The filter object to change
stereo_camera_usage_filters
A 32bit integer representing multiple ArCameraConfigStereoCameraUsage values, bitwise-or'd together

ArCameraConfigFilter_setTargetFps

void ArCameraConfigFilter_setTargetFps(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t fps_filters
)

Sets the desired framerates to allow.

Details
Parameters
session
The ARCore session
filter
The filter object to change
fps_filters
A 32bit integer representing multiple ArCameraConfigTargetFps values, bitwise-or'd together