Python package for Grayness Index
Project description
Grayness Index
Unofficial Python implementation of the paper named "On Finding Gray Pixels".
Disclaimer:
You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL, but applications that use the library don't have to be.
Installation
pip install grayness-index-python
Basic Usage
import numpy as np
import math
from scipy.io import loadmat
from grayness_index import GraynessIndex
gi = GraynessIndex()
mat = loadmat("imgs/exampleimg.mat")
gt = mat["gt"]
input_im = mat["input_im"] # np.ndarray with shape H x W x 3.
pred_illum = gi.apply(input_im)
error = np.arccos(pred_illum @ gt.transpose()) * 180 / math.pi
log.info(f"Error: {error}")
References
To cite the original paper:
@inproceedings{qian2019cvpr,
title={On Finding Gray Pixels},
author={Qian, Yanlin and K{\"a}m{\"a}r{\"a}inen, Joni-Kristian and Nikkanen, Jarno and Matas, Jiri},
booktitle={IEEE International Conference of Computer Vision and Pattern Recognition},
year={2019}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grayness_index_python-0.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: grayness_index_python-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdf8fe5e145bebde41685ea4b04e9a221b9749f9ed9e9dc473ebfe788c77e243
|
|
| MD5 |
ff97d19444936027cae37b22cc251d1c
|
|
| BLAKE2b-256 |
a4cf5df72819f2259dd6de5bd0af6378a58820771edc70fc3ad1401cad45eb74
|