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