CaptureResult.java revision bc01db42d5768539d349935f58890f71dd56f521
1/* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.hardware.camera2; 18 19import android.hardware.camera2.impl.CameraMetadataNative; 20 21/** 22 * <p>The results of a single image capture from the image sensor.</p> 23 * 24 * <p>Contains the final configuration for the capture hardware (sensor, lens, 25 * flash), the processing pipeline, the control algorithms, and the output 26 * buffers.</p> 27 * 28 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a 29 * {@link CaptureRequest}. All properties listed for capture requests can also 30 * be queried on the capture result, to determine the final values used for 31 * capture. The result also includes additional metadata about the state of the 32 * camera device during the capture.</p> 33 * 34 */ 35public final class CaptureResult extends CameraMetadata { 36 37 private final CameraMetadataNative mResults; 38 private final CaptureRequest mRequest; 39 private final int mSequenceId; 40 41 /** 42 * Takes ownership of the passed-in properties object 43 * @hide 44 */ 45 public CaptureResult(CameraMetadataNative results, CaptureRequest parent, int sequenceId) { 46 if (results == null) { 47 throw new IllegalArgumentException("results was null"); 48 } 49 50 if (parent == null) { 51 throw new IllegalArgumentException("parent was null"); 52 } 53 54 mResults = results; 55 mRequest = parent; 56 mSequenceId = sequenceId; 57 } 58 59 @Override 60 public <T> T get(Key<T> key) { 61 return mResults.get(key); 62 } 63 64 /** 65 * Get the request associated with this result. 66 * 67 * <p>Whenever a request is successfully captured, with 68 * {@link CameraDevice.CaptureListener#onCaptureCompleted}, 69 * the {@code result}'s {@code getRequest()} will return that {@code request}. 70 * </p> 71 * 72 * <p>In particular, 73 * <code><pre>cameraDevice.capture(someRequest, new CaptureListener() { 74 * {@literal @}Override 75 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) { 76 * assert(myResult.getRequest.equals(myRequest) == true); 77 * } 78 * }; 79 * </code></pre> 80 * </p> 81 * 82 * @return The request associated with this result. Never {@code null}. 83 */ 84 public CaptureRequest getRequest() { 85 return mRequest; 86 } 87 88 /** 89 * Get the frame number associated with this result. 90 * 91 * <p>Whenever a request has been processed, regardless of failure or success, 92 * it gets a unique frame number assigned to its future result/failure.</p> 93 * 94 * <p>This value monotonically increments, starting with 0, 95 * for every new result or failure; and the scope is the lifetime of the 96 * {@link CameraDevice}.</p> 97 * 98 * @return int frame number 99 */ 100 public int getFrameNumber() { 101 return get(REQUEST_FRAME_COUNT); 102 } 103 104 /** 105 * The sequence ID for this failure that was returned by the 106 * {@link CameraDevice#capture} family of functions. 107 * 108 * <p>The sequence ID is a unique monotonically increasing value starting from 0, 109 * incremented every time a new group of requests is submitted to the CameraDevice.</p> 110 * 111 * @return int The ID for the sequence of requests that this capture result is a part of 112 * 113 * @see CameraDevice.CaptureListener#onCaptureSequenceCompleted 114 */ 115 public int getSequenceId() { 116 return mSequenceId; 117 } 118 119 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 120 * The key entries below this point are generated from metadata 121 * definitions in /system/media/camera/docs. Do not modify by hand or 122 * modify the comment blocks at the start or end. 123 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 124 125 126 /** 127 * <p>The mode control selects how the image data is converted from the 128 * sensor's native color into linear sRGB color.</p> 129 * <p>When auto-white balance is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this 130 * control is overridden by the AWB routine. When AWB is disabled, the 131 * application controls how the color mapping is performed.</p> 132 * <p>We define the expected processing pipeline below. For consistency 133 * across devices, this is always the case with TRANSFORM_MATRIX.</p> 134 * <p>When either FULL or HIGH_QUALITY is used, the camera device may 135 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 136 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the 137 * camera device (in the results) and be roughly correct.</p> 138 * <p>Switching to TRANSFORM_MATRIX and using the data provided from 139 * FAST or HIGH_QUALITY will yield a picture with the same white point 140 * as what was produced by the camera device in the earlier frame.</p> 141 * <p>The expected processing pipeline is as follows:</p> 142 * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p> 143 * <p>The white balance is encoded by two values, a 4-channel white-balance 144 * gain vector (applied in the Bayer domain), and a 3x3 color transform 145 * matrix (applied after demosaic).</p> 146 * <p>The 4-channel white-balance gains are defined as:</p> 147 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ] 148 * </code></pre> 149 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the 150 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows. 151 * These may be identical for a given camera device implementation; if 152 * the camera device does not support a separate gain for even/odd green 153 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to 154 * <code>G_even</code> in the output result metadata.</p> 155 * <p>The matrices for color transforms are defined as a 9-entry vector:</p> 156 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 157 * </code></pre> 158 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>, 159 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p> 160 * <p>with colors as follows:</p> 161 * <pre><code>r' = I0r + I1g + I2b 162 * g' = I3r + I4g + I5b 163 * b' = I6r + I7g + I8b 164 * </code></pre> 165 * <p>Both the input and output value ranges must match. Overflow/underflow 166 * values are clipped to fit within the range.</p> 167 * 168 * @see CaptureRequest#COLOR_CORRECTION_GAINS 169 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 170 * @see CaptureRequest#CONTROL_AWB_MODE 171 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX 172 * @see #COLOR_CORRECTION_MODE_FAST 173 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY 174 */ 175 public static final Key<Integer> COLOR_CORRECTION_MODE = 176 new Key<Integer>("android.colorCorrection.mode", int.class); 177 178 /** 179 * <p>A color transform matrix to use to transform 180 * from sensor RGB color space to output linear sRGB color space</p> 181 * <p>This matrix is either set by the camera device when the request 182 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 183 * directly by the application in the request when the 184 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 185 * <p>In the latter case, the camera device may round the matrix to account 186 * for precision issues; the final rounded matrix should be reported back 187 * in this matrix result metadata. The transform should keep the magnitude 188 * of the output color values within <code>[0, 1.0]</code> (assuming input color 189 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p> 190 * 191 * @see CaptureRequest#COLOR_CORRECTION_MODE 192 */ 193 public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM = 194 new Key<Rational[]>("android.colorCorrection.transform", Rational[].class); 195 196 /** 197 * <p>Gains applying to Bayer raw color channels for 198 * white-balance.</p> 199 * <p>The 4-channel white-balance gains are defined in 200 * the order of <code>[R G_even G_odd B]</code>, where <code>G_even</code> is the gain 201 * for green pixels on even rows of the output, and <code>G_odd</code> 202 * is the gain for green pixels on the odd rows. if a HAL 203 * does not support a separate gain for even/odd green channels, 204 * it should use the <code>G_even</code> value, and write <code>G_odd</code> equal to 205 * <code>G_even</code> in the output result metadata.</p> 206 * <p>This array is either set by the camera device when the request 207 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 208 * directly by the application in the request when the 209 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 210 * <p>The output should be the gains actually applied by the camera device to 211 * the current frame.</p> 212 * 213 * @see CaptureRequest#COLOR_CORRECTION_MODE 214 */ 215 public static final Key<float[]> COLOR_CORRECTION_GAINS = 216 new Key<float[]>("android.colorCorrection.gains", float[].class); 217 218 /** 219 * <p>The ID sent with the latest 220 * CAMERA2_TRIGGER_PRECAPTURE_METERING call</p> 221 * <p>Must be 0 if no 222 * CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet 223 * by HAL. Always updated even if AE algorithm ignores the 224 * trigger</p> 225 * @hide 226 */ 227 public static final Key<Integer> CONTROL_AE_PRECAPTURE_ID = 228 new Key<Integer>("android.control.aePrecaptureId", int.class); 229 230 /** 231 * <p>The desired setting for the camera device's auto-exposure 232 * algorithm's antibanding compensation.</p> 233 * <p>Some kinds of lighting fixtures, such as some fluorescent 234 * lights, flicker at the rate of the power supply frequency 235 * (60Hz or 50Hz, depending on country). While this is 236 * typically not noticeable to a person, it can be visible to 237 * a camera device. If a camera sets its exposure time to the 238 * wrong value, the flicker may become visible in the 239 * viewfinder as flicker or in a final captured image, as a 240 * set of variable-brightness bands across the image.</p> 241 * <p>Therefore, the auto-exposure routines of camera devices 242 * include antibanding routines that ensure that the chosen 243 * exposure value will not cause such banding. The choice of 244 * exposure time depends on the rate of flicker, which the 245 * camera device can detect automatically, or the expected 246 * rate can be selected by the application using this 247 * control.</p> 248 * <p>A given camera device may not support all of the possible 249 * options for the antibanding mode. The 250 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains 251 * the available modes for a given camera device.</p> 252 * <p>The default mode is AUTO, which must be supported by all 253 * camera devices.</p> 254 * <p>If manual exposure control is enabled (by setting 255 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF), 256 * then this setting has no effect, and the application must 257 * ensure it selects exposure times that do not cause banding 258 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist 259 * the application in this.</p> 260 * 261 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES 262 * @see CaptureRequest#CONTROL_AE_MODE 263 * @see CaptureRequest#CONTROL_MODE 264 * @see CaptureResult#STATISTICS_SCENE_FLICKER 265 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF 266 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ 267 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ 268 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO 269 */ 270 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE = 271 new Key<Integer>("android.control.aeAntibandingMode", int.class); 272 273 /** 274 * <p>Adjustment to AE target image 275 * brightness</p> 276 * <p>For example, if EV step is 0.333, '6' will mean an 277 * exposure compensation of +2 EV; -3 will mean an exposure 278 * compensation of -1</p> 279 */ 280 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION = 281 new Key<Integer>("android.control.aeExposureCompensation", int.class); 282 283 /** 284 * <p>Whether AE is currently locked to its latest 285 * calculated values.</p> 286 * <p>Note that even when AE is locked, the flash may be 287 * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH / 288 * ON_AUTO_FLASH_REDEYE.</p> 289 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) 290 * when AE is already locked, the camera device will not change the exposure time 291 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 292 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 293 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 294 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p> 295 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p> 296 * 297 * @see CaptureRequest#CONTROL_AE_MODE 298 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 299 * @see CaptureResult#CONTROL_AE_STATE 300 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 301 * @see CaptureRequest#SENSOR_SENSITIVITY 302 */ 303 public static final Key<Boolean> CONTROL_AE_LOCK = 304 new Key<Boolean>("android.control.aeLock", boolean.class); 305 306 /** 307 * <p>The desired mode for the camera device's 308 * auto-exposure routine.</p> 309 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is 310 * AUTO.</p> 311 * <p>When set to any of the ON modes, the camera device's 312 * auto-exposure routine is enabled, overriding the 313 * application's selected exposure time, sensor sensitivity, 314 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 315 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 316 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes 317 * is selected, the camera device's flash unit controls are 318 * also overridden.</p> 319 * <p>The FLASH modes are only available if the camera device 320 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p> 321 * <p>If flash TORCH mode is desired, this field must be set to 322 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p> 323 * <p>When set to any of the ON modes, the values chosen by the 324 * camera device auto-exposure routine for the overridden 325 * fields for a given capture will be available in its 326 * CaptureResult.</p> 327 * 328 * @see CaptureRequest#CONTROL_MODE 329 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 330 * @see CaptureRequest#FLASH_MODE 331 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 332 * @see CaptureRequest#SENSOR_FRAME_DURATION 333 * @see CaptureRequest#SENSOR_SENSITIVITY 334 * @see #CONTROL_AE_MODE_OFF 335 * @see #CONTROL_AE_MODE_ON 336 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH 337 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH 338 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE 339 */ 340 public static final Key<Integer> CONTROL_AE_MODE = 341 new Key<Integer>("android.control.aeMode", int.class); 342 343 /** 344 * <p>List of areas to use for 345 * metering.</p> 346 * <p>Each area is a rectangle plus weight: xmin, ymin, 347 * xmax, ymax, weight. The rectangle is defined to be inclusive of the 348 * specified coordinates.</p> 349 * <p>The coordinate system is based on the active pixel array, 350 * with (0,0) being the top-left pixel in the active pixel array, and 351 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 352 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 353 * bottom-right pixel in the active pixel array. The weight 354 * should be nonnegative.</p> 355 * <p>If all regions have 0 weight, then no specific metering area 356 * needs to be used by the camera device. If the metering region is 357 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device 358 * will ignore the sections outside the region and output the 359 * used sections in the frame metadata.</p> 360 * 361 * @see CaptureRequest#SCALER_CROP_REGION 362 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 363 */ 364 public static final Key<int[]> CONTROL_AE_REGIONS = 365 new Key<int[]>("android.control.aeRegions", int[].class); 366 367 /** 368 * <p>Range over which fps can be adjusted to 369 * maintain exposure</p> 370 * <p>Only constrains AE algorithm, not manual control 371 * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p> 372 * 373 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 374 */ 375 public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE = 376 new Key<int[]>("android.control.aeTargetFpsRange", int[].class); 377 378 /** 379 * <p>Whether the camera device will trigger a precapture 380 * metering sequence when it processes this request.</p> 381 * <p>This entry is normally set to IDLE, or is not 382 * included at all in the request settings. When included and 383 * set to START, the camera device will trigger the autoexposure 384 * precapture metering sequence.</p> 385 * <p>The effect of AE precapture trigger depends on the current 386 * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture 387 * state transition details.</p> 388 * 389 * @see CaptureResult#CONTROL_AE_STATE 390 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE 391 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START 392 */ 393 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER = 394 new Key<Integer>("android.control.aePrecaptureTrigger", int.class); 395 396 /** 397 * <p>Current state of AE algorithm</p> 398 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always 399 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 400 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 401 * the algorithm states to INACTIVE.</p> 402 * <p>The camera device can do several state transitions between two results, if it is 403 * allowed by the state transition table. For example: INACTIVE may never actually be 404 * seen in a result.</p> 405 * <p>The state in the result is the state for this image (in sync with this image): if 406 * AE state becomes CONVERGED, then the image data associated with this result should 407 * be good to use.</p> 408 * <p>Below are state transition tables for different AE modes.</p> 409 * <table> 410 * <thead> 411 * <tr> 412 * <th align="center">State</th> 413 * <th align="center">Transition Cause</th> 414 * <th align="center">New State</th> 415 * <th align="center">Notes</th> 416 * </tr> 417 * </thead> 418 * <tbody> 419 * <tr> 420 * <td align="center">INACTIVE</td> 421 * <td align="center"></td> 422 * <td align="center">INACTIVE</td> 423 * <td align="center">Camera device auto exposure algorithm is disabled</td> 424 * </tr> 425 * </tbody> 426 * </table> 427 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p> 428 * <table> 429 * <thead> 430 * <tr> 431 * <th align="center">State</th> 432 * <th align="center">Transition Cause</th> 433 * <th align="center">New State</th> 434 * <th align="center">Notes</th> 435 * </tr> 436 * </thead> 437 * <tbody> 438 * <tr> 439 * <td align="center">INACTIVE</td> 440 * <td align="center">Camera device initiates AE scan</td> 441 * <td align="center">SEARCHING</td> 442 * <td align="center">Values changing</td> 443 * </tr> 444 * <tr> 445 * <td align="center">INACTIVE</td> 446 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 447 * <td align="center">LOCKED</td> 448 * <td align="center">Values locked</td> 449 * </tr> 450 * <tr> 451 * <td align="center">SEARCHING</td> 452 * <td align="center">Camera device finishes AE scan</td> 453 * <td align="center">CONVERGED</td> 454 * <td align="center">Good values, not changing</td> 455 * </tr> 456 * <tr> 457 * <td align="center">SEARCHING</td> 458 * <td align="center">Camera device finishes AE scan</td> 459 * <td align="center">FLASH_REQUIRED</td> 460 * <td align="center">Converged but too dark w/o flash</td> 461 * </tr> 462 * <tr> 463 * <td align="center">SEARCHING</td> 464 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 465 * <td align="center">LOCKED</td> 466 * <td align="center">Values locked</td> 467 * </tr> 468 * <tr> 469 * <td align="center">CONVERGED</td> 470 * <td align="center">Camera device initiates AE scan</td> 471 * <td align="center">SEARCHING</td> 472 * <td align="center">Values changing</td> 473 * </tr> 474 * <tr> 475 * <td align="center">CONVERGED</td> 476 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 477 * <td align="center">LOCKED</td> 478 * <td align="center">Values locked</td> 479 * </tr> 480 * <tr> 481 * <td align="center">FLASH_REQUIRED</td> 482 * <td align="center">Camera device initiates AE scan</td> 483 * <td align="center">SEARCHING</td> 484 * <td align="center">Values changing</td> 485 * </tr> 486 * <tr> 487 * <td align="center">FLASH_REQUIRED</td> 488 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 489 * <td align="center">LOCKED</td> 490 * <td align="center">Values locked</td> 491 * </tr> 492 * <tr> 493 * <td align="center">LOCKED</td> 494 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 495 * <td align="center">SEARCHING</td> 496 * <td align="center">Values not good after unlock</td> 497 * </tr> 498 * <tr> 499 * <td align="center">LOCKED</td> 500 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 501 * <td align="center">CONVERGED</td> 502 * <td align="center">Values good after unlock</td> 503 * </tr> 504 * <tr> 505 * <td align="center">LOCKED</td> 506 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 507 * <td align="center">FLASH_REQUIRED</td> 508 * <td align="center">Exposure good, but too dark</td> 509 * </tr> 510 * <tr> 511 * <td align="center">PRECAPTURE</td> 512 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 513 * <td align="center">CONVERGED</td> 514 * <td align="center">Ready for high-quality capture</td> 515 * </tr> 516 * <tr> 517 * <td align="center">PRECAPTURE</td> 518 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 519 * <td align="center">LOCKED</td> 520 * <td align="center">Ready for high-quality capture</td> 521 * </tr> 522 * <tr> 523 * <td align="center">Any state</td> 524 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td> 525 * <td align="center">PRECAPTURE</td> 526 * <td align="center">Start AE precapture metering sequence</td> 527 * </tr> 528 * </tbody> 529 * </table> 530 * <p>For the above table, the camera device may skip reporting any state changes that happen 531 * without application intervention (i.e. mode switch, trigger, locking). Any state that 532 * can be skipped in that manner is called a transient state.</p> 533 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions 534 * listed in above table, it is also legal for the camera device to skip one or more 535 * transient states between two results. See below table for examples:</p> 536 * <table> 537 * <thead> 538 * <tr> 539 * <th align="center">State</th> 540 * <th align="center">Transition Cause</th> 541 * <th align="center">New State</th> 542 * <th align="center">Notes</th> 543 * </tr> 544 * </thead> 545 * <tbody> 546 * <tr> 547 * <td align="center">INACTIVE</td> 548 * <td align="center">Camera device finished AE scan</td> 549 * <td align="center">CONVERGED</td> 550 * <td align="center">Values are already good, transient states are skipped by camera device.</td> 551 * </tr> 552 * <tr> 553 * <td align="center">Any state</td> 554 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td> 555 * <td align="center">FLASH_REQUIRED</td> 556 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td> 557 * </tr> 558 * <tr> 559 * <td align="center">Any state</td> 560 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td> 561 * <td align="center">CONVERGED</td> 562 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td> 563 * </tr> 564 * <tr> 565 * <td align="center">CONVERGED</td> 566 * <td align="center">Camera device finished AE scan</td> 567 * <td align="center">FLASH_REQUIRED</td> 568 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td> 569 * </tr> 570 * <tr> 571 * <td align="center">FLASH_REQUIRED</td> 572 * <td align="center">Camera device finished AE scan</td> 573 * <td align="center">CONVERGED</td> 574 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td> 575 * </tr> 576 * </tbody> 577 * </table> 578 * 579 * @see CaptureRequest#CONTROL_AE_LOCK 580 * @see CaptureRequest#CONTROL_AE_MODE 581 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 582 * @see CaptureRequest#CONTROL_MODE 583 * @see CaptureRequest#CONTROL_SCENE_MODE 584 * @see #CONTROL_AE_STATE_INACTIVE 585 * @see #CONTROL_AE_STATE_SEARCHING 586 * @see #CONTROL_AE_STATE_CONVERGED 587 * @see #CONTROL_AE_STATE_LOCKED 588 * @see #CONTROL_AE_STATE_FLASH_REQUIRED 589 * @see #CONTROL_AE_STATE_PRECAPTURE 590 */ 591 public static final Key<Integer> CONTROL_AE_STATE = 592 new Key<Integer>("android.control.aeState", int.class); 593 594 /** 595 * <p>Whether AF is currently enabled, and what 596 * mode it is set to</p> 597 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus 598 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>).</p> 599 * <p>If the lens is controlled by the camera device auto-focus algorithm, 600 * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} 601 * in result metadata.</p> 602 * 603 * @see CaptureResult#CONTROL_AF_STATE 604 * @see CaptureRequest#CONTROL_MODE 605 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 606 * @see #CONTROL_AF_MODE_OFF 607 * @see #CONTROL_AF_MODE_AUTO 608 * @see #CONTROL_AF_MODE_MACRO 609 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO 610 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE 611 * @see #CONTROL_AF_MODE_EDOF 612 */ 613 public static final Key<Integer> CONTROL_AF_MODE = 614 new Key<Integer>("android.control.afMode", int.class); 615 616 /** 617 * <p>List of areas to use for focus 618 * estimation.</p> 619 * <p>Each area is a rectangle plus weight: xmin, ymin, 620 * xmax, ymax, weight. The rectangle is defined to be inclusive of the 621 * specified coordinates.</p> 622 * <p>The coordinate system is based on the active pixel array, 623 * with (0,0) being the top-left pixel in the active pixel array, and 624 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 625 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 626 * bottom-right pixel in the active pixel array. The weight 627 * should be nonnegative.</p> 628 * <p>If all regions have 0 weight, then no specific focus area 629 * needs to be used by the camera device. If the focusing region is 630 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device 631 * will ignore the sections outside the region and output the 632 * used sections in the frame metadata.</p> 633 * 634 * @see CaptureRequest#SCALER_CROP_REGION 635 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 636 */ 637 public static final Key<int[]> CONTROL_AF_REGIONS = 638 new Key<int[]>("android.control.afRegions", int[].class); 639 640 /** 641 * <p>Whether the camera device will trigger autofocus for this request.</p> 642 * <p>This entry is normally set to IDLE, or is not 643 * included at all in the request settings.</p> 644 * <p>When included and set to START, the camera device will trigger the 645 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p> 646 * <p>When set to CANCEL, the camera device will cancel any active trigger, 647 * and return to its initial AF state.</p> 648 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p> 649 * 650 * @see CaptureResult#CONTROL_AF_STATE 651 * @see #CONTROL_AF_TRIGGER_IDLE 652 * @see #CONTROL_AF_TRIGGER_START 653 * @see #CONTROL_AF_TRIGGER_CANCEL 654 */ 655 public static final Key<Integer> CONTROL_AF_TRIGGER = 656 new Key<Integer>("android.control.afTrigger", int.class); 657 658 /** 659 * <p>Current state of AF algorithm.</p> 660 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always 661 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 662 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 663 * the algorithm states to INACTIVE.</p> 664 * <p>The camera device can do several state transitions between two results, if it is 665 * allowed by the state transition table. For example: INACTIVE may never actually be 666 * seen in a result.</p> 667 * <p>The state in the result is the state for this image (in sync with this image): if 668 * AF state becomes FOCUSED, then the image data associated with this result should 669 * be sharp.</p> 670 * <p>Below are state transition tables for different AF modes.</p> 671 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p> 672 * <table> 673 * <thead> 674 * <tr> 675 * <th align="center">State</th> 676 * <th align="center">Transition Cause</th> 677 * <th align="center">New State</th> 678 * <th align="center">Notes</th> 679 * </tr> 680 * </thead> 681 * <tbody> 682 * <tr> 683 * <td align="center">INACTIVE</td> 684 * <td align="center"></td> 685 * <td align="center">INACTIVE</td> 686 * <td align="center">Never changes</td> 687 * </tr> 688 * </tbody> 689 * </table> 690 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p> 691 * <table> 692 * <thead> 693 * <tr> 694 * <th align="center">State</th> 695 * <th align="center">Transition Cause</th> 696 * <th align="center">New State</th> 697 * <th align="center">Notes</th> 698 * </tr> 699 * </thead> 700 * <tbody> 701 * <tr> 702 * <td align="center">INACTIVE</td> 703 * <td align="center">AF_TRIGGER</td> 704 * <td align="center">ACTIVE_SCAN</td> 705 * <td align="center">Start AF sweep, Lens now moving</td> 706 * </tr> 707 * <tr> 708 * <td align="center">ACTIVE_SCAN</td> 709 * <td align="center">AF sweep done</td> 710 * <td align="center">FOCUSED_LOCKED</td> 711 * <td align="center">Focused, Lens now locked</td> 712 * </tr> 713 * <tr> 714 * <td align="center">ACTIVE_SCAN</td> 715 * <td align="center">AF sweep done</td> 716 * <td align="center">NOT_FOCUSED_LOCKED</td> 717 * <td align="center">Not focused, Lens now locked</td> 718 * </tr> 719 * <tr> 720 * <td align="center">ACTIVE_SCAN</td> 721 * <td align="center">AF_CANCEL</td> 722 * <td align="center">INACTIVE</td> 723 * <td align="center">Cancel/reset AF, Lens now locked</td> 724 * </tr> 725 * <tr> 726 * <td align="center">FOCUSED_LOCKED</td> 727 * <td align="center">AF_CANCEL</td> 728 * <td align="center">INACTIVE</td> 729 * <td align="center">Cancel/reset AF</td> 730 * </tr> 731 * <tr> 732 * <td align="center">FOCUSED_LOCKED</td> 733 * <td align="center">AF_TRIGGER</td> 734 * <td align="center">ACTIVE_SCAN</td> 735 * <td align="center">Start new sweep, Lens now moving</td> 736 * </tr> 737 * <tr> 738 * <td align="center">NOT_FOCUSED_LOCKED</td> 739 * <td align="center">AF_CANCEL</td> 740 * <td align="center">INACTIVE</td> 741 * <td align="center">Cancel/reset AF</td> 742 * </tr> 743 * <tr> 744 * <td align="center">NOT_FOCUSED_LOCKED</td> 745 * <td align="center">AF_TRIGGER</td> 746 * <td align="center">ACTIVE_SCAN</td> 747 * <td align="center">Start new sweep, Lens now moving</td> 748 * </tr> 749 * <tr> 750 * <td align="center">Any state</td> 751 * <td align="center">Mode change</td> 752 * <td align="center">INACTIVE</td> 753 * <td align="center"></td> 754 * </tr> 755 * </tbody> 756 * </table> 757 * <p>For the above table, the camera device may skip reporting any state changes that happen 758 * without application intervention (i.e. mode switch, trigger, locking). Any state that 759 * can be skipped in that manner is called a transient state.</p> 760 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the 761 * state transitions listed in above table, it is also legal for the camera device to skip 762 * one or more transient states between two results. See below table for examples:</p> 763 * <table> 764 * <thead> 765 * <tr> 766 * <th align="center">State</th> 767 * <th align="center">Transition Cause</th> 768 * <th align="center">New State</th> 769 * <th align="center">Notes</th> 770 * </tr> 771 * </thead> 772 * <tbody> 773 * <tr> 774 * <td align="center">INACTIVE</td> 775 * <td align="center">AF_TRIGGER</td> 776 * <td align="center">FOCUSED_LOCKED</td> 777 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td> 778 * </tr> 779 * <tr> 780 * <td align="center">INACTIVE</td> 781 * <td align="center">AF_TRIGGER</td> 782 * <td align="center">NOT_FOCUSED_LOCKED</td> 783 * <td align="center">Focus failed after a scan, lens is now locked.</td> 784 * </tr> 785 * <tr> 786 * <td align="center">FOCUSED_LOCKED</td> 787 * <td align="center">AF_TRIGGER</td> 788 * <td align="center">FOCUSED_LOCKED</td> 789 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td> 790 * </tr> 791 * <tr> 792 * <td align="center">NOT_FOCUSED_LOCKED</td> 793 * <td align="center">AF_TRIGGER</td> 794 * <td align="center">FOCUSED_LOCKED</td> 795 * <td align="center">Focus is good after a scan, lens is not locked.</td> 796 * </tr> 797 * </tbody> 798 * </table> 799 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p> 800 * <table> 801 * <thead> 802 * <tr> 803 * <th align="center">State</th> 804 * <th align="center">Transition Cause</th> 805 * <th align="center">New State</th> 806 * <th align="center">Notes</th> 807 * </tr> 808 * </thead> 809 * <tbody> 810 * <tr> 811 * <td align="center">INACTIVE</td> 812 * <td align="center">Camera device initiates new scan</td> 813 * <td align="center">PASSIVE_SCAN</td> 814 * <td align="center">Start AF scan, Lens now moving</td> 815 * </tr> 816 * <tr> 817 * <td align="center">INACTIVE</td> 818 * <td align="center">AF_TRIGGER</td> 819 * <td align="center">NOT_FOCUSED_LOCKED</td> 820 * <td align="center">AF state query, Lens now locked</td> 821 * </tr> 822 * <tr> 823 * <td align="center">PASSIVE_SCAN</td> 824 * <td align="center">Camera device completes current scan</td> 825 * <td align="center">PASSIVE_FOCUSED</td> 826 * <td align="center">End AF scan, Lens now locked</td> 827 * </tr> 828 * <tr> 829 * <td align="center">PASSIVE_SCAN</td> 830 * <td align="center">Camera device fails current scan</td> 831 * <td align="center">PASSIVE_UNFOCUSED</td> 832 * <td align="center">End AF scan, Lens now locked</td> 833 * </tr> 834 * <tr> 835 * <td align="center">PASSIVE_SCAN</td> 836 * <td align="center">AF_TRIGGER</td> 837 * <td align="center">FOCUSED_LOCKED</td> 838 * <td align="center">Immediate trans. If focus is good, Lens now locked</td> 839 * </tr> 840 * <tr> 841 * <td align="center">PASSIVE_SCAN</td> 842 * <td align="center">AF_TRIGGER</td> 843 * <td align="center">NOT_FOCUSED_LOCKED</td> 844 * <td align="center">Immediate trans. if focus is bad, Lens now locked</td> 845 * </tr> 846 * <tr> 847 * <td align="center">PASSIVE_SCAN</td> 848 * <td align="center">AF_CANCEL</td> 849 * <td align="center">INACTIVE</td> 850 * <td align="center">Reset lens position, Lens now locked</td> 851 * </tr> 852 * <tr> 853 * <td align="center">PASSIVE_FOCUSED</td> 854 * <td align="center">Camera device initiates new scan</td> 855 * <td align="center">PASSIVE_SCAN</td> 856 * <td align="center">Start AF scan, Lens now moving</td> 857 * </tr> 858 * <tr> 859 * <td align="center">PASSIVE_UNFOCUSED</td> 860 * <td align="center">Camera device initiates new scan</td> 861 * <td align="center">PASSIVE_SCAN</td> 862 * <td align="center">Start AF scan, Lens now moving</td> 863 * </tr> 864 * <tr> 865 * <td align="center">PASSIVE_FOCUSED</td> 866 * <td align="center">AF_TRIGGER</td> 867 * <td align="center">FOCUSED_LOCKED</td> 868 * <td align="center">Immediate trans. Lens now locked</td> 869 * </tr> 870 * <tr> 871 * <td align="center">PASSIVE_UNFOCUSED</td> 872 * <td align="center">AF_TRIGGER</td> 873 * <td align="center">NOT_FOCUSED_LOCKED</td> 874 * <td align="center">Immediate trans. Lens now locked</td> 875 * </tr> 876 * <tr> 877 * <td align="center">FOCUSED_LOCKED</td> 878 * <td align="center">AF_TRIGGER</td> 879 * <td align="center">FOCUSED_LOCKED</td> 880 * <td align="center">No effect</td> 881 * </tr> 882 * <tr> 883 * <td align="center">FOCUSED_LOCKED</td> 884 * <td align="center">AF_CANCEL</td> 885 * <td align="center">INACTIVE</td> 886 * <td align="center">Restart AF scan</td> 887 * </tr> 888 * <tr> 889 * <td align="center">NOT_FOCUSED_LOCKED</td> 890 * <td align="center">AF_TRIGGER</td> 891 * <td align="center">NOT_FOCUSED_LOCKED</td> 892 * <td align="center">No effect</td> 893 * </tr> 894 * <tr> 895 * <td align="center">NOT_FOCUSED_LOCKED</td> 896 * <td align="center">AF_CANCEL</td> 897 * <td align="center">INACTIVE</td> 898 * <td align="center">Restart AF scan</td> 899 * </tr> 900 * </tbody> 901 * </table> 902 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p> 903 * <table> 904 * <thead> 905 * <tr> 906 * <th align="center">State</th> 907 * <th align="center">Transition Cause</th> 908 * <th align="center">New State</th> 909 * <th align="center">Notes</th> 910 * </tr> 911 * </thead> 912 * <tbody> 913 * <tr> 914 * <td align="center">INACTIVE</td> 915 * <td align="center">Camera device initiates new scan</td> 916 * <td align="center">PASSIVE_SCAN</td> 917 * <td align="center">Start AF scan, Lens now moving</td> 918 * </tr> 919 * <tr> 920 * <td align="center">INACTIVE</td> 921 * <td align="center">AF_TRIGGER</td> 922 * <td align="center">NOT_FOCUSED_LOCKED</td> 923 * <td align="center">AF state query, Lens now locked</td> 924 * </tr> 925 * <tr> 926 * <td align="center">PASSIVE_SCAN</td> 927 * <td align="center">Camera device completes current scan</td> 928 * <td align="center">PASSIVE_FOCUSED</td> 929 * <td align="center">End AF scan, Lens now locked</td> 930 * </tr> 931 * <tr> 932 * <td align="center">PASSIVE_SCAN</td> 933 * <td align="center">Camera device fails current scan</td> 934 * <td align="center">PASSIVE_UNFOCUSED</td> 935 * <td align="center">End AF scan, Lens now locked</td> 936 * </tr> 937 * <tr> 938 * <td align="center">PASSIVE_SCAN</td> 939 * <td align="center">AF_TRIGGER</td> 940 * <td align="center">FOCUSED_LOCKED</td> 941 * <td align="center">Eventual trans. once focus good, Lens now locked</td> 942 * </tr> 943 * <tr> 944 * <td align="center">PASSIVE_SCAN</td> 945 * <td align="center">AF_TRIGGER</td> 946 * <td align="center">NOT_FOCUSED_LOCKED</td> 947 * <td align="center">Eventual trans. if cannot focus, Lens now locked</td> 948 * </tr> 949 * <tr> 950 * <td align="center">PASSIVE_SCAN</td> 951 * <td align="center">AF_CANCEL</td> 952 * <td align="center">INACTIVE</td> 953 * <td align="center">Reset lens position, Lens now locked</td> 954 * </tr> 955 * <tr> 956 * <td align="center">PASSIVE_FOCUSED</td> 957 * <td align="center">Camera device initiates new scan</td> 958 * <td align="center">PASSIVE_SCAN</td> 959 * <td align="center">Start AF scan, Lens now moving</td> 960 * </tr> 961 * <tr> 962 * <td align="center">PASSIVE_UNFOCUSED</td> 963 * <td align="center">Camera device initiates new scan</td> 964 * <td align="center">PASSIVE_SCAN</td> 965 * <td align="center">Start AF scan, Lens now moving</td> 966 * </tr> 967 * <tr> 968 * <td align="center">PASSIVE_FOCUSED</td> 969 * <td align="center">AF_TRIGGER</td> 970 * <td align="center">FOCUSED_LOCKED</td> 971 * <td align="center">Immediate trans. Lens now locked</td> 972 * </tr> 973 * <tr> 974 * <td align="center">PASSIVE_UNFOCUSED</td> 975 * <td align="center">AF_TRIGGER</td> 976 * <td align="center">NOT_FOCUSED_LOCKED</td> 977 * <td align="center">Immediate trans. Lens now locked</td> 978 * </tr> 979 * <tr> 980 * <td align="center">FOCUSED_LOCKED</td> 981 * <td align="center">AF_TRIGGER</td> 982 * <td align="center">FOCUSED_LOCKED</td> 983 * <td align="center">No effect</td> 984 * </tr> 985 * <tr> 986 * <td align="center">FOCUSED_LOCKED</td> 987 * <td align="center">AF_CANCEL</td> 988 * <td align="center">INACTIVE</td> 989 * <td align="center">Restart AF scan</td> 990 * </tr> 991 * <tr> 992 * <td align="center">NOT_FOCUSED_LOCKED</td> 993 * <td align="center">AF_TRIGGER</td> 994 * <td align="center">NOT_FOCUSED_LOCKED</td> 995 * <td align="center">No effect</td> 996 * </tr> 997 * <tr> 998 * <td align="center">NOT_FOCUSED_LOCKED</td> 999 * <td align="center">AF_CANCEL</td> 1000 * <td align="center">INACTIVE</td> 1001 * <td align="center">Restart AF scan</td> 1002 * </tr> 1003 * </tbody> 1004 * </table> 1005 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO 1006 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the 1007 * camera device. When a trigger is included in a mode switch request, the trigger 1008 * will be evaluated in the context of the new mode in the request. 1009 * See below table for examples:</p> 1010 * <table> 1011 * <thead> 1012 * <tr> 1013 * <th align="center">State</th> 1014 * <th align="center">Transition Cause</th> 1015 * <th align="center">New State</th> 1016 * <th align="center">Notes</th> 1017 * </tr> 1018 * </thead> 1019 * <tbody> 1020 * <tr> 1021 * <td align="center">any state</td> 1022 * <td align="center">CAF-->AUTO mode switch</td> 1023 * <td align="center">INACTIVE</td> 1024 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td> 1025 * </tr> 1026 * <tr> 1027 * <td align="center">any state</td> 1028 * <td align="center">CAF-->AUTO mode switch with AF_TRIGGER</td> 1029 * <td align="center">trigger-reachable states from INACTIVE</td> 1030 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td> 1031 * </tr> 1032 * <tr> 1033 * <td align="center">any state</td> 1034 * <td align="center">AUTO-->CAF mode switch</td> 1035 * <td align="center">passively reachable states from INACTIVE</td> 1036 * <td align="center">Mode switch without trigger, passive transient state is skipped</td> 1037 * </tr> 1038 * </tbody> 1039 * </table> 1040 * 1041 * @see CaptureRequest#CONTROL_AF_MODE 1042 * @see CaptureRequest#CONTROL_MODE 1043 * @see CaptureRequest#CONTROL_SCENE_MODE 1044 * @see #CONTROL_AF_STATE_INACTIVE 1045 * @see #CONTROL_AF_STATE_PASSIVE_SCAN 1046 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED 1047 * @see #CONTROL_AF_STATE_ACTIVE_SCAN 1048 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED 1049 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED 1050 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED 1051 */ 1052 public static final Key<Integer> CONTROL_AF_STATE = 1053 new Key<Integer>("android.control.afState", int.class); 1054 1055 /** 1056 * <p>The ID sent with the latest 1057 * CAMERA2_TRIGGER_AUTOFOCUS call</p> 1058 * <p>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger 1059 * received yet by HAL. Always updated even if AF algorithm 1060 * ignores the trigger</p> 1061 * @hide 1062 */ 1063 public static final Key<Integer> CONTROL_AF_TRIGGER_ID = 1064 new Key<Integer>("android.control.afTriggerId", int.class); 1065 1066 /** 1067 * <p>Whether AWB is currently locked to its 1068 * latest calculated values.</p> 1069 * <p>Note that AWB lock is only meaningful for AUTO 1070 * mode; in other modes, AWB is already fixed to a specific 1071 * setting.</p> 1072 */ 1073 public static final Key<Boolean> CONTROL_AWB_LOCK = 1074 new Key<Boolean>("android.control.awbLock", boolean.class); 1075 1076 /** 1077 * <p>Whether AWB is currently setting the color 1078 * transform fields, and what its illumination target 1079 * is.</p> 1080 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p> 1081 * <p>When set to the ON mode, the camera device's auto white balance 1082 * routine is enabled, overriding the application's selected 1083 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 1084 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 1085 * <p>When set to the OFF mode, the camera device's auto white balance 1086 * routine is disabled. The application manually controls the white 1087 * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} 1088 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 1089 * <p>When set to any other modes, the camera device's auto white balance 1090 * routine is disabled. The camera device uses each particular illumination 1091 * target for white balance adjustment.</p> 1092 * 1093 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1094 * @see CaptureRequest#COLOR_CORRECTION_MODE 1095 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1096 * @see CaptureRequest#CONTROL_MODE 1097 * @see #CONTROL_AWB_MODE_OFF 1098 * @see #CONTROL_AWB_MODE_AUTO 1099 * @see #CONTROL_AWB_MODE_INCANDESCENT 1100 * @see #CONTROL_AWB_MODE_FLUORESCENT 1101 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT 1102 * @see #CONTROL_AWB_MODE_DAYLIGHT 1103 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT 1104 * @see #CONTROL_AWB_MODE_TWILIGHT 1105 * @see #CONTROL_AWB_MODE_SHADE 1106 */ 1107 public static final Key<Integer> CONTROL_AWB_MODE = 1108 new Key<Integer>("android.control.awbMode", int.class); 1109 1110 /** 1111 * <p>List of areas to use for illuminant 1112 * estimation.</p> 1113 * <p>Only used in AUTO mode.</p> 1114 * <p>Each area is a rectangle plus weight: xmin, ymin, 1115 * xmax, ymax, weight. The rectangle is defined to be inclusive of the 1116 * specified coordinates.</p> 1117 * <p>The coordinate system is based on the active pixel array, 1118 * with (0,0) being the top-left pixel in the active pixel array, and 1119 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 1120 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 1121 * bottom-right pixel in the active pixel array. The weight 1122 * should be nonnegative.</p> 1123 * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area 1124 * needs to be used by the camera device. If the AWB region is 1125 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device 1126 * will ignore the sections outside the region and output the 1127 * used sections in the frame metadata.</p> 1128 * 1129 * @see CaptureRequest#SCALER_CROP_REGION 1130 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1131 */ 1132 public static final Key<int[]> CONTROL_AWB_REGIONS = 1133 new Key<int[]>("android.control.awbRegions", int[].class); 1134 1135 /** 1136 * <p>Information to the camera device 3A (auto-exposure, 1137 * auto-focus, auto-white balance) routines about the purpose 1138 * of this capture, to help the camera device to decide optimal 3A 1139 * strategy.</p> 1140 * <p>This control (except for MANUAL) is only effective if 1141 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> 1142 * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1143 * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1144 * contains MANUAL_SENSOR.</p> 1145 * 1146 * @see CaptureRequest#CONTROL_MODE 1147 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1148 * @see #CONTROL_CAPTURE_INTENT_CUSTOM 1149 * @see #CONTROL_CAPTURE_INTENT_PREVIEW 1150 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE 1151 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD 1152 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT 1153 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG 1154 * @see #CONTROL_CAPTURE_INTENT_MANUAL 1155 */ 1156 public static final Key<Integer> CONTROL_CAPTURE_INTENT = 1157 new Key<Integer>("android.control.captureIntent", int.class); 1158 1159 /** 1160 * <p>Current state of AWB algorithm</p> 1161 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always 1162 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 1163 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 1164 * the algorithm states to INACTIVE.</p> 1165 * <p>The camera device can do several state transitions between two results, if it is 1166 * allowed by the state transition table. So INACTIVE may never actually be seen in 1167 * a result.</p> 1168 * <p>The state in the result is the state for this image (in sync with this image): if 1169 * AWB state becomes CONVERGED, then the image data associated with this result should 1170 * be good to use.</p> 1171 * <p>Below are state transition tables for different AWB modes.</p> 1172 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p> 1173 * <table> 1174 * <thead> 1175 * <tr> 1176 * <th align="center">State</th> 1177 * <th align="center">Transition Cause</th> 1178 * <th align="center">New State</th> 1179 * <th align="center">Notes</th> 1180 * </tr> 1181 * </thead> 1182 * <tbody> 1183 * <tr> 1184 * <td align="center">INACTIVE</td> 1185 * <td align="center"></td> 1186 * <td align="center">INACTIVE</td> 1187 * <td align="center">Camera device auto white balance algorithm is disabled</td> 1188 * </tr> 1189 * </tbody> 1190 * </table> 1191 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p> 1192 * <table> 1193 * <thead> 1194 * <tr> 1195 * <th align="center">State</th> 1196 * <th align="center">Transition Cause</th> 1197 * <th align="center">New State</th> 1198 * <th align="center">Notes</th> 1199 * </tr> 1200 * </thead> 1201 * <tbody> 1202 * <tr> 1203 * <td align="center">INACTIVE</td> 1204 * <td align="center">Camera device initiates AWB scan</td> 1205 * <td align="center">SEARCHING</td> 1206 * <td align="center">Values changing</td> 1207 * </tr> 1208 * <tr> 1209 * <td align="center">INACTIVE</td> 1210 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1211 * <td align="center">LOCKED</td> 1212 * <td align="center">Values locked</td> 1213 * </tr> 1214 * <tr> 1215 * <td align="center">SEARCHING</td> 1216 * <td align="center">Camera device finishes AWB scan</td> 1217 * <td align="center">CONVERGED</td> 1218 * <td align="center">Good values, not changing</td> 1219 * </tr> 1220 * <tr> 1221 * <td align="center">SEARCHING</td> 1222 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1223 * <td align="center">LOCKED</td> 1224 * <td align="center">Values locked</td> 1225 * </tr> 1226 * <tr> 1227 * <td align="center">CONVERGED</td> 1228 * <td align="center">Camera device initiates AWB scan</td> 1229 * <td align="center">SEARCHING</td> 1230 * <td align="center">Values changing</td> 1231 * </tr> 1232 * <tr> 1233 * <td align="center">CONVERGED</td> 1234 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1235 * <td align="center">LOCKED</td> 1236 * <td align="center">Values locked</td> 1237 * </tr> 1238 * <tr> 1239 * <td align="center">LOCKED</td> 1240 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td> 1241 * <td align="center">SEARCHING</td> 1242 * <td align="center">Values not good after unlock</td> 1243 * </tr> 1244 * </tbody> 1245 * </table> 1246 * <p>For the above table, the camera device may skip reporting any state changes that happen 1247 * without application intervention (i.e. mode switch, trigger, locking). Any state that 1248 * can be skipped in that manner is called a transient state.</p> 1249 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions 1250 * listed in above table, it is also legal for the camera device to skip one or more 1251 * transient states between two results. See below table for examples:</p> 1252 * <table> 1253 * <thead> 1254 * <tr> 1255 * <th align="center">State</th> 1256 * <th align="center">Transition Cause</th> 1257 * <th align="center">New State</th> 1258 * <th align="center">Notes</th> 1259 * </tr> 1260 * </thead> 1261 * <tbody> 1262 * <tr> 1263 * <td align="center">INACTIVE</td> 1264 * <td align="center">Camera device finished AWB scan</td> 1265 * <td align="center">CONVERGED</td> 1266 * <td align="center">Values are already good, transient states are skipped by camera device.</td> 1267 * </tr> 1268 * <tr> 1269 * <td align="center">LOCKED</td> 1270 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td> 1271 * <td align="center">CONVERGED</td> 1272 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td> 1273 * </tr> 1274 * </tbody> 1275 * </table> 1276 * 1277 * @see CaptureRequest#CONTROL_AWB_LOCK 1278 * @see CaptureRequest#CONTROL_AWB_MODE 1279 * @see CaptureRequest#CONTROL_MODE 1280 * @see CaptureRequest#CONTROL_SCENE_MODE 1281 * @see #CONTROL_AWB_STATE_INACTIVE 1282 * @see #CONTROL_AWB_STATE_SEARCHING 1283 * @see #CONTROL_AWB_STATE_CONVERGED 1284 * @see #CONTROL_AWB_STATE_LOCKED 1285 */ 1286 public static final Key<Integer> CONTROL_AWB_STATE = 1287 new Key<Integer>("android.control.awbState", int.class); 1288 1289 /** 1290 * <p>A special color effect to apply.</p> 1291 * <p>When this mode is set, a color effect will be applied 1292 * to images produced by the camera device. The interpretation 1293 * and implementation of these color effects is left to the 1294 * implementor of the camera device, and should not be 1295 * depended on to be consistent (or present) across all 1296 * devices.</p> 1297 * <p>A color effect will only be applied if 1298 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p> 1299 * 1300 * @see CaptureRequest#CONTROL_MODE 1301 * @see #CONTROL_EFFECT_MODE_OFF 1302 * @see #CONTROL_EFFECT_MODE_MONO 1303 * @see #CONTROL_EFFECT_MODE_NEGATIVE 1304 * @see #CONTROL_EFFECT_MODE_SOLARIZE 1305 * @see #CONTROL_EFFECT_MODE_SEPIA 1306 * @see #CONTROL_EFFECT_MODE_POSTERIZE 1307 * @see #CONTROL_EFFECT_MODE_WHITEBOARD 1308 * @see #CONTROL_EFFECT_MODE_BLACKBOARD 1309 * @see #CONTROL_EFFECT_MODE_AQUA 1310 */ 1311 public static final Key<Integer> CONTROL_EFFECT_MODE = 1312 new Key<Integer>("android.control.effectMode", int.class); 1313 1314 /** 1315 * <p>Overall mode of 3A control 1316 * routines.</p> 1317 * <p>High-level 3A control. When set to OFF, all 3A control 1318 * by the camera device is disabled. The application must set the fields for 1319 * capture parameters itself.</p> 1320 * <p>When set to AUTO, the individual algorithm controls in 1321 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 1322 * <p>When set to USE_SCENE_MODE, the individual controls in 1323 * android.control.* are mostly disabled, and the camera device implements 1324 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 1325 * as it wishes. The camera device scene mode 3A settings are provided by 1326 * android.control.sceneModeOverrides.</p> 1327 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 1328 * is that this frame will not be used by camera device background 3A statistics 1329 * update, as if this frame is never captured. This mode can be used in the scenario 1330 * where the application doesn't want a 3A manual control capture to affect 1331 * the subsequent auto 3A capture results.</p> 1332 * 1333 * @see CaptureRequest#CONTROL_AF_MODE 1334 * @see #CONTROL_MODE_OFF 1335 * @see #CONTROL_MODE_AUTO 1336 * @see #CONTROL_MODE_USE_SCENE_MODE 1337 * @see #CONTROL_MODE_OFF_KEEP_STATE 1338 */ 1339 public static final Key<Integer> CONTROL_MODE = 1340 new Key<Integer>("android.control.mode", int.class); 1341 1342 /** 1343 * <p>A camera mode optimized for conditions typical in a particular 1344 * capture setting.</p> 1345 * <p>This is the mode that that is active when 1346 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, 1347 * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 1348 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p> 1349 * <p>The interpretation and implementation of these scene modes is left 1350 * to the implementor of the camera device. Their behavior will not be 1351 * consistent across all devices, and any given device may only implement 1352 * a subset of these modes.</p> 1353 * 1354 * @see CaptureRequest#CONTROL_AE_MODE 1355 * @see CaptureRequest#CONTROL_AF_MODE 1356 * @see CaptureRequest#CONTROL_AWB_MODE 1357 * @see CaptureRequest#CONTROL_MODE 1358 * @see #CONTROL_SCENE_MODE_DISABLED 1359 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY 1360 * @see #CONTROL_SCENE_MODE_ACTION 1361 * @see #CONTROL_SCENE_MODE_PORTRAIT 1362 * @see #CONTROL_SCENE_MODE_LANDSCAPE 1363 * @see #CONTROL_SCENE_MODE_NIGHT 1364 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT 1365 * @see #CONTROL_SCENE_MODE_THEATRE 1366 * @see #CONTROL_SCENE_MODE_BEACH 1367 * @see #CONTROL_SCENE_MODE_SNOW 1368 * @see #CONTROL_SCENE_MODE_SUNSET 1369 * @see #CONTROL_SCENE_MODE_STEADYPHOTO 1370 * @see #CONTROL_SCENE_MODE_FIREWORKS 1371 * @see #CONTROL_SCENE_MODE_SPORTS 1372 * @see #CONTROL_SCENE_MODE_PARTY 1373 * @see #CONTROL_SCENE_MODE_CANDLELIGHT 1374 * @see #CONTROL_SCENE_MODE_BARCODE 1375 */ 1376 public static final Key<Integer> CONTROL_SCENE_MODE = 1377 new Key<Integer>("android.control.sceneMode", int.class); 1378 1379 /** 1380 * <p>Whether video stabilization is 1381 * active</p> 1382 * <p>If enabled, video stabilization can modify the 1383 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream 1384 * stabilized</p> 1385 * 1386 * @see CaptureRequest#SCALER_CROP_REGION 1387 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF 1388 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON 1389 */ 1390 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE = 1391 new Key<Integer>("android.control.videoStabilizationMode", int.class); 1392 1393 /** 1394 * <p>Operation mode for edge 1395 * enhancement.</p> 1396 * <p>Edge/sharpness/detail enhancement. OFF means no 1397 * enhancement will be applied by the camera device.</p> 1398 * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p> 1399 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement 1400 * will be applied. HIGH_QUALITY mode indicates that the 1401 * camera device will use the highest-quality enhancement algorithms, 1402 * even if it slows down capture rate. FAST means the camera device will 1403 * not slow down capture rate when applying edge enhancement.</p> 1404 * 1405 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 1406 * @see #EDGE_MODE_OFF 1407 * @see #EDGE_MODE_FAST 1408 * @see #EDGE_MODE_HIGH_QUALITY 1409 */ 1410 public static final Key<Integer> EDGE_MODE = 1411 new Key<Integer>("android.edge.mode", int.class); 1412 1413 /** 1414 * <p>The desired mode for for the camera device's flash control.</p> 1415 * <p>This control is only effective when flash unit is available 1416 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p> 1417 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF. 1418 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 1419 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p> 1420 * <p>When set to OFF, the camera device will not fire flash for this capture.</p> 1421 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera 1422 * device's auto-exposure routine's result. When used in still capture case, this 1423 * control should be used along with AE precapture metering sequence 1424 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p> 1425 * <p>When set to TORCH, the flash will be on continuously. This mode can be used 1426 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p> 1427 * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p> 1428 * 1429 * @see CaptureRequest#CONTROL_AE_MODE 1430 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1431 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 1432 * @see CaptureResult#FLASH_STATE 1433 * @see #FLASH_MODE_OFF 1434 * @see #FLASH_MODE_SINGLE 1435 * @see #FLASH_MODE_TORCH 1436 */ 1437 public static final Key<Integer> FLASH_MODE = 1438 new Key<Integer>("android.flash.mode", int.class); 1439 1440 /** 1441 * <p>Current state of the flash 1442 * unit.</p> 1443 * <p>When the camera device doesn't have flash unit 1444 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE. 1445 * Other states indicate the current flash status.</p> 1446 * 1447 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 1448 * @see #FLASH_STATE_UNAVAILABLE 1449 * @see #FLASH_STATE_CHARGING 1450 * @see #FLASH_STATE_READY 1451 * @see #FLASH_STATE_FIRED 1452 * @see #FLASH_STATE_PARTIAL 1453 */ 1454 public static final Key<Integer> FLASH_STATE = 1455 new Key<Integer>("android.flash.state", int.class); 1456 1457 /** 1458 * <p>Set operational mode for hot pixel correction.</p> 1459 * <p>Valid modes for this camera device are listed in 1460 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p> 1461 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels 1462 * that do not accurately encode the incoming light (i.e. pixels that 1463 * are stuck at an arbitrary value).</p> 1464 * 1465 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES 1466 * @see #HOT_PIXEL_MODE_OFF 1467 * @see #HOT_PIXEL_MODE_FAST 1468 * @see #HOT_PIXEL_MODE_HIGH_QUALITY 1469 */ 1470 public static final Key<Integer> HOT_PIXEL_MODE = 1471 new Key<Integer>("android.hotPixel.mode", int.class); 1472 1473 /** 1474 * <p>GPS coordinates to include in output JPEG 1475 * EXIF</p> 1476 */ 1477 public static final Key<double[]> JPEG_GPS_COORDINATES = 1478 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); 1479 1480 /** 1481 * <p>32 characters describing GPS algorithm to 1482 * include in EXIF</p> 1483 */ 1484 public static final Key<String> JPEG_GPS_PROCESSING_METHOD = 1485 new Key<String>("android.jpeg.gpsProcessingMethod", String.class); 1486 1487 /** 1488 * <p>Time GPS fix was made to include in 1489 * EXIF</p> 1490 */ 1491 public static final Key<Long> JPEG_GPS_TIMESTAMP = 1492 new Key<Long>("android.jpeg.gpsTimestamp", long.class); 1493 1494 /** 1495 * <p>Orientation of JPEG image to 1496 * write</p> 1497 */ 1498 public static final Key<Integer> JPEG_ORIENTATION = 1499 new Key<Integer>("android.jpeg.orientation", int.class); 1500 1501 /** 1502 * <p>Compression quality of the final JPEG 1503 * image</p> 1504 * <p>85-95 is typical usage range</p> 1505 */ 1506 public static final Key<Byte> JPEG_QUALITY = 1507 new Key<Byte>("android.jpeg.quality", byte.class); 1508 1509 /** 1510 * <p>Compression quality of JPEG 1511 * thumbnail</p> 1512 */ 1513 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = 1514 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); 1515 1516 /** 1517 * <p>Resolution of embedded JPEG thumbnail</p> 1518 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 1519 * but the captured JPEG will still be a valid image.</p> 1520 * <p>When a jpeg image capture is issued, the thumbnail size selected should have 1521 * the same aspect ratio as the jpeg image.</p> 1522 */ 1523 public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE = 1524 new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class); 1525 1526 /** 1527 * <p>The ratio of lens focal length to the effective 1528 * aperture diameter.</p> 1529 * <p>This will only be supported on the camera devices that 1530 * have variable aperture lens. The aperture value can only be 1531 * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p> 1532 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, 1533 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1534 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1535 * to achieve manual exposure control.</p> 1536 * <p>The requested aperture value may take several frames to reach the 1537 * requested value; the camera device will report the current (intermediate) 1538 * aperture size in capture result metadata while the aperture is changing. 1539 * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1540 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of 1541 * the ON modes, this will be overridden by the camera device 1542 * auto-exposure algorithm, the overridden values are then provided 1543 * back to the user in the corresponding result.</p> 1544 * 1545 * @see CaptureRequest#CONTROL_AE_MODE 1546 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 1547 * @see CaptureResult#LENS_STATE 1548 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1549 * @see CaptureRequest#SENSOR_FRAME_DURATION 1550 * @see CaptureRequest#SENSOR_SENSITIVITY 1551 */ 1552 public static final Key<Float> LENS_APERTURE = 1553 new Key<Float>("android.lens.aperture", float.class); 1554 1555 /** 1556 * <p>State of lens neutral density filter(s).</p> 1557 * <p>This will not be supported on most camera devices. On devices 1558 * where this is supported, this may only be set to one of the 1559 * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p> 1560 * <p>Lens filters are typically used to lower the amount of light the 1561 * sensor is exposed to (measured in steps of EV). As used here, an EV 1562 * step is the standard logarithmic representation, which are 1563 * non-negative, and inversely proportional to the amount of light 1564 * hitting the sensor. For example, setting this to 0 would result 1565 * in no reduction of the incoming light, and setting this to 2 would 1566 * mean that the filter is set to reduce incoming light by two stops 1567 * (allowing 1/4 of the prior amount of light to the sensor).</p> 1568 * <p>It may take several frames before the lens filter density changes 1569 * to the requested value. While the filter density is still changing, 1570 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1571 * 1572 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 1573 * @see CaptureResult#LENS_STATE 1574 */ 1575 public static final Key<Float> LENS_FILTER_DENSITY = 1576 new Key<Float>("android.lens.filterDensity", float.class); 1577 1578 /** 1579 * <p>The current lens focal length; used for optical zoom.</p> 1580 * <p>This setting controls the physical focal length of the camera 1581 * device's lens. Changing the focal length changes the field of 1582 * view of the camera device, and is usually used for optical zoom.</p> 1583 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this 1584 * setting won't be applied instantaneously, and it may take several 1585 * frames before the lens can change to the requested focal length. 1586 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will 1587 * be set to MOVING.</p> 1588 * <p>This is expected not to be supported on most devices.</p> 1589 * 1590 * @see CaptureRequest#LENS_APERTURE 1591 * @see CaptureRequest#LENS_FOCUS_DISTANCE 1592 * @see CaptureResult#LENS_STATE 1593 */ 1594 public static final Key<Float> LENS_FOCAL_LENGTH = 1595 new Key<Float>("android.lens.focalLength", float.class); 1596 1597 /** 1598 * <p>Distance to plane of sharpest focus, 1599 * measured from frontmost surface of the lens</p> 1600 * <p>Should be zero for fixed-focus cameras</p> 1601 */ 1602 public static final Key<Float> LENS_FOCUS_DISTANCE = 1603 new Key<Float>("android.lens.focusDistance", float.class); 1604 1605 /** 1606 * <p>The range of scene distances that are in 1607 * sharp focus (depth of field)</p> 1608 * <p>If variable focus not supported, can still report 1609 * fixed depth of field range</p> 1610 */ 1611 public static final Key<float[]> LENS_FOCUS_RANGE = 1612 new Key<float[]>("android.lens.focusRange", float[].class); 1613 1614 /** 1615 * <p>Sets whether the camera device uses optical image stabilization (OIS) 1616 * when capturing images.</p> 1617 * <p>OIS is used to compensate for motion blur due to small movements of 1618 * the camera during capture. Unlike digital image stabilization, OIS makes 1619 * use of mechanical elements to stabilize the camera sensor, and thus 1620 * allows for longer exposure times before camera shake becomes 1621 * apparent.</p> 1622 * <p>This is not expected to be supported on most devices.</p> 1623 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF 1624 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON 1625 */ 1626 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = 1627 new Key<Integer>("android.lens.opticalStabilizationMode", int.class); 1628 1629 /** 1630 * <p>Current lens status.</p> 1631 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 1632 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested, 1633 * they may take several frames to reach the requested values. This state indicates 1634 * the current status of the lens parameters.</p> 1635 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be 1636 * either because the parameters are all fixed, or because the lens has had enough 1637 * time to reach the most recently-requested values. 1638 * If all these lens parameters are not changable for a camera device, as listed below:</p> 1639 * <ul> 1640 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means 1641 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li> 1642 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value), 1643 * which means the optical zoom is not supported.</li> 1644 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li> 1645 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li> 1646 * </ul> 1647 * <p>Then this state will always be STATIONARY.</p> 1648 * <p>When the state is MOVING, it indicates that at least one of the lens parameters 1649 * is changing.</p> 1650 * 1651 * @see CaptureRequest#LENS_APERTURE 1652 * @see CaptureRequest#LENS_FILTER_DENSITY 1653 * @see CaptureRequest#LENS_FOCAL_LENGTH 1654 * @see CaptureRequest#LENS_FOCUS_DISTANCE 1655 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 1656 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 1657 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS 1658 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1659 * @see #LENS_STATE_STATIONARY 1660 * @see #LENS_STATE_MOVING 1661 */ 1662 public static final Key<Integer> LENS_STATE = 1663 new Key<Integer>("android.lens.state", int.class); 1664 1665 /** 1666 * <p>Mode of operation for the noise reduction 1667 * algorithm</p> 1668 * <p>Noise filtering control. OFF means no noise reduction 1669 * will be applied by the camera device.</p> 1670 * <p>This must be set to a valid mode in 1671 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p> 1672 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering 1673 * will be applied. HIGH_QUALITY mode indicates that the camera device 1674 * will use the highest-quality noise filtering algorithms, 1675 * even if it slows down capture rate. FAST means the camera device should not 1676 * slow down capture rate when applying noise filtering.</p> 1677 * 1678 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 1679 * @see #NOISE_REDUCTION_MODE_OFF 1680 * @see #NOISE_REDUCTION_MODE_FAST 1681 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY 1682 */ 1683 public static final Key<Integer> NOISE_REDUCTION_MODE = 1684 new Key<Integer>("android.noiseReduction.mode", int.class); 1685 1686 /** 1687 * <p>Whether a result given to the framework is the 1688 * final one for the capture, or only a partial that contains a 1689 * subset of the full set of dynamic metadata 1690 * values.</p> 1691 * <p>The entries in the result metadata buffers for a 1692 * single capture may not overlap, except for this entry. The 1693 * FINAL buffers must retain FIFO ordering relative to the 1694 * requests that generate them, so the FINAL buffer for frame 3 must 1695 * always be sent to the framework after the FINAL buffer for frame 2, and 1696 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned 1697 * in any order relative to other frames, but all PARTIAL buffers for a given 1698 * capture must arrive before the FINAL buffer for that capture. This entry may 1699 * only be used by the camera device if quirks.usePartialResult is set to 1.</p> 1700 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1701 * @hide 1702 */ 1703 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT = 1704 new Key<Boolean>("android.quirks.partialResult", boolean.class); 1705 1706 /** 1707 * <p>A frame counter set by the framework. This value monotonically 1708 * increases with every new result (that is, each new result has a unique 1709 * frameCount value).</p> 1710 * <p>Reset on release()</p> 1711 */ 1712 public static final Key<Integer> REQUEST_FRAME_COUNT = 1713 new Key<Integer>("android.request.frameCount", int.class); 1714 1715 /** 1716 * <p>An application-specified ID for the current 1717 * request. Must be maintained unchanged in output 1718 * frame</p> 1719 * @hide 1720 */ 1721 public static final Key<Integer> REQUEST_ID = 1722 new Key<Integer>("android.request.id", int.class); 1723 1724 /** 1725 * <p>Specifies the number of pipeline stages the frame went 1726 * through from when it was exposed to when the final completed result 1727 * was available to the framework.</p> 1728 * <p>Depending on what settings are used in the request, and 1729 * what streams are configured, the data may undergo less processing, 1730 * and some pipeline stages skipped.</p> 1731 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p> 1732 * 1733 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH 1734 */ 1735 public static final Key<Byte> REQUEST_PIPELINE_DEPTH = 1736 new Key<Byte>("android.request.pipelineDepth", byte.class); 1737 1738 /** 1739 * <p>(x, y, width, height).</p> 1740 * <p>A rectangle with the top-level corner of (x,y) and size 1741 * (width, height). The region of the sensor that is used for 1742 * output. Each stream must use this rectangle to produce its 1743 * output, cropping to a smaller region if necessary to 1744 * maintain the stream's aspect ratio.</p> 1745 * <p>HAL2.x uses only (x, y, width)</p> 1746 * <p>Any additional per-stream cropping must be done to 1747 * maximize the final pixel area of the stream.</p> 1748 * <p>For example, if the crop region is set to a 4:3 aspect 1749 * ratio, then 4:3 streams should use the exact crop 1750 * region. 16:9 streams should further crop vertically 1751 * (letterbox).</p> 1752 * <p>Conversely, if the crop region is set to a 16:9, then 4:3 1753 * outputs should crop horizontally (pillarbox), and 16:9 1754 * streams should match exactly. These additional crops must 1755 * be centered within the crop region.</p> 1756 * <p>The output streams must maintain square pixels at all 1757 * times, no matter what the relative aspect ratios of the 1758 * crop region and the stream are. Negative values for 1759 * corner are allowed for raw output if full pixel array is 1760 * larger than active pixel array. Width and height may be 1761 * rounded to nearest larger supportable width, especially 1762 * for raw output, where only a few fixed scales may be 1763 * possible. The width and height of the crop region cannot 1764 * be set to be smaller than floor( activeArraySize.width / 1765 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor( 1766 * activeArraySize.height / 1767 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p> 1768 * 1769 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM 1770 */ 1771 public static final Key<android.graphics.Rect> SCALER_CROP_REGION = 1772 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); 1773 1774 /** 1775 * <p>Duration each pixel is exposed to 1776 * light.</p> 1777 * <p>If the sensor can't expose this exact duration, it should shorten the 1778 * duration exposed to the nearest possible value (rather than expose longer).</p> 1779 */ 1780 public static final Key<Long> SENSOR_EXPOSURE_TIME = 1781 new Key<Long>("android.sensor.exposureTime", long.class); 1782 1783 /** 1784 * <p>Duration from start of frame exposure to 1785 * start of next frame exposure.</p> 1786 * <p>The maximum frame rate that can be supported by a camera subsystem is 1787 * a function of many factors:</p> 1788 * <ul> 1789 * <li>Requested resolutions of output image streams</li> 1790 * <li>Availability of binning / skipping modes on the imager</li> 1791 * <li>The bandwidth of the imager interface</li> 1792 * <li>The bandwidth of the various ISP processing blocks</li> 1793 * </ul> 1794 * <p>Since these factors can vary greatly between different ISPs and 1795 * sensors, the camera abstraction tries to represent the bandwidth 1796 * restrictions with as simple a model as possible.</p> 1797 * <p>The model presented has the following characteristics:</p> 1798 * <ul> 1799 * <li>The image sensor is always configured to output the smallest 1800 * resolution possible given the application's requested output stream 1801 * sizes. The smallest resolution is defined as being at least as large 1802 * as the largest requested output stream size; the camera pipeline must 1803 * never digitally upsample sensor data when the crop region covers the 1804 * whole sensor. In general, this means that if only small output stream 1805 * resolutions are configured, the sensor can provide a higher frame 1806 * rate.</li> 1807 * <li>Since any request may use any or all the currently configured 1808 * output streams, the sensor and ISP must be configured to support 1809 * scaling a single capture to all the streams at the same time. This 1810 * means the camera pipeline must be ready to produce the largest 1811 * requested output size without any delay. Therefore, the overall 1812 * frame rate of a given configured stream set is governed only by the 1813 * largest requested stream resolution.</li> 1814 * <li>Using more than one output stream in a request does not affect the 1815 * frame duration.</li> 1816 * <li>Certain format-streams may need to do additional background processing 1817 * before data is consumed/produced by that stream. These processors 1818 * can run concurrently to the rest of the camera pipeline, but 1819 * cannot process more than 1 capture at a time.</li> 1820 * </ul> 1821 * <p>The necessary information for the application, given the model above, 1822 * is provided via the {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} field. 1823 * These are used to determine the maximum frame rate / minimum frame 1824 * duration that is possible for a given stream configuration.</p> 1825 * <p>Specifically, the application can use the following rules to 1826 * determine the minimum frame duration it can request from the camera 1827 * device:</p> 1828 * <ol> 1829 * <li>Let the set of currently configured input/output streams 1830 * be called <code>S</code>.</li> 1831 * <li>Find the minimum frame durations for each stream in <code>S</code>, by 1832 * looking it up in {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} (with 1833 * its respective size/format). Let this set of frame durations be called 1834 * <code>F</code>.</li> 1835 * <li>For any given request <code>R</code>, the minimum frame duration allowed 1836 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams 1837 * used in <code>R</code> be called <code>S_r</code>.</li> 1838 * </ol> 1839 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in 1840 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}), then the frame duration in 1841 * <code>F</code> determines the steady state frame rate that the application will 1842 * get if it uses <code>R</code> as a repeating request. Let this special kind 1843 * of request be called <code>Rsimple</code>.</p> 1844 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved 1845 * by a single capture of a new request <code>Rstall</code> (which has at least 1846 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the 1847 * same minimum frame duration this will not cause a frame rate loss 1848 * if all buffers from the previous <code>Rstall</code> have already been 1849 * delivered.</p> 1850 * <p>For more details about stalling, see 1851 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}.</p> 1852 * 1853 * @see CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS 1854 * @see CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS 1855 */ 1856 public static final Key<Long> SENSOR_FRAME_DURATION = 1857 new Key<Long>("android.sensor.frameDuration", long.class); 1858 1859 /** 1860 * <p>Gain applied to image data. Must be 1861 * implemented through analog gain only if set to values 1862 * below 'maximum analog sensitivity'.</p> 1863 * <p>If the sensor can't apply this exact gain, it should lessen the 1864 * gain to the nearest possible value (rather than gain more).</p> 1865 * <p>ISO 12232:2006 REI method</p> 1866 */ 1867 public static final Key<Integer> SENSOR_SENSITIVITY = 1868 new Key<Integer>("android.sensor.sensitivity", int.class); 1869 1870 /** 1871 * <p>Time at start of exposure of first 1872 * row</p> 1873 * <p>Monotonic, should be synced to other timestamps in 1874 * system</p> 1875 */ 1876 public static final Key<Long> SENSOR_TIMESTAMP = 1877 new Key<Long>("android.sensor.timestamp", long.class); 1878 1879 /** 1880 * <p>The temperature of the sensor, sampled at the time 1881 * exposure began for this frame.</p> 1882 * <p>The thermal diode being queried should be inside the sensor PCB, or 1883 * somewhere close to it.</p> 1884 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1885 * <p><b>Full capability</b> - 1886 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1887 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1888 * 1889 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1890 */ 1891 public static final Key<Float> SENSOR_TEMPERATURE = 1892 new Key<Float>("android.sensor.temperature", float.class); 1893 1894 /** 1895 * <p>The estimated camera neutral color in the native sensor colorspace at 1896 * the time of capture.</p> 1897 * <p>This value gives the neutral color point encoded as an RGB value in the 1898 * native sensor color space. The neutral color point indicates the 1899 * currently estimated white point of the scene illumination. It can be 1900 * used to interpolate between the provided color transforms when 1901 * processing raw sensor data.</p> 1902 * <p>The order of the values is R, G, B; where R is in the lowest index.</p> 1903 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1904 */ 1905 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT = 1906 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class); 1907 1908 /** 1909 * <p>The worst-case divergence between Bayer green channels.</p> 1910 * <p>This value is an estimate of the worst case split between the 1911 * Bayer green channels in the red and blue rows in the sensor color 1912 * filter array.</p> 1913 * <p>The green split is calculated as follows:</p> 1914 * <ol> 1915 * <li>A 5x5 pixel (or larger) window W within the active sensor array is 1916 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer 1917 * mosaic channels (R, Gr, Gb, B). The location and size of the window 1918 * chosen is implementation defined, and should be chosen to provide a 1919 * green split estimate that is both representative of the entire image 1920 * for this camera sensor, and can be calculated quickly.</li> 1921 * <li>The arithmetic mean of the green channels from the red 1922 * rows (mean_Gr) within W is computed.</li> 1923 * <li>The arithmetic mean of the green channels from the blue 1924 * rows (mean_Gb) within W is computed.</li> 1925 * <li>The maximum ratio R of the two means is computed as follows: 1926 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li> 1927 * </ol> 1928 * <p>The ratio R is the green split divergence reported for this property, 1929 * which represents how much the green channels differ in the mosaic 1930 * pattern. This value is typically used to determine the treatment of 1931 * the green mosaic channels when demosaicing.</p> 1932 * <p>The green split value can be roughly interpreted as follows:</p> 1933 * <ul> 1934 * <li>R < 1.03 is a negligible split (<3% divergence).</li> 1935 * <li>1.20 <= R >= 1.03 will require some software 1936 * correction to avoid demosaic errors (3-20% divergence).</li> 1937 * <li>R > 1.20 will require strong software correction to produce 1938 * a usuable image (>20% divergence).</li> 1939 * </ul> 1940 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1941 */ 1942 public static final Key<Float> SENSOR_GREEN_SPLIT = 1943 new Key<Float>("android.sensor.greenSplit", float.class); 1944 1945 /** 1946 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern 1947 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p> 1948 * <p>Each color channel is treated as an unsigned 32-bit integer. 1949 * The camera device then uses the most significant X bits 1950 * that correspond to how many bits are in its Bayer raw sensor 1951 * output.</p> 1952 * <p>For example, a sensor with RAW10 Bayer output would use the 1953 * 10 most significant bits from each color channel.</p> 1954 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1955 * 1956 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1957 */ 1958 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA = 1959 new Key<int[]>("android.sensor.testPatternData", int[].class); 1960 1961 /** 1962 * <p>When enabled, the sensor sends a test pattern instead of 1963 * doing a real exposure from the camera.</p> 1964 * <p>When a test pattern is enabled, all manual sensor controls specified 1965 * by android.sensor.* should be ignored. All other controls should 1966 * work as normal.</p> 1967 * <p>For example, if manual flash is enabled, flash firing should still 1968 * occur (and that the test pattern remain unmodified, since the flash 1969 * would not actually affect it).</p> 1970 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1971 * @see #SENSOR_TEST_PATTERN_MODE_OFF 1972 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR 1973 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS 1974 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY 1975 * @see #SENSOR_TEST_PATTERN_MODE_PN9 1976 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1 1977 */ 1978 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE = 1979 new Key<Integer>("android.sensor.testPatternMode", int.class); 1980 1981 /** 1982 * <p>Quality of lens shading correction applied 1983 * to the image data.</p> 1984 * <p>When set to OFF mode, no lens shading correction will be applied by the 1985 * camera device, and an identity lens shading map data will be provided 1986 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens 1987 * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>, 1988 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map 1989 * shown below:</p> 1990 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1991 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1992 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1993 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1994 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1995 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 1996 * </code></pre> 1997 * <p>When set to other modes, lens shading correction will be applied by the 1998 * camera device. Applications can request lens shading map data by setting 1999 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide 2000 * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified 2001 * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p> 2002 * 2003 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE 2004 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP 2005 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2006 * @see #SHADING_MODE_OFF 2007 * @see #SHADING_MODE_FAST 2008 * @see #SHADING_MODE_HIGH_QUALITY 2009 */ 2010 public static final Key<Integer> SHADING_MODE = 2011 new Key<Integer>("android.shading.mode", int.class); 2012 2013 /** 2014 * <p>State of the face detector 2015 * unit</p> 2016 * <p>Whether face detection is enabled, and whether it 2017 * should output just the basic fields or the full set of 2018 * fields. Value must be one of the 2019 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p> 2020 * 2021 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 2022 * @see #STATISTICS_FACE_DETECT_MODE_OFF 2023 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE 2024 * @see #STATISTICS_FACE_DETECT_MODE_FULL 2025 */ 2026 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = 2027 new Key<Integer>("android.statistics.faceDetectMode", int.class); 2028 2029 /** 2030 * <p>List of unique IDs for detected 2031 * faces</p> 2032 * <p>Only available if faceDetectMode == FULL</p> 2033 * @hide 2034 */ 2035 public static final Key<int[]> STATISTICS_FACE_IDS = 2036 new Key<int[]>("android.statistics.faceIds", int[].class); 2037 2038 /** 2039 * <p>List of landmarks for detected 2040 * faces</p> 2041 * <p>Only available if faceDetectMode == FULL</p> 2042 * @hide 2043 */ 2044 public static final Key<int[]> STATISTICS_FACE_LANDMARKS = 2045 new Key<int[]>("android.statistics.faceLandmarks", int[].class); 2046 2047 /** 2048 * <p>List of the bounding rectangles for detected 2049 * faces</p> 2050 * <p>Only available if faceDetectMode != OFF</p> 2051 * @hide 2052 */ 2053 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES = 2054 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class); 2055 2056 /** 2057 * <p>List of the face confidence scores for 2058 * detected faces</p> 2059 * <p>Only available if faceDetectMode != OFF. The value should be 2060 * meaningful (for example, setting 100 at all times is illegal).</p> 2061 * @hide 2062 */ 2063 public static final Key<byte[]> STATISTICS_FACE_SCORES = 2064 new Key<byte[]>("android.statistics.faceScores", byte[].class); 2065 2066 /** 2067 * <p>The shading map is a low-resolution floating-point map 2068 * that lists the coefficients used to correct for vignetting, for each 2069 * Bayer color channel.</p> 2070 * <p>The least shaded section of the image should have a gain factor 2071 * of 1; all other sections should have gains above 1.</p> 2072 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map 2073 * must take into account the colorCorrection settings.</p> 2074 * <p>The shading map is for the entire active pixel array, and is not 2075 * affected by the crop region specified in the request. Each shading map 2076 * entry is the value of the shading compensation map over a specific 2077 * pixel on the sensor. Specifically, with a (N x M) resolution shading 2078 * map, and an active pixel array size (W x H), shading map entry 2079 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at 2080 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. 2081 * The map is assumed to be bilinearly interpolated between the sample points.</p> 2082 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green 2083 * channel for the even rows of a Bayer pattern, and Godd is the odd rows. 2084 * The shading map is stored in a fully interleaved format, and its size 2085 * is provided in the camera static metadata by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p> 2086 * <p>The shading map should have on the order of 30-40 rows and columns, 2087 * and must be smaller than 64x64.</p> 2088 * <p>As an example, given a very small map defined as:</p> 2089 * <pre><code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ] 2090 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} = 2091 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, 2092 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, 2093 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, 2094 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, 2095 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, 2096 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] 2097 * </code></pre> 2098 * <p>The low-resolution scaling map images for each channel are 2099 * (displayed using nearest-neighbor interpolation):</p> 2100 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" /> 2101 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" /> 2102 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" /> 2103 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p> 2104 * <p>As a visualization only, inverting the full-color map to recover an 2105 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p> 2106 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p> 2107 * 2108 * @see CaptureRequest#COLOR_CORRECTION_MODE 2109 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE 2110 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP 2111 */ 2112 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP = 2113 new Key<float[]>("android.statistics.lensShadingMap", float[].class); 2114 2115 /** 2116 * <p>The best-fit color channel gains calculated 2117 * by the camera device's statistics units for the current output frame.</p> 2118 * <p>This may be different than the gains used for this frame, 2119 * since statistics processing on data from a new frame 2120 * typically completes after the transform has already been 2121 * applied to that frame.</p> 2122 * <p>The 4 channel gains are defined in Bayer domain, 2123 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p> 2124 * <p>This value should always be calculated by the AWB block, 2125 * regardless of the android.control.* current values.</p> 2126 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2127 * 2128 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2129 * @hide 2130 */ 2131 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS = 2132 new Key<float[]>("android.statistics.predictedColorGains", float[].class); 2133 2134 /** 2135 * <p>The best-fit color transform matrix estimate 2136 * calculated by the camera device's statistics units for the current 2137 * output frame.</p> 2138 * <p>The camera device will provide the estimate from its 2139 * statistics unit on the white balance transforms to use 2140 * for the next frame. These are the values the camera device believes 2141 * are the best fit for the current output frame. This may 2142 * be different than the transform used for this frame, since 2143 * statistics processing on data from a new frame typically 2144 * completes after the transform has already been applied to 2145 * that frame.</p> 2146 * <p>These estimates must be provided for all frames, even if 2147 * capture settings and color transforms are set by the application.</p> 2148 * <p>This value should always be calculated by the AWB block, 2149 * regardless of the android.control.* current values.</p> 2150 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2151 * @hide 2152 */ 2153 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = 2154 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class); 2155 2156 /** 2157 * <p>The camera device estimated scene illumination lighting 2158 * frequency.</p> 2159 * <p>Many light sources, such as most fluorescent lights, flicker at a rate 2160 * that depends on the local utility power standards. This flicker must be 2161 * accounted for by auto-exposure routines to avoid artifacts in captured images. 2162 * The camera device uses this entry to tell the application what the scene 2163 * illuminant frequency is.</p> 2164 * <p>When manual exposure control is enabled 2165 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == OFF</code>), 2166 * the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't do the antibanding, and the 2167 * application can ensure it selects exposure times that do not cause banding 2168 * issues by looking into this metadata field. See {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} 2169 * for more details.</p> 2170 * <p>Report NONE if there doesn't appear to be flickering illumination.</p> 2171 * 2172 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2173 * @see CaptureRequest#CONTROL_AE_MODE 2174 * @see CaptureRequest#CONTROL_MODE 2175 * @see #STATISTICS_SCENE_FLICKER_NONE 2176 * @see #STATISTICS_SCENE_FLICKER_50HZ 2177 * @see #STATISTICS_SCENE_FLICKER_60HZ 2178 */ 2179 public static final Key<Integer> STATISTICS_SCENE_FLICKER = 2180 new Key<Integer>("android.statistics.sceneFlicker", int.class); 2181 2182 /** 2183 * <p>Operating mode for hotpixel map generation.</p> 2184 * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}. 2185 * If set to OFF, no hotpixel map should be returned.</p> 2186 * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p> 2187 * 2188 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 2189 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES 2190 */ 2191 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE = 2192 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class); 2193 2194 /** 2195 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p> 2196 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and 2197 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and 2198 * bottom-right of the pixel array, respectively. The width and 2199 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}. 2200 * This may include hot pixels that lie outside of the active array 2201 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 2202 * 2203 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2204 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 2205 */ 2206 public static final Key<int[]> STATISTICS_HOT_PIXEL_MAP = 2207 new Key<int[]>("android.statistics.hotPixelMap", int[].class); 2208 2209 /** 2210 * <p>Whether the camera device will output the lens 2211 * shading map in output result metadata.</p> 2212 * <p>When set to ON, 2213 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in 2214 * the output result metadata.</p> 2215 * 2216 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP 2217 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF 2218 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON 2219 */ 2220 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE = 2221 new Key<Integer>("android.statistics.lensShadingMapMode", int.class); 2222 2223 /** 2224 * <p>Tonemapping / contrast / gamma curve for the blue 2225 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2226 * CONTRAST_CURVE.</p> 2227 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p> 2228 * 2229 * @see CaptureRequest#TONEMAP_CURVE_RED 2230 * @see CaptureRequest#TONEMAP_MODE 2231 */ 2232 public static final Key<float[]> TONEMAP_CURVE_BLUE = 2233 new Key<float[]>("android.tonemap.curveBlue", float[].class); 2234 2235 /** 2236 * <p>Tonemapping / contrast / gamma curve for the green 2237 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2238 * CONTRAST_CURVE.</p> 2239 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p> 2240 * 2241 * @see CaptureRequest#TONEMAP_CURVE_RED 2242 * @see CaptureRequest#TONEMAP_MODE 2243 */ 2244 public static final Key<float[]> TONEMAP_CURVE_GREEN = 2245 new Key<float[]>("android.tonemap.curveGreen", float[].class); 2246 2247 /** 2248 * <p>Tonemapping / contrast / gamma curve for the red 2249 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2250 * CONTRAST_CURVE.</p> 2251 * <p>Each channel's curve is defined by an array of control points:</p> 2252 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = 2253 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 2254 * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 2255 * <p>These are sorted in order of increasing <code>Pin</code>; it is always 2256 * guaranteed that input values 0.0 and 1.0 are included in the list to 2257 * define a complete mapping. For input values between control points, 2258 * the camera device must linearly interpolate between the control 2259 * points.</p> 2260 * <p>Each curve can have an independent number of points, and the number 2261 * of points can be less than max (that is, the request doesn't have to 2262 * always provide a curve with number of points equivalent to 2263 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 2264 * <p>A few examples, and their corresponding graphical mappings; these 2265 * only specify the red channel and the precision is limited to 4 2266 * digits, for conciseness.</p> 2267 * <p>Linear mapping:</p> 2268 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 0, 1.0, 1.0 ] 2269 * </code></pre> 2270 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 2271 * <p>Invert mapping:</p> 2272 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 1.0, 1.0, 0 ] 2273 * </code></pre> 2274 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 2275 * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 2276 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 2277 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 2278 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 2279 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 2280 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 2281 * </code></pre> 2282 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 2283 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 2284 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 2285 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 2286 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 2287 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 2288 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 2289 * </code></pre> 2290 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 2291 * 2292 * @see CaptureRequest#TONEMAP_CURVE_RED 2293 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 2294 * @see CaptureRequest#TONEMAP_MODE 2295 */ 2296 public static final Key<float[]> TONEMAP_CURVE_RED = 2297 new Key<float[]>("android.tonemap.curveRed", float[].class); 2298 2299 /** 2300 * <p>High-level global contrast/gamma/tonemapping control.</p> 2301 * <p>When switching to an application-defined contrast curve by setting 2302 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined 2303 * per-channel with a set of <code>(in, out)</code> points that specify the 2304 * mapping from input high-bit-depth pixel value to the output 2305 * low-bit-depth value. Since the actual pixel ranges of both input 2306 * and output may change depending on the camera pipeline, the values 2307 * are specified by normalized floating-point numbers.</p> 2308 * <p>More-complex color mapping operations such as 3D color look-up 2309 * tables, selective chroma enhancement, or other non-linear color 2310 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2311 * CONTRAST_CURVE.</p> 2312 * <p>This must be set to a valid mode in 2313 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p> 2314 * <p>When using either FAST or HIGH_QUALITY, the camera device will 2315 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed}, 2316 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, and {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}. 2317 * These values are always available, and as close as possible to the 2318 * actually used nonlinear/nonglobal transforms.</p> 2319 * <p>If a request is sent with TRANSFORM_MATRIX with the camera device's 2320 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 2321 * roughly the same.</p> 2322 * 2323 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES 2324 * @see CaptureRequest#TONEMAP_CURVE_BLUE 2325 * @see CaptureRequest#TONEMAP_CURVE_GREEN 2326 * @see CaptureRequest#TONEMAP_CURVE_RED 2327 * @see CaptureRequest#TONEMAP_MODE 2328 * @see #TONEMAP_MODE_CONTRAST_CURVE 2329 * @see #TONEMAP_MODE_FAST 2330 * @see #TONEMAP_MODE_HIGH_QUALITY 2331 */ 2332 public static final Key<Integer> TONEMAP_MODE = 2333 new Key<Integer>("android.tonemap.mode", int.class); 2334 2335 /** 2336 * <p>This LED is nominally used to indicate to the user 2337 * that the camera is powered on and may be streaming images back to the 2338 * Application Processor. In certain rare circumstances, the OS may 2339 * disable this when video is processed locally and not transmitted to 2340 * any untrusted applications.</p> 2341 * <p>In particular, the LED <em>must</em> always be on when the data could be 2342 * transmitted off the device. The LED <em>should</em> always be on whenever 2343 * data is stored locally on the device.</p> 2344 * <p>The LED <em>may</em> be off if a trusted application is using the data that 2345 * doesn't violate the above rules.</p> 2346 * @hide 2347 */ 2348 public static final Key<Boolean> LED_TRANSMIT = 2349 new Key<Boolean>("android.led.transmit", boolean.class); 2350 2351 /** 2352 * <p>Whether black-level compensation is locked 2353 * to its current values, or is free to vary.</p> 2354 * <p>Whether the black level offset was locked for this frame. Should be 2355 * ON if {@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock} was ON in the capture request, unless 2356 * a change in other capture settings forced the camera device to 2357 * perform a black level reset.</p> 2358 * 2359 * @see CaptureRequest#BLACK_LEVEL_LOCK 2360 */ 2361 public static final Key<Boolean> BLACK_LEVEL_LOCK = 2362 new Key<Boolean>("android.blackLevel.lock", boolean.class); 2363 2364 /** 2365 * <p>The frame number corresponding to the last request 2366 * with which the output result (metadata + buffers) has been fully 2367 * synchronized.</p> 2368 * <p>When a request is submitted to the camera device, there is usually a 2369 * delay of several frames before the controls get applied. A camera 2370 * device may either choose to account for this delay by implementing a 2371 * pipeline and carefully submit well-timed atomic control updates, or 2372 * it may start streaming control changes that span over several frame 2373 * boundaries.</p> 2374 * <p>In the latter case, whenever a request's settings change relative to 2375 * the previous submitted request, the full set of changes may take 2376 * multiple frame durations to fully take effect. Some settings may 2377 * take effect sooner (in less frame durations) than others.</p> 2378 * <p>While a set of control changes are being propagated, this value 2379 * will be CONVERGING.</p> 2380 * <p>Once it is fully known that a set of control changes have been 2381 * finished propagating, and the resulting updated control settings 2382 * have been read back by the camera device, this value will be set 2383 * to a non-negative frame number (corresponding to the request to 2384 * which the results have synchronized to).</p> 2385 * <p>Older camera device implementations may not have a way to detect 2386 * when all camera controls have been applied, and will always set this 2387 * value to UNKNOWN.</p> 2388 * <p>FULL capability devices will always have this value set to the 2389 * frame number of the request corresponding to this result.</p> 2390 * <p><em>Further details</em>:</p> 2391 * <ul> 2392 * <li>Whenever a request differs from the last request, any future 2393 * results not yet returned may have this value set to CONVERGING (this 2394 * could include any in-progress captures not yet returned by the camera 2395 * device, for more details see pipeline considerations below).</li> 2396 * <li>Submitting a series of multiple requests that differ from the 2397 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3) 2398 * moves the new synchronization frame to the last non-repeating 2399 * request (using the smallest frame number from the contiguous list of 2400 * repeating requests).</li> 2401 * <li>Submitting the same request repeatedly will not change this value 2402 * to CONVERGING, if it was already a non-negative value.</li> 2403 * <li>When this value changes to non-negative, that means that all of the 2404 * metadata controls from the request have been applied, all of the 2405 * metadata controls from the camera device have been read to the 2406 * updated values (into the result), and all of the graphics buffers 2407 * corresponding to this result are also synchronized to the request.</li> 2408 * </ul> 2409 * <p><em>Pipeline considerations</em>:</p> 2410 * <p>Submitting a request with updated controls relative to the previously 2411 * submitted requests may also invalidate the synchronization state 2412 * of all the results corresponding to currently in-flight requests.</p> 2413 * <p>In other words, results for this current request and up to 2414 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their 2415 * android.sync.frameNumber change to CONVERGING.</p> 2416 * 2417 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH 2418 * @see #SYNC_FRAME_NUMBER_CONVERGING 2419 * @see #SYNC_FRAME_NUMBER_UNKNOWN 2420 * @hide 2421 */ 2422 public static final Key<Long> SYNC_FRAME_NUMBER = 2423 new Key<Long>("android.sync.frameNumber", long.class); 2424 2425 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 2426 * End generated code 2427 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 2428 2429 /** 2430 * <p> 2431 * List of the {@link Face Faces} detected through camera face detection 2432 * in this result. 2433 * </p> 2434 * <p> 2435 * Only available if {@link #STATISTICS_FACE_DETECT_MODE} {@code !=} 2436 * {@link CameraMetadata#STATISTICS_FACE_DETECT_MODE_OFF OFF}. 2437 * </p> 2438 * 2439 * @see Face 2440 */ 2441 public static final Key<Face[]> STATISTICS_FACES = 2442 new Key<Face[]>("android.statistics.faces", Face[].class); 2443} 2444