LIME: Low-light Image Enhancement
January 12, 2021 · View on GitHub
This is a MATLAB implementation of the paper, "LIME: Low-Light Image Enhancement via Illumination Map Estimation". It was done as a course project for Digital Image Processing (ECN-316), under the guidance of Prof. Saumik Bhattacharya.
- The project report can be found here.
- The paper can be found here.
- The official website for the project can be found here. The demo software provided by the authors contains
.pmat files, for which source code can't be read.
How to Use
Clone the repository:
git clone https://github.com/estija/LIME.git
Open MATLAB, go to the git repository folder.
Add paths
Run the following to the MATLAB command window:
addpath('./BM3D');
addpath('./imgs');
Load images and run
Run the following commands in the MATLAB command window:
img_in = imread('x.bmp');
[Ti, Tout, img_out, Iout] = lime_main_module(img_in, mu, rho, ds, ss, flag);
xis some image fromimgsflag = 1to view the results.TiandToutare initial and refined illumination maps,img_outandIoutare enhanced and denoised results.- Use the table mentioned below for selecting optimum values of
mu,rho,ds,ssfor each image.
Table for optimized hyperparameters
| Name | mu | rho | ds | ss |
|---|---|---|---|---|
| building | 0.01 | 1.188 | 10 | 1.5 |
| cars | 0.045 | 1.134 | 5 | 0.75 |
| lamp | 0.8 | 1.07 | 0.1 | 1 |
| land | 0.5 | 1.09 | 0.3 | 4 |
| moon | 0.01 | 1.2 | 1 | 0.5 |
| paint | 0.3 | 1.15 | 1 | 0.5 |
| robot | 0.01 | 1.25 | 10 | 1 |
| table | 0.002 | 1.035 | 100 | 1 |
| wires | 0.01 | 1.165 | 1 | 0.6 |
Information regarding other files:
-
lime_loop.mis the file for tuning the parameters for the solver, i. e.alpha,mu,rho. -
lime_bf_loop.mis the file for tuning the parameters for the bilateral filter, i. e.ds,ss. By default,lime_bf_loop.mis used for post-processing. -
histeq_all.mis the file for generating the results of applying histogram equalization, on the raw image, in five different ways. -
denoise_bm3d.mis the file for denoising the enhanced result using BM3D. -
The code for BM3D in file
BM3D.mas well as other files related to it have been downloaded and used only for the purpose of comparison with bilateral filtering.
Results
First column: Low-light images, second column: heat map of initial illumination map, third column: heat map of estimated illumination map, fourth column: enhanced results, fifth column: denoised results via bilateral filtering.

Some low-light images from ExDark dataset, and results obtained from our implementation.
Citation
If you find this code helpful and use it in your research, please cite the following work:
@ARTICLE{guo_lime,
author={X. {Guo} and Y. {Li} and H. {Ling}},
journal={IEEE Transactions on Image Processing},
title={LIME: Low-Light Image Enhancement via Illumination Map Estimation},
year={2017},
volume={26},
number={2},
pages={982-993},}