imgutils.metrics.psnr_
- Overview:
Implementation of PSNR metrics.
psnr
- imgutils.metrics.psnr_.psnr(img1, img2) float [source]
- Overview:
Psnr difference between images.
- Parameters:
img1 – First image.
img2 – Second image.
- Returns:
Psnr difference of these two images.
- Example:
Here are some images for example
>>> from imgutils.metrics import psnr >>> >>> psnr('psnr/origin.jpg', 'psnr/origin.jpg') # same image inf >>> psnr('psnr/origin.jpg', 'psnr/gaussian_20.dat.jpg') 15.058228614646987 >>> psnr('psnr/origin.jpg', 'psnr/gaussian_3.dat.jpg') 27.65611098737784 >>> psnr('psnr/origin.jpg', 'psnr/lq.dat.jpg') 25.29589659377844