In a ground-breaking innovation, IIT Kharagpur has developed a fog algorithm that aims to cut delays and cancellations of flights and trains, by clearing hazy visuals caused by rain, fog or smog, all in real time!
Current vision systems are designed to perform in normal weather condition. However, no one can escape from bad weather conditions. Bad weather reduces scene contrast and visibility, which results degradation in the performance of various computer vision algorithms such as object tracking, segmentation and recognition.
Under fog weather conditions, contrast and color of the images are drastically degraded. The degradation level increases with the distance from the camera to the object. Two fundamental phenomenon, which cause loss of visibility, are attenuation and air-light. Light beam coming from a scene point, gets attenuated by scattering due to atmospheric particles. This phenomenon is termed as attenuation, which reduces contrast in the scene.
Light coming from the source is scattered towards camera and leads to the shift in color. This phenomenon is termed as air-light. Air-light increases with the distance from the object. In order to remove fog, first preprocessing (i.e. histogram equalization) is performed over foggy image. This preprocessing increases the contrast of the image prior to the fog removal and results better estimation of air-light map. Then initial value of air-light map is estimated by black channel prior. Once air-light map is obtained, image is restored. Histogram stretching of output image is performed as post-processing. This histogram stretched image is the final defogged image.
This fog algorithm will estimate the distance of objects from the camera in the form of a depth map. The depth map is further advanced, using anisotropic diffusion to smoothen the depth map and identify clear boundaries of the object. Based on the refined depth, the image is restored to give clean images. This operation is performed on every frame of the video to generate a defogged video stream in real time.
According to Sudipta Mukhopadhyay, Department of Electronics and Electrical Communication, who led the project, “A fast fog removal algorithm for image can be tried for the video fog removal. However, there are many challenges in the design of the video fog removal algorithm. For real-time implementation, one needs to find the fastest algorithm with quality output. For real-time implementation, the conventional frame by frame approach is computationally expensive. If temporal correlations between neighbouring frames can be utilised for restoration, it promises a large amount of saving in computation.”
The technology has been widely appreciated and has received an international patent. The Railways and Defence Research and Development Organisation (DRDO) has initiated talks for acquiring and deploying it from the institute.