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

CameraConfigFilter

public CameraConfigFilter(
  Session session
)

Details
Parameters
session

Public Methods

getDepthSensorUsage

public EnumSet<CameraConfig.DepthSensorUsage> getDepthSensorUsage()

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

getFacingDirection

public CameraConfig.FacingDirection getFacingDirection()

Get the camera facing direction filter state.

getStereoCameraUsage

public EnumSet<CameraConfig.StereoCameraUsage> getStereoCameraUsage()

Get the stereo multi-camera usage filter state.

getTargetFps

public EnumSet<CameraConfig.TargetFps> getTargetFps()

Get the frame rate filter state.

setDepthSensorUsage

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.

Details
Parameters
depthSensorUsageFilters

setFacingDirection

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.

Details
Parameters
facingDirections

setStereoCameraUsage

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

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

Details
Parameters
stereoCameraUsageFilters

setTargetFps

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.

Details
Parameters
frameRates