diff --git a/api/current.txt b/api/current.txt
index bbd5bbec43053..b8f1324f02a2b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -15812,6 +15812,7 @@ package android.hardware.camera2 {
field public static final android.hardware.camera2.CameraCharacteristics.Key
To transform a pixel coordinates between two cameras facing the same direction, first
- * the source camera {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} must be corrected for. Then the source
+ * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
* camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
* {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
* relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
@@ -1256,10 +1256,10 @@ public final class CameraCharacteristics extends CameraMetadata
Optional - This value may be {@code null} on some devices.
* + * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_POSE_REFERENCE * @see CameraCharacteristics#LENS_POSE_ROTATION - * @see CameraCharacteristics#LENS_RADIAL_DISTORTION */ @PublicKey public static final Key(0, 0) is the top-left of the
@@ -1318,9 +1318,9 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* + * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION - * @see CameraCharacteristics#LENS_RADIAL_DISTORTION * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE */ @@ -1362,7 +1362,14 @@ public final class CameraCharacteristics extends CameraMetadataThis field was inconsistently defined in terms of its + * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.
+ * + * @see CameraCharacteristics#LENS_DISTORTION + */ + @Deprecated @PublicKey public static final KeyThe correction coefficients to correct for this camera device's + * radial and tangential lens distortion.
+ *Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was + * inconsistently defined.
+ *Three radial distortion coefficients [kappa_1, kappa_2,
+ * kappa_3] and two tangential distortion coefficients
+ * [kappa_4, kappa_5] that can be used to correct the
+ * lens's geometric distortion with the mapping equations:
x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+ * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
+ * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+ * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
+ *
+ * Here, [x_c, y_c] are the coordinates to sample in the
+ * input image that correspond to the pixel values in the
+ * corrected image at the coordinate [x_i, y_i]:
correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
+ *
+ * The pixel coordinates are defined in a coordinate system
+ * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
+ * calibration fields; see that entry for details of the mapping stages.
+ * Both [x_i, y_i] and [x_c, y_c]
+ * have (0,0) at the lens optical center [c_x, c_y], and
+ * the range of the coordinates depends on the focal length
+ * terms of the intrinsic calibration.
Finally, r represents the radial distance from the
+ * optical center, r^2 = x_i^2 + y_i^2.
The distortion model used is the Brown-Conrady model.
+ *Units: + * Unitless coefficients.
+ *Optional - This value may be {@code null} on some devices.
+ * + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION + * @see CameraCharacteristics#LENS_RADIAL_DISTORTION + */ + @PublicKey + public static final KeyList of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported * by this camera device.
@@ -1418,6 +1465,8 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer; replaced by better partials mechanism
+ * @hide */ @Deprecated @@ -1808,6 +1857,8 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -1828,6 +1879,8 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -1844,6 +1897,8 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -1905,6 +1962,8 @@ public final class CameraCharacteristics extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -2544,7 +2603,7 @@ public final class CameraCharacteristics extends CameraMetadataThe currently supported fields that correct for geometric distortion are:
*If all of the geometric distortion fields are no-ops, this rectangle will be the same
* as the post-distortion-corrected rectangle given in
@@ -2557,7 +2616,7 @@ public final class CameraCharacteristics extends CameraMetadata
This key is available on all devices.
* - * @see CameraCharacteristics#LENS_RADIAL_DISTORTION + * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 14c2865cf3e36..7669c018acd15 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -684,7 +684,7 @@ public abstract class CameraMetadataAvailable values for this device:
- * android.Statistics.info.availableOisDataModes
Optional - This value may be {@code null} on some devices.
+ * + * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES * @see #STATISTICS_OIS_DATA_MODE_OFF * @see #STATISTICS_OIS_DATA_MODE_ON */ diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index e84e48f8fbcb2..633194243512f 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2783,7 +2783,7 @@ public class CaptureResult extends CameraMetadata(0.03, 0, 0).
* To transform a pixel coordinates between two cameras facing the same direction, first
- * the source camera {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} must be corrected for. Then the source
+ * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
* camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
* {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
* relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
@@ -2797,10 +2797,10 @@ public class CaptureResult extends CameraMetadata Units: Meters Optional - This value may be {@code null} on some devices.(0,0) is the top-left of the
* preCorrectionActiveArraySize rectangle. Once the pose and
* intrinsic calibration transforms have been applied to a
- * world point, then the {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}
+ * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
* transform needs to be applied, and the result adjusted to
* be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
* system (where (0, 0) is the top-left of the
@@ -2859,9 +2859,9 @@ public class CaptureResult extends CameraMetadata
Optional - This value may be {@code null} on some devices.
* + * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION - * @see CameraCharacteristics#LENS_RADIAL_DISTORTION * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE */ @@ -2903,11 +2903,58 @@ public class CaptureResult extends CameraMetadataOptional - This value may be {@code null} on some devices.
* * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION + * @deprecated + *This field was inconsistently defined in terms of its + * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.
+ * + * @see CameraCharacteristics#LENS_DISTORTION + */ + @Deprecated @PublicKey public static final KeyThe correction coefficients to correct for this camera device's + * radial and tangential lens distortion.
+ *Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was + * inconsistently defined.
+ *Three radial distortion coefficients [kappa_1, kappa_2,
+ * kappa_3] and two tangential distortion coefficients
+ * [kappa_4, kappa_5] that can be used to correct the
+ * lens's geometric distortion with the mapping equations:
x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+ * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
+ * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+ * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
+ *
+ * Here, [x_c, y_c] are the coordinates to sample in the
+ * input image that correspond to the pixel values in the
+ * corrected image at the coordinate [x_i, y_i]:
correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
+ *
+ * The pixel coordinates are defined in a coordinate system
+ * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
+ * calibration fields; see that entry for details of the mapping stages.
+ * Both [x_i, y_i] and [x_c, y_c]
+ * have (0,0) at the lens optical center [c_x, c_y], and
+ * the range of the coordinates depends on the focal length
+ * terms of the intrinsic calibration.
Finally, r represents the radial distance from the
+ * optical center, r^2 = x_i^2 + y_i^2.
The distortion model used is the Brown-Conrady model.
+ *Units: + * Unitless coefficients.
+ *Optional - This value may be {@code null} on some devices.
+ * + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION + * @see CameraCharacteristics#LENS_RADIAL_DISTORTION + */ + @PublicKey + public static final KeyMode of operation for the noise reduction algorithm.
*The noise reduction algorithm attempts to improve image quality by removing
@@ -2981,6 +3028,8 @@ public class CaptureResult extends CameraMetadata
Optional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -2997,6 +3046,8 @@ public class CaptureResult extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Not used in HALv3 or newer
+ * @hide */ @Deprecated @@ -3777,6 +3828,8 @@ public class CaptureResult extends CameraMetadataNever fully implemented or specified; do not use
+ * @hide */ @Deprecated @@ -3801,6 +3854,8 @@ public class CaptureResult extends CameraMetadataOptional - This value may be {@code null} on some devices.
* @deprecated + *Never fully implemented or specified; do not use
+ * @hide */ @Deprecated @@ -3919,8 +3974,10 @@ public class CaptureResult extends CameraMetadataAvailable values for this device:
- * android.Statistics.info.availableOisDataModes
Optional - This value may be {@code null} on some devices.
+ * + * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES * @see #STATISTICS_OIS_DATA_MODE_OFF * @see #STATISTICS_OIS_DATA_MODE_ON */