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