Identiﬁcation of Inundation Using Low-Resolution Images from Tra ﬃ c-Monitoring Cameras: Bayes Shrink and Bayesian Segmentation

: This study presents a comparative assessment of image enhancement and segmentation techniques to automatically identify the ﬂash ﬂooding from the low-resolution images taken by tra ﬃ c-monitoring cameras. Due to inaccurate equipment in severe weather conditions (e.g., raindrops or light refraction on camera lenses), low-resolution images are subject to noises that degrade the quality of information. De-noising procedures are carried out for the enhancement of images by removing di ﬀ erent types of noises. For the comparative assessment of de-noising techniques, the Bayes shrink and three conventional methods are compared. After the de-noising, image segmentation is implemented to detect the inundation from the images automatically. For the comparative assessment of image segmentation techniques, k-means segmentation, Otsu segmentation, and Bayesian segmentation are compared. In addition, the detection of the inundation using the image segmentation with and without de-noising techniques are compared. The results indicate that among de-noising methods, the Bayes shrink with the thresholding discrete wavelet transform shows the most reliable result. For the image segmentation, the Bayesian segmentation is superior to the others. The results demonstrate that the proposed image enhancement and segmentation methods can be e ﬀ ectively used to identify the inundation from low-resolution images taken in severe weather conditions. By using the principle of the image processing presented in this paper, we can estimate the inundation from images and assess ﬂooding risks in the vicinity of local ﬂooding locations. Such information will allow tra ﬃ c engineers to take preventive or proactive actions to improve the safety of drivers and protect and preserve the transportation infrastructure. This new observation with improved accuracy will enhance our understanding of dynamic urban ﬂooding by ﬁlling an information gap in the locations where conventional observations have limitations.


Introduction
In the face of natural disasters such as flash flooding, prompt information is crucial to establish a mitigation plan and find the best route for first responders. These rains cause unprecedented flooding and cause severe fatalities and hundreds of billions of US dollars in damages. Such an extreme flood not only damages roads and bridges but also cuts off evacuation routes and rescue paths. In many parts of the US, occurrences of "rare" extreme precipitation and flooding events are now a new normal [1].
There are different types of observations to monitor and detect floods in urban areas. Among them, typical measurement methods include in-situ water level sensors in streams, remote sensing Compared with other de-noising filtering techniques (e.g., mean filtering and median filtering), the wavelet coefficients method is a customized denoise threshold known as an adaptive threshold that can be more accurate to separate noise than other de-noising filtering techniques with a fixed threshold.
Since wavelet coefficients for de-noising are well-studied, many threshold approaches have been proposed. Among those threshold methods, the wavelet Bayes shrink approach is the most effective wavelet coefficient method [15]. Based on Bayesian theory, the Bayes shrink is changed according to different image information, so the Bayes shrink is also called the adaptive threshold [16,20,21]. The most important concept of de-noising is that there is no best de-noising method, but only the most suitable de-noising method because the noise of each image is different [22]. Thus, it is important to test and choose the most accurate de-noising filtering for a CCTV image to enhance image segmentation, which allows estimating the inundated area.
The image affected by any natural environments (e.g., mist, light refraction) may cause image overexposure and fogginess. There are advanced image process approaches in addition to de-noising processing: dark channel prior and dehaze filtering, which can eliminate mist and light refraction situations. The dark channel prior is operated by the darkest pixels in the image being separated from the image, and the remaining pixels are relatively bright image or called foggy image. By the dark channel prior, the difference between a foggy image and a fog-free image can be calculated with light refraction and brightness of an environment. The process of de-hazing is to obtain the fog-free image by changing the information of the fog image and combining it with the dark channel prior. By dehaze filtering calculated by dark channel and light refraction, the fog can be effectively eliminated [23,24]. After de-noising the image, to further identify the inundation or water area in the image, the edge and contour of the object must be determined first. Image segmentation is an effective way to find the edge of the objects on the image.
Image segmentation is one of the hotspots in image processing and computer vision, which is the basis for image analysis and understanding of image feature extraction and recognition. It refers to dividing the image into several areas based on grayscale, color, texture, and shape. The features divided into the same area are similar, and there are significant differences between different areas. There is a common principle in image segmentation algorithms which can be divided to region-based segmentation, edge detection segmentation, and clustering segmentation. Dijk and Hollander [25] describe each algorithm in unified frameworks that introduce separate clusters and data weight functions. Felzenszwalb and Huttenlocher [26] study two different local neighborhoods in constructing the graph, by which the important characteristic of the method is its ability to preserve detail. We deploy three different image-segmentation methods, including k-means clustering segmentation, Otsu region-based segmentation, and Bayesian threshold segmentation.
A neural network may be another solution to the limitations of CCTV data, and uses a large number of different images of flood and water level conditions to establish a database as a reliable statistical method for identifying the status of flash floods [27]. However, a neural network for flood monitoring requires many images with different views in the same location. It is challenging to meet the requirements because, practically, there are not enough images in the same CCTV location with different flooding conditions to build a suitable database.
Thus, this paper presents an effective image-processing procedure that requires only a single image to detect the inundation area in a CCTV image to overcome limitations on current flooding detection. First, we investigate and propose de-noising approaches to improve the quality of the image. Then we utilize different image segmentation methods, including k-means segmentation, Otsu segmentation, and Bayesian segmentation, to detect flooding areas. The obtained segmentation results are compared to determine which matches the flooded area in the CCTV image best.

Methodology
To address the challenges to detect inundation in CCTV images using other approaches including a neural network, the paper proposed a de-noising and image segmentation approach to find the Water 2020, 12, 1725 4 of 18 water area in the image by de-noising and image segmentation. The first step is to find the most suitable de-noising method for CCTV images. The second step is to use image segmentation to find the edge further to find the water area in the image. The flowchart of this study is shown in Figure 1. The effectiveness of de-noising is determined by the peak signal-to-noise ratio (PSNR), which is commonly used for image compression and reconstruction after image de-noising. The higher the PSNR, the better the de-noising effect, and the more original image information is retained. Figure 1. The effectiveness of de-noising is determined by the peak signal-to-noise ratio (PSNR), which is commonly used for image compression and reconstruction after image de-noising. The higher the PSNR, the better the de-noising effect, and the more original image information is retained.
In image processing, we face various random noises: Gaussian noise, impulse noise, and speckle noise. They are distributed in the CCTV image, caused by digitized transmission compression or equipment, which affects the performance of image processing. There are two requirements for the de-noising filtering: keeping intact important information (e.g., the object edges) and making the image clearer with a better visual impact so the image's information can be clearly seen. We will study several de-noising filtering techniques: mean filtering, and median filtering, which belong to image enhancement. The performance of the de-noising method depends on the type of noise. For example, median de-noising filtering is very effective in smoothing impulse noise while it allows keeping the sharp edges of the image. The results of the image segmentation to find inundation objects edge effectively and accurately by de-noising filtering. (1) Collect closed-circuit television (CCTV) images from government websites or social media; (2) use four different de-noising filtering to find out which has the best de-noising quality, which evaluated by the peak signal-to-noise ratio (PSNR); (3) use image segmentation methods to understand how the computer interprets images and finds an edge which is the vital part for image object detection; (4) compare segmentation results between each method and detect inundation area.
To find out which type of de-noising method is the most suitable for flood identification from CCTV images, we need to understand the type of noise. During image acquisition, encoding, transmission, and processing steps, noise always appears in the digital image. Without prior knowledge of filtering techniques, it is difficult to remove noise from digital images. Image noise is a random change in brightness or color information in the captured image. It is degradation in image signal caused by external sources. We can model a noisy image as ( , ) = ( , ) + ( , ) where, ( , ) is a function of the noisy image, ( , ) is a function of image noise, and ( , ) is a function of the original image. Before de-noising, we need to understand which noises are in the image. There are different types of image noise. They are typically divided into 3 types, which are Gaussian noise, impulse noise, and speckle noise. Gaussian noise is generated by adding a random Gaussian function to the image, while impulse noise is caused by adding random white and black dots to the image, (1) Collect closed-circuit television (CCTV) images from government websites or social media; (2) use four different de-noising filtering to find out which has the best de-noising quality, which evaluated by the peak signal-to-noise ratio (PSNR); (3) use image segmentation methods to understand how the computer interprets images and finds an edge which is the vital part for image object detection; (4) compare segmentation results between each method and detect inundation area.
In image processing, we face various random noises: Gaussian noise, impulse noise, and speckle noise. They are distributed in the CCTV image, caused by digitized transmission compression or equipment, which affects the performance of image processing. There are two requirements for the de-noising filtering: keeping intact important information (e.g., the object edges) and making the image clearer with a better visual impact so the image's information can be clearly seen. We will study several de-noising filtering techniques: mean filtering, and median filtering, which belong to image enhancement. The performance of the de-noising method depends on the type of noise. For example, median de-noising filtering is very effective in smoothing impulse noise while it allows keeping the sharp edges of the image. The results of the image segmentation to find inundation objects edge effectively and accurately by de-noising filtering.
To find out which type of de-noising method is the most suitable for flood identification from CCTV images, we need to understand the type of noise. During image acquisition, encoding, transmission, and processing steps, noise always appears in the digital image. Without prior knowledge of filtering techniques, it is difficult to remove noise from digital images. Image noise is a random change in brightness or color information in the captured image. It is degradation in image signal caused by external sources. We can model a noisy image as A(x, y) = H(x, y) + B(x, y) where, A(x, y) is a function of the noisy image, H(x, y) is a function of image noise, and B(x, y) is a function of the original image. Before de-noising, we need to understand which noises are in the image. There are different types of image noise. They are typically divided into 3 types, which are Gaussian noise, impulse noise, and speckle noise. Gaussian noise is generated by adding a random Gaussian function to the image, while impulse noise is caused by adding random white and black dots to the image, and speckle noise is a granular noise that inherently exists in an image and reduces its quality. An example of adding noise to the image is shown in Figure 2. Due to the wide variety of image noise, it is necessary to test different de-noising methods separately to determine the most suitable de-noising method for CCTV images.
Water 2020, 12, x FOR PEER REVIEW 5 of 20 and speckle noise is a granular noise that inherently exists in an image and reduces its quality. An example of adding noise to the image is shown in Figure 2. Due to the wide variety of image noise, it is necessary to test different de-noising methods separately to determine the most suitable de-noising method for CCTV images.
(a) Gaussian noise (b) Impulse noise (c) Speckle noise For the following contents in Section 2, several de-noising methods are presented in the first half, which are mean filtering, median filtering, Gaussian filtering, and wavelet coefficients. The image segmentation methods (e.g., k-means segmentation, Otsu segmentation, and Bayesian segmentation) are proposed in the second half.

De-Noising Method
The image enhancement is performed by changing the pixel number of images with several convolution approaches (e.g., spatial convolution and frequency convolution), which is a mathematical operation to determine a new pixel value from a linear combination of pixel values and its neighboring pixels. The spatial convolution is simply calculated by arithmetic, such as add, minus, multiply, and divide pixel value. The frequency convolution is calculated by the information of the image after the fast Fourier transform (FFT), which converts the information from the spatial domain to a frequency domain [27]. The principle of image enhancement is to modify pixels by changing the brightness, contrast, and simply de-noising [28,29] If a signal changes gently, the output value, which are pixels of images, can be replaced by the statistical median value in a certain size neighborhood of this pixel point, and this neighborhood is For the following contents in Section 2, several de-noising methods are presented in the first half, which are mean filtering, median filtering, Gaussian filtering, and wavelet coefficients. The image segmentation methods (e.g., k-means segmentation, Otsu segmentation, and Bayesian segmentation) are proposed in the second half.

De-Noising Method
The image enhancement is performed by changing the pixel number of images with several convolution approaches (e.g., spatial convolution and frequency convolution), which is a mathematical operation to determine a new pixel value from a linear combination of pixel values and its neighboring pixels. The spatial convolution is simply calculated by arithmetic, such as add, minus, multiply, and divide pixel value. The frequency convolution is calculated by the information of the image after the fast Fourier transform (FFT), which converts the information from the spatial domain to a frequency domain [27]. The principle of image enhancement is to modify pixels by changing the brightness, contrast, and simply de-noising [28,29].

Median Filtering and Arithmetic Filtering
If a signal changes gently, the output value, which are pixels of images, can be replaced by the statistical median value in a certain size neighborhood of this pixel point, and this neighborhood is called a window in the signal-processing field. The larger the window, the smoother the output, but it may also erase useful signal characteristics [30]. In order to keep the useful signal, the size of the window should be determined according to the signal and noise characteristics. Usually, the size of the window is odd because the odd number of data (e.g., pixel number) has a unique median value. The concept of mean filtering is similar to median filtering; the only difference is that the former uses the arithmetic mean as a filter [31].

Gaussian Filtering
Gaussian filtering is commonly used as a linear filtering algorithm. A two-dimensional Gaussian function distribution is used to make a smooth image. The principle of Gaussian filtering is the weighted average of all pixel values in the entire image through the Gaussian distribution. More precisely, Gaussian filtering is the result of convolution operation on pixels by Gaussian normal distribution [32]. The value of each pixel is obtained by a weighted average of the values of itself and nearby pixels. The two-dimensional Gaussian function is: where x and y are the number of pixels on the x and y-axis of the image, respectively and σ is the standard deviation of a Gaussian distribution.

Wavelet Coefficients
The discrete wavelet transform (DWT) can be interpreted as signal decomposition in a set of independent, spatially oriented frequency channels. Signal decomposition means that the signal passes through two complementary filters (low-pass and high-pass filters) and appears in the form of approximate and detailed signals as known as wavelet coefficients [33]. The approximate and detailed signals can be assembled back into the original signal without loss of information. The process is called reconstruction. For decomposition, the image is divided into four sub-bands, as shown in Figure 3a. The image is divided into four different sub-band based on their frequency. The four sub-band come from the separable application of vertical and horizontal directions. Each wavelet coefficient represents a spatial area corresponding to approximately a 2 × 2 area of the original image. Each coefficient in the sub-bands represent a spatial area corresponding to approximately a 2 1 × 2 1 area of the original image. The frequencies ω can be divided into two ranges, the low-frequency range (0 < |ω| < π 2 ) and the high-frequency range ( π 2 < |ω| < π). The sub-band labeled L or H depends on their frequency. The four sub-band come from the separable application of vertical and horizontal direction. These four sub-band present image information called details: HH 1 is diagonal detail, LH 1 is vertical detail, HL 1 is horizontal detail and LL 1 is the remaining image details, where number 1 means detail in the first scale decomposition [34]. To obtain the next, more critical scale of wavelet coefficients, the sub-band LL 1 is further decomposed, as shown in Figure 3b. The image is divided into four different sub-band based on their frequency, which low-frequency range in second scale is 0 < |ω| < π 2 2 while high frequency range in second scale is π 2 2 < |ω| < π 2 1 . Each coefficient in the sub-bands of the second scale HH 2 , LH 2 , HL 2 , and LL 2 represents a spatial area corresponding to approximately a 2 2 × 2 2 area of the original picture. The decomposition process continues until a certain final scale is reached, while the degree of matching between the reconstructed signal and the original signal is 90%. The DWT shows the wavelet Water 2020, 12, 1725 7 of 18 analysis is a measure of similarity between basis wavelets and the signal function. [35]. The wavelet coefficients method for image de-noising is the process of decomposition and reconstruction of details. The wavelet threshold is the reference point to divide the frequency of the image sub-band. The image and noise have different characteristics after wavelet transform. After the noisy signal is decomposed in the wavelet scale, the information of the image is mainly concentrated on the lowresolution sub-bands [36], and the noise signal is mainly distributed on each high-frequency subbands. Thus, the choice of wavelet threshold directly affects the performance of wavelet de-noising. The wavelet coefficients of each scale are classified according to different threshold algorithms they used [35]. If the wavelet coefficients are smaller than the threshold, set it to zero; otherwise, it maintains or slightly decreases the magnitude [34]. Because of this characteristic of wavelet coefficients, it is very effective in energy compression, which can better save important image features such as edge changes in the image. Finding an optimal threshold is a tedious process. If using a smaller threshold, it produces a poor performance of de-noising, while using a larger threshold also causes image details to be removed as noise [16].
In this paper, Bayes shrink is used for wavelet coefficients, which has the best performance of de-noising for high-frequency noise [20]. The following is the Bayes shrink algorithm introduction. The Bayes shrink is known to be effective for images with Gaussian noise. The observation model is expressed as follows: where is the wavelet transform of the noisy image; is the wavelet transform of the original image, and denotes the wavelet transform of the noise components following the Gaussian distribution (0, ). Since and are mutually independent, the variances , and of , and is given by: It has been shown that the noise variance can be estimated from the first decomposition level diagonal high-frequency sub-band, by the robust and accurate median estimator [37], The variance of the degraded image can be estimated as: The wavelet threshold is the reference point to divide the frequency of the image sub-band. The image and noise have different characteristics after wavelet transform. After the noisy signal is decomposed in the wavelet scale, the information of the image is mainly concentrated on the low-resolution sub-bands [36], and the noise signal is mainly distributed on each high-frequency sub-bands. Thus, the choice of wavelet threshold directly affects the performance of wavelet de-noising. The wavelet coefficients of each scale are classified according to different threshold algorithms they used [35]. If the wavelet coefficients are smaller than the threshold, set it to zero; otherwise, it maintains or slightly decreases the magnitude [34]. Because of this characteristic of wavelet coefficients, it is very effective in energy compression, which can better save important image features such as edge changes in the image. Finding an optimal threshold is a tedious process. If using a smaller threshold, it produces a poor performance of de-noising, while using a larger threshold also causes image details to be removed as noise [16].
In this paper, Bayes shrink is used for wavelet coefficients, which has the best performance of de-noising for high-frequency noise [20]. The following is the Bayes shrink algorithm introduction. The Bayes shrink is known to be effective for images with Gaussian noise. The observation model is expressed as follows: where Y is the wavelet transform of the noisy image; X is the wavelet transform of the original image, and V denotes the wavelet transform of the noise components following the Gaussian distribution N 0, σ 2 v . Since X and V are mutually independent, the variances σ 2 y , σ 2 x and σ 2 v of Y, X and V is given by: Water 2020, 12, 1725 8 of 18 It has been shown that the noise variance σ 2 y can be estimated from the first decomposition level diagonal high-frequency sub-band, HH 1 by the robust and accurate median estimator [37], The variance of the degraded image can be estimated as: where A m are the wavelet coefficients of wavelet on every scale; M is the total number of wavelet coefficient. Use of soft threshold which is based on sub-band and level-dependent near-optimal threshold as the equation condition for Bayes shrink thresholding: where The basic framework of the wavelet transform-based image de-noising is shown in Figure 4.
Water 2020, 12, x FOR PEER REVIEW 8 of 20 where are the wavelet coefficients of wavelet on every scale; is the total number of wavelet coefficient. Use of soft threshold which is based on sub-band and level-dependent near-optimal threshold as the equation condition for Bayes shrink thresholding: where = max ( − , 0) The basic framework of the wavelet transform-based image de-noising is shown in Figure 4.

Image Segmentation:
The goal of this paper is to identify the inundation or water area in CCTV images. In order to achieve this goal, the edge and contour of the object must be determined first using an image segmentation, which is an effective way to find the edge of the objects on the image. The classification of image segmentation is based on grayscale, color, texture, and shape to divide the image into several areas. The features that have been divided into the same area are similar, while there are significant differences between different areas. Moreover, this is the basis for image analysis and understanding of image feature extraction and object detection. There several image segmentation approaches are studied (e.g., region-based segmentation, clustering segmentation) [26]. The region-based segmentation divides the image into two regions of the target and the background by a single threshold. With different threshold calculation methods, the region-based segmentation presents

Image Segmentation
The goal of this paper is to identify the inundation or water area in CCTV images. In order to achieve this goal, the edge and contour of the object must be determined first using an image segmentation, which is an effective way to find the edge of the objects on the image. The classification of image segmentation is based on grayscale, color, texture, and shape to divide the image into several areas. The features that have been divided into the same area are similar, while there are significant differences between different areas. Moreover, this is the basis for image analysis and understanding of Water 2020, 12, 1725 9 of 18 image feature extraction and object detection. There several image segmentation approaches are studied (e.g., region-based segmentation, clustering segmentation) [26]. The region-based segmentation divides the image into two regions of the target and the background by a single threshold. With different threshold calculation methods, the region-based segmentation presents different results. The clustering method is used to segment the image with the corresponding feature pixel points. According to their features in the cluster, the image is segmented into several different clusters in which each cluster has similar features. A global threshold can effectively segment different targets and backgrounds with different grayscales. However, when the grayscale difference of the image is not obvious, the local threshold or adaptive threshold method should be used.
To be able to understand how the computer interprets images to detect an object edge and find which image segmentation has the best performance to detect the water area, we use three different image-segmentation methods, which are k-means clustering segmentation, Otsu region-based segmentation, and Bayesian threshold segmentation.

K-Means Segmentation
Each pixel in a color image is a point in three-dimensional space; k-means segmentation uses pixels of the image as data points according to the specified number of clusters, replacing each pixel with its corresponding cluster center to reconstruct the image. K-means clustering minimizes the sum of the squared errors of the data in the cluster and the center of the cluster [38]. The purpose is to find a similar cluster in the data so that members in the same subset have similar attributes. Assume there is a set of n-dimensional data: where x i is a set of i data points as the data to be clustered and d is a number of dimension of data points i; S k is the number of clusters from data points x i By using the formula of Euclidean distance to calculate the sum of least squares between clusters center and pixel points x i is the minimum value to define the number of clusters: where µ c is the center of k clusters and arg µ min is the value of the variable µ c reaches the minimum value in the following formula. The image segmentation based on k-means uses the pixels as data points, using Equation (9) to calculate the number of clusters then replace each pixel with its corresponding cluster center to reconstruct the image. The different clusters present different colors and other characteristics, while the pixel points in the same cluster have similar characteristics.

Otsu Segmentation
The most commonly used threshold segmentation algorithm is the most substantial interclass variance method (Otsu), which selects threshold by maximizing the variance between classes. According to the grayscale characteristics of the image, Otsu assumes that the image is composed of two parts: the foreground and background. By calculating the variance of the foreground and background of the segmentation result under different thresholds, the threshold with the largest variance is the Otsu threshold [39]. The larger the between-class variance between the background and foreground, the better the effect to distinguish these two parts. The main calculated between-class variance equation is: where ω 1 and ω 2 are the ratio of background pixels and foreground pixels in the image, respectively; µ 1 and µ 2 are the average grayscale value of background and foreground.

Bayesian Segmentation
Similar to Otsu segmentation, the image is divided into the foreground and background by Bayesian segmentation. The Bayesian theorem calculates the posterior probability with the smallest Bayesian risk as Bayesian shrink, which is defined as the probability distribution of the expected values. Image segmentation is a conditional assumption question in which the decisions are usually based on probability to select value [40,41] where λ is the Bayesian threshold of image and satisfies the following formula: Assume that P(z) is the probability density function with the expected Bayesian threshold values of image I(m, n), which is defined as the probability distribution based on Equations (11) to (13): For the image is divided into a background part ω 1 and target part ω 2 by a threshold, which their probability is P(ω 1 ) and P(ω 2 ), separately. The posterior probability can be presented by the Bayesian theorem: The threshold with minimum Bayesian risk has the maximum expectation of posterior probability represented by Equation (15), and can be written as: Based on threshold T presented on Equation (16), which has the maximum expectation of threshold based on the Bayesian theorem, the image segmentation results can get the minimum error, which means the distortion of the image after segmentation is minor.

Data Collection
In this study, 14 CCTV images which are collected from public websites on transportation information government website such as TranSTAR or downloaded from public social media have been tested to determine which de-noising method is the best for CCTV images. Six of the CCTV images are shown in Figure 5.  Table 1 collected from CCTV and social media used in this paper. (a) and (b) are flooded roads during Hurricane Harvey collected from CCTV; others are collected from social media.

Mean Squared Error (MSE) and Peak Signal-to-Noise Ratio (PSNR)
The quality and information of the image after compression or reconstruction are usually different from the original image. Image de-noising is also a process of compression and reconstruction, which can eliminate most image noise while maintaining image information. However, the differences are difficult to identify the performance of de-noising by the human eye. The criteria for the quality of de-noising filtering are determined by mean squared error (MSE) and peak signal-to-noise ratio (PSNR). MSE in mathematical statistics refers to the expected value of the squared difference between the estimated values and the true value, which can evaluate the degree of change of data. The smaller the value of MSE, the better the accuracy of the experimental data. PSNR is a measurement method to quantify the impact of image processing, which is commonly used for image compression and reconstruction after image de-noising. The higher the PSNR, the better the de-noising effect, and the more original image information is retained.
where , is a resolution of image; ( , ) is an image after de-noise; ( , ) is a noisy image; is the maximum of resolution (i.e., 8-bits image is 2 = 256 resolution). According to Equation (9), the better performance of the de-noising method, the higher PSNR since is a fixed value of resolution, and is the error between de-noised image and noisy image. In theory, the de-noising method can only accurately remove image noise and retain the details of the image. The reconstructed image after de-noising must be consistent with the original image, except that it contains noise.  Table 1 collected from CCTV and social media used in this paper. (a,b) are flooded roads during Hurricane Harvey collected from CCTV; others are collected from social media.

Mean Squared Error (MSE) and Peak Signal-to-Noise Ratio (PSNR)
The quality and information of the image after compression or reconstruction are usually different from the original image. Image de-noising is also a process of compression and reconstruction, which can eliminate most image noise while maintaining image information. However, the differences are difficult to identify the performance of de-noising by the human eye. The criteria for the quality of de-noising filtering are determined by mean squared error (MSE) and peak signal-to-noise ratio (PSNR). MSE in mathematical statistics refers to the expected value of the squared difference between the estimated values and the true value, which can evaluate the degree of change of data. The smaller the value of MSE, the better the accuracy of the experimental data. PSNR is a measurement method to quantify the impact of image processing, which is commonly used for image compression and reconstruction after image de-noising. The higher the PSNR, the better the de-noising effect, and the more original image information is retained. where m, n is a resolution of image; I(i, j) is an image after de-noise; K(i, j) is a noisy image; MAX I is the maximum of resolution (i.e., 8-bits image is 2 8 = 256 resolution). According to Equation (9), the better performance of the de-noising method, the higher PSNR since MAX I is a fixed value of resolution, and MSE is the error between de-noised image and noisy image. In theory, the de-noising method can only accurately remove image noise and retain the details of the image. The reconstructed image after de-noising must be consistent with the original image, except that it contains noise.

The Efficiency of De-Noising Methods
The results of CCTV images via different de-noising methods are shown in Figure 6. According to this comparison Figure 6, the results demonstrate (b) the Bayes shrink is the best of these de-noising methods for CCTV images. It not only removes the noise but also retains important information, including brightness, color, and resolution of the original image. A reasonable explanation for the blurring of images after de-noising filtering like (c), (d) and (e) is the threshold applied in these methods is fixed, which means the threshold does not change with the important information of an image; therefore, the most important information is removed when the noise causes distortion of filtered images.
Water 2020, 12, x FOR PEER REVIEW 12 of 20

The Efficiency of De-Noising Methods
The results of CCTV images via different de-noising methods are shown in Figure 6. According to this comparison Figure 6, the results demonstrate (b) the Bayes shrink is the best of these de-noising methods for CCTV images. It not only removes the noise but also retains important information, including brightness, color, and resolution of the original image. A reasonable explanation for the blurring of images after de-noising filtering like (c), (d) and (e) is the threshold applied in these methods is fixed, which means the threshold does not change with the important information of an image; therefore, the most important information is removed when the noise causes distortion of filtered images.  In order to further verify the performance of de-noising methods, the PSNR of each de-noising method is shown in Table 1. The PSNR chart is shown in Figure 7, where the x-axis is the number of cases, and the y-axis is the percentage of PSNR. Based on the results, Bayes shrink has the best de-noising efficiency, in which mostly PSNR is over 80 dB. In some cases, PSNR can reach over 85 dB. The results imply the similarity between the de-noised image and noisy image is 85%. Most image details can be preserved while the noise is accurately eliminated. For other filtering methods, which are median filtering, arithmetic filtering, and Gaussian filtering, their PSNR show around 20 dB to 30 dB, which means they have poor performance for de-noising. The results are so different between Bayes shrink and other methods because the threshold of the latter three methods is fixed instead of calculated by the image information such as Bayes shrink.  Figure 7. The chart of PSNR for each method with different 14 CCTV images. High PSNR indicates that the reconstructed image after de-noising retains the similar information of the original image, while most of the noise has been removed. Bayes shrink has the best de-noising performance since its PSNR average over 85 dB, which implies most image details can be preserved while the noise is accurately eliminated, as shown in Figure 6b. On the other hand, the PSNR of other methods is only around 20 dB to 40 dB, which means that most details of the original image have been deleted as noise. The de-noised image is distorted, as shown in Figure 6c,d,e.

Detection of Inundation by Image Segmentation
Based on the results of de-noising shown in Table 1, the Bayes shrink has the best de-noising performance for CCTV images. The next step is to use image segmentation to determine whether these de-noised images are clear and can be used for computer analysis to detect object edge perfectly. This is one of the important keys to affect the subsequent image detection work and to identify the edge and contour of inundated water areas in the CCTV image. First, we use k-means segmentation, Otsu segmentation, and Bayesian segmentation methods to analyze images. A computer recognizes pixel information and changes in pixels, which is very difficult unless computers can clearly distinguish areas with similar attributes before the object detection procedure. Image segmentation helps us understand how computers parse images. The comparison of before and after image de-(dB) Figure 7. The chart of PSNR for each method with different 14 CCTV images. High PSNR indicates that the reconstructed image after de-noising retains the similar information of the original image, while most of the noise has been removed. Bayes shrink has the best de-noising performance since its PSNR average over 85 dB, which implies most image details can be preserved while the noise is accurately eliminated, as shown in Figure 6b. On the other hand, the PSNR of other methods is only around 20 dB to 40 dB, which means that most details of the original image have been deleted as noise. The de-noised image is distorted, as shown in Figure 6c-e.

Detection of Inundation by Image Segmentation
Based on the results of de-noising shown in Table 1, the Bayes shrink has the best de-noising performance for CCTV images. The next step is to use image segmentation to determine whether these de-noised images are clear and can be used for computer analysis to detect object edge perfectly. This is one of the important keys to affect the subsequent image detection work and to identify the edge and contour of inundated water areas in the CCTV image. First, we use k-means segmentation, Otsu segmentation, and Bayesian segmentation methods to analyze images. A computer recognizes pixel information and changes in pixels, which is very difficult unless computers can clearly distinguish areas with similar attributes before the object detection procedure. Image segmentation helps us understand how computers parse images. The comparison of before and after image de-noising filtering is performed using three different image-segmentation methods and is shown in Figure 8. Firstly, as shown in Figure 8b,c, the image using k-means segmentation is divided into different colors according to its attributes. It is clearly found that k-means cannot treat the water area as the same object with or without de-noising filtering. Thus, it indicates one part of water belongs to yellow, and the other part belongs to blue. The result of the Otsu image segmentation is shown in Figure 8d,e. Although it can detect mostly the water area, Otsu treats road parts as the same as the water area so that all the images are mostly in the same color, which is white. The results of Bayesian segmentation are shown in Figure 8f,g. There are many black spots in the image segmentation before de-noising filtering shown in Figure 8f due to the noise. The result for Bayesian segmentation with the de-noised image shown in Figure 8g shows that this method can segment important information in the image (i.e., water and roads), which has the best performance among the three methods.
Secondly, based on the comparison results of Figure 8f,g, the importance of de-noising for image recognition can be determined. The Bayesian segmentation result with no de-noising image shown in Figure 8f, which has a lot of black dots, means there is pepper noise, and Figure 8g shows the Bayesian segmentation result with de-noised image, which shows a perfect contour and edge of water area. By comparing two cases shown in Figure 8f,g, without noise filtering, even in advanced approaches such as the Bayesian method, the result likely presents a poor image.
In addition, to further compare the performance of each segmentation method, the inundation area detection is performed based on the approach of Otsu segmentation and Bayesian segmentation shown in Figure 8h,i in which gray indicates water area and blue indicates other parts out of the area, while k-means already segment the image in Figure 8c into colors-comparing the inundation area detection results with different segmentation methods, which are k-means, Otsu, and Bayesian Firstly, as shown in Figure 8b,c, the image using k-means segmentation is divided into different colors according to its attributes. It is clearly found that k-means cannot treat the water area as the same object with or without de-noising filtering. Thus, it indicates one part of water belongs to yellow, and the other part belongs to blue. The result of the Otsu image segmentation is shown in Figure 8d,e. Although it can detect mostly the water area, Otsu treats road parts as the same as the water area so that all the images are mostly in the same color, which is white. The results of Bayesian segmentation are shown in Figure 8f,g. There are many black spots in the image segmentation before de-noising filtering shown in Figure 8f due to the noise. The result for Bayesian segmentation with the de-noised image shown in Figure 8g shows that this method can segment important information in the image (i.e., water and roads), which has the best performance among the three methods.
Secondly, based on the comparison results of Figure 8f,g, the importance of de-noising for image recognition can be determined. The Bayesian segmentation result with no de-noising image shown in Figure 8f, which has a lot of black dots, means there is pepper noise, and Figure 8g shows the Bayesian segmentation result with de-noised image, which shows a perfect contour and edge of water area.
By comparing two cases shown in Figure 8f,g, without noise filtering, even in advanced approaches such as the Bayesian method, the result likely presents a poor image.
In addition, to further compare the performance of each segmentation method, the inundation area detection is performed based on the approach of Otsu segmentation and Bayesian segmentation shown in Figure 8h,i in which gray indicates water area and blue indicates other parts out of the area, while k-means already segment the image in Figure 8c into colors-comparing the inundation area detection results with different segmentation methods, which are k-means, Otsu, and Bayesian segmentation shown in Figure 8c,h,i, respectively. The inundation area detection based on Bayesian segmentation is the closest to the original image (a), which shows the perfect edge of the water area, while the other two results in Figure 8c,h cannot display the correct inundation area corresponding to the original image Figure 8a. Summarizing the results shown in Figure 8, de-noising is important for image processing, which may affect the following processing results. Bayesian segmentation has the best performance to find inundation edges and using these edges to find the inundation area corresponding to the CCTV image.

Conclusions
In this study, we comparatively studied image-processing methods, such as de-noising methods and image segmentation, to automatically detect the flooded areas from the low-resolution images. The inundation detection results indicate that a series of methods are important and necessary to achieve detection. According to this research, the most effective de-noising method for a CCTV image is the Bayes shrink adaptive wavelet threshold. By using Bayes shrink and segmentation as a pre- Consequently, there are two other images that use the edge based on Bayesian segmentation results to calculate inundation to achieve object detection. The region of interest (ROI) for this study is the water area. The inundation detection results are shown in Figure 9, which presents the water area only. Case No.2 is shown in Figure 9a,d. The gray area in Figure 9b indicates inundation ROI, while blue implies background outside the inundation area. Case No.3 is shown in Figure 9c,d. Figure 9d presents an incorrect ROI of inundation; there are two different inundation areas at the top and bottom of (d). The gray at the top represents the sky, while the blue represents the background of the building, and the gray at the bottom represents the inundation. Compared with Case No. 2, the sky part in Case No. 3 is detected as the inundation area. In this case, choosing the appropriate ROI is important, which controls the location of CCTV images to avoid the sky part in the image to make inundation detection more accurate, as shown in Figure 9e,f.

Conclusions
In this study, we comparatively studied image-processing methods, such as de-noising methods and image segmentation, to automatically detect the flooded areas from the low-resolution images. The inundation detection results indicate that a series of methods are important and necessary to achieve detection. According to this research, the most effective de-noising method for a CCTV image is the Bayes shrink adaptive wavelet threshold. By using Bayes shrink and segmentation as a pre-processing procedure, future classification and object detection in CCTV images are expected to be more successful. The key findings are summarized below.

•
First, by comparing the most recently used de-noising methods, Bayes shrink with adaptive wavelet coefficients shows the best de-noising performance of all indicating this by the minimum MSE and maximum PSNR for CCTV images. The PSNR of CCTV images, by using the Bayes shrink approach, mostly exceeds 85 dB, which means that at least 85 % of the image details are retained after de-noising.

•
Second, for image-segmentation techniques, Bayesian segmentation has the best performance to find the inundation edge. The results present the most important part of following object detection. Bayesian segmentation allows identifying the inundation edges correctly in a grayscale image.

•
Last, use of the edge based on Bayesian segmentation enabled us to calculate inundation to achieve object detection. We notice the importance of the ROI, which controls the location of CCTV images to avoid the sky part, which has similar features to the inundation part. In this study, the inundation in CCTV can be identified accurately, which is important for following work like water-level detection by using the coordinate of the image.
The image processing presented in this paper is to estimate the inundation from images to assess flooding risks in the vicinity of the local flooding locations. Such information will help traffic engineers to take preventive or proactive actions to improve the safety of the drivers and to protect and preserve the transportation infrastructure.
For further research by using the concept of image processing presented in this paper, which defines the edge of the inundation area, the depth of water can be calculated by the coordinate relationship between image and the real world. It is possible to monitor the inundation status and calculate the water level in real-time by using a traffic-monitoring camera in the future. This research demonstrates the other economical option for people to detect flooding conditions such as the location and water level of the inundation area to provide people with more and faster information.