Retinex algorithms for image enhancement. They are specially useful to process images with uneven illumination.
Still a work in progress. Next, I want to implement other techniques for color correction.
You may use pip to install retinex.
pip install retinex
Here is an example of how to use MSRCR (multi-scale retinex with color correction).
import skimage
from retinex import msrcr
img_original = skimage.io.imread("leaves.jpg")
img_msrcr = msrcr(img, sigmas=(25., 50., 100.,))
Check the examples
folder for some more samples:
Images in the sample_images
folder were made freely available online by talented photographers. My big thanks to them:
- leaves.jpg: Photo by Rodion Kutsaiev on Unsplash
- man.jpg: Photo by Michael McAuliffe on Unsplash
- park.jpg: Photo by Oleg Lukin on Unsplash
- street.jpg: Photo by Ron Douglas on flickr
- Rahman, Z. U., Jobson, D. J., & Woodell, G. A. (2004). Retinex processing for automatic image enhancement. Journal of Electronic imaging, 13(1), 100-110.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.