compimg
Introduction
For full documentation visit documentation site.
Image similarity metrics are often used in image quality assessment for performance evaluation of image restoration and reconstruction algorithms. They require two images:
- test image (image of interest)
- reference image (image we compare against)
Such metrics produce numerical values and are widely called full/reduced-reference methods for assessing image quality.
compimg package is all about calculating similarity between images.
It provides image similarity metrics (PSNR, SSIM etc.) that are widely used
to asses image quality.
import numpy as np
from compimg.similarity import SSIM
some_grayscale_image = np.ones((20,20), dtype=np.uint8)
identical_image = np.ones((20,20), dtype=np.uint8)
result = SSIM().compare(some_grayscale_image, identical_image)
assert result == 1.0 # SSIM returns 1.0 when images are identical
Features
- common metrics for calculating similarity of one image to another
- images are treated as
numpyarrays which makescompimgcompatible with most image processing packages - only
scipy(and inherentlynumpy) as a dependency
Installation
compimg is available on PyPI. You can install it using pip:
pip install compimg
Note
Keep in mind that metrics are not aware of what kind of image you are passing. If metric relies on intensity values and you have YCbCr image you should probably pass only the first channel to the computing subroutine.
Help
If you have any problems or questions please post an issue.
Metadata
Release files for compimg 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| compimg-0.2.2.tar.gz | 7.8 kB | Without provenance | Details for compimg-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| compimg-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for compimg-0.2.2-py3-none-any.whl |
Total release size: 22.0 kB
Release files / compimg-0.2.2.tar.gz
| Download URL | compimg-0.2.2.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c509d42f5d822edabe010ceee9220301494d5133e56118e1823cc70d2a1cd906
|
|
BLAKE2b-256 checksum How to use checksums |
f47c6ba9b914f6d52dc1b9800ec0b72b7c860d7688e5e04fdd067ab41bca7fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Release files / compimg-0.2.2-py3-none-any.whl
| Download URL | compimg-0.2.2-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab1c7be397321ccc8a0f655164a5e807a7ae35e8a87ae13bbc5b9cc73cb9c313
|
|
BLAKE2b-256 checksum How to use checksums |
6b4e94b59f83d899445366c68db9dbfedb5246a06c9e01e96c8a3a30e38c6d72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Security for compimg 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.