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