Image Quality
Project description
Blind/Referenceless Image Spatial Quality Evaluator (BRISQUE)
BRISQUE is a no-reference image quality score.
A good place to know how BRISQUE works : LearnOpenCV
Installation
# You will need to specify which version of OpenCV you intend to use with BRISQUE:
# * opencv-python
# * opencv-python-headless
# * opencv-contrib-python
# * opencv-contrib-python-headless
# You can do this with `pip install brisque[<YOUR CHOSEN VERSION HERE>]`, e.g.
pip install [opencv-python-headless]
Usage
- Trying to perform Image Quality Assessment on local images
from brisque.brisque import BRISQUE
obj = BRISQUE(url=False)
obj.score("<Ndarray of the Image>")
- Trying to perform Image Quality Assessment on web images
from brisque.brisque import BRISQUE
obj = BRISQUE(url=True)
obj.score("<URL for the Image>")
Example
Local Image
- Input
from brisque.brisque import BRISQUE
import numpy as np
from PIL import Image
img_path = "brisque/tests/sample-image.jpg"
img = Image.open(img_path)
ndarray = np.asarray(img)
obj = BRISQUE(url=False)
obj.score(img=ndarray)
- Output
34.84883848208594
URL
- Input
from brisque.brisque import BRISQUE
URL = "https://www.mathworks.com/help/examples/images/win64/CalculateBRISQUEScoreUsingCustomFeatureModelExample_01.png"
obj = BRISQUE(url=True)
obj.score(URL)
- Output
71.73427549219988
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.
Source Distribution
brisque_opencv-0.0.17.tar.gz
(141.4 kB
view hashes)
Built Distribution
Close
Hashes for brisque_opencv-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc18154f34df06d223773a116ab0d7cd838ebbba5d6d90994c710ef6e9f0fe72 |
|
MD5 | 89fc26e96dec225a5905b378479118c7 |
|
BLAKE2b-256 | 3b53ee13a3086ab4e2e8766bf5016a4e5ece902f085ca06569d476d5c512cbb7 |