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

Camera configs

ArCameraConfig describes the properties of the underlying camera sensor, including:

  • The camera id
  • If available, whether a depth sensor will be used
  • The direction the camera is facing:
    • front-facing (selfie)
    • rear-facing (world)
  • FPS (frames per second) range
  • CPU image dimensions
  • GPU texture dimension

When creating a new ARCore session, ARCore uses ArSession_setCameraConfig() to set the camera config that best matches the list of available configs returned by ArSession_getSupportedCameraConfigsWithFilter(). Your app can use ArCameraConfigFilter to narrow down the available camera configs for a given device at runtime by filtering based on your app's needs.

Common use cases for filtering include:

  • Limiting camera capture frame rate to 30 fps. On devices that support 60 fps, ARCore will prioritize camera configs that support that frame rate. To filter out all camera configs that support 60 fps, apply a filter with ArCameraConfigFilter_setTargetFps() using AR_CAMERA_CONFIG_TARGET_FPS_30.

    // Return only camera configs that target 30 fps camera capture frame rate. ArCameraConfigFilter_setTargetFps(AR_CAMERA_CONFIG_TARGET_FPS_30);