Here is the matlab code for Contrast limited adaptive histogram equalization algorithm,. You can input your image and see the results. It is very useful for foggy images though some color noise may come. Try varying the value of parameter lambda to get modified results. Less lambda gives better result.. Adjust according to your requirement/