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