# Blind/Referenceless Image Spatial Quality Evaluator (BRISQUE)
BRISQUE is a no-reference image quality score.
A good place to know how BRISQUE works : [LearnOpenCV](https://learnopencv.com/image-quality-assessment-brisque/)
## Installation
```bash
pip install brisque
```
## Usage
1. Trying to perform Image Quality Assessment on **local images**
```python
from brisque import BRISQUE
obj = BRISQUE(url=False)
obj.score("<Ndarray of the Image>")
```
2. Trying to perform Image Quality Assessment on **web images**
```python
from brisque import BRISQUE
obj = BRISQUE(url=True)
obj.score("<URL for the Image>")
```
### Example
#### Local Image
- Input
```python
from 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
```python
from 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/rehanguha/brisque",
"name": "brisque",
"maintainer": null,
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": null,
"keywords": "quality, svm, image, maths",
"author": "Rehan Guha",
"author_email": "rehanguha29@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7b/f4/7f47afe23b9228aba4b91b7d34f56afd9b8c47454d193f2eeab8b743095a/brisque-0.0.16.tar.gz",
"platform": null,
"description": "# Blind/Referenceless Image Spatial Quality Evaluator (BRISQUE) \n\nBRISQUE is a no-reference image quality score.\n\nA good place to know how BRISQUE works : [LearnOpenCV](https://learnopencv.com/image-quality-assessment-brisque/)\n\n\n## Installation\n\n```bash\npip install brisque\n```\n\n## Usage\n\n1. Trying to perform Image Quality Assessment on **local images** \n```python\nfrom brisque import BRISQUE\n\nobj = BRISQUE(url=False)\nobj.score(\"<Ndarray of the Image>\")\n```\n\n2. Trying to perform Image Quality Assessment on **web images** \n```python\nfrom brisque import BRISQUE\n\nobj = BRISQUE(url=True)\nobj.score(\"<URL for the Image>\")\n```\n\n### Example\n\n#### Local Image\n\n- Input\n```python\nfrom brisque import BRISQUE\nimport numpy as np\nfrom PIL import Image\n\nimg_path = \"brisque/tests/sample-image.jpg\"\nimg = Image.open(img_path)\nndarray = np.asarray(img)\n\nobj = BRISQUE(url=False)\nobj.score(img=ndarray)\n```\n- Output\n```\n34.84883848208594\n```\n\n#### URL\n\n- Input\n```python\nfrom brisque import BRISQUE\n\nURL = \"https://www.mathworks.com/help/examples/images/win64/CalculateBRISQUEScoreUsingCustomFeatureModelExample_01.png\"\n\nobj = BRISQUE(url=True)\nobj.score(URL)\n```\n- Output\n```\n71.73427549219988\n```\n\n\n",
"bugtrack_url": null,
"license": "mit",
"summary": "Image Quality",
"version": "0.0.16",
"project_urls": {
"Homepage": "https://github.com/rehanguha/brisque"
},
"split_keywords": [
"quality",
" svm",
" image",
" maths"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "04ca31d0eaac691d01ac80fc9e903dc66616eb32ae6615fcefc90c1259917355",
"md5": "4e717f6a043b9f12cffb00d4bc42695d",
"sha256": "2abfb0ecbb8d392e4d8697d55854087a74cbf51bd2f7fee9bd39c1e6f2277683"
},
"downloads": -1,
"filename": "brisque-0.0.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e717f6a043b9f12cffb00d4bc42695d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.7",
"size": 140097,
"upload_time": "2024-05-02T13:10:45",
"upload_time_iso_8601": "2024-05-02T13:10:45.652621Z",
"url": "https://files.pythonhosted.org/packages/04/ca/31d0eaac691d01ac80fc9e903dc66616eb32ae6615fcefc90c1259917355/brisque-0.0.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7bf47f47afe23b9228aba4b91b7d34f56afd9b8c47454d193f2eeab8b743095a",
"md5": "9cacb02ccd65bdd916d35949794d9843",
"sha256": "10d9498a5f8b4f43660203ac2dfab11514d9937d9f09cb694805c8fd7e57b0a4"
},
"downloads": -1,
"filename": "brisque-0.0.16.tar.gz",
"has_sig": false,
"md5_digest": "9cacb02ccd65bdd916d35949794d9843",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 141076,
"upload_time": "2024-05-02T13:10:47",
"upload_time_iso_8601": "2024-05-02T13:10:47.326209Z",
"url": "https://files.pythonhosted.org/packages/7b/f4/7f47afe23b9228aba4b91b7d34f56afd9b8c47454d193f2eeab8b743095a/brisque-0.0.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-02 13:10:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rehanguha",
"github_project": "brisque",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "brisque"
}