Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Python2 implementation of single image haze removal

NotificationsYou must be signed in to change notification settings

kindraywind/SingleImageHazeRemover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

A Python2 implementation of single image haze removal

The propose of this repository is to implement the image haze removal base on the Zhiming Tan Et al.paper.

Usage

The code can be executed viaterminal

python dehaze.pythen input the PATH_TO_IMAGEimagename.png


Sample input

Original Image

Sample output

Clarified image w=0.95, t0=0.55


How does it work.

This dehaze algorithm contains three steps,

  1. Determine intensity of atmospheric light
  2. Estimate transmission map
  3. 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.

Step#1 Estimate intensity of atmospheric light:

Find the top 0.1% brightest pixels in the dark channel then choose one with highest intensity as the representing of atmospheric light.

Step#2 Estimate transmission map:

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.

Step#3 Clarify image:

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp