-Unfortunately, because each crop has a height of <i>(7W / 8)</i> × <i>(5H / 24)</i>, the total number of NCC computations for each alignment is <i>((W - 7W / 8) + 1)</i> × <i>((H/3 - 5H / 24) + 1)</i> = <i>(W / 8 + 1)</i> × <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> × <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 (hours instead of seconds). Even if the width is fixed, it would still require more than 9<sup>3</sup> ≈ 720x more time on .tif files. A more efficient method is required.
0 commit comments