From abf0b8b0a8515d8a8a3eaebf471eed7b40bcedfa Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Wed, 19 Aug 2015 16:21:15 -0700 Subject: Camera: Fix depth documentation issues - Correct spelling of quaternion - LENS_INTRINSIC_CALIBRATION and LENS_RADIAL_DISTORTION were not linkifying correctly Bug: 23360503 Change-Id: I9c5acc0087d7115548b75ccfa1bc1eb1866557b2 --- .../hardware/camera2/CameraCharacteristics.java | 26 +++++++++++++--------- .../android/hardware/camera2/CameraMetadata.java | 6 +++-- .../android/hardware/camera2/CaptureResult.java | 23 +++++++++++-------- 3 files changed, 34 insertions(+), 21 deletions(-) (limited to 'core/java/android/hardware/camera2') diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 5583920..a2ef078 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -1003,13 +1003,13 @@ public final class CameraCharacteristics extends CameraMetadataThe orientation of the camera relative to the sensor * coordinate system.

- *

The four coefficients that describe the quarternion + *

The four coefficients that describe the quaternion * rotation from the Android sensor coordinate system to a * camera-aligned coordinate system where the X-axis is * aligned with the long side of the image sensor, the Y-axis * is aligned with the short side of the image sensor, and * the Z-axis is aligned with the optical axis of the sensor.

- *

To convert from the quarternion coefficients (x,y,z,w) + *

To convert from the quaternion coefficients (x,y,z,w) * to the axis of rotation (a_x, a_y, a_z) and rotation * amount theta, the following formulas can be used:

*
 theta = 2 * acos(w)
@@ -1018,7 +1018,7 @@ public final class CameraCharacteristics extends CameraMetadata
*

To create a 3x3 rotation matrix that applies the rotation - * defined by this quarternion, the following matrix can be + * defined by this quaternion, the following matrix can be * used:

*
R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
@@ -1030,7 +1030,7 @@ public final class CameraCharacteristics extends CameraMetadatawhere p is in the device sensor coordinate system, and
      *  p' is in the camera-oriented coordinate system.

*

Units: - * Quarternion coefficients

+ * Quaternion coefficients

*

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

*/ @PublicKey @@ -1052,13 +1052,13 @@ public final class CameraCharacteristics extends CameraMetadata(0.03, 0, 0)
.

*

To transform a pixel coordinates between two cameras * facing the same direction, first the source camera - * android.lens.radialDistortion must be corrected for. Then - * the source camera android.lens.intrinsicCalibration needs + * {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} 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 camera, and - * finally the inverse of android.lens.intrinsicCalibration + * finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} * of the destination camera. This obtains a * radial-distortion-free coordinate in the destination * camera pixel coordinates.

@@ -1069,7 +1069,9 @@ public final class CameraCharacteristics extends CameraMetadataUnits: Meters

*

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

* + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_POSE_ROTATION + * @see CameraCharacteristics#LENS_RADIAL_DISTORTION */ @PublicKey public static final Key LENS_POSE_TRANSLATION = @@ -1115,7 +1117,7 @@ public final class CameraCharacteristics extends CameraMetadata(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 android.lens.radialDistortion + * world point, then the {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} * 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 @@ -1130,6 +1132,7 @@ public final class CameraCharacteristics extends CameraMetadata
*

The pixel coordinates are defined in a normalized * coordinate system related to the - * android.lens.intrinsicCalibration calibration fields. + * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields. * Both [x_i, y_i] and [x_c, y_c] have (0,0) at the * lens optical center [c_x, c_y]. The maximum magnitudes * of both x and y coordinates are normalized to be 1 at the @@ -1169,6 +1172,8 @@ public final class CameraCharacteristics extends CameraMetadataUnits: * Unitless coefficients.

*

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

+ * + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION */ @PublicKey public static final Key LENS_RADIAL_DISTORTION = @@ -2262,7 +2267,7 @@ public final class CameraCharacteristics extends CameraMetadata *

The currently supported fields that correct for geometric distortion are:

*
    - *
  1. android.lens.radialDistortion.
  2. + *
  3. {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}.
  4. *
*

If all of the geometric distortion fields are no-ops, this rectangle will be the same * as the post-distortion-corrected rectangle given in @@ -2275,6 +2280,7 @@ public final class CameraCharacteristics extends CameraMetadataUnits: Pixel coordinates on the image sensor

*

This key is available on all devices.

* + * @see CameraCharacteristics#LENS_RADIAL_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 c580083..35a1d96 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -647,8 +647,8 @@ public abstract class CameraMetadata { * {@link android.hardware.camera2.CaptureResult }:
    *
  • {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}
  • *
  • {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}
  • - *
  • android.lens.intrinsicCalibration
  • - *
  • android.lens.radialDistortion
  • + *
  • {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
  • + *
  • {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}
  • *
* *
  • The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.
  • @@ -667,8 +667,10 @@ public abstract class CameraMetadata { * * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE * @see CameraCharacteristics#LENS_FACING + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION + * @see CameraCharacteristics#LENS_RADIAL_DISTORTION * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index d5511c1..46eddb3 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2602,13 +2602,13 @@ public class CaptureResult extends CameraMetadata> { /** *

    The orientation of the camera relative to the sensor * coordinate system.

    - *

    The four coefficients that describe the quarternion + *

    The four coefficients that describe the quaternion * rotation from the Android sensor coordinate system to a * camera-aligned coordinate system where the X-axis is * aligned with the long side of the image sensor, the Y-axis * is aligned with the short side of the image sensor, and * the Z-axis is aligned with the optical axis of the sensor.

    - *

    To convert from the quarternion coefficients (x,y,z,w) + *

    To convert from the quaternion coefficients (x,y,z,w) * to the axis of rotation (a_x, a_y, a_z) and rotation * amount theta, the following formulas can be used:

    *
     theta = 2 * acos(w)
    @@ -2617,7 +2617,7 @@ public class CaptureResult extends CameraMetadata> {
          * a_z = z / sin(theta/2)
          * 
    *

    To create a 3x3 rotation matrix that applies the rotation - * defined by this quarternion, the following matrix can be + * defined by this quaternion, the following matrix can be * used:

    *
    R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
          *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
    @@ -2629,7 +2629,7 @@ public class CaptureResult extends CameraMetadata> {
          * 

    where p is in the device sensor coordinate system, and * p' is in the camera-oriented coordinate system.

    *

    Units: - * Quarternion coefficients

    + * Quaternion coefficients

    *

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

    */ @PublicKey @@ -2651,13 +2651,13 @@ public class CaptureResult extends CameraMetadata> { * user's perspective) will report (0.03, 0, 0).

    *

    To transform a pixel coordinates between two cameras * facing the same direction, first the source camera - * android.lens.radialDistortion must be corrected for. Then - * the source camera android.lens.intrinsicCalibration needs + * {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} 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 camera, and - * finally the inverse of android.lens.intrinsicCalibration + * finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} * of the destination camera. This obtains a * radial-distortion-free coordinate in the destination * camera pixel coordinates.

    @@ -2668,7 +2668,9 @@ public class CaptureResult extends CameraMetadata> { *

    Units: Meters

    *

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

    * + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_POSE_ROTATION + * @see CameraCharacteristics#LENS_RADIAL_DISTORTION */ @PublicKey public static final Key LENS_POSE_TRANSLATION = @@ -2714,7 +2716,7 @@ public class CaptureResult extends CameraMetadata> { * where (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 android.lens.radialDistortion + * world point, then the {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} * 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 @@ -2729,6 +2731,7 @@ public class CaptureResult extends CameraMetadata> { * * @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 */ @@ -2755,7 +2758,7 @@ public class CaptureResult extends CameraMetadata> { *
    *

    The pixel coordinates are defined in a normalized * coordinate system related to the - * android.lens.intrinsicCalibration calibration fields. + * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields. * Both [x_i, y_i] and [x_c, y_c] have (0,0) at the * lens optical center [c_x, c_y]. The maximum magnitudes * of both x and y coordinates are normalized to be 1 at the @@ -2768,6 +2771,8 @@ public class CaptureResult extends CameraMetadata> { *

    Units: * Unitless coefficients.

    *

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

    + * + * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION */ @PublicKey public static final Key LENS_RADIAL_DISTORTION = -- cgit v1.1