OSDN Git Service

Camera: Update lensShadingMap documentation and visibility
authorEino-Ville Talvala <etalvala@google.com>
Thu, 2 Jun 2016 21:15:56 +0000 (14:15 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Thu, 2 Jun 2016 21:48:10 +0000 (14:48 -0700)
Revert added language about shading map being the full flat-field
correction; it's actually the same correction as applied to
camera device-processed data.

Remove the Java lens shading map key from the NDK, since it's a
duplicate of the underlying native key already in NDK.

Also fix a few other wording issues in the lens shading documentation.

Bug: 18175853
Change-Id: I227707671914eb17b0a0dd14655ea732aae2a6b7

camera/docs/docs.html
camera/docs/metadata_properties.xml
camera/docs/ndk_metadata_properties.xml
camera/include/system/camera_metadata_tags.h

index 7bb6181..bacc566 100644 (file)
@@ -23507,7 +23507,7 @@ generation</p>
             <td class="entry_type">
                 <span class="entry_type_name">byte</span>
 
-              <span class="entry_type_visibility"> [public as lensShadingMap]</span>
+              <span class="entry_type_visibility"> [java_public as lensShadingMap]</span>
 
 
               <span class="entry_type_hwlevel">[full] </span>
@@ -23539,10 +23539,21 @@ Bayer color channel.<wbr/></p>
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="5">
-              <p>The least shaded section of the image should have a gain factor
-of 1; all other sections should have gains above 1.<wbr/></p>
+              <p>The map provided here is the same map that is used by the camera device to
+correct both color shading and vignetting for output non-RAW images.<wbr/></p>
+<p>When there is no lens shading correction applied to RAW
+output images (<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a> <code>==</code>
+false),<wbr/> this map is the complete lens shading correction
+map; when there is some lens shading correction applied to
+the RAW output image (<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a><code>==</code> true),<wbr/> this map reports the remaining lens shading
+correction map that needs to be applied to get shading
+corrected images that match the camera device's output for
+non-RAW formats.<wbr/></p>
+<p>For a complete shading correction map,<wbr/> the least shaded
+section of the image will have a gain factor of 1; all
+other sections will have gains above 1.<wbr/></p>
 <p>When <a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> = TRANSFORM_<wbr/>MATRIX,<wbr/> the map
-must take into account the colorCorrection settings.<wbr/></p>
+will take into account the colorCorrection settings.<wbr/></p>
 <p>The shading map is for the entire active pixel array,<wbr/> and is not
 affected by the crop region specified in the request.<wbr/> Each shading map
 entry is the value of the shading compensation map over a specific
@@ -23554,8 +23565,8 @@ The map is assumed to be bilinearly interpolated between the sample points.<wbr/
 <p>The channel order is [R,<wbr/> Geven,<wbr/> Godd,<wbr/> B],<wbr/> where Geven is the green
 channel for the even rows of a Bayer pattern,<wbr/> and Godd is the odd rows.<wbr/>
 The shading map is stored in a fully interleaved format.<wbr/></p>
-<p>The shading map should have on the order of 30-40 rows and columns,<wbr/>
-and must be smaller than 64x64.<wbr/></p>
+<p>The shading map will generally have on the order of 30-40 rows and columns,<wbr/>
+and will be smaller than 64x64.<wbr/></p>
 <p>As an example,<wbr/> given a very small map defined as:</p>
 <pre><code>width,<wbr/>height = [ 4,<wbr/> 3 ]
 values =
@@ -23628,20 +23639,21 @@ for each Bayer color channel of RAW image data.<wbr/></p>
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="5">
-              <p>The lens shading correction is defined as a full shading correction that
-corrects both color shading for the output non-RAW images.<wbr/> After the
-shading map is applied,<wbr/> the output non-RAW images will be flat-field images
-for flat scenes under uniform illumination.<wbr/></p>
-<p>When there is no lens shading correction applied to RAW output images
-(<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a> <code>==</code> false),<wbr/> this map is a full lens
-shading correction map; when there is some lens shading correction applied
-to the RAW output image (<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a> <code>==</code> true),<wbr/>
-this map reports the remaining lens shading correction map that needs to be
-applied to get fully shading corrected images.<wbr/></p>
-<p>For a full shading correction map,<wbr/> the least shaded section of the image
-should have a gain factor of 1; all other sections should have gains above 1.<wbr/></p>
+              <p>The map provided here is the same map that is used by the camera device to
+correct both color shading and vignetting for output non-RAW images.<wbr/></p>
+<p>When there is no lens shading correction applied to RAW
+output images (<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a> <code>==</code>
+false),<wbr/> this map is the complete lens shading correction
+map; when there is some lens shading correction applied to
+the RAW output image (<a href="#static_android.sensor.info.lensShadingApplied">android.<wbr/>sensor.<wbr/>info.<wbr/>lens<wbr/>Shading<wbr/>Applied</a><code>==</code> true),<wbr/> this map reports the remaining lens shading
+correction map that needs to be applied to get shading
+corrected images that match the camera device's output for
+non-RAW formats.<wbr/></p>
+<p>For a complete shading correction map,<wbr/> the least shaded
+section of the image will have a gain factor of 1; all
+other sections will have gains above 1.<wbr/></p>
 <p>When <a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a> = TRANSFORM_<wbr/>MATRIX,<wbr/> the map
-must take into account the colorCorrection settings.<wbr/></p>
+will take into account the colorCorrection settings.<wbr/></p>
 <p>The shading map is for the entire active pixel array,<wbr/> and is not
 affected by the crop region specified in the request.<wbr/> Each shading map
 entry is the value of the shading compensation map over a specific
@@ -23654,8 +23666,8 @@ The map is assumed to be bilinearly interpolated between the sample points.<wbr/
 channel for the even rows of a Bayer pattern,<wbr/> and Godd is the odd rows.<wbr/>
 The shading map is stored in a fully interleaved format,<wbr/> and its size
 is provided in the camera static metadata by <a href="#static_android.lens.info.shadingMapSize">android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size</a>.<wbr/></p>
-<p>The shading map should have on the order of 30-40 rows and columns,<wbr/>
-and must be smaller than 64x64.<wbr/></p>
+<p>The shading map will generally have on the order of 30-40 rows and columns,<wbr/>
+and will be smaller than 64x64.<wbr/></p>
 <p>As an example,<wbr/> given a very small map defined as:</p>
 <pre><code><a href="#static_android.lens.info.shadingMapSize">android.<wbr/>lens.<wbr/>info.<wbr/>shading<wbr/>Map<wbr/>Size</a> = [ 4,<wbr/> 3 ]
 <a href="#dynamic_android.statistics.lensShadingMap">android.<wbr/>statistics.<wbr/>lens<wbr/>Shading<wbr/>Map</a> =
index 8071bec..e7f4a5b 100644 (file)
@@ -7618,17 +7618,32 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </entry>
         <clone entry="android.statistics.sharpnessMapMode"
                kind="controls"></clone>
-        <entry name="lensShadingCorrectionMap" type="byte" visibility="public"
+        <entry name="lensShadingCorrectionMap" type="byte" visibility="java_public"
                typedef="lensShadingMap" hwlevel="full">
           <description>The shading map is a low-resolution floating-point map
           that lists the coefficients used to correct for vignetting, for each
           Bayer color channel.</description>
           <range>Each gain factor is &amp;gt;= 1</range>
-          <details>The least shaded section of the image should have a gain factor
-          of 1; all other sections should have gains above 1.
+          <details>
+          The map provided here is the same map that is used by the camera device to
+          correct both color shading and vignetting for output non-RAW images.
+
+          When there is no lens shading correction applied to RAW
+          output images (android.sensor.info.lensShadingApplied `==`
+          false), this map is the complete lens shading correction
+          map; when there is some lens shading correction applied to
+          the RAW output image (android.sensor.info.lensShadingApplied
+          `==` true), this map reports the remaining lens shading
+          correction map that needs to be applied to get shading
+          corrected images that match the camera device's output for
+          non-RAW formats.
+
+          For a complete shading correction map, the least shaded
+          section of the image will have a gain factor of 1; all
+          other sections will have gains above 1.
 
           When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
-          must take into account the colorCorrection settings.
+          will take into account the colorCorrection settings.
 
           The shading map is for the entire active pixel array, and is not
           affected by the crop region specified in the request. Each shading map
@@ -7643,8 +7658,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           channel for the even rows of a Bayer pattern, and Godd is the odd rows.
           The shading map is stored in a fully interleaved format.
 
-          The shading map should have on the order of 30-40 rows and columns,
-          and must be smaller than 64x64.
+          The shading map will generally have on the order of 30-40 rows and columns,
+          and will be smaller than 64x64.
 
           As an example, given a very small map defined as:
 
@@ -7684,23 +7699,25 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           for each Bayer color channel of RAW image data.</description>
           <range>Each gain factor is &amp;gt;= 1</range>
           <details>
-          The lens shading correction is defined as a full shading correction that
-          corrects both color shading for the output non-RAW images. After the
-          shading map is applied, the output non-RAW images will be flat-field images
-          for flat scenes under uniform illumination.
+          The map provided here is the same map that is used by the camera device to
+          correct both color shading and vignetting for output non-RAW images.
 
-          When there is no lens shading correction applied to RAW output images
-          (android.sensor.info.lensShadingApplied `==` false), this map is a full lens
-          shading correction map; when there is some lens shading correction applied
-          to the RAW output image (android.sensor.info.lensShadingApplied `==` true),
-          this map reports the remaining lens shading correction map that needs to be
-          applied to get fully shading corrected images.
+          When there is no lens shading correction applied to RAW
+          output images (android.sensor.info.lensShadingApplied `==`
+          false), this map is the complete lens shading correction
+          map; when there is some lens shading correction applied to
+          the RAW output image (android.sensor.info.lensShadingApplied
+          `==` true), this map reports the remaining lens shading
+          correction map that needs to be applied to get shading
+          corrected images that match the camera device's output for
+          non-RAW formats.
 
-          For a full shading correction map, the least shaded section of the image
-          should have a gain factor of 1; all other sections should have gains above 1.
+          For a complete shading correction map, the least shaded
+          section of the image will have a gain factor of 1; all
+          other sections will have gains above 1.
 
           When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
-          must take into account the colorCorrection settings.
+          will take into account the colorCorrection settings.
 
           The shading map is for the entire active pixel array, and is not
           affected by the crop region specified in the request. Each shading map
@@ -7716,8 +7733,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           The shading map is stored in a fully interleaved format, and its size
           is provided in the camera static metadata by android.lens.info.shadingMapSize.
 
-          The shading map should have on the order of 30-40 rows and columns,
-          and must be smaller than 64x64.
+          The shading map will generally have on the order of 30-40 rows and columns,
+          and will be smaller than 64x64.
 
           As an example, given a very small map defined as:
 
index c56732e..a424c3d 100644 (file)
@@ -7628,17 +7628,32 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </entry>
         <clone entry="android.statistics.sharpnessMapMode"
                kind="controls"></clone>
-        <entry name="lensShadingCorrectionMap" type="byte" visibility="public"
+        <entry name="lensShadingCorrectionMap" type="byte" visibility="java_public"
                typedef="lensShadingMap" hwlevel="full">
           <description>The shading map is a low-resolution floating-point map
           that lists the coefficients used to correct for vignetting, for each
           Bayer color channel.</description>
           <range>Each gain factor is &amp;gt;= 1</range>
-          <details>The least shaded section of the image should have a gain factor
-          of 1; all other sections should have gains above 1.
+          <details>
+          The map provided here is the same map that is used by the camera device to
+          correct both color shading and vignetting for output non-RAW images.
+
+          When there is no lens shading correction applied to RAW
+          output images (android.sensor.info.lensShadingApplied `==`
+          false), this map is the complete lens shading correction
+          map; when there is some lens shading correction applied to
+          the RAW output image (android.sensor.info.lensShadingApplied
+          `==` true), this map reports the remaining lens shading
+          correction map that needs to be applied to get shading
+          corrected images that match the camera device's output for
+          non-RAW formats.
+
+          For a complete shading correction map, the least shaded
+          section of the image will have a gain factor of 1; all
+          other sections will have gains above 1.
 
           When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
-          must take into account the colorCorrection settings.
+          will take into account the colorCorrection settings.
 
           The shading map is for the entire active pixel array, and is not
           affected by the crop region specified in the request. Each shading map
@@ -7653,8 +7668,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           channel for the even rows of a Bayer pattern, and Godd is the odd rows.
           The shading map is stored in a fully interleaved format.
 
-          The shading map should have on the order of 30-40 rows and columns,
-          and must be smaller than 64x64.
+          The shading map will generally have on the order of 30-40 rows and columns,
+          and will be smaller than 64x64.
 
           As an example, given a very small map defined as:
 
@@ -7694,23 +7709,25 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           for each Bayer color channel of RAW image data.</description>
           <range>Each gain factor is &amp;gt;= 1</range>
           <details>
-          The lens shading correction is defined as a full shading correction that
-          corrects both color shading for the output non-RAW images. After the
-          shading map is applied, the output non-RAW images will be flat-field images
-          for flat scenes under uniform illumination.
+          The map provided here is the same map that is used by the camera device to
+          correct both color shading and vignetting for output non-RAW images.
 
-          When there is no lens shading correction applied to RAW output images
-          (android.sensor.info.lensShadingApplied `==` false), this map is a full lens
-          shading correction map; when there is some lens shading correction applied
-          to the RAW output image (android.sensor.info.lensShadingApplied `==` true),
-          this map reports the remaining lens shading correction map that needs to be
-          applied to get fully shading corrected images.
+          When there is no lens shading correction applied to RAW
+          output images (android.sensor.info.lensShadingApplied `==`
+          false), this map is the complete lens shading correction
+          map; when there is some lens shading correction applied to
+          the RAW output image (android.sensor.info.lensShadingApplied
+          `==` true), this map reports the remaining lens shading
+          correction map that needs to be applied to get shading
+          corrected images that match the camera device's output for
+          non-RAW formats.
 
-          For a full shading correction map, the least shaded section of the image
-          should have a gain factor of 1; all other sections should have gains above 1.
+          For a complete shading correction map, the least shaded
+          section of the image will have a gain factor of 1; all
+          other sections will have gains above 1.
 
           When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
-          must take into account the colorCorrection settings.
+          will take into account the colorCorrection settings.
 
           The shading map is for the entire active pixel array, and is not
           affected by the crop region specified in the request. Each shading map
@@ -7726,8 +7743,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           The shading map is stored in a fully interleaved format, and its size
           is provided in the camera static metadata by android.lens.info.shadingMapSize.
 
-          The shading map should have on the order of 30-40 rows and columns,
-          and must be smaller than 64x64.
+          The shading map will generally have on the order of 30-40 rows and columns,
+          and will be smaller than 64x64.
 
           As an example, given a very small map defined as:
 
index 443af40..81dac87 100644 (file)
@@ -347,7 +347,7 @@ typedef enum camera_metadata_tag {
     ANDROID_STATISTICS_FACE_SCORES,                   // byte[]       | ndk_public
     ANDROID_STATISTICS_HISTOGRAM,                     // int32[]      | system
     ANDROID_STATISTICS_SHARPNESS_MAP,                 // int32[]      | system
-    ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP,   // byte         | public
+    ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP,   // byte         | java_public
     ANDROID_STATISTICS_LENS_SHADING_MAP,              // float[]      | ndk_public
     ANDROID_STATISTICS_PREDICTED_COLOR_GAINS,         // float[]      | hidden
     ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM,     // rational[]   | hidden