The implementation in the space domain requires an odd window size, which is automatically forced (not strictly necessary, but this made the implementation a bit easier because the center of the shifting window is defined at a pixel.) For each location the (zero meaned) slave magnitude window is shifted over the (zero mean) master window, and the correlation is computed (see equation D.24) by computing all pointwize products and dividing by the norms of the particular windows.

Leijen 2009-04-14