Skip to content

Commit d58279f

Browse files
authored
Modify title and enhance content in proj3.html
Updated the title and author information in the HTML file. Added content regarding image processing techniques and examples.
1 parent 6b6554f commit d58279f

File tree

1 file changed

+53
-4
lines changed

1 file changed

+53
-4
lines changed

project-3/proj3.html

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<title>Image Processing Report</title>
7-
<!-- Plain HTML template (no CSS). Replace placeholder text and image sources. -->
6+
<title>CS 180 Project 3A</title>
87
</head>
98
<body>
109
<header>
1110
<h1>Project 3A: Image Wrapping and Mosaicing</h1>
1211
<div align="center">
1312
<p>
14-
by Daniel Cheng | October 1, 2025
13+
by Author | Current Date
1514
</p>
1615
</div>
1716
</header>
@@ -93,9 +92,59 @@ <h3>Part 2</h3>
9392

9493
<h3>Part 3</h3>
9594
<p>
96-
Given the following image:
95+
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>
96+
<br>
97+
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), and 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.
9798
</p>
9899

100+
<div align="center">
101+
<figcaption style="margin-bottom:6px;">Original</figcaption>
102+
<img src="images/img_right.png" alt="img_right.png" width="50%">
103+
</div>
104+
105+
<div style="display:flex; flex-wrap:wrap; justify-content:center; text-align:center;">
106+
107+
<figure style="flex: 1 0 20%; margin:12px;">
108+
<figcaption style="margin-bottom:6px;">Transformed using NN Interpolation</figcaption>
109+
<img src="images/imwraped_nearestneighborR.jpg" alt="imwraped_nearestneighborR.jpg" width="50%">
110+
</figure>
111+
112+
<figure style="flex: 1 0 20%; margin:12px;">
113+
<figcaption style="margin-bottom:6px;">Transformed using Bilinear Interpolation</figcaption>
114+
<img src="images/imwraped_bilinearR.jpg" alt="imwraped_bilinearR.jpg" width="50%">
115+
</figure>
116+
</div>
117+
118+
<p>
119+
We can also perform image rectification using this tool by transforming a non-rectangular region into a rectangular one. Because we only care about the pixels in the selected region, we can precompute the final dimensions of the rectangle and only perform inverse mapping on the given region. Below are 2 examples of rectifying an image:
120+
</p>
121+
122+
<div style="display:flex; flex-wrap:wrap; justify-content:center; text-align:center;">
123+
124+
<figure style="flex: 1 0 20%; margin:12px;">
125+
<figcaption style="margin-bottom:6px;">Original</figcaption>
126+
<img src="images/evacuationplan.png" alt="evacuationplan.png" width="50%">
127+
</figure>
128+
129+
<figure style="flex: 1 0 20%; margin:12px;">
130+
<figcaption style="margin-bottom:6px;">Rectified</figcaption>
131+
<img src="images/ep_rectif.jpg" alt="ep_rectif.jpg" width="50%">
132+
</figure>
133+
</div>
134+
135+
<div style="display:flex; flex-wrap:wrap; justify-content:center; text-align:center;">
136+
137+
<figure style="flex: 1 0 20%; margin:12px;">
138+
<figcaption style="margin-bottom:6px;">Original</figcaption>
139+
<img src="images/cs170.png" alt="cs170.png" width="50%">
140+
</figure>
141+
142+
<figure style="flex: 1 0 20%; margin:12px;">
143+
<figcaption style="margin-bottom:6px;">Rectified</figcaption>
144+
<img src="images/cs170_rectif.jpg" alt="cs170_rectif.jpg" width="50%">
145+
</figure>
146+
</div>
147+
99148
</main>
100149
</body>
101150
</html>

0 commit comments

Comments
 (0)