ImageQualityIndexes provides the basic image quality assessment methods. Check the reasoning behind the code design here if you're interested in.
Full reference indexes
assess_psnr-- Peak signal-to-noise ratio
assess_ssim-- Structural similarity
assess_msssim-- Multi-scale SSIM
The root type is
ImageQualityIndex, each concrete index is supposed to be one of
There are three ways to assess the image quality:
- use the general protocol, e.g.,
assess(PSNR(), x, ref). This reads as "assess the image quality of x using method PSNR with information ref"
- each index instance is itself a function, e.g.,
- for well-known indexes, there are also convenient name for it for benchmark purpose.
For detailed usage of particular index, please check the docstring (e.g.,
using Images, TestImages using ImageQualityIndexes img = testimage("cameraman") .|> float64 noisy_img = img .+ 0.1 .* randn(size(img)) assess_ssim(noisy_img, img) # 0.24112 assess_psnr(noisy_img, img) # 19.9697 kernel = ones(3, 3)./9 # mean filter denoised_img = imfilter(noisy_img, kernel) assess_psnr(denoised_img, img) # 28.4249 assess_ssim(denoised_img, img) # 0.6390 assess_msssim(denoised_img, img) # 0.8460 img = testimage("fabio"); colorfulness(img) # 68.5530