Regulation of Speed for Driver Assistanceand Removal of Haze using Imageprocessing Algorithm

The clarity of the outdoor scene images very bad due to the environmental condition result in hazy image. The process of removing the fog from that image is called dehazing. The dehazing process is very difficult in the moving image or video image. The proposed method should improve this problem for the smooth driving of the vehicles by controlling the speed by comparing the image and the scene of video taken during driving. The proposed method should remove the haze so that it will increase the visibility of the image and multi scene. The proposed method can improve the colour changes in the image which is caused by airlight. The single frame is used for the enhancement of the foggy image remove the fog using the transmission map which contains multilevel. We make use of boundary constraints and global airlight estimation is taken into account. The method is fast and noise-free that generally arise in such enhancement techniques.


Existing System
Haze is the foggy image generated in the environmental changes. The single frame and multiple frames methods are used for the haze reduction process in the image. One of the methods is single image haze removal with DCP takes original image which is an hazy image and generate dehazed image. There is also removal of haze using Gabor filter along with DCP and Clahe. Another methods is haze removal algorithm in which goal is the estimation of airlight image. Airlight estimation is not done properly and this leads to loss of details.Irregular transmission estimation can create problems in de-hazing. This method gives poor contrast image. Computation time is required more. The quality of the visual image is not good in this method.

Proposed System
The proposed method is based on the airlightcalculation on the image and video. In this method the multi level transmission maps are used. The speed of the proposed method is very good. A Contextual Regularization Dehazing (CRD) algorithm is applied. The CRD algorithm restore the images which faded with fog. The rich details of images is recovered by this algorithm, which provide the colour information in the fog region of the image. The visibility of the very dense haze region can be improved in the proposed algorithm. The process starts off with the input image captured by the camera. These images typically contain haze and it has a visible degradation such that the objects in the image are not clearly visible. This image is fed into the MATLAB unit where it undergoes image processing. We make use of CRD algorithm to dehaze the input image and during this the captured image is dehazed and undergoes enhancement in multiple stages. It is enhanced and dehazed during this process. Then the initial input image with haze is compared with the dehazed image.  The visibility matrices of both the images are taken into account. A comparison is done between the haze image and dehazed image in the process and if the visibility metric of dehazed image crosses the set threshold value when compared with the haze image, the MATLAB unit interacts with the Arduinouno hardware section. The Arduino is set to interact with the motor which is running without any restriction. When the given visibility metric is crossed, the speed of the motor is reduced. If the visibility metric is not crossed, the motor runs without any interference from the Arduino and speed of the motor is high.
The connection diagram is given in the Fig.2. The hardware involved Arduinouno, dc motor with driver, relay unit and power supply unit. Power supply unit provides the supply of +12 v dc for the Arduino Uno, a dc motor is connected with Arduino Uno module with a single relay unit for regulating the speed of the motor. As far as pin configurations of Arduinouno is concerned , we have pin 7 and 8 connected with the single relay unit and the single relay unit is connected with the 12v dc motor. The dc supply for the Arduinouno is given in pin Vin.

Fig.3: Input Haze Image
We take the input image with haze and it is sent to the MATLAB unit. Here, the image undergoes various steps like airlight estimation, boundary calculation, refining estimation to dehaze the image. We then calculate and compare the visibility metrics of the initial and dehazed image. The speed of the motor is controlled by the controller by comparing the visibility matrix with the threshold value. If the value is less than the set threshold value, the speed of the motor is reduced. The input image with haze and it is sent to the MATLAB unit. Here, the image undergoes various steps like airlight estimation, boundary calculation, refining estimation to dehaze the image. We then calculate and compare the visibility metrics of the initial and dehazed image. If the obtained visibility metric of the dehazed image is lower than the set threshold value, the speed of the motor is reduced. Fig. shows the input haze image is the image which is affected by the haze. The phenomena such as fog, haze are happened due to atmospheric absorption and scattering. The real image is taken using the camera is already stored in disk. The image is taken using a camera of any type and it is fed into the system. This image presumably has haze in it and the objects are not clearly visible due to the haze. The step of estimating global airlight is done to take the airlight into consideration so that it can be helpful in dehazing.
Estimating global airlight is done by using the G-input function in MATLAB. This is getting the pixel information from the image. G-input function is get the pixels from user by using mouse cursor as seen in Fig. 4. The boundary constraints is shown in Fig. 5, the pixel wise boundary calculation and minimum filtering are done in this step. Refining Estimation done for smoothing and enhancing the image. In this function the color image contains 3 primary colors and that is separated and each image filtered respectively. Here we use the weighting function for filter the image. By using this, image will be enhanced. The various level of image enhancement is shown in Fig.6 to Fig.11. The Dehazing is done after the smoothing function. In this, the filtering of haze pixels which attained by the air light estimation function.
The removal of haze pixels is carried out with the help of the boundary constraints and refining estimated filtered images which is shown in Fig.12. The pixel of the original captured image, foggy image and dehazing image are compared and thereby the visibility metric is calculated. This matrix is used for the calculation of the Contrast to Noise Ratio (CNR) of the haze image. The images with haze and dehazed image is compared and the visibility metric is calculated on a scale of 100. In the Fig.8, the visibility metric is compared between the initial image and the dehazed image and the visibility metric is below the set threshold value which is 50.
The haze and dehaze matching points are calculated by using the SURF features of the images, which is shown in Fig.14 and Fig.15. First the image surf features will be extracted. Then the image will be compared. By using the values we found the haze and dehaze matching points. The number of good matches has been calculated after the calculation of matching points. This is calculated by using the matching points. In the hardware model is shown in Fig.16, The Arduinouno connected to the MATLAB unit. When the visibility metric obtained from dehazing the haze image falls below the set threshold value, the Arduino slows down the speed of the motor running at full speed. When the visibility metric value crosses the given threshold point, the Arduino does not interact with the motor and the motor keeps running at full speed without any reduction in speed.

Conclusion
In this paper, the Contextual Regularization dehazing algorithm is uses for the visibility restoration. This method overcomes the limitations of the previous methods of dehazing and image enhancement as it uses multi-objective optimization and image formation models. The human is not more sensitive to variations of the luminance in bright regions than in dark regions so, luminance image is employed for air light estimation. In haze conditions, images become distorted due to the presence of air light that is produced by scattering light by fog. By using CRD algorithm, we have dehazed the given image and we control the speed of the motor based on the depth of the haze. Practical use of this work requires some modifications, this work can be useful in driver safety and transportation.