Using the modified two-mode method to identify surface water in Gaofen-1 images

Abstract. The rapid, accurate, and automated extraction of surface water is highly important for conducting reliable and necessary surface water monitoring endeavors. Classification methods commonly exhibit high precision but also have a low degree of automation or narrow scope of application; commonly used water index methods are highly efficient, but they easily mistake other targets with similar spectral characteristics for surface water. Simultaneously achieving precision, efficiency, and automation within a single method is a challenge. To address these problems, we simplify the normalized different water index (NDWI) to a band ratio index and traverse the neighborhood of the extreme in the histogram to determine two peaks and one trough between the peaks in the two-mode method, and we then compare the middle value of the two peaks with the value of the trough to confirm the threshold of the surface water. We use the modified two-mode method to extract Poyang Lake from four Chinese Gaofen (GF)-1 remote sensing images corresponding to different seasons, and then compare the results with those obtained by the NDWI index and the maximization of interclass variance (OTSU) method. The comparison shows that our method has higher and more stable accuracy, especially during the drought period for Poyang Lake. However, polluted water, narrow rivers, bridges, and residential areas along the lake are sometimes mistakenly extracted. Finally, the advantages and prospects of the proposed method are discussed.


Introduction
Surface water resources, including streams, canals, ponds, lakes, and reservoirs, are invaluable and necessary for human survival. 1,2 Land surface water plays an important role in global biogeochemical cycles; moreover, the extent of water bodies on land is affected by climate change and human activities, thereby affecting the climate, biological diversity, and human wellbeing. 3,4 Changes in the characteristics of land surface water bodies may result in the onset of severe disasters, such as flooding, droughts, and even outbreaks of waterborne diseases, all of which have consequences for the safety of human life and property. 5 In Australia, severe flooding in late 2010 and early 2011 caused billions of dollars' worth of damage and many deaths. 6 In the spring of 2011, the combined area of Poyang Lake and Dongting Lake in China was reduced by approximately two-thirds because of drought; as a consequence, drinking water was scarce for both humans and animals, the aquaculture industries suffered substantial losses, and the local ecological environment was affected. Accordingly, the accurate and timely mapping of surface water bodies to describe their temporal and spatial variations is important for the creation of effective policies, and for avoiding the loss of human life and property through disaster monitoring endeavors. 7 Additionally, water extraction is critically important in various scientific disciplines, including research on assessments of present and future water resources, climate models, agricultural suitability, river dynamics, wetland inventories, watershed analyses, surface water surveys and management, flood mapping, and environmental monitoring. [8][9][10][11] Due to its wide monitoring range, rapid update speed, and potential to acquire vast amounts of information, satellite remote sensing represents one of the most practical approaches employed to determine the spatial and temporal patterns of inland water bodies. 4,12 Satellitebased remote sensing imagery is able to provide an aerial view of ongoing Earth surface processes at multiple scales to address the intricate nature of surface water. 3,5 The optical sensor on board the Gaofen (GF)-1 satellite, which is one of the most widely used platforms in China due to its high resolution (2,8, and 16 m), short period (4 days), and large sensor width (800 km), represents an ideal new data source for water extraction.
Because water is liquid at ordinary temperatures, different geographical environments host different forms of water. Different climates and human activities also cause variability in water quality, due to heterogeneity in the color and turbidity of water bodies on different land types. Moreover, the intersection of wetlands results in a morphology consisting of mixed pixels in images, which makes it difficult to define the boundaries of the individual water bodies. Sources of noise such as clouds and shadows can also cause confusion between water surfaces and the background topography. In addition, satellite sensors also allow the properties of water to change among different types of images. Ultimately, many factors can cause different water bodies to display different properties; consequently, describing all of the properties of a single water body through the application of a single method can be arduous, and thus, numerous different algorithms are utilized to different degrees in studies of the nature of the same water body. To date, many algorithms have been proposed to identify water bodies with remote sensing imagery. 5 Existing water extraction methods using remote sensing data can be summarized in three basic types: (1) spectral bands, (2) water indices, and (3) classification. 2 However, combinations of these methods are often used to improve the accuracy of water extraction results. 4,11,[13][14][15] Spectral band techniques [16][17][18][19] are usually employed to extract water bodies by choosing thresholds of the band intensity that spatially correspond to the land-water interface. 4 This approach is easy to implement and is less computationally time-consuming; 20 however, it is restricted by the abundance of information related to shadows, clouds, and buildings in the spectral bands of interest. 21 Therefore, the more pressing difficulty is the selection of the correct bands and appropriate thresholds.
Water indices use algebraic operations involving two or more spectral bands to enhance the differences between water bodies and other objects. 2 To date, the normalized difference water index (NDWI), 22 modified NDWI (MNDWI), 23 automated water extraction index, 13 and WI 24 have each been widely used to extract water bodies. All of these water indices allow water pixels to be classified priorities. 25 These index methods are capable of revealing some general macroscopic characteristics of water bodies, and they have the same advantages as spectral band methods insomuch that they are easy to operate and exhibit a high efficiency. Thus, index methods are widely used to extract large bodies of water, thereby attracting more scholars to conduct continuous and in-depth research on the extraction of water bodies using this approach. However, despite its numerous benefits, index techniques do suffer from a few limitations, including a band dependency, restricting the application of this method to only specific bands that are not possessed by some remote sensing images. 26 In addition, the lack of a stable threshold may cause the classification to be relatively time-consuming and lead to a subjective threshold choice, which could also affect the overall accuracy. 13 Classification methods include both supervised and unsupervised classification. 27 In the latter, pixels are grouped based on the reflectance properties of pixels, and the created groups are called "clusters;" the former is performed by selecting representative samples for each class in the image, and the objective classification is based on spectral signatures defined by the user. 28 The most commonly used supervised classifications include the support vector machine, 29 maximum likelihood, 30 decision tree, 31 random forest, 32 and neural network classification 33 techniques, and the most common unsupervised classification methods include the K-means clustering 34 and ISODATA classification 35 approaches. In addition to the band intensity, these methods can use more information, such as textural and multiband data. In some specific application scenarios, classification methods can obtain higher accuracies than either spectral band or WI methods, and they are more suitable for high-resolution images with an abundance of spectral information. However, these methods are more complex than the other two approaches and are often designed for a specific problem. While they are more precise, existing ground reference datasets are required, thereby restricting these methods from being applied over large study regions. 19 Because the different environments that surround water bodies are complicated and different terrains have substantial influences on the spectral characteristics of water, a single method cannot be employed to universally address all types of water bodies, and therefore, it is difficult to simultaneously guarantee efficiency, precision, and automation. Accordingly, in this paper, we simplify the NDWI to a simpler band ratio to extract the common characteristics of surface water bodies, thereby reducing the probability of extraction of nonwater targets. We further expand the definition of an extreme value to design an automated method for selecting the spectral threshold. According to the characteristics of the water body in the ratio band, we improve the twomode method to select the threshold, improving the accuracy of water extraction. Ultimately, we propose the method for extracting Poyang Lake by designing a band ratio that imitates the NDWI to enhance water information and create an automated extend neighborhood algorithm using the two-mode method to calculate extreme values and obtain spectral thresholds. We then use the improved method to accurately and quickly extract Poyang Lake from four images corresponding to four seasons, and the results are compared with the NDWI index and the maximum between-classes variance algorithm maximization of interclass variance (OTSU). 36 This experiment confirms that the proposed method is superior to and more stable than the above two methods, especially in areas of great changes in the water surface.

Study Area
Poyang Lake (28°22′ to 29°45′N, 115°47′ to 116°45′E), which is the largest freshwater lake and river-communicating lake in China, is located in the northern part of Jiangxi Province along the southern bank of the middle and lower reaches of the Yangtze River. Poyang Lake is notably complex; furthermore, the annual water level changes greatly, such that the water area during the wet season is >22 times greater than that during the drought season. Due to severe water-level fluctuations throughout Poyang Lake, a typical freshwater lake landscape appears during the flooding season, whereas separate river, butterfly water, wetlands, swamps, and other diverse landscapes are exposed during the drought season. Large areas of grassland and beaches are widely distributed throughout the basin, and many towns with extensive farmland, as well as forests and thousands of small lakes, are situated along the coastline. Poyang Lake consequently plays an important role in regulating flooding and protecting biodiversity within the Yangtze River Basin, maintaining the local and Chinese ecological security, ensuring regional economic development, and protecting various natural resources. (Fig. 1)

Remote Sensing Data
The GF-1 satellite (Table 1), which was launched on April 26, 2013, is the first satellite to be deployed within the Chinese High-Resolution Earth Observation System. The GF-1 satellite is equipped with one 2-m-resolution panchromatic sensor and one 8-m-resolution multispectral sensor. It also has four 16-m-resolution wide-field-of-view (WFV) multispectral sensors. We select one image from each season in November 2016 to July 2017 (Table 2) and research the accuracy of the method by extracting Poyang Lake in different periods.

Methods
The key objective of water extraction methods, which are usually used to identify water bodies within remote sensing images, is to discriminate water bodies from land and vegetative surfaces. The water extraction method proposed in this study includes the following steps: (1) performing image preprocessing, (2) correcting the image by the internal average relative reflection (IARR) method, (3) calculating the green/near infrared (NIR) ratio band, (4) computing the histogram of the band ratio, (5) using the cubic spline method to smooth the histogram, (6) obtaining the threshold by the modified two-mode method, (7) conducting threshold segmentation, and   Figure 2 shows the overall flowchart of the proposed method for extracting the lake surface area.

Image Processing
The GF-1 data can be downloaded from the China Centre for Resources Satellite Data and Application (CRESDA) 37 as level 1 processed scenes that include spectral restorations and radiation corrections. First, the image is corrected by the IARR method to eliminate the influences of atmospheric radiation and some terrain, 38 after which the relative reflectance of the image is similar to the true reflectance: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 1 1 6 ; 3 8 3 where ρ λ is the relative reflectivity, R λ is the pixel value of the radiation, and F λ is the average spectral value of the whole image. Geometric corrections are then applied to the image using a world map 39 to retrieve fine geometric results. Finally, the whole image is clipped to highlight the spectral characteristics of Poyang Lake.

Spectral distribution characteristics of the Poyang Lake water body
Take the image from November 4, 2016, for research. According to the characteristics of Poyang Lake and the surrounding objects in the GF-1 image, this paper categorizes the land surface into six types: water bodies, clouds, shadows, mountains, residential area, and farmland. We select typical samples among five types of ground objects, calculate the spectral luminance values in each band, and compose spectral characteristic curves for the six types of objects as shown in Fig. 3 to analyze the spectral characteristics of each type of ground object. Based on the spectral characteristics of water (blue), clouds (black), shadows (purple), mountains (brown), residential areas (red), and farmland (green) shown in Fig. 3, the reflectance of water is clearly much smaller in the NIR band than in the other three bands, and it is obviously different from those of other objects in the NIR band. Therefore, the NIR band can be utilized as an important band for water extraction. In the NIR band, the reflectance of a shadow is lower than that of a water body, and thus, it is easy to mistakenly extract shadows as water bodies; consequently, other bands must be combined with the NIR band to distinguish water from shadows. These features provide an important basis for the extraction of the water information from Poyang Lake and for the design of an appropriate WI.

Spatial distribution characteristics of Poyang Lake
The topography around the Poyang Lake Basin is very complex. Vegetation, farmlands, residential areas, mountains, and rounds are interlaced in the vicinity of the lake, and a number of smaller lakes and rivers are scattered among the towns situated along the coastline. Poyang Lake exhibits obvious seasonal variations in the form of morphological changes: vegetated and lowerelevation areas are flooded during the wet period from April to September, when the variety of smaller lakes are connected into one larger water body, while the water level drops from October to March during the drought season, and when Poyang Lake is separated into discontinuous surfaces and rivers.

Water Body Classification
In this paper, a histogram is calculated for the ratio band of the image, after which cubic spline interpolation is employed to smooth the histogram, and then the frequencies of pixel values are compared with those of adjacent neighborhood pixels to obtain the maximal and minimal values, which are also the peaks and troughs of the histogram. Then, the two-mode method is used to obtain the middle values of peaks, and the smaller of the two values, namely, the middle value between two peaks and the value of the trough between two peaks, is selected as the threshold for segmenting the image.

Determining the band ratio combination
The band ratio method is a mathematical model for recognizing water bodies through arithmetic operations of the band, and the extraction of water information is directly realized by the threshold. This method can suppress information related to various parameters such as the albedo and terrain slope, thereby enhancing information concerning water bodies. To weaken the influences of nonwater factors, such as vegetation and soil, McFeeters 22 proposed the NDWI index, the concept of which has been modified with regard to water extraction purposes, but its application to water extraction in urban areas still includes many impurities. The definition of the NDWI is as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 1 1 6 ; 1 6 2 NDWI ¼ Green − NIR Green þ NIR : The NDWI has poor extraction performance in urban areas, where it is easy to confuse water with the shadows of mountains. We, therefore, simplify the NDWI to the ratio bands as Eq. (3) to enhance water information, reduce the effects of mountain shadows, and decrease the errors in urban water extraction. The proposed band ratio is defined as follows: Fig. 3 Means of different objects in the study plots derived from the GF-1 image.

Ratio ¼
Green NIR : According to the features of the target image, six categories of surface features are analyzed: water, clouds, shadows, mountains, residential areas, and farmland. The results of an analysis of the spectral characteristics of these six features in the ratio band are shown in Fig. 4, in which the band ratio of water is high. Furthermore, based on the statistical analysis for all samples, more than 99.9% of the water in the samples is concentrated in areas where the band ratio is >1.56. The value of the threshold is set as the Ratiothreshold; when the values of the pixels in the ratio image are greater than Ratiothreshold, most of the nonwater bodies can be removed.

Cubic spline interpolation method for smoothing of the histogram
A histogram, which can reflect the statistical characteristics of a distribution in an image, represents a common method for researching the distributions of objects in remote sensing images. Because the noise in the GF-1 image interferes with and reduces the accuracy of the extraction of Poyang Lake, a cubic spline interpolation approach is used in this paper to smooth the histogram.
The two free parameters in a cubic spline interpolant can be variously assigned. Three common strategies for this assignment procedure are described as follows. To determine SðxÞ, the cubic spline interpolant can be based on n interpolation conditions, 3n − 6 continuous conditions, and given boundary conditions. The first derivative or secondorder derivative of the nodes is then used. The results of the band ratio before and after the cubic spline interpolation are shown in Fig. 5, respectively.

Automatic threshold selection algorithm for the two-mode method
A classification is essentially a clustering problem, and the number and shape of both peaks and troughs of a histogram provide important information for the segmentation. In the two-mode method, 41 the image is considered to be composed of a target and a background with different gray levels. The gray distribution curve of an image can be approximately considered a superposition of two normally distributed functions. The distributions of the two peaks represent the most densely distributed gray values of the background and target objects, and the value of the trough between those two peaks can be used as the threshold to segment the image. In practical applications, the object and the background are often not normally distributed in a histogram, and thus, the middle value between two peaks also constitutes a segmentation method.
Let i be the number of bins of pixels and fðiÞ be the value of pixel frequency in the image. Then, obtain fðiÞ compared with fði − 1Þ and fði þ 1Þ: if fðiÞ is less than or equal to fði þ 1Þ and fði − 1Þ, then fðiÞ is the minimal value and the trough point; if fðiÞ is greater than or equal to fði þ 1Þ and fði − 1Þ, then fðiÞ is the maximal value and the peak point. The peak of the expression function is (where PðiÞ and bðiÞ are the values of peaks and troughs. After the calculation, there are many peaks and troughs, and each peak represents a class of objects. To obtain the peaks of the background and object in addition to the trough between them, we add constraints based on the definition of an extreme value to merge nonwater objects into the background until a histogram is generated, which possesses two peaks separately corresponding to water and nonwater objects. Accordingly, we expand the definitions of peaks and troughs. Compare fðiÞ with the adjacent local neighborhood of fðsÞ, where s ¼ fi − m; i − m þ 1; : : : ; i − 2; i − 1; i þ 1; i þ 2; : : : ; i þ m − 1; I þ mg; the parameter m is the width of the adjacent local neighborhood of fðiÞ. Let the minimum in fðsÞ be f min and let the maximum be f max : if fðiÞ is greater than or equal to f max , the i is the peak point; if fðiÞ is less than or equal to f min , then i is the trough point. 42 The definitions of the functions PðiÞ and BðiÞ are as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 1 1 6 ; 2 4 4 and E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 7 ; 1 1 6 ; 1 8 8 BðiÞ ¼ 1; fðiÞ ≤ f min 0; fðiÞ > f min ; where PðiÞ and BðiÞ are the values of peaks and troughs. The autoselection threshold algorithm results for the band ratio are shown in Figs. 6 and 7, respectively. The value of m can be determined by the number of peaks and valleys and by the position of the valley. According to the definition of the two-mode method, which requires two peaks corresponding individually to the background and ground objects, there are only two peaks in the histogram and one trough between those peaks. Therefore, the traverse method can be used to let the value of m gradually increase from 0 to confirm where there are only two peaks and one trough between the peaks, and the process continues until this is the case. As a result, the appropriate value of m is within a set, and any value in the set is suitable. In this paper, the number of bins is 1000, the set of m ranges from 90 to 113, and any number in this set can be suitable. The traverse process is shown in Table 3. Water is distributed in higher band ratios than the other nonwater features, and therefore, we can choose the smaller value between the median value of two peaks and the trough between the two peaks as the value of Ratiothreshold, which is defined as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 8 ; 1 1 6 ; 3 4 9 Ratiothreshold ¼ min where P 1 is the value of the first peak, P 2 is the value of the second peak, P 1 þP 2 2 is the median value, B 2 is the value of the trough between the two peaks, and P 1 < B 2 < P 2 . In this image, the middle value is smaller, and Ratiothreshold ¼ fð94Þþfð400Þ When the ratio is greater than the Ratiothreshold, the result is shown in Fig. 8(a).

Comparisons and Analysis of Accuracy
The accuracy assessment is considered from two perspectives: (1) images in different seasons for typical assessments of the two-mode method based on the automatic extended neighborhood and (2) a comparison of the accuracies with different methods based on the extraction results. 43 The water information extracted by the modified two-mode (MTM) method is shown in Figs   area of Poyang Lake has been greatly reduced in the drought season, and the wetland has increased, resulting in some wetlands being mistaken for water bodies because of mixed pixels. In contrast, the accuracy of the MTM method is more stable.

Error Analysis
Although the proposed algorithm has a highly accurate extraction capacity, some water bodies are still missed, and other nonwater bodies are mistakenly extracted. First, not all polluted lakes [ Fig. 9(a)] and narrow rivers [ Fig. 9(b)] can be extracted. The MTM method is based on the spectral value of water, and the substances within polluted lakes can change the reflectivity of the water to be similar to the spectral characteristics of nonwater bodies. Therefore, polluted water bodies cannot be extracted using only the band ratio approach at this time. In addition, some rivers that are not >5 pixels wide cannot be extracted. When rivers are too narrow, the pixels will be mixed on both sides of the rivers; this phenomenon also changes the values of the bands over water. One way to resolve the above problem is to use an image with a higher resolution to extract water bodies. Second, most bridges [ Fig. 9(c)] across rivers and a few residential areas surrounding the lake are easily mistaken, similar to the NDWI index. Both artificial objects [ Fig. 9(d)] are mistakenly extracted because of similar ratio band values. However, these errors can be eliminated with various types of information, such as textural and shape parameters.

Discussion
In this paper, we correct the image by the IARR method to avoid invalid values (such as NaN) in later operations. We then simplify the NDWI as a ratio band to decrease partial errors associated with shadows and buildings, and we introduce the concept of the automatic extended neighborhood based on the definition of the extreme value to improve the two-mode method to confirm the peaks and troughs of the histogram. Next, based on the characteristics of the larger band ratio value of the water body, we employ the smaller one between the median value of two peaks and the value of the trough as the threshold of segmentation. Finally, we obtain the water body classification results for Poyang Lake. This method, which has broad potential applications, clearly achieves a unification of automation, high accuracy, and rapid extraction. The algorithm can determine the threshold of segmentation without manual intervention. The IARR method is used to avoid the NAN error in NDWI and improve accuracy. The cubic spline method is applied to smooth the histogram to reduce accidental errors and to enhance noise immunities. In addition, the band ratio index imitating NDWI is used to concentrate the main spectral characteristics of the water body at the high value of the band so that the algorithm can quickly extract the target objects.
The key to establishing the threshold using this method is to traverse and confirm the neighborhood of the pixel frequency to determine the location of two peaks and a trough. Compared with region growth and other segmentation algorithms to traverse or iterate the pixels, this method must only traverse the histogram, thus greatly reducing the computation. Moreover, the method does not need to set the number of iterations or the threshold of termination from experience, improving the automation of extraction. Furthermore, it is applicable to separate a single target gathered at one end of the band from other objects.
However, there are still parts with disadvantages similar to NDWI. Parts of resident areas near the lake and bridges are mistakenly extracted because the building sites and water are both high in the green band and low in the NIR band. Furthermore, the construction is not suppressed when calculating the band ratio index. Moreover, some narrow rivers also cannot be accurately extracted because of the presence of mixed pixels.

Conclusions
Because of the accuracies and efficiencies of traditional water extraction methods, we propose a two-mode method based on the automatic extended neighborhood. A remote sensing image can be divided into two layers, including the target and the background, and the segmentation threshold for the target objects can be automatically obtained. This method can be employed to automatically and accurately extract the water bodies of a study area in a very short time, and it is suitable for the extraction of Poyang Lake and other lakes; therefore, the proposed technique can satisfy the needs of water conservancy monitoring businesses. The method can also be applied to images of other satellites for other classification purposes, such as flood monitoring, which need to extract only one given class of target. Based on this method, we will continue to research the classification of multiclass objects and the elimination of mistaken and erroneous extraction results. The simplicity of the method in conjunction with its high accuracy and short operation time make it a promising tool for remote sensing applications in the future.

Disclosures
The authors declare that there are no conflicts of interest regarding the publication of this paper.