diff options
| author | Igor Murashkin <iam@google.com> | 2013-12-11 13:31:38 -0800 |
|---|---|---|
| committer | Igor Murashkin <iam@google.com> | 2013-12-16 11:43:49 -0800 |
| commit | 7a9b30e9e3e45d387d2fc0cb2bd2eb79da7dd268 (patch) | |
| tree | 38c1f2ad12bc7d0da1e831f0ef6a6a9028b5ca87 /core/java/android | |
| parent | f7a38a09ff4d7b3cf7f2e975e18562335e0cbcf3 (diff) | |
camera2: Add support for embedding images into javadoc
- Also finishes specifying CaptureResult#LENS_SHADING_MAP family
Bug: 12135317
Change-Id: I95ffd61872fefcf2c79cb4f5aa0740162ccc16ad
Diffstat (limited to 'core/java/android')
3 files changed, 42 insertions, 10 deletions
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 5f9c8c2a9290..6f5af9c02334 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -267,8 +267,9 @@ public final class CameraCharacteristics extends CameraMetadata { new Key<Float>("android.lens.info.minimumFocusDistance", float.class); /** - * <p>Dimensions of lens shading - * map</p> + * <p>Dimensions of lens shading map.</p> + * <p>The map should be on the order of 30-40 rows and columns, and + * must be smaller than 64x64.</p> */ public static final Key<android.hardware.camera2.Size> LENS_INFO_SHADING_MAP_SIZE = new Key<android.hardware.camera2.Size>("android.lens.info.shadingMapSize", android.hardware.camera2.Size.class); diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 9304cd0d7032..5474e611fdb6 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -842,7 +842,7 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable { * shading map in output result metadata</p> * <p>When set to ON, * android.statistics.lensShadingMap must be provided in - * the output result metdata.</p> + * the output result metadata.</p> * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON */ diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 2d686f9bc567..9e4133f9d435 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -664,15 +664,46 @@ public final class CaptureResult extends CameraMetadata { new Key<byte[]>("android.statistics.faceScores", byte[].class); /** - * <p>A low-resolution map of lens shading, per - * color channel</p> - * <p>Assume bilinear interpolation of map. The least - * shaded section of the image should have a gain factor - * of 1; all other sections should have gains above 1. - * the map should be on the order of 30-40 rows, and - * must be smaller than 64x64.</p> + * <p>The shading map is a low-resolution floating-point map + * that lists the coefficients used to correct for vignetting, for each + * Bayer color channel.</p> + * <p>The least shaded section of the image should have a gain factor + * of 1; all other sections should have gains above 1.</p> * <p>When android.colorCorrection.mode = TRANSFORM_MATRIX, the map * must take into account the colorCorrection settings.</p> + * <p>The shading map is for the entire active pixel array, and is not + * affected by the crop region specified in the request. Each shading map + * entry is the value of the shading compensation map over a specific + * pixel on the sensor. Specifically, with a (N x M) resolution shading + * map, and an active pixel array size (W x H), shading map entry + * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at + * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. + * The map is assumed to be bilinearly interpolated between the sample points.</p> + * <p>The channel order is [R, Geven, Godd, B], where Geven is the green + * channel for the even rows of a Bayer pattern, and Godd is the odd rows. + * The shading map is stored in a fully interleaved format, and its size + * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p> + * <p>The shading map should have on the order of 30-40 rows and columns, + * and must be smaller than 64x64.</p> + * <p>As an example, given a very small map defined as:</p> + * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ] + * android.statistics.lensShadingMap = + * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, + * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, + * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, + * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, + * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] + * </code></pre> + * <p>The low-resolution scaling map images for each channel are + * (displayed using nearest-neighbor interpolation):</p> + * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" /> + * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" /> + * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" /> + * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p> + * <p>As a visualization only, inverting the full-color map to recover an + * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p> + * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p> */ public static final Key<float[]> STATISTICS_LENS_SHADING_MAP = new Key<float[]>("android.statistics.lensShadingMap", float[].class); |
