Skip to content

Commit 5921eaf

Browse files
authored
Update proj1.html
1 parent fe42bc6 commit 5921eaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

project-1/proj1.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,31 @@ <h2>Naive Search</h2>
5151
<img class="media" src="images/cathedralNaive.jpg"
5252
alt="cathedralNaive.jpg" loading="lazy" width="25%"/>
5353
</div>
54-
<figcaption>Best shift: (-2, 336), (1, -334)</figcaption>
54+
<figcaption>Best shift: (-2, 336), (1, -334)<br>5.054158s</figcaption>
5555
</figure>
5656

5757
<figure style="flex:1; text-align:center;">
5858
<div class="figure-wrap">
5959
<img class="media" src="cathedralNaive.jpg"
6060
alt="cathedralNaive.jpg" loading="lazy" width="25%"/>
6161
</div>
62-
<figcaption>Best shift: (-2, 344), (1, -335)</figcaption>
62+
<figcaption>Best shift: (-2, 344), (1, -335)<br>5.890041s</figcaption>
6363
</figure>
6464

6565
<figure style="flex:1; text-align:center;">
6666
<div class="figure-wrap">
6767
<img class="media" src="images/tobolskNaive.jpg"
6868
alt="tobolskNaive.jpg" loading="lazy" width="25%"/>
6969
</div>
70-
<figcaption>Best shift: (-3, 338), (1, -337)</figcaption>
70+
<figcaption>Best shift: (-3, 338), (1, -337)<br>5.436964s</figcaption>
7171
</figure>
7272

7373
</div>
7474

7575
<!-- Section 4 -->
7676
<h2>Image Pyramid</h2>
7777
<p>
78-
Unfortunately, because each crop has a dimension of <i>(7W / 8)</i> &times; <i>(5H / 24)</i>, the total number of NCC computations for each alignment is <i>((W - 7W / 8) + 1)</i> &times; <i>((H/3 - 5H / 24) + 1)</i> = <i>(W / 8 + 1)</i> &times; <i>(H / 8 + 1)</i> = <i>O(HW / 64)</i>. Since 1 dot product, 2 elementwise divisions, and 2 matrix norms must be computed, we have <i>HW + 2HW + 4HW = 7HW</i> operations for each NCC computation. Therefore, to align an image of dimensions <i>W</i> &times; <i>H</i>, we have a time complexity of <i>O(7(HW)<sup>2</sup> / 64)</i>.
78+
Unfortunately, because each crop has a dimension of <i>(7W / 8)</i> &times; <i>(5H / 24)</i>, the total number of NCC computations for each alignment is <i>((W - 7W / 8) + 1)</i> &times; <i>((H/3 - 5H / 24) + 1)</i> = <i>(W / 8 + 1)</i> &times; <i>(H / 8 + 1)</i> = <i>O(HW)</i>. Since each NCC computation requires <i>O(HW)</i> operations, aligning an image of dimensions <i>W</i> &times; <i>H</i> takes <i>O((HW)<sup>2</sup>)</i> time. Because the .tif files are about 9 &times; 9 = 81 times bigger than the .jpg files in dimension, performing the same search on these files will require 81<sup>2</sup> &approx; 6500x more time to compute, or 9-11 hours instead of 5-6 seconds. A more efficent method is required.
7979
</p>
8080
<div align="center">
8181
<img src="image4.jpg" alt="Description of image 4" width="400">

0 commit comments

Comments
 (0)