Add IPCV pinhole and perspective projection

This commit is contained in:
2024-03-03 16:51:39 +01:00
parent a1168a4147
commit 622c686111
18 changed files with 743 additions and 0 deletions

View File

@ -0,0 +1 @@
../../ainotes.cls

View File

@ -0,0 +1,428 @@
<mxfile host="app.diagrams.net" modified="2024-03-03T15:35:06.773Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" etag="uWZKu0vPefJa62H8nD4q" version="24.0.1" type="device">
<diagram name="Pagina-1" id="GgXEJ81RuVTFlW8kEIqq">
<mxGraphModel dx="683" dy="355" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="MWH0NgEk_9BQr2TDpznU-21" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;entryX=1;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=1;exitDx=0;exitDy=0;startSize=2;endSize=2;endFill=1;startFill=1;" parent="1" source="MWH0NgEk_9BQr2TDpznU-22" target="MWH0NgEk_9BQr2TDpznU-22" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="120" y="230" as="sourcePoint" />
<mxPoint x="120" y="190" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-53" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="520" as="sourcePoint" />
<mxPoint x="480" y="360" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-52" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="520" as="sourcePoint" />
<mxPoint x="400" y="360" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-1" value="" style="endArrow=classic;html=1;rounded=0;fontSize=15;fontFamily=Computer modern;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="500" as="sourcePoint" />
<mxPoint x="400" y="390" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-3" value="&lt;i&gt;U&lt;/i&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=15;fontFamily=Computer modern;" parent="jqilrqFg0j0umUQvlnIg-1" vertex="1" connectable="0">
<mxGeometry x="0.95" relative="1" as="geometry">
<mxPoint x="10" y="-5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-2" value="" style="endArrow=classic;html=1;rounded=0;fontSize=15;fontFamily=Computer modern;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="440" as="sourcePoint" />
<mxPoint x="650" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-4" value="&lt;i&gt;Z&lt;/i&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=15;fontFamily=Computer modern;" parent="jqilrqFg0j0umUQvlnIg-2" vertex="1" connectable="0">
<mxGeometry x="0.9472" y="-2" relative="1" as="geometry">
<mxPoint x="8" y="9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-5" value="" style="endArrow=classic;html=1;rounded=0;fontSize=15;fontFamily=Computer modern;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="440" as="sourcePoint" />
<mxPoint x="480" y="390" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-6" value="&lt;i&gt;X&lt;/i&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=15;fontFamily=Computer modern;" parent="jqilrqFg0j0umUQvlnIg-5" vertex="1" connectable="0">
<mxGeometry x="0.9325" relative="1" as="geometry">
<mxPoint x="10" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-7" value="&lt;i&gt;C&lt;/i&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="477" y="414" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-8" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="470" y="430" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-9" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="590" y="370" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-10" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="390" y="470" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-13" value="" style="endArrow=none;html=1;rounded=0;dashed=1;" parent="1" source="jqilrqFg0j0umUQvlnIg-10" target="jqilrqFg0j0umUQvlnIg-9" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="420" y="450" as="sourcePoint" />
<mxPoint x="470" y="400" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-17" value="&lt;font face=&quot;Computer modern&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;f&lt;/i&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;" parent="1" vertex="1">
<mxGeometry x="400" y="410" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-18" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=1;entryDx=0;entryDy=0;strokeWidth=1;startFill=1;endFill=1;startSize=3;endSize=3;" parent="1" source="jqilrqFg0j0umUQvlnIg-17" target="jqilrqFg0j0umUQvlnIg-17" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="420" y="450" as="sourcePoint" />
<mxPoint x="470" y="400" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-20" value="&lt;font style=&quot;font-size: 15px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;M&lt;/i&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;" parent="1" vertex="1">
<mxGeometry x="570" y="350" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-21" value="&lt;font face=&quot;Computer modern&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;m&lt;/i&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;" parent="1" vertex="1">
<mxGeometry x="400" y="480" width="20" height="10" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-23" value="&lt;i style=&quot;font-size: 15px;&quot;&gt;&lt;font style=&quot;font-size: 15px;&quot; face=&quot;Computer modern&quot;&gt;u&lt;/font&gt;&lt;/i&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;" parent="1" vertex="1">
<mxGeometry x="370" y="440" width="20" height="40" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-24" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;startSize=3;endSize=3;startFill=1;endFill=1;" parent="1" source="jqilrqFg0j0umUQvlnIg-23" target="jqilrqFg0j0umUQvlnIg-23" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="450" y="460" as="sourcePoint" />
<mxPoint x="380" y="420" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-27" value="&lt;font style=&quot;font-size: 15px;&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;z&lt;/i&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="480" y="448" width="120" height="12" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-28" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;strokeWidth=1;startFill=1;endFill=1;startSize=3;endSize=3;" parent="1" source="jqilrqFg0j0umUQvlnIg-27" target="jqilrqFg0j0umUQvlnIg-27" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="499.77" as="sourcePoint" />
<mxPoint x="590" y="449.77" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-29" value="&lt;font face=&quot;Computer modern&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;x&lt;/i&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;" parent="1" vertex="1">
<mxGeometry x="610" y="380" width="20" height="60" as="geometry" />
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-30" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;startSize=3;endSize=3;startFill=1;endFill=1;" parent="1" source="jqilrqFg0j0umUQvlnIg-29" target="jqilrqFg0j0umUQvlnIg-29" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="700" y="400" as="sourcePoint" />
<mxPoint x="630" y="360" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-31" value="" style="endArrow=none;html=1;rounded=0;dashed=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="600" y="440" as="sourcePoint" />
<mxPoint x="600" y="380" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-36" value="" style="endArrow=none;html=1;rounded=0;curved=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="506" y="440" as="sourcePoint" />
<mxPoint x="503" y="429" as="targetPoint" />
<Array as="points">
<mxPoint x="510" y="432" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-38" value="" style="endArrow=none;html=1;rounded=0;curved=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="460" y="450" as="sourcePoint" />
<mxPoint x="455" y="440" as="targetPoint" />
<Array as="points">
<mxPoint x="453" y="447" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-39" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="450" as="sourcePoint" />
<mxPoint x="410" y="440" as="targetPoint" />
<Array as="points">
<mxPoint x="410" y="450" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-40" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="590" y="440" as="sourcePoint" />
<mxPoint x="600" y="430" as="targetPoint" />
<Array as="points">
<mxPoint x="590" y="430" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-41" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="451" y="448" as="sourcePoint" />
<mxPoint x="459" y="445" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-42" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="503" y="435" as="sourcePoint" />
<mxPoint x="511" y="433" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-43" value="" style="endArrow=none;html=1;rounded=0;curved=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="468" as="sourcePoint" />
<mxPoint x="412" y="474" as="targetPoint" />
<Array as="points">
<mxPoint x="410" y="466" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-44" value="" style="endArrow=none;html=1;rounded=0;curved=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="588" y="386" as="sourcePoint" />
<mxPoint x="600" y="392" as="targetPoint" />
<Array as="points">
<mxPoint x="591" y="393" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-45" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="404" y="471" as="sourcePoint" />
<mxPoint x="406" y="464" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-46" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="407" y="472" as="sourcePoint" />
<mxPoint x="409" y="465" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-47" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="590" y="394" as="sourcePoint" />
<mxPoint x="593" y="387" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jqilrqFg0j0umUQvlnIg-49" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="592" y="395" as="sourcePoint" />
<mxPoint x="595" y="388" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-1" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="170" y="220" as="sourcePoint" />
<mxPoint x="170" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-25" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i&gt;Z&lt;/i&gt;&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="MWH0NgEk_9BQr2TDpznU-1" vertex="1" connectable="0">
<mxGeometry x="0.9248" relative="1" as="geometry">
<mxPoint x="9" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-2" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" source="MWH0NgEk_9BQr2TDpznU-28" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="270" y="220" as="sourcePoint" />
<mxPoint x="270" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-26" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i&gt;Z&lt;/i&gt;&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="MWH0NgEk_9BQr2TDpznU-2" vertex="1" connectable="0">
<mxGeometry x="0.9086" relative="1" as="geometry">
<mxPoint x="10" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-3" value="" style="endArrow=none;html=1;rounded=0;strokeWidth=2;strokeColor=#a9a9a9;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="140" y="180" as="sourcePoint" />
<mxPoint x="200" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-5" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="210" y="110" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-6" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="180" y="170" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-9" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=1;rounded=0;entryX=0.572;entryY=0.636;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="MWH0NgEk_9BQr2TDpznU-27" target="MWH0NgEk_9BQr2TDpznU-5" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="170" y="220" as="sourcePoint" />
<mxPoint x="250" y="140" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-12" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="270" y="220" as="sourcePoint" />
<mxPoint x="220" y="120" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-13" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 12px;&quot;&gt;p&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;sub&gt;R&lt;/sub&gt;&lt;/span&gt;&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="230" y="180" width="20" height="10" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-14" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 12px;&quot;&gt;P&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="210" y="100" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-15" value="&lt;font face=&quot;Computer modern&quot;&gt;&lt;i&gt;O&lt;sub&gt;L&lt;/sub&gt;&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="160" y="220" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-16" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;entryX=1;entryY=1;entryDx=0;entryDy=0;exitX=0;exitY=1;exitDx=0;exitDy=0;endFill=1;startFill=1;startSize=2;endSize=2;" parent="1" source="MWH0NgEk_9BQr2TDpznU-17" target="MWH0NgEk_9BQr2TDpznU-17" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="60" y="150" as="sourcePoint" />
<mxPoint x="110" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-17" value="&lt;font face=&quot;Computer modern&quot;&gt;u&lt;sub&gt;L&lt;/sub&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="171" y="160" width="19" height="15" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-19" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;entryX=1;entryY=1;entryDx=0;entryDy=0;exitX=0;exitY=1;exitDx=0;exitDy=0;endFill=1;startFill=1;startSize=2;endSize=2;" parent="1" source="MWH0NgEk_9BQr2TDpznU-20" target="MWH0NgEk_9BQr2TDpznU-20" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="140" y="150" as="sourcePoint" />
<mxPoint x="190" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-20" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;u&lt;/font&gt;&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;sub&gt;R&lt;/sub&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="250" y="160" width="19" height="15" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-22" value="&lt;i&gt;&lt;font face=&quot;Computer modern&quot;&gt;f&lt;/font&gt;&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="140" y="181" width="20" height="39" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-23" value="&lt;i&gt;&lt;font face=&quot;Computer modern&quot;&gt;f&lt;/font&gt;&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="280" y="181" width="20" height="39" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-24" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;entryX=0;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=1;exitDx=0;exitDy=0;startSize=2;endSize=2;endFill=1;startFill=1;" parent="1" source="MWH0NgEk_9BQr2TDpznU-23" target="MWH0NgEk_9BQr2TDpznU-23" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="170" y="230" as="sourcePoint" />
<mxPoint x="170" y="190" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-27" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="160.00000000000006" y="210" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-29" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" target="MWH0NgEk_9BQr2TDpznU-28" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="270" y="220" as="sourcePoint" />
<mxPoint x="270" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-28" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="260.00000000000006" y="210" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-31" value="&lt;font style=&quot;font-size: 12px;&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 12px;&quot;&gt;p&lt;/i&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 12px;&quot; face=&quot;onwhB2ShiSGjldjbIV3a&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;sub&gt;L&lt;/sub&gt;&lt;/span&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="190" y="180" width="20" height="10" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-32" value="&lt;font face=&quot;Computer modern&quot;&gt;&lt;i&gt;O&lt;sub&gt;R&lt;/sub&gt;&lt;/i&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="260" y="220" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-33" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" source="MWH0NgEk_9BQr2TDpznU-27" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="200" y="230" as="sourcePoint" />
<mxPoint x="200" y="220" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-36" value="&lt;font size=&quot;1&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 12px;&quot;&gt;X&lt;sub&gt;L&lt;/sub&gt;&lt;/i&gt;&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="MWH0NgEk_9BQr2TDpznU-33" vertex="1" connectable="0">
<mxGeometry x="0.6285" relative="1" as="geometry">
<mxPoint x="13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-34" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="270" y="220" as="sourcePoint" />
<mxPoint x="300" y="220" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-37" value="&lt;font size=&quot;1&quot; face=&quot;Computer modern&quot;&gt;&lt;i style=&quot;font-size: 12px;&quot;&gt;X&lt;sub&gt;R&lt;/sub&gt;&lt;/i&gt;&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="MWH0NgEk_9BQr2TDpznU-34" vertex="1" connectable="0">
<mxGeometry x="0.6932" relative="1" as="geometry">
<mxPoint x="13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-38" value="" style="endArrow=none;html=1;rounded=0;strokeWidth=2;strokeColor=#a9a9a9;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="240" y="180" as="sourcePoint" />
<mxPoint x="300" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-39" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="240" y="170" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-42" value="" style="endArrow=classicThin;startArrow=classicThin;html=1;rounded=0;entryX=1;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0;exitDx=0;exitDy=0;endFill=1;startFill=1;startSize=2;endSize=2;" parent="1" source="MWH0NgEk_9BQr2TDpznU-43" target="MWH0NgEk_9BQr2TDpznU-43" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="110" y="230" as="sourcePoint" />
<mxPoint x="160" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="MWH0NgEk_9BQr2TDpznU-43" value="&lt;i&gt;&lt;font face=&quot;Computer modern&quot;&gt;b&lt;/font&gt;&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="170" y="240" width="99" height="15" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-1" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="240.5" as="sourcePoint" />
<mxPoint x="580" y="160.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-2" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="620" y="240" as="sourcePoint" />
<mxPoint x="640" y="170" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-4" value="Scene" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="520" y="140" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-5" value="Image plane" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="600" y="140" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-7" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="540" y="210" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-8" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="550" y="191" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-9" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="560" y="169" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-11" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="615" y="214" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-12" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="620" y="194" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-13" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="626" y="174" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-14" value="A" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="535" y="213" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-15" value="B" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="545" y="195.5" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-16" value="C" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="555" y="174" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-17" value="&lt;i&gt;a&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="612" y="217" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-18" value="&lt;i&gt;b&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="616" y="198" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-19" value="&lt;i&gt;c&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="622" y="177" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-20" value="L" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="580" y="159" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="T8Tfs2-oFsVKp512B4FH-21" value="&lt;i&gt;l&lt;/i&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Computer modern;" parent="1" vertex="1">
<mxGeometry x="640" y="160" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="bci8e8O8bjfQftyRj0IN-1" value="&lt;i&gt;I&lt;/i&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=15;fontFamily=Computer modern;" vertex="1" connectable="0" parent="1">
<mxGeometry x="400" y="349.9966666666666" as="geometry" />
</mxCell>
<mxCell id="bci8e8O8bjfQftyRj0IN-2" value="&lt;i&gt;F&lt;/i&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=15;fontFamily=Computer modern;" vertex="1" connectable="0" parent="1">
<mxGeometry x="480" y="349.9966666666666" as="geometry">
<mxPoint x="2" y="-2" as="offset" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,13 @@
\documentclass[11pt]{ainotes}
\title{Image Processing and Computer Vision\\(Module 1)}
\date{2023 -- 2024}
\def\lastupdate{{PLACEHOLDER-LAST-UPDATE}}
\begin{document}
\makenotesfront
\input{./sections/_image_acquisition.tex}
\end{document}

View File

@ -0,0 +1,301 @@
\chapter{Image acquisition and formation}
\section{Pinhole camera}
\begin{description}
\item[Imaging device] \marginnote{Imaging device}
Gathers the light reflected by 3D objects in a scene and creates a 2D representation of them.
\item[Computer vision] \marginnote{Computer vision}
Infer knowledge of the 3D scene from 2D digital images.
\end{description}
\begin{description}
\item[Pinhole camera] \marginnote{Pinhole camera}
Imaging device where the light passes through a small pinhole and hits the image plane.
Geometrically, the image is obtained by drawing straight rays from the scene to the image plane passing through the pinhole.
\begin{remark}
Larger aperture size of the pinhole results in blurry images (circle of confusion),
while smaller aperture results in sharper images but requires longer exposure time (as less light passes through).
\end{remark}
\begin{remark}
The pinhole camera is a good approximation of the geometry of the image formation mechanism of modern imaging devices.
\end{remark}
\begin{figure}[h]
\begin{subfigure}{.4\textwidth}
\centering
\includegraphics[width=0.8\linewidth]{./img/pinhole.png}
\caption{Pinhole camera model}
\end{subfigure}
\begin{subfigure}{.45\textwidth}
\centering
\includegraphics[width=0.7\linewidth]{./img/pinhole_hole_size.png}
\caption{Images with varying pinhole aperture size}
\end{subfigure}
\end{figure}
\end{description}
\section{Perspective projection}
\marginnote{Perspective projection}
Geometric model of a pinhole camera.\\
\begin{minipage}{0.65\textwidth}
\begin{description}
\setlength\itemsep{0.2em}
\item[Scene point] $M$ (the object in the real world).
\item[Image point] $m$ (the object in the image).
\item[Image plane] $I$.
\item[Optical center] $C$ (the pinhole).
\item[Image center/piercing point] $c$ (intersection between the optical axis -- the line orthogonal to $I$ passing through $C$ -- and $I$).
\item[Focal length] $f$.
\item[Focal plane] $F$.
\end{description}
\end{minipage}
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/perspective_projection1.png}
\end{minipage}\\
\begin{minipage}{0.55\textwidth}
\begin{itemize}[leftmargin=*]
\item $u$ and $v$ are the horizontal and vertical axis of the image plane, respectively.
\item $x$ and $y$ are the horizontal and vertical axis of the 3D reference system, respectively,
and form the \textbf{camera reference system}. \marginnote{Camera reference system}
\end{itemize}
\begin{remark}
For the perspective model, the coordinate systems $(U, V)$ and $(X, Y)$ must be parallel.
\end{remark}
\end{minipage}
\begin{minipage}{0.35\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/perspective_projection2.png}
\end{minipage}
\begin{description}
\item[Scene--image mapping] \marginnote{Scene--image mapping}
The equations to map scene points into image points are the following:
\[ u = x \frac{f}{z} \hspace*{3em} v = y \frac{f}{z} \]
\begin{proof}
This is the consequence of the triangle similarity theorems.
\begin{minipage}{0.45\textwidth}
\[
\begin{split}
\frac{u}{x} = -\frac{f}{z} &\iff u = -x \frac{f}{z} \\
\frac{v}{y} = -\frac{f}{z} &\iff v = -y \frac{f}{z}
\end{split}
\]
The minus is needed as the axes are inverted
\end{minipage}
\begin{minipage}{0.50\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\textwidth]{./img/_perspective_projection_eq_proof.pdf}
\caption{\small Visualization of the horizontal axis. The same holds on the vertical axis.}
\end{figure}
\end{minipage}
By inverting the axis horizontally and vertically (i.e. inverting the sign),
the image plane can be adjusted to have the same orientation of the scene:
\[ u = x \frac{f}{z} \hspace*{3em} v = y \frac{f}{z} \]
\end{proof}
\begin{remark}
The image coordinates are a scaled version of the scene coordinates.
The scaling is inversely proportioned with respect to the depth.
\begin{itemize}
\item The farther the point, the smaller the coordinates.
\item The larger the focal length, the bigger the object is in the image.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.4\textwidth]{./img/perspective_projection_proportion.png}
\caption{Coordinate space by varying focal length}
\end{figure}
\end{remark}
\begin{remark}
The perspective projection mapping is not a bijection:
\begin{itemize}
\item A scene point is mapped into a unique image point.
\item An image point is mapped onto a 3D line.
\end{itemize}
Therefore, reconstructing the 3D structure of a single image is an ill-posed problem (i.e. it has multiple solutions).
\begin{figure}[H]
\centering
\includegraphics[width=0.3\textwidth]{./img/perspective_projection_loss.png}
\caption{Projection from scene and image points}
\end{figure}
\end{remark}
\end{description}
\subsection{Stereo geometry}
\begin{description}
\item[Stereo vision] \marginnote{Stereo vision}
Use multiple images to triangulate the 3D position of an object.
\item[Stereo correspondence] \marginnote{Stereo correspondence}
Given a point $L$ in an image, find the corresponding point $R$ in another image.
Without any assumptions, an oracle is needed to determine the correspondences.
\end{description}
\begin{description}
\item[Standard stereo geometry] \marginnote{Standard stereo geometry}
Given two reference images, the following assumptions must hold:
\begin{itemize}
\item The $X$, $Y$, $Z$ axes are parallel.
\item The cameras that took the two images have the same focal length $f$ (coplanar image planes) and
the images have been taken at the same time.
\item There is a horizontal translation $b$ between the two cameras (baseline).
\item The disparity $d$ is the difference of the $U$ coordinates of the object in the left and right image.
\end{itemize}
\begin{theorem}[Fundamental relationship in stereo vision] \marginnote{Fundamental relationship in stereo vision}
If the assumptions above hold, the following equation holds:
\[ z = b\frac{f}{d} \]
\begin{proof}
Let $P_L = \begin{pmatrix}x_L & y & z\end{pmatrix}$ and $P_R = \begin{pmatrix}x_R & y & z\end{pmatrix}$ be the
coordinates of the object $P$ with respect to the left and right camera reference system, respectively.
Let $p_L = \begin{pmatrix}u_L & v\end{pmatrix}$ and $p_R = \begin{pmatrix}u_R & v\end{pmatrix}$
be the coordinates of the object $P$ in the left and right image plane, respectively.
By assumption, we have that $P_L - P_R = \begin{pmatrix} b & 0 & 0 \end{pmatrix}$, where $b$ is the baseline.
\begin{minipage}{0.6\textwidth}
By the perspective projection equation, we have that:
\[ u_L = x_L\frac{f}{z} \hspace{3em} u_R = x_R\frac{f}{z} \]
Disparity is computed as follows:
\[ d = u_L - u_R = x_L\frac{f}{z} - x_R\frac{f}{z} = b\frac{f}{z} \]
We can therefore obtain the $Z$ coordinate of $P$ as:
\[ z = b\frac{f}{d} \]
\end{minipage}
\begin{minipage}{0.3\textwidth}
\begin{center}
\includegraphics[width=\textwidth]{./img/_standard_stereo_geometry.pdf}
\end{center}
Note: the $Y$/$V$ axes are not in figure.
\end{minipage}\\
\end{proof}
\begin{remark}
Disparity and depth are inversely proportional:
the disparity of two points decreases if the points are farther in depth.
\end{remark}
\end{theorem}
\begin{description}
\item[Stereo matching] \marginnote{Stereo matching}
If the assumptions for standard stereo geometry hold,
to find the object corresponding to $p_L$ in another image,
it is sufficient to search along the horizontal axis of $p_L$ looking for the same colors or patterns.
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{./img/stereo_matching.png}
\caption{Example of stereo matching}
\end{figure}
\end{description}
\item[Epipolar geometry] \marginnote{Epipolar geometry}
Approach applied when the two cameras are no longer aligned according to the standard stereo geometry assumption.
Still, the focal lengths and the roto-translation between the two cameras must be known.
Given two images, we can project the epipolar line related to the point $p_L$ in the left plane onto the right plane
to reduce the problem of correspondence search to a single dimension.
\begin{figure}[H]
\centering
\includegraphics[width=0.3\textwidth]{./img/_epipolar_geometry.pdf}
\caption{Example of epipolar geometry}
\end{figure}
\begin{remark}
It is nearly impossible to project horizontal epipolar lines and
searching through oblique lines is awkward and computationally less efficient than straight lines.
\end{remark}
\begin{description}
\item[Rectification] \marginnote{Rectification}
Transformation applied to convert epipolar geometry to a standard stereo geometry.
\begin{figure}[H]
\centering
\begin{subfigure}{0.35\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/rectification_no.png}
\caption{Images before rectification}
\end{subfigure}
\begin{subfigure}{0.35\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/rectification_yes.png}
\caption{Images after rectification}
\end{subfigure}
\end{figure}
\end{description}
\end{description}
\subsection{Ratios and parallelism}
Given a 3D line of length $L$ lying in a plane parallel to the image plane at distance $z$,
then its length $l$ in the image plane is:
\[ l = L\frac{f}{z} \]
In all the other cases (i.e. when the line is not parallel to the image plane),
the ratios of lengths and the parallelism of lines are not preserved.
\begin{figure}[h]
\centering
\includegraphics[width=0.3\textwidth]{./img/_perspective_projection_ratio.pdf}
\caption{Example of not preserved ratios. It holds that $\frac{\overline{AB}}{\overline{BC}} \neq \frac{\overline{ab}}{\overline{bc}}$.}
\end{figure}
\begin{description}
\item[Vanishing point] \marginnote{Vanishing point}
Intersection point of lines that are parallel in the scene but not in the image plane.
\begin{figure}[h]
\centering
\includegraphics[width=0.7\textwidth]{./img/_vanishing_point.pdf}
\caption{Example of vanishing point}
\end{figure}
\end{description}
\section{Lens}
\begin{description}
\item[Depth of field (DOF)] \marginnote{Depth of field (DOF)}
Distance at which a scene point is on focus (i.e. when all its light rays gathered by the imaging device hit the image plane at the same point).
\begin{remark}
Because of the small size of the aperture, a pinhole camera has infinite depth of field
but requires a long exposure time making it only suitable for static scenes.
\end{remark}
\item[Lens] \marginnote{Lens}
A lens gathers more light from the scene point and focuses it on a single image point.
This allows for a smaller exposure time but limits the depth of field (i.e. only a limited range of distances in the image can be on focus at the same time).
\begin{description}
\item[Thin lens equation] \marginnote{Thin lens equation}
$\frac{1}{u} + \frac{1}{v} = \frac{1}{f}$
\end{description}
\end{description}