Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Camera2 i CameraX udostępniają interfejs Extensions API, który umożliwia aplikacji dostęp do tych rozszerzeń zaimplementowanych przez dostawców na urządzeniach z Androidem:
Automatycznie: dostosowuje tryb rozszerzenia do tła bieżącej sceny, co zależy od implementacji biblioteki dostawcy. Na przykład przy słabym oświetleniu tryb automatyczny przełącza się na tryb nocny, aby zrobić zdjęcie. W przypadku zdjęć portretowych funkcja Automatycznie stosuje retusz twarzy lub efekt bokeh.
Bokeh: wyostrza obiekt na pierwszym planie i rozmywa tło.
Zwykle używany do robienia portretów z miękkim, nieostrym tłem.
Retusz twarzy: poprawia teksturę skóry, cienie pod oczami i inne elementy.
HDR (High Dynamic Range): poszerza zakres ekspozycji, dzięki czemu zdjęcia są bardziej żywe. W trybie HDR aparat robi kilka zdjęć o różnych wartościach ekspozycji i łączy je w jedno.
Noc:rozjaśnia zdjęcia przy słabym oświetleniu. Aparat robi kilka zdjęć o różnych wartościach ekspozycji i łączy je w jedno. Może to potrwać kilka sekund. Użytkownik powinien trzymać telefon nieruchomo, dopóki aparat nie zrobi zdjęć.
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-27 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-27 UTC."],[],[],null,["# Camera extensions\n\n[Camera2](/training/camera2) and [CameraX](/training/camerax) provide an Extensions\nAPI that lets your app access the following extensions that vendors have implemented\non Android devices:\n\n- **Auto:** adjusts the extension mode according to the current scene background, which depends on the vendor library implementation. For example, in low light scenarios, Auto switches to Night to take a picture. For portrait photos, Auto applies Face Retouch or Bokeh.\n- **Bokeh:** sharpens the foreground subject and blurs the background. Usually used to take portrait photos of people with a soft, out-of-focus background.\n- **Face Retouch:** touches up skin texture, under-eye tone, and more.\n- **HDR (High Dynamic Range):** widens exposure range, resulting in more vivid photos. In HDR mode, the camera takes several photos with various exposure values and merges them into one.\n- **Night:** brightens photos in low-light situations. The camera takes several photos at various exposure values and merge them into one. This process can take several seconds, and the user should hold the phone still while the camera captures photos.\n\nThe [Camera2](/training/camera2/extensions-api) and\n[CameraX](/training/camerax/extensions-api) Extension APIs expose the same set\nof extensions, which are available on many\n[supported devices](/training/camera/supported-devices).\n| **Note:** Camera2 and CameraX extensions are only available for the preview and image capture use cases, not video capture.\n\nSupported devices\n-----------------\n\nNot all devices support extensions, and even if a device has\nextensions support, it does not support all extensions.\n\nFor a list of known devices that support extensions,\nsee [Supported devices](/training/camera/supported-devices). To check if\nan extension is available on your device, see the\n[Camera2 Extensions API](/training/camera2/extensions-api) and\n[CameraX Extensions API](/training/camerax/extensions-api)\ndocumentation, respectively.\n\nNext steps\n----------\n\nLearn how to enable camera extensions for your app:\n\n- [Camera2 Extensions API documentation](/training/camera2/extensions-api).\n- [CameraX Extensions API documentation](/training/camerax/extensions-api)."]]