From 1b1f1b611c8e648b9737e7930e6982cf117134ce Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Wed, 23 Jul 2014 17:49:08 -0700 Subject: [PATCH] camera2: Move noise model to dynamic metadata. Bug: 16369384 Change-Id: I7a540705176c7be68431a977e2b7218ffa1bddd0 --- api/current.txt | 2 +- .../hardware/camera2/CameraCharacteristics.java | 27 ---------------------- .../android/hardware/camera2/CaptureResult.java | 27 ++++++++++++++++++++++ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/api/current.txt b/api/current.txt index 074a50927f35..0657a74ee160 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12646,7 +12646,6 @@ package android.hardware.camera2 { field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_INFO_TIMESTAMP_CALIBRATION; field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_INFO_WHITE_LEVEL; field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_MAX_ANALOG_SENSITIVITY; - field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_NOISE_PROFILE; field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_ORIENTATION; field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_REFERENCE_ILLUMINANT1; field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_REFERENCE_ILLUMINANT2; @@ -13020,6 +13019,7 @@ package android.hardware.camera2 { field public static final android.hardware.camera2.CaptureResult.Key SENSOR_FRAME_DURATION; field public static final android.hardware.camera2.CaptureResult.Key SENSOR_GREEN_SPLIT; field public static final android.hardware.camera2.CaptureResult.Key SENSOR_NEUTRAL_COLOR_POINT; + field public static final android.hardware.camera2.CaptureResult.Key SENSOR_NOISE_PROFILE; field public static final android.hardware.camera2.CaptureResult.Key SENSOR_ROLLING_SHUTTER_SKEW; field public static final android.hardware.camera2.CaptureResult.Key SENSOR_SENSITIVITY; field public static final android.hardware.camera2.CaptureResult.Key SENSOR_TEST_PATTERN_DATA; diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index f18cb7d22d14..6cb6a24f387c 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -1810,33 +1810,6 @@ public final class CameraCharacteristics extends CameraMetadata("android.sensor.orientation", int.class); /** - *

Noise model coefficients for each CFA mosaic channel.

- *

This tag contains two noise model coefficients for each CFA channel - * corresponding to the sensor amplification (S) and sensor readout - * noise (O). These are given as pairs of coefficients for each channel - * in the same order as channels listed for the CFA layout tag - * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is - * represented as an array of Pair<Double, Double>, where - * the first member of the Pair at index n is the S coefficient and the - * second member is the O coefficient for the nth color channel in the CFA.

- *

These coefficients are used in a two parameter noise model to describe - * the amount of noise present in the image for each CFA channel. The - * noise model used here is:

- *

N(x) = sqrt(Sx + O)

- *

Where x represents the recorded signal of a CFA channel normalized to - * the range [0, 1], and S and O are the noise model coeffiecients for - * that channel.

- *

A more detailed description of the noise model can be found in the - * Adobe DNG specification for the NoiseProfile tag.

- *

Optional - This value may be {@code null} on some devices.

- * - * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT - */ - @PublicKey - public static final Key[]> SENSOR_NOISE_PROFILE = - new Key[]>("android.sensor.noiseProfile", new TypeReference[]>() {{ }}); - - /** *

Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.

*

Optional. Defaults to [OFF].

*

Optional - This value may be {@code null} on some devices.

diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index c9774ed1c6de..20a04f01a638 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2242,6 +2242,33 @@ public class CaptureResult extends CameraMetadata> { new Key("android.sensor.neutralColorPoint", Rational[].class); /** + *

Noise model coefficients for each CFA mosaic channel.

+ *

This tag contains two noise model coefficients for each CFA channel + * corresponding to the sensor amplification (S) and sensor readout + * noise (O). These are given as pairs of coefficients for each channel + * in the same order as channels listed for the CFA layout tag + * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is + * represented as an array of Pair<Double, Double>, where + * the first member of the Pair at index n is the S coefficient and the + * second member is the O coefficient for the nth color channel in the CFA.

+ *

These coefficients are used in a two parameter noise model to describe + * the amount of noise present in the image for each CFA channel. The + * noise model used here is:

+ *

N(x) = sqrt(Sx + O)

+ *

Where x represents the recorded signal of a CFA channel normalized to + * the range [0, 1], and S and O are the noise model coeffiecients for + * that channel.

+ *

A more detailed description of the noise model can be found in the + * Adobe DNG specification for the NoiseProfile tag.

+ *

Optional - This value may be {@code null} on some devices.

+ * + * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT + */ + @PublicKey + public static final Key[]> SENSOR_NOISE_PROFILE = + new Key[]>("android.sensor.noiseProfile", new TypeReference[]>() {{ }}); + + /** *

The worst-case divergence between Bayer green channels.

*

This value is an estimate of the worst case split between the * Bayer green channels in the red and blue rows in the sensor color -- 2.11.0