Skip to content

Commit 2ee1c0d

Browse files
authored
Update proj1.html
1 parent da2b256 commit 2ee1c0d

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

project-1/proj1.html

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,40 @@ <h2>NCC & Preprocessing</h2>
3737
<!-- Section 3 -->
3838
<h2>Naive Search</h2>
3939
<p>
40-
To find the best shift, the simplest way is to compute the NCC for every possible shift within the full image. However, not only is this ineffcient, the best shift would also just be (0, 0) for any image, since the crop would just be a copy of the original crop. To solve this issue, we need to limit how much the height can shift when aligning.<br>
40+
To find the best shift, the simplest way is to compute the NCC for every possible shift within the full image. However, not only is this ineffcient, the best shift would also just be (0, 0) for any image, since the crop would just be a copy of the original crop. To solve this issue, we need to limit how much the height can shift when aligning. Define <i>W</i> and <i>H</i> to be the width and height of the full image respectively, assume, for approximations, that each plate takes up exactly a third of the full image.<br>
4141
<br>
42-
Assume, for approximations, each image takes up exactly a third of the image. Considering only the top/blue plate, we can start by setting upper limit for the top edge to be <i>(0 + H/3) / 2 = H/6</i>, and the bottom edge to be <i>(2H / 3 + 1) / 2 = 5H / 6</i>. This means the top edge should be at least be shifted down by <i>H/6 - 0 = H/6</i>, and the bottom edge by <i>5H / 6 - H/3 = H/2</i>. Therefore, a good place to start is a displacement of <i>(0, (H/6 + H/2) / 2) = (0, H/3)</i> with a search range of <i>H/6</i>. For the bottom/red plate, the equivalent displacement is just <i>(0, -H/3)</i> with the same search range.<br>
42+
Considering only the top/blue plate, we can start by setting upper limit for the top edge to be <i>(0 + H/3) / 2 = H/6</i>, and the bottom edge to be <i>(2H / 3 + 1) / 2 = 5H / 6</i>. This means the top edge should be at least be shifted down by <i>H/6 - 0 = H/6</i>, and the bottom edge by <i>5H / 6 - H/3 = H/2</i>. Therefore, a good place to start is a displacement of <i>(0, (H/6 + H/2) / 2) = (0, H/3)</i> with a search range of <i>H/6</i>. For the bottom/red plate, the equivalent displacement is just <i>(0, -H/3)</i> with the same search range.<br>
4343
<br>
44-
Using a starting crop of <i>(H/16, </i>
44+
Using a starting crop of {<i>(W/16, H/16), (W - W/16, H/3 - H/16)</i>} for the blue plate and a starting crop of {<i>(W/16, H/16 + 2H / 3), (W - W/16, H - H/16)</i>} for the blue plate, we can obtain the following best shifts:
4545
</p>
46-
<div align="center">
47-
<img src="image3.jpg" alt="Description of image 3" width="400">
46+
47+
<div class="two-up" style="display:flex;" role="group" aria-label="Image comparison">
48+
49+
<figure style="flex:1; text-align:center;">
50+
<div class="figure-wrap">
51+
<img class="media" src="images/cathedralNaive.jpg"
52+
alt="cathedralNaive.jpg" loading="lazy" width="25%"/>
53+
</div>
54+
<figcaption>Best shift: (-2, 336), (1, -334)</figcaption>
55+
</figure>
56+
57+
<figure style="flex:1; text-align:center;">
58+
<div class="figure-wrap">
59+
<img class="media" src="cathedralNaive.jpg"
60+
alt="cathedralNaive.jpg" loading="lazy" width="25%"/>
61+
</div>
62+
<figcaption>Best shift: (-2, 344), (1, -335)</figcaption>
63+
</figure>
64+
65+
<figure style="flex:1; text-align:center;">
66+
<div class="figure-wrap">
67+
<img class="media" src="images/tobolskNaive.jpg"
68+
alt="tobolskNaive.jpg" loading="lazy" width="25%"/>
69+
</div>
70+
<figcaption>Best shift: (-3, 338), (1, -337)</figcaption>
71+
</figure>
72+
4873
</div>
49-
<hr>
5074

5175
<!-- Section 4 -->
5276
<h2>Image Pyramid</h2>
@@ -60,7 +84,7 @@ <h2>Image Pyramid</h2>
6084
<!-- Section 5 -->
6185
<h2>Cropping with Sobel</h2>
6286
<p>
63-
This is some body text for subheading 4. Summarize outcomes or provide references.
87+
This is some body text for subheading 5. Summarize outcomes or provide references.
6488
</p>
6589
<div align="center">
6690
<img src="image5.jpg" alt="Description of image 5" width="400">

0 commit comments

Comments
 (0)