# A Transfer Learning Method for Meteorological Visibility Estimation Based on Feature Fusion Method
## 2 Methodology
### Method Overview
#### 2.2.1 Image Preprocessing  
Due to the interference from the moving objects such as hull and the clouds in the sky during the process of digital image collection with fixed viewing angle, the moving objects will change their shapes and positions in the images. Therefore, these images need to be preprocessed to obtain the effective subregions before subsequent feature extraction. First, all the images in the database were averaged in gray scale (gray weighted average) to obtain a comprehensive image. Then, Gaussian blurred algorithm [26] was applied on the image to find the gray level distribution of the comprehensive image. After designing the threshold value, the images in the database were adaptively segmented to obtain the subregion images. The steps of image preprocessing were shown in Figure 2.  
Figure 1: Flow Chart of Comprehensive Visibility Evaluation. Sample images in the database were shown in Figure 3. The viewing angle of the camera for collecting the images was fixed while the background objects in the image (e.g., hull and clouds) changed with time. The background information would interfere the final visibility evaluation results and caused errors. To accurately assess the visibility of the image, it was necessary to eliminate these interferences and background objects for visibility evaluation. It was preferable to extract the effective subregions from the image for subsequent processing and visibility estimation. In Figure 3, the main components of the images were the sky, buildings, and the hulls in the water area. However, only buildings and fixed objects were relevant to the visibility estimation while the water area and sky cannot provide much information for the visibility estimation. Buildings and fixed objects can be considered as static objects in the image while moving hull or clouds in the sky are dynamics objects in the image. Visibility measurement can be considered as the largest distance that could be observed from the viewing point. As the dynamic objects (e.g., sky, water and hull) are changing in positions or shape with time, they should not be used as reference for accurate visibility assessment. Therefore, we should filter out dynamic objects and extract the effective subregions with static objects that can provide useful image features for visibility estimation. The effective subregion covers the buildings or fixed structure (e.g., island) at different landmark distances from the viewing point. In this paper, we have considered to locate the effective subregions by using two information. The first one is the gray average weighted image of the database and the second one is the gray mean square error of the image database. The gray-level average weighted image of the image database was obtained by applying the gray-level weighted average to each data point of the images in the database. Image with 1080 \(\times\) 1920 pixels were used in this paper. The gray-level weighted averaging was performed on each pixel to obtain the average value of the pixels in the database. Then according to the coordinates of the pixels in the original image, the comprehensive gray average image was formed. An example of the comprehensive gray average image was shown in Figure 4. The images in the database were from 8:00 a.m. to 18:00 p.m. during the collection period. The images are sorted according to their collecting time. Figure 3: Some image samples in the database. Figure 2: Steps of Image Preprocessing. These sequences of image can provide the moving trajectories of the dynamic objects. After extensive simulations, it has been found that dynamic objects could be filtered out if we perform the gray-level averaging for these sequences of images. Fixed or static objects will be remained in the comprehensive gray weighted average image. After locating the effective subregions, image features in the effective subregions with static objects could be extracted for visibility estimation.