Giter Site home page Giter Site logo

hungpt297 / dark-channel-prior-dehazing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joyeecheung/dark-channel-prior-dehazing

0.0 2.0 0.0 133 KB

Python implementation of the CVPR 2009 best paper "Single Image Haze Removal Using Dark Channel Prior"

Python 100.00%

dark-channel-prior-dehazing's Introduction

##Dependencies

  1. pillow(~2.6.0)
  2. Numpy(~1.9.0)

If the scripts throw AttributeError: __float__, make sure your pillow has jpeg support e.g. try:

$ sudo apt-get install libjpeg-dev
$ sudo pip uninstall pillow
$ sudo pip install pillow

##How to generate the results

Enter the src directory, run python main.py. It will use images under img directory as default to produce the results. The results will show up in result directory.

To test special configurations for a given image, for example, to test the image with index 0 (check IMG_NAMES in util.py for indexes) and tmin = 0.2, Amax = 170, w = 15, r = 40, run

$ python main.py -i 0 -t 0.2 -A 170 -w 15 -r 40

Naming convetion of the results

For input image name.jpg using the default parameters, the naming convention is:

  1. dark channel: name-dark.jpg
  2. raw transmission map: name-rawt.jpg
  3. refined tranmission map: name-refinedt.jpg
  4. image dehazed with the raw transmission map: name-radiance-rawt.jpg
  5. image dehazed with the refined transmission map: name-radiance-refinedt.jpg

If there are special configurations for the parameters, for example, , then the base name will be appended with -20-170-50-40 e.g. the dark channel is name-dark-20-170-50-40.jpg

##Directory structure

.
├─ README.md
├─ requirements.txt
├─ doc
│   └── report.pdf
├─ img (source images)
│   └── ... (input images from CVPR 09 supplementary materials)
├─ result (the results)
│   └── ...
└─ src (the python source code)
    ├── dehaze.py (dehazing using the dark channel prior)
    ├── main.py (generate the results for the report)
    ├── guidedfilter.py (guided filter)
    └── util.py (utilities)

##About

dark-channel-prior-dehazing's People

Contributors

joyeecheung avatar

Watchers

James Cloos avatar  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.