AMEF is a fast fog removal technique that fuses differently (artificially) underexposed versions of a hazy image into a single haze-free result
Matlab implementation of the AMEF method for image dehazing, described in:
Image Dehazing by Artificial Multi-Exposure Image Fusion
Adrian Galdran
Signal Processing, 149: 135-147, Aug. 2018.
The fusion part of the code borrows from the following work:
"Exposure Fusion",
Tom Mertens, Jan Kautz and Frank Van Reeth
In proceedings of Pacific Graphics 2007
Please consider citing each work appropriately if this code is useful for you. Thanks :)
Open the amef_demo.m
m-file and modify the image name to process your own images.
The most relevant parameter to play with is clip_range
, which in the paper is fixed
to c=0.010
for most of the experiments, but it can be varied. A larger clip_range
will attempt to remove more haze - at the risk of overenhancement:
Influence of the clip-range parameter c on the behavior of AMEF: a) Hazy landscape b)-f) Result of dehazing with b) c=0.003 c) c=0.005 d) c=0.010 e) c=0.015 f) c=0.020
Running AMEF should be quite fast. As explained in the paper, I found that the average runtime tested on images of 720 x 480 resolution1 was 0.7 seconds. If you need further speed, the computationally heaviest part of the method is the fusion scheme; there is an OpenCV implementation of it here that you may want to adapt. Have fun!
All the examples shown in the paper can be reproduced with this code. Additional examples are also included for completeness.
1 In a computer with an Intel® Xeon® E5 CPU at 3.5 GHz.