Image Segmentation Methods for Flood Monitoring System

: Flood disasters are considered annual disasters in Malaysia due to their consistent occurrence. They are among the most dangerous disasters in the country. Lack of data during ﬂood events is the main constraint to improving ﬂood monitoring systems. With the rapid development of information technology, ﬂood monitoring systems using a computer vision approach have gained attention over the last decade. Computer vision requires an image segmentation technique to understand the content of the image and to facilitate analysis. Various segmentation algorithms have been developed to improve results. This paper presents a comparative study of image segmentation techniques used in extracting water information from digital images. The segmentation methods were evaluated visually and statistically. To evaluate the segmentation methods statistically, the dice similarity coe ﬃ cient and the Jaccard index were calculated to measure the similarity between the segmentation results and the ground truth images. Based on the experimental results, the hybrid technique obtained the highest values among the three methods, yielding an average of 97.70% for the dice score and 95.51% for the Jaccard index. Therefore, we concluded that the hybrid technique is a promising segmentation method compared to the others in extracting water features from digital images.


Introduction
Rapid urbanization, population growth, and extreme climate change have led to frequent flooding events, posing challenges for many countries around the world. The impacts of floods include loss of life, damage to property, and deterioration of health conditions. Several researchers studied the effects of flooding on agricultural land [1][2][3], finding that such events may reduce agricultural production and eventually influence the economic performance of a country [4]. For instance, changes in temperature and rainfall during flood events may influence soybean growth and yield [5]. They can also destroy agricultural infrastructure and increase the risk of diseases. In the aquaculture field, extreme floods can damage farming infrastructure, such as sluices and shutters, as well as introduce diseases and harmful algal blooms [6].
Due to the impacts of flooding, researchers have intensified their efforts to improve and enhance flood monitoring systems. Flood monitoring is the process of monitoring the conditions that lead to flood events, such as the level of a river, so that authorities can take appropriate actions in advance. Quickly predicting flood disasters is important to prevent severe damage to property and life. The lack of data availability during flood events is the main constraint on developing a reliable flood monitoring system. Several flood event monitoring methods are available, such as gauge sensors and remote sensing technology [7][8][9][10][11][12][13]. However, gauge sensors can only provide one spatial dimension (water level), whereas remote sensing technology experiences issues with satellite revisit time. The retrieval of information may be delayed for hours depending on the method of data transmission [14]. Currently, flood warning analysis relies on water level sensors and precipitation forecasts; therefore, it is not capable of providing near-real-time and automated flood monitoring analysis [15]. As such, visual sensing systems have been introduced that have the capability to collect a vast quantity of information from a given area. Important information for many applications can be obtained from still images and video streams. The interest in visual monitoring and surveillance systems, especially in natural disaster applications, has increased with advancing surveillance technology. It is now possible to recognize events in real time with the progress in information technology [16]. For instance, Mettes et al. [17] worked on the motion of water properties using videos. Image-based approaches, combined with the appropriate image analysis techniques, may offer efficient and cost-effective methods that may be useful for managing flood events [18]. An early warning system for flood prevention and monitoring is one of the applications of visual sensing technology.
Image processing is the use of computer algorithms to extract useful information from digital images, which is a vital procedure in visual sensing systems. To understand the content of an image, image segmentation is commonly used to partition it into several regions, which are often based on the attributes of its pixels. In particular, image segmentation has been applied in the fields of medical imaging, automated driving, and water management. In flood disaster applications, it may involve the separation of the foreground (in this case, the water features) from the background. Several image segmentation techniques are currently used by researchers and industry, such as thresholding, boundary-based, region-based, and hybrid techniques [19,20]. Some papers specifically discussed image segmentation methods handcrafted for flood disaster applications.
Generally, the choice of features is crucial in image segmentation algorithms. Nath and Deb [21] stated that one of the most promising features of digital images is color information. The other commonly used feature is texture or pattern information. Many researchers used these main features to identify flood events. For the detection of a flooding event, Lai and Chen [22] employed threshold values to determine the potential foreground regions. Borges et al. [23] introduced a probabilistic model for flood detection in videos. They combined the statistical characteristics of floods, such as color, texture, and saturation characteristics, using the Bayes classifier along with frame-to-frame changes to determine the flood presence. They then proposed a probabilistic model of flood occurrence to detect the position of flood regions, thereby significantly improving the classification performance.
San Miguel and Ruiz Jr. [24] conducted a study similar to the work of Borges et al. [23] using the thresholding method to segment the flood and non-flood regions depending on color, size, and patterns of ripples. This approach offers good flood detection capabilities but is limited by the reflections on the floodwater. Filonenko et al. [14] proposed the use of a color probability method from images obtained from a video to detect floods in real time. Lo et al. [25] employed the region growing method for flood region detection, finding it more suitable for situations in which the background and foreground shapes change over time. Therefore, all shape and size variations across the flood regions can be detected. The authors also proposed a region-based segmentation method of differentiating the foreground and background. Jyh-Horng et al. [26] proposed mean-shift and region growing approaches to develop an automated identification method for flood monitoring. The region growing algorithm is specifically used to differentiate an object within a binary mask.
Geetha et al. [27] used crowd-sourced images to detect the extent of flood areas using a color-based segmentation threshold. Zhang et al. [28] evaluated the performance of three different image processing techniques for flood monitoring systems. Their experimental results indicated that the canny edge detection method obtained a high level of accuracy in detecting the flooded area. Langhammer and Vacková [29] used the seed region growing algorithm to perform object-based image segmentation in classifying the image into several categories.
From the cited literature, various algorithms have been developed to improve segmentation results. At present, there is no general solution to image segmentation problems that ensures reliable accuracy for flood disaster applications. Therefore, this paper presents a comparative study of image segmentation techniques-namely thresholding, region growing, and a hybrid technique-to extract water information from digital images.

Methodology
Based on previous studies, thresholding, region growing, and hybrid techniques are three promising image processing techniques with potential applications in flood monitoring systems. Therefore, they were selected for use in this study. The study area is located in Batu 12, Sungai Langat, Selangor, Malaysia. Images captured by a surveillance camera installed near a river were used as the input. The outdoor environment was used to more realistically test the image segmentation methods. Two different images were used: one showing normal water level conditions and the other showing overflowed water conditions. The ground truth data was manually segmented and then used to evaluate the accuracy of the tested algorithms. The images were segmented into foreground (water) and background using the thresholding, region growing, and hybrid techniques. The experiments were performed on a notebook that was equipped with a 2.60 GHz Intel ® Core™ i7 CPU and 16 GB RAM. This work was implemented using MATLAB 9.8.0 (R2020a). The segmentation techniques are discussed in detail below. An illustration of the overall procedure is shown in Figure 1. Langhammer and Vacková [29] used the seed region growing algorithm to perform object-based image segmentation in classifying the image into several categories. From the cited literature, various algorithms have been developed to improve segmentation results. At present, there is no general solution to image segmentation problems that ensures reliable accuracy for flood disaster applications. Therefore, this paper presents a comparative study of image segmentation techniques-namely thresholding, region growing, and a hybrid technique-to extract water information from digital images.

Methodology
Based on previous studies, thresholding, region growing, and hybrid techniques are three promising image processing techniques with potential applications in flood monitoring systems. Therefore, they were selected for use in this study. The study area is located in Batu 12, Sungai Langat, Selangor, Malaysia. Images captured by a surveillance camera installed near a river were used as the input. The outdoor environment was used to more realistically test the image segmentation methods. Two different images were used: one showing normal water level conditions and the other showing overflowed water conditions. The ground truth data was manually segmented and then used to evaluate the accuracy of the tested algorithms. The images were segmented into foreground (water) and background using the thresholding, region growing, and hybrid techniques. The experiments were performed on a notebook that was equipped with a 2.60 GHz Intel® Core™ i7 CPU and 16 GB RAM. This work was implemented using MATLAB 9.8.0 (R2020a). The segmentation techniques are discussed in detail below. An illustration of the overall procedure is shown in Figure 1.

Thresholding
Thresholding was used to segment the foreground from the background by selecting a threshold value, Th. Any pixel with a value less than or equal to the threshold value was selected as a part of the foreground, whereas any value higher than the threshold value was included in the background. The threshold value was selected by observing the histograms of the flooding images. The output image g(x,y) was obtained from the original image f(x,y) as: Where a threshold is value and , is the coordinate of the threshold.

Region Growing
Region growing, also known as region-based segmentation, groups pixels in the image into regions with similar characteristics. First, an initial pixel is selected in the region of interest, which is also known as a seed point. The attributes of the seed point are compared with the neighboring pixels. If the neighboring pixels have similar criteria to the seed point, the pixels are considered as belonging

Thresholding
Thresholding was used to segment the foreground from the background by selecting a threshold value, Th. Any pixel with a value less than or equal to the threshold value was selected as a part of the foreground, whereas any value higher than the threshold value was included in the background. The threshold value was selected by observing the histograms of the flooding images. The output image g(x,y) was obtained from the original image f (x,y) as: where Th a threshold is value and (x, y) is the coordinate of the threshold.

Region Growing
Region growing, also known as region-based segmentation, groups pixels in the image into regions with similar characteristics. First, an initial pixel is selected in the region of interest, which is also known as a seed point. The attributes of the seed point are compared with the neighboring pixels. If the neighboring pixels have similar criteria to the seed point, the pixels are considered as belonging in the same region. The size of this region grows with the inclusion of the nearby pixels. Figure 2a-f illustrate the process of region growing using a 4-connected neighborhood given a threshold value of three.
Water 2020, 12, x FOR PEER REVIEW 4 of 10 in the same region. The size of this region grows with the inclusion of the nearby pixels. Figure 2a-f illustrate the process of region growing using a 4-connected neighborhood given a threshold value of three. The blue color represents the pixels that are considered to belong in the same region as the initial pixel.
(d-f) The green color indicates pixels that are excluded from the region because the difference is larger than the threshold value.
In this study, this technique appointed a seed point in the flooding area from which the region grew as pixels with similar features were grouped with it. The threshold value refers to the difference between the intensity value of the pixel and the mean of the segmented region, which was used as the measure of similarity in this study. If the difference between the new pixel and the region was smaller than the threshold value, the pixel was included in the region. In contrast, if the difference was larger than the threshold value, the new pixel was not included in the region. The 4-connected neighborhood was used to grow the neighboring pixels from the initial seed point. The iteration process stopped when all the pixels in the image were tested.

Hybrid Technique
Different methods of image segmentation may perform better for different types of images. The hybrid technique, consisting of multiple methods of image segmentation, can thus improve segmentation results [30]. We used the hybrid technique proposed by Lankton et al. [31] to detect the flooding area by combining geodesic active contours and region-based active contours. This method is capable of segmenting images with poor edge definition or that lack a homogeneous intensity profile.
Active contour methods start with an initial curve and a definition of the energy for that curve based on its geometry and image data. Energy based on geometry is provided to maintain the smoothness of the curve, whereas energy based on image data is aimed at attracting the contour to object boundaries. The curve is deformed to increase and decrease the energy, thus moving the curve toward the local maxima and minima. The hybrid technique begins with the initial curve, then moves In this study, this technique appointed a seed point in the flooding area from which the region grew as pixels with similar features were grouped with it. The threshold value refers to the difference between the intensity value of the pixel and the mean of the segmented region, which was used as the measure of similarity in this study. If the difference between the new pixel and the region was smaller than the threshold value, the pixel was included in the region. In contrast, if the difference was larger than the threshold value, the new pixel was not included in the region. The 4-connected neighborhood was used to grow the neighboring pixels from the initial seed point. The iteration process stopped when all the pixels in the image were tested.

Hybrid Technique
Different methods of image segmentation may perform better for different types of images. The hybrid technique, consisting of multiple methods of image segmentation, can thus improve segmentation results [30]. We used the hybrid technique proposed by Lankton et al. [31] to detect the flooding area by combining geodesic active contours and region-based active contours. This method is capable of segmenting images with poor edge definition or that lack a homogeneous intensity profile.
Active contour methods start with an initial curve and a definition of the energy for that curve based on its geometry and image data. Energy based on geometry is provided to maintain the smoothness of the curve, whereas energy based on image data is aimed at attracting the contour to object boundaries. The curve is deformed to increase and decrease the energy, thus moving the curve toward the local maxima and minima. The hybrid technique begins with the initial curve, then moves each point on the curve based on the analysis of local interior and exterior regions. According to Lankton et al. [31], at each point of the true edge of an object, the nearby points inside and outside the object will be modeled by the mean intensities of the local regions. Figure 3 shows the initial curve in the study area.
Water 2020, 12, x FOR PEER REVIEW 5 of 10 each point on the curve based on the analysis of local interior and exterior regions. According to Lankton et al. [31], at each point of the true edge of an object, the nearby points inside and outside the object will be modeled by the mean intensities of the local regions. Figure 3 shows the initial curve in the study area.

Segmentation Evaluation
Image segmentation algorithms must be evaluated to assess their efficiency and effectiveness. Generally, segmentation evaluation is categorized into two major classes: subjective and objective methods. The most common method for evaluating the effectiveness of a segmentation method is subjective evaluation, in which segmentation results are judged by a human evaluator [32]. Objective methods do not involve human assumptions and assessments. They are widely used to quantitatively measure the performance of the segmented image. Quantitative evaluation methods are used to analyze the similarity between the results of segmentation algorithms and ground images generated by a human expert. The Jaccard index, dice similarity coefficient (DSC), precision, and recall are some examples of metrics that are widely used and accepted by the scientific community to evaluate the accuracy of segmentation methods.
We used the DSC and Jaccard index to assess the performance of the three segmentation methods. DSC operates on binary data and is frequently used as a statistical validation metric in segmentation evaluation. Its value ranges from 0%, which indicates there is no spatial overlap between the two sets of binary segmentation results, to 100%, which indicates complete overlap. DSC is a spatial overlap index that can be defined as: Where |A| and |B| are the cardinal of set A and set B, respectively. The Jaccard index, also known as the intersection-over-union (IoU) metric, is another commonly used metric for evaluating semantic segmentation results. It expresses the number of objects two sets have in common as a percentage of the number of objects they have in total. In other words, it shows the size of the intersection divided by the size of the union of the sample sets. The metric ranges from 0% to 100%, with 0% indicating no overlap between the two segmented regions and 100% signifying a perfectly overlapping segmentation. The mathematical representation of the Jaccard index is:

Segmentation Evaluation
Image segmentation algorithms must be evaluated to assess their efficiency and effectiveness. Generally, segmentation evaluation is categorized into two major classes: subjective and objective methods. The most common method for evaluating the effectiveness of a segmentation method is subjective evaluation, in which segmentation results are judged by a human evaluator [32]. Objective methods do not involve human assumptions and assessments. They are widely used to quantitatively measure the performance of the segmented image. Quantitative evaluation methods are used to analyze the similarity between the results of segmentation algorithms and ground images generated by a human expert. The Jaccard index, dice similarity coefficient (DSC), precision, and recall are some examples of metrics that are widely used and accepted by the scientific community to evaluate the accuracy of segmentation methods.
We used the DSC and Jaccard index to assess the performance of the three segmentation methods. DSC operates on binary data and is frequently used as a statistical validation metric in segmentation evaluation. Its value ranges from 0%, which indicates there is no spatial overlap between the two sets of binary segmentation results, to 100%, which indicates complete overlap. DSC is a spatial overlap index that can be defined as: where |A| and |B| are the cardinal of set A and set B, respectively. The Jaccard index, also known as the intersection-over-union (IoU) metric, is another commonly used metric for evaluating semantic segmentation results. It expresses the number of objects two sets have in common as a percentage of the number of objects they have in total. In other words, it shows the size of the intersection divided by the size of the union of the sample sets. The metric ranges from 0% to 100%, with 0% indicating no overlap between the two segmented regions and 100% signifying a perfectly overlapping segmentation. The mathematical representation of the Jaccard index is: where |A| and |B| are the cardinal of set A and set B, respectively.

Results and Discussion
We used images captured by surveillance cameras installed near a river. The study area is located in Batu 12, Sungai Langat, Selangor, Malaysia. Two different images were used-one during normal conditions and the other during overflowed conditions-to examine the practicality of each segmentation method. The images had a resolution of 1280 × 720 and the ground truth images were manually segmented. The original photographic images and the ground truth images are shown in Figure 4. Where |A| and |B| are the cardinal of set A and set B, respectively.

Results and Discussion
We used images captured by surveillance cameras installed near a river. The study area is located in Batu 12, Sungai Langat, Selangor, Malaysia. Two different images were used-one during normal conditions and the other during overflowed conditions-to examine the practicality of each segmentation method. The images had a resolution of 1280 × 720 and the ground truth images were manually segmented. The original photographic images and the ground truth images are shown in Figure 4.

Qualitative Evaluation
The results of the three segmentation methods were compared with the manually segmented ground truth images. We did not require very detailed segmentation, especially inside the river area; the overall purpose of the segmentation was to precisely detect the borderline of the river. The comparisons between the segmentation results and the ground truth images are shown in Figure 5.

Qualitative Evaluation
The results of the three segmentation methods were compared with the manually segmented ground truth images. We did not require very detailed segmentation, especially inside the river area; the overall purpose of the segmentation was to precisely detect the borderline of the river. The comparisons between the segmentation results and the ground truth images are shown in Figure 5. The green and magenta regions show areas where the segmentation results differed from the expected ground truth. Based on Figure 5a, the hybrid technique provided the nearest segmentation results to those of the manually segmented ground truth image. Its detection of the water edge was almost identical to that of the ground truth image. The region growing method was able to segment the images into foreground and background, though there were some major spots where it mistakenly classified the water as background and vice versa, as shown in Figure 5b. This was also the case with the thresholding technique. Figure 5c shows that the thresholding method labeled part of the ground as water due to the similarity in color between the river water and the bare soil.

Quantitative Evaluation
A quantitative comparison was performed between the ground truth and the segmentation results using the DSC and Jaccard index metrics. Both metric results ranged from 0% to 100%, with 0% indicating that there was no overlap between the two segmented regions and 100% indicating a perfect match between the two segmentations. The evaluations of segmented images using DSC are listed in Table 1. The green and magenta regions show areas where the segmentation results differed from the expected ground truth. Based on Figure 5a, the hybrid technique provided the nearest segmentation results to those of the manually segmented ground truth image. Its detection of the water edge was almost identical to that of the ground truth image. The region growing method was able to segment the images into foreground and background, though there were some major spots where it mistakenly classified the water as background and vice versa, as shown in Figure 5b. This was also the case with the thresholding technique. Figure 5c shows that the thresholding method labeled part of the ground as water due to the similarity in color between the river water and the bare soil.

Quantitative Evaluation
A quantitative comparison was performed between the ground truth and the segmentation results using the DSC and Jaccard index metrics. Both metric results ranged from 0% to 100%, with 0% indicating that there was no overlap between the two segmented regions and 100% indicating a perfect match between the two segmentations. The evaluations of segmented images using DSC are listed in Table 1. The hybrid technique obtained the highest dice score, followed by region growing and thresholding for both normal and overflowed conditions. The dice scores for the hybrid technique approached 100%, indicating that almost the entire segmented images overlapped with the ground truth images. The average dice score of hybrid technique for both conditions was 97.70%.
The Jaccard index was also calculated to analyze the similarity between the segmentation algorithm results and the ground truth data. The results of the Jaccard index are shown in Table 2. Based on the Jaccard index, the hybrid technique obtained the highest values for both water conditions followed by region growing and thresholding. The average Jaccard index of the hybrid technique for both conditions was 95.51%. The thresholding method performed the worst out of the three techniques because the algorithm mistakenly classified the ground as water due to the similarity of color between the river water and bare soil. This result implies that the thresholding method is strongly dependent on image characteristics, such as lighting conditions [33].
Overall, the hybrid technique obtained higher values for both the Jaccard index and the dice score compared to the region growing and thresholding methods, and obtained results higher than 95% on average. The results demonstrated that the hybrid technique performed well among the three techniques evaluated as it combined more than one technique. In this case, two techniques were used to segment the image. Hence, it can offer better results compared to other segmentation methods [31].

Conclusions
Over the last decade, researchers have increasingly employed computer vision approaches to improve flood detection and monitoring systems, and thus to reduce the severe impacts of flood disasters. Computer vision captures and processes images using segmentation techniques to understand their content. This paper presented a comparison of three segmentation methods for extracting information from digital images for flood monitoring systems. Thresholding, region growing, and hybrid techniques were compared on the basis of visual evaluation and statistical accuracy. Based on the experimental results, these techniques were all capable of extracting water information from the image. However, the hybrid technique was found to be the most promising image processing technique for extracting water features from digital images, with segmentation evaluation results higher than 95% on average. One problem identified with the use of these segmentation techniques is the need to change the algorithms when using different images. Semantic segmentation is another method to identify real-time events [34]. Future research may be planned to study deep learning techniques in order to develop more advanced segmentation methods.