Shifting filters

The wavelet image processing will be done with periodized wavelets. The related fast wavelet trasform is implemented by replacing the usual convolutions in the filter banks with circular convolutions. In practice, if the filters are shorter than the image's dimensions, it is equivalent to a usual wavelet processing on the periodized image, and restricting the result to the actual domain of the image. The first two filters that you are going to write are circular operators.

To get familiar wih the plugin and its language, make a first filter which will move every pixel 1 pixel to the top and left, circling on the image. As an example, the following enlarged image

should become

The solution is here.

If you try to do the same filter down right, you will see that the cycling does not work. This is due to a bug (feature) of Filter Factory which gives 0 as the result for modulo operations on negative numbers at least on my Mac implementation). Here is an example of what you get int his case:

A variable shifting filter