Skip to content

An implementation of Fattal's 'Dehazing using Color-Lines'

Notifications You must be signed in to change notification settings

killsking/dehazing_using_color_lines

 
 

Repository files navigation

Dehazing using Color-lines

This repository contains an open source implementation of Fattal's algorithm for dehazing. It is meant as an accessible implementation with low complexity and ample documentation that can be used as an aid for studying the algorithm.

For a compiled implementation, consider the implementations by Ekesium and Tomlk (also pixel-wise inference, but in scala and C++). Alternatively, consider writing a vectorized implementation.

Current result

How to Use

Use a venv and install the required packages by running pip install -r requirements.txt.
Execute python dehaze.py to dehaze images/bricks.png.

Example output

example output .

To find other images with a given airlight vector, see the paper's result page.

File structure

Name Purpose
dehaze.py Main function
ransac.py RANSAC algorithm for evaluating color-line hypotheses
window.py A windowing class for concise tiling
color_line.py Functions for evaluating color-line validity
constants.py All constants and thresholds (comments note where it deviates from Fattal)
linear_interpolation.py Linear interpolation of the transmission image
markov_random_field.py Markov random field interpolation and smoothing functions (autograd optimization)
recover.py Recovers the dehazed pixel values given the estimated transmission map

TODO

About

An implementation of Fattal's 'Dehazing using Color-Lines'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 93.8%
  • Python 6.2%