Ask Your Question

Detecting fog/haze in a video frame

asked 2016-02-08 18:22:33 -0600

bitbyteword gravatar image


I have a lot of video shot on my go-pro that isn't very clear when there is a lot of fog/haze. I am trying to write a program that can somehow detect the fog, apply a mask on the frame and give out a clearer video output. The end goal is to make the video clearer when used in foggy conditions.

Do you guys have any recommendations on what functions/algorithms I could use? Any kind of input that would atleast get me started is appreciated.


edit retag flag offensive close merge delete



what have you tried so far ?

also, an example image would be helpful

berak gravatar imageberak ( 2016-02-09 01:16:26 -0600 )edit

Oh wait, you want your image processing to remove existing image data and replace it with data that is not there? Quite challenging. One thing I would suggest is to look for gradient information. Due to the fog gradients will be very smooth. Try to define local maxima and then make them strong edges using custom build filters. This should remove the foggy view!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-02-09 07:28:55 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-09 15:36:02 -0600

Tetragramm gravatar image

updated 2016-02-10 02:48:43 -0600

StevenPuttemans gravatar image

You'll have it implement it yourself, but take a look here:

Feel free to contribute the results.

Or, if you're being really simple, run histogram equalization on each of the three channels.

Update by @StevenPuttemans

Before starting to implement this from scratch, take a look at these two implementations


Reinventing the wheel is not always the best approach!

edit flag offensive delete link more


Nice publication. About the histogram equalization, I can imagine a lot of cases where this will go terribly wrong ... imagine car headlights and fog combinations for example ... also added some links to existing implementations of the Microsoft research!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-02-10 02:43:05 -0600 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-02-08 18:22:33 -0600

Seen: 403 times

Last updated: Feb 10 '16