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