Devices running Android 9 or higher can support
monochrome cameras. Android 10
provides additional support for the Y8 stream format, monochrome and
near-infrared (NIR) color filter array
static metadata, and DngCreator functions for monochrome cameras.
With this capability, device manufacturers can implement a monochrome or NIR camera device and reduce memory use by using the Y8 stream format. A monochrome camera can serve as the underlying physical camera of a logical multi-camera device to achieve better low-light noise characteristics.
Implementation
Hardware requirements
To implement this feature, your device must have a monochrome camera sensor and an image signal processor (ISP) to process the sensor output.
Implement a monochrome camera
To advertise a camera device as a monochrome camera, the Camera HAL must meet the following requirements:
android.sensor.info.colorFilterArrayis set toMONOorNIR.BACKWARD_COMPATIBLErequired keys are supported andMANUAL_POST_PROCESSINGisn't supported.android.control.awbAvailableModesonly containsAUTOandandroid.control.awbStateis eitherCONVERTEDorLOCKEDdepending onandroid.control.awbLock.android.colorCorrection.mode,android.colorCorrection.transform, andandroid.colorCorrection.gainsaren't in available request and result keys. As a result, the camera device isLIMITED.The following color-related static metadata keys aren't present:
android.sensor.referenceIlluminant*android.sensor.calibrationTransform*android.sensor.colorTransform*android.sensor.forwardMatrix*android.sensor.neutralColorPointandroid.sensor.greenSplit
All color channels have the same values for the following metadata keys:
android.sensor.blackLevelPatternandroid.sensor.dynamicBlackLevelandroid.statistics.lensShadingMapandroid.tonemap.curve
android.sensor.noiseProfilehas only one color channel.
For monochrome devices supporting Y8 stream formats, the Camera HAL must support
swapping YUV_420_888 formats in mandatory stream combinations (including
reprocessing) with Y8 formats.
The following public APIs are used in this feature:
- Y8 image format
- SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO
- SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR
- MONOCHROME camera capability (introduced in Android 9)
For more details on the Camera HAL, see docs.html. For more information on related public APIs, see ImageFormat, CameraCharacteristics, CaptureRequest, and CaptureResult.
Validation
To validate your implementation of a monochrome camera, run the following CTS and VTS tests.
CTS tests
testMonochromeCharacteristicsCaptureRequestTestCaptureResultTestStillCaptureTestDngCreatorTest
VTS tests
getCameraCharacteristicsprocessMultiCaptureRequestPreview