Home | History | Annotate | Download | only in camera
      1 <html devsite>
      2   <head>
      3     <title>Metadata and Controls</title>
      4     <meta name="project_path" value="/_project.yaml" />
      5     <meta name="book_path" value="/_book.yaml" />
      6   </head>
      7   <body>
      8   <!--
      9       Copyright 2017 The Android Open Source Project
     10 
     11       Licensed under the Apache License, Version 2.0 (the "License");
     12       you may not use this file except in compliance with the License.
     13       You may obtain a copy of the License at
     14 
     15           http://www.apache.org/licenses/LICENSE-2.0
     16 
     17       Unless required by applicable law or agreed to in writing, software
     18       distributed under the License is distributed on an "AS IS" BASIS,
     19       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     20       See the License for the specific language governing permissions and
     21       limitations under the License.
     22   -->
     23 
     24 
     25 
     26 <h2 id="metadata">Metadata support</h2>
     27 <p> To support the saving of raw image files by the Android framework, substantial 
     28   metadata is required about the sensor's characteristics. This includes 
     29   information such as color spaces and lens shading functions.</p>
     30 <p>Most of this information is a static property of the camera subsystem and can 
     31   therefore be queried before configuring any output pipelines or submitting any 
     32   requests. The new camera APIs greatly expand the information provided by the 
     33   getCameraInfo() method to provide this information to the application.</p>
     34 <p>In addition, manual control of the camera subsystem requires feedback from the 
     35   assorted devices about their current state, and the actual parameters used in 
     36   capturing a given frame. The actual values of the controls (exposure time, frame 
     37   duration, and sensitivity) as actually used by the hardware must be included in 
     38   the output metadata. This is essential so that applications know when either 
     39   clamping or rounding took place, and so that the application can compensate for 
     40   the real settings used for image capture.</p>
     41 <p>For example, if an application sets frame duration to 0 in a request, the HAL 
     42   must clamp the frame duration to the real minimum frame duration for that 
     43   request, and report that clamped minimum duration in the output result metadata.</p>
     44 <p>So if an application needs to implement a custom 3A routine (for example, to 
     45   properly meter for an HDR burst), it needs to know the settings used to capture 
     46   the latest set of results it has received in order to update the settings for 
     47   the next request. Therefore, the new camera API adds a substantial amount of 
     48   dynamic metadata to each captured frame. This includes the requested and actual 
     49   parameters used for the capture, as well as additional per-frame metadata such 
     50   as timestamps and statistics generator output.</p>
     51 <h2 id="per-setting">Per-setting control</h2>
     52 <p> For most settings, the expectation is that they can be changed every frame, 
     53   without introducing significant stutter or delay to the output frame stream. 
     54   Ideally, the output frame rate should solely be controlled by the capture 
     55   request's frame duration field, and be independent of any changes to processing 
     56   blocks' configuration.  In reality, some specific controls are known to be slow 
     57   to change; these include the output resolution and output format of the camera 
     58   pipeline, as well as controls that affect physical devices, such as lens focus 
     59   distance. The exact requirements for each control set are detailed later.</p>
     60 <h2 id="raw-sensor">Raw sensor data support</h2>
     61 <p>In addition to the pixel formats supported by 
     62   the old API, the new API adds a requirement for support for raw sensor data 
     63   (Bayer RAW), both for advanced camera applications as well as to support raw
     64   image files.</p>
     65 
     66   </body>
     67 </html>
     68