Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
aparaty monochromatyczne,
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Urządzenia z Androidem w wersji 9 lub nowszej mogą obsługiwać aparaty monochromatyczne. Android 10 zapewnia dodatkową obsługę formatu strumienia Y8, statycznych metadanych matrycy filtra kolorów monochromatycznych i podczerwieni (NIR) oraz funkcji DngCreator
w przypadku kamer monochromatycznych.
Dzięki tej funkcji producenci urządzeń mogą stosować kamery monochromatyczne lub podczerwieni i zmniejszyć wykorzystanie pamięci, korzystając z formatu strumienia Y8. Aparat monochromatyczny może służyć jako aparat fizyczny urządzenia z wieloma aparatami, aby uzyskać lepsze właściwości dotyczące szumów przy słabym oświetleniu.
Implementacja
Wymagania sprzętowe
Aby wdrożyć tę funkcję, urządzenie musi mieć monochromatyczny czujnik aparatu i procesor sygnału obrazu (ISP) do przetwarzania danych wyjściowych czujnika.
Wdróż kamerę monochromatyczną
Aby reklamować urządzenie z kamerą jako urządzenie z kamerą monochromatyczną, interfejs Camera HAL musi spełniać te wymagania:
android.sensor.info.colorFilterArray
ma wartość MONO
lub NIR
.
- Obsługiwane są klucze wymagane
BACKWARD_COMPATIBLE
, a nie obsługiwany jest klucz MANUAL_POST_PROCESSING
.
- Element
android.control.awbAvailableModes
zawiera tylko element AUTO
, a element android.control.awbState
ma wartość CONVERTED
lub LOCKED
w zależności od elementu android.control.awbLock
.
android.colorCorrection.mode
, android.colorCorrection.transform
i android.colorCorrection.gains
nie są dostępne w kluczach żądania i rezultatu. W związku z tym kamera jestLIMITED
.
Nie ma tych kluczy metadanych statycznego dotyczących kolorów:
android.sensor.referenceIlluminant*
android.sensor.calibrationTransform*
android.sensor.colorTransform*
android.sensor.forwardMatrix*
android.sensor.neutralColorPoint
android.sensor.greenSplit
Wszystkie kanały kolorów mają te same wartości w przypadku tych kluczy metadanych:
android.sensor.blackLevelPattern
android.sensor.dynamicBlackLevel
android.statistics.lensShadingMap
android.tonemap.curve
android.sensor.noiseProfile
ma tylko jeden kanał kolorów.
W przypadku urządzeń monochromatycznych obsługujących formaty strumienia Y8 interfejs HAL aparatu musi obsługiwać zastępowanie formatów YUV_420_888
w obowiązkowych kombinacjach strumieni (w tym ponowne przetwarzanie) za pomocą formatów Y8.
Ta funkcja korzysta z tych publicznych interfejsów API:
Więcej informacji o interfejsie HAL aparatu znajdziesz w dokumentacji.
Więcej informacji o powiązanych interfejsach API znajdziesz w dokumentacji dotyczącej ImageFormat, CameraCharacteristics, CaptureRequest oraz CaptureResult.
Weryfikacja
Aby zweryfikować implementację monochromatycznej kamery, uruchom te testy CTS i VTS.
Testy CTS
testMonochromeCharacteristics
CaptureRequestTest
CaptureResultTest
StillCaptureTest
DngCreatorTest
Testy VTS
getCameraCharacteristics
processMultiCaptureRequestPreview
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-07-26 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-26 UTC."],[],[],null,["# Monochrome cameras\n\nDevices running Android 9 or higher can support\nmonochrome cameras. Android 10\nprovides additional support for the Y8 stream format, monochrome and\nnear-infrared (NIR) color filter array\nstatic metadata, and `DngCreator` functions for monochrome cameras.\n\nWith this capability, device manufacturers can implement a monochrome or\nNIR camera device and reduce memory use by using\nthe Y8 stream format. A monochrome camera can serve as the underlying physical\ncamera of a\n[logical multi-camera device](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA)\nto achieve better low-light noise characteristics.\n\nImplementation\n--------------\n\n### Hardware requirements\n\nTo implement this feature, your device must have a monochrome camera sensor and\nan image signal processor (ISP) to process the sensor output.\n\n### Implement a monochrome camera\n\nTo advertise a camera device as a monochrome camera, the\n[Camera HAL](/docs/core/camera/camera3) must meet\nthe following requirements:\n\n- `android.sensor.info.colorFilterArray` is set to `MONO` or `NIR`.\n- `BACKWARD_COMPATIBLE` required keys are supported and `MANUAL_POST_PROCESSING` isn't supported.\n- `android.control.awbAvailableModes` only contains `AUTO` and `android.control.awbState` is either `CONVERTED` or `LOCKED` depending on `android.control.awbLock`.\n- `android.colorCorrection.mode`, `android.colorCorrection.transform`, and `android.colorCorrection.gains` aren't in available request and result keys. As a result, the camera device is [`LIMITED`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED).\n- The following color-related static metadata keys aren't present:\n\n - `android.sensor.referenceIlluminant*`\n - `android.sensor.calibrationTransform*`\n - `android.sensor.colorTransform*`\n - `android.sensor.forwardMatrix*`\n - `android.sensor.neutralColorPoint`\n - `android.sensor.greenSplit`\n- All color channels have the same values for the following metadata keys:\n\n - `android.sensor.blackLevelPattern`\n - `android.sensor.dynamicBlackLevel`\n - `android.statistics.lensShadingMap`\n - `android.tonemap.curve`\n- `android.sensor.noiseProfile` has only one color channel.\n\nFor monochrome devices supporting Y8 stream formats, the Camera HAL must support\nswapping `YUV_420_888` formats in mandatory stream combinations (including\nreprocessing) with Y8 formats.\n\nThe following public APIs are used in this feature:\n\n- [Y8 image format](https://developer.android.com/reference/android/graphics/ImageFormat#Y8)\n- [SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO)\n- [SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR)\n- [MONOCHROME camera capability](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME) (introduced in Android 9)\n\nFor more details on the Camera HAL, see\n[docs.html](https://android.googlesource.com/platform/system/media/+/android16-release/camera/docs/docs.html).\nFor more information on related public APIs, see\n[ImageFormat](https://developer.android.com/reference/android/graphics/ImageFormat),\n[CameraCharacteristics](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics),\n[CaptureRequest](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest),\nand\n[CaptureResult](https://developer.android.com/reference/android/hardware/camera2/CaptureResult).\n\nValidation\n----------\n\nTo validate your implementation of a monochrome camera, run the following CTS\nand VTS tests.\n\n### CTS tests\n\n- `testMonochromeCharacteristics`\n- `CaptureRequestTest`\n- `CaptureResultTest`\n- `StillCaptureTest`\n- `DngCreatorTest`\n\n### VTS tests\n\n- `getCameraCharacteristics`\n- `processMultiCaptureRequestPreview`"]]