Google is committed to advancing racial equity for Black communities. See how.

CameraConfigFilter

public class CameraConfigFilter

Allows the application to select the camera config filters it needs to enable/disable so that it can obtain the list of camera configs that are supported on the device camera.

Public Constructors

Public Methods

EnumSet<CameraConfig.DepthSensorUsage>
getDepthSensorUsage()
Get the hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage filter state.
CameraConfig.FacingDirection
getFacingDirection()
Get the camera facing direction filter state.
EnumSet<CameraConfig.StereoCameraUsage>
getStereoCameraUsage()
Get the stereo multi-camera usage filter state.
EnumSet<CameraConfig.TargetFps>
getTargetFps()
Get the frame rate filter state.
CameraConfigFilter
setDepthSensorUsage(EnumSet<CameraConfig.DepthSensorUsage> depthSensorUsageFilters)
Sets hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage filter.
CameraConfigFilter
setFacingDirection(CameraConfig.FacingDirection facingDirections)
Sets camera facing direction filter.
CameraConfigFilter
setStereoCameraUsage(EnumSet<CameraConfig.StereoCameraUsage> stereoCameraUsageFilters)
Sets the stereo multi-camera usage filter.
CameraConfigFilter
setTargetFps(EnumSet<CameraConfig.TargetFps> frameRates)
Sets target camera capture frame rate filter.

Inherited Methods

Public Constructors

public CameraConfigFilter (Session session)

Parameters
session

Public Methods

public EnumSet<CameraConfig.DepthSensorUsage> getDepthSensorUsage ()

Get the hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage filter state.

public CameraConfig.FacingDirection getFacingDirection ()

Get the camera facing direction filter state.

public EnumSet<CameraConfig.StereoCameraUsage> getStereoCameraUsage ()

Get the stereo multi-camera usage filter state.

public EnumSet<CameraConfig.TargetFps> getTargetFps ()

Get the frame rate filter state.

public CameraConfigFilter setDepthSensorUsage (EnumSet<CameraConfig.DepthSensorUsage> depthSensorUsageFilters)

Sets hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage filter. Default is to not filter.

Parameters
depthSensorUsageFilters

public CameraConfigFilter setFacingDirection (CameraConfig.FacingDirection facingDirections)

Sets camera facing direction filter.

The default value is CameraConfig.FacingDirection.BACK.

Currently, a back-facing (world) camera is guaranteed to be available on all ARCore supported devices. Most ARCore supported devices also include support for a front-facing (selfie) camera. See ARCore supported devices for available camera configs by device.

Beginning with ARCore SDK 1.23.0, the default value is CameraConfig.FacingDirection.FRONT if the Session is created using the deprecated Session.Feature.FRONT_CAMERA feature.

Parameters
facingDirections

public CameraConfigFilter setStereoCameraUsage (EnumSet<CameraConfig.StereoCameraUsage> stereoCameraUsageFilters)

Sets the stereo multi-camera usage filter. Default is to not filter.

Parameters
stereoCameraUsageFilters

public CameraConfigFilter setTargetFps (EnumSet<CameraConfig.TargetFps> frameRates)

Sets target camera capture frame rate filter.

Default is to not filter on target frame rate.

CameraConfig.TargetFps.TARGET_FPS_30 is guaranteed to be available on all ARCore supported devices. Support for CameraConfig.TargetFps.TARGET_FPS_60 is only available on certain devices. See the ARCore Supported Devices page for a list of affected devices.

Parameters
frameRates