- Notifications
You must be signed in to change notification settings - Fork15
kindraywind/SingleImageHazeRemover
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The propose of this repository is to implement the image haze removal base on the Zhiming Tan Et al.paper.
The code can be executed viaterminal
python dehaze.py
then input the PATH_TO_IMAGEimagename.png
This dehaze algorithm contains three steps,
- Determine intensity of atmospheric light
- Estimate transmission map
- Clarify image
First, the intensity of atmospheric lightA
is estimated form hazed imageI(x)
. Then, the transmission mapt(x)
is estimated usingA
andI(x)
. Finally, the image is clarified with the image defogging model.
Find the top 0.1% brightest pixels in the dark channel then choose one with highest intensity as the representing of atmospheric light.
First, find a dark channel based on a local area(coarsemap)Then, the transmission mapt(x)
is thereby obtained:
t(x) = 1 – defoggingParam * darkPixelFromCoarseMap / AtmosphericLightIntensity
ThedefoggingParam
is a value between 0 to 1. The higher value the lesser amount of fog would be kept for the distant objects.
Finally, the image is clarified by:J(x)=(I(x)- A)/max(t(x), t0)+A
WhereJ(x)
is output,I(x)
is input,t(x)
is transmission map,A
is atmospheric light andt0
is set to a constant value to avoid dividing by zero.
About
A Python2 implementation of single image haze removal
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.