{"id":15020360,"url":"https://github.com/utkarsh-deshmukh/single-image-dehazing-python","last_synced_at":"2025-04-09T16:11:06.007Z","repository":{"id":50358366,"uuid":"274588703","full_name":"Utkarsh-Deshmukh/Single-Image-Dehazing-Python","owner":"Utkarsh-Deshmukh","description":"python implementation of the paper: \"Efficient Image Dehazing with Boundary Constraint and Contextual Regularization\"","archived":false,"fork":false,"pushed_at":"2024-05-30T02:15:46.000Z","size":7883,"stargazers_count":117,"open_issues_count":3,"forks_count":28,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T16:10:59.949Z","etag":null,"topics":["airlight-estimation","computer-vision","defogging","fog-removal","haze-removal","haze-removal-algorithm","ieee","image-dehazing","opencv","python","single-image-defogging","single-image-dehazing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Utkarsh-Deshmukh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-24T06:06:06.000Z","updated_at":"2025-04-04T10:08:46.000Z","dependencies_parsed_at":"2024-01-15T20:01:43.278Z","dependency_job_id":"14a1fbe9-f5a1-45ce-9870-c4d124e66644","html_url":"https://github.com/Utkarsh-Deshmukh/Single-Image-Dehazing-Python","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.4,"last_synced_commit":"8125a08a6c2d57e4b9a0b8c94233d14be6537e13"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh-Deshmukh%2FSingle-Image-Dehazing-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh-Deshmukh%2FSingle-Image-Dehazing-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh-Deshmukh%2FSingle-Image-Dehazing-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh-Deshmukh%2FSingle-Image-Dehazing-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Utkarsh-Deshmukh","download_url":"https://codeload.github.com/Utkarsh-Deshmukh/Single-Image-Dehazing-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065284,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airlight-estimation","computer-vision","defogging","fog-removal","haze-removal","haze-removal-algorithm","ieee","image-dehazing","opencv","python","single-image-defogging","single-image-dehazing"],"created_at":"2024-09-24T19:54:57.728Z","updated_at":"2025-04-09T16:11:05.982Z","avatar_url":"https://github.com/Utkarsh-Deshmukh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single-Image-Dehazing-Python\npython implementation of the paper: \"Efficient Image Dehazing with Boundary Constraint and Contextual Regularization\"\n\n## Installation and Running the tests\n\n### method 1\n  ```\n  pip install image_dehazer\n  ```\n  \n  **Usage:**\n  ```\n  import image_dehazer\t\t\t\t\t\t\t\t\t\t# Load the library\n\n  HazeImg = cv2.imread('image_path')\t\t\t\t\t\t# read input image -- (**must be a color image**)\n  HazeCorrectedImg, HazeTransmissionMap = image_dehazer.remove_haze(HazeImg)\t\t# Remove Haze\n\n  cv2.imshow('input image', HazeImg);\t\t\t\t\t\t# display the original hazy image\n  cv2.imshow('enhanced_image', HazeCorrectedImg);\t\t\t# display the result\n  cv2.waitKey(0)\t\t\t\t\t\t\t\t\t\t\t# hold the display window\n  ```\n### user controllable parameters (with their default values):\n```\nairlightEstimation_windowSze=15\nboundaryConstraint_windowSze=3\nC0=20\nC1=300\nregularize_lambda=0.1\nsigma=0.5\ndelta=0.85\nshowHazeTrasmissionMap=True\n```\n### method 2\n\n  1. Go to the src folder\n  2. run the file \"example.py\"\n  3. sample images are stored in the \"Images/\" folder\n  4. Output images will be stored in the \"outputImages/\" folder\n\n\n# Libraries needed:\n  1.numpy==1.19.0\n  \n  2.opencv-python\n  \n  3.scipy\n\n# Theory\nThis code is an implementation of the paper \"Efficient Image Dehazing with Boundary Constraint and Contextual Regularization\"\nThe algorithm can be divided into 4 parts:\n  - Airlight estimation\n  - Calculating boundary constraints\n  - Estimate and refine Transmission\n  - Perform Dehazing using the estimated Airlight and Transmission\n  \n# License\n  - This project is licensed under the BSD 2 License - see the LICENSE.md file for details\n  \n# Acknowledgements\n\n  - The author would like to thank \"Gaofeng MENG\" and his implementation of his algorithm: https://github.com/gfmeng/imagedehaze\n\n  - 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\"\n  \n  - 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)\n  \n  - 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.\n  \n  - The Author would like to thank Mayank Singal for his repository \"[PyTorch-Image-Dehazing](https://github.com/MayankSingal/PyTorch-Image-Dehazing)\" which gives a pytorch implementation of the AOD-Net architecture. [Link to ICCV 2017 paper](https://openaccess.thecvf.com/content_ICCV_2017/papers/Li_AOD-Net_All-In-One_Dehazing_ICCV_2017_paper.pdf)\n \n 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. \n\n\n# Citation\n```\n@INPROCEEDINGS{6751186, \n  author={G. Meng and Y. Wang and J. Duan and S. Xiang and C. Pan}, \n  booktitle={IEEE International Conference on Computer Vision}, \n  title={Efficient Image Dehazing with Boundary Constraint and Contextual Regularization}, \n  year={2013}, \n  volume={}, \n  number={}, \n  pages={617-624}, \n  month={Dec},}\n```\n\n# Results\n![2](https://user-images.githubusercontent.com/13918778/84451507-1cbbb180-ac08-11ea-816f-8ec983fd370d.JPG)\n============================================================================================================\n![1](https://user-images.githubusercontent.com/13918778/84451353-b0d94900-ac07-11ea-8f1b-3791e9f2f600.JPG)\n============================================================================================================\n![3](https://user-images.githubusercontent.com/13918778/84451641-8471fc80-ac08-11ea-8a7d-59f566b1c3bb.JPG)\n\n\n\n\n# Performance Comparison:\nIn this section, I am comparing the dehazing output with that of AOD-Net. I am using this [python implementation of AOD-Net](https://github.com/MayankSingal/PyTorch-Image-Dehazing/tree/master) to run a pretrained AOD-Net model\n![image](https://github.com/Utkarsh-Deshmukh/Single-Image-Dehazing-Python/assets/13918778/f61f6906-e466-487b-ad8c-b289b2d95b90)\n\n\nHere are some cases where AOD-Net is better:\n![image](https://github.com/Utkarsh-Deshmukh/Single-Image-Dehazing-Python/assets/13918778/c04d8157-40d1-4a92-b3fb-e85f1c50326c)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh-deshmukh%2Fsingle-image-dehazing-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkarsh-deshmukh%2Fsingle-image-dehazing-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh-deshmukh%2Fsingle-image-dehazing-python/lists"}