From 2d96092030f7bcd3c5c0de53dc8a97bbe3c2e0c4 Mon Sep 17 00:00:00 2001
From: Eino-Ville Talvala Mode of operation for the lens distortion correction block. Type: byte (acamera_metadata_enum_android_distortion_correction_mode_t) This tag may appear in:
+ *
+ *
The lens distortion correction block attempts to improve image quality by fixing + * radial, tangential, or other geometric aberrations in the camera device's optics. If + * available, the ACAMERA_LENS_DISTORTION field documents the lens's distortion parameters.
+ *OFF means no distortion correction is done.
+ *FAST/HIGH_QUALITY both mean camera device determined distortion correction will be + * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality + * correction algorithms, even if it slows down capture rate. FAST means the camera device + * will not slow down capture rate when applying correction. FAST may be the same as OFF if + * any correction at all would slow down capture rate. Every output stream will have a + * similar amount of enhancement applied.
+ *The correction only applies to processed outputs such as YUV, JPEG, or DEPTH16; it is not + * applied to any RAW output. Metadata coordinates such as face rectangles or metering + * regions are also not affected by correction.
+ *Applications enabling distortion correction need to pay extra attention when converting + * image coordinates between corrected output buffers and the sensor array. For example, if + * the app supports tap-to-focus and enables correction, it then has to apply the distortion + * model described in ACAMERA_LENS_DISTORTION to the image buffer tap coordinates to properly + * calculate the tap position on the sensor active array to be used with + * ACAMERA_CONTROL_AF_REGIONS. The same applies in reverse to detected face rectangles if + * they need to be drawn on top of the corrected output buffers.
+ * + * @see ACAMERA_CONTROL_AF_REGIONS + * @see ACAMERA_LENS_DISTORTION + */ + ACAMERA_DISTORTION_CORRECTION_MODE = // byte (acamera_metadata_enum_android_distortion_correction_mode_t) + ACAMERA_DISTORTION_CORRECTION_START, + /** + *List of distortion correction modes for ACAMERA_DISTORTION_CORRECTION_MODE that are + * supported by this camera device.
+ * + * @see ACAMERA_DISTORTION_CORRECTION_MODE + * + *Type: byte[n]
+ * + *This tag may appear in: + *
No device is required to support this API; such devices will always list only 'OFF'. + * All devices that support this API will list both FAST and HIGH_QUALITY.
+ */ + ACAMERA_DISTORTION_CORRECTION_AVAILABLE_MODES = // byte[n] + ACAMERA_DISTORTION_CORRECTION_START + 1, + ACAMERA_DISTORTION_CORRECTION_END, + } acamera_metadata_tag_t; /** @@ -7679,6 +7740,29 @@ typedef enum acamera_metadata_enum_acamera_logical_multi_camera_sensor_sync_type } acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t; +// ACAMERA_DISTORTION_CORRECTION_MODE +typedef enum acamera_metadata_enum_acamera_distortion_correction_mode { + /** + *No distortion correction is applied.
+ */ + ACAMERA_DISTORTION_CORRECTION_MODE_OFF = 0, + + /** + *Lens distortion correction is applied without reducing frame rate + * relative to sensor output. It may be the same as OFF if distortion correction would + * reduce frame rate relative to sensor.
+ */ + ACAMERA_DISTORTION_CORRECTION_MODE_FAST = 1, + + /** + *High-quality distortion correction is applied, at the cost of + * possibly reduced frame rate relative to sensor output.
+ */ + ACAMERA_DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2, + +} acamera_metadata_enum_android_distortion_correction_mode_t; + + #endif /* __ANDROID_API__ >= 24 */ __END_DECLS