Rotation with FFT

Via shear it is possible to rotate an image. Since we also implemented a shear algorithm, rotation can be implemented as well. For details look at this webpage.

Examples

For full interactivity, have a look at this Pluto notebook.

using Revise, FourierTools, Plots, TestImages, PlutoUI, ImageShow

begin
    img = Float32.(testimage("fabio_512_gray"))
    z = zeros(Float32, (768, 768))
    FourierTools.center_set!(z, img)
end


Gray.(FourierTools.rotate(z, 26))

Function references

FourierTools.rotateFunction
rotate(arr, θ, rotation_plane=(1,2))

Rotate an arr in the plane rotation_plane with an angle θ in degree around the center pixel.

rotate! is also available.

source
FourierTools.rotate!Function
rotate!(arr, θ, rotation_plane=(1,2))

Rotate an arr in the plane rotation_plane with an angle θ in degree around the center pixel.

source