Code Monkey home page Code Monkey logo

lime's Introduction

LIME: Low-light Image Enhancement

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 .p mat 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); 
  • x is some image from imgs
  • flag = 1 to view the results.
  • Ti and Tout are initial and refined illumination maps, img_out and Iout are enhanced and denoised results.
  • Use the table mentioned below for selecting optimum values of mu, rho, ds, ss for 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.m is the file for tuning the parameters for the solver, i. e. alpha, mu, rho.

  • lime_bf_loop.m is the file for tuning the parameters for the bilateral filter, i. e. ds, ss. By default, lime_bf_loop.m is used for post-processing.

  • histeq_all.m is the file for generating the results of applying histogram equalization, on the raw image, in five different ways.

  • denoise_bm3d.m is the file for denoising the enhanced result using BM3D.

  • The code for BM3D in file BM3D.m as 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},}

lime's People

Contributors

puneesh00 avatar estija avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.