2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
카메라 빛망울 효과
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
카메라의 빛망울 효과는 초점이 맞지 않도록 장면의 일부를 블러 처리하여 만들어진 얕은 피사계 심도 효과입니다. 휴대기기의 카메라에서 빛망울 효과는 두 카메라의 스테레오 비전이나 단일 카메라의 듀얼 포토다이오드(PD)에서 가져온 심도 정보를 사용하여 만듭니다.
Android 11부터 Android 플랫폼은 빛망울 효과 구현을 지원하고 타사 앱에서 이 기능을 사용할 수 있도록 API를 제공합니다.
구현
기기에서 카메라의 빛망울 효과 기능을 사용하려면 다음을 실행합니다.
ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES
를 알립니다.
이 태그는 3자리 정수 튜플 배열 형식으로, 각 튜플은 {mode, maxWidth, maxHeight}
형식입니다. {ANDROID_CONTROL_EXTENDED_SCENE_MODE_DISABLED, 0, 0}
외에도 카메라 HAL은 ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE
모드와 ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS
모드 중 하나 또는 둘 모두를 상응하는 최대 스트리밍 크기와 함께 나열해야 합니다.
ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES
를 알립니다.
이 태그는 {minZoomRatio, maxZoomRatio}
배열 형식으로, 이 배열에는 사용 설정된 확장 장면 모드의 모든 확대/축소 비율 범위가 ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES
에서와 동일한 순서로 포함됩니다. 확대/축소 범위 [1.0, 1.0]
은 확대/축소가 지원되지 않는다는 의미입니다.
ANDROID_CONTROL_AVAILABLE_MODES
에서 ANDROID_CONTROL_USE_EXTENDED_SCENE_MODE
를 채웁니다.
앱에서 빛망울 효과 기능을 트리거하려면 앱에서 ANDROID_CONTROL_MODE
를 ANDROID_CONTROL_USE_EXTENDED_SCENE_MODE
로, ANDROID_CONTROL_EXTENDED_SCENE_MODE
를 지원되는 확장 장면 모드 중 하나로 설정해야 합니다.
빛망울 효과를 구현하면 스테레오 계산으로 인해 메모리가 추가로 소비될 수 있습니다.
지원되는 확장 장면 모드를 프레임별로 적용할 수 없어 사용 설정/사용 중지 시 예상치 못한 지연이 발생한다면 ANDROID_CONTROL_EXTENDED_SCENE_MODE
를 ANDROID_REQUEST_AVAILABLE_SESSION_KEYS
에 포함합니다. 동시에 ICameraDeviceSession::isReconfigurationRequired()
메서드를 구현하여 재구성이 필요하지 않은 확장 장면 모드의 재구성을 방지합니다.
유효성 검사
기기의 빛망울 효과 기능을 검사하려면 다음 CTS, VTS, CTS 인증 도구 테스트를 실행하세요.
CtsCameraTestCases
VtsHalCameraProviderV2_4TargetTest
- CTS 인증 도구의
CameraBokehTest
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# Camera bokeh is a shallow depth-of-field effect created by blurring out parts of\na scene so that they're not in focus. On cameras on mobile devices, bokeh is\nachieved using depth information acquired from the stereo vision from two\ncameras or from dual photodiodes (PDs) of a single camera.\n\nStarting from Android 11, the Android platform\nsupports bokeh implementations and provides APIs to make the feature available\nto third-party apps.\n\nImplementation\n--------------\n\nTo make the camera bokeh feature available on your device, do the following:\n\n- Advertise `ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES`:\n\n This tag is in the format of a three-integer tuple array, with each tuple\n in the format of `{mode, maxWidth, maxHeight}`. In addition to\n `{ANDROID_CONTROL_EXTENDED_SCENE_MODE_DISABLED, 0, 0}`, the camera HAL must\n also list one or both of the\n `ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE` and\n `ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS` modes with their\n corresponding maximum streaming sizes.\n- Advertise\n `ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES`:\n\n This tag is in the format of a `{minZoomRatio, maxZoomRatio}` array,\n which contains all the zoom ratio ranges for an enabled extended scene\n mode, in the same order as in\n `ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES`. A zoom range of\n `[1.0, 1.0]` means that zoom isn't supported.\n- Populate `ANDROID_CONTROL_USE_EXTENDED_SCENE_MODE` in\n `ANDROID_CONTROL_AVAILABLE_MODES`.\n\nFor an app to trigger the bokeh feature, the app must set `ANDROID_CONTROL_MODE`\nto `ANDROID_CONTROL_USE_EXTENDED_SCENE_MODE` and\n`ANDROID_CONTROL_EXTENDED_SCENE_MODE` to one of supported extended scene modes.\nNote that implementing bokeh might lead to extra memory consumption because of\nstereo computation.\n\nIf a supported extended scene mode can't be applied per frame and results in\nunexpected delays when enabled/disabled, include\n`ANDROID_CONTROL_EXTENDED_SCENE_MODE` in\n`ANDROID_REQUEST_AVAILABLE_SESSION_KEYS`. At the same time, implement the\n`ICameraDeviceSession::isReconfigurationRequired()` method to avoid\nreconfiguration for extended scene modes that don't require reconfiguration.\n\nValidation\n----------\n\nTo validate the bokeh feature on your device, run the following CTS, VTS, and\nCTS Verifier tests:\n\n- `CtsCameraTestCases`\n- `VtsHalCameraProviderV2_4TargetTest`\n- `CameraBokehTest` in CTS Verifier"]]