リビジョン | 36ed5ac08bb13cb8859153aa5344f985650c62a4 (tree) |
---|---|
日時 | 2018-08-06 12:15:18 |
作者 | android-build-team Robot <android-build-team-robot@goog...> |
コミッター | android-build-team Robot |
Snap for 4933870 from d9721660e46c111a59e9392f4de2636395ff6288 to pi-qpr1-release
Change-Id: Ie627865bacbeec1eed3b5eb3c4c0f9ed226b67bd
@@ -13685,7 +13685,9 @@ coordinate system,<wbr/> but not the origin.<wbr/></p> | ||
13685 | 13685 | <p>If this device is the largest or only camera device with a given facing,<wbr/> then this |
13686 | 13686 | position will be <code>(0,<wbr/> 0,<wbr/> 0)</code>; a camera device with a lens optical center located 3 cm |
13687 | 13687 | from the main sensor along the +X axis (to the right from the user's perspective) will |
13688 | -report <code>(0.<wbr/>03,<wbr/> 0,<wbr/> 0)</code>.<wbr/></p> | |
13688 | +report <code>(0.<wbr/>03,<wbr/> 0,<wbr/> 0)</code>.<wbr/> Note that this means that,<wbr/> for many computer vision | |
13689 | +applications,<wbr/> the position needs to be negated to convert it to a translation from the | |
13690 | +camera to the origin.<wbr/></p> | |
13689 | 13691 | <p>To transform a pixel coordinates between two cameras facing the same direction,<wbr/> first |
13690 | 13692 | the source camera <a href="#static_android.lens.distortion">android.<wbr/>lens.<wbr/>distortion</a> must be corrected for.<wbr/> Then the source |
13691 | 13693 | camera <a href="#static_android.lens.intrinsicCalibration">android.<wbr/>lens.<wbr/>intrinsic<wbr/>Calibration</a> needs to be applied,<wbr/> followed by the |
@@ -13697,7 +13699,8 @@ coordinates.<wbr/></p> | ||
13697 | 13699 | <p>To compare this against a real image from the destination camera,<wbr/> the destination camera |
13698 | 13700 | image then needs to be corrected for radial distortion before comparison or sampling.<wbr/></p> |
13699 | 13701 | <p>When <a href="#static_android.lens.poseReference">android.<wbr/>lens.<wbr/>pose<wbr/>Reference</a> is GYROSCOPE,<wbr/> then this position is relative to |
13700 | -the center of the primary gyroscope on the device.<wbr/></p> | |
13702 | +the center of the primary gyroscope on the device.<wbr/> The axis definitions are the same as | |
13703 | +with PRIMARY_<wbr/>CAMERA.<wbr/></p> | |
13701 | 13704 | </td> |
13702 | 13705 | </tr> |
13703 | 13706 |
@@ -13775,13 +13778,15 @@ being aligned with the lens plane.<wbr/></p> | ||
13775 | 13778 | </code></pre> |
13776 | 13779 | <p>which can then be combined with the camera pose rotation |
13777 | 13780 | <code>R</code> and translation <code>t</code> (<a href="#static_android.lens.poseRotation">android.<wbr/>lens.<wbr/>pose<wbr/>Rotation</a> and |
13778 | -<a href="#static_android.lens.poseTranslation">android.<wbr/>lens.<wbr/>pose<wbr/>Translation</a>,<wbr/> respective) to calculate the | |
13781 | +<a href="#static_android.lens.poseTranslation">android.<wbr/>lens.<wbr/>pose<wbr/>Translation</a>,<wbr/> respectively) to calculate the | |
13779 | 13782 | complete transform from world coordinates to pixel |
13780 | 13783 | coordinates:</p> |
13781 | -<pre><code>P = [ K 0 * [ R t | |
13782 | - 0 1 ] 0 1 ] | |
13784 | +<pre><code>P = [ K 0 * [ R -Rt | |
13785 | + 0 1 ] 0 1 ] | |
13783 | 13786 | </code></pre> |
13784 | -<p>and with <code>p_<wbr/>w</code> being a point in the world coordinate system | |
13787 | +<p>(Note the negation of poseTranslation when mapping from camera | |
13788 | +to world coordinates,<wbr/> and multiplication by the rotation).<wbr/></p> | |
13789 | +<p>With <code>p_<wbr/>w</code> being a point in the world coordinate system | |
13785 | 13790 | and <code>p_<wbr/>s</code> being a point in the camera active pixel array |
13786 | 13791 | coordinate system,<wbr/> and with the mapping including the |
13787 | 13792 | homogeneous division by z:</p> |
@@ -13803,6 +13808,13 @@ system (where <code>(0,<wbr/> 0)</code> is the top-left of the | ||
13803 | 13808 | activeArraySize rectangle),<wbr/> to determine the final pixel |
13804 | 13809 | coordinate of the world point for processed (non-RAW) |
13805 | 13810 | output buffers.<wbr/></p> |
13811 | +<p>For camera devices,<wbr/> the center of pixel <code>(x,<wbr/>y)</code> is located at | |
13812 | +coordinate <code>(x + 0.<wbr/>5,<wbr/> y + 0.<wbr/>5)</code>.<wbr/> So on a device with a | |
13813 | +precorrection active array of size <code>(10,<wbr/>10)</code>,<wbr/> the valid pixel | |
13814 | +indices go from <code>(0,<wbr/>0)-(9,<wbr/>9)</code>,<wbr/> and an perfectly-built camera would | |
13815 | +have an optical center at the exact center of the pixel grid,<wbr/> at | |
13816 | +coordinates <code>(5.<wbr/>0,<wbr/> 5.<wbr/>0)</code>,<wbr/> which is the top-left corner of pixel | |
13817 | +<code>(5,<wbr/>5)</code>.<wbr/></p> | |
13806 | 13818 | </td> |
13807 | 13819 | </tr> |
13808 | 13820 |
@@ -14702,7 +14714,9 @@ coordinate system,<wbr/> but not the origin.<wbr/></p> | ||
14702 | 14714 | <p>If this device is the largest or only camera device with a given facing,<wbr/> then this |
14703 | 14715 | position will be <code>(0,<wbr/> 0,<wbr/> 0)</code>; a camera device with a lens optical center located 3 cm |
14704 | 14716 | from the main sensor along the +X axis (to the right from the user's perspective) will |
14705 | -report <code>(0.<wbr/>03,<wbr/> 0,<wbr/> 0)</code>.<wbr/></p> | |
14717 | +report <code>(0.<wbr/>03,<wbr/> 0,<wbr/> 0)</code>.<wbr/> Note that this means that,<wbr/> for many computer vision | |
14718 | +applications,<wbr/> the position needs to be negated to convert it to a translation from the | |
14719 | +camera to the origin.<wbr/></p> | |
14706 | 14720 | <p>To transform a pixel coordinates between two cameras facing the same direction,<wbr/> first |
14707 | 14721 | the source camera <a href="#static_android.lens.distortion">android.<wbr/>lens.<wbr/>distortion</a> must be corrected for.<wbr/> Then the source |
14708 | 14722 | camera <a href="#static_android.lens.intrinsicCalibration">android.<wbr/>lens.<wbr/>intrinsic<wbr/>Calibration</a> needs to be applied,<wbr/> followed by the |
@@ -14714,7 +14728,8 @@ coordinates.<wbr/></p> | ||
14714 | 14728 | <p>To compare this against a real image from the destination camera,<wbr/> the destination camera |
14715 | 14729 | image then needs to be corrected for radial distortion before comparison or sampling.<wbr/></p> |
14716 | 14730 | <p>When <a href="#static_android.lens.poseReference">android.<wbr/>lens.<wbr/>pose<wbr/>Reference</a> is GYROSCOPE,<wbr/> then this position is relative to |
14717 | -the center of the primary gyroscope on the device.<wbr/></p> | |
14731 | +the center of the primary gyroscope on the device.<wbr/> The axis definitions are the same as | |
14732 | +with PRIMARY_<wbr/>CAMERA.<wbr/></p> | |
14718 | 14733 | </td> |
14719 | 14734 | </tr> |
14720 | 14735 |
@@ -14792,13 +14807,15 @@ being aligned with the lens plane.<wbr/></p> | ||
14792 | 14807 | </code></pre> |
14793 | 14808 | <p>which can then be combined with the camera pose rotation |
14794 | 14809 | <code>R</code> and translation <code>t</code> (<a href="#static_android.lens.poseRotation">android.<wbr/>lens.<wbr/>pose<wbr/>Rotation</a> and |
14795 | -<a href="#static_android.lens.poseTranslation">android.<wbr/>lens.<wbr/>pose<wbr/>Translation</a>,<wbr/> respective) to calculate the | |
14810 | +<a href="#static_android.lens.poseTranslation">android.<wbr/>lens.<wbr/>pose<wbr/>Translation</a>,<wbr/> respectively) to calculate the | |
14796 | 14811 | complete transform from world coordinates to pixel |
14797 | 14812 | coordinates:</p> |
14798 | -<pre><code>P = [ K 0 * [ R t | |
14799 | - 0 1 ] 0 1 ] | |
14813 | +<pre><code>P = [ K 0 * [ R -Rt | |
14814 | + 0 1 ] 0 1 ] | |
14800 | 14815 | </code></pre> |
14801 | -<p>and with <code>p_<wbr/>w</code> being a point in the world coordinate system | |
14816 | +<p>(Note the negation of poseTranslation when mapping from camera | |
14817 | +to world coordinates,<wbr/> and multiplication by the rotation).<wbr/></p> | |
14818 | +<p>With <code>p_<wbr/>w</code> being a point in the world coordinate system | |
14802 | 14819 | and <code>p_<wbr/>s</code> being a point in the camera active pixel array |
14803 | 14820 | coordinate system,<wbr/> and with the mapping including the |
14804 | 14821 | homogeneous division by z:</p> |
@@ -14820,6 +14837,13 @@ system (where <code>(0,<wbr/> 0)</code> is the top-left of the | ||
14820 | 14837 | activeArraySize rectangle),<wbr/> to determine the final pixel |
14821 | 14838 | coordinate of the world point for processed (non-RAW) |
14822 | 14839 | output buffers.<wbr/></p> |
14840 | +<p>For camera devices,<wbr/> the center of pixel <code>(x,<wbr/>y)</code> is located at | |
14841 | +coordinate <code>(x + 0.<wbr/>5,<wbr/> y + 0.<wbr/>5)</code>.<wbr/> So on a device with a | |
14842 | +precorrection active array of size <code>(10,<wbr/>10)</code>,<wbr/> the valid pixel | |
14843 | +indices go from <code>(0,<wbr/>0)-(9,<wbr/>9)</code>,<wbr/> and an perfectly-built camera would | |
14844 | +have an optical center at the exact center of the pixel grid,<wbr/> at | |
14845 | +coordinates <code>(5.<wbr/>0,<wbr/> 5.<wbr/>0)</code>,<wbr/> which is the top-left corner of pixel | |
14846 | +<code>(5,<wbr/>5)</code>.<wbr/></p> | |
14823 | 14847 | </td> |
14824 | 14848 | </tr> |
14825 | 14849 |
@@ -18257,7 +18281,7 @@ region.<wbr/> 16:9 streams will further crop vertically | ||
18257 | 18281 | outputs will crop horizontally (pillarbox),<wbr/> and 16:9 |
18258 | 18282 | streams will match exactly.<wbr/> These additional crops will |
18259 | 18283 | be centered within the crop region.<wbr/></p> |
18260 | -<p>If the coordinate system is android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Arrays<wbr/>Size,<wbr/> the width and height | |
18284 | +<p>If the coordinate system is <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>,<wbr/> the width and height | |
18261 | 18285 | of the crop region cannot be set to be smaller than |
18262 | 18286 | <code>floor( activeArraySize.<wbr/>width /<wbr/> <a href="#static_android.scaler.availableMaxDigitalZoom">android.<wbr/>scaler.<wbr/>available<wbr/>Max<wbr/>Digital<wbr/>Zoom</a> )</code> and |
18263 | 18287 | <code>floor( activeArraySize.<wbr/>height /<wbr/> <a href="#static_android.scaler.availableMaxDigitalZoom">android.<wbr/>scaler.<wbr/>available<wbr/>Max<wbr/>Digital<wbr/>Zoom</a> )</code>,<wbr/> respectively.<wbr/></p> |
@@ -19874,7 +19898,7 @@ region.<wbr/> 16:9 streams will further crop vertically | ||
19874 | 19898 | outputs will crop horizontally (pillarbox),<wbr/> and 16:9 |
19875 | 19899 | streams will match exactly.<wbr/> These additional crops will |
19876 | 19900 | be centered within the crop region.<wbr/></p> |
19877 | -<p>If the coordinate system is android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Arrays<wbr/>Size,<wbr/> the width and height | |
19901 | +<p>If the coordinate system is <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>,<wbr/> the width and height | |
19878 | 19902 | of the crop region cannot be set to be smaller than |
19879 | 19903 | <code>floor( activeArraySize.<wbr/>width /<wbr/> <a href="#static_android.scaler.availableMaxDigitalZoom">android.<wbr/>scaler.<wbr/>available<wbr/>Max<wbr/>Digital<wbr/>Zoom</a> )</code> and |
19880 | 19904 | <code>floor( activeArraySize.<wbr/>height /<wbr/> <a href="#static_android.scaler.availableMaxDigitalZoom">android.<wbr/>scaler.<wbr/>available<wbr/>Max<wbr/>Digital<wbr/>Zoom</a> )</code>,<wbr/> respectively.<wbr/></p> |
@@ -24522,7 +24546,7 @@ the output result metadata.<wbr/></p> | ||
24522 | 24546 | |
24523 | 24547 | <tr class="entry" id="controls_android.statistics.oisDataMode"> |
24524 | 24548 | <td class="entry_name |
24525 | - " rowspan="1"> | |
24549 | + " rowspan="3"> | |
24526 | 24550 | android.<wbr/>statistics.<wbr/>ois<wbr/>Data<wbr/>Mode |
24527 | 24551 | </td> |
24528 | 24552 | <td class="entry_type"> |
@@ -24548,8 +24572,8 @@ the output result metadata.<wbr/></p> | ||
24548 | 24572 | </td> <!-- entry_type --> |
24549 | 24573 | |
24550 | 24574 | <td class="entry_description"> |
24551 | - <p>A control for selecting whether OIS position information is included in output | |
24552 | -result metadata.<wbr/></p> | |
24575 | + <p>A control for selecting whether optical stabilization (OIS) position | |
24576 | +information is included in output result metadata.<wbr/></p> | |
24553 | 24577 | </td> |
24554 | 24578 | |
24555 | 24579 | <td class="entry_units"> |
@@ -24567,6 +24591,19 @@ result metadata.<wbr/></p> | ||
24567 | 24591 | </td> |
24568 | 24592 | |
24569 | 24593 | </tr> |
24594 | + <tr class="entries_header"> | |
24595 | + <th class="th_details" colspan="6">Details</th> | |
24596 | + </tr> | |
24597 | + <tr class="entry_cont"> | |
24598 | + <td class="entry_details" colspan="6"> | |
24599 | + <p>Since optical image stabilization generally involves motion much faster than the duration | |
24600 | +of individualq image exposure,<wbr/> multiple OIS samples can be included for a single capture | |
24601 | +result.<wbr/> For example,<wbr/> if the OIS reporting operates at 200 Hz,<wbr/> a typical camera operating | |
24602 | +at 30fps may have 6-7 OIS samples per capture result.<wbr/> This information can be combined | |
24603 | +with the rolling shutter skew to account for lens motion during image exposure in | |
24604 | +post-processing algorithms.<wbr/></p> | |
24605 | + </td> | |
24606 | + </tr> | |
24570 | 24607 | |
24571 | 24608 | |
24572 | 24609 | <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr> |
@@ -26422,7 +26459,7 @@ the output result metadata.<wbr/></p> | ||
26422 | 26459 | |
26423 | 26460 | <tr class="entry" id="dynamic_android.statistics.oisDataMode"> |
26424 | 26461 | <td class="entry_name |
26425 | - " rowspan="1"> | |
26462 | + " rowspan="3"> | |
26426 | 26463 | android.<wbr/>statistics.<wbr/>ois<wbr/>Data<wbr/>Mode |
26427 | 26464 | </td> |
26428 | 26465 | <td class="entry_type"> |
@@ -26448,8 +26485,8 @@ the output result metadata.<wbr/></p> | ||
26448 | 26485 | </td> <!-- entry_type --> |
26449 | 26486 | |
26450 | 26487 | <td class="entry_description"> |
26451 | - <p>A control for selecting whether OIS position information is included in output | |
26452 | -result metadata.<wbr/></p> | |
26488 | + <p>A control for selecting whether optical stabilization (OIS) position | |
26489 | +information is included in output result metadata.<wbr/></p> | |
26453 | 26490 | </td> |
26454 | 26491 | |
26455 | 26492 | <td class="entry_units"> |
@@ -26467,6 +26504,19 @@ result metadata.<wbr/></p> | ||
26467 | 26504 | </td> |
26468 | 26505 | |
26469 | 26506 | </tr> |
26507 | + <tr class="entries_header"> | |
26508 | + <th class="th_details" colspan="6">Details</th> | |
26509 | + </tr> | |
26510 | + <tr class="entry_cont"> | |
26511 | + <td class="entry_details" colspan="6"> | |
26512 | + <p>Since optical image stabilization generally involves motion much faster than the duration | |
26513 | +of individualq image exposure,<wbr/> multiple OIS samples can be included for a single capture | |
26514 | +result.<wbr/> For example,<wbr/> if the OIS reporting operates at 200 Hz,<wbr/> a typical camera operating | |
26515 | +at 30fps may have 6-7 OIS samples per capture result.<wbr/> This information can be combined | |
26516 | +with the rolling shutter skew to account for lens motion during image exposure in | |
26517 | +post-processing algorithms.<wbr/></p> | |
26518 | + </td> | |
26519 | + </tr> | |
26470 | 26520 | |
26471 | 26521 | |
26472 | 26522 | <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr> |
@@ -26574,11 +26624,15 @@ timebase as and comparable to <a href="#dynamic_android.sensor.timestamp">androi | ||
26574 | 26624 | <tr class="entry_cont"> |
26575 | 26625 | <td class="entry_details" colspan="6"> |
26576 | 26626 | <p>The array contains the amount of shifts in x direction,<wbr/> in pixels,<wbr/> based on OIS samples.<wbr/> |
26577 | -A positive value is a shift from left to right in active array coordinate system.<wbr/> For | |
26578 | -example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> a shift of | |
26579 | -(3,<wbr/> 0) puts the new optical center at (1003,<wbr/> 500).<wbr/></p> | |
26627 | +A positive value is a shift from left to right in the pre-correction active array | |
26628 | +coordinate system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in pre-correction | |
26629 | +active array coordinates,<wbr/> a shift of (3,<wbr/> 0) puts the new optical center at (1003,<wbr/> 500).<wbr/></p> | |
26580 | 26630 | <p>The number of shifts must match the number of timestamps in |
26581 | 26631 | <a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>.<wbr/></p> |
26632 | +<p>The OIS samples are not affected by whether lens distortion correction is enabled (on | |
26633 | +supporting devices).<wbr/> They are always reported in pre-correction active array coordinates,<wbr/> | |
26634 | +since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
26635 | +is needed.<wbr/></p> | |
26582 | 26636 | </td> |
26583 | 26637 | </tr> |
26584 | 26638 |
@@ -26633,11 +26687,15 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi | ||
26633 | 26687 | <tr class="entry_cont"> |
26634 | 26688 | <td class="entry_details" colspan="6"> |
26635 | 26689 | <p>The array contains the amount of shifts in y direction,<wbr/> in pixels,<wbr/> based on OIS samples.<wbr/> |
26636 | -A positive value is a shift from top to bottom in active array coordinate system.<wbr/> For | |
26637 | -example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> a shift of | |
26638 | -(0,<wbr/> 5) puts the new optical center at (1000,<wbr/> 505).<wbr/></p> | |
26690 | +A positive value is a shift from top to bottom in pre-correction active array coordinate | |
26691 | +system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> a | |
26692 | +shift of (0,<wbr/> 5) puts the new optical center at (1000,<wbr/> 505).<wbr/></p> | |
26639 | 26693 | <p>The number of shifts must match the number of timestamps in |
26640 | 26694 | <a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>.<wbr/></p> |
26695 | +<p>The OIS samples are not affected by whether lens distortion correction is enabled (on | |
26696 | +supporting devices).<wbr/> They are always reported in pre-correction active array coordinates,<wbr/> | |
26697 | +since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
26698 | +is needed.<wbr/></p> | |
26641 | 26699 | </td> |
26642 | 26700 | </tr> |
26643 | 26701 |
@@ -26669,7 +26727,7 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi | ||
26669 | 26727 | </td> <!-- entry_type --> |
26670 | 26728 | |
26671 | 26729 | <td class="entry_description"> |
26672 | - <p>An array of OIS samples.<wbr/></p> | |
26730 | + <p>An array of optical stabilization (OIS) position samples.<wbr/></p> | |
26673 | 26731 | </td> |
26674 | 26732 | |
26675 | 26733 | <td class="entry_units"> |
@@ -26693,12 +26751,18 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi | ||
26693 | 26751 | <td class="entry_details" colspan="6"> |
26694 | 26752 | <p>Each OIS sample contains the timestamp and the amount of shifts in x and y direction,<wbr/> |
26695 | 26753 | in pixels,<wbr/> of the OIS sample.<wbr/></p> |
26696 | -<p>A positive value for a shift in x direction is a shift from left to right in active array | |
26697 | -coordinate system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array | |
26698 | -coordinates,<wbr/> a shift of (3,<wbr/> 0) puts the new optical center at (1003,<wbr/> 500).<wbr/></p> | |
26699 | -<p>A positive value for a shift in y direction is a shift from top to bottom in active array | |
26700 | -coordinate system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array | |
26701 | -coordinates,<wbr/> a shift of (0,<wbr/> 5) puts the new optical center at (1000,<wbr/> 505).<wbr/></p> | |
26754 | +<p>A positive value for a shift in x direction is a shift from left to right in the | |
26755 | +pre-correction active array coordinate system.<wbr/> For example,<wbr/> if the optical center is | |
26756 | +(1000,<wbr/> 500) in pre-correction active array coordinates,<wbr/> a shift of (3,<wbr/> 0) puts the new | |
26757 | +optical center at (1003,<wbr/> 500).<wbr/></p> | |
26758 | +<p>A positive value for a shift in y direction is a shift from top to bottom in | |
26759 | +pre-correction active array coordinate system.<wbr/> For example,<wbr/> if the optical center is | |
26760 | +(1000,<wbr/> 500) in active array coordinates,<wbr/> a shift of (0,<wbr/> 5) puts the new optical center at | |
26761 | +(1000,<wbr/> 505).<wbr/></p> | |
26762 | +<p>The OIS samples are not affected by whether lens distortion correction is enabled (on | |
26763 | +supporting devices).<wbr/> They are always reported in pre-correction active array coordinates,<wbr/> | |
26764 | +since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
26765 | +is needed.<wbr/></p> | |
26702 | 26766 | </td> |
26703 | 26767 | </tr> |
26704 | 26768 |
@@ -30172,14 +30236,28 @@ will not slow down capture rate when applying correction.<wbr/> FAST may be the | ||
30172 | 30236 | any correction at all would slow down capture rate.<wbr/> Every output stream will have a |
30173 | 30237 | similar amount of enhancement applied.<wbr/></p> |
30174 | 30238 | <p>The correction only applies to processed outputs such as YUV,<wbr/> JPEG,<wbr/> or DEPTH16; it is not |
30175 | -applied to any RAW output.<wbr/> Metadata coordinates such as face rectangles or metering | |
30176 | -regions are also not affected by correction.<wbr/></p> | |
30239 | +applied to any RAW output.<wbr/></p> | |
30177 | 30240 | <p>This control will be on by default on devices that support this control.<wbr/> Applications |
30178 | 30241 | disabling distortion correction need to pay extra attention with the coordinate system of |
30179 | 30242 | metering regions,<wbr/> crop region,<wbr/> and face rectangles.<wbr/> When distortion correction is OFF,<wbr/> |
30180 | 30243 | metadata coordinates follow the coordinate system of |
30181 | 30244 | <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>.<wbr/> When distortion is not OFF,<wbr/> metadata |
30182 | -coordinates follow the coordinate system of <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p> | |
30245 | +coordinates follow the coordinate system of <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/> The | |
30246 | +camera device will map these metadata fields to match the corrected image produced by the | |
30247 | +camera device,<wbr/> for both capture requests and results.<wbr/> However,<wbr/> this mapping is not very | |
30248 | +precise,<wbr/> since rectangles do not generally map to rectangles when corrected.<wbr/> Only linear | |
30249 | +scaling between the active array and precorrection active array coordinates is | |
30250 | +performed.<wbr/> Applications that require precise correction of metadata need to undo that | |
30251 | +linear scaling,<wbr/> and apply a more complete correction that takes into the account the app's | |
30252 | +own requirements.<wbr/></p> | |
30253 | +<p>The full list of metadata that is affected in this way by distortion correction is:</p> | |
30254 | +<ul> | |
30255 | +<li><a href="#controls_android.control.afRegions">android.<wbr/>control.<wbr/>af<wbr/>Regions</a></li> | |
30256 | +<li><a href="#controls_android.control.aeRegions">android.<wbr/>control.<wbr/>ae<wbr/>Regions</a></li> | |
30257 | +<li><a href="#controls_android.control.awbRegions">android.<wbr/>control.<wbr/>awb<wbr/>Regions</a></li> | |
30258 | +<li><a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a></li> | |
30259 | +<li><a href="#dynamic_android.statistics.faces">android.<wbr/>statistics.<wbr/>faces</a></li> | |
30260 | +</ul> | |
30183 | 30261 | </td> |
30184 | 30262 | </tr> |
30185 | 30263 |
@@ -30385,14 +30463,28 @@ will not slow down capture rate when applying correction.<wbr/> FAST may be the | ||
30385 | 30463 | any correction at all would slow down capture rate.<wbr/> Every output stream will have a |
30386 | 30464 | similar amount of enhancement applied.<wbr/></p> |
30387 | 30465 | <p>The correction only applies to processed outputs such as YUV,<wbr/> JPEG,<wbr/> or DEPTH16; it is not |
30388 | -applied to any RAW output.<wbr/> Metadata coordinates such as face rectangles or metering | |
30389 | -regions are also not affected by correction.<wbr/></p> | |
30466 | +applied to any RAW output.<wbr/></p> | |
30390 | 30467 | <p>This control will be on by default on devices that support this control.<wbr/> Applications |
30391 | 30468 | disabling distortion correction need to pay extra attention with the coordinate system of |
30392 | 30469 | metering regions,<wbr/> crop region,<wbr/> and face rectangles.<wbr/> When distortion correction is OFF,<wbr/> |
30393 | 30470 | metadata coordinates follow the coordinate system of |
30394 | 30471 | <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>.<wbr/> When distortion is not OFF,<wbr/> metadata |
30395 | -coordinates follow the coordinate system of <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p> | |
30472 | +coordinates follow the coordinate system of <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/> The | |
30473 | +camera device will map these metadata fields to match the corrected image produced by the | |
30474 | +camera device,<wbr/> for both capture requests and results.<wbr/> However,<wbr/> this mapping is not very | |
30475 | +precise,<wbr/> since rectangles do not generally map to rectangles when corrected.<wbr/> Only linear | |
30476 | +scaling between the active array and precorrection active array coordinates is | |
30477 | +performed.<wbr/> Applications that require precise correction of metadata need to undo that | |
30478 | +linear scaling,<wbr/> and apply a more complete correction that takes into the account the app's | |
30479 | +own requirements.<wbr/></p> | |
30480 | +<p>The full list of metadata that is affected in this way by distortion correction is:</p> | |
30481 | +<ul> | |
30482 | +<li><a href="#controls_android.control.afRegions">android.<wbr/>control.<wbr/>af<wbr/>Regions</a></li> | |
30483 | +<li><a href="#controls_android.control.aeRegions">android.<wbr/>control.<wbr/>ae<wbr/>Regions</a></li> | |
30484 | +<li><a href="#controls_android.control.awbRegions">android.<wbr/>control.<wbr/>awb<wbr/>Regions</a></li> | |
30485 | +<li><a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a></li> | |
30486 | +<li><a href="#dynamic_android.statistics.faces">android.<wbr/>statistics.<wbr/>faces</a></li> | |
30487 | +</ul> | |
30396 | 30488 | </td> |
30397 | 30489 | </tr> |
30398 | 30490 |
@@ -3960,7 +3960,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
3960 | 3960 | If this device is the largest or only camera device with a given facing, then this |
3961 | 3961 | position will be `(0, 0, 0)`; a camera device with a lens optical center located 3 cm |
3962 | 3962 | from the main sensor along the +X axis (to the right from the user's perspective) will |
3963 | - report `(0.03, 0, 0)`. | |
3963 | + report `(0.03, 0, 0)`. Note that this means that, for many computer vision | |
3964 | + applications, the position needs to be negated to convert it to a translation from the | |
3965 | + camera to the origin. | |
3964 | 3966 | |
3965 | 3967 | To transform a pixel coordinates between two cameras facing the same direction, first |
3966 | 3968 | the source camera android.lens.distortion must be corrected for. Then the source |
@@ -3975,7 +3977,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
3975 | 3977 | image then needs to be corrected for radial distortion before comparison or sampling. |
3976 | 3978 | |
3977 | 3979 | When android.lens.poseReference is GYROSCOPE, then this position is relative to |
3978 | - the center of the primary gyroscope on the device. | |
3980 | + the center of the primary gyroscope on the device. The axis definitions are the same as | |
3981 | + with PRIMARY_CAMERA. | |
3979 | 3982 | </details> |
3980 | 3983 | <tag id="DEPTH" /> |
3981 | 3984 | </entry> |
@@ -4096,14 +4099,17 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
4096 | 4099 | |
4097 | 4100 | which can then be combined with the camera pose rotation |
4098 | 4101 | `R` and translation `t` (android.lens.poseRotation and |
4099 | - android.lens.poseTranslation, respective) to calculate the | |
4102 | + android.lens.poseTranslation, respectively) to calculate the | |
4100 | 4103 | complete transform from world coordinates to pixel |
4101 | 4104 | coordinates: |
4102 | 4105 | |
4103 | - P = [ K 0 * [ R t | |
4104 | - 0 1 ] 0 1 ] | |
4106 | + P = [ K 0 * [ R -Rt | |
4107 | + 0 1 ] 0 1 ] | |
4105 | 4108 | |
4106 | - and with `p_w` being a point in the world coordinate system | |
4109 | + (Note the negation of poseTranslation when mapping from camera | |
4110 | + to world coordinates, and multiplication by the rotation). | |
4111 | + | |
4112 | + With `p_w` being a point in the world coordinate system | |
4107 | 4113 | and `p_s` being a point in the camera active pixel array |
4108 | 4114 | coordinate system, and with the mapping including the |
4109 | 4115 | homogeneous division by z: |
@@ -4127,6 +4133,14 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
4127 | 4133 | activeArraySize rectangle), to determine the final pixel |
4128 | 4134 | coordinate of the world point for processed (non-RAW) |
4129 | 4135 | output buffers. |
4136 | + | |
4137 | + For camera devices, the center of pixel `(x,y)` is located at | |
4138 | + coordinate `(x + 0.5, y + 0.5)`. So on a device with a | |
4139 | + precorrection active array of size `(10,10)`, the valid pixel | |
4140 | + indices go from `(0,0)-(9,9)`, and an perfectly-built camera would | |
4141 | + have an optical center at the exact center of the pixel grid, at | |
4142 | + coordinates `(5.0, 5.0)`, which is the top-left corner of pixel | |
4143 | + `(5,5)`. | |
4130 | 4144 | </details> |
4131 | 4145 | <tag id="DEPTH" /> |
4132 | 4146 | </entry> |
@@ -5683,7 +5697,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
5683 | 5697 | streams will match exactly. These additional crops will |
5684 | 5698 | be centered within the crop region. |
5685 | 5699 | |
5686 | - If the coordinate system is android.sensor.info.activeArraysSize, the width and height | |
5700 | + If the coordinate system is android.sensor.info.activeArraySize, the width and height | |
5687 | 5701 | of the crop region cannot be set to be smaller than |
5688 | 5702 | `floor( activeArraySize.width / android.scaler.availableMaxDigitalZoom )` and |
5689 | 5703 | `floor( activeArraySize.height / android.scaler.availableMaxDigitalZoom )`, respectively. |
@@ -8609,9 +8623,17 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
8609 | 8623 | </ndk_notes> |
8610 | 8624 | </value> |
8611 | 8625 | </enum> |
8612 | - <description>A control for selecting whether OIS position information is included in output | |
8613 | - result metadata.</description> | |
8626 | + <description>A control for selecting whether optical stabilization (OIS) position | |
8627 | + information is included in output result metadata.</description> | |
8614 | 8628 | <range>android.statistics.info.availableOisDataModes</range> |
8629 | + <details> | |
8630 | + Since optical image stabilization generally involves motion much faster than the duration | |
8631 | + of individualq image exposure, multiple OIS samples can be included for a single capture | |
8632 | + result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating | |
8633 | + at 30fps may have 6-7 OIS samples per capture result. This information can be combined | |
8634 | + with the rolling shutter skew to account for lens motion during image exposure in | |
8635 | + post-processing algorithms. | |
8636 | + </details> | |
8615 | 8637 | </entry> |
8616 | 8638 | </controls> |
8617 | 8639 | <dynamic> |
@@ -8640,12 +8662,17 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
8640 | 8662 | <units>Pixels in active array.</units> |
8641 | 8663 | <details> |
8642 | 8664 | The array contains the amount of shifts in x direction, in pixels, based on OIS samples. |
8643 | - A positive value is a shift from left to right in active array coordinate system. For | |
8644 | - example, if the optical center is (1000, 500) in active array coordinates, a shift of | |
8645 | - (3, 0) puts the new optical center at (1003, 500). | |
8665 | + A positive value is a shift from left to right in the pre-correction active array | |
8666 | + coordinate system. For example, if the optical center is (1000, 500) in pre-correction | |
8667 | + active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500). | |
8646 | 8668 | |
8647 | 8669 | The number of shifts must match the number of timestamps in |
8648 | 8670 | android.statistics.oisTimestamps. |
8671 | + | |
8672 | + The OIS samples are not affected by whether lens distortion correction is enabled (on | |
8673 | + supporting devices). They are always reported in pre-correction active array coordinates, | |
8674 | + since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
8675 | + is needed. | |
8649 | 8676 | </details> |
8650 | 8677 | </entry> |
8651 | 8678 | <entry name="oisYShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3"> |
@@ -8658,12 +8685,17 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
8658 | 8685 | <units>Pixels in active array.</units> |
8659 | 8686 | <details> |
8660 | 8687 | The array contains the amount of shifts in y direction, in pixels, based on OIS samples. |
8661 | - A positive value is a shift from top to bottom in active array coordinate system. For | |
8662 | - example, if the optical center is (1000, 500) in active array coordinates, a shift of | |
8663 | - (0, 5) puts the new optical center at (1000, 505). | |
8688 | + A positive value is a shift from top to bottom in pre-correction active array coordinate | |
8689 | + system. For example, if the optical center is (1000, 500) in active array coordinates, a | |
8690 | + shift of (0, 5) puts the new optical center at (1000, 505). | |
8664 | 8691 | |
8665 | 8692 | The number of shifts must match the number of timestamps in |
8666 | 8693 | android.statistics.oisTimestamps. |
8694 | + | |
8695 | + The OIS samples are not affected by whether lens distortion correction is enabled (on | |
8696 | + supporting devices). They are always reported in pre-correction active array coordinates, | |
8697 | + since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
8698 | + is needed. | |
8667 | 8699 | </details> |
8668 | 8700 | </entry> |
8669 | 8701 | <entry name="oisSamples" type="float" visibility="java_public" synthetic="true" |
@@ -8672,19 +8704,26 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
8672 | 8704 | <size>n</size> |
8673 | 8705 | </array> |
8674 | 8706 | <description> |
8675 | - An array of OIS samples. | |
8707 | + An array of optical stabilization (OIS) position samples. | |
8676 | 8708 | </description> |
8677 | 8709 | <details> |
8678 | 8710 | Each OIS sample contains the timestamp and the amount of shifts in x and y direction, |
8679 | 8711 | in pixels, of the OIS sample. |
8680 | 8712 | |
8681 | - A positive value for a shift in x direction is a shift from left to right in active array | |
8682 | - coordinate system. For example, if the optical center is (1000, 500) in active array | |
8683 | - coordinates, a shift of (3, 0) puts the new optical center at (1003, 500). | |
8713 | + A positive value for a shift in x direction is a shift from left to right in the | |
8714 | + pre-correction active array coordinate system. For example, if the optical center is | |
8715 | + (1000, 500) in pre-correction active array coordinates, a shift of (3, 0) puts the new | |
8716 | + optical center at (1003, 500). | |
8717 | + | |
8718 | + A positive value for a shift in y direction is a shift from top to bottom in | |
8719 | + pre-correction active array coordinate system. For example, if the optical center is | |
8720 | + (1000, 500) in active array coordinates, a shift of (0, 5) puts the new optical center at | |
8721 | + (1000, 505). | |
8684 | 8722 | |
8685 | - A positive value for a shift in y direction is a shift from top to bottom in active array | |
8686 | - coordinate system. For example, if the optical center is (1000, 500) in active array | |
8687 | - coordinates, a shift of (0, 5) puts the new optical center at (1000, 505). | |
8723 | + The OIS samples are not affected by whether lens distortion correction is enabled (on | |
8724 | + supporting devices). They are always reported in pre-correction active array coordinates, | |
8725 | + since the scaling of OIS shifts would depend on the specific spot on the sensor the shift | |
8726 | + is needed. | |
8688 | 8727 | </details> |
8689 | 8728 | </entry> |
8690 | 8729 | </dynamic> |
@@ -9880,15 +9919,29 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata | ||
9880 | 9919 | similar amount of enhancement applied. |
9881 | 9920 | |
9882 | 9921 | The correction only applies to processed outputs such as YUV, JPEG, or DEPTH16; it is not |
9883 | - applied to any RAW output. Metadata coordinates such as face rectangles or metering | |
9884 | - regions are also not affected by correction. | |
9922 | + applied to any RAW output. | |
9885 | 9923 | |
9886 | 9924 | This control will be on by default on devices that support this control. Applications |
9887 | 9925 | disabling distortion correction need to pay extra attention with the coordinate system of |
9888 | 9926 | metering regions, crop region, and face rectangles. When distortion correction is OFF, |
9889 | 9927 | metadata coordinates follow the coordinate system of |
9890 | 9928 | android.sensor.info.preCorrectionActiveArraySize. When distortion is not OFF, metadata |
9891 | - coordinates follow the coordinate system of android.sensor.info.activeArraySize. | |
9929 | + coordinates follow the coordinate system of android.sensor.info.activeArraySize. The | |
9930 | + camera device will map these metadata fields to match the corrected image produced by the | |
9931 | + camera device, for both capture requests and results. However, this mapping is not very | |
9932 | + precise, since rectangles do not generally map to rectangles when corrected. Only linear | |
9933 | + scaling between the active array and precorrection active array coordinates is | |
9934 | + performed. Applications that require precise correction of metadata need to undo that | |
9935 | + linear scaling, and apply a more complete correction that takes into the account the app's | |
9936 | + own requirements. | |
9937 | + | |
9938 | + The full list of metadata that is affected in this way by distortion correction is: | |
9939 | + | |
9940 | + * android.control.afRegions | |
9941 | + * android.control.aeRegions | |
9942 | + * android.control.awbRegions | |
9943 | + * android.scaler.cropRegion | |
9944 | + * android.statistics.faces | |
9892 | 9945 | </details> |
9893 | 9946 | </entry> |
9894 | 9947 | </controls> |