Skip to content

jacob5412/Hazing-and-Dehazing-Project

Repository files navigation

Image Dehazing Through Dark Channel Prior and Color Attenuation Prior

Paper: John J., Sevugan P. (2021) Image Dehazing Through Dark Channel Prior and Color Attenuation Prior. In: Singh M., Tyagi V., Gupta P.K., Flusser J., Ören T., Sonawane V.R. (eds) Advances in Computing and Data Sciences. ICACDS 2021. Communications in Computer and Information Science, vol 1441. Springer, Cham. https://doi.org/10.1007/978-3-030-88244-0_15

Dehazing - Color Attenuation

Implementation of Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior.

  • Q. Zhu, J. Mai, and L. Shao ,"A Fast Single Image Haze Removal Algorithm Using Color Attenuation Prior", in IEEE Transactions On Image Processing, Vol. 24, NO. 11, NOVEMBER 2015, pp. 3522-3533

Instructions

folder structure:
------------------
Dehazing-Color-Attenuation/dehaze.py # main

To dehaze save your image file:

python3 dehaze.py vit_hazy.jpg # the output 'vit_hazy_dehazed.jpg' will be saved in the same folder

Contributions

Dehazing - Dark Channel Prior

This program implement single image dehazing using dark channel prior.

Research Papers

Instructions

folder structure:
------------------
Dehazing-Dark-Channel-Prior/dehaze.py # file to execute

To dehaze save your image file:

python3 dehaze.py image/city2_hazy.png # the output 'city2_hazy_dehazed.png' will be saved in the same folder

Examples - Before and After Dehazing

Before Dehazing

After Dehazing

  • How dehazing works: a simple explanation

Contributions

Hazing

  • Zhang, Ning, Lin Zhang, and Zaixi Cheng. "Towards Simulating Foggy and Hazy Images and Evaluating Their Authenticity." International Conference on Neural Information Processing. Springer, Cham, 2017.

Instructions

folder structure:
------------------
Hazing/FoHIS/const.py  # define const
             fog.py  # main
             parameter.py # all parameters used in simulating fog/haze are defined here.
             tool_kit.py # some useful functions
    
Hazing/AuthESI/compute_aggd.py
               compute_authenticity.py  # main
               guided_filter.py  # some functions
               prisparam_16_hazeandfog.mat  # pre-trained model
        
Hazing/img/img.jpg  # RGB image
           imgd.jpg  # depth image
           result.jpg  # simulation
  1. To simulate fog/haze effects run p:
python fog.py # the output 'result.jpg' will be saved in ../img/
  1. To evaluate the authenticity run :
python compute_authenticity.py # to evaluate 'result.jpg' in ../img/

Contributions

Depth Map

  1. Facebook 3D Photo Depth Map Generator using Monodepth
  2. DhruvJawalkar/Depth-Map-Prediction-from-a-Single-Image-using-a-Multi-Scale-Deep-Network

Instructions

.
├── custom_transforms.py
├── data
│   └── add_dataset_files.md # add NYU dataset here
├── dataset.py
├── depth-prediction.ipynb # run this notebook
├── imgs # put your own images here
├── model_utils.py
├── nn_model.py
└── plot_utils.py
  1. Download NYUDataset using steps from Mega.
  2. Place them in the Depth-Map/data folder.
  3. Download model weights from Mega and place them in the Depth-Map folder.
  4. Place your own images in Depth-Map/imgs
  5. Run the Depth-Map/depth-prediction.ipynb notebook.