Comparison of two images using the structural similarity algorithm (SSIM).
Project description
SSIM-PIL
Comparison of two images using the structural similarity algorithm (SSIM). The resulting value varies between 1.0 for identical images and 0.0 for completely different images. It's based on the PIL and also supports GPU acceleration via pyopencl.
Installation
python3 -m pip install SSIM-PIL
Be sure to install a working version of pyopencl to benefit from faster parallel execution on the GPU. (The code was tested with OpenCl version 1.2.)
Usage Example
from SSIM_PIL import compare_ssim from PIL import Image image1 = Image.open(path) image2 = Image.open(path) value = compare_ssim(image1, image2) print(value)
Feedback
For feedback please contact me over github: https://github.com/ChsHub/SSIM-PIL.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size SSIM_PIL-1.0.12-py3-none-any.whl (8.4 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size SSIM-PIL-1.0.12.tar.gz (5.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for SSIM_PIL-1.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65f0df84acd562f087c47aaf9b78d1533950e7bf23c07cf1894b11fefdc352a5 |
|
MD5 | a165176b1dab13503f8c4be109bb9c17 |
|
BLAKE2-256 | 783375c4bfc97c702eba3c611369b70064bbf0c30ecd0c601afa5e105d4654ea |