This is a support repository for the upcoming research article on polychromatic images rotations and Gibbs-like oscillations analysis
Current Caveats: Images at almost size N = 68 are possible, this is because the binomial involved in the calculation of the Kravchuk matrices go overflow for greater combination values > {67, 30}.
Functions provided:
kmatrix(j)
gives a matrix of (2j + 1)² elements filled with elements of the Kravchuk function k(n, q; j). The method is implemented atsrc/Krav.jl
Emodes(M::Matrix, θ)
gives the elements of an image of (2j + 1)² rotated by an angle θ. This method relays on a decomposition on lower and upper transformation modesDmodes(M::Matrix, θ)
andUmodes(M::Matrix, θ)
whose sum entails the full rotation.
Naive Benchmarks:
Testing the Emodes(M, θ)
function runtime on a test image given by a "discrete delta" centered at q = 16 for j = 15.
julia> using UnitRots
julia> using ImageCore
julia> input = Int64.(channelview(Gray.(load("data/benchmark/delta31.png"))))
julia> out = @benchmark Emodes(input, π/4)
BenchmarkTools.Trial: 1 sample with 1 evaluation.
Single result which took 28.734 s (2.96% GC) to evaluate,
with a memory estimate of 39.82 GiB, over 7629506 allocations.
We see, that for an image of 31² = 961 pixels, we have a runtime of the function Emodes(M, θ)
of approximately 29 seconds. Below, the original discrete delta on left side, and the rotation by π/4 on the right side.
README v0.1
Authors:
- AR. Urzúa (Theory and computational implementation) @ https://arurz.xyz/
- KB. Wolf (Theory) @ https://www.fis.unam.mx/~bwolf/