File Exchange

image thumbnail

Rain Removal From Still Images Using L0 Gradient Minimization Technique

version (565 KB) by Manu BN
A Matlab code to remove rain


Updated 29 May 2016

View License

A Matlab code is written to remove rain successfully using Lo gradient minimization technique.
How to run??
1. Unzip and place the folder 'Rain Pixel' in the path of Matlab
2. Run Rain_Removal_GUI.m
3. Select an image from 'Bangalore Rain' folder. Next click on Remove Rain button & observe the results.
4. Next run Verify.m to verify the proposed technique using HOG+SVM approach
The code is based on my paper:
PPT Download Link:
Please cite the below if you are using this for your research:
[1] Manu, B. N. "Rain removal from still images using L0 gradient minimization technique." Information Technology and Electrical Engineering (ICITEE), 2015 7th International Conference on. IEEE, 2015.

Note: The method of rain detection is only approximate and is different than the one mentioned in the paper. Nevertheless gives highly satisfactory results.

Comments & suggestions are always welcome
Thanks in advance,
Manu B.N

Cite As

Manu BN (2021). Rain Removal From Still Images Using L0 Gradient Minimization Technique (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Pavani Gurram

SANKA Nikhil

Rohan Shah

Can anyone explain the mathematical model for detecting rain and the steps in matlab for detecting rain???

Deepa Jayan

Manu BN

Use Matlab 2013, the latest version of Matlab have different gui functions. Hence the errors.
This project was done 3 years ago in Matlab 2013.
Please rate it if you find it useful for academic research

Manas Sarkar

??? Error using ==> imreconstructmex
MARKER pixels must be <= MASK pixels.

Error in ==> imreconstruct at 77
im = imreconstructmex(marker,mask);

Error in ==> Rain_Removal_GUI>pushbutton2_Callback at 188
Iobrcbr = imreconstruct(imcomplement(Iobrd), imcomplement(closeBW));

Error in ==> gui_mainfcn at 96

Error in ==> Rain_Removal_GUI at 46
gui_mainfcn(gui_State, varargin{:});

Error in ==>

??? Error while evaluating uicontrol Callback
This error comes when I click on remove rain button. Please help me Manu...

Manu BN

One can use imshowpair command. I have alredy done the befor /after in the gui itself. Its there in verify.m also.

Rob Campbell

Might be nice to show a before/after example image pair. I think I see only rain in the one you've added.

i Image

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!