nanshe-org / nanshe

An image processing toolkit
https://nanshe-org.github.io/nanshe
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Wrap large and negative shifts #444

Closed jakirkham closed 7 years ago

jakirkham commented 7 years ago

If a shift is larger than the frame size, convert to one that is within the frame size. Also if a shift is negative, convert it to one that is positive. This works as we have periodic boundary conditions as a consequence of working in Fourier space. Thus each frame effectively has another frame just like it on all of its boundaries and so on for each of those frames. As a result, a shift equal to frame size in any dimension is just a no-op for that dimension's shift. This allows us to chose the smallest shifts possible.

jakirkham commented 7 years ago

Reverting in PR ( https://github.com/nanshe-org/nanshe/pull/446 ) as we have determined this is unnecessary.