2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
モノクロカメラ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android 9 以降を搭載したデバイスは、モノクロカメラに対応しています。Android 10 では、Y8 ストリーム形式、モノクロおよび近赤外線(NIR)カラーフィルタ配列の静的メタデータ、モノクロカメラに関する DngCreator
関数に対するサポートが追加されています。
そのため、デバイス メーカーはモノクロまたは NIR カメラデバイスを実装し、Y8 ストリーム形式を使用してメモリ使用量を削減できます。論理マルチカメラ デバイスを構成する物理カメラとしてモノクロカメラを使用し、低照度ノイズ特性を改善できます。
実装
ハードウェア要件
この機能を実装するには、デバイスにモノクロカメラ センサーと、センサー出力を処理する画像信号処理装置(ISP)が必要です。
モノクロカメラの実装
カメラデバイスをモノクロカメラとしてアドバタイズするには、カメラ HAL が次の要件を満たしている必要があります。
android.sensor.info.colorFilterArray
が MONO
または NIR
に設定されている。
- 必須キーの
BACKWARD_COMPATIBLE
がサポートされ、MANUAL_POST_PROCESSING
がサポートされていない。
android.control.awbAvailableModes
に AUTO
のみが含まれ、android.control.awbState
が android.control.awbLock
に応じて CONVERTED
または LOCKED
に設定されている。
android.colorCorrection.mode
、android.colorCorrection.transform
、android.colorCorrection.gains
が使用可能なリクエストキーと結果キーに含まれていない。そのため、カメラデバイスが LIMITED
である。
色に関連する次の静的メタデータキーが指定されていない。
android.sensor.referenceIlluminant*
android.sensor.calibrationTransform*
android.sensor.colorTransform*
android.sensor.forwardMatrix*
android.sensor.neutralColorPoint
android.sensor.greenSplit
すべてのカラーチャネルの値が次のメタデータキーと同じ。
android.sensor.blackLevelPattern
android.sensor.dynamicBlackLevel
android.statistics.lensShadingMap
android.tonemap.curve
android.sensor.noiseProfile
にカラーチャネルが 1 つのみ指定されている。
Y8 ストリーム形式をサポートするモノクロ デバイスの場合、カメラ HAL は必須ストリームの組み合わせ(再処理を含む)で YUV_420_888
形式と Y8 形式との入れ替えをサポートする必要があります。
この機能では、次の公開 API が使用されます。
カメラ HAL について詳しくは、docs.html をご覧ください。関連する公開 API について詳しくは、ImageFormat、CameraCharacteristics、CaptureRequest、CaptureResult をご覧ください。
検証
モノクロカメラの実装を検証するには、次の CTS テストと VTS テストを実施します。
CTS テスト
testMonochromeCharacteristics
CaptureRequestTest
CaptureResultTest
StillCaptureTest
DngCreatorTest
VTS テスト
getCameraCharacteristics
processMultiCaptureRequestPreview
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-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`"]]