CaptureResult.java revision f8a2f575900c527ce3fc73076fa88453a51017d0
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.annotation.NonNull; 20import android.annotation.Nullable; 21import android.hardware.camera2.impl.CameraMetadataNative; 22import android.hardware.camera2.impl.CaptureResultExtras; 23import android.hardware.camera2.impl.PublicKey; 24import android.hardware.camera2.impl.SyntheticKey; 25import android.hardware.camera2.utils.TypeReference; 26import android.util.Log; 27import android.util.Rational; 28 29import java.util.List; 30 31/** 32 * <p>The subset of the results of a single image capture from the image sensor.</p> 33 * 34 * <p>Contains a subset of the final configuration for the capture hardware (sensor, lens, 35 * flash), the processing pipeline, the control algorithms, and the output 36 * buffers.</p> 37 * 38 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a 39 * {@link CaptureRequest}. All properties listed for capture requests can also 40 * be queried on the capture result, to determine the final values used for 41 * capture. The result also includes additional metadata about the state of the 42 * camera device during the capture.</p> 43 * 44 * <p>Not all properties returned by {@link CameraCharacteristics#getAvailableCaptureResultKeys()} 45 * are necessarily available. Some results are {@link CaptureResult partial} and will 46 * not have every key set. Only {@link TotalCaptureResult total} results are guaranteed to have 47 * every key available that was enabled by the request.</p> 48 * 49 * <p>{@link CaptureResult} objects are immutable.</p> 50 * 51 */ 52public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> { 53 54 private static final String TAG = "CaptureResult"; 55 private static final boolean VERBOSE = false; 56 57 /** 58 * A {@code Key} is used to do capture result field lookups with 59 * {@link CaptureResult#get}. 60 * 61 * <p>For example, to get the timestamp corresponding to the exposure of the first row: 62 * <code><pre> 63 * long timestamp = captureResult.get(CaptureResult.SENSOR_TIMESTAMP); 64 * </pre></code> 65 * </p> 66 * 67 * <p>To enumerate over all possible keys for {@link CaptureResult}, see 68 * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p> 69 * 70 * @see CaptureResult#get 71 * @see CameraCharacteristics#getAvailableCaptureResultKeys 72 */ 73 public final static class Key<T> { 74 private final CameraMetadataNative.Key<T> mKey; 75 76 /** 77 * Visible for testing and vendor extensions only. 78 * 79 * @hide 80 */ 81 public Key(String name, Class<T> type) { 82 mKey = new CameraMetadataNative.Key<T>(name, type); 83 } 84 85 /** 86 * Visible for testing and vendor extensions only. 87 * 88 * @hide 89 */ 90 public Key(String name, TypeReference<T> typeReference) { 91 mKey = new CameraMetadataNative.Key<T>(name, typeReference); 92 } 93 94 /** 95 * Return a camelCase, period separated name formatted like: 96 * {@code "root.section[.subsections].name"}. 97 * 98 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 99 * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 100 * 101 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 102 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 103 * specific key might look like {@code "com.google.nexus.data.private"}.</p> 104 * 105 * @return String representation of the key name 106 */ 107 @NonNull 108 public String getName() { 109 return mKey.getName(); 110 } 111 112 /** 113 * {@inheritDoc} 114 */ 115 @Override 116 public final int hashCode() { 117 return mKey.hashCode(); 118 } 119 120 /** 121 * {@inheritDoc} 122 */ 123 @SuppressWarnings("unchecked") 124 @Override 125 public final boolean equals(Object o) { 126 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 127 } 128 129 /** 130 * Visible for CameraMetadataNative implementation only; do not use. 131 * 132 * TODO: Make this private or remove it altogether. 133 * 134 * @hide 135 */ 136 public CameraMetadataNative.Key<T> getNativeKey() { 137 return mKey; 138 } 139 140 @SuppressWarnings({ "unchecked" }) 141 /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) { 142 mKey = (CameraMetadataNative.Key<T>) nativeKey; 143 } 144 } 145 146 private final CameraMetadataNative mResults; 147 private final CaptureRequest mRequest; 148 private final int mSequenceId; 149 private final long mFrameNumber; 150 151 /** 152 * Takes ownership of the passed-in properties object 153 * 154 * <p>For internal use only</p> 155 * @hide 156 */ 157 public CaptureResult(CameraMetadataNative results, CaptureRequest parent, 158 CaptureResultExtras extras) { 159 if (results == null) { 160 throw new IllegalArgumentException("results was null"); 161 } 162 163 if (parent == null) { 164 throw new IllegalArgumentException("parent was null"); 165 } 166 167 if (extras == null) { 168 throw new IllegalArgumentException("extras was null"); 169 } 170 171 mResults = CameraMetadataNative.move(results); 172 if (mResults.isEmpty()) { 173 throw new AssertionError("Results must not be empty"); 174 } 175 mRequest = parent; 176 mSequenceId = extras.getRequestId(); 177 mFrameNumber = extras.getFrameNumber(); 178 } 179 180 /** 181 * Returns a copy of the underlying {@link CameraMetadataNative}. 182 * @hide 183 */ 184 public CameraMetadataNative getNativeCopy() { 185 return new CameraMetadataNative(mResults); 186 } 187 188 /** 189 * Creates a request-less result. 190 * 191 * <p><strong>For testing only.</strong></p> 192 * @hide 193 */ 194 public CaptureResult(CameraMetadataNative results, int sequenceId) { 195 if (results == null) { 196 throw new IllegalArgumentException("results was null"); 197 } 198 199 mResults = CameraMetadataNative.move(results); 200 if (mResults.isEmpty()) { 201 throw new AssertionError("Results must not be empty"); 202 } 203 204 mRequest = null; 205 mSequenceId = sequenceId; 206 mFrameNumber = -1; 207 } 208 209 /** 210 * Get a capture result field value. 211 * 212 * <p>The field definitions can be found in {@link CaptureResult}.</p> 213 * 214 * <p>Querying the value for the same key more than once will return a value 215 * which is equal to the previous queried value.</p> 216 * 217 * @throws IllegalArgumentException if the key was not valid 218 * 219 * @param key The result field to read. 220 * @return The value of that key, or {@code null} if the field is not set. 221 */ 222 @Nullable 223 public <T> T get(Key<T> key) { 224 T value = mResults.get(key); 225 if (VERBOSE) Log.v(TAG, "#get for Key = " + key.getName() + ", returned value = " + value); 226 return value; 227 } 228 229 /** 230 * {@inheritDoc} 231 * @hide 232 */ 233 @SuppressWarnings("unchecked") 234 @Override 235 protected <T> T getProtected(Key<?> key) { 236 return (T) mResults.get(key); 237 } 238 239 /** 240 * {@inheritDoc} 241 * @hide 242 */ 243 @SuppressWarnings("unchecked") 244 @Override 245 protected Class<Key<?>> getKeyClass() { 246 Object thisClass = Key.class; 247 return (Class<Key<?>>)thisClass; 248 } 249 250 /** 251 * Dumps the native metadata contents to logcat. 252 * 253 * <p>Visibility for testing/debugging only. The results will not 254 * include any synthesized keys, as they are invisible to the native layer.</p> 255 * 256 * @hide 257 */ 258 public void dumpToLog() { 259 mResults.dumpToLog(); 260 } 261 262 /** 263 * {@inheritDoc} 264 */ 265 @Override 266 @NonNull 267 public List<Key<?>> getKeys() { 268 // Force the javadoc for this function to show up on the CaptureResult page 269 return super.getKeys(); 270 } 271 272 /** 273 * Get the request associated with this result. 274 * 275 * <p>Whenever a request has been fully or partially captured, with 276 * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted} or 277 * {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed}, the {@code result}'s 278 * {@code getRequest()} will return that {@code request}. 279 * </p> 280 * 281 * <p>For example, 282 * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() { 283 * {@literal @}Override 284 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) { 285 * assert(myResult.getRequest.equals(myRequest) == true); 286 * } 287 * }, null); 288 * </code></pre> 289 * </p> 290 * 291 * @return The request associated with this result. Never {@code null}. 292 */ 293 @NonNull 294 public CaptureRequest getRequest() { 295 return mRequest; 296 } 297 298 /** 299 * Get the frame number associated with this result. 300 * 301 * <p>Whenever a request has been processed, regardless of failure or success, 302 * it gets a unique frame number assigned to its future result/failure.</p> 303 * 304 * <p>For the same type of request (capturing from the camera device or reprocessing), this 305 * value monotonically increments, starting with 0, for every new result or failure and the 306 * scope is the lifetime of the {@link CameraDevice}. Between different types of requests, 307 * the frame number may not monotonically increment. For example, the frame number of a newer 308 * reprocess result may be smaller than the frame number of an older result of capturing new 309 * images from the camera device, but the frame number of a newer reprocess result will never be 310 * smaller than the frame number of an older reprocess result.</p> 311 * 312 * @return The frame number 313 * 314 * @see CameraDevice#createCaptureRequest 315 * @see CameraDevice#createReprocessCaptureRequest 316 */ 317 public long getFrameNumber() { 318 return mFrameNumber; 319 } 320 321 /** 322 * The sequence ID for this failure that was returned by the 323 * {@link CameraCaptureSession#capture} family of functions. 324 * 325 * <p>The sequence ID is a unique monotonically increasing value starting from 0, 326 * incremented every time a new group of requests is submitted to the CameraDevice.</p> 327 * 328 * @return int The ID for the sequence of requests that this capture result is a part of 329 * 330 * @see CameraDevice.CaptureCallback#onCaptureSequenceCompleted 331 * @see CameraDevice.CaptureCallback#onCaptureSequenceAborted 332 */ 333 public int getSequenceId() { 334 return mSequenceId; 335 } 336 337 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 338 * The key entries below this point are generated from metadata 339 * definitions in /system/media/camera/docs. Do not modify by hand or 340 * modify the comment blocks at the start or end. 341 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 342 343 /** 344 * <p>The mode control selects how the image data is converted from the 345 * sensor's native color into linear sRGB color.</p> 346 * <p>When auto-white balance (AWB) is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this 347 * control is overridden by the AWB routine. When AWB is disabled, the 348 * application controls how the color mapping is performed.</p> 349 * <p>We define the expected processing pipeline below. For consistency 350 * across devices, this is always the case with TRANSFORM_MATRIX.</p> 351 * <p>When either FULL or HIGH_QUALITY is used, the camera device may 352 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 353 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the 354 * camera device (in the results) and be roughly correct.</p> 355 * <p>Switching to TRANSFORM_MATRIX and using the data provided from 356 * FAST or HIGH_QUALITY will yield a picture with the same white point 357 * as what was produced by the camera device in the earlier frame.</p> 358 * <p>The expected processing pipeline is as follows:</p> 359 * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p> 360 * <p>The white balance is encoded by two values, a 4-channel white-balance 361 * gain vector (applied in the Bayer domain), and a 3x3 color transform 362 * matrix (applied after demosaic).</p> 363 * <p>The 4-channel white-balance gains are defined as:</p> 364 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ] 365 * </code></pre> 366 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the 367 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows. 368 * These may be identical for a given camera device implementation; if 369 * the camera device does not support a separate gain for even/odd green 370 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to 371 * <code>G_even</code> in the output result metadata.</p> 372 * <p>The matrices for color transforms are defined as a 9-entry vector:</p> 373 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 374 * </code></pre> 375 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>, 376 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p> 377 * <p>with colors as follows:</p> 378 * <pre><code>r' = I0r + I1g + I2b 379 * g' = I3r + I4g + I5b 380 * b' = I6r + I7g + I8b 381 * </code></pre> 382 * <p>Both the input and output value ranges must match. Overflow/underflow 383 * values are clipped to fit within the range.</p> 384 * <p><b>Possible values:</b> 385 * <ul> 386 * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li> 387 * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li> 388 * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 389 * </ul></p> 390 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 391 * <p><b>Full capability</b> - 392 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 393 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 394 * 395 * @see CaptureRequest#COLOR_CORRECTION_GAINS 396 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 397 * @see CaptureRequest#CONTROL_AWB_MODE 398 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 399 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX 400 * @see #COLOR_CORRECTION_MODE_FAST 401 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY 402 */ 403 @PublicKey 404 public static final Key<Integer> COLOR_CORRECTION_MODE = 405 new Key<Integer>("android.colorCorrection.mode", int.class); 406 407 /** 408 * <p>A color transform matrix to use to transform 409 * from sensor RGB color space to output linear sRGB color space.</p> 410 * <p>This matrix is either set by the camera device when the request 411 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 412 * directly by the application in the request when the 413 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 414 * <p>In the latter case, the camera device may round the matrix to account 415 * for precision issues; the final rounded matrix should be reported back 416 * in this matrix result metadata. The transform should keep the magnitude 417 * of the output color values within <code>[0, 1.0]</code> (assuming input color 418 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p> 419 * <p>The valid range of each matrix element varies on different devices, but 420 * values within [-1.5, 3.0] are guaranteed not to be clipped.</p> 421 * <p><b>Units</b>: Unitless scale factors</p> 422 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 423 * <p><b>Full capability</b> - 424 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 425 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 426 * 427 * @see CaptureRequest#COLOR_CORRECTION_MODE 428 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 429 */ 430 @PublicKey 431 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM = 432 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class); 433 434 /** 435 * <p>Gains applying to Bayer raw color channels for 436 * white-balance.</p> 437 * <p>These per-channel gains are either set by the camera device 438 * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not 439 * TRANSFORM_MATRIX, or directly by the application in the 440 * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is 441 * TRANSFORM_MATRIX.</p> 442 * <p>The gains in the result metadata are the gains actually 443 * applied by the camera device to the current frame.</p> 444 * <p>The valid range of gains varies on different devices, but gains 445 * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given 446 * device allows gains below 1.0, this is usually not recommended because 447 * this can create color artifacts.</p> 448 * <p><b>Units</b>: Unitless gain factors</p> 449 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 450 * <p><b>Full capability</b> - 451 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 452 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 453 * 454 * @see CaptureRequest#COLOR_CORRECTION_MODE 455 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 456 */ 457 @PublicKey 458 public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS = 459 new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class); 460 461 /** 462 * <p>Mode of operation for the chromatic aberration correction algorithm.</p> 463 * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light 464 * can not focus on the same point after exiting from the lens. This metadata defines 465 * the high level control of chromatic aberration correction algorithm, which aims to 466 * minimize the chromatic artifacts that may occur along the object boundaries in an 467 * image.</p> 468 * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration 469 * correction will be applied. HIGH_QUALITY mode indicates that the camera device will 470 * use the highest-quality aberration correction algorithms, even if it slows down 471 * capture rate. FAST means the camera device will not slow down capture rate when 472 * applying aberration correction.</p> 473 * <p>LEGACY devices will always be in FAST mode.</p> 474 * <p><b>Possible values:</b> 475 * <ul> 476 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li> 477 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li> 478 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 479 * </ul></p> 480 * <p><b>Available values for this device:</b><br> 481 * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p> 482 * <p>This key is available on all devices.</p> 483 * 484 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES 485 * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF 486 * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST 487 * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY 488 */ 489 @PublicKey 490 public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE = 491 new Key<Integer>("android.colorCorrection.aberrationMode", int.class); 492 493 /** 494 * <p>The desired setting for the camera device's auto-exposure 495 * algorithm's antibanding compensation.</p> 496 * <p>Some kinds of lighting fixtures, such as some fluorescent 497 * lights, flicker at the rate of the power supply frequency 498 * (60Hz or 50Hz, depending on country). While this is 499 * typically not noticeable to a person, it can be visible to 500 * a camera device. If a camera sets its exposure time to the 501 * wrong value, the flicker may become visible in the 502 * viewfinder as flicker or in a final captured image, as a 503 * set of variable-brightness bands across the image.</p> 504 * <p>Therefore, the auto-exposure routines of camera devices 505 * include antibanding routines that ensure that the chosen 506 * exposure value will not cause such banding. The choice of 507 * exposure time depends on the rate of flicker, which the 508 * camera device can detect automatically, or the expected 509 * rate can be selected by the application using this 510 * control.</p> 511 * <p>A given camera device may not support all of the possible 512 * options for the antibanding mode. The 513 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains 514 * the available modes for a given camera device.</p> 515 * <p>AUTO mode is the default if it is available on given 516 * camera device. When AUTO mode is not available, the 517 * default will be either 50HZ or 60HZ, and both 50HZ 518 * and 60HZ will be available.</p> 519 * <p>If manual exposure control is enabled (by setting 520 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF), 521 * then this setting has no effect, and the application must 522 * ensure it selects exposure times that do not cause banding 523 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist 524 * the application in this.</p> 525 * <p><b>Possible values:</b> 526 * <ul> 527 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li> 528 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li> 529 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li> 530 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li> 531 * </ul></p> 532 * <p><b>Available values for this device:</b><br></p> 533 * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p> 534 * <p>This key is available on all devices.</p> 535 * 536 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES 537 * @see CaptureRequest#CONTROL_AE_MODE 538 * @see CaptureRequest#CONTROL_MODE 539 * @see CaptureResult#STATISTICS_SCENE_FLICKER 540 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF 541 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ 542 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ 543 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO 544 */ 545 @PublicKey 546 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE = 547 new Key<Integer>("android.control.aeAntibandingMode", int.class); 548 549 /** 550 * <p>Adjustment to auto-exposure (AE) target image 551 * brightness.</p> 552 * <p>The adjustment is measured as a count of steps, with the 553 * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the 554 * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p> 555 * <p>For example, if the exposure value (EV) step is 0.333, '6' 556 * will mean an exposure compensation of +2 EV; -3 will mean an 557 * exposure compensation of -1 EV. One EV represents a doubling 558 * of image brightness. Note that this control will only be 559 * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control 560 * will take effect even when {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p> 561 * <p>In the event of exposure compensation value being changed, camera device 562 * may take several frames to reach the newly requested exposure target. 563 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING 564 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will 565 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or 566 * FLASH_REQUIRED (if the scene is too dark for still capture).</p> 567 * <p><b>Units</b>: Compensation steps</p> 568 * <p><b>Range of valid values:</b><br> 569 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p> 570 * <p>This key is available on all devices.</p> 571 * 572 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE 573 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 574 * @see CaptureRequest#CONTROL_AE_LOCK 575 * @see CaptureRequest#CONTROL_AE_MODE 576 * @see CaptureResult#CONTROL_AE_STATE 577 */ 578 @PublicKey 579 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION = 580 new Key<Integer>("android.control.aeExposureCompensation", int.class); 581 582 /** 583 * <p>Whether auto-exposure (AE) is currently locked to its latest 584 * calculated values.</p> 585 * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters, 586 * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p> 587 * <p>Note that even when AE is locked, the flash may be fired if 588 * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / 589 * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p> 590 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock 591 * is ON, the camera device will still adjust its exposure value.</p> 592 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) 593 * when AE is already locked, the camera device will not change the exposure time 594 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 595 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 596 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 597 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed. 598 * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p> 599 * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock 600 * the AE if AE is locked by the camera device internally during precapture metering 601 * sequence In other words, submitting requests with AE unlock has no effect for an 602 * ongoing precapture metering sequence. Otherwise, the precapture metering sequence 603 * will never succeed in a sequence of preview requests where AE lock is always set 604 * to <code>false</code>.</p> 605 * <p>Since the camera device has a pipeline of in-flight requests, the settings that 606 * get locked do not necessarily correspond to the settings that were present in the 607 * latest capture result received from the camera device, since additional captures 608 * and AE updates may have occurred even before the result was sent out. If an 609 * application is switching between automatic and manual control and wishes to eliminate 610 * any flicker during the switch, the following procedure is recommended:</p> 611 * <ol> 612 * <li>Starting in auto-AE mode:</li> 613 * <li>Lock AE</li> 614 * <li>Wait for the first result to be output that has the AE locked</li> 615 * <li>Copy exposure settings from that result into a request, set the request to manual AE</li> 616 * <li>Submit the capture request, proceed to run manual AE as desired.</li> 617 * </ol> 618 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p> 619 * <p>This key is available on all devices.</p> 620 * 621 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 622 * @see CaptureRequest#CONTROL_AE_MODE 623 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 624 * @see CaptureResult#CONTROL_AE_STATE 625 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 626 * @see CaptureRequest#SENSOR_SENSITIVITY 627 */ 628 @PublicKey 629 public static final Key<Boolean> CONTROL_AE_LOCK = 630 new Key<Boolean>("android.control.aeLock", boolean.class); 631 632 /** 633 * <p>The desired mode for the camera device's 634 * auto-exposure routine.</p> 635 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is 636 * AUTO.</p> 637 * <p>When set to any of the ON modes, the camera device's 638 * auto-exposure routine is enabled, overriding the 639 * application's selected exposure time, sensor sensitivity, 640 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 641 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 642 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes 643 * is selected, the camera device's flash unit controls are 644 * also overridden.</p> 645 * <p>The FLASH modes are only available if the camera device 646 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p> 647 * <p>If flash TORCH mode is desired, this field must be set to 648 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p> 649 * <p>When set to any of the ON modes, the values chosen by the 650 * camera device auto-exposure routine for the overridden 651 * fields for a given capture will be available in its 652 * CaptureResult.</p> 653 * <p><b>Possible values:</b> 654 * <ul> 655 * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li> 656 * <li>{@link #CONTROL_AE_MODE_ON ON}</li> 657 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li> 658 * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li> 659 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li> 660 * </ul></p> 661 * <p><b>Available values for this device:</b><br> 662 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p> 663 * <p>This key is available on all devices.</p> 664 * 665 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES 666 * @see CaptureRequest#CONTROL_MODE 667 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 668 * @see CaptureRequest#FLASH_MODE 669 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 670 * @see CaptureRequest#SENSOR_FRAME_DURATION 671 * @see CaptureRequest#SENSOR_SENSITIVITY 672 * @see #CONTROL_AE_MODE_OFF 673 * @see #CONTROL_AE_MODE_ON 674 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH 675 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH 676 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE 677 */ 678 @PublicKey 679 public static final Key<Integer> CONTROL_AE_MODE = 680 new Key<Integer>("android.control.aeMode", int.class); 681 682 /** 683 * <p>List of metering areas to use for auto-exposure adjustment.</p> 684 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0. 685 * Otherwise will always be present.</p> 686 * <p>The maximum number of regions supported by the device is determined by the value 687 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p> 688 * <p>The coordinate system is based on the active pixel array, 689 * with (0,0) being the top-left pixel in the active pixel array, and 690 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 691 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 692 * bottom-right pixel in the active pixel array.</p> 693 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 694 * for every pixel in the area. This means that a large metering area 695 * with the same weight as a smaller area will have more effect in 696 * the metering result. Metering areas can partially overlap and the 697 * camera device will add the weights in the overlap region.</p> 698 * <p>The weights are relative to weights of other exposure metering regions, so if only one 699 * region is used, all non-zero weights will have the same effect. A region with 0 700 * weight is ignored.</p> 701 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 702 * camera device.</p> 703 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 704 * capture result metadata, the camera device will ignore the sections outside the crop 705 * region and output only the intersection rectangle as the metering region in the result 706 * metadata. If the region is entirely outside the crop region, it will be ignored and 707 * not reported in the result metadata.</p> 708 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 709 * <p><b>Range of valid values:</b><br> 710 * Coordinates must be between <code>[(0,0), (width, height))</code> of 711 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 712 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 713 * 714 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE 715 * @see CaptureRequest#SCALER_CROP_REGION 716 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 717 */ 718 @PublicKey 719 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS = 720 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class); 721 722 /** 723 * <p>Range over which the auto-exposure routine can 724 * adjust the capture frame rate to maintain good 725 * exposure.</p> 726 * <p>Only constrains auto-exposure (AE) algorithm, not 727 * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and 728 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p> 729 * <p><b>Units</b>: Frames per second (FPS)</p> 730 * <p><b>Range of valid values:</b><br> 731 * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p> 732 * <p>This key is available on all devices.</p> 733 * 734 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 735 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 736 * @see CaptureRequest#SENSOR_FRAME_DURATION 737 */ 738 @PublicKey 739 public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE = 740 new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 741 742 /** 743 * <p>Whether the camera device will trigger a precapture 744 * metering sequence when it processes this request.</p> 745 * <p>This entry is normally set to IDLE, or is not 746 * included at all in the request settings. When included and 747 * set to START, the camera device will trigger the auto-exposure (AE) 748 * precapture metering sequence.</p> 749 * <p>When set to CANCEL, the camera device will cancel any active 750 * precapture metering trigger, and return to its initial AE state. 751 * If a precapture metering sequence is already completed, and the camera 752 * device has implicitly locked the AE for subsequent still capture, the 753 * CANCEL trigger will unlock the AE and return to its initial AE state.</p> 754 * <p>The precapture sequence should be triggered before starting a 755 * high-quality still capture for final metering decisions to 756 * be made, and for firing pre-capture flash pulses to estimate 757 * scene brightness and required final capture flash power, when 758 * the flash is enabled.</p> 759 * <p>Normally, this entry should be set to START for only a 760 * single request, and the application should wait until the 761 * sequence completes before starting a new one.</p> 762 * <p>When a precapture metering sequence is finished, the camera device 763 * may lock the auto-exposure routine internally to be able to accurately expose the 764 * subsequent still capture image (<code>{@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE</code>). 765 * For this case, the AE may not resume normal scan if no subsequent still capture is 766 * submitted. To ensure that the AE routine restarts normal scan, the application should 767 * submit a request with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == true</code>, followed by a request 768 * with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == false</code>, if the application decides not to submit a 769 * still capture request after the precapture sequence completes. Alternatively, for 770 * API level 23 or newer devices, the CANCEL can be used to unlock the camera device 771 * internally locked AE if the application doesn't submit a still capture request after 772 * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not 773 * be used in devices that have earlier API levels.</p> 774 * <p>The exact effect of auto-exposure (AE) precapture trigger 775 * depends on the current AE mode and state; see 776 * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition 777 * details.</p> 778 * <p>On LEGACY-level devices, the precapture trigger is not supported; 779 * capturing a high-resolution JPEG image will automatically trigger a 780 * precapture sequence before the high-resolution capture, including 781 * potentially firing a pre-capture flash.</p> 782 * <p>Using the precapture trigger and the auto-focus trigger {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} 783 * simultaneously is allowed. However, since these triggers often require cooperation between 784 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a 785 * focus sweep), the camera device may delay acting on a later trigger until the previous 786 * trigger has been fully handled. This may lead to longer intervals between the trigger and 787 * changes to {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} indicating the start of the precapture sequence, for 788 * example.</p> 789 * <p>If both the precapture and the auto-focus trigger are activated on the same request, then 790 * the camera device will complete them in the optimal order for that device.</p> 791 * <p><b>Possible values:</b> 792 * <ul> 793 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li> 794 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li> 795 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL CANCEL}</li> 796 * </ul></p> 797 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 798 * <p><b>Limited capability</b> - 799 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 800 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 801 * 802 * @see CaptureRequest#CONTROL_AE_LOCK 803 * @see CaptureResult#CONTROL_AE_STATE 804 * @see CaptureRequest#CONTROL_AF_TRIGGER 805 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 806 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 807 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE 808 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START 809 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL 810 */ 811 @PublicKey 812 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER = 813 new Key<Integer>("android.control.aePrecaptureTrigger", int.class); 814 815 /** 816 * <p>Current state of the auto-exposure (AE) algorithm.</p> 817 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always 818 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 819 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 820 * the algorithm states to INACTIVE.</p> 821 * <p>The camera device can do several state transitions between two results, if it is 822 * allowed by the state transition table. For example: INACTIVE may never actually be 823 * seen in a result.</p> 824 * <p>The state in the result is the state for this image (in sync with this image): if 825 * AE state becomes CONVERGED, then the image data associated with this result should 826 * be good to use.</p> 827 * <p>Below are state transition tables for different AE modes.</p> 828 * <table> 829 * <thead> 830 * <tr> 831 * <th align="center">State</th> 832 * <th align="center">Transition Cause</th> 833 * <th align="center">New State</th> 834 * <th align="center">Notes</th> 835 * </tr> 836 * </thead> 837 * <tbody> 838 * <tr> 839 * <td align="center">INACTIVE</td> 840 * <td align="center"></td> 841 * <td align="center">INACTIVE</td> 842 * <td align="center">Camera device auto exposure algorithm is disabled</td> 843 * </tr> 844 * </tbody> 845 * </table> 846 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p> 847 * <table> 848 * <thead> 849 * <tr> 850 * <th align="center">State</th> 851 * <th align="center">Transition Cause</th> 852 * <th align="center">New State</th> 853 * <th align="center">Notes</th> 854 * </tr> 855 * </thead> 856 * <tbody> 857 * <tr> 858 * <td align="center">INACTIVE</td> 859 * <td align="center">Camera device initiates AE scan</td> 860 * <td align="center">SEARCHING</td> 861 * <td align="center">Values changing</td> 862 * </tr> 863 * <tr> 864 * <td align="center">INACTIVE</td> 865 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 866 * <td align="center">LOCKED</td> 867 * <td align="center">Values locked</td> 868 * </tr> 869 * <tr> 870 * <td align="center">SEARCHING</td> 871 * <td align="center">Camera device finishes AE scan</td> 872 * <td align="center">CONVERGED</td> 873 * <td align="center">Good values, not changing</td> 874 * </tr> 875 * <tr> 876 * <td align="center">SEARCHING</td> 877 * <td align="center">Camera device finishes AE scan</td> 878 * <td align="center">FLASH_REQUIRED</td> 879 * <td align="center">Converged but too dark w/o flash</td> 880 * </tr> 881 * <tr> 882 * <td align="center">SEARCHING</td> 883 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 884 * <td align="center">LOCKED</td> 885 * <td align="center">Values locked</td> 886 * </tr> 887 * <tr> 888 * <td align="center">CONVERGED</td> 889 * <td align="center">Camera device initiates AE scan</td> 890 * <td align="center">SEARCHING</td> 891 * <td align="center">Values changing</td> 892 * </tr> 893 * <tr> 894 * <td align="center">CONVERGED</td> 895 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 896 * <td align="center">LOCKED</td> 897 * <td align="center">Values locked</td> 898 * </tr> 899 * <tr> 900 * <td align="center">FLASH_REQUIRED</td> 901 * <td align="center">Camera device initiates AE scan</td> 902 * <td align="center">SEARCHING</td> 903 * <td align="center">Values changing</td> 904 * </tr> 905 * <tr> 906 * <td align="center">FLASH_REQUIRED</td> 907 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 908 * <td align="center">LOCKED</td> 909 * <td align="center">Values locked</td> 910 * </tr> 911 * <tr> 912 * <td align="center">LOCKED</td> 913 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 914 * <td align="center">SEARCHING</td> 915 * <td align="center">Values not good after unlock</td> 916 * </tr> 917 * <tr> 918 * <td align="center">LOCKED</td> 919 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 920 * <td align="center">CONVERGED</td> 921 * <td align="center">Values good after unlock</td> 922 * </tr> 923 * <tr> 924 * <td align="center">LOCKED</td> 925 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 926 * <td align="center">FLASH_REQUIRED</td> 927 * <td align="center">Exposure good, but too dark</td> 928 * </tr> 929 * <tr> 930 * <td align="center">PRECAPTURE</td> 931 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td> 932 * <td align="center">CONVERGED</td> 933 * <td align="center">Ready for high-quality capture</td> 934 * </tr> 935 * <tr> 936 * <td align="center">PRECAPTURE</td> 937 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td> 938 * <td align="center">LOCKED</td> 939 * <td align="center">Ready for high-quality capture</td> 940 * </tr> 941 * <tr> 942 * <td align="center">LOCKED</td> 943 * <td align="center">aeLock is ON and aePrecaptureTrigger is START</td> 944 * <td align="center">LOCKED</td> 945 * <td align="center">Precapture trigger is ignored when AE is already locked</td> 946 * </tr> 947 * <tr> 948 * <td align="center">LOCKED</td> 949 * <td align="center">aeLock is ON and aePrecaptureTrigger is CANCEL</td> 950 * <td align="center">LOCKED</td> 951 * <td align="center">Precapture trigger is ignored when AE is already locked</td> 952 * </tr> 953 * <tr> 954 * <td align="center">Any state (excluding LOCKED)</td> 955 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td> 956 * <td align="center">PRECAPTURE</td> 957 * <td align="center">Start AE precapture metering sequence</td> 958 * </tr> 959 * <tr> 960 * <td align="center">Any state (excluding LOCKED)</td> 961 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL</td> 962 * <td align="center">INACTIVE</td> 963 * <td align="center">Currently active precapture metering sequence is canceled</td> 964 * </tr> 965 * </tbody> 966 * </table> 967 * <p>For the above table, the camera device may skip reporting any state changes that happen 968 * without application intervention (i.e. mode switch, trigger, locking). Any state that 969 * can be skipped in that manner is called a transient state.</p> 970 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions 971 * listed in above table, it is also legal for the camera device to skip one or more 972 * transient states between two results. See below table for examples:</p> 973 * <table> 974 * <thead> 975 * <tr> 976 * <th align="center">State</th> 977 * <th align="center">Transition Cause</th> 978 * <th align="center">New State</th> 979 * <th align="center">Notes</th> 980 * </tr> 981 * </thead> 982 * <tbody> 983 * <tr> 984 * <td align="center">INACTIVE</td> 985 * <td align="center">Camera device finished AE scan</td> 986 * <td align="center">CONVERGED</td> 987 * <td align="center">Values are already good, transient states are skipped by camera device.</td> 988 * </tr> 989 * <tr> 990 * <td align="center">Any state (excluding LOCKED)</td> 991 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td> 992 * <td align="center">FLASH_REQUIRED</td> 993 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td> 994 * </tr> 995 * <tr> 996 * <td align="center">Any state (excluding LOCKED)</td> 997 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td> 998 * <td align="center">CONVERGED</td> 999 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td> 1000 * </tr> 1001 * <tr> 1002 * <td align="center">Any state (excluding LOCKED)</td> 1003 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td> 1004 * <td align="center">FLASH_REQUIRED</td> 1005 * <td align="center">Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device.</td> 1006 * </tr> 1007 * <tr> 1008 * <td align="center">Any state (excluding LOCKED)</td> 1009 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td> 1010 * <td align="center">CONVERGED</td> 1011 * <td align="center">Converged after a precapture sequenceis canceled, transient states are skipped by camera device.</td> 1012 * </tr> 1013 * <tr> 1014 * <td align="center">CONVERGED</td> 1015 * <td align="center">Camera device finished AE scan</td> 1016 * <td align="center">FLASH_REQUIRED</td> 1017 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td> 1018 * </tr> 1019 * <tr> 1020 * <td align="center">FLASH_REQUIRED</td> 1021 * <td align="center">Camera device finished AE scan</td> 1022 * <td align="center">CONVERGED</td> 1023 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td> 1024 * </tr> 1025 * </tbody> 1026 * </table> 1027 * <p><b>Possible values:</b> 1028 * <ul> 1029 * <li>{@link #CONTROL_AE_STATE_INACTIVE INACTIVE}</li> 1030 * <li>{@link #CONTROL_AE_STATE_SEARCHING SEARCHING}</li> 1031 * <li>{@link #CONTROL_AE_STATE_CONVERGED CONVERGED}</li> 1032 * <li>{@link #CONTROL_AE_STATE_LOCKED LOCKED}</li> 1033 * <li>{@link #CONTROL_AE_STATE_FLASH_REQUIRED FLASH_REQUIRED}</li> 1034 * <li>{@link #CONTROL_AE_STATE_PRECAPTURE PRECAPTURE}</li> 1035 * </ul></p> 1036 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1037 * <p><b>Limited capability</b> - 1038 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1039 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1040 * 1041 * @see CaptureRequest#CONTROL_AE_LOCK 1042 * @see CaptureRequest#CONTROL_AE_MODE 1043 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1044 * @see CaptureRequest#CONTROL_MODE 1045 * @see CaptureRequest#CONTROL_SCENE_MODE 1046 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1047 * @see #CONTROL_AE_STATE_INACTIVE 1048 * @see #CONTROL_AE_STATE_SEARCHING 1049 * @see #CONTROL_AE_STATE_CONVERGED 1050 * @see #CONTROL_AE_STATE_LOCKED 1051 * @see #CONTROL_AE_STATE_FLASH_REQUIRED 1052 * @see #CONTROL_AE_STATE_PRECAPTURE 1053 */ 1054 @PublicKey 1055 public static final Key<Integer> CONTROL_AE_STATE = 1056 new Key<Integer>("android.control.aeState", int.class); 1057 1058 /** 1059 * <p>Whether auto-focus (AF) is currently enabled, and what 1060 * mode it is set to.</p> 1061 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus 1062 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>). Also note that 1063 * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device 1064 * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before 1065 * setting {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} to OFF, or set AF mode to OFF when AE is OFF.</p> 1066 * <p>If the lens is controlled by the camera device auto-focus algorithm, 1067 * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} 1068 * in result metadata.</p> 1069 * <p><b>Possible values:</b> 1070 * <ul> 1071 * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li> 1072 * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li> 1073 * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li> 1074 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li> 1075 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li> 1076 * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li> 1077 * </ul></p> 1078 * <p><b>Available values for this device:</b><br> 1079 * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p> 1080 * <p>This key is available on all devices.</p> 1081 * 1082 * @see CaptureRequest#CONTROL_AE_MODE 1083 * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES 1084 * @see CaptureResult#CONTROL_AF_STATE 1085 * @see CaptureRequest#CONTROL_AF_TRIGGER 1086 * @see CaptureRequest#CONTROL_MODE 1087 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1088 * @see #CONTROL_AF_MODE_OFF 1089 * @see #CONTROL_AF_MODE_AUTO 1090 * @see #CONTROL_AF_MODE_MACRO 1091 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO 1092 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE 1093 * @see #CONTROL_AF_MODE_EDOF 1094 */ 1095 @PublicKey 1096 public static final Key<Integer> CONTROL_AF_MODE = 1097 new Key<Integer>("android.control.afMode", int.class); 1098 1099 /** 1100 * <p>List of metering areas to use for auto-focus.</p> 1101 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0. 1102 * Otherwise will always be present.</p> 1103 * <p>The maximum number of focus areas supported by the device is determined by the value 1104 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p> 1105 * <p>The coordinate system is based on the active pixel array, 1106 * with (0,0) being the top-left pixel in the active pixel array, and 1107 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 1108 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 1109 * bottom-right pixel in the active pixel array.</p> 1110 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 1111 * for every pixel in the area. This means that a large metering area 1112 * with the same weight as a smaller area will have more effect in 1113 * the metering result. Metering areas can partially overlap and the 1114 * camera device will add the weights in the overlap region.</p> 1115 * <p>The weights are relative to weights of other metering regions, so if only one region 1116 * is used, all non-zero weights will have the same effect. A region with 0 weight is 1117 * ignored.</p> 1118 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1119 * camera device.</p> 1120 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1121 * capture result metadata, the camera device will ignore the sections outside the crop 1122 * region and output only the intersection rectangle as the metering region in the result 1123 * metadata. If the region is entirely outside the crop region, it will be ignored and 1124 * not reported in the result metadata.</p> 1125 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1126 * <p><b>Range of valid values:</b><br> 1127 * Coordinates must be between <code>[(0,0), (width, height))</code> of 1128 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1129 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1130 * 1131 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF 1132 * @see CaptureRequest#SCALER_CROP_REGION 1133 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1134 */ 1135 @PublicKey 1136 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS = 1137 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class); 1138 1139 /** 1140 * <p>Whether the camera device will trigger autofocus for this request.</p> 1141 * <p>This entry is normally set to IDLE, or is not 1142 * included at all in the request settings.</p> 1143 * <p>When included and set to START, the camera device will trigger the 1144 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p> 1145 * <p>When set to CANCEL, the camera device will cancel any active trigger, 1146 * and return to its initial AF state.</p> 1147 * <p>Generally, applications should set this entry to START or CANCEL for only a 1148 * single capture, and then return it to IDLE (or not set at all). Specifying 1149 * START for multiple captures in a row means restarting the AF operation over 1150 * and over again.</p> 1151 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p> 1152 * <p>Using the autofocus trigger and the precapture trigger {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} 1153 * simultaneously is allowed. However, since these triggers often require cooperation between 1154 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a 1155 * focus sweep), the camera device may delay acting on a later trigger until the previous 1156 * trigger has been fully handled. This may lead to longer intervals between the trigger and 1157 * changes to {@link CaptureResult#CONTROL_AF_STATE android.control.afState}, for example.</p> 1158 * <p><b>Possible values:</b> 1159 * <ul> 1160 * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li> 1161 * <li>{@link #CONTROL_AF_TRIGGER_START START}</li> 1162 * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li> 1163 * </ul></p> 1164 * <p>This key is available on all devices.</p> 1165 * 1166 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1167 * @see CaptureResult#CONTROL_AF_STATE 1168 * @see #CONTROL_AF_TRIGGER_IDLE 1169 * @see #CONTROL_AF_TRIGGER_START 1170 * @see #CONTROL_AF_TRIGGER_CANCEL 1171 */ 1172 @PublicKey 1173 public static final Key<Integer> CONTROL_AF_TRIGGER = 1174 new Key<Integer>("android.control.afTrigger", int.class); 1175 1176 /** 1177 * <p>Current state of auto-focus (AF) algorithm.</p> 1178 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always 1179 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 1180 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 1181 * the algorithm states to INACTIVE.</p> 1182 * <p>The camera device can do several state transitions between two results, if it is 1183 * allowed by the state transition table. For example: INACTIVE may never actually be 1184 * seen in a result.</p> 1185 * <p>The state in the result is the state for this image (in sync with this image): if 1186 * AF state becomes FOCUSED, then the image data associated with this result should 1187 * be sharp.</p> 1188 * <p>Below are state transition tables for different AF modes.</p> 1189 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p> 1190 * <table> 1191 * <thead> 1192 * <tr> 1193 * <th align="center">State</th> 1194 * <th align="center">Transition Cause</th> 1195 * <th align="center">New State</th> 1196 * <th align="center">Notes</th> 1197 * </tr> 1198 * </thead> 1199 * <tbody> 1200 * <tr> 1201 * <td align="center">INACTIVE</td> 1202 * <td align="center"></td> 1203 * <td align="center">INACTIVE</td> 1204 * <td align="center">Never changes</td> 1205 * </tr> 1206 * </tbody> 1207 * </table> 1208 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p> 1209 * <table> 1210 * <thead> 1211 * <tr> 1212 * <th align="center">State</th> 1213 * <th align="center">Transition Cause</th> 1214 * <th align="center">New State</th> 1215 * <th align="center">Notes</th> 1216 * </tr> 1217 * </thead> 1218 * <tbody> 1219 * <tr> 1220 * <td align="center">INACTIVE</td> 1221 * <td align="center">AF_TRIGGER</td> 1222 * <td align="center">ACTIVE_SCAN</td> 1223 * <td align="center">Start AF sweep, Lens now moving</td> 1224 * </tr> 1225 * <tr> 1226 * <td align="center">ACTIVE_SCAN</td> 1227 * <td align="center">AF sweep done</td> 1228 * <td align="center">FOCUSED_LOCKED</td> 1229 * <td align="center">Focused, Lens now locked</td> 1230 * </tr> 1231 * <tr> 1232 * <td align="center">ACTIVE_SCAN</td> 1233 * <td align="center">AF sweep done</td> 1234 * <td align="center">NOT_FOCUSED_LOCKED</td> 1235 * <td align="center">Not focused, Lens now locked</td> 1236 * </tr> 1237 * <tr> 1238 * <td align="center">ACTIVE_SCAN</td> 1239 * <td align="center">AF_CANCEL</td> 1240 * <td align="center">INACTIVE</td> 1241 * <td align="center">Cancel/reset AF, Lens now locked</td> 1242 * </tr> 1243 * <tr> 1244 * <td align="center">FOCUSED_LOCKED</td> 1245 * <td align="center">AF_CANCEL</td> 1246 * <td align="center">INACTIVE</td> 1247 * <td align="center">Cancel/reset AF</td> 1248 * </tr> 1249 * <tr> 1250 * <td align="center">FOCUSED_LOCKED</td> 1251 * <td align="center">AF_TRIGGER</td> 1252 * <td align="center">ACTIVE_SCAN</td> 1253 * <td align="center">Start new sweep, Lens now moving</td> 1254 * </tr> 1255 * <tr> 1256 * <td align="center">NOT_FOCUSED_LOCKED</td> 1257 * <td align="center">AF_CANCEL</td> 1258 * <td align="center">INACTIVE</td> 1259 * <td align="center">Cancel/reset AF</td> 1260 * </tr> 1261 * <tr> 1262 * <td align="center">NOT_FOCUSED_LOCKED</td> 1263 * <td align="center">AF_TRIGGER</td> 1264 * <td align="center">ACTIVE_SCAN</td> 1265 * <td align="center">Start new sweep, Lens now moving</td> 1266 * </tr> 1267 * <tr> 1268 * <td align="center">Any state</td> 1269 * <td align="center">Mode change</td> 1270 * <td align="center">INACTIVE</td> 1271 * <td align="center"></td> 1272 * </tr> 1273 * </tbody> 1274 * </table> 1275 * <p>For the above table, the camera device may skip reporting any state changes that happen 1276 * without application intervention (i.e. mode switch, trigger, locking). Any state that 1277 * can be skipped in that manner is called a transient state.</p> 1278 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the 1279 * state transitions listed in above table, it is also legal for the camera device to skip 1280 * one or more transient states between two results. See below table for examples:</p> 1281 * <table> 1282 * <thead> 1283 * <tr> 1284 * <th align="center">State</th> 1285 * <th align="center">Transition Cause</th> 1286 * <th align="center">New State</th> 1287 * <th align="center">Notes</th> 1288 * </tr> 1289 * </thead> 1290 * <tbody> 1291 * <tr> 1292 * <td align="center">INACTIVE</td> 1293 * <td align="center">AF_TRIGGER</td> 1294 * <td align="center">FOCUSED_LOCKED</td> 1295 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td> 1296 * </tr> 1297 * <tr> 1298 * <td align="center">INACTIVE</td> 1299 * <td align="center">AF_TRIGGER</td> 1300 * <td align="center">NOT_FOCUSED_LOCKED</td> 1301 * <td align="center">Focus failed after a scan, lens is now locked.</td> 1302 * </tr> 1303 * <tr> 1304 * <td align="center">FOCUSED_LOCKED</td> 1305 * <td align="center">AF_TRIGGER</td> 1306 * <td align="center">FOCUSED_LOCKED</td> 1307 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td> 1308 * </tr> 1309 * <tr> 1310 * <td align="center">NOT_FOCUSED_LOCKED</td> 1311 * <td align="center">AF_TRIGGER</td> 1312 * <td align="center">FOCUSED_LOCKED</td> 1313 * <td align="center">Focus is good after a scan, lens is not locked.</td> 1314 * </tr> 1315 * </tbody> 1316 * </table> 1317 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p> 1318 * <table> 1319 * <thead> 1320 * <tr> 1321 * <th align="center">State</th> 1322 * <th align="center">Transition Cause</th> 1323 * <th align="center">New State</th> 1324 * <th align="center">Notes</th> 1325 * </tr> 1326 * </thead> 1327 * <tbody> 1328 * <tr> 1329 * <td align="center">INACTIVE</td> 1330 * <td align="center">Camera device initiates new scan</td> 1331 * <td align="center">PASSIVE_SCAN</td> 1332 * <td align="center">Start AF scan, Lens now moving</td> 1333 * </tr> 1334 * <tr> 1335 * <td align="center">INACTIVE</td> 1336 * <td align="center">AF_TRIGGER</td> 1337 * <td align="center">NOT_FOCUSED_LOCKED</td> 1338 * <td align="center">AF state query, Lens now locked</td> 1339 * </tr> 1340 * <tr> 1341 * <td align="center">PASSIVE_SCAN</td> 1342 * <td align="center">Camera device completes current scan</td> 1343 * <td align="center">PASSIVE_FOCUSED</td> 1344 * <td align="center">End AF scan, Lens now locked</td> 1345 * </tr> 1346 * <tr> 1347 * <td align="center">PASSIVE_SCAN</td> 1348 * <td align="center">Camera device fails current scan</td> 1349 * <td align="center">PASSIVE_UNFOCUSED</td> 1350 * <td align="center">End AF scan, Lens now locked</td> 1351 * </tr> 1352 * <tr> 1353 * <td align="center">PASSIVE_SCAN</td> 1354 * <td align="center">AF_TRIGGER</td> 1355 * <td align="center">FOCUSED_LOCKED</td> 1356 * <td align="center">Immediate transition, if focus is good. Lens now locked</td> 1357 * </tr> 1358 * <tr> 1359 * <td align="center">PASSIVE_SCAN</td> 1360 * <td align="center">AF_TRIGGER</td> 1361 * <td align="center">NOT_FOCUSED_LOCKED</td> 1362 * <td align="center">Immediate transition, if focus is bad. Lens now locked</td> 1363 * </tr> 1364 * <tr> 1365 * <td align="center">PASSIVE_SCAN</td> 1366 * <td align="center">AF_CANCEL</td> 1367 * <td align="center">INACTIVE</td> 1368 * <td align="center">Reset lens position, Lens now locked</td> 1369 * </tr> 1370 * <tr> 1371 * <td align="center">PASSIVE_FOCUSED</td> 1372 * <td align="center">Camera device initiates new scan</td> 1373 * <td align="center">PASSIVE_SCAN</td> 1374 * <td align="center">Start AF scan, Lens now moving</td> 1375 * </tr> 1376 * <tr> 1377 * <td align="center">PASSIVE_UNFOCUSED</td> 1378 * <td align="center">Camera device initiates new scan</td> 1379 * <td align="center">PASSIVE_SCAN</td> 1380 * <td align="center">Start AF scan, Lens now moving</td> 1381 * </tr> 1382 * <tr> 1383 * <td align="center">PASSIVE_FOCUSED</td> 1384 * <td align="center">AF_TRIGGER</td> 1385 * <td align="center">FOCUSED_LOCKED</td> 1386 * <td align="center">Immediate transition, lens now locked</td> 1387 * </tr> 1388 * <tr> 1389 * <td align="center">PASSIVE_UNFOCUSED</td> 1390 * <td align="center">AF_TRIGGER</td> 1391 * <td align="center">NOT_FOCUSED_LOCKED</td> 1392 * <td align="center">Immediate transition, lens now locked</td> 1393 * </tr> 1394 * <tr> 1395 * <td align="center">FOCUSED_LOCKED</td> 1396 * <td align="center">AF_TRIGGER</td> 1397 * <td align="center">FOCUSED_LOCKED</td> 1398 * <td align="center">No effect</td> 1399 * </tr> 1400 * <tr> 1401 * <td align="center">FOCUSED_LOCKED</td> 1402 * <td align="center">AF_CANCEL</td> 1403 * <td align="center">INACTIVE</td> 1404 * <td align="center">Restart AF scan</td> 1405 * </tr> 1406 * <tr> 1407 * <td align="center">NOT_FOCUSED_LOCKED</td> 1408 * <td align="center">AF_TRIGGER</td> 1409 * <td align="center">NOT_FOCUSED_LOCKED</td> 1410 * <td align="center">No effect</td> 1411 * </tr> 1412 * <tr> 1413 * <td align="center">NOT_FOCUSED_LOCKED</td> 1414 * <td align="center">AF_CANCEL</td> 1415 * <td align="center">INACTIVE</td> 1416 * <td align="center">Restart AF scan</td> 1417 * </tr> 1418 * </tbody> 1419 * </table> 1420 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p> 1421 * <table> 1422 * <thead> 1423 * <tr> 1424 * <th align="center">State</th> 1425 * <th align="center">Transition Cause</th> 1426 * <th align="center">New State</th> 1427 * <th align="center">Notes</th> 1428 * </tr> 1429 * </thead> 1430 * <tbody> 1431 * <tr> 1432 * <td align="center">INACTIVE</td> 1433 * <td align="center">Camera device initiates new scan</td> 1434 * <td align="center">PASSIVE_SCAN</td> 1435 * <td align="center">Start AF scan, Lens now moving</td> 1436 * </tr> 1437 * <tr> 1438 * <td align="center">INACTIVE</td> 1439 * <td align="center">AF_TRIGGER</td> 1440 * <td align="center">NOT_FOCUSED_LOCKED</td> 1441 * <td align="center">AF state query, Lens now locked</td> 1442 * </tr> 1443 * <tr> 1444 * <td align="center">PASSIVE_SCAN</td> 1445 * <td align="center">Camera device completes current scan</td> 1446 * <td align="center">PASSIVE_FOCUSED</td> 1447 * <td align="center">End AF scan, Lens now locked</td> 1448 * </tr> 1449 * <tr> 1450 * <td align="center">PASSIVE_SCAN</td> 1451 * <td align="center">Camera device fails current scan</td> 1452 * <td align="center">PASSIVE_UNFOCUSED</td> 1453 * <td align="center">End AF scan, Lens now locked</td> 1454 * </tr> 1455 * <tr> 1456 * <td align="center">PASSIVE_SCAN</td> 1457 * <td align="center">AF_TRIGGER</td> 1458 * <td align="center">FOCUSED_LOCKED</td> 1459 * <td align="center">Eventual transition once the focus is good. Lens now locked</td> 1460 * </tr> 1461 * <tr> 1462 * <td align="center">PASSIVE_SCAN</td> 1463 * <td align="center">AF_TRIGGER</td> 1464 * <td align="center">NOT_FOCUSED_LOCKED</td> 1465 * <td align="center">Eventual transition if cannot find focus. Lens now locked</td> 1466 * </tr> 1467 * <tr> 1468 * <td align="center">PASSIVE_SCAN</td> 1469 * <td align="center">AF_CANCEL</td> 1470 * <td align="center">INACTIVE</td> 1471 * <td align="center">Reset lens position, Lens now locked</td> 1472 * </tr> 1473 * <tr> 1474 * <td align="center">PASSIVE_FOCUSED</td> 1475 * <td align="center">Camera device initiates new scan</td> 1476 * <td align="center">PASSIVE_SCAN</td> 1477 * <td align="center">Start AF scan, Lens now moving</td> 1478 * </tr> 1479 * <tr> 1480 * <td align="center">PASSIVE_UNFOCUSED</td> 1481 * <td align="center">Camera device initiates new scan</td> 1482 * <td align="center">PASSIVE_SCAN</td> 1483 * <td align="center">Start AF scan, Lens now moving</td> 1484 * </tr> 1485 * <tr> 1486 * <td align="center">PASSIVE_FOCUSED</td> 1487 * <td align="center">AF_TRIGGER</td> 1488 * <td align="center">FOCUSED_LOCKED</td> 1489 * <td align="center">Immediate trans. Lens now locked</td> 1490 * </tr> 1491 * <tr> 1492 * <td align="center">PASSIVE_UNFOCUSED</td> 1493 * <td align="center">AF_TRIGGER</td> 1494 * <td align="center">NOT_FOCUSED_LOCKED</td> 1495 * <td align="center">Immediate trans. Lens now locked</td> 1496 * </tr> 1497 * <tr> 1498 * <td align="center">FOCUSED_LOCKED</td> 1499 * <td align="center">AF_TRIGGER</td> 1500 * <td align="center">FOCUSED_LOCKED</td> 1501 * <td align="center">No effect</td> 1502 * </tr> 1503 * <tr> 1504 * <td align="center">FOCUSED_LOCKED</td> 1505 * <td align="center">AF_CANCEL</td> 1506 * <td align="center">INACTIVE</td> 1507 * <td align="center">Restart AF scan</td> 1508 * </tr> 1509 * <tr> 1510 * <td align="center">NOT_FOCUSED_LOCKED</td> 1511 * <td align="center">AF_TRIGGER</td> 1512 * <td align="center">NOT_FOCUSED_LOCKED</td> 1513 * <td align="center">No effect</td> 1514 * </tr> 1515 * <tr> 1516 * <td align="center">NOT_FOCUSED_LOCKED</td> 1517 * <td align="center">AF_CANCEL</td> 1518 * <td align="center">INACTIVE</td> 1519 * <td align="center">Restart AF scan</td> 1520 * </tr> 1521 * </tbody> 1522 * </table> 1523 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO 1524 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the 1525 * camera device. When a trigger is included in a mode switch request, the trigger 1526 * will be evaluated in the context of the new mode in the request. 1527 * See below table for examples:</p> 1528 * <table> 1529 * <thead> 1530 * <tr> 1531 * <th align="center">State</th> 1532 * <th align="center">Transition Cause</th> 1533 * <th align="center">New State</th> 1534 * <th align="center">Notes</th> 1535 * </tr> 1536 * </thead> 1537 * <tbody> 1538 * <tr> 1539 * <td align="center">any state</td> 1540 * <td align="center">CAF-->AUTO mode switch</td> 1541 * <td align="center">INACTIVE</td> 1542 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td> 1543 * </tr> 1544 * <tr> 1545 * <td align="center">any state</td> 1546 * <td align="center">CAF-->AUTO mode switch with AF_TRIGGER</td> 1547 * <td align="center">trigger-reachable states from INACTIVE</td> 1548 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td> 1549 * </tr> 1550 * <tr> 1551 * <td align="center">any state</td> 1552 * <td align="center">AUTO-->CAF mode switch</td> 1553 * <td align="center">passively reachable states from INACTIVE</td> 1554 * <td align="center">Mode switch without trigger, passive transient state is skipped</td> 1555 * </tr> 1556 * </tbody> 1557 * </table> 1558 * <p><b>Possible values:</b> 1559 * <ul> 1560 * <li>{@link #CONTROL_AF_STATE_INACTIVE INACTIVE}</li> 1561 * <li>{@link #CONTROL_AF_STATE_PASSIVE_SCAN PASSIVE_SCAN}</li> 1562 * <li>{@link #CONTROL_AF_STATE_PASSIVE_FOCUSED PASSIVE_FOCUSED}</li> 1563 * <li>{@link #CONTROL_AF_STATE_ACTIVE_SCAN ACTIVE_SCAN}</li> 1564 * <li>{@link #CONTROL_AF_STATE_FOCUSED_LOCKED FOCUSED_LOCKED}</li> 1565 * <li>{@link #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED NOT_FOCUSED_LOCKED}</li> 1566 * <li>{@link #CONTROL_AF_STATE_PASSIVE_UNFOCUSED PASSIVE_UNFOCUSED}</li> 1567 * </ul></p> 1568 * <p>This key is available on all devices.</p> 1569 * 1570 * @see CaptureRequest#CONTROL_AF_MODE 1571 * @see CaptureRequest#CONTROL_MODE 1572 * @see CaptureRequest#CONTROL_SCENE_MODE 1573 * @see #CONTROL_AF_STATE_INACTIVE 1574 * @see #CONTROL_AF_STATE_PASSIVE_SCAN 1575 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED 1576 * @see #CONTROL_AF_STATE_ACTIVE_SCAN 1577 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED 1578 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED 1579 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED 1580 */ 1581 @PublicKey 1582 public static final Key<Integer> CONTROL_AF_STATE = 1583 new Key<Integer>("android.control.afState", int.class); 1584 1585 /** 1586 * <p>Whether auto-white balance (AWB) is currently locked to its 1587 * latest calculated values.</p> 1588 * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters, 1589 * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p> 1590 * <p>Since the camera device has a pipeline of in-flight requests, the settings that 1591 * get locked do not necessarily correspond to the settings that were present in the 1592 * latest capture result received from the camera device, since additional captures 1593 * and AWB updates may have occurred even before the result was sent out. If an 1594 * application is switching between automatic and manual control and wishes to eliminate 1595 * any flicker during the switch, the following procedure is recommended:</p> 1596 * <ol> 1597 * <li>Starting in auto-AWB mode:</li> 1598 * <li>Lock AWB</li> 1599 * <li>Wait for the first result to be output that has the AWB locked</li> 1600 * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li> 1601 * <li>Submit the capture request, proceed to run manual AWB as desired.</li> 1602 * </ol> 1603 * <p>Note that AWB lock is only meaningful when 1604 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes, 1605 * AWB is already fixed to a specific setting.</p> 1606 * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p> 1607 * <p>This key is available on all devices.</p> 1608 * 1609 * @see CaptureRequest#CONTROL_AWB_MODE 1610 */ 1611 @PublicKey 1612 public static final Key<Boolean> CONTROL_AWB_LOCK = 1613 new Key<Boolean>("android.control.awbLock", boolean.class); 1614 1615 /** 1616 * <p>Whether auto-white balance (AWB) is currently setting the color 1617 * transform fields, and what its illumination target 1618 * is.</p> 1619 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p> 1620 * <p>When set to the ON mode, the camera device's auto-white balance 1621 * routine is enabled, overriding the application's selected 1622 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 1623 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 1624 * is OFF, the behavior of AWB is device dependent. It is recommened to 1625 * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before 1626 * setting AE mode to OFF.</p> 1627 * <p>When set to the OFF mode, the camera device's auto-white balance 1628 * routine is disabled. The application manually controls the white 1629 * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} 1630 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 1631 * <p>When set to any other modes, the camera device's auto-white 1632 * balance routine is disabled. The camera device uses each 1633 * particular illumination target for white balance 1634 * adjustment. The application's values for 1635 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, 1636 * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 1637 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p> 1638 * <p><b>Possible values:</b> 1639 * <ul> 1640 * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li> 1641 * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li> 1642 * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li> 1643 * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li> 1644 * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li> 1645 * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li> 1646 * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li> 1647 * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li> 1648 * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li> 1649 * </ul></p> 1650 * <p><b>Available values for this device:</b><br> 1651 * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p> 1652 * <p>This key is available on all devices.</p> 1653 * 1654 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1655 * @see CaptureRequest#COLOR_CORRECTION_MODE 1656 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1657 * @see CaptureRequest#CONTROL_AE_MODE 1658 * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES 1659 * @see CaptureRequest#CONTROL_AWB_LOCK 1660 * @see CaptureRequest#CONTROL_MODE 1661 * @see #CONTROL_AWB_MODE_OFF 1662 * @see #CONTROL_AWB_MODE_AUTO 1663 * @see #CONTROL_AWB_MODE_INCANDESCENT 1664 * @see #CONTROL_AWB_MODE_FLUORESCENT 1665 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT 1666 * @see #CONTROL_AWB_MODE_DAYLIGHT 1667 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT 1668 * @see #CONTROL_AWB_MODE_TWILIGHT 1669 * @see #CONTROL_AWB_MODE_SHADE 1670 */ 1671 @PublicKey 1672 public static final Key<Integer> CONTROL_AWB_MODE = 1673 new Key<Integer>("android.control.awbMode", int.class); 1674 1675 /** 1676 * <p>List of metering areas to use for auto-white-balance illuminant 1677 * estimation.</p> 1678 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0. 1679 * Otherwise will always be present.</p> 1680 * <p>The maximum number of regions supported by the device is determined by the value 1681 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p> 1682 * <p>The coordinate system is based on the active pixel array, 1683 * with (0,0) being the top-left pixel in the active pixel array, and 1684 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 1685 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 1686 * bottom-right pixel in the active pixel array.</p> 1687 * <p>The weight must range from 0 to 1000, and represents a weight 1688 * for every pixel in the area. This means that a large metering area 1689 * with the same weight as a smaller area will have more effect in 1690 * the metering result. Metering areas can partially overlap and the 1691 * camera device will add the weights in the overlap region.</p> 1692 * <p>The weights are relative to weights of other white balance metering regions, so if 1693 * only one region is used, all non-zero weights will have the same effect. A region with 1694 * 0 weight is ignored.</p> 1695 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1696 * camera device.</p> 1697 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1698 * capture result metadata, the camera device will ignore the sections outside the crop 1699 * region and output only the intersection rectangle as the metering region in the result 1700 * metadata. If the region is entirely outside the crop region, it will be ignored and 1701 * not reported in the result metadata.</p> 1702 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1703 * <p><b>Range of valid values:</b><br> 1704 * Coordinates must be between <code>[(0,0), (width, height))</code> of 1705 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1706 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1707 * 1708 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB 1709 * @see CaptureRequest#SCALER_CROP_REGION 1710 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1711 */ 1712 @PublicKey 1713 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS = 1714 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class); 1715 1716 /** 1717 * <p>Information to the camera device 3A (auto-exposure, 1718 * auto-focus, auto-white balance) routines about the purpose 1719 * of this capture, to help the camera device to decide optimal 3A 1720 * strategy.</p> 1721 * <p>This control (except for MANUAL) is only effective if 1722 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> 1723 * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1724 * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if 1725 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are 1726 * always supported.</p> 1727 * <p><b>Possible values:</b> 1728 * <ul> 1729 * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li> 1730 * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li> 1731 * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li> 1732 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li> 1733 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li> 1734 * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li> 1735 * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li> 1736 * </ul></p> 1737 * <p>This key is available on all devices.</p> 1738 * 1739 * @see CaptureRequest#CONTROL_MODE 1740 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1741 * @see #CONTROL_CAPTURE_INTENT_CUSTOM 1742 * @see #CONTROL_CAPTURE_INTENT_PREVIEW 1743 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE 1744 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD 1745 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT 1746 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG 1747 * @see #CONTROL_CAPTURE_INTENT_MANUAL 1748 */ 1749 @PublicKey 1750 public static final Key<Integer> CONTROL_CAPTURE_INTENT = 1751 new Key<Integer>("android.control.captureIntent", int.class); 1752 1753 /** 1754 * <p>Current state of auto-white balance (AWB) algorithm.</p> 1755 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always 1756 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, 1757 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all 1758 * the algorithm states to INACTIVE.</p> 1759 * <p>The camera device can do several state transitions between two results, if it is 1760 * allowed by the state transition table. So INACTIVE may never actually be seen in 1761 * a result.</p> 1762 * <p>The state in the result is the state for this image (in sync with this image): if 1763 * AWB state becomes CONVERGED, then the image data associated with this result should 1764 * be good to use.</p> 1765 * <p>Below are state transition tables for different AWB modes.</p> 1766 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p> 1767 * <table> 1768 * <thead> 1769 * <tr> 1770 * <th align="center">State</th> 1771 * <th align="center">Transition Cause</th> 1772 * <th align="center">New State</th> 1773 * <th align="center">Notes</th> 1774 * </tr> 1775 * </thead> 1776 * <tbody> 1777 * <tr> 1778 * <td align="center">INACTIVE</td> 1779 * <td align="center"></td> 1780 * <td align="center">INACTIVE</td> 1781 * <td align="center">Camera device auto white balance algorithm is disabled</td> 1782 * </tr> 1783 * </tbody> 1784 * </table> 1785 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p> 1786 * <table> 1787 * <thead> 1788 * <tr> 1789 * <th align="center">State</th> 1790 * <th align="center">Transition Cause</th> 1791 * <th align="center">New State</th> 1792 * <th align="center">Notes</th> 1793 * </tr> 1794 * </thead> 1795 * <tbody> 1796 * <tr> 1797 * <td align="center">INACTIVE</td> 1798 * <td align="center">Camera device initiates AWB scan</td> 1799 * <td align="center">SEARCHING</td> 1800 * <td align="center">Values changing</td> 1801 * </tr> 1802 * <tr> 1803 * <td align="center">INACTIVE</td> 1804 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1805 * <td align="center">LOCKED</td> 1806 * <td align="center">Values locked</td> 1807 * </tr> 1808 * <tr> 1809 * <td align="center">SEARCHING</td> 1810 * <td align="center">Camera device finishes AWB scan</td> 1811 * <td align="center">CONVERGED</td> 1812 * <td align="center">Good values, not changing</td> 1813 * </tr> 1814 * <tr> 1815 * <td align="center">SEARCHING</td> 1816 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1817 * <td align="center">LOCKED</td> 1818 * <td align="center">Values locked</td> 1819 * </tr> 1820 * <tr> 1821 * <td align="center">CONVERGED</td> 1822 * <td align="center">Camera device initiates AWB scan</td> 1823 * <td align="center">SEARCHING</td> 1824 * <td align="center">Values changing</td> 1825 * </tr> 1826 * <tr> 1827 * <td align="center">CONVERGED</td> 1828 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td> 1829 * <td align="center">LOCKED</td> 1830 * <td align="center">Values locked</td> 1831 * </tr> 1832 * <tr> 1833 * <td align="center">LOCKED</td> 1834 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td> 1835 * <td align="center">SEARCHING</td> 1836 * <td align="center">Values not good after unlock</td> 1837 * </tr> 1838 * </tbody> 1839 * </table> 1840 * <p>For the above table, the camera device may skip reporting any state changes that happen 1841 * without application intervention (i.e. mode switch, trigger, locking). Any state that 1842 * can be skipped in that manner is called a transient state.</p> 1843 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions 1844 * listed in above table, it is also legal for the camera device to skip one or more 1845 * transient states between two results. See below table for examples:</p> 1846 * <table> 1847 * <thead> 1848 * <tr> 1849 * <th align="center">State</th> 1850 * <th align="center">Transition Cause</th> 1851 * <th align="center">New State</th> 1852 * <th align="center">Notes</th> 1853 * </tr> 1854 * </thead> 1855 * <tbody> 1856 * <tr> 1857 * <td align="center">INACTIVE</td> 1858 * <td align="center">Camera device finished AWB scan</td> 1859 * <td align="center">CONVERGED</td> 1860 * <td align="center">Values are already good, transient states are skipped by camera device.</td> 1861 * </tr> 1862 * <tr> 1863 * <td align="center">LOCKED</td> 1864 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td> 1865 * <td align="center">CONVERGED</td> 1866 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td> 1867 * </tr> 1868 * </tbody> 1869 * </table> 1870 * <p><b>Possible values:</b> 1871 * <ul> 1872 * <li>{@link #CONTROL_AWB_STATE_INACTIVE INACTIVE}</li> 1873 * <li>{@link #CONTROL_AWB_STATE_SEARCHING SEARCHING}</li> 1874 * <li>{@link #CONTROL_AWB_STATE_CONVERGED CONVERGED}</li> 1875 * <li>{@link #CONTROL_AWB_STATE_LOCKED LOCKED}</li> 1876 * </ul></p> 1877 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1878 * <p><b>Limited capability</b> - 1879 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1880 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1881 * 1882 * @see CaptureRequest#CONTROL_AWB_LOCK 1883 * @see CaptureRequest#CONTROL_AWB_MODE 1884 * @see CaptureRequest#CONTROL_MODE 1885 * @see CaptureRequest#CONTROL_SCENE_MODE 1886 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1887 * @see #CONTROL_AWB_STATE_INACTIVE 1888 * @see #CONTROL_AWB_STATE_SEARCHING 1889 * @see #CONTROL_AWB_STATE_CONVERGED 1890 * @see #CONTROL_AWB_STATE_LOCKED 1891 */ 1892 @PublicKey 1893 public static final Key<Integer> CONTROL_AWB_STATE = 1894 new Key<Integer>("android.control.awbState", int.class); 1895 1896 /** 1897 * <p>A special color effect to apply.</p> 1898 * <p>When this mode is set, a color effect will be applied 1899 * to images produced by the camera device. The interpretation 1900 * and implementation of these color effects is left to the 1901 * implementor of the camera device, and should not be 1902 * depended on to be consistent (or present) across all 1903 * devices.</p> 1904 * <p><b>Possible values:</b> 1905 * <ul> 1906 * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li> 1907 * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li> 1908 * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li> 1909 * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li> 1910 * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li> 1911 * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li> 1912 * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li> 1913 * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li> 1914 * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li> 1915 * </ul></p> 1916 * <p><b>Available values for this device:</b><br> 1917 * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p> 1918 * <p>This key is available on all devices.</p> 1919 * 1920 * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS 1921 * @see #CONTROL_EFFECT_MODE_OFF 1922 * @see #CONTROL_EFFECT_MODE_MONO 1923 * @see #CONTROL_EFFECT_MODE_NEGATIVE 1924 * @see #CONTROL_EFFECT_MODE_SOLARIZE 1925 * @see #CONTROL_EFFECT_MODE_SEPIA 1926 * @see #CONTROL_EFFECT_MODE_POSTERIZE 1927 * @see #CONTROL_EFFECT_MODE_WHITEBOARD 1928 * @see #CONTROL_EFFECT_MODE_BLACKBOARD 1929 * @see #CONTROL_EFFECT_MODE_AQUA 1930 */ 1931 @PublicKey 1932 public static final Key<Integer> CONTROL_EFFECT_MODE = 1933 new Key<Integer>("android.control.effectMode", int.class); 1934 1935 /** 1936 * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control 1937 * routines.</p> 1938 * <p>This is a top-level 3A control switch. When set to OFF, all 3A control 1939 * by the camera device is disabled. The application must set the fields for 1940 * capture parameters itself.</p> 1941 * <p>When set to AUTO, the individual algorithm controls in 1942 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 1943 * <p>When set to USE_SCENE_MODE, the individual controls in 1944 * android.control.* are mostly disabled, and the camera device implements 1945 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 1946 * as it wishes. The camera device scene mode 3A settings are provided by 1947 * {@link android.hardware.camera2.CaptureResult capture results}.</p> 1948 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 1949 * is that this frame will not be used by camera device background 3A statistics 1950 * update, as if this frame is never captured. This mode can be used in the scenario 1951 * where the application doesn't want a 3A manual control capture to affect 1952 * the subsequent auto 3A capture results.</p> 1953 * <p><b>Possible values:</b> 1954 * <ul> 1955 * <li>{@link #CONTROL_MODE_OFF OFF}</li> 1956 * <li>{@link #CONTROL_MODE_AUTO AUTO}</li> 1957 * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li> 1958 * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li> 1959 * </ul></p> 1960 * <p><b>Available values for this device:</b><br> 1961 * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p> 1962 * <p>This key is available on all devices.</p> 1963 * 1964 * @see CaptureRequest#CONTROL_AF_MODE 1965 * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES 1966 * @see #CONTROL_MODE_OFF 1967 * @see #CONTROL_MODE_AUTO 1968 * @see #CONTROL_MODE_USE_SCENE_MODE 1969 * @see #CONTROL_MODE_OFF_KEEP_STATE 1970 */ 1971 @PublicKey 1972 public static final Key<Integer> CONTROL_MODE = 1973 new Key<Integer>("android.control.mode", int.class); 1974 1975 /** 1976 * <p>Control for which scene mode is currently active.</p> 1977 * <p>Scene modes are custom camera modes optimized for a certain set of conditions and 1978 * capture settings.</p> 1979 * <p>This is the mode that that is active when 1980 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will 1981 * disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 1982 * while in use.</p> 1983 * <p>The interpretation and implementation of these scene modes is left 1984 * to the implementor of the camera device. Their behavior will not be 1985 * consistent across all devices, and any given device may only implement 1986 * a subset of these modes.</p> 1987 * <p><b>Possible values:</b> 1988 * <ul> 1989 * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li> 1990 * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li> 1991 * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li> 1992 * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li> 1993 * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li> 1994 * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li> 1995 * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li> 1996 * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li> 1997 * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li> 1998 * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li> 1999 * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li> 2000 * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li> 2001 * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li> 2002 * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li> 2003 * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li> 2004 * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li> 2005 * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li> 2006 * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li> 2007 * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li> 2008 * </ul></p> 2009 * <p><b>Available values for this device:</b><br> 2010 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p> 2011 * <p>This key is available on all devices.</p> 2012 * 2013 * @see CaptureRequest#CONTROL_AE_MODE 2014 * @see CaptureRequest#CONTROL_AF_MODE 2015 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 2016 * @see CaptureRequest#CONTROL_AWB_MODE 2017 * @see CaptureRequest#CONTROL_MODE 2018 * @see #CONTROL_SCENE_MODE_DISABLED 2019 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY 2020 * @see #CONTROL_SCENE_MODE_ACTION 2021 * @see #CONTROL_SCENE_MODE_PORTRAIT 2022 * @see #CONTROL_SCENE_MODE_LANDSCAPE 2023 * @see #CONTROL_SCENE_MODE_NIGHT 2024 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT 2025 * @see #CONTROL_SCENE_MODE_THEATRE 2026 * @see #CONTROL_SCENE_MODE_BEACH 2027 * @see #CONTROL_SCENE_MODE_SNOW 2028 * @see #CONTROL_SCENE_MODE_SUNSET 2029 * @see #CONTROL_SCENE_MODE_STEADYPHOTO 2030 * @see #CONTROL_SCENE_MODE_FIREWORKS 2031 * @see #CONTROL_SCENE_MODE_SPORTS 2032 * @see #CONTROL_SCENE_MODE_PARTY 2033 * @see #CONTROL_SCENE_MODE_CANDLELIGHT 2034 * @see #CONTROL_SCENE_MODE_BARCODE 2035 * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO 2036 * @see #CONTROL_SCENE_MODE_HDR 2037 */ 2038 @PublicKey 2039 public static final Key<Integer> CONTROL_SCENE_MODE = 2040 new Key<Integer>("android.control.sceneMode", int.class); 2041 2042 /** 2043 * <p>Whether video stabilization is 2044 * active.</p> 2045 * <p>Video stabilization automatically translates and scales images from 2046 * the camera in order to stabilize motion between consecutive frames.</p> 2047 * <p>If enabled, video stabilization can modify the 2048 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p> 2049 * <p>Switching between different video stabilization modes may take several 2050 * frames to initialize, the camera device will report the current mode 2051 * in capture result metadata. For example, When "ON" mode is requested, 2052 * the video stabilization modes in the first several capture results may 2053 * still be "OFF", and it will become "ON" when the initialization is 2054 * done.</p> 2055 * <p>If a camera device supports both this mode and OIS 2056 * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may 2057 * produce undesirable interaction, so it is recommended not to enable 2058 * both at the same time.</p> 2059 * <p><b>Possible values:</b> 2060 * <ul> 2061 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li> 2062 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li> 2063 * </ul></p> 2064 * <p>This key is available on all devices.</p> 2065 * 2066 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 2067 * @see CaptureRequest#SCALER_CROP_REGION 2068 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF 2069 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON 2070 */ 2071 @PublicKey 2072 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE = 2073 new Key<Integer>("android.control.videoStabilizationMode", int.class); 2074 2075 /** 2076 * <p>Operation mode for edge 2077 * enhancement.</p> 2078 * <p>Edge enhancement improves sharpness and details in the captured image. OFF means 2079 * no enhancement will be applied by the camera device.</p> 2080 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement 2081 * will be applied. HIGH_QUALITY mode indicates that the 2082 * camera device will use the highest-quality enhancement algorithms, 2083 * even if it slows down capture rate. FAST means the camera device will 2084 * not slow down capture rate when applying edge enhancement.</p> 2085 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera 2086 * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively. 2087 * The camera device may adjust its internal noise reduction parameters for best 2088 * image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.</p> 2089 * <p><b>Possible values:</b> 2090 * <ul> 2091 * <li>{@link #EDGE_MODE_OFF OFF}</li> 2092 * <li>{@link #EDGE_MODE_FAST FAST}</li> 2093 * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2094 * </ul></p> 2095 * <p><b>Available values for this device:</b><br> 2096 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p> 2097 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2098 * <p><b>Full capability</b> - 2099 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2100 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2101 * 2102 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 2103 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2104 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 2105 * @see #EDGE_MODE_OFF 2106 * @see #EDGE_MODE_FAST 2107 * @see #EDGE_MODE_HIGH_QUALITY 2108 */ 2109 @PublicKey 2110 public static final Key<Integer> EDGE_MODE = 2111 new Key<Integer>("android.edge.mode", int.class); 2112 2113 /** 2114 * <p>The desired mode for for the camera device's flash control.</p> 2115 * <p>This control is only effective when flash unit is available 2116 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p> 2117 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF. 2118 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 2119 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p> 2120 * <p>When set to OFF, the camera device will not fire flash for this capture.</p> 2121 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera 2122 * device's auto-exposure routine's result. When used in still capture case, this 2123 * control should be used along with auto-exposure (AE) precapture metering sequence 2124 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p> 2125 * <p>When set to TORCH, the flash will be on continuously. This mode can be used 2126 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p> 2127 * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p> 2128 * <p><b>Possible values:</b> 2129 * <ul> 2130 * <li>{@link #FLASH_MODE_OFF OFF}</li> 2131 * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li> 2132 * <li>{@link #FLASH_MODE_TORCH TORCH}</li> 2133 * </ul></p> 2134 * <p>This key is available on all devices.</p> 2135 * 2136 * @see CaptureRequest#CONTROL_AE_MODE 2137 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2138 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 2139 * @see CaptureResult#FLASH_STATE 2140 * @see #FLASH_MODE_OFF 2141 * @see #FLASH_MODE_SINGLE 2142 * @see #FLASH_MODE_TORCH 2143 */ 2144 @PublicKey 2145 public static final Key<Integer> FLASH_MODE = 2146 new Key<Integer>("android.flash.mode", int.class); 2147 2148 /** 2149 * <p>Current state of the flash 2150 * unit.</p> 2151 * <p>When the camera device doesn't have flash unit 2152 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE. 2153 * Other states indicate the current flash status.</p> 2154 * <p>In certain conditions, this will be available on LEGACY devices:</p> 2155 * <ul> 2156 * <li>Flash-less cameras always return UNAVAILABLE.</li> 2157 * <li>Using {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>==</code> ON_ALWAYS_FLASH 2158 * will always return FIRED.</li> 2159 * <li>Using {@link CaptureRequest#FLASH_MODE android.flash.mode} <code>==</code> TORCH 2160 * will always return FIRED.</li> 2161 * </ul> 2162 * <p>In all other conditions the state will not be available on 2163 * LEGACY devices (i.e. it will be <code>null</code>).</p> 2164 * <p><b>Possible values:</b> 2165 * <ul> 2166 * <li>{@link #FLASH_STATE_UNAVAILABLE UNAVAILABLE}</li> 2167 * <li>{@link #FLASH_STATE_CHARGING CHARGING}</li> 2168 * <li>{@link #FLASH_STATE_READY READY}</li> 2169 * <li>{@link #FLASH_STATE_FIRED FIRED}</li> 2170 * <li>{@link #FLASH_STATE_PARTIAL PARTIAL}</li> 2171 * </ul></p> 2172 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2173 * <p><b>Limited capability</b> - 2174 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2175 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2176 * 2177 * @see CaptureRequest#CONTROL_AE_MODE 2178 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 2179 * @see CaptureRequest#FLASH_MODE 2180 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2181 * @see #FLASH_STATE_UNAVAILABLE 2182 * @see #FLASH_STATE_CHARGING 2183 * @see #FLASH_STATE_READY 2184 * @see #FLASH_STATE_FIRED 2185 * @see #FLASH_STATE_PARTIAL 2186 */ 2187 @PublicKey 2188 public static final Key<Integer> FLASH_STATE = 2189 new Key<Integer>("android.flash.state", int.class); 2190 2191 /** 2192 * <p>Operational mode for hot pixel correction.</p> 2193 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels 2194 * that do not accurately measure the incoming light (i.e. pixels that 2195 * are stuck at an arbitrary value or are oversensitive).</p> 2196 * <p><b>Possible values:</b> 2197 * <ul> 2198 * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li> 2199 * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li> 2200 * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2201 * </ul></p> 2202 * <p><b>Available values for this device:</b><br> 2203 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p> 2204 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2205 * 2206 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES 2207 * @see #HOT_PIXEL_MODE_OFF 2208 * @see #HOT_PIXEL_MODE_FAST 2209 * @see #HOT_PIXEL_MODE_HIGH_QUALITY 2210 */ 2211 @PublicKey 2212 public static final Key<Integer> HOT_PIXEL_MODE = 2213 new Key<Integer>("android.hotPixel.mode", int.class); 2214 2215 /** 2216 * <p>A location object to use when generating image GPS metadata.</p> 2217 * <p>Setting a location object in a request will include the GPS coordinates of the location 2218 * into any JPEG images captured based on the request. These coordinates can then be 2219 * viewed by anyone who receives the JPEG image.</p> 2220 * <p>This key is available on all devices.</p> 2221 */ 2222 @PublicKey 2223 @SyntheticKey 2224 public static final Key<android.location.Location> JPEG_GPS_LOCATION = 2225 new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class); 2226 2227 /** 2228 * <p>GPS coordinates to include in output JPEG 2229 * EXIF.</p> 2230 * <p><b>Range of valid values:</b><br> 2231 * (-180 - 180], [-90,90], [-inf, inf]</p> 2232 * <p>This key is available on all devices.</p> 2233 * @hide 2234 */ 2235 public static final Key<double[]> JPEG_GPS_COORDINATES = 2236 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); 2237 2238 /** 2239 * <p>32 characters describing GPS algorithm to 2240 * include in EXIF.</p> 2241 * <p><b>Units</b>: UTF-8 null-terminated string</p> 2242 * <p>This key is available on all devices.</p> 2243 * @hide 2244 */ 2245 public static final Key<String> JPEG_GPS_PROCESSING_METHOD = 2246 new Key<String>("android.jpeg.gpsProcessingMethod", String.class); 2247 2248 /** 2249 * <p>Time GPS fix was made to include in 2250 * EXIF.</p> 2251 * <p><b>Units</b>: UTC in seconds since January 1, 1970</p> 2252 * <p>This key is available on all devices.</p> 2253 * @hide 2254 */ 2255 public static final Key<Long> JPEG_GPS_TIMESTAMP = 2256 new Key<Long>("android.jpeg.gpsTimestamp", long.class); 2257 2258 /** 2259 * <p>The orientation for a JPEG image.</p> 2260 * <p>The clockwise rotation angle in degrees, relative to the orientation 2261 * to the camera, that the JPEG picture needs to be rotated by, to be viewed 2262 * upright.</p> 2263 * <p>Camera devices may either encode this value into the JPEG EXIF header, or 2264 * rotate the image data to match this orientation. When the image data is rotated, 2265 * the thumbnail data will also be rotated.</p> 2266 * <p>Note that this orientation is relative to the orientation of the camera sensor, given 2267 * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p> 2268 * <p>To translate from the device orientation given by the Android sensor APIs, the following 2269 * sample code may be used:</p> 2270 * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) { 2271 * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0; 2272 * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION); 2273 * 2274 * // Round device orientation to a multiple of 90 2275 * deviceOrientation = (deviceOrientation + 45) / 90 * 90; 2276 * 2277 * // Reverse device orientation for front-facing cameras 2278 * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT; 2279 * if (facingFront) deviceOrientation = -deviceOrientation; 2280 * 2281 * // Calculate desired JPEG orientation relative to camera orientation to make 2282 * // the image upright relative to the device orientation 2283 * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360; 2284 * 2285 * return jpegOrientation; 2286 * } 2287 * </code></pre> 2288 * <p><b>Units</b>: Degrees in multiples of 90</p> 2289 * <p><b>Range of valid values:</b><br> 2290 * 0, 90, 180, 270</p> 2291 * <p>This key is available on all devices.</p> 2292 * 2293 * @see CameraCharacteristics#SENSOR_ORIENTATION 2294 */ 2295 @PublicKey 2296 public static final Key<Integer> JPEG_ORIENTATION = 2297 new Key<Integer>("android.jpeg.orientation", int.class); 2298 2299 /** 2300 * <p>Compression quality of the final JPEG 2301 * image.</p> 2302 * <p>85-95 is typical usage range.</p> 2303 * <p><b>Range of valid values:</b><br> 2304 * 1-100; larger is higher quality</p> 2305 * <p>This key is available on all devices.</p> 2306 */ 2307 @PublicKey 2308 public static final Key<Byte> JPEG_QUALITY = 2309 new Key<Byte>("android.jpeg.quality", byte.class); 2310 2311 /** 2312 * <p>Compression quality of JPEG 2313 * thumbnail.</p> 2314 * <p><b>Range of valid values:</b><br> 2315 * 1-100; larger is higher quality</p> 2316 * <p>This key is available on all devices.</p> 2317 */ 2318 @PublicKey 2319 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = 2320 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); 2321 2322 /** 2323 * <p>Resolution of embedded JPEG thumbnail.</p> 2324 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 2325 * but the captured JPEG will still be a valid image.</p> 2326 * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected 2327 * should have the same aspect ratio as the main JPEG output.</p> 2328 * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect 2329 * ratio, the camera device creates the thumbnail by cropping it from the primary image. 2330 * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has 2331 * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to 2332 * generate the thumbnail image. The thumbnail image will always have a smaller Field 2333 * Of View (FOV) than the primary image when aspect ratios differ.</p> 2334 * <p>When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested, 2335 * the camera device will handle thumbnail rotation in one of the following ways:</p> 2336 * <ul> 2337 * <li>Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag} 2338 * and keep jpeg and thumbnail image data unrotated.</li> 2339 * <li>Rotate the jpeg and thumbnail image data and not set 2340 * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this 2341 * case, LIMITED or FULL hardware level devices will report rotated thumnail size in 2342 * capture result, so the width and height will be interchanged if 90 or 270 degree 2343 * orientation is requested. LEGACY device will always report unrotated thumbnail 2344 * size.</li> 2345 * </ul> 2346 * <p><b>Range of valid values:</b><br> 2347 * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p> 2348 * <p>This key is available on all devices.</p> 2349 * 2350 * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES 2351 * @see CaptureRequest#JPEG_ORIENTATION 2352 */ 2353 @PublicKey 2354 public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE = 2355 new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class); 2356 2357 /** 2358 * <p>The desired lens aperture size, as a ratio of lens focal length to the 2359 * effective aperture diameter.</p> 2360 * <p>Setting this value is only supported on the camera devices that have a variable 2361 * aperture lens.</p> 2362 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, 2363 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 2364 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 2365 * to achieve manual exposure control.</p> 2366 * <p>The requested aperture value may take several frames to reach the 2367 * requested value; the camera device will report the current (intermediate) 2368 * aperture size in capture result metadata while the aperture is changing. 2369 * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 2370 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of 2371 * the ON modes, this will be overridden by the camera device 2372 * auto-exposure algorithm, the overridden values are then provided 2373 * back to the user in the corresponding result.</p> 2374 * <p><b>Units</b>: The f-number (f/N)</p> 2375 * <p><b>Range of valid values:</b><br> 2376 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p> 2377 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2378 * <p><b>Full capability</b> - 2379 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2380 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2381 * 2382 * @see CaptureRequest#CONTROL_AE_MODE 2383 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2384 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 2385 * @see CaptureResult#LENS_STATE 2386 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2387 * @see CaptureRequest#SENSOR_FRAME_DURATION 2388 * @see CaptureRequest#SENSOR_SENSITIVITY 2389 */ 2390 @PublicKey 2391 public static final Key<Float> LENS_APERTURE = 2392 new Key<Float>("android.lens.aperture", float.class); 2393 2394 /** 2395 * <p>The desired setting for the lens neutral density filter(s).</p> 2396 * <p>This control will not be supported on most camera devices.</p> 2397 * <p>Lens filters are typically used to lower the amount of light the 2398 * sensor is exposed to (measured in steps of EV). As used here, an EV 2399 * step is the standard logarithmic representation, which are 2400 * non-negative, and inversely proportional to the amount of light 2401 * hitting the sensor. For example, setting this to 0 would result 2402 * in no reduction of the incoming light, and setting this to 2 would 2403 * mean that the filter is set to reduce incoming light by two stops 2404 * (allowing 1/4 of the prior amount of light to the sensor).</p> 2405 * <p>It may take several frames before the lens filter density changes 2406 * to the requested value. While the filter density is still changing, 2407 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 2408 * <p><b>Units</b>: Exposure Value (EV)</p> 2409 * <p><b>Range of valid values:</b><br> 2410 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p> 2411 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2412 * <p><b>Full capability</b> - 2413 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2414 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2415 * 2416 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2417 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 2418 * @see CaptureResult#LENS_STATE 2419 */ 2420 @PublicKey 2421 public static final Key<Float> LENS_FILTER_DENSITY = 2422 new Key<Float>("android.lens.filterDensity", float.class); 2423 2424 /** 2425 * <p>The desired lens focal length; used for optical zoom.</p> 2426 * <p>This setting controls the physical focal length of the camera 2427 * device's lens. Changing the focal length changes the field of 2428 * view of the camera device, and is usually used for optical zoom.</p> 2429 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this 2430 * setting won't be applied instantaneously, and it may take several 2431 * frames before the lens can change to the requested focal length. 2432 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will 2433 * be set to MOVING.</p> 2434 * <p>Optical zoom will not be supported on most devices.</p> 2435 * <p><b>Units</b>: Millimeters</p> 2436 * <p><b>Range of valid values:</b><br> 2437 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p> 2438 * <p>This key is available on all devices.</p> 2439 * 2440 * @see CaptureRequest#LENS_APERTURE 2441 * @see CaptureRequest#LENS_FOCUS_DISTANCE 2442 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS 2443 * @see CaptureResult#LENS_STATE 2444 */ 2445 @PublicKey 2446 public static final Key<Float> LENS_FOCAL_LENGTH = 2447 new Key<Float>("android.lens.focalLength", float.class); 2448 2449 /** 2450 * <p>Desired distance to plane of sharpest focus, 2451 * measured from frontmost surface of the lens.</p> 2452 * <p>Should be zero for fixed-focus cameras</p> 2453 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 2454 * <p><b>Range of valid values:</b><br> 2455 * >= 0</p> 2456 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2457 * <p><b>Full capability</b> - 2458 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2459 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2460 * 2461 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2462 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 2463 */ 2464 @PublicKey 2465 public static final Key<Float> LENS_FOCUS_DISTANCE = 2466 new Key<Float>("android.lens.focusDistance", float.class); 2467 2468 /** 2469 * <p>The range of scene distances that are in 2470 * sharp focus (depth of field).</p> 2471 * <p>If variable focus not supported, can still report 2472 * fixed depth of field range</p> 2473 * <p><b>Units</b>: A pair of focus distances in diopters: (near, 2474 * far); see {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details.</p> 2475 * <p><b>Range of valid values:</b><br> 2476 * >=0</p> 2477 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2478 * <p><b>Limited capability</b> - 2479 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2480 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2481 * 2482 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2483 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 2484 */ 2485 @PublicKey 2486 public static final Key<android.util.Pair<Float,Float>> LENS_FOCUS_RANGE = 2487 new Key<android.util.Pair<Float,Float>>("android.lens.focusRange", new TypeReference<android.util.Pair<Float,Float>>() {{ }}); 2488 2489 /** 2490 * <p>Sets whether the camera device uses optical image stabilization (OIS) 2491 * when capturing images.</p> 2492 * <p>OIS is used to compensate for motion blur due to small 2493 * movements of the camera during capture. Unlike digital image 2494 * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS 2495 * makes use of mechanical elements to stabilize the camera 2496 * sensor, and thus allows for longer exposure times before 2497 * camera shake becomes apparent.</p> 2498 * <p>Switching between different optical stabilization modes may take several 2499 * frames to initialize, the camera device will report the current mode in 2500 * capture result metadata. For example, When "ON" mode is requested, the 2501 * optical stabilization modes in the first several capture results may still 2502 * be "OFF", and it will become "ON" when the initialization is done.</p> 2503 * <p>If a camera device supports both OIS and digital image stabilization 2504 * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable 2505 * interaction, so it is recommended not to enable both at the same time.</p> 2506 * <p>Not all devices will support OIS; see 2507 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for 2508 * available controls.</p> 2509 * <p><b>Possible values:</b> 2510 * <ul> 2511 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li> 2512 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li> 2513 * </ul></p> 2514 * <p><b>Available values for this device:</b><br> 2515 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p> 2516 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2517 * <p><b>Limited capability</b> - 2518 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2519 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2520 * 2521 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 2522 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2523 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 2524 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF 2525 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON 2526 */ 2527 @PublicKey 2528 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = 2529 new Key<Integer>("android.lens.opticalStabilizationMode", int.class); 2530 2531 /** 2532 * <p>Current lens status.</p> 2533 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 2534 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested, 2535 * they may take several frames to reach the requested values. This state indicates 2536 * the current status of the lens parameters.</p> 2537 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be 2538 * either because the parameters are all fixed, or because the lens has had enough 2539 * time to reach the most recently-requested values. 2540 * If all these lens parameters are not changable for a camera device, as listed below:</p> 2541 * <ul> 2542 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means 2543 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li> 2544 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value), 2545 * which means the optical zoom is not supported.</li> 2546 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li> 2547 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li> 2548 * </ul> 2549 * <p>Then this state will always be STATIONARY.</p> 2550 * <p>When the state is MOVING, it indicates that at least one of the lens parameters 2551 * is changing.</p> 2552 * <p><b>Possible values:</b> 2553 * <ul> 2554 * <li>{@link #LENS_STATE_STATIONARY STATIONARY}</li> 2555 * <li>{@link #LENS_STATE_MOVING MOVING}</li> 2556 * </ul></p> 2557 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2558 * <p><b>Limited capability</b> - 2559 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2560 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2561 * 2562 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2563 * @see CaptureRequest#LENS_APERTURE 2564 * @see CaptureRequest#LENS_FILTER_DENSITY 2565 * @see CaptureRequest#LENS_FOCAL_LENGTH 2566 * @see CaptureRequest#LENS_FOCUS_DISTANCE 2567 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 2568 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 2569 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS 2570 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 2571 * @see #LENS_STATE_STATIONARY 2572 * @see #LENS_STATE_MOVING 2573 */ 2574 @PublicKey 2575 public static final Key<Integer> LENS_STATE = 2576 new Key<Integer>("android.lens.state", int.class); 2577 2578 /** 2579 * <p>The orientation of the camera relative to the sensor 2580 * coordinate system.</p> 2581 * <p>The four coefficients that describe the quarternion 2582 * rotation from the Android sensor coordinate system to a 2583 * camera-aligned coordinate system where the X-axis is 2584 * aligned with the long side of the image sensor, the Y-axis 2585 * is aligned with the short side of the image sensor, and 2586 * the Z-axis is aligned with the optical axis of the sensor.</p> 2587 * <p>To convert from the quarternion coefficients <code>(x,y,z,w)</code> 2588 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation 2589 * amount <code>theta</code>, the following formulas can be used:</p> 2590 * <pre><code> theta = 2 * acos(w) 2591 * a_x = x / sin(theta/2) 2592 * a_y = y / sin(theta/2) 2593 * a_z = z / sin(theta/2) 2594 * </code></pre> 2595 * <p>To create a 3x3 rotation matrix that applies the rotation 2596 * defined by this quarternion, the following matrix can be 2597 * used:</p> 2598 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, 2599 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, 2600 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] 2601 * </code></pre> 2602 * <p>This matrix can then be used to apply the rotation to a 2603 * column vector point with</p> 2604 * <p><code>p' = Rp</code></p> 2605 * <p>where <code>p</code> is in the device sensor coordinate system, and 2606 * <code>p'</code> is in the camera-oriented coordinate system.</p> 2607 * <p><b>Units</b>: 2608 * Quarternion coefficients</p> 2609 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2610 */ 2611 @PublicKey 2612 public static final Key<float[]> LENS_POSE_ROTATION = 2613 new Key<float[]>("android.lens.poseRotation", float[].class); 2614 2615 /** 2616 * <p>Position of the camera optical center.</p> 2617 * <p>The position of the camera device's lens optical center, 2618 * as a three-dimensional vector <code>(x,y,z)</code>, relative to the 2619 * optical center of the largest camera device facing in the 2620 * same direction as this camera, in the {@link android.hardware.SensorEvent Android sensor coordinate 2621 * axes}. Note that only the axis definitions are shared with 2622 * the sensor coordinate system, but not the origin.</p> 2623 * <p>If this device is the largest or only camera device with a 2624 * given facing, then this position will be <code>(0, 0, 0)</code>; a 2625 * camera device with a lens optical center located 3 cm from 2626 * the main sensor along the +X axis (to the right from the 2627 * user's perspective) will report <code>(0.03, 0, 0)</code>.</p> 2628 * <p>To transform a pixel coordinates between two cameras 2629 * facing the same direction, first the source camera 2630 * android.lens.radialDistortion must be corrected for. Then 2631 * the source camera android.lens.intrinsicCalibration needs 2632 * to be applied, followed by the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} 2633 * of the source camera, the translation of the source camera 2634 * relative to the destination camera, the 2635 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination camera, and 2636 * finally the inverse of android.lens.intrinsicCalibration 2637 * of the destination camera. This obtains a 2638 * radial-distortion-free coordinate in the destination 2639 * camera pixel coordinates.</p> 2640 * <p>To compare this against a real image from the destination 2641 * camera, the destination camera image then needs to be 2642 * corrected for radial distortion before comparison or 2643 * sampling.</p> 2644 * <p><b>Units</b>: Meters</p> 2645 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2646 * 2647 * @see CameraCharacteristics#LENS_POSE_ROTATION 2648 */ 2649 @PublicKey 2650 public static final Key<float[]> LENS_POSE_TRANSLATION = 2651 new Key<float[]>("android.lens.poseTranslation", float[].class); 2652 2653 /** 2654 * <p>The parameters for this camera device's intrinsic 2655 * calibration.</p> 2656 * <p>The five calibration parameters that describe the 2657 * transform from camera-centric 3D coordinates to sensor 2658 * pixel coordinates:</p> 2659 * <pre><code>[f_x, f_y, c_x, c_y, s] 2660 * </code></pre> 2661 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical 2662 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical 2663 * axis, and <code>s</code> is a skew parameter for the sensor plane not 2664 * being aligned with the lens plane.</p> 2665 * <p>These are typically used within a transformation matrix K:</p> 2666 * <pre><code>K = [ f_x, s, c_x, 2667 * 0, f_y, c_y, 2668 * 0 0, 1 ] 2669 * </code></pre> 2670 * <p>which can then be combined with the camera pose rotation 2671 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and 2672 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the 2673 * complete transform from world coordinates to pixel 2674 * coordinates:</p> 2675 * <pre><code>P = [ K 0 * [ R t 2676 * 0 1 ] 0 1 ] 2677 * </code></pre> 2678 * <p>and with <code>p_w</code> being a point in the world coordinate system 2679 * and <code>p_s</code> being a point in the camera active pixel array 2680 * coordinate system, and with the mapping including the 2681 * homogeneous division by z:</p> 2682 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w 2683 * p_s = p_h / z_h 2684 * </code></pre> 2685 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world 2686 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity 2687 * (depth) in pixel coordinates.</p> 2688 * <p>Note that the coordinate system for this transform is the 2689 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system, 2690 * where <code>(0,0)</code> is the top-left of the 2691 * preCorrectionActiveArraySize rectangle. Once the pose and 2692 * intrinsic calibration transforms have been applied to a 2693 * world point, then the android.lens.radialDistortion 2694 * transform needs to be applied, and the result adjusted to 2695 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate 2696 * system (where <code>(0, 0)</code> is the top-left of the 2697 * activeArraySize rectangle), to determine the final pixel 2698 * coordinate of the world point for processed (non-RAW) 2699 * output buffers.</p> 2700 * <p><b>Units</b>: 2701 * Pixels in the 2702 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} 2703 * coordinate system.</p> 2704 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2705 * 2706 * @see CameraCharacteristics#LENS_POSE_ROTATION 2707 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 2708 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2709 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 2710 */ 2711 @PublicKey 2712 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = 2713 new Key<float[]>("android.lens.intrinsicCalibration", float[].class); 2714 2715 /** 2716 * <p>The correction coefficients to correct for this camera device's 2717 * radial and tangential lens distortion.</p> 2718 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, 2719 * kappa_3]</code> and two tangential distortion coefficients 2720 * <code>[kappa_4, kappa_5]</code> that can be used to correct the 2721 * lens's geometric distortion with the mapping equations:</p> 2722 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 2723 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) 2724 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 2725 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) 2726 * </code></pre> 2727 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the 2728 * input image that correspond to the pixel values in the 2729 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> 2730 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) 2731 * </code></pre> 2732 * <p>The pixel coordinates are defined in a normalized 2733 * coordinate system related to the 2734 * android.lens.intrinsicCalibration calibration fields. 2735 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the 2736 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes 2737 * of both x and y coordinates are normalized to be 1 at the 2738 * edge further from the optical center, so the range 2739 * for both dimensions is <code>-1 <= x <= 1</code>.</p> 2740 * <p>Finally, <code>r</code> represents the radial distance from the 2741 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude 2742 * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> 2743 * <p>The distortion model used is the Brown-Conrady model.</p> 2744 * <p><b>Units</b>: 2745 * Unitless coefficients.</p> 2746 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2747 */ 2748 @PublicKey 2749 public static final Key<float[]> LENS_RADIAL_DISTORTION = 2750 new Key<float[]>("android.lens.radialDistortion", float[].class); 2751 2752 /** 2753 * <p>Mode of operation for the noise reduction algorithm.</p> 2754 * <p>The noise reduction algorithm attempts to improve image quality by removing 2755 * excessive noise added by the capture process, especially in dark conditions.</p> 2756 * <p>OFF means no noise reduction will be applied by the camera device, for both raw and 2757 * YUV domain.</p> 2758 * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove 2759 * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF. 2760 * This mode is optional, may not be support by all devices. The application should check 2761 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p> 2762 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering 2763 * will be applied. HIGH_QUALITY mode indicates that the camera device 2764 * will use the highest-quality noise filtering algorithms, 2765 * even if it slows down capture rate. FAST means the camera device will not 2766 * slow down capture rate when applying noise filtering.</p> 2767 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device 2768 * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device 2769 * may adjust the noise reduction parameters for best image quality based on the 2770 * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p> 2771 * <p><b>Possible values:</b> 2772 * <ul> 2773 * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li> 2774 * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li> 2775 * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2776 * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li> 2777 * </ul></p> 2778 * <p><b>Available values for this device:</b><br> 2779 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p> 2780 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2781 * <p><b>Full capability</b> - 2782 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2783 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2784 * 2785 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2786 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 2787 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 2788 * @see #NOISE_REDUCTION_MODE_OFF 2789 * @see #NOISE_REDUCTION_MODE_FAST 2790 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY 2791 * @see #NOISE_REDUCTION_MODE_MINIMAL 2792 */ 2793 @PublicKey 2794 public static final Key<Integer> NOISE_REDUCTION_MODE = 2795 new Key<Integer>("android.noiseReduction.mode", int.class); 2796 2797 /** 2798 * <p>Whether a result given to the framework is the 2799 * final one for the capture, or only a partial that contains a 2800 * subset of the full set of dynamic metadata 2801 * values.</p> 2802 * <p>The entries in the result metadata buffers for a 2803 * single capture may not overlap, except for this entry. The 2804 * FINAL buffers must retain FIFO ordering relative to the 2805 * requests that generate them, so the FINAL buffer for frame 3 must 2806 * always be sent to the framework after the FINAL buffer for frame 2, and 2807 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned 2808 * in any order relative to other frames, but all PARTIAL buffers for a given 2809 * capture must arrive before the FINAL buffer for that capture. This entry may 2810 * only be used by the camera device if quirks.usePartialResult is set to 1.</p> 2811 * <p><b>Range of valid values:</b><br> 2812 * Optional. Default value is FINAL.</p> 2813 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2814 * @deprecated 2815 * @hide 2816 */ 2817 @Deprecated 2818 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT = 2819 new Key<Boolean>("android.quirks.partialResult", boolean.class); 2820 2821 /** 2822 * <p>A frame counter set by the framework. This value monotonically 2823 * increases with every new result (that is, each new result has a unique 2824 * frameCount value).</p> 2825 * <p>Reset on release()</p> 2826 * <p><b>Units</b>: count of frames</p> 2827 * <p><b>Range of valid values:</b><br> 2828 * > 0</p> 2829 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2830 * @deprecated 2831 * @hide 2832 */ 2833 @Deprecated 2834 public static final Key<Integer> REQUEST_FRAME_COUNT = 2835 new Key<Integer>("android.request.frameCount", int.class); 2836 2837 /** 2838 * <p>An application-specified ID for the current 2839 * request. Must be maintained unchanged in output 2840 * frame</p> 2841 * <p><b>Units</b>: arbitrary integer assigned by application</p> 2842 * <p><b>Range of valid values:</b><br> 2843 * Any int</p> 2844 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2845 * @hide 2846 */ 2847 public static final Key<Integer> REQUEST_ID = 2848 new Key<Integer>("android.request.id", int.class); 2849 2850 /** 2851 * <p>Specifies the number of pipeline stages the frame went 2852 * through from when it was exposed to when the final completed result 2853 * was available to the framework.</p> 2854 * <p>Depending on what settings are used in the request, and 2855 * what streams are configured, the data may undergo less processing, 2856 * and some pipeline stages skipped.</p> 2857 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p> 2858 * <p><b>Range of valid values:</b><br> 2859 * <= {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth}</p> 2860 * <p>This key is available on all devices.</p> 2861 * 2862 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH 2863 */ 2864 @PublicKey 2865 public static final Key<Byte> REQUEST_PIPELINE_DEPTH = 2866 new Key<Byte>("android.request.pipelineDepth", byte.class); 2867 2868 /** 2869 * <p>The desired region of the sensor to read out for this capture.</p> 2870 * <p>This control can be used to implement digital zoom.</p> 2871 * <p>The crop region coordinate system is based off 2872 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the 2873 * top-left corner of the sensor active array.</p> 2874 * <p>Output streams use this rectangle to produce their output, 2875 * cropping to a smaller region if necessary to maintain the 2876 * stream's aspect ratio, then scaling the sensor input to 2877 * match the output's configured resolution.</p> 2878 * <p>The crop region is applied after the RAW to other color 2879 * space (e.g. YUV) conversion. Since raw streams 2880 * (e.g. RAW16) don't have the conversion stage, they are not 2881 * croppable. The crop region will be ignored by raw streams.</p> 2882 * <p>For non-raw streams, any additional per-stream cropping will 2883 * be done to maximize the final pixel area of the stream.</p> 2884 * <p>For example, if the crop region is set to a 4:3 aspect 2885 * ratio, then 4:3 streams will use the exact crop 2886 * region. 16:9 streams will further crop vertically 2887 * (letterbox).</p> 2888 * <p>Conversely, if the crop region is set to a 16:9, then 4:3 2889 * outputs will crop horizontally (pillarbox), and 16:9 2890 * streams will match exactly. These additional crops will 2891 * be centered within the crop region.</p> 2892 * <p>The width and height of the crop region cannot 2893 * be set to be smaller than 2894 * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and 2895 * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p> 2896 * <p>The camera device may adjust the crop region to account 2897 * for rounding and other hardware requirements; the final 2898 * crop region used will be included in the output capture 2899 * result.</p> 2900 * <p><b>Units</b>: Pixel coordinates relative to 2901 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 2902 * <p>This key is available on all devices.</p> 2903 * 2904 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM 2905 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2906 */ 2907 @PublicKey 2908 public static final Key<android.graphics.Rect> SCALER_CROP_REGION = 2909 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); 2910 2911 /** 2912 * <p>Duration each pixel is exposed to 2913 * light.</p> 2914 * <p>If the sensor can't expose this exact duration, it will shorten the 2915 * duration exposed to the nearest possible value (rather than expose longer). 2916 * The final exposure time used will be available in the output capture result.</p> 2917 * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to 2918 * OFF; otherwise the auto-exposure algorithm will override this value.</p> 2919 * <p><b>Units</b>: Nanoseconds</p> 2920 * <p><b>Range of valid values:</b><br> 2921 * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p> 2922 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2923 * <p><b>Full capability</b> - 2924 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2925 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2926 * 2927 * @see CaptureRequest#CONTROL_AE_MODE 2928 * @see CaptureRequest#CONTROL_MODE 2929 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2930 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 2931 */ 2932 @PublicKey 2933 public static final Key<Long> SENSOR_EXPOSURE_TIME = 2934 new Key<Long>("android.sensor.exposureTime", long.class); 2935 2936 /** 2937 * <p>Duration from start of frame exposure to 2938 * start of next frame exposure.</p> 2939 * <p>The maximum frame rate that can be supported by a camera subsystem is 2940 * a function of many factors:</p> 2941 * <ul> 2942 * <li>Requested resolutions of output image streams</li> 2943 * <li>Availability of binning / skipping modes on the imager</li> 2944 * <li>The bandwidth of the imager interface</li> 2945 * <li>The bandwidth of the various ISP processing blocks</li> 2946 * </ul> 2947 * <p>Since these factors can vary greatly between different ISPs and 2948 * sensors, the camera abstraction tries to represent the bandwidth 2949 * restrictions with as simple a model as possible.</p> 2950 * <p>The model presented has the following characteristics:</p> 2951 * <ul> 2952 * <li>The image sensor is always configured to output the smallest 2953 * resolution possible given the application's requested output stream 2954 * sizes. The smallest resolution is defined as being at least as large 2955 * as the largest requested output stream size; the camera pipeline must 2956 * never digitally upsample sensor data when the crop region covers the 2957 * whole sensor. In general, this means that if only small output stream 2958 * resolutions are configured, the sensor can provide a higher frame 2959 * rate.</li> 2960 * <li>Since any request may use any or all the currently configured 2961 * output streams, the sensor and ISP must be configured to support 2962 * scaling a single capture to all the streams at the same time. This 2963 * means the camera pipeline must be ready to produce the largest 2964 * requested output size without any delay. Therefore, the overall 2965 * frame rate of a given configured stream set is governed only by the 2966 * largest requested stream resolution.</li> 2967 * <li>Using more than one output stream in a request does not affect the 2968 * frame duration.</li> 2969 * <li>Certain format-streams may need to do additional background processing 2970 * before data is consumed/produced by that stream. These processors 2971 * can run concurrently to the rest of the camera pipeline, but 2972 * cannot process more than 1 capture at a time.</li> 2973 * </ul> 2974 * <p>The necessary information for the application, given the model above, 2975 * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field using 2976 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }. 2977 * These are used to determine the maximum frame rate / minimum frame 2978 * duration that is possible for a given stream configuration.</p> 2979 * <p>Specifically, the application can use the following rules to 2980 * determine the minimum frame duration it can request from the camera 2981 * device:</p> 2982 * <ol> 2983 * <li>Let the set of currently configured input/output streams 2984 * be called <code>S</code>.</li> 2985 * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking 2986 * it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 2987 * (with its respective size/format). Let this set of frame durations be 2988 * called <code>F</code>.</li> 2989 * <li>For any given request <code>R</code>, the minimum frame duration allowed 2990 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams 2991 * used in <code>R</code> be called <code>S_r</code>.</li> 2992 * </ol> 2993 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } 2994 * using its respective size/format), then the frame duration in <code>F</code> 2995 * determines the steady state frame rate that the application will get 2996 * if it uses <code>R</code> as a repeating request. Let this special kind of 2997 * request be called <code>Rsimple</code>.</p> 2998 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved 2999 * by a single capture of a new request <code>Rstall</code> (which has at least 3000 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the 3001 * same minimum frame duration this will not cause a frame rate loss 3002 * if all buffers from the previous <code>Rstall</code> have already been 3003 * delivered.</p> 3004 * <p>For more details about stalling, see 3005 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }.</p> 3006 * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to 3007 * OFF; otherwise the auto-exposure algorithm will override this value.</p> 3008 * <p><b>Units</b>: Nanoseconds</p> 3009 * <p><b>Range of valid values:</b><br> 3010 * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}, 3011 * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration 3012 * is capped to <code>max(duration, exposureTime + overhead)</code>.</p> 3013 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3014 * <p><b>Full capability</b> - 3015 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3016 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3017 * 3018 * @see CaptureRequest#CONTROL_AE_MODE 3019 * @see CaptureRequest#CONTROL_MODE 3020 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3021 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 3022 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 3023 */ 3024 @PublicKey 3025 public static final Key<Long> SENSOR_FRAME_DURATION = 3026 new Key<Long>("android.sensor.frameDuration", long.class); 3027 3028 /** 3029 * <p>The amount of gain applied to sensor data 3030 * before processing.</p> 3031 * <p>The sensitivity is the standard ISO sensitivity value, 3032 * as defined in ISO 12232:2006.</p> 3033 * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and 3034 * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device 3035 * is guaranteed to use only analog amplification for applying the gain.</p> 3036 * <p>If the camera device cannot apply the exact sensitivity 3037 * requested, it will reduce the gain to the nearest supported 3038 * value. The final sensitivity used will be available in the 3039 * output capture result.</p> 3040 * <p><b>Units</b>: ISO arithmetic units</p> 3041 * <p><b>Range of valid values:</b><br> 3042 * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p> 3043 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3044 * <p><b>Full capability</b> - 3045 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3046 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3047 * 3048 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3049 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 3050 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY 3051 */ 3052 @PublicKey 3053 public static final Key<Integer> SENSOR_SENSITIVITY = 3054 new Key<Integer>("android.sensor.sensitivity", int.class); 3055 3056 /** 3057 * <p>Time at start of exposure of first 3058 * row of the image sensor active array, in nanoseconds.</p> 3059 * <p>The timestamps are also included in all image 3060 * buffers produced for the same capture, and will be identical 3061 * on all the outputs.</p> 3062 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> UNKNOWN, 3063 * the timestamps measure time since an unspecified starting point, 3064 * and are monotonically increasing. They can be compared with the 3065 * timestamps for other captures from the same camera device, but are 3066 * not guaranteed to be comparable to any other time source.</p> 3067 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME, the 3068 * timestamps measure time in the same timebase as {@link android.os.SystemClock#elapsedRealtimeNanos }, and they can 3069 * be compared to other timestamps from other subsystems that 3070 * are using that base.</p> 3071 * <p>For reprocessing, the timestamp will match the start of exposure of 3072 * the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the 3073 * timestamp} in the TotalCaptureResult that was used to create the 3074 * reprocess capture request.</p> 3075 * <p><b>Units</b>: Nanoseconds</p> 3076 * <p><b>Range of valid values:</b><br> 3077 * > 0</p> 3078 * <p>This key is available on all devices.</p> 3079 * 3080 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 3081 */ 3082 @PublicKey 3083 public static final Key<Long> SENSOR_TIMESTAMP = 3084 new Key<Long>("android.sensor.timestamp", long.class); 3085 3086 /** 3087 * <p>The estimated camera neutral color in the native sensor colorspace at 3088 * the time of capture.</p> 3089 * <p>This value gives the neutral color point encoded as an RGB value in the 3090 * native sensor color space. The neutral color point indicates the 3091 * currently estimated white point of the scene illumination. It can be 3092 * used to interpolate between the provided color transforms when 3093 * processing raw sensor data.</p> 3094 * <p>The order of the values is R, G, B; where R is in the lowest index.</p> 3095 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3096 */ 3097 @PublicKey 3098 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT = 3099 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class); 3100 3101 /** 3102 * <p>Noise model coefficients for each CFA mosaic channel.</p> 3103 * <p>This key contains two noise model coefficients for each CFA channel 3104 * corresponding to the sensor amplification (S) and sensor readout 3105 * noise (O). These are given as pairs of coefficients for each channel 3106 * in the same order as channels listed for the CFA layout key 3107 * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is 3108 * represented as an array of Pair<Double, Double>, where 3109 * the first member of the Pair at index n is the S coefficient and the 3110 * second member is the O coefficient for the nth color channel in the CFA.</p> 3111 * <p>These coefficients are used in a two parameter noise model to describe 3112 * the amount of noise present in the image for each CFA channel. The 3113 * noise model used here is:</p> 3114 * <p>N(x) = sqrt(Sx + O)</p> 3115 * <p>Where x represents the recorded signal of a CFA channel normalized to 3116 * the range [0, 1], and S and O are the noise model coeffiecients for 3117 * that channel.</p> 3118 * <p>A more detailed description of the noise model can be found in the 3119 * Adobe DNG specification for the NoiseProfile tag.</p> 3120 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3121 * 3122 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 3123 */ 3124 @PublicKey 3125 public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE = 3126 new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }}); 3127 3128 /** 3129 * <p>The worst-case divergence between Bayer green channels.</p> 3130 * <p>This value is an estimate of the worst case split between the 3131 * Bayer green channels in the red and blue rows in the sensor color 3132 * filter array.</p> 3133 * <p>The green split is calculated as follows:</p> 3134 * <ol> 3135 * <li>A 5x5 pixel (or larger) window W within the active sensor array is 3136 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer 3137 * mosaic channels (R, Gr, Gb, B). The location and size of the window 3138 * chosen is implementation defined, and should be chosen to provide a 3139 * green split estimate that is both representative of the entire image 3140 * for this camera sensor, and can be calculated quickly.</li> 3141 * <li>The arithmetic mean of the green channels from the red 3142 * rows (mean_Gr) within W is computed.</li> 3143 * <li>The arithmetic mean of the green channels from the blue 3144 * rows (mean_Gb) within W is computed.</li> 3145 * <li>The maximum ratio R of the two means is computed as follows: 3146 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li> 3147 * </ol> 3148 * <p>The ratio R is the green split divergence reported for this property, 3149 * which represents how much the green channels differ in the mosaic 3150 * pattern. This value is typically used to determine the treatment of 3151 * the green mosaic channels when demosaicing.</p> 3152 * <p>The green split value can be roughly interpreted as follows:</p> 3153 * <ul> 3154 * <li>R < 1.03 is a negligible split (<3% divergence).</li> 3155 * <li>1.20 <= R >= 1.03 will require some software 3156 * correction to avoid demosaic errors (3-20% divergence).</li> 3157 * <li>R > 1.20 will require strong software correction to produce 3158 * a usuable image (>20% divergence).</li> 3159 * </ul> 3160 * <p><b>Range of valid values:</b><br></p> 3161 * <p>>= 0</p> 3162 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3163 */ 3164 @PublicKey 3165 public static final Key<Float> SENSOR_GREEN_SPLIT = 3166 new Key<Float>("android.sensor.greenSplit", float.class); 3167 3168 /** 3169 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern 3170 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p> 3171 * <p>Each color channel is treated as an unsigned 32-bit integer. 3172 * The camera device then uses the most significant X bits 3173 * that correspond to how many bits are in its Bayer raw sensor 3174 * output.</p> 3175 * <p>For example, a sensor with RAW10 Bayer output would use the 3176 * 10 most significant bits from each color channel.</p> 3177 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3178 * 3179 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3180 */ 3181 @PublicKey 3182 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA = 3183 new Key<int[]>("android.sensor.testPatternData", int[].class); 3184 3185 /** 3186 * <p>When enabled, the sensor sends a test pattern instead of 3187 * doing a real exposure from the camera.</p> 3188 * <p>When a test pattern is enabled, all manual sensor controls specified 3189 * by android.sensor.* will be ignored. All other controls should 3190 * work as normal.</p> 3191 * <p>For example, if manual flash is enabled, flash firing should still 3192 * occur (and that the test pattern remain unmodified, since the flash 3193 * would not actually affect it).</p> 3194 * <p>Defaults to OFF.</p> 3195 * <p><b>Possible values:</b> 3196 * <ul> 3197 * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li> 3198 * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li> 3199 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li> 3200 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li> 3201 * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li> 3202 * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li> 3203 * </ul></p> 3204 * <p><b>Available values for this device:</b><br> 3205 * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p> 3206 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3207 * 3208 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES 3209 * @see #SENSOR_TEST_PATTERN_MODE_OFF 3210 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR 3211 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS 3212 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY 3213 * @see #SENSOR_TEST_PATTERN_MODE_PN9 3214 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1 3215 */ 3216 @PublicKey 3217 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE = 3218 new Key<Integer>("android.sensor.testPatternMode", int.class); 3219 3220 /** 3221 * <p>Duration between the start of first row exposure 3222 * and the start of last row exposure.</p> 3223 * <p>This is the exposure time skew between the first and last 3224 * row exposure start times. The first row and the last row are 3225 * the first and last rows inside of the 3226 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 3227 * <p>For typical camera sensors that use rolling shutters, this is also equivalent 3228 * to the frame readout time.</p> 3229 * <p><b>Units</b>: Nanoseconds</p> 3230 * <p><b>Range of valid values:</b><br> 3231 * >= 0 and < 3232 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }.</p> 3233 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3234 * <p><b>Limited capability</b> - 3235 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 3236 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3237 * 3238 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3239 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3240 */ 3241 @PublicKey 3242 public static final Key<Long> SENSOR_ROLLING_SHUTTER_SKEW = 3243 new Key<Long>("android.sensor.rollingShutterSkew", long.class); 3244 3245 /** 3246 * <p>Quality of lens shading correction applied 3247 * to the image data.</p> 3248 * <p>When set to OFF mode, no lens shading correction will be applied by the 3249 * camera device, and an identity lens shading map data will be provided 3250 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens 3251 * shading map with size of <code>[ 4, 3 ]</code>, 3252 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity 3253 * map shown below:</p> 3254 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 3255 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 3256 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 3257 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 3258 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 3259 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 3260 * </code></pre> 3261 * <p>When set to other modes, lens shading correction will be applied by the camera 3262 * device. Applications can request lens shading map data by setting 3263 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens 3264 * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map 3265 * data will be the one applied by the camera device for this capture request.</p> 3266 * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore 3267 * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and 3268 * AWB are in AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code> 3269 * OFF), to get best results, it is recommended that the applications wait for the AE and AWB 3270 * to be converged before using the returned shading map data.</p> 3271 * <p><b>Possible values:</b> 3272 * <ul> 3273 * <li>{@link #SHADING_MODE_OFF OFF}</li> 3274 * <li>{@link #SHADING_MODE_FAST FAST}</li> 3275 * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 3276 * </ul></p> 3277 * <p><b>Available values for this device:</b><br> 3278 * {@link CameraCharacteristics#SHADING_AVAILABLE_MODES android.shading.availableModes}</p> 3279 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3280 * <p><b>Full capability</b> - 3281 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3282 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3283 * 3284 * @see CaptureRequest#CONTROL_AE_MODE 3285 * @see CaptureRequest#CONTROL_AWB_MODE 3286 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3287 * @see CameraCharacteristics#SHADING_AVAILABLE_MODES 3288 * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP 3289 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 3290 * @see #SHADING_MODE_OFF 3291 * @see #SHADING_MODE_FAST 3292 * @see #SHADING_MODE_HIGH_QUALITY 3293 */ 3294 @PublicKey 3295 public static final Key<Integer> SHADING_MODE = 3296 new Key<Integer>("android.shading.mode", int.class); 3297 3298 /** 3299 * <p>Operating mode for the face detector 3300 * unit.</p> 3301 * <p>Whether face detection is enabled, and whether it 3302 * should output just the basic fields or the full set of 3303 * fields.</p> 3304 * <p><b>Possible values:</b> 3305 * <ul> 3306 * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li> 3307 * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li> 3308 * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li> 3309 * </ul></p> 3310 * <p><b>Available values for this device:</b><br> 3311 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p> 3312 * <p>This key is available on all devices.</p> 3313 * 3314 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 3315 * @see #STATISTICS_FACE_DETECT_MODE_OFF 3316 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE 3317 * @see #STATISTICS_FACE_DETECT_MODE_FULL 3318 */ 3319 @PublicKey 3320 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = 3321 new Key<Integer>("android.statistics.faceDetectMode", int.class); 3322 3323 /** 3324 * <p>List of unique IDs for detected faces.</p> 3325 * <p>Each detected face is given a unique ID that is valid for as long as the face is visible 3326 * to the camera device. A face that leaves the field of view and later returns may be 3327 * assigned a new ID.</p> 3328 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL 3329 * This key is available on all devices.</p> 3330 * 3331 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3332 * @hide 3333 */ 3334 public static final Key<int[]> STATISTICS_FACE_IDS = 3335 new Key<int[]>("android.statistics.faceIds", int[].class); 3336 3337 /** 3338 * <p>List of landmarks for detected 3339 * faces.</p> 3340 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with 3341 * <code>(0, 0)</code> being the top-left pixel of the active array.</p> 3342 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL 3343 * This key is available on all devices.</p> 3344 * 3345 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3346 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3347 * @hide 3348 */ 3349 public static final Key<int[]> STATISTICS_FACE_LANDMARKS = 3350 new Key<int[]>("android.statistics.faceLandmarks", int[].class); 3351 3352 /** 3353 * <p>List of the bounding rectangles for detected 3354 * faces.</p> 3355 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with 3356 * <code>(0, 0)</code> being the top-left pixel of the active array.</p> 3357 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF 3358 * This key is available on all devices.</p> 3359 * 3360 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3361 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3362 * @hide 3363 */ 3364 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES = 3365 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class); 3366 3367 /** 3368 * <p>List of the face confidence scores for 3369 * detected faces</p> 3370 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF.</p> 3371 * <p><b>Range of valid values:</b><br> 3372 * 1-100</p> 3373 * <p>This key is available on all devices.</p> 3374 * 3375 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3376 * @hide 3377 */ 3378 public static final Key<byte[]> STATISTICS_FACE_SCORES = 3379 new Key<byte[]>("android.statistics.faceScores", byte[].class); 3380 3381 /** 3382 * <p>List of the faces detected through camera face detection 3383 * in this capture.</p> 3384 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} <code>!=</code> OFF.</p> 3385 * <p>This key is available on all devices.</p> 3386 * 3387 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3388 */ 3389 @PublicKey 3390 @SyntheticKey 3391 public static final Key<android.hardware.camera2.params.Face[]> STATISTICS_FACES = 3392 new Key<android.hardware.camera2.params.Face[]>("android.statistics.faces", android.hardware.camera2.params.Face[].class); 3393 3394 /** 3395 * <p>The shading map is a low-resolution floating-point map 3396 * that lists the coefficients used to correct for vignetting, for each 3397 * Bayer color channel.</p> 3398 * <p>The least shaded section of the image should have a gain factor 3399 * of 1; all other sections should have gains above 1.</p> 3400 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map 3401 * must take into account the colorCorrection settings.</p> 3402 * <p>The shading map is for the entire active pixel array, and is not 3403 * affected by the crop region specified in the request. Each shading map 3404 * entry is the value of the shading compensation map over a specific 3405 * pixel on the sensor. Specifically, with a (N x M) resolution shading 3406 * map, and an active pixel array size (W x H), shading map entry 3407 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at 3408 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. 3409 * The map is assumed to be bilinearly interpolated between the sample points.</p> 3410 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green 3411 * channel for the even rows of a Bayer pattern, and Godd is the odd rows. 3412 * The shading map is stored in a fully interleaved format.</p> 3413 * <p>The shading map should have on the order of 30-40 rows and columns, 3414 * and must be smaller than 64x64.</p> 3415 * <p>As an example, given a very small map defined as:</p> 3416 * <pre><code>width,height = [ 4, 3 ] 3417 * values = 3418 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, 3419 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, 3420 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, 3421 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, 3422 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, 3423 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] 3424 * </code></pre> 3425 * <p>The low-resolution scaling map images for each channel are 3426 * (displayed using nearest-neighbor interpolation):</p> 3427 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" /> 3428 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" /> 3429 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" /> 3430 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p> 3431 * <p>As a visualization only, inverting the full-color map to recover an 3432 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p> 3433 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p> 3434 * <p><b>Range of valid values:</b><br> 3435 * Each gain factor is >= 1</p> 3436 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3437 * <p><b>Full capability</b> - 3438 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3439 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3440 * 3441 * @see CaptureRequest#COLOR_CORRECTION_MODE 3442 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3443 */ 3444 @PublicKey 3445 public static final Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP = 3446 new Key<android.hardware.camera2.params.LensShadingMap>("android.statistics.lensShadingCorrectionMap", android.hardware.camera2.params.LensShadingMap.class); 3447 3448 /** 3449 * <p>The shading map is a low-resolution floating-point map 3450 * that lists the coefficients used to correct for vignetting, for each 3451 * Bayer color channel of RAW image data.</p> 3452 * <p>The least shaded section of the image should have a gain factor 3453 * of 1; all other sections should have gains above 1.</p> 3454 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map 3455 * must take into account the colorCorrection settings.</p> 3456 * <p>The shading map is for the entire active pixel array, and is not 3457 * affected by the crop region specified in the request. Each shading map 3458 * entry is the value of the shading compensation map over a specific 3459 * pixel on the sensor. Specifically, with a (N x M) resolution shading 3460 * map, and an active pixel array size (W x H), shading map entry 3461 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at 3462 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. 3463 * The map is assumed to be bilinearly interpolated between the sample points.</p> 3464 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green 3465 * channel for the even rows of a Bayer pattern, and Godd is the odd rows. 3466 * The shading map is stored in a fully interleaved format, and its size 3467 * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p> 3468 * <p>The shading map should have on the order of 30-40 rows and columns, 3469 * and must be smaller than 64x64.</p> 3470 * <p>As an example, given a very small map defined as:</p> 3471 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ] 3472 * android.statistics.lensShadingMap = 3473 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, 3474 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, 3475 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, 3476 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, 3477 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, 3478 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] 3479 * </code></pre> 3480 * <p>The low-resolution scaling map images for each channel are 3481 * (displayed using nearest-neighbor interpolation):</p> 3482 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" /> 3483 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" /> 3484 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" /> 3485 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p> 3486 * <p>As a visualization only, inverting the full-color map to recover an 3487 * image of a gray wall (using bicubic interpolation for visual quality) 3488 * as captured by the sensor gives:</p> 3489 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p> 3490 * <p>Note that the RAW image data might be subject to lens shading 3491 * correction not reported on this map. Query 3492 * {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} to see if RAW image data has subject 3493 * to lens shading correction. If {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} 3494 * is TRUE, the RAW image data is subject to partial or full lens shading 3495 * correction. In the case full lens shading correction is applied to RAW 3496 * images, the gain factor map reported in this key will contain all 1.0 gains. 3497 * In other words, the map reported in this key is the remaining lens shading 3498 * that needs to be applied on the RAW image to get images without lens shading 3499 * artifacts. See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image 3500 * formats.</p> 3501 * <p><b>Range of valid values:</b><br> 3502 * Each gain factor is >= 1</p> 3503 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3504 * <p><b>Full capability</b> - 3505 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3506 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3507 * 3508 * @see CaptureRequest#COLOR_CORRECTION_MODE 3509 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3510 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW 3511 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED 3512 * @hide 3513 */ 3514 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP = 3515 new Key<float[]>("android.statistics.lensShadingMap", float[].class); 3516 3517 /** 3518 * <p>The best-fit color channel gains calculated 3519 * by the camera device's statistics units for the current output frame.</p> 3520 * <p>This may be different than the gains used for this frame, 3521 * since statistics processing on data from a new frame 3522 * typically completes after the transform has already been 3523 * applied to that frame.</p> 3524 * <p>The 4 channel gains are defined in Bayer domain, 3525 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p> 3526 * <p>This value should always be calculated by the auto-white balance (AWB) block, 3527 * regardless of the android.control.* current values.</p> 3528 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3529 * 3530 * @see CaptureRequest#COLOR_CORRECTION_GAINS 3531 * @deprecated 3532 * @hide 3533 */ 3534 @Deprecated 3535 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS = 3536 new Key<float[]>("android.statistics.predictedColorGains", float[].class); 3537 3538 /** 3539 * <p>The best-fit color transform matrix estimate 3540 * calculated by the camera device's statistics units for the current 3541 * output frame.</p> 3542 * <p>The camera device will provide the estimate from its 3543 * statistics unit on the white balance transforms to use 3544 * for the next frame. These are the values the camera device believes 3545 * are the best fit for the current output frame. This may 3546 * be different than the transform used for this frame, since 3547 * statistics processing on data from a new frame typically 3548 * completes after the transform has already been applied to 3549 * that frame.</p> 3550 * <p>These estimates must be provided for all frames, even if 3551 * capture settings and color transforms are set by the application.</p> 3552 * <p>This value should always be calculated by the auto-white balance (AWB) block, 3553 * regardless of the android.control.* current values.</p> 3554 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3555 * @deprecated 3556 * @hide 3557 */ 3558 @Deprecated 3559 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = 3560 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class); 3561 3562 /** 3563 * <p>The camera device estimated scene illumination lighting 3564 * frequency.</p> 3565 * <p>Many light sources, such as most fluorescent lights, flicker at a rate 3566 * that depends on the local utility power standards. This flicker must be 3567 * accounted for by auto-exposure routines to avoid artifacts in captured images. 3568 * The camera device uses this entry to tell the application what the scene 3569 * illuminant frequency is.</p> 3570 * <p>When manual exposure control is enabled 3571 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == 3572 * OFF</code>), the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't perform 3573 * antibanding, and the application can ensure it selects 3574 * exposure times that do not cause banding issues by looking 3575 * into this metadata field. See 3576 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} for more details.</p> 3577 * <p>Reports NONE if there doesn't appear to be flickering illumination.</p> 3578 * <p><b>Possible values:</b> 3579 * <ul> 3580 * <li>{@link #STATISTICS_SCENE_FLICKER_NONE NONE}</li> 3581 * <li>{@link #STATISTICS_SCENE_FLICKER_50HZ 50HZ}</li> 3582 * <li>{@link #STATISTICS_SCENE_FLICKER_60HZ 60HZ}</li> 3583 * </ul></p> 3584 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3585 * <p><b>Full capability</b> - 3586 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3587 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3588 * 3589 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 3590 * @see CaptureRequest#CONTROL_AE_MODE 3591 * @see CaptureRequest#CONTROL_MODE 3592 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3593 * @see #STATISTICS_SCENE_FLICKER_NONE 3594 * @see #STATISTICS_SCENE_FLICKER_50HZ 3595 * @see #STATISTICS_SCENE_FLICKER_60HZ 3596 */ 3597 @PublicKey 3598 public static final Key<Integer> STATISTICS_SCENE_FLICKER = 3599 new Key<Integer>("android.statistics.sceneFlicker", int.class); 3600 3601 /** 3602 * <p>Operating mode for hot pixel map generation.</p> 3603 * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}. 3604 * If set to <code>false</code>, no hot pixel map will be returned.</p> 3605 * <p><b>Range of valid values:</b><br> 3606 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p> 3607 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3608 * 3609 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 3610 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES 3611 */ 3612 @PublicKey 3613 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE = 3614 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class); 3615 3616 /** 3617 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p> 3618 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and 3619 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and 3620 * bottom-right of the pixel array, respectively. The width and 3621 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}. 3622 * This may include hot pixels that lie outside of the active array 3623 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 3624 * <p><b>Range of valid values:</b><br></p> 3625 * <p>n <= number of pixels on the sensor. 3626 * The <code>(x, y)</code> coordinates must be bounded by 3627 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 3628 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3629 * 3630 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3631 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 3632 */ 3633 @PublicKey 3634 public static final Key<android.graphics.Point[]> STATISTICS_HOT_PIXEL_MAP = 3635 new Key<android.graphics.Point[]>("android.statistics.hotPixelMap", android.graphics.Point[].class); 3636 3637 /** 3638 * <p>Whether the camera device will output the lens 3639 * shading map in output result metadata.</p> 3640 * <p>When set to ON, 3641 * android.statistics.lensShadingMap will be provided in 3642 * the output result metadata.</p> 3643 * <p>ON is always supported on devices with the RAW capability.</p> 3644 * <p><b>Possible values:</b> 3645 * <ul> 3646 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li> 3647 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li> 3648 * </ul></p> 3649 * <p><b>Available values for this device:</b><br> 3650 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes}</p> 3651 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3652 * <p><b>Full capability</b> - 3653 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3654 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3655 * 3656 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3657 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES 3658 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF 3659 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON 3660 */ 3661 @PublicKey 3662 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE = 3663 new Key<Integer>("android.statistics.lensShadingMapMode", int.class); 3664 3665 /** 3666 * <p>Tonemapping / contrast / gamma curve for the blue 3667 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3668 * CONTRAST_CURVE.</p> 3669 * <p>See android.tonemap.curveRed for more details.</p> 3670 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3671 * <p><b>Full capability</b> - 3672 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3673 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3674 * 3675 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3676 * @see CaptureRequest#TONEMAP_MODE 3677 * @hide 3678 */ 3679 public static final Key<float[]> TONEMAP_CURVE_BLUE = 3680 new Key<float[]>("android.tonemap.curveBlue", float[].class); 3681 3682 /** 3683 * <p>Tonemapping / contrast / gamma curve for the green 3684 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3685 * CONTRAST_CURVE.</p> 3686 * <p>See android.tonemap.curveRed for more details.</p> 3687 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3688 * <p><b>Full capability</b> - 3689 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3690 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3691 * 3692 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3693 * @see CaptureRequest#TONEMAP_MODE 3694 * @hide 3695 */ 3696 public static final Key<float[]> TONEMAP_CURVE_GREEN = 3697 new Key<float[]>("android.tonemap.curveGreen", float[].class); 3698 3699 /** 3700 * <p>Tonemapping / contrast / gamma curve for the red 3701 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3702 * CONTRAST_CURVE.</p> 3703 * <p>Each channel's curve is defined by an array of control points:</p> 3704 * <pre><code>android.tonemap.curveRed = 3705 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 3706 * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 3707 * <p>These are sorted in order of increasing <code>Pin</code>; it is 3708 * required that input values 0.0 and 1.0 are included in the list to 3709 * define a complete mapping. For input values between control points, 3710 * the camera device must linearly interpolate between the control 3711 * points.</p> 3712 * <p>Each curve can have an independent number of points, and the number 3713 * of points can be less than max (that is, the request doesn't have to 3714 * always provide a curve with number of points equivalent to 3715 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 3716 * <p>A few examples, and their corresponding graphical mappings; these 3717 * only specify the red channel and the precision is limited to 4 3718 * digits, for conciseness.</p> 3719 * <p>Linear mapping:</p> 3720 * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] 3721 * </code></pre> 3722 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 3723 * <p>Invert mapping:</p> 3724 * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] 3725 * </code></pre> 3726 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 3727 * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 3728 * <pre><code>android.tonemap.curveRed = [ 3729 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 3730 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 3731 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 3732 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 3733 * </code></pre> 3734 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 3735 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 3736 * <pre><code>android.tonemap.curveRed = [ 3737 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 3738 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 3739 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 3740 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 3741 * </code></pre> 3742 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 3743 * <p><b>Range of valid values:</b><br> 3744 * 0-1 on both input and output coordinates, normalized 3745 * as a floating-point value such that 0 == black and 1 == white.</p> 3746 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3747 * <p><b>Full capability</b> - 3748 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3749 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3750 * 3751 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3752 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 3753 * @see CaptureRequest#TONEMAP_MODE 3754 * @hide 3755 */ 3756 public static final Key<float[]> TONEMAP_CURVE_RED = 3757 new Key<float[]>("android.tonemap.curveRed", float[].class); 3758 3759 /** 3760 * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} 3761 * is CONTRAST_CURVE.</p> 3762 * <p>The tonemapCurve consist of three curves for each of red, green, and blue 3763 * channels respectively. The following example uses the red channel as an 3764 * example. The same logic applies to green and blue channel. 3765 * Each channel's curve is defined by an array of control points:</p> 3766 * <pre><code>curveRed = 3767 * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] 3768 * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 3769 * <p>These are sorted in order of increasing <code>Pin</code>; it is always 3770 * guaranteed that input values 0.0 and 1.0 are included in the list to 3771 * define a complete mapping. For input values between control points, 3772 * the camera device must linearly interpolate between the control 3773 * points.</p> 3774 * <p>Each curve can have an independent number of points, and the number 3775 * of points can be less than max (that is, the request doesn't have to 3776 * always provide a curve with number of points equivalent to 3777 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 3778 * <p>A few examples, and their corresponding graphical mappings; these 3779 * only specify the red channel and the precision is limited to 4 3780 * digits, for conciseness.</p> 3781 * <p>Linear mapping:</p> 3782 * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ] 3783 * </code></pre> 3784 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 3785 * <p>Invert mapping:</p> 3786 * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ] 3787 * </code></pre> 3788 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 3789 * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 3790 * <pre><code>curveRed = [ 3791 * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), 3792 * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), 3793 * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), 3794 * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] 3795 * </code></pre> 3796 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 3797 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 3798 * <pre><code>curveRed = [ 3799 * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), 3800 * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), 3801 * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), 3802 * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] 3803 * </code></pre> 3804 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 3805 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3806 * <p><b>Full capability</b> - 3807 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3808 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3809 * 3810 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3811 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 3812 * @see CaptureRequest#TONEMAP_MODE 3813 */ 3814 @PublicKey 3815 @SyntheticKey 3816 public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE = 3817 new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class); 3818 3819 /** 3820 * <p>High-level global contrast/gamma/tonemapping control.</p> 3821 * <p>When switching to an application-defined contrast curve by setting 3822 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined 3823 * per-channel with a set of <code>(in, out)</code> points that specify the 3824 * mapping from input high-bit-depth pixel value to the output 3825 * low-bit-depth value. Since the actual pixel ranges of both input 3826 * and output may change depending on the camera pipeline, the values 3827 * are specified by normalized floating-point numbers.</p> 3828 * <p>More-complex color mapping operations such as 3D color look-up 3829 * tables, selective chroma enhancement, or other non-linear color 3830 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3831 * CONTRAST_CURVE.</p> 3832 * <p>When using either FAST or HIGH_QUALITY, the camera device will 3833 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}. 3834 * These values are always available, and as close as possible to the 3835 * actually used nonlinear/nonglobal transforms.</p> 3836 * <p>If a request is sent with CONTRAST_CURVE with the camera device's 3837 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 3838 * roughly the same.</p> 3839 * <p><b>Possible values:</b> 3840 * <ul> 3841 * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li> 3842 * <li>{@link #TONEMAP_MODE_FAST FAST}</li> 3843 * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 3844 * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li> 3845 * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li> 3846 * </ul></p> 3847 * <p><b>Available values for this device:</b><br> 3848 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p> 3849 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3850 * <p><b>Full capability</b> - 3851 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3852 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3853 * 3854 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3855 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES 3856 * @see CaptureRequest#TONEMAP_CURVE 3857 * @see CaptureRequest#TONEMAP_MODE 3858 * @see #TONEMAP_MODE_CONTRAST_CURVE 3859 * @see #TONEMAP_MODE_FAST 3860 * @see #TONEMAP_MODE_HIGH_QUALITY 3861 * @see #TONEMAP_MODE_GAMMA_VALUE 3862 * @see #TONEMAP_MODE_PRESET_CURVE 3863 */ 3864 @PublicKey 3865 public static final Key<Integer> TONEMAP_MODE = 3866 new Key<Integer>("android.tonemap.mode", int.class); 3867 3868 /** 3869 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3870 * GAMMA_VALUE</p> 3871 * <p>The tonemap curve will be defined the following formula: 3872 * * OUT = pow(IN, 1.0 / gamma) 3873 * where IN and OUT is the input pixel value scaled to range [0.0, 1.0], 3874 * pow is the power function and gamma is the gamma value specified by this 3875 * key.</p> 3876 * <p>The same curve will be applied to all color channels. The camera device 3877 * may clip the input gamma value to its supported range. The actual applied 3878 * value will be returned in capture result.</p> 3879 * <p>The valid range of gamma value varies on different devices, but values 3880 * within [1.0, 5.0] are guaranteed not to be clipped.</p> 3881 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3882 * 3883 * @see CaptureRequest#TONEMAP_MODE 3884 */ 3885 @PublicKey 3886 public static final Key<Float> TONEMAP_GAMMA = 3887 new Key<Float>("android.tonemap.gamma", float.class); 3888 3889 /** 3890 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 3891 * PRESET_CURVE</p> 3892 * <p>The tonemap curve will be defined by specified standard.</p> 3893 * <p>sRGB (approximated by 16 control points):</p> 3894 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 3895 * <p>Rec. 709 (approximated by 16 control points):</p> 3896 * <p><img alt="Rec. 709 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p> 3897 * <p>Note that above figures show a 16 control points approximation of preset 3898 * curves. Camera devices may apply a different approximation to the curve.</p> 3899 * <p><b>Possible values:</b> 3900 * <ul> 3901 * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li> 3902 * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li> 3903 * </ul></p> 3904 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3905 * 3906 * @see CaptureRequest#TONEMAP_MODE 3907 * @see #TONEMAP_PRESET_CURVE_SRGB 3908 * @see #TONEMAP_PRESET_CURVE_REC709 3909 */ 3910 @PublicKey 3911 public static final Key<Integer> TONEMAP_PRESET_CURVE = 3912 new Key<Integer>("android.tonemap.presetCurve", int.class); 3913 3914 /** 3915 * <p>This LED is nominally used to indicate to the user 3916 * that the camera is powered on and may be streaming images back to the 3917 * Application Processor. In certain rare circumstances, the OS may 3918 * disable this when video is processed locally and not transmitted to 3919 * any untrusted applications.</p> 3920 * <p>In particular, the LED <em>must</em> always be on when the data could be 3921 * transmitted off the device. The LED <em>should</em> always be on whenever 3922 * data is stored locally on the device.</p> 3923 * <p>The LED <em>may</em> be off if a trusted application is using the data that 3924 * doesn't violate the above rules.</p> 3925 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3926 * @hide 3927 */ 3928 public static final Key<Boolean> LED_TRANSMIT = 3929 new Key<Boolean>("android.led.transmit", boolean.class); 3930 3931 /** 3932 * <p>Whether black-level compensation is locked 3933 * to its current values, or is free to vary.</p> 3934 * <p>Whether the black level offset was locked for this frame. Should be 3935 * ON if {@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock} was ON in the capture request, unless 3936 * a change in other capture settings forced the camera device to 3937 * perform a black level reset.</p> 3938 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 3939 * <p><b>Full capability</b> - 3940 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3941 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3942 * 3943 * @see CaptureRequest#BLACK_LEVEL_LOCK 3944 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3945 */ 3946 @PublicKey 3947 public static final Key<Boolean> BLACK_LEVEL_LOCK = 3948 new Key<Boolean>("android.blackLevel.lock", boolean.class); 3949 3950 /** 3951 * <p>The frame number corresponding to the last request 3952 * with which the output result (metadata + buffers) has been fully 3953 * synchronized.</p> 3954 * <p>When a request is submitted to the camera device, there is usually a 3955 * delay of several frames before the controls get applied. A camera 3956 * device may either choose to account for this delay by implementing a 3957 * pipeline and carefully submit well-timed atomic control updates, or 3958 * it may start streaming control changes that span over several frame 3959 * boundaries.</p> 3960 * <p>In the latter case, whenever a request's settings change relative to 3961 * the previous submitted request, the full set of changes may take 3962 * multiple frame durations to fully take effect. Some settings may 3963 * take effect sooner (in less frame durations) than others.</p> 3964 * <p>While a set of control changes are being propagated, this value 3965 * will be CONVERGING.</p> 3966 * <p>Once it is fully known that a set of control changes have been 3967 * finished propagating, and the resulting updated control settings 3968 * have been read back by the camera device, this value will be set 3969 * to a non-negative frame number (corresponding to the request to 3970 * which the results have synchronized to).</p> 3971 * <p>Older camera device implementations may not have a way to detect 3972 * when all camera controls have been applied, and will always set this 3973 * value to UNKNOWN.</p> 3974 * <p>FULL capability devices will always have this value set to the 3975 * frame number of the request corresponding to this result.</p> 3976 * <p><em>Further details</em>:</p> 3977 * <ul> 3978 * <li>Whenever a request differs from the last request, any future 3979 * results not yet returned may have this value set to CONVERGING (this 3980 * could include any in-progress captures not yet returned by the camera 3981 * device, for more details see pipeline considerations below).</li> 3982 * <li>Submitting a series of multiple requests that differ from the 3983 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3) 3984 * moves the new synchronization frame to the last non-repeating 3985 * request (using the smallest frame number from the contiguous list of 3986 * repeating requests).</li> 3987 * <li>Submitting the same request repeatedly will not change this value 3988 * to CONVERGING, if it was already a non-negative value.</li> 3989 * <li>When this value changes to non-negative, that means that all of the 3990 * metadata controls from the request have been applied, all of the 3991 * metadata controls from the camera device have been read to the 3992 * updated values (into the result), and all of the graphics buffers 3993 * corresponding to this result are also synchronized to the request.</li> 3994 * </ul> 3995 * <p><em>Pipeline considerations</em>:</p> 3996 * <p>Submitting a request with updated controls relative to the previously 3997 * submitted requests may also invalidate the synchronization state 3998 * of all the results corresponding to currently in-flight requests.</p> 3999 * <p>In other words, results for this current request and up to 4000 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their 4001 * android.sync.frameNumber change to CONVERGING.</p> 4002 * <p><b>Possible values:</b> 4003 * <ul> 4004 * <li>{@link #SYNC_FRAME_NUMBER_CONVERGING CONVERGING}</li> 4005 * <li>{@link #SYNC_FRAME_NUMBER_UNKNOWN UNKNOWN}</li> 4006 * </ul></p> 4007 * <p><b>Available values for this device:</b><br> 4008 * Either a non-negative value corresponding to a 4009 * <code>frame_number</code>, or one of the two enums (CONVERGING / UNKNOWN).</p> 4010 * <p>This key is available on all devices.</p> 4011 * 4012 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH 4013 * @see #SYNC_FRAME_NUMBER_CONVERGING 4014 * @see #SYNC_FRAME_NUMBER_UNKNOWN 4015 * @hide 4016 */ 4017 public static final Key<Long> SYNC_FRAME_NUMBER = 4018 new Key<Long>("android.sync.frameNumber", long.class); 4019 4020 /** 4021 * <p>The amount of exposure time increase factor applied to the original output 4022 * frame by the application processing before sending for reprocessing.</p> 4023 * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING 4024 * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p> 4025 * <p>For some YUV reprocessing use cases, the application may choose to filter the original 4026 * output frames to effectively reduce the noise to the same level as a frame that was 4027 * captured with longer exposure time. To be more specific, assuming the original captured 4028 * images were captured with a sensitivity of S and an exposure time of T, the model in 4029 * the camera device is that the amount of noise in the image would be approximately what 4030 * would be expected if the original capture parameters had been a sensitivity of 4031 * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather 4032 * than S and T respectively. If the captured images were processed by the application 4033 * before being sent for reprocessing, then the application may have used image processing 4034 * algorithms and/or multi-frame image fusion to reduce the noise in the 4035 * application-processed images (input images). By using the effectiveExposureFactor 4036 * control, the application can communicate to the camera device the actual noise level 4037 * improvement in the application-processed image. With this information, the camera 4038 * device can select appropriate noise reduction and edge enhancement parameters to avoid 4039 * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge 4040 * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p> 4041 * <p>For example, for multi-frame image fusion use case, the application may fuse 4042 * multiple output frames together to a final frame for reprocessing. When N image are 4043 * fused into 1 image for reprocessing, the exposure time increase factor could be up to 4044 * square root of N (based on a simple photon shot noise model). The camera device will 4045 * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to 4046 * produce the best quality images.</p> 4047 * <p>This is relative factor, 1.0 indicates the application hasn't processed the input 4048 * buffer in a way that affects its effective exposure time.</p> 4049 * <p>This control is only effective for YUV reprocessing capture request. For noise 4050 * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>. 4051 * Similarly, for edge enhancement reprocessing, it is only effective when 4052 * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p> 4053 * <p><b>Units</b>: Relative exposure time increase factor.</p> 4054 * <p><b>Range of valid values:</b><br> 4055 * >= 1.0</p> 4056 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 4057 * <p><b>Limited capability</b> - 4058 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 4059 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4060 * 4061 * @see CaptureRequest#EDGE_MODE 4062 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4063 * @see CaptureRequest#NOISE_REDUCTION_MODE 4064 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 4065 */ 4066 @PublicKey 4067 public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 4068 new Key<Float>("android.reprocess.effectiveExposureFactor", float.class); 4069 4070 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 4071 * End generated code 4072 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 4073 4074 4075 4076} 4077