Skip to content

Commit cbd78a2

Browse files
authored
Enhance proj3.html with new figures and content
Added additional figures and content for Part 4 explaining inverse mapping and interpolation methods.
1 parent cb002ba commit cbd78a2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

project-3/proj3.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ <h3>Part 1</h3>
3535
<figure style="flex: 1 0 30%; margin:12px;">
3636
<img src="images/img_right.png" alt="img_right.png">
3737
</figure>
38+
39+
<figure style="flex: 1 0 30%; margin:12px;">
40+
<img src="images/img_upleft.png" alt="img_upleft.png">
41+
</figure>
42+
43+
<figure style="flex: 1 0 30%; margin:12px;">
44+
<img src="images/img_upcenter.png" alt="img_upcenter.png">
45+
</figure>
46+
47+
<figure style="flex: 1 0 30%; margin:12px;">
48+
<img src="images/img_upright.png" alt="img_upright.png">
49+
</figure>
3850
</div>
3951
<hr>
4052

@@ -157,6 +169,14 @@ <h3>Part 3</h3>
157169
<div align="center">
158170
<a href="https://cjxthecoder.github.io">cjxthecoder</a> | <a href="https://github.com/cjxthecoder">GitHub</a> | <a href="https://www.linkedin.com/in/daniel-cheng-71b475279">LinkedIn</a>
159171
</div>
172+
<hr>
173+
174+
<h3>Part 4</h3>
175+
<p>
176+
With our homography matrix <i>H</i>, we can theoretically directly map the source image to the destination. However, the mapped pixels would not be all integers, which would result in pixels that are not mapped. TO solve this issue, we can use inverse mapping, by first starting with a destination pixel as a vector in the form [<i>u</i>, <i>v</i>, 1]<sup>T</sup> and multiplying the inverse <i>H<sup>-1</sup></i> to obtain the pixel from the source image that should be mapped to the destination pixel, and use 2 methods for computing the color of the pixel from the source: Nearest Neighbor and Bilinear Interpolation.<br>
177+
<br>
178+
To compute the bounds of where to take inverse mapping from, we can transform the coordinates (-0.5, -0.5), (<i>W</i> - 0.5, -0.5), (<i>W</i>, <i>H</i>), and (-0.5, <i>H</i> - 0.5) to provide an upper bound of the transfromed image. We can then round the result to the closest number in &#8484; + 0.5, which is equivalent to casting the result to an integer, since we only need the integer coordinates. Below is a comparison of the 2 methods.
179+
</p>
160180

161181
</main>
162182
</body>

0 commit comments

Comments
 (0)