Phase Quantization

Source code Author Update time

Phase values in an image are important. However, despite this, phase can be quantized very heavily with little perceptual loss. It can be quantized to a few as four levels, or even three. Quantizing to two levels still gives an image that can be interpreted.

using TestImages
using Images
using ImagePhaseCongruency

img = Float64.(restrict(testimage("mandril_gray")))

results = map((8, 4, 3, 2)) do nlevels
    out = quantizephase(img, nlevels)
    clamp01!(Gray.(out))
end
mosaic(results; nrow=1)

This page was generated using DemoCards.jl and Literate.jl.