Article Information
Corresponding Author: Yusheng Gong , 38642709@qq.com
Yan Bian, School of Civil Engineering, University of Science and Technology Liaoning, Anshan 114051, China, b997166041y@163.com
Yusheng Gong, School of Civil Engineering, University of Science and Technology Liaoning, Anshan 114051, China, 38642709@qq.com
Guopeng Ma, School of Civil Engineering, University of Science and Technology Liaoning, Anshan 114051, China, 502920530@qq.com
Ting Duan, School of Civil Engineering, University of Science and Technology Liaoning, Anshan 114051, China, 43768127@qq.com
Received: December 17 2020
Revision received: April 19 2021
Accepted: April 26 2021
Published (Print): October 31 2021
Published (Electronic): October 31 2021
1. Introduction
The coastline is the boundary between the sea and the land at the average water level of spring tides over many years [1]. The water edge refers to the instantaneous coastline, rather than the actual coastline [2]. However, the water edge extraction is the premise and important step of coastline extraction, so the research on which is of great significance.
With the development of remote sensing technology, the resolution of a multi-spectral remote sensing image is also improved. The improvement of image resolution has greatly improved the accuracy and speed of information acquisition, but it is also affected by more “noise or non-target,” “same object and different spectrum” or “foreign body in the same spectrum,” which bring more difficulties in the extrac¬tion of a linear target [3]. Under this background, developing a more efficient image extraction method is particularly important. However, extracting linear targets (coastline, road centerline, tidal channel line, etc.) with a single method can only come up with poor results, so a combination of several algorithms is widely used. Yang et al. [4] realized the extraction of coastline along the Sanya Bay, Dadonghai by using the watershed segmentation and mathematical morphological methods, which can achieve the coastline extraction. However, the watershed segmentation algorithm is susceptible to noise and other factors, and the image may be over-segmented, which easily introduces uncertain factors, and it is difficult to achieve higher accuracy even through morphological modification. Zhu et al. [5] realized the extraction of the middle line of the tidal gulch in Jiuduansa area based on the combination of top-hat transformation, the OTSU threshold segmentation algorithm, erosion and dilation methods. Although this method can extract the middle line of the tidal trench, there still exists three problems: firstly, the top-hat method can not only eliminate the noise but also destroy the edge of the target area and affect the extraction accuracy of the edge line; secondly, the OTSU method uses the maximum inter-class variance between the target and the background to determine the segmentation threshold, but the segmentation threshold is not necessarily the optimal solution of the maximum inter-class variance; lastly, the structural elements size of erosion and dilation is difficult to grasp, and it is easy to cause sawtooth phenomenon. Paravolidakis et al. [6] proposed a method combining the edge detection algorithm and the Snake algorithm. The method initially used the anisotropic diffusion algorithm to reduce the noise of the image, and then used local threshold segmentation algorithm to process the denoised image, and the output image was regionally grouped to remove all the small space objects and focused on the space objects of interest, finally, the morphological operator and Canny operator were used to extract the coastline. Ideal results have been obtained, but the process is complicated and time-consuming (for example, for a remote sensing image of 4000×4000, after noise reduction, it shall be divided into 200×300 blocks, and each block area shall be processed separately, and then the processed blocks shall be merged). The GA-OTSU threshold segmentation algorithm proposed in this paper, can not only overcome the drawbacks of traditional segmentation methods but also solve the problem that the normalized water difference index (NDWI) method [7] cannot be used to separate water body and non-water body for high-resolution three-band data. Combining with morphology closed operation and Sobel edge detection operator, it can better avoid the problems such as coastline fault and non-coastline inclusion caused by a single coastline extraction method. By using the method in this paper and comparative methods to make qualitative and quantitative comparative analysis on the water boundary extraction results of four island experimental areas, it is believed that the method in this paper is feasible to a certain extent.
2. The Technology and Principle of GA Method
2.1 Data Pre-processing
During the remote sensing imaging process, the geometric distortion and deformation of remote sensing image are caused by the external factors of sensor, such as the change of attitude, height, speed, and so on. Moreover, due to the lack of spatial, temporal and spectral resolution of remote sensing images, information cannot be accurately recorded in the data acquisition process, which will greatly reduce the accuracy of remote sensing images. Therefore, it is necessary to conduct pre-process to remote sensing images [8]. Data preprocessing in this paper includes FLAASH atmospheric correction and geometric correction, aiming to make the ground objects in the image more consistent with the actual features. FLAASH atmospheric correction refers to the process of eliminating radiation errors caused by atmospheric scattering and absorption in remote sensing images. Geometric correction refers to the process of eliminating geometric (shape, size, position, etc.) distortion of ground objects in the imaging process.
2.2 GA-OTSU Threshold Segmentation Algorithm
Genetic algorithm (GA) is a kind of self-organizing and adaptive artificial intelligence technology that simulates the biological evolution process and mechanism in nature to solve extreme value problems [9]. GA is a holistic optimization process, which is very applicable in cases where there is no deterministic method to calculate the optimal solution or if the deterministic method is complicated, and it can quickly and accurately find the global optimal solution. GA is an iterative algorithm, and the number of solutions in each iteration is called population size. Each solution is represented by a chromosome, and each chromosome is made up of genes. The flow chart of this genetic algorithm is shown in Fig. 1.
The specific meaning of each step is explained as follows:
Step 1. Coding. Before the genetic algorithm can be performed, the chromosome must be coded, that is, the solution space of the problem must be coded.
Step 2. Initialize the population. The population represents the set of solutions of the optimization pro¬blem, whose size will directly affect the scope and result of the search.
Step 3. The adaptation function. Its size determines the ability of an individual to adapt to the environ¬ment in each iteration process, and the strong ones will continue to choose, cross and mutate.
Step 4. Selection. Selection process is a kind of operation process that determines the elimination or re-production of offspring according to the level of individual fitness value.
Step 5. Crossover. The crossover process is the accumulation of superior bit information from the parent generation and exchange them with each other in the hope of producing superior offspring.
Step 6. Mutation. The process of mutation is to randomly change the bit information in the seed string, so as to obtain the best fit value of the individual.
Step 7. Convergence criteria. The mechanism for its termination is either the maximum number of iterations or the fitness of the best individual does not change.
Flow chart of genetic algorithm.
GA-OTSU threshold segmentation algorithm takes the maximum inter-class variance method (OTSU algorithm [10]) as the basic segmentation method, and introduces GA to improve OTSU algorithm on the basis of it. Compared with the OTSU algorithm, the GA-OTSU threshold segmentation algorithm has the advantage of quickly and accurately obtaining the optimal segmentation threshold t* and reducing noise. The specific steps of GA-OTSU algorithm are shown as follows:
Step 1. Find a way to “digitize” the potential solution of the problem. The grayscale value of the image pixel ranges from 0 to 255, so the 8-bit binary number to represent the grayscale value of the pixel can be selected. An 8-bit binary number is just one byte, so treat it as a chromosome.
Step 2. Selection of population size. Population size refers to the total number of individuals in each generation, which can be set artificially. The larger the population size, the more likely the global solution will be found, but the running time will increase accordingly.
Step 3. Determine the adaptation function and decode it. In this paper, the GA-OTSU method is taken as the adaptability function to evaluate each chromosome. As shown in Eq. (1), the greater the variance obtained by a chromosome is, the closer it is to the optimal solution, and the more likely it is to be selected as the genetic seed. After the genetic seeds are determined, the genetic cal¬culation is carried out from generation to generation. The adaptive value of each new gen¬eration is different and higher than that of the previous generation so that the solution obtained is closer to the maximum value.
In Eq. (1), [TeX:] $$\delta^{2}(t)$$ is the threshold selection function of the Otsu method; [TeX:] $$\omega_{0}, \omega_{1}$$ is the proportion of target area and non-target area in the study area, respectively; [TeX:] $$\mu, \mu_{0}, \mu_{1}$$ each represents the average gray levels of the whole study area, the gray levels of the target area, and the non-target area.
Step 4. Genetic calculation. Crossover is the first genetic process which refers to exchange information of bits on chromosomes. Secondly, the mutation operation is carried out to randomly select the mutation point of a chromosome for mutation, which can compensate for the information loss caused by the selection process and the crossover process, so that the genetic algorithm has the global search ability. Finally the best threshold t* is obtained which makes [TeX:] $$\delta^{2}\left(t^{*}\right)$$ the biggest. At this time, t* can be used as the most adaptive solution for GA-OTSU threshold segmentation algorithm.
2.3 Morphological Closed Operation
Morphological closed operation makes the image firstly expanded and then corroded, so that the holes inside the target in the image are not only filled but also maintain the original shape and size, and the fractured target is connected [11]. In this paper, morphological closed operation is used to fill holes in the binary image after GA-OTSU threshold segmentation to highlight the target (land) and background (ocean), which is convenient for subsequent edge detection operator to be used for edge extraction. Compared with the morphological erosion and dilation algorithms in [5], sawtooth phenomenon will not be caused by morphological closed operation. The concept of mathematical closed operation can be expressed as A×B (indicating that structural element B performs closed operation on image A) and can be defined as Eq. (2).
In Eq. (2), after A goes through B expansion operation, B again processes the results obtained by it through corrosion operation, as shown in Fig. 2.
Closed operation diagram.
2.4 Sobel Edge Detection Operator
In image processing, edges are mainly distributed where the gray value difference between the target and the background is relatively obvious [12]. The edge types generally include horizontal, vertical and diagonal edges. Intensity and direction are two basic properties of edge lines in an image, the intensity variants the most across the edge line, but changes more gently along the edge line. The intensity change of the image is related to the discontinuity of the first derivative, and the drastic change is mainly reflected in the local maximum value of the first derivative, so the boundary strength of the corresponding point can be measured according to the value of the derivative to achieve the extraction of the boundary point set. In this paper, the Sobel operator is used for edge extraction, which is a first-step operator. The principle of its edge detection is shown in Fig. 3(a). For a digital image f(x, y), the definition of gradient vector at (x, y) is shown in Eq. (3).
In Eq. (3), [TeX:] $$G_{x}, G_{y}$$ respectively represent the gradient of direction x and y. Theoretically, the partial derivative in Eq. (3) needs to calculate the position of each pixel, but in actual image processing, the image gradient is generally obtained by convolution approximation calculation based on small area template. And since both [TeX:] $$G_{x} \text { and } G_{y}$$ have their own templates, a gradient operator is the combination of the two templates. In this paper, the convolution template [TeX:] $$G_{x} \text { and } G_{y}$$ of Sobel operator is adopted, as shown in Fig. 3(b).
(a) Edge detection schematic diagram of edge gradient operator. (b) Sobel operator tem-plate diagram.
3. Experiment and Analysis
3.1 GA Island Water Edge Automatic Extraction Method
GA method firstly pre-processed the experimental data. Then, GA-OTSU threshold segmentation method was used to segment the image, generate binary image, highlight the target ground object (land), and then morphological closed operation was used to fill the holes of the target ground object. Finally, Sobel edge detection operator is used to extract the water edge. In order to show the idea of GA method proposed in this paper more intuitively, a flow chart of GA method is drawn, as shown in Fig. 4.
Flow chart of the GA method.
3.2 Experimental Data Set and Evaluation Indexes
The four islands studied in this paper are all located in the Bohai Bay area in the southeast of Liaoning Province. The remote sensing images were selected from the GF-2 satellite, which was equipped with a panchromatic camera of 1 m resolution and a multispectral camera of 4 m resolution, and featured with sub-meter spatial resolution, high positioning accuracy and fast attitude maneuvering.
The four island regions in the pre-processed GF-2 satellite image data with a resolution of 1 m were selected for the experiment, as shown in Fig. 5(a). The detailed information is shown in Table 1. In the images, the landforms in the study area of islands are diverse, including residential areas, woodland, barren land and harbors, etc. These landforms constitute features with different prospects. It provides data support for the study of different types of island water boundary extraction. Fig. 5(b), as a reference image, shows the manually drawn water boundary vector information corresponding to the four islands.
GF-2 remote sensing image data set of the study areas: (a) images of the study areas and (b) reference images.
GF-2 remote sensing image information of the study areas
In this study, qualitative and quantitative indicators were used to compare and analyze the final extraction results of island water edges. Among them, qualitative analysis refers to the superposition and comparative analysis of the final extraction result of water boundary with the original image and reference image in Fig. 5. The quantitative index is evaluated by three evaluation indexes, namely accuracy P, omission error Q and redundancy error R, respectively [13], and the quantitative analysis is conducted. The equation is expressed as follows:
In Eqs. (4)–(6), i represents the vector length of the water edge line of the island which was drawn manually in the reference image; a represents the total length of the overlapping part between the extracted water boundary line and the manually drawn water boundary line vector; b refers to the total length missing from the extracted water edge compared with the artificially drawn vector, that is, the length not extracted when the water edge is taken as the background noise; c refers to the total length of redundancy of the extracted water edge compared with the manually drawn vector, that is, the background noise is taken as the extracted length of the water edge.
3.3 GA Method and Result Analysis
The experiment is based on Windows Server 2016 operating system, with 16G internal storage, a NVIDA Quadro P2000 video card and 5G video storage. The program development language is MATLAB2020b.
3.3.1 GA-OTSU threshold segmentation algorithm
GA-OTSU threshold segmentation algorithm is the most critical step in GA method, and the determination of segmentation threshold is a key factor affecting the image segmentation effect. GA-OTSU threshold segmentation algorithm takes OTSU algorithm as the basic segmentation method, on which genetic algorithm is introduced to improve OTSU algorithm. Compared with the OTSU algorithm, the GA-OTSU threshold segmentation algorithm has the advantage of quickly and accurately obtaining the global optimal solution, that is, the optimal segmentation threshold t*, and reducing the noise. This experiment in segmentation algorithm, for the same data set, the GA-OTSU segmentation algorithm in the GA method in this paper is not only compared with the OTSU segmentation algorithm in [5], but also compared with the watershed segmentation algorithm in [4]. In order to visually display the segmentation effects of the four research areas, the comparative results of the three segmentation methods are presented, as shown in Fig. 6.
It can be seen from Fig. 6 that the watershed segmentation algorithm in [4], the traditional OTSU algorithm in [5], and the GA-OTSU segmentation method in this paper can segment the experimental area well, and the segmenting image can retain the original image feature information rather integrally. However, it is obvious that the GA-OTSU segmentation method is better than the traditional OTSU algorithm. It can not only complete image segmentation, but also clear separation between the target and the background. The final segmented image is clearer, with less noise and less information loss, which can more effectively separate target from background and highlight the areas of interest. It is also obvious that compared with the watershed segmentation algorithm, the GA-OTSU segmentation method almost does not have excessive segmentation, which can lay a good foundation for the subsequent extraction of water edges and indirectly improve the accuracy of water edges extraction.
Comparison of the segmentation results of three segmentation algorithms in four island study areas: (a) the original images, (b) watershed segmentation algorithm in [ 4], (c) OTSU segmentation algorithm in [ 5], and (d) GA-OTSU segmentation algorithm.
The GA-OTSU segmentation algorithm can not only effectively segment the target image, but also find the most adaptive threshold of the image and improve the performance of image segmentation by calculating the fitness of the genetic algorithm to obtain the operation characteristics of the optimal solution. In the parameter setting of GA-OTSU segmentation algorithm in this experiment, the initial population number N is 8, and the maximum number of evolutionary iterations is 100. As can be seen from the variation diagram of the optimal fitness curve in Fig. 7(b), the ordinate value of the curve gradually increases and finally tends to be stable, which indicates that the optimal fitness value under this condition is found through the genetic algorithm, that is, the optimal solution of the threshold value obtained by the OTSU method is found. The optimal threshold generation graph in Fig. 7(a) shows that the stable value of the curve is the optimal threshold that meets the conditions. The optimal adaptive threshold graph obtained by watershed algorithm, the OTSU algorithm and the GA-OTSU segmentation method for island images in the four experimental areas is shown in Table 2. The GA-OTSU segmentation method can more accurately find the global optimal segmentation threshold of the target image to achieve the optimal segmentation effect, which is conducive to the next step of image processing.
Schematic diagram of GA-OTSU method process in four island study areas: (a) the optimal threshold generation graph and (b) the variation diagram of the optimal fitness curve.
Optimal segmentation threshold of four islands by three methods
3.3.2 Morphological closure operation
The binary image segmented by GA-OTSU is used to perform morphology closing operation with disk structure elements to fill in the holes. The results of morphological closure operation and the size of structural elements are shown in Fig. 8.
The result graphs of morphological closure operation: the size of structure elements are 50 (a), 20 (b), 30 (c), and 17 (d).
3.3.3 Sobel edge detection operator
The Sobel edge detection operator is used to extract the edge of the closed binary image. Since the binary image processed by closed operation only has target (island) and background (ocean), the Sobel edge detection operator is used for boundary extraction, which is faster and has better effect, to realize the last step of GA island water edge automatic extraction method proposed in this paper, and the final island water edge is obtained. Superposition contrast analysis were also conducted between the results of water edges extracted by the GA method in this paper (GA-OTSU threshold segmentation algorithm + morphological closed operation + Sobel edge detection operation), the method in [4] (watershed segmentation + morphology modification method), the method in [5] (top-hat transform + OTSU segmentation + expansion and corrosion morphology method), the original and the reference images in Fig. 5. As shown in Fig. 9.
According to the qualitative comparative analysis of the extraction results in the first three experimental areas of the three methods in Fig. 9, it can be found that the water boundary extracted by the method of [4] (watershed segmentation + morphological modification) is over-extracted. The water edge extracted by the method in [5] (top hat transform + OTSU segmentation + expansion and corrosion morphology method) has obvious sawtooth phenomenon caused by the expansion and corrosion operation of morphology. The water edge extracted by GA method in this paper is integrated and smooth without fracture. In addition, the water edges extracted by the three methods were superimposed on the original image and the reference image (manually drawn vector), respectively. It can be found that the water edges extracted by the method in this paper also have the best matching effect with the original image and the reference image. The extraction results of the three methods are good in the fourth island, because the sea and land of which are distinct and the background is simple.
In addition to the above qualitative analysis, this paper also adopts the three quantitative evaluation indexes (accuracy P, omission error Q and redundancy error R) in Eqs. (4)–(6) above through the intersection tabulating tool in ArcGIS software to evaluate the accuracy of the island water boundary lines extracted by the three methods, the statistical results of extraction accuracy of the three methods are shown in Table 3.
It can be found from Table 3 that the average extraction accuracy of GA method in this paper can reach 98%, and the omission error (Q) and redundancy error (R) are 2.5% and 1.5%, respectively. The accuracy is significantly higher than the other two comparison methods.
Comparison of the results from three water edge extraction methods: (a) the original images, (b) the reference images, (c) the method of [ 4], (d) the method of [ 5], (e) the method of GA, (f) the results of the three water edge extraction methods are superimposed with the original image, and (g) the results of the three water edge extraction methods are superimposed with the reference images.
Water edge line extraction accuracy statistics of three methods (unit: %)
4. Conclusion
The method proposed in this paper is compared with the methods in [4] and [5] through qualitative and quantitative analysis, and found that it is effective to extract the water edges of islands from GF-2 remote sensing images. The innovation of the GA method in this paper is partly reflected in the GA-OTSU segmentation method, which has the following advantages compared with the watershed segmentation algorithm in [4] and the OTSU segmentation algorithm in [5]: (1) it can better retain the edge of the segmented image and make the edge more integrated; (2) it has less noise; (3) there is basically no excessive segmentation phenomenon. Another innovation of the GA method is reflected in the com¬bination of GA-OTSU segmentation algorithms, morphological closure operation and Sobel edge detec¬tion operator, which has realized the automatic water edge extraction of islands, and ideal results with higher precision have been obtained, so the method can give reference advice for the water edge auto¬matic extraction of islands from GF-2 remote sensing image with high resolution in three bands.
Acknowledgement
This paper is supported by the National Science Foundation for Young Scholars Project of China (No. 41801294) and the Innovation Training Program of the University of Science and Technology Liaoning.