Image Enhancement in Daytime Fog Conditions Mihai Negru Computer Science Department Technical University of Cluj-Napoca Cluj-Napoca, Romania Email: Mihai.Negru@cs.utcluj.ro Sergiu Nedevschi Computer Science Department Technical University of Cluj-Napoca Cluj-Napoca, Romania Email: Sergiu.Nedevschi@cs.utcluj.ro Radu Ioan Peter Mathematics Department Technical University of Cluj-Napoca Cluj-Napoca, Romania Email: Ioan.Radu.Peter@math.utcluj.ro Abstract—The images captured in fog conditions have degraded contrast, that makes current image processing applications sensitive and error prone. We propose in this paper an efficient image enhancement algorithm suitable for daytime fog conditions and based on the Koschmieder’s model. Using this mathematical model together with an original inference of the atmospheric veil induced by the fog we are able to recover the original fog-free image. A quantitative and qualitative evaluation is performed on both synthetic and real camera images. Our algorithm is suitable for both color and gray scale images and is able to perform image enhancement in real time. Keywords—daytime fog, image enhancement, contrast restora- tion, median filter, atmospheric veil I. I NTRODUCTION The visibility in images can be downgraded due to different natural phenomena such as haze, fog, mist, rain, etc. In such situations the visibility distance is decreased because of the absorption and scattering of light by the atmospheric particles. The light emanating from objects in the captured scene is attenuated by scattering along the line of sight of the camera. Images of outdoor scenes, captured during fog conditions, are drastically degraded. This weather phenomenon is especially dangerous in driving situations, because drivers tend to over- estimate the visibility distance while traveling in fog condi- tions and drive with excessive speeds [1]. Due to the presence of fog, the visibility distance decreases exponentially, thus making fog one of the most dangerous weather condition for driving. Some of the negative effects of fog on the quality of the image are the loss of contrast and the alteration of the natural colors from the image. In addition the scattering effect of the transmitted light causes additional lightness in parts of the image [2]. These effect is called air-light or atmospheric veil. In order to overcome these impediments we must either adapt the operating parameters of the camera or try to detect the presence of fog and remove its effects from the images. In this work we focus on the second approach, namely we are dealing with restoring the contrast and enhancing the quality of the original foggy image. Extensive research has been carried out in the field of fog detection and visibility estimation in fog conditions. Some methods [3], [4] use Gabor Filters, at different frequencies, scales and orientations in order to detect and classify the fog conditions. Their method is suitable for both day time and night time fog detection. Other approaches try to estimate the visibility distance by computing the position of the horizon and inflection point lines in the image [1], [5]. The classification of the fog density is done based on the obtained visibility distance. A similar method is presented in [6]. Fog detection is based on the computation of the vanishing point; the road lines are taken as reference lines in order to compute the vanishing point. After the vanishing point is found a segmentation of the road and sky is performed. All the above methods require only one input image. The authors in [7] and [8] fuse the information from an in-vehicle camera with a millimeter wave radar in order to classify the fog density and estimate the visibility range. They detect the preceding vehicle and compare the image area found with a fog free reference image. Then the distance obtained between the original image and the fog free image is used together with the distance measured by the millimeter wave radar in order to compute Koschmieder’s atmospheric extinction coefficient [9]. But the accuracy of the method strongly depends on the computed distance between the original and the fog free reference image. Another drawback is the lack of confidence when there is no vehicle in front of the ego vehicle, so the fog conditions can not be inferred. If further real time image processing is needed on the acquired images than a contrast restoration procedure must be applied. Several algorithms were proposed in literature for restoring the contrast of the images. These methods can be categorized in two groups: model and non-model based enhancement techniques. Non-model based methods perform image enhancement relying only on the information obtained from the image; such as histogram equalization or adaptive histogram equalization [10], approaches based on Retinex theory [11]. Unfortunately, these methods do not maintain color fidelity and are not suitable for real time computer vision. Model based contrast restoration techniques can be further divided in two categories: with given depth and unknown depth. When the depth is supposed to be known, this infor- mation can be used to restore the original contrast of the image. The authors in [12], [13] and [14] studied different haze removal approaches based on given depth information. The depth is inferred by using the altitude, tilt and position of the camera [12], through the manual approximation of the sky area and vanishing point in the captured image [13] or by approximating the geometrical model of the analyzed image scene [14]. Because the depth information is provided by the user in all these above mentioned approaches and because the obtained depth information is erroneous and unreliable, these methods are not feasible for real world applications.