Camera: Add visual samples for android.scaler.cropRegion docs
To better document the cropping specification for camera2, add diagrams from source.android.com into the reference docs as well. Test: Docs build, look correct Change-Id: I18a9c3801e19f39164f0d8c19c0cc001f142024f
This commit is contained in:
@@ -1212,7 +1212,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
|
||||
/**
|
||||
* <p>Minimum and maximum zoom ratios supported by this camera device.</p>
|
||||
* <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
|
||||
* setting android.control.zoomRation to values less than 1.0 increases the camera's field
|
||||
* setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values less than 1.0 increases the camera's field
|
||||
* of view.</p>
|
||||
* <p><b>Units</b>: A pair of zoom ratio in floating points: (minZoom, maxZoom)</p>
|
||||
* <p><b>Range of valid values:</b><br></p>
|
||||
@@ -1222,6 +1222,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
|
||||
* Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
|
||||
* {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
|
||||
*
|
||||
* @see CaptureRequest#CONTROL_ZOOM_RATIO
|
||||
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
|
||||
*/
|
||||
@PublicKey
|
||||
|
||||
@@ -2154,7 +2154,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* stream combinations of LIMITED hardware level are guaranteed.</p>
|
||||
* <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
|
||||
* with different field of view. As a result, when bokeh mode is enabled, the camera device
|
||||
* may override android.scaler.CropRegion, and the field of view will be smaller than when
|
||||
* may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, and the field of view will be smaller than when
|
||||
* bokeh mode is off.</p>
|
||||
* <p><b>Possible values:</b>
|
||||
* <ul>
|
||||
@@ -2163,6 +2163,8 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
|
||||
* </ul></p>
|
||||
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
|
||||
*
|
||||
* @see CaptureRequest#SCALER_CROP_REGION
|
||||
* @see #CONTROL_BOKEH_MODE_OFF
|
||||
* @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
|
||||
* @see #CONTROL_BOKEH_MODE_CONTINUOUS
|
||||
@@ -2740,32 +2742,70 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
|
||||
* system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being
|
||||
* the top-left pixel of the active array.</p>
|
||||
* <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
|
||||
* system depends on the mode being set.
|
||||
* When the distortion correction mode is OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
|
||||
* <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
|
||||
* When the distortion correction mode is not OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
|
||||
* <code>(0, 0)</code> being the top-left pixel of the active array.</p>
|
||||
* <p>Output streams use this rectangle to produce their output,
|
||||
* cropping to a smaller region if necessary to maintain the
|
||||
* stream's aspect ratio, then scaling the sensor input to
|
||||
* <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate system
|
||||
* depends on the mode being set. When the distortion correction mode is OFF, the
|
||||
* coordinate system follows {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with <code>(0,
|
||||
* 0)</code> being the top-left pixel of the pre-correction active array. When the distortion
|
||||
* correction mode is not OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the top-left pixel of the
|
||||
* active array.</p>
|
||||
* <p>Output streams use this rectangle to produce their output, cropping to a smaller region
|
||||
* if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
|
||||
* match the output's configured resolution.</p>
|
||||
* <p>The crop region is applied after the RAW to other color
|
||||
* space (e.g. YUV) conversion. Since raw streams
|
||||
* (e.g. RAW16) don't have the conversion stage, they are not
|
||||
* <p>The crop region is applied after the RAW to other color space (e.g. YUV)
|
||||
* conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
|
||||
* croppable. The crop region will be ignored by raw streams.</p>
|
||||
* <p>For non-raw streams, any additional per-stream cropping will
|
||||
* be done to maximize the final pixel area of the stream.</p>
|
||||
* <p>For example, if the crop region is set to a 4:3 aspect
|
||||
* ratio, then 4:3 streams will use the exact crop
|
||||
* region. 16:9 streams will further crop vertically
|
||||
* (letterbox).</p>
|
||||
* <p>Conversely, if the crop region is set to a 16:9, then 4:3
|
||||
* outputs will crop horizontally (pillarbox), and 16:9
|
||||
* streams will match exactly. These additional crops will
|
||||
* be centered within the crop region.</p>
|
||||
* <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
|
||||
* final pixel area of the stream.</p>
|
||||
* <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
|
||||
* the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
|
||||
* <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
|
||||
* (pillarbox), and 16:9 streams will match exactly. These additional crops will be
|
||||
* centered within the crop region.</p>
|
||||
* <p>To illustrate, here are several scenarios of different crop regions and output streams,
|
||||
* for a hypothetical camera device with an active array of size <code>(2000,1500)</code>. Note that
|
||||
* several of these examples use non-centered crop regions for ease of illustration; such
|
||||
* regions are only supported on devices with FREEFORM capability
|
||||
* ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>), but this does not affect the way the crop
|
||||
* rules work otherwise.</p>
|
||||
* <ul>
|
||||
* <li>Camera Configuration:<ul>
|
||||
* <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
|
||||
* <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
|
||||
* <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
|
||||
* <li><img alt="4:3 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
|
||||
* <li><img alt="16:9 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
|
||||
* <li><img alt="1:1 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
|
||||
* <li><img alt="Square output, 4:3 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-43-square-ratio.png" /></li>
|
||||
* <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
|
||||
* <li>Note that in this case, neither of the two outputs is a subset of the other, with
|
||||
* each containing image data the other doesn't have.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* </ul>
|
||||
* <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, the width and height
|
||||
* of the crop region cannot be set to be smaller than
|
||||
* <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
|
||||
@@ -2776,18 +2816,16 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* and
|
||||
* <code>floor( preCorrectionActiveArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>,
|
||||
* respectively.</p>
|
||||
* <p>The camera device may adjust the crop region to account
|
||||
* for rounding and other hardware requirements; the final
|
||||
* crop region used will be included in the output capture
|
||||
* result.</p>
|
||||
* <p>The camera device may adjust the crop region to account for rounding and other hardware
|
||||
* requirements; the final crop region used will be included in the output capture result.</p>
|
||||
* <p>Starting from API level 30, it's strongly recommended to use {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}
|
||||
* to take advantage of better support for zoom with logical multi-camera. The benefits
|
||||
* include better precision with optical-digital zoom combination, and ability to do
|
||||
* zoom-out from 1.0x. When using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for zoom, the crop region in
|
||||
* the capture request must be either letterboxing or pillarboxing (but not both). The
|
||||
* coordinate system is post-zoom, meaning that the activeArraySize or
|
||||
* preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.
|
||||
* See {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
|
||||
* preCorrectionActiveArraySize covers the camera device's field of view "after" zoom. See
|
||||
* {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
|
||||
* <p><b>Units</b>: Pixel coordinates relative to
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on distortion correction
|
||||
@@ -2797,6 +2835,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* @see CaptureRequest#CONTROL_ZOOM_RATIO
|
||||
* @see CaptureRequest#DISTORTION_CORRECTION_MODE
|
||||
* @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
|
||||
* @see CameraCharacteristics#SCALER_CROPPING_TYPE
|
||||
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
|
||||
* @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
|
||||
*/
|
||||
|
||||
@@ -2384,7 +2384,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* stream combinations of LIMITED hardware level are guaranteed.</p>
|
||||
* <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
|
||||
* with different field of view. As a result, when bokeh mode is enabled, the camera device
|
||||
* may override android.scaler.CropRegion, and the field of view will be smaller than when
|
||||
* may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, and the field of view will be smaller than when
|
||||
* bokeh mode is off.</p>
|
||||
* <p><b>Possible values:</b>
|
||||
* <ul>
|
||||
@@ -2393,6 +2393,8 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
|
||||
* </ul></p>
|
||||
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
|
||||
*
|
||||
* @see CaptureRequest#SCALER_CROP_REGION
|
||||
* @see #CONTROL_BOKEH_MODE_OFF
|
||||
* @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
|
||||
* @see #CONTROL_BOKEH_MODE_CONTINUOUS
|
||||
@@ -3379,32 +3381,70 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
|
||||
* system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being
|
||||
* the top-left pixel of the active array.</p>
|
||||
* <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
|
||||
* system depends on the mode being set.
|
||||
* When the distortion correction mode is OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
|
||||
* <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
|
||||
* When the distortion correction mode is not OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
|
||||
* <code>(0, 0)</code> being the top-left pixel of the active array.</p>
|
||||
* <p>Output streams use this rectangle to produce their output,
|
||||
* cropping to a smaller region if necessary to maintain the
|
||||
* stream's aspect ratio, then scaling the sensor input to
|
||||
* <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate system
|
||||
* depends on the mode being set. When the distortion correction mode is OFF, the
|
||||
* coordinate system follows {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with <code>(0,
|
||||
* 0)</code> being the top-left pixel of the pre-correction active array. When the distortion
|
||||
* correction mode is not OFF, the coordinate system follows
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the top-left pixel of the
|
||||
* active array.</p>
|
||||
* <p>Output streams use this rectangle to produce their output, cropping to a smaller region
|
||||
* if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
|
||||
* match the output's configured resolution.</p>
|
||||
* <p>The crop region is applied after the RAW to other color
|
||||
* space (e.g. YUV) conversion. Since raw streams
|
||||
* (e.g. RAW16) don't have the conversion stage, they are not
|
||||
* <p>The crop region is applied after the RAW to other color space (e.g. YUV)
|
||||
* conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
|
||||
* croppable. The crop region will be ignored by raw streams.</p>
|
||||
* <p>For non-raw streams, any additional per-stream cropping will
|
||||
* be done to maximize the final pixel area of the stream.</p>
|
||||
* <p>For example, if the crop region is set to a 4:3 aspect
|
||||
* ratio, then 4:3 streams will use the exact crop
|
||||
* region. 16:9 streams will further crop vertically
|
||||
* (letterbox).</p>
|
||||
* <p>Conversely, if the crop region is set to a 16:9, then 4:3
|
||||
* outputs will crop horizontally (pillarbox), and 16:9
|
||||
* streams will match exactly. These additional crops will
|
||||
* be centered within the crop region.</p>
|
||||
* <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
|
||||
* final pixel area of the stream.</p>
|
||||
* <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
|
||||
* the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
|
||||
* <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
|
||||
* (pillarbox), and 16:9 streams will match exactly. These additional crops will be
|
||||
* centered within the crop region.</p>
|
||||
* <p>To illustrate, here are several scenarios of different crop regions and output streams,
|
||||
* for a hypothetical camera device with an active array of size <code>(2000,1500)</code>. Note that
|
||||
* several of these examples use non-centered crop regions for ease of illustration; such
|
||||
* regions are only supported on devices with FREEFORM capability
|
||||
* ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>), but this does not affect the way the crop
|
||||
* rules work otherwise.</p>
|
||||
* <ul>
|
||||
* <li>Camera Configuration:<ul>
|
||||
* <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
|
||||
* <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
|
||||
* <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
|
||||
* <li><img alt="4:3 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
|
||||
* <li><img alt="16:9 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
|
||||
* <li><img alt="1:1 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
|
||||
* <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
|
||||
* <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
|
||||
* <li><img alt="Square output, 4:3 aspect ratio crop diagram" src="/reference/images/camera2/metadata/android.scaler.cropRegion/crop-region-43-square-ratio.png" /></li>
|
||||
* <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
|
||||
* <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
|
||||
* <li>Note that in this case, neither of the two outputs is a subset of the other, with
|
||||
* each containing image data the other doesn't have.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* </ul>
|
||||
* <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, the width and height
|
||||
* of the crop region cannot be set to be smaller than
|
||||
* <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
|
||||
@@ -3415,18 +3455,16 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* and
|
||||
* <code>floor( preCorrectionActiveArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>,
|
||||
* respectively.</p>
|
||||
* <p>The camera device may adjust the crop region to account
|
||||
* for rounding and other hardware requirements; the final
|
||||
* crop region used will be included in the output capture
|
||||
* result.</p>
|
||||
* <p>The camera device may adjust the crop region to account for rounding and other hardware
|
||||
* requirements; the final crop region used will be included in the output capture result.</p>
|
||||
* <p>Starting from API level 30, it's strongly recommended to use {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}
|
||||
* to take advantage of better support for zoom with logical multi-camera. The benefits
|
||||
* include better precision with optical-digital zoom combination, and ability to do
|
||||
* zoom-out from 1.0x. When using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for zoom, the crop region in
|
||||
* the capture request must be either letterboxing or pillarboxing (but not both). The
|
||||
* coordinate system is post-zoom, meaning that the activeArraySize or
|
||||
* preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.
|
||||
* See {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
|
||||
* preCorrectionActiveArraySize covers the camera device's field of view "after" zoom. See
|
||||
* {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} for details.</p>
|
||||
* <p><b>Units</b>: Pixel coordinates relative to
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
|
||||
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on distortion correction
|
||||
@@ -3436,6 +3474,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* @see CaptureRequest#CONTROL_ZOOM_RATIO
|
||||
* @see CaptureRequest#DISTORTION_CORRECTION_MODE
|
||||
* @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
|
||||
* @see CameraCharacteristics#SCALER_CROPPING_TYPE
|
||||
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
|
||||
* @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
|
||||
*/
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user