Narzędzia użytkownika

Narzędzia witryny


notatki:autofocus

Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Poprzednia rewizja po obu stronachPoprzednia wersja
Nowa wersja
Poprzednia wersja
notatki:autofocus [2025/05/21 19:26] administratornotatki:autofocus [2025/05/21 20:44] (aktualna) administrator
Linia 1: Linia 1:
 ====== Hardware: Jak działa autofocus? ====== ====== Hardware: Jak działa autofocus? ======
  
 +narzędzia wykorzystane:
 +  * https://phydemo.app/ray-optics/simulator/
 +  * https://imagej.net/ij/
  
 +====== Wyostrzanie poprzez pomiar odległości (aktywne) ======
 +
 +{{ :notatki:autofocus1.svg |}}
 +
 +$$
 +\frac{1}{f} = \frac{1}{o} + \frac{1}{i}
 +$$
 +
 +Gdzie:
 +
 +  * $f$ — ogniskowa soczewki (w metrach lub centymetrach),
 +  * $o$ — odległość przedmiotu od soczewki,
 +  * $i$ — odległość obrazu od soczewki.
 +
 +====== Wyostrzanie poprzez wykrycie Fazy (pasywne) ======
 +
 +===== Sytuacja w której obraz jest wyostrzony na matrycy =====
 +
 +
 +{{.:pasted:20250521-192149.png?700}}
 +
 +<diagram><svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="918px" height="197px" viewBox="-0.5 -0.5 918 197" content="&lt;mxfile host=&quot;wiki.ostrowski.net.pl&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0&quot; version=&quot;26.2.15&quot;&gt;&lt;diagram id=&quot;VrO6XdPuZbQyT8fJdOzh&quot; name=&quot;Page-1&quot;&gt;1VdNs5owFP01LDsTiKJbtY920c506qLrDLlCpiFhQhTsr28C4UtU3mvt6+hCw+Hm3JtzDyF6eJdVnxTJ06+SAvcCRCsPf/SCIEB4bX4scm6QcOWARDHaQH4P7NkvcCBy6JFRKEaBWkquWT4GYykExHqEEaVkOQ47SD7OmpMEJsA+JnyK/mBUpw26XqIe/wwsSdvMPnJ3MtIGO6BICZXlAMIvHt4pKXUzyqodcCteq0szL7pxtytMgdCvmRA0E06EH93aXF363C4WBN1YzcxVzElRsNjD20ITpadwqjNuAN8MlTwKCjYNMlcNK9CJrn2hfrd84xuQGWh1NiFlL3CrbzrQtsUUcKLZaUxPXJ+Tjq7L8E0ykzhAzpMf/JbIWXIRojFHIY8qBjdtqOgF02qOyCiXgJ4QmcFg3T1UN+x68/B88+KjOtVNsC0ZdFJIAff6VWglf3bmDjpkJ7lUNTWOImQ+rRciZst8il77qwe1OpwjutFq0wRyHoTlNqC4XfDiMs8C3a1ricfxGM3Er+/ym0FT8Z/6dPFffepvogj7z+jT8FE+nSN6lE8v88z5NHijT+8/B3/t0+XEp1+YAKKsVUEU0g5yVgEvJv7VUOmxTwlnibAvR2MmMFbcnkBpZs4QG3cjY5Ta6dsyZRr2OYktV2lOTDfenpYAqrd6tT10+cvrHhh4uTtfDc2ML7wy9O3o3XVH2HAi7PfaWPJgvnidK0Cbdxb1IIW+tk08QuyLDXiJpmKH/0jr1RNo3R0dHqB1u2m8g9bmsj+ZN/tL//8Gv/wG&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="2"><g><path d="M 14.37 126 L 901.63 126" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 9.12 126 L 16.12 122.5 L 14.37 126 L 16.12 129.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 906.88 126 L 899.88 129.5 L 901.63 126 L 899.88 122.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="3"><g><path d="M 328 126 Q 628 106 658 36 Q 688 -34 713 36 Q 738 106 828 126" fill="none" stroke="#ff0000" style="stroke: light-dark(rgb(255, 0, 0), rgb(255, 144, 144));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="4"><g><path d="M 318 126 Q 618 106 648 36 Q 678 -34 703 36 Q 728 106 818 126" fill="none" stroke="#1aff31" style="stroke: light-dark(rgb(26, 255, 49), rgb(0, 127, 0));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="5"><g><rect x="373" y="126" width="210" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 208px; height: 1px; padding-top: 141px; margin-left: 374px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ffffff); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Linear sensor pixels</div></div></div></foreignObject><text x="478" y="145" fill="light-dark(#000000, #ffffff)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Linear sensor pixels</text></switch></g></g></g><g data-cell-id="6"><g><rect x="388" y="166" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 181px; margin-left: 389px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #1AFF31; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#1AFF31, #007f00); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="418" y="185" fill="#1AFF31" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g><g data-cell-id="7"><g><rect x="458" y="166" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 181px; margin-left: 459px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #FF0000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#FF0000, #ff9090); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="488" y="185" fill="#FF0000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g></g></g></g></svg></diagram>
 +
 +
 +===== Sytuacja w której obraz jest wyostrzony za matrycą =====
 +
 +
 +
 +{{.:pasted:20250521-192229.png?700}}
 +
 +<diagram><svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1038px" height="264px" viewBox="-0.5 -0.5 1038 264" content="&lt;mxfile host=&quot;wiki.ostrowski.net.pl&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0&quot; version=&quot;26.2.15&quot;&gt;&lt;diagram id=&quot;hcSSw5_dxUQmahPCBwUU&quot; name=&quot;Page-1&quot;&gt;1VdNs5owFP01LN9MIIJvq/bRLtqZTl10nSFXyDQkTIiC/fVNJHyJ6Hsda0cWGg43596cewzRw5u8/qxIkX2TFLgXIFp7+JMXmGsZmS+LHBvk1ccNkCpGG8jvgS37DQ5EDt0zCuUoUEvJNSvGYCKFgESPMKKUrMZhO8nHWQuSwgTYJoRP0Z+M6sytIkQ9/gVYmrWZfeSe5KQNdkCZESqrAYTfPLxRUupmlNcb4Fa8VpdmXjzztCtMgdDvmRA0Ew6E793aXF362C4WBF1ZzcxdwklZssTD61ITpadwpnNuAN8MldwLCjYNMncNK9CJrn2hfrd84xuQOWh1NCFVL3CrbzbQtsUUcKLZYUxPXJ/Tjq7L8F0ykzhAzpMvwdIROUsuIjTmKOVeJeCmDRU9Y1qGN4iMcinoCZEZDNbdQ6eGXW4evt28ZK8OpybYlgw6KaSAa/0qtZK/OnMHHbKRXKoTNY5jZK7WCzGzZT5Fr/17tTq6RTTTatMEchyEFTagnC94cZ5nga7WFeJxfLtvzsa/XuU3g6biv/Xp4r/61F/FMfaf0KcvweJORg2ixxj1PM0Nn/rBx3w6+eHe2afhxKdfmQCirFVBlNIOClYDLyf+1VDrsU8JZ6mwL0djJjBWXB9AaWbOECv3IGeU2unrKmMatgVJLFdlTkwzb09LAPVHvdpawA8vW2Dg5e58NTQzPrPK0Lejd9cVYaOJsD9OvpI788FPuQK0erCoOyn0pW3iHmKfbcAhmood/SOtl0+gdXd0uIPWGD1Ma3Pbn8yb/aX/f4Pf/gA=&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="2"><g><path d="M 14.37 193 L 1021.63 193" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 9.12 193 L 16.12 189.5 L 14.37 193 L 16.12 196.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 1026.88 193 L 1019.88 196.5 L 1021.63 193 L 1019.88 189.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="3"><g><path d="M 448 193 Q 748 173 778 58 Q 808 -57 833 58 Q 858 173 948 193" fill="none" stroke="#ff0000" style="stroke: light-dark(rgb(255, 0, 0), rgb(255, 144, 144));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="4"><g><path d="M 38 193 Q 338 173 368 58 Q 398 -57 423 58 Q 448 173 538 193" fill="none" stroke="#1aff31" style="stroke: light-dark(rgb(26, 255, 49), rgb(0, 127, 0));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="5"><g><rect x="493" y="193" width="210" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 208px; height: 1px; padding-top: 208px; margin-left: 494px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ffffff); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Linear sensor pixels</div></div></div></foreignObject><text x="598" y="212" fill="light-dark(#000000, #ffffff)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Linear sensor pixels</text></switch></g></g></g><g data-cell-id="6"><g><rect x="508" y="233" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 248px; margin-left: 509px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #1AFF31; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#1AFF31, #007f00); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="538" y="252" fill="#1AFF31" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g><g data-cell-id="7"><g><rect x="578" y="233" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 248px; margin-left: 579px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #FF0000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#FF0000, #ff9090); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="608" y="252" fill="#FF0000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g></g></g></g></svg></diagram>
 +
 +===== Sytuacja kiedy obraz jest wyostrzony przed matrycą =====
 +
 +
 +{{.:pasted:20250521-192317.png?700}}
 +
 +
 +<diagram><svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="931px" height="144px" viewBox="-0.5 -0.5 931 144" content="&lt;mxfile host=&quot;wiki.ostrowski.net.pl&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0&quot; version=&quot;26.2.15&quot;&gt;&lt;diagram id=&quot;mRD1LMbev2ZDhoJVxo4r&quot; name=&quot;Page-1&quot;&gt;1VfLjtsgFP0aL0cCk1eXSTpuF61UNYuukbmx0WCwMEmcfn0hxu882iqTUbxI8PHl3Mu5J4YEZJ2VXzTN0++KgQhCxMqAfA5Ce81n9sshxwpZYFIBieasgnALbPhv8CDy6I4zKHqBRilheN4HYyUlxKaHUa3VoR+2VaKfNacJjIBNTMUY/cWZSf0qpqjFvwJP0jozRv5JRutgDxQpZerQgchrQNZaKVONsnINwolX61LNiy48bQrTIM3fTAirCXsqdn5tvi5zrBcLki2dZvYuFrQoeByQVWGoNmM4NZmwALZDrXaSgUuD7F3FCmyka1sobpZvfQMqA6OPNuTQClzrm3a0rTENghq+79NT3+ekoWsy/FDcJg6R9+QLrom8JScz1Oco1E7H4Kd1FR0wzW8RWeUSMCMiO+isu4VODTvfPHK7efFO709NcC3pdFIqCdf6VRit3hpzhw2yVkLpEzWJImSv2gsRd2U+Ra/x/E6tnt0iutBq2wR67ITlLqC4XPBkmGeCrtY1Jf14srgRv7jKbwdVxf/r08mH+hQvo4jgJ/Tpy92MSshjjIqHeW4YFX8aGHV+PT6cvK9RpyOjfuMSqHZeBVkoN8h5CaIYGdhAafpGpYIn0u2O1k1gvbjagzbcHiKW/kHGGXPTV4eUG9jkNHZcB3tkurB9OgIo/9WstXZ4et4DHTM3B6yum8nAK13j9javK8LORsL+PBlLbe2HOOUK0fLBom6VNOfeE/cQe/BDmKKx2LN30nr+BFo3Z4c7aE3Qw7S2t+3RvHq/tH9wyOsf&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="2"><g><path d="M 27.37 73 L 914.63 73" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 22.12 73 L 29.12 69.5 L 27.37 73 L 29.12 76.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 919.88 73 L 912.88 76.5 L 914.63 73 L 912.88 69.5 Z" fill="#000000" style="fill: light-dark(rgb(0, 0, 0), rgb(255, 255, 255)); stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="3"><g><path d="M 341 73 Q 641 53 671 23 Q 701 -7 726 23 Q 751 53 841 73" fill="none" stroke="#ff0000" style="stroke: light-dark(rgb(255, 0, 0), rgb(255, 144, 144));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="4"><g><path d="M 1 73 Q 301 53 331 18 Q 361 -17 386 18 Q 411 53 501 73" fill="none" stroke="#1aff31" style="stroke: light-dark(rgb(26, 255, 49), rgb(0, 127, 0));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="5"><g><rect x="386" y="73" width="210" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 208px; height: 1px; padding-top: 88px; margin-left: 387px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ffffff); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Linear sensor pixels</div></div></div></foreignObject><text x="491" y="92" fill="light-dark(#000000, #ffffff)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Linear sensor pixels</text></switch></g></g></g><g data-cell-id="6"><g><rect x="401" y="113" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 128px; margin-left: 402px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #1AFF31; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#1AFF31, #007f00); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="431" y="132" fill="#1AFF31" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g><g data-cell-id="7"><g><rect x="471" y="113" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 128px; margin-left: 472px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #FF0000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#FF0000, #ff9090); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Ray of light A</div></div></div></foreignObject><text x="501" y="132" fill="#FF0000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Ray of lig...</text></switch></g></g></g></g></g></g></svg></diagram>
 +
 +====== Wyostrzanie poprzez kontrast (pasywne) ======
 +
 +Skrypt w pythonie obliczający sumę wszystkich różnic pomiędzy parami pikseli w obrazku.
 +
 +<code python get_diff_pixel.py>
 +from PIL import Image
 +
 +def main():
 +    img = Image.open("greyscale.png").convert("L")
 +    pixels = list(img.getdata())
 +    n = len(pixels)
 +
 +    total = 0
 +    for i in range(n):
 +        pi = pixels[i]
 +        for j in range(i + 1, n):
 +            total += abs(pi - pixels[j])
 +
 +    print(f"Pixels read: {n}")
 +    print(f"Sum of abs diffs over all pairs: {total}")
 +
 +if __name__ == "__main__":
 +    main()
 +
 +</code>
 +
 +===== Wyniki dla obrazka wyostrzonego =====
 +
 +{{.:pasted:20250521-204417.png}}
 +
 +<code>
 +Pixels read: 11970
 +Sum of abs diffs over all pairs: 4496510654
 +</code>
 +
 +===== Wyniki dla obrazka niewyostrzonego =====
 +
 +{{.:pasted:20250521-204252.png}}
 +
 +<code>
 +Pixels read: 11970
 +Sum of abs diffs over all pairs: 3223391491
 +</code>
  
-====== Wyostrzanie poprzez wykrycie Fazy ====== 
  
-{{.:pasted:20250521-192149.png?500}}\\ 
-Sytuacja w której obraz jest wyostrzony na matrycy 
  
-{{.:pasted:20250521-192229.png?500}}\\ 
-Sytuacja w której obraz jest wyostrzony za matrycą 
  
-{{.:pasted:20250521-192317.png?500}}\\ 
-Sytuacja kiedy obraz jest wyostrzony przed matrycą 
  
-Aparat na podstawie wykresu promieniowania na sensorze stwierdza o ile ma przesunąć soczewkę aby obydwie krzywe na wykresie się pokryły. 
  
  
notatki/autofocus.1747848396.txt.gz · ostatnio zmienione: przez administrator