Obtains the minimum and maximum camera capture rate in frames per second (fps) for the current
camera config. Actual capture frame rate will vary within this range, depending on current
lighting conditions. Frame rates will generally be lower under poor lighting conditions due to
longer exposure times.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCameraConfig\u003c/code\u003e class in ARCore provides information about a camera's configuration, such as image and texture sizes, and depth sensor usage.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access details like camera ID, facing direction, FPS range, and image/texture dimensions using the class's public methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCameraConfig\u003c/code\u003e includes nested classes that specify depth sensor usage, facing direction, stereo camera usage, and target frame rates.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes the same camera ID as returned by Camera2's \u003ccode\u003eCameraManager.getCameraIdList()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe actual camera capture frame rate can fluctuate within the specified FPS range, influenced by factors like lighting conditions.\u003c/p\u003e\n"]]],[],null,["# CameraConfig\n\n`\npublic class\n`**CameraConfig**`\n` \nProvides details of a camera configuration such as size of the CPU image and GPU texture. \n\nNested Classes\n--------------\n\n|----------|---|---|----------------------------------------------------------------|\n| ` enum ` | [CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage) || Depth sensor usage. |\n| ` enum ` | [CameraConfig.FacingDirection](/ar/reference/java/com/google/ar/core/CameraConfig.FacingDirection) || Describes the direction a camera looks relative to the device. |\n| ` enum ` | [CameraConfig.StereoCameraUsage](/ar/reference/java/com/google/ar/core/CameraConfig.StereoCameraUsage) || Stereo camera usage. |\n| ` enum ` | [CameraConfig.TargetFps](/ar/reference/java/com/google/ar/core/CameraConfig.TargetFps) || Target camera capture frame rates. |\n\nPublic Methods\n--------------\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | [getCameraId](/ar/reference/java/com/google/ar/core/CameraConfig#getCameraId())`()` Gets the camera identifier associated with this config. |\n| ` `[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)` ` | [getDepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig#getDepthSensorUsage())`()` Obtains the depth sensor usage for the current camera config. |\n| ` `[CameraConfig.FacingDirection](/ar/reference/java/com/google/ar/core/CameraConfig.FacingDirection)` ` | [getFacingDirection](/ar/reference/java/com/google/ar/core/CameraConfig#getFacingDirection())`()` Returns the direction a camera is facing relative to the device. |\n| ` `[Range](https://developer.android.com/reference/android/util/Range)`\u003c`[Integer](https://developer.android.com/reference/java/lang/Integer)`\u003e ` | [getFpsRange](/ar/reference/java/com/google/ar/core/CameraConfig#getFpsRange())`()` Obtains the minimum and maximum camera capture rate in frames per second (fps) for the current camera config. |\n| ` `[Size](https://developer.android.com/reference/android/util/Size)` ` | [getImageSize](/ar/reference/java/com/google/ar/core/CameraConfig#getImageSize())`()` Gets the dimensions of the image frames for processing that are sent on CPU stream. |\n| ` `[CameraConfig.StereoCameraUsage](/ar/reference/java/com/google/ar/core/CameraConfig.StereoCameraUsage)` ` | [getStereoCameraUsage](/ar/reference/java/com/google/ar/core/CameraConfig#getStereoCameraUsage())`()` Obtains the stereo [multi-camera](https://source.android.com/devices/camera/multi-camera) usage for the current camera config. |\n| ` `[Size](https://developer.android.com/reference/android/util/Size)` ` | [getTextureSize](/ar/reference/java/com/google/ar/core/CameraConfig#getTextureSize())`()` Gets the dimensions of the image frames for texture that are sent on GPU stream. |\n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nPublic Methods\n--------------\n\n#### public\n[String](https://developer.android.com/reference/java/lang/String)\ngetCameraId\n()\n\n### getCameraId\n\n```java\npublic String getCameraId()\n``` \nGets the camera identifier associated with this config. This camera ID is the same ID as\nreturned by Camera2 `CameraManager.getCameraIdList()`.\n\n#### public\n[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)\ngetDepthSensorUsage\n()\n\n### getDepthSensorUsage\n\n```java\npublic CameraConfig.DepthSensorUsage getDepthSensorUsage()\n``` \nObtains the depth sensor usage for the current camera config.\n\n#### public\n[CameraConfig.FacingDirection](/ar/reference/java/com/google/ar/core/CameraConfig.FacingDirection)\ngetFacingDirection\n()\n\n### getFacingDirection\n\n```java\npublic CameraConfig.FacingDirection getFacingDirection()\n``` \nReturns the direction a camera is facing relative to the device.\n\n#### public\n[Range](https://developer.android.com/reference/android/util/Range)\\\u003c[Integer](https://developer.android.com/reference/java/lang/Integer)\\\u003e\ngetFpsRange\n()\n\n### getFpsRange\n\n```java\npublic Range\u003cInteger\u003e getFpsRange()\n``` \nObtains the minimum and maximum camera capture rate in frames per second (fps) for the current\ncamera config. Actual capture frame rate will vary within this range, depending on current\nlighting conditions. Frame rates will generally be lower under poor lighting conditions due to\nlonger exposure times.\n\n#### public\n[Size](https://developer.android.com/reference/android/util/Size)\ngetImageSize\n()\n\n### getImageSize\n\n```java\npublic Size getImageSize()\n``` \nGets the dimensions of the image frames for processing that are sent on CPU stream.\n\n#### public\n[CameraConfig.StereoCameraUsage](/ar/reference/java/com/google/ar/core/CameraConfig.StereoCameraUsage)\ngetStereoCameraUsage\n()\n\n### getStereoCameraUsage\n\n```java\npublic CameraConfig.StereoCameraUsage getStereoCameraUsage()\n``` \nObtains the stereo [multi-camera](https://source.android.com/devices/camera/multi-camera) usage for the\ncurrent camera config.\n\n#### public\n[Size](https://developer.android.com/reference/android/util/Size)\ngetTextureSize\n()\n\n### getTextureSize\n\n```java\npublic Size getTextureSize()\n``` \nGets the dimensions of the image frames for texture that are sent on GPU stream."]]