/GCME

Blind inverse gamma correction with maximum entropy

Primary LanguageJupyter Notebook

Gamma Correction with Maximum Entropy (GCME)

preprint preprint License: MIT

This repository contains code for the accepted paper Blind Inverse Gamma Correction with Maximized Differential Entropy. The best-restored image is assumed with the largest entropy value. Our GCME method obtains a closed-form solution via differential entropy and change-of-variables rule. As a result, our GCME is an exact (non-approximate), accurate, and fast gamma correction algorithm.

results

Motivation

Maximum entropy has been proved to be an effective image prior because most good images should contain sufficient information. Our motivation is very simple, the best gamma should maximize the entropy of transformed image.

Fortunately, we found a closed-form solution to this optimization problem.

which can be efficiently computed with one line Python script for an input image,

# I is the input, and pixel intensity in range (0,1)
gamma = -1/np.nanmean(np.log(I))

More info is referred to the paper.

Install dependencies

conda install numpy matplotlib opencv seaborn
conda install -c conda-forge glob2
# conda install -c conda-forge nibabel   # read MRI images		
conda install -c conda-forge pydicom   # read CT images
conda install pip
pip install nibabel

BibTeX

@article{Lee2021GCME,
		title = {Blind Inverse Gamma Correction with Maximized Differential Entropy},
		author = {Yong Lee and Shaohua Zhang and Miao Li and Xiaoyu He}
		journal = {Signal Processing},
		pages = {108427},
		year = {2021},
		issn = {0165-1684},
		doi = {https://doi.org/10.1016/j.sigpro.2021.108427},
		url = {https://www.sciencedirect.com/science/article/pii/S0165168421004643},
}

Contact

Yong Lee (Email: yongli.cv@gmail.com) @2021-12-08