Skip to content

Commit 6212d11

Browse files
authored
Update proj1.html
1 parent d85fdbb commit 6212d11

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

project-1/proj1.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h2>Naive Search</h2>
7171

7272
</div>
7373

74-
Unfortunately, because each crop has a height 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 using the naive search above. Because the .tif files are about 9 times bigger than the .jpg files in both dimensions, performing the same search on these files will take more than 6500x more times longer to compute. Even if we don't crop horizontally at all, it would still have a complexity of <i>O(H<sup>2</sup>W)</i> and require more than 9<sup>3</sup> &approx; 720x more time on .tif files. A more efficient method is required.
74+
Unfortunately, because each crop has a height 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>3W</i> takes <i>O(W<sup>2</sup>)</i> time using the naive search above. Because the .tif files are about 9 times bigger than the .jpg files in both dimensions, performing the same search on these files will take more than 6500x more times longer to compute. Even if we don't crop horizontally at all, it would still have a complexity of <i>O(W<sup>3</sup>)</i> and require more than 9<sup>3</sup> &approx; 720x more time on .tif files. A more efficient method is required.
7575
<hr>
7676

7777
<!-- Section 4 -->
@@ -184,16 +184,10 @@ <h2>Image Pyramid</h2>
184184
</figure>
185185

186186
</div>
187-
<hr>
188-
189-
<!-- Section 5 -->
190-
<h2>Cropping with Sobel</h2>
191187
<p>
192-
This is some body text for subheading 5. Summarize outcomes or provide references.
188+
Even for small images, the pyramid method achived over an 100x speedup, while for large images, the compute time is faster than using naive search to align 1 image. More concretely, because the image is downscaled by 2x at each layer of the pyramid, the total image area is less than 1 + (1/2)<sup>2</sup> + (1/4)<sup>2</sup> + (1/8)<sup>2</sup> + ... = 1 + 1/4 + 1/16 + 1/64 + ... &lt; 4/3 of the original. Since the search at the lowest scale is limited to W &leq; 72, the total time complexity is only <i>4(3W)W / 3</i> + smaller terms = <i>O(W<sup>2</sup>)</i>, at least a full width factor faster than the naive method.
193189
</p>
194-
<div align="center">
195-
<img src="image5.jpg" alt="Description of image 5" width="400">
196-
</div>
190+
<hr>
197191

198192
</body>
199193
</html>

0 commit comments

Comments
 (0)