카메라 캡처 프레임 속도를 30fps로 제한. 다음을 지원하는 기기
ARCore는 60fps를 지원하는 카메라 구성에 우선순위를 두고 있으며
지정할 수도 있습니다 60fps를 지원하는 모든 카메라 구성을 필터링하려면
ArCameraConfigFilter_setTargetFps() 필터를 적용합니다.
(AR_CAMERA_CONFIG_TARGET_FPS_30 사용)
// Return only camera configs that target 30 FPS camera capture frame// rate.ArCameraConfigFilter_setTargetFps(session,filter,AR_CAMERA_CONFIG_TARGET_FPS_30);
ARCore가 심도 센서를 사용하지 못하도록 방지
ARCore가 깊이 센서를 지원함, ARCore가 깊이를 사용하는 카메라 구성에 우선순위를 둠
센서에 있습니다. 심도 센서를 사용하는 모든 카메라 구성을 필터링하려면
ArCameraConfigFilter_setDepthSensorUsage() 드림
AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE를 사용하여 필터링합니다.
대체 GPU 텍스처 해상도 선택. 사용 설정됨
지원되는 기기의 경우 ARCore에서
GPU 텍스처 해상도를 추가로 지원합니다. 저해상도 GPU 텍스처 선택
GPU 부하를 줄이고 메모리를 줄여 앱 성능을 개선하는 데 도움이 될 수 있습니다.
100% 업타임 체크의 성능을 향상하지 않을 수도 있지만
발생할 수 있습니다.
카메라 구성 필터 사용
앱에서 카메라 구성을 필터링하도록 사용 설정하려면 다음 단계를 따르세요.
// Create an ARCore session.ArSession*session;ArSession_create(env,context,&session);// Create a camera config list and filter for the session.ArCameraConfig*selected_config;ArCameraConfigList*configs;ArCameraConfigFilter*filter;ArCameraConfig_create(session,&selected_config);ArCameraConfigList_create(session,&configs);ArCameraConfigFilter_create(session,&filter);// Return only camera configs that target 30 fps camera capture frame rate.ArCameraConfigFilter_setTargetFps(session,filter,AR_CAMERA_CONFIG_TARGET_FPS_30);// Return only camera configs that will not use the depth sensor.ArCameraConfigFilter_setDepthSensorUsage(session,filter,AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE);// Get list of configs that match filter settings.// In this case, this list is guaranteed to contain at least one element,// because both TargetFps.TARGET_FPS_30 and DepthSensorUsage.DO_NOT_USE// are supported on all ARCore supported devices.ArSession_getSupportedCameraConfigsWithFilter(session,filter,configs);// Use element 0 from the list of returned camera configs. This is because// it contains the camera config that best matches the specified filter// settings.ArCameraConfigList_getItem(session,configs,0,selected_config);// Set the camera config to use selected_config.ArSession_setCameraConfig(session,selected_config);// Free memory.ArCameraConfigFilter_destroy(filter);ArCameraConfigList_destroy(configs);
집중 모드
세션 구성에서 집중 모드를 설정할 수도 있습니다. 고정 초점은 일반적으로 추적에 더 적합하며 대부분의 기기에서 ARCore 기본값입니다. 녹화, 사진, 동영상 촬영, 주변 사물이 필요할 때 자동 초점이 필요합니다.
초점을 맞출 것입니다.
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eArCameraConfig\u003c/code\u003e allows developers to control camera properties like ID, depth sensor usage, direction, FPS, and dimensions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can filter available camera configurations based on their app's needs, such as limiting frame rate or disabling the depth sensor.\u003c/p\u003e\n"],["\u003cp\u003eARCore prioritizes camera configs with 60 fps and depth sensor usage, but developers can override these defaults using filters.\u003c/p\u003e\n"],["\u003cp\u003eSelecting a lower GPU texture resolution can potentially improve app performance by reducing GPU load, but it's not always guaranteed.\u003c/p\u003e\n"],["\u003cp\u003eThe focus mode can be set to either fixed (better for tracking) or auto (required for recording and focusing on nearby objects).\u003c/p\u003e\n"]]],[],null,["# Configuring the camera\n\n| **Key Point:** To configure additional custom GPU textures, use the (Java) [shared camera](/ar/develop/java/camera-sharing) feature.\n\n[`ArCameraConfig`](/ar/reference/c/group/cameraconfig#arcameraconfig) describes the properties of the\nunderlying camera sensor, including:\n\n- The camera ID\n- If available, whether a depth sensor will be used\n- The direction the camera is facing:\n - front-facing (selfie)\n - rear-facing (world)\n- FPS (frames per second) range\n- CPU image dimensions\n- GPU texture dimension\n- If present, whether the device's [stereo multi-camera](https://source.android.com/devices/camera/multi-camera) will be used\n\nWhen creating a new ARCore session, ARCore uses\n[`ArSession_setCameraConfig()`](/ar/reference/c/group/session#arsession_setcameraconfig) to set the camera config\nthat best matches the list of available configs returned by\n[`ArSession_getSupportedCameraConfigsWithFilter()`](/ar/reference/c/group/session#arsession_getsupportedcameraconfigswithfilter).\nYour app can use [`ArCameraConfigFilter`](/ar/reference/c/group/session#arsession_getsupportedcameraconfigswithfilter)\nto narrow down the available camera configs for a given device at runtime by\nfiltering based on your app's needs.\n\nCommon use cases for filtering include:\n\n- **Limiting camera capture frame rate to 30 fps** . On devices that support\n 60 fps, ARCore will prioritize camera configs that support that\n frame rate. To filter out all camera configs that support 60 fps,\n apply a filter with [`ArCameraConfigFilter_setTargetFps()`](/ar/reference/c/group/cameraconfig#arcameraconfigtargetfps)\n using `AR_CAMERA_CONFIG_TARGET_FPS_30`.\n\n \u003cbr /\u003e\n\n\n ```c\n // Return only camera configs that target 30 FPS camera capture frame\n // rate.\n ArCameraConfigFilter_setTargetFps(session, filter,\n AR_CAMERA_CONFIG_TARGET_FPS_30);\n ```\n\n \u003cbr /\u003e\n\n- **Prevent ARCore from using the depth sensor** . On devices that have a\n supported depth sensor, ARCore prioritizes camera configs that use the depth\n sensor. To filter out all camera configs that use the depth sensor, apply the\n [`ArCameraConfigFilter_setDepthSensorUsage()`](/ar/reference/c/group/cameraconfig#arcameraconfigdepthsensorusage)\n filter using `AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE`.\n\n \u003cbr /\u003e\n\n\n ```c\n ArCameraConfigFilter_setDepthSensorUsage(\n session, filter, AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE);\n ```\n\n \u003cbr /\u003e\n\n- **Selecting an alternate GPU texture resolution** . On\n [supported devices](/ar/discover/supported-devices), ARCore may provide\n additional GPU texture resolutions. Selecting a lower resolution GPU texture\n may help improve app performance by reducing GPU load and lowering memory\n bandwidth requirements, although is not guaranteed to improve performance in\n all cases.\n\nUsing camera config filters\n---------------------------\n\nFollow these steps to enable your app to filter camera configs. \n\n```c\n// Create an ARCore session.\nArSession* session;\nArSession_create(env, context, &session);\n\n// Create a camera config list and filter for the session.\nArCameraConfig* selected_config;\nArCameraConfigList* configs;\nArCameraConfigFilter* filter;\nArCameraConfig_create(session, &selected_config);\nArCameraConfigList_create(session, &configs);\nArCameraConfigFilter_create(session, &filter);\n\n// Return only camera configs that target 30 fps camera capture frame rate.\nArCameraConfigFilter_setTargetFps(session, filter,\n AR_CAMERA_CONFIG_TARGET_FPS_30);\n\n// Return only camera configs that will not use the depth sensor.\nArCameraConfigFilter_setDepthSensorUsage(\n session, filter, AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE);\n\n// Get list of configs that match filter settings.\n// In this case, this list is guaranteed to contain at least one element,\n// because both TargetFps.TARGET_FPS_30 and DepthSensorUsage.DO_NOT_USE\n// are supported on all ARCore supported devices.\nArSession_getSupportedCameraConfigsWithFilter(session, filter, configs);\n\n// Use element 0 from the list of returned camera configs. This is because\n// it contains the camera config that best matches the specified filter\n// settings.\nArCameraConfigList_getItem(session, configs, 0, selected_config);\n\n// Set the camera config to use selected_config.\nArSession_setCameraConfig(session, selected_config);\n\n// Free memory.\nArCameraConfigFilter_destroy(filter);\nArCameraConfigList_destroy(configs);\n```\n\nFocus mode\n----------\n\nYou can also set the focus mode in the session config. Fixed focus is generally better for tracking (and is the ARCore default on most devices). Auto focus is required for recording, photography, videography, and when nearby objects need\nto be in focus.\n\nSee\n[`ArConfig_setFocusMode()`](/ar/reference/c/group/ar-config#arconfig_setfocusmode)\nfor details."]]