Code Monkey home page Code Monkey logo

single-image-dehazing-python's Introduction

Single-Image-Dehazing-Python

python implementation of the paper: "Efficient Image Dehazing with Boundary Constraint and Contextual Regularization"

Results

2

1

3

Installation and Running the tests

method 1

pip install image_dehazer

Usage:

$ import image_dehazer										# Load the library

$ HazeImg = cv2.imread('image_path')						# read input image -- (**must be a color image**)
$ HazeCorrectedImg = image_dehazer.remove_haze(HazeImg)		# Remove Haze

$ cv2.imshow('input image', HazeImg);						# display the original hazy image
$ cv2.imshow('enhanced_image', HazeCorrectedImg);			# display the result
$ cv2.waitKey(0)											# hold the display window

method 2

  1. Go to the src folder
  2. run the file "example.py"
  3. sample images are stored in the "Images/" folder
  4. Output images will be stored in the "outputImages/" folder

Libraries needed:

1.numpy==1.19.0

2.opencv-python

3.scipy

Theory

This code is an implementation of the paper "Efficient Image Dehazing with Boundary Constraint and Contextual Regularization" The algorithm can be divided into 4 parts:

  • Airlight estimation
  • Calculating boundary constraints
  • Estimate and refine Transmission
  • Perform Dehazing using the estimated Airlight and Transmission

License

  • This project is licensed under the BSD 2 License - see the LICENSE.md file for details

Acknowledgements

  • The author would like to thank Gaofeng MENG, Ying WANG, Jiangyong DUAN, Shiming XIANG, Chunhong PAN for their paper "Efficient Image Dehazing with Boundary Constraint and Contextual Regularization"

  • The author would like to thank Alexandre Boucaud. The function psf2otf was obtained from his repository. (https://github.com/aboucaud/pypher/blob/master/pypher/pypher.py)

  • The Author would like to thank Dr. Suresh Merugu for his matlab implementation of the codes. This repository is the python implementation of the matlab codes.

Merugu, Suresh. (2014). Re: How to detect fog in an image and then enhance the image to remove fog?. Retrieved from: https://www.researchgate.net/post/How_to_detect_fog_in_an_image_and_then_enhance_the_image_to_remove_fog/53ae3f10d2fd64c3648b45a9/citation/download.

single-image-dehazing-python's People

Contributors

utkarsh-deshmukh 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.