From 43210fe2e8e75ef0dad80282197b224d6b358f00 Mon Sep 17 00:00:00 2001 From: Zhijun He Date: Tue, 12 Apr 2016 23:15:23 -0700 Subject: [PATCH] Camera: clarify lens shading map Lens shading correction should be full correction that corrects both color shading and vignetting. Bug: 18175853 Change-Id: Ia552345b2bd78b1b2eed2472096ebae80680d70b --- .../hardware/camera2/CaptureResult.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 4f41e1c60d86d..e37e0da6d0a1f 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -3599,10 +3599,20 @@ public class CaptureResult extends CameraMetadata> { /** *

The shading map is a low-resolution floating-point map - * that lists the coefficients used to correct for vignetting, for each - * Bayer color channel of RAW image data.

- *

The least shaded section of the image should have a gain factor - * of 1; all other sections should have gains above 1.

+ * that lists the coefficients used to correct for vignetting and color shading, + * for each Bayer color channel of RAW image data.

+ *

The lens shading correction is defined as a full shading correction that + * corrects both color shading for the output non-RAW images. After the + * shading map is applied, the output non-RAW images will be flat-field images + * for flat scenes under uniform illumination.

+ *

When there is no lens shading correction applied to RAW output images + * ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} == false), this map is a full lens + * shading correction map; when there is some lens shading correction applied + * to the RAW output image ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} == true), + * this map reports the remaining lens shading correction map that needs to be + * applied to get fully shading corrected images.

+ *

For a full shading correction map, the least shaded section of the image + * should have a gain factor of 1; all other sections should have gains above 1.

*

When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map * must take into account the colorCorrection settings.

*

The shading map is for the entire active pixel array, and is not