Method, device and system for extracting coastlines using optimized machine learning
By employing a machine learning approach that integrates multi-source features, combining vegetation index and image texture features, and utilizing random forest and adaptive threshold segmentation algorithms, the problem of time-consuming, labor-intensive, and unstable traditional coastline monitoring has been solved, achieving high-precision and robust automated coastline extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional methods of coastline monitoring are time-consuming, labor-intensive, and limited by complex geographical environments, making it difficult to achieve high-precision, objective, cross-regional synchronous observations. Existing remote sensing technologies suffer from instability in single-temporal images and interference from human experience, making it difficult to extract fine coastline details.
A machine learning approach that integrates multi-source features, combining vegetation index, image texture features, and multi-band data, is employed to extract coastlines using random forest and adaptive threshold segmentation algorithms, along with spatial context methods. This approach reduces misclassification rates and improves geometric accuracy and spatiotemporal robustness.
It achieves high-precision and robust automated coastline extraction in complex coastal environments, reduces the misclassification rate, and has high geometric accuracy and high spatiotemporal stability, making it suitable for long-term monitoring across regions.
Smart Images

Figure CN122493072A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing information extraction, specifically relating to a method, apparatus, and system for extracting coastlines using optimized machine learning. Background Technology
[0002] As a core geographical element, the evolution of the coastline's spatial morphology and location is a direct representation of the health of the land-sea interaction zone ecosystem. Against the backdrop of rapid urbanization and industrialization, drastic human activities such as land reclamation projects and shoreline hardening have altered the natural properties of the coastline, triggering significant ecological process disruption effects.
[0003] However, traditional coastline monitoring methods face a dual challenge. Traditional manual surveying is not only time-consuming and labor-intensive, but also limited by the complex geographical environment of the coastal zone, resulting in significant blind spots in human accessibility and making it difficult to meet the needs of cross-regional synchronous observation. Although remote sensing technology has improved monitoring coverage with its advantages of large scale and high frequency, existing extraction methods still have technical bottlenecks. For example, visual interpretation methods based on Landsat imagery are greatly affected by the subjective consciousness of the operators and it is difficult to quantify the interference of tidal dynamic fluctuations on the determination of the coastline. On the other hand, studies based on threshold segmentation algorithms such as OTSU to extract single-phase images ignore the random bias of instantaneous image acquisition, resulting in a lack of robustness in the extraction results.
[0004] In summary, current mainstream coastline extraction research largely relies on single-temporal images and specific threshold algorithms. This not only easily introduces systematic errors due to missing information but also makes it difficult to eliminate uncertainties introduced by tidal fluctuations and human experience. Therefore, overcoming the instability of single-temporal data and achieving high-precision, objective, and automated coastline extraction has become a key technical challenge that urgently needs to be addressed in this field.
[0005] The following issues exist in current coastline extraction methods: the land-sea boundary zone is dynamically changing and affected by natural factors such as tides and waves; a single image capturing the instantaneous waterline is insufficient to reflect the true shoreline location. Accurate coastline extraction during image preprocessing requires eliminating spectral interference from complex nearshore features such as shoals, vegetation, and turbid water. Existing studies often rely on empirically fixed thresholds or expert interpretation, which is highly subjective and limits the applicability and accuracy of algorithms in cross-regional, long-term monitoring. Therefore, traditional algorithms struggle to extract fine shoreline details. Summary of the Invention
[0006] To address the aforementioned problems, this invention proposes a method, apparatus, and system for extracting coastlines using optimized machine learning. This method achieves coastline data extraction with greater robustness and geometric accuracy than traditional algorithms without the need for complex manual assistance.
[0007] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:
[0008] In a first aspect, the present invention provides a method for extracting coastlines using optimized machine learning, comprising:
[0009] The vegetation index is calculated based on the acquired remote sensing images, and the image texture features are extracted.
[0010] The reflectance, vegetation index and image texture features of each band of the remote sensing image are fused to obtain multi-band data to be classified.
[0011] Machine learning algorithms are used to classify multi-band data to be classified in different consecutive time periods within the same year, resulting in the first land-water binary classification result.
[0012] An automatic threshold segmentation algorithm is used to classify multi-band data to be classified in different consecutive time periods within the same year, and a second land-water binary classification result is obtained.
[0013] The first and second binary classification results of land and water are spatially superimposed to extract the difference regions where the classification results are inconsistent. The spatial context method is used to determine the category for the difference regions, and the original classification results are retained for the non-difference regions to obtain the third binary classification result of land and water.
[0014] An edge detection algorithm is used to extract edges from the first, second, and third binary classification results of land and water, and the three edge extraction results are spatially averaged to obtain the final coastline recognition result.
[0015] In conjunction with the first aspect, optionally, the method of using spatial context to determine the category for the difference region specifically includes:
[0016] For ambiguous pixels with inconsistent classification, a comprehensive confidence evaluation function is constructed, assuming the pixel... The overall confidence level of the water body is The formula is as follows:
[0017] ,
[0018] In the formula, The pixels output by the random forest model The posterior probability of belonging to the water body category; Spatial distance confidence based on Otsu threshold; and The weight coefficients of the two algorithms are respectively, satisfying... ;
[0019] when When the value is greater than or equal to the set threshold, the pixel If it is classified as water, it is classified as land.
[0020] In conjunction with the first aspect, optionally, the set threshold is ≥0.5.
[0021] In conjunction with the first aspect, optionally, the vegetation indices include: MNDWI, NDWI, and NDVI;
[0022] in:
[0023] ,
[0024] ,
[0025] ,
[0026] In the formula, It is in the green light band; It is in the shortwave infrared band; It is in the near-infrared band; It is in the red light band.
[0027] In conjunction with the first aspect, optionally, the method for extracting the image texture features includes:
[0028] Multiple texture features of an image are extracted using a gray-level co-occurrence matrix. These texture features include: mean, variance, coherence, contrast, dissimilarity, information entropy, second moment of angle, and / or correlation.
[0029] In conjunction with the first aspect, optionally, the machine learning algorithm is a random forest algorithm, wherein the number of decision trees is set to 200, the leaf node limit is set to 5, and the square root of the feature number is used as the optimal feature selection for split nodes.
[0030] In conjunction with the first aspect, optionally, the automatic threshold segmentation algorithm is the OTSU algorithm, which adaptively determines the land-water segmentation threshold for each remote sensing image by maximizing the inter-class variance criterion.
[0031] In conjunction with the first aspect, optionally, the edge detection algorithm is the Canny edge detection algorithm.
[0032] In a second aspect, the present invention provides an apparatus for extracting coastlines using optimized machine learning, comprising:
[0033] The feature extraction module is used to calculate the vegetation index based on the acquired remote sensing images and extract the image texture features;
[0034] The feature fusion module is used to fuse the reflectance, vegetation index and image texture features of each band of the remote sensing image to obtain multi-band data to be classified.
[0035] The first land-water binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using machine learning algorithms, and obtain the first land-water binary classification result.
[0036] The second water-land binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using an automatic threshold segmentation algorithm, and obtain the second water-land binary classification result.
[0037] The third water-land binary classification result calculation module is used to perform corresponding spatial superposition of the first water-land binary classification result and the second water-land binary classification result, extract the difference regions where the two classification results are inconsistent, use the spatial context method to determine the category for the difference regions, and retain the original classification result for the non-difference regions to obtain the third water-land binary classification result.
[0038] The edge detection module is used to extract edges from the first, second, and third land-water binary classification results using an edge detection algorithm, and to spatially average the three edge extraction results to obtain the final coastline recognition result.
[0039] Thirdly, the present invention provides a system for extracting coastlines using optimized machine learning, including a storage medium and a processor;
[0040] The storage medium is used to store instructions;
[0041] The processor is configured to operate according to the instructions to perform the method according to any one of the first aspects.
[0042] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0043] This invention aims to provide an automated coastline extraction scheme based on multi-source feature fusion, effectively addressing the technical shortcomings of traditional remote sensing monitoring, which can only acquire "instantaneous waterline" and is susceptible to random interference from tides and waves. By integrating adaptive threshold segmentation with a random forest algorithm (machine learning), this invention significantly reduces the misclassification rate in complex coastal environments (such as mudflats, vegetated areas, and turbid waters), and possesses the technical advantage of extracting coastlines with high geometric accuracy and high spatiotemporal robustness in highly heterogeneous backgrounds. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0045] Figure 1 This is a flowchart illustrating a method for extracting coastlines using optimized machine learning, according to an embodiment of the present invention.
[0046] Figure 2 Here are three different algorithms used to extract coastlines according to one embodiment of the present invention, wherein, Figure 2 (a) Coastlines extracted by three different algorithms in June; Figure 2 (b) Coastlines extracted by three different algorithms in July; Figure 2 (c) Coastlines extracted by three different algorithms in August;
[0047] Figure 3 This invention provides a comparison of coastline extraction methods based on OTSU-random forest and spatial context optimization, according to one embodiment. Figure 3 (a) is the mudflat coastline; Figure 3 (b) is an artificial coastline.
[0048] Figure 4 This invention provides an embodiment of a comparison between coastlines and a baseline coastline based on OTSU-random forest and spatial context optimization. Figure 4 (a) is an artificial coastline; Figure 4 (b) is the mudflat coastline. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0050] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0051] Example 1
[0052] This invention provides a method for extracting coastlines using optimized machine learning, such as... Figure 1 As shown, it includes the following steps:
[0053] (1) Calculate vegetation index based on the acquired remote sensing images and extract image texture features;
[0054] (2) The reflectance, vegetation index and image texture features of each band of the remote sensing image are fused to obtain multi-band data to be classified;
[0055] (3) Using machine learning algorithms, classify the multi-band data to be classified for different consecutive time periods within the same year to obtain the first land and water binary classification result;
[0056] (4) An automatic threshold segmentation algorithm is used to classify multi-band data from different consecutive time periods within the same year to obtain a second land-water binary classification result;
[0057] (5) Superimpose the first and second binary classification results of water and land in the corresponding space, extract the difference regions where the classification results of the two are inconsistent, use the spatial context method to determine the category for the difference regions, and retain the original classification results for the non-difference regions to obtain the third binary classification result of water and land.
[0058] (6) Edge detection algorithm is used to extract the edges of the first, second and third water-land binary classification results, and spatial average of the three edge extraction results to obtain the final coastline recognition result and complete the coastline recognition.
[0059] The above scheme integrates automatic thresholding algorithms (such as the OTSU algorithm) and machine learning algorithms (such as the random forest algorithm) to generate an initial binary mask (i.e., the first and second binary classification results of land and water). A spatial context voting mechanism is introduced to logically determine and constrain ambiguous regions (i.e., regions of difference). By combining remote sensing data from different consecutive time periods within the same year (e.g., three different months, specifically June to August), a spatial averaging strategy is used to eliminate the influence of tidal fluctuations and instantaneous observation noise. This achieves coastline data acquisition with greater robustness and geometric accuracy than traditional algorithms without the need for complex manual assistance.
[0060] In one specific embodiment of the present invention, the step of using a spatial context method to determine the category for the difference region specifically includes:
[0061] For ambiguous pixels with inconsistent classification, a comprehensive confidence evaluation function is constructed, assuming the pixel... The overall confidence level of the water body is The formula is as follows:
[0062] ,
[0063] In the formula, The pixels output by the random forest model The posterior probability of belonging to the water body category; Spatial distance confidence based on Otsu threshold; and The weight coefficients of the two algorithms are respectively, satisfying... ;
[0064] when When the value is greater than or equal to the set threshold, the pixel If it is classified as water, it is classified as land.
[0065] In one specific embodiment of the present invention, the set threshold is ≥0.5.
[0066] In one specific embodiment of the present invention, the vegetation index includes: MNDWI index, NDWI index and NDVI index;
[0067] in:
[0068] ,
[0069] ,
[0070] ,
[0071] In the formula, It is in the green light band; It is in the shortwave infrared band; It is in the near-infrared band; It is in the red light band.
[0072] In one specific embodiment of the present invention, the method for extracting image texture features includes:
[0073] Image texture features are extracted using the gray-level co-occurrence matrix, and the image texture features include: mean, variance, coherence, contrast, dissimilarity, information entropy, angular second moment and / or correlation.
[0074] In one specific embodiment of the present invention, the machine learning algorithm is a random forest algorithm, which sets the number of decision trees to 200, limits the number of leaf nodes to 5, and uses the square root of the feature number as the optimal feature selection for split nodes.
[0075] In one specific embodiment of the present invention, the automatic threshold segmentation algorithm is the OTSU algorithm, which adaptively determines the land-water segmentation threshold of each remote sensing image by maximizing the inter-class variance criterion.
[0076] In one specific embodiment of the present invention, the edge detection algorithm is the Canny edge detection algorithm.
[0077] The method for extracting coastlines using optimized machine learning in this embodiment of the invention will be described in detail below with reference to a specific implementation.
[0078] The method for extracting coastlines using optimized machine learning specifically includes the following steps:
[0079] Step 1: Acquire Sentinel-2 multispectral remote sensing images from June to August of the same year. These images have been geolocated and include observation time, reflectance of each band, and corresponding spatial location information. During data preprocessing, the Modified Normalized Difference Water Index (MNDWI), Normalized Difference Water Index (NDWI), and Normalized Difference Vegetation Index (NDVI) are calculated based on the original 10-meter resolution bands. Simultaneously, image texture features are extracted using the gray-level co-occurrence matrix. These features include: mean, variance, coherence, contrast, dissimilarity, information entropy, second moment, and correlation. The reflectance, vegetation index, and texture features are then fused using band fusion to obtain the multiband Sentinel-2 data used for classification.
[0080] in,
[0081] ,
[0082] ,
[0083] ,
[0084] In the formula, Green represents the green light band; SWIR represents the shortwave infrared band; NIR represents the near-infrared band; and Red represents the red light band.
[0085] Step 2: Based on three Sentinel-2 multispectral remote sensing images from June to August, water and land samples were constructed, with random sampling performed at a ratio of 70% training and 30% testing. A random forest algorithm was used to distinguish between ocean and land through ensemble voting of multiple decision trees. In the experiment, the number of decision trees was set to 200, the leaf node limit was set to 5, and the square root of the feature number was used as the optimal feature selection for split nodes. Through nonlinear fitting of the multidimensional remote sensing features, the first water-land binary classification results for the three images at different time periods were finally output. In the actual implementation, this result exists in the form of a water-land binary map.
[0086] Step 3: The OTSU algorithm is used to automatically threshold-segment the MNDWI images generated from Sentinel-2 multispectral remote sensing images from June to August. This method adaptively determines the land-water segmentation threshold for each remote sensing image by maximizing the inter-class variance criterion, overcoming the subjective bias of manually setting thresholds. By processing the remote sensing images from three time periods, three second land-water binary classification results for different time periods are generated. In practice, this result exists in the form of a land-water binary map.
[0087] Step 4: Spatially overlay the first and second binary classification results for land and water from June to August generated in Steps 2 and 3. Extract the discrepancies between the Random Forest algorithm and the OTSU algorithm (i.e., classification ambiguity regions). Use a spatial context method to determine the classification ambiguity regions, obtaining the third binary classification result for land and water. For the ambiguous pixels with inconsistent classifications, construct a comprehensive confidence evaluation function, setting the pixel... The overall confidence level of the water body is The formula is as follows:
[0088] ,
[0089] In the formula, The pixels output by the random forest model The posterior probability of belonging to the water body category; Spatial distance confidence based on Otsu threshold; and The weight coefficients of the two algorithms are respectively, satisfying... .
[0090] when When ≥0.5, the pixel If it is classified as water, it is classified as land.
[0091] Step 5: The Canny edge detection algorithm is used to extract edges from the first, second, and third land-water binary classification results to complete the coastline identification. Based on this, the coastlines extracted by each of the three methods from June to August are spatially averaged to obtain the average coastline results corresponding to the three algorithms, which are then used as the final coastline identification result.
[0092] Step 6: Using the high-precision coastline provided by OpenStreetMap (OSM) as a benchmark, the accuracy of the coastline extraction results based on the OTSU algorithm, the random forest algorithm, and the optimized combination of the two (i.e., the method proposed in this invention) is verified. Root mean square error (RMSE) is introduced as the core evaluation index. The accuracy of different extraction algorithms is quantitatively evaluated by calculating the spatial Euclidean distance between the average coastline extracted by each algorithm and the OSM baseline. Finally, the algorithm scheme with the smallest RMSE and the strongest spatial robustness is selected as the optimal model for coastline monitoring. The formula is as follows:
[0093] ,
[0094] In the formula, These are the coordinates of the extracted coastline location. The coordinates of the location corresponding to the baseline coastline. This represents the total number of coastline sampling points used for comparison.
[0095] like Figure 2 As shown, Figure 2 The paper presents the coastline extraction results using Canny edge detection, applied to the first, second, and third binary water-land classification results. Comparative analysis shows that the three algorithms achieve relatively consistent extraction results in artificial coastline areas, with minimal differences; however, significant differences exist in natural coastline areas.
[0096] Temporal spatial averaging was performed on the multi-temporal coastlines extracted from June to August by the three algorithms (OTSU algorithm, random forest algorithm and the method proposed in this invention) to construct the comprehensive summer coastline for each algorithm. Figure 3This paper presents a comparison between the spatial distribution of coastlines extracted from June to August using the OTSU-Random Forest Fusion Spatial Context Algorithm (i.e., the method proposed in this invention) and the coastlines after temporal spatial averaging. The results show that multi-temporal averaging effectively suppresses random fluctuations in the waterline, and the resulting composite coastline has stronger temporal representativeness and spatial robustness than the single-month extraction results, and can more accurately reflect the actual spatial location of the summer coastline in this region.
[0097] Finally, using the coastline provided by OpenStreetMap as the baseline coastline, the RMSE (Real-Time Sequence of Analysis) was used to quantitatively evaluate the combined coastline extraction accuracy of the three algorithms (OTSU algorithm, Random Forest algorithm, and the method proposed in this invention), and the optimal model was determined accordingly. Among the three models (i.e., the models corresponding to the aforementioned three algorithms), the OTSU-Random Forest fusion spatial context algorithm (i.e., the method proposed in this invention) achieved the best extraction accuracy. Figure 4 The final average shoreline spatial distribution generated by the method proposed in this invention is shown. In artificial shoreline areas, the method of this invention exhibits excellent extraction accuracy; in natural shoreline areas, its distribution also reflects the spatial distribution of the shoreline in complex coastal environments well, and is consistent with the actual situation.
[0098] Example 2
[0099] This invention provides an apparatus for extracting the Tianjin coastline using optimized machine learning, comprising:
[0100] The feature extraction module is used to calculate the vegetation index based on the acquired remote sensing images and extract the image texture features;
[0101] The feature fusion module is used to fuse the reflectance, vegetation index and image texture features of each band of the remote sensing image to obtain multi-band data to be classified.
[0102] The first land-water binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using machine learning algorithms, and obtain the first land-water binary classification result.
[0103] The second water-land binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using an automatic threshold segmentation algorithm, and obtain the second water-land binary classification result.
[0104] The third water-land binary classification result calculation module is used to perform corresponding spatial superposition of the first water-land binary classification result and the second water-land binary classification result, extract the difference regions where the two classification results are inconsistent, use the spatial context method to determine the category for the difference regions, and retain the original classification result for the non-difference regions to obtain the third water-land binary classification result.
[0105] The edge detection module is used to extract edges from the first, second, and third land-water binary classification results using an edge detection algorithm, and to spatially average the three edge extraction results to obtain the final coastline recognition result.
[0106] The rest are the same as in Example 1.
[0107] Example 3
[0108] This invention provides a system for extracting the Tianjin coastline using optimized machine learning, including a storage medium and a processor;
[0109] The storage medium is used to store instructions;
[0110] The processor is configured to operate according to the instructions to execute the method according to any one of Embodiment 1.
[0111] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0112] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0113] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0114] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0115] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
[0116] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method of extracting a coastline using optimized machine learning, characterized by, include: The vegetation index is calculated based on the acquired remote sensing images, and the image texture features are extracted. The reflectance, vegetation index and image texture features of each band of the remote sensing image are fused to obtain multi-band data to be classified. Machine learning algorithms are used to classify multi-band data to be classified in different consecutive time periods within the same year, resulting in the first land-water binary classification result. An automatic threshold segmentation algorithm is used to classify multi-band data to be classified in different consecutive time periods within the same year, and a second land-water binary classification result is obtained. The first and second binary classification results of land and water are spatially superimposed to extract the difference regions where the classification results are inconsistent. The spatial context method is used to determine the category for the difference regions, and the original classification results are retained for the non-difference regions to obtain the third binary classification result of land and water. An edge detection algorithm is used to extract edges from the first, second, and third binary classification results of land and water, and the three edge extraction results are spatially averaged to obtain the final coastline recognition result.
2. The method for extracting coastline using optimized machine learning according to claim 1, wherein: The method of using spatial context to determine the category for the difference region specifically includes: For the ambiguity pixels of classification inconsistency, the comprehensive confidence evaluation function is constructed, and the comprehensive water confidence of the pixel is set as , and the formula is as follows: , wherein, pixels output by the random forest model posterior probability that a pixel belongs to the water class; spatial distance confidence based on Otsu threshold; and are the weight coefficients of the two algorithms, respectively, satisfying ; When Greater than or equal to a set threshold, the pixel Is identified as water, otherwise it is classified as land.
3. The method for extracting coastline using optimized machine learning according to claim 2, wherein: The set threshold is ≥0.
5.
4. The method for extracting coastline using optimized machine learning according to claim 1, wherein: The vegetation indices include: MNDWI, NDWI, and NDVI; in: , , , In the formula, It is in the green light band; It is in the shortwave infrared band; It is in the near-infrared band; It is in the red light band.
5. The method for extracting coastlines using optimized machine learning according to claim 1, characterized in that: The method for extracting image texture features includes: Multiple texture features of an image are extracted using a gray-level co-occurrence matrix. These texture features include: mean, variance, coherence, contrast, dissimilarity, information entropy, second moment of angle, and / or correlation.
6. The method for extracting coastline using optimized machine learning according to claim 1, wherein: The machine learning algorithm is the random forest algorithm, which sets the number of decision trees to 200, limits the number of leaf nodes to 5, and uses the square root of the feature number as the optimal feature selection for split nodes.
7. The method for extracting coastlines using optimized machine learning according to claim 1, characterized in that: The automatic threshold segmentation algorithm is the OTSU algorithm, which adaptively determines the land-water segmentation threshold for each remote sensing image by maximizing the inter-class variance criterion.
8. The method for extracting coastline using optimized machine learning according to claim 1, wherein: The edge detection algorithm is the Canny edge detection algorithm.
9. An apparatus for extracting coastlines using optimized machine learning, characterized in that, include: The feature extraction module is used to calculate the vegetation index based on the acquired remote sensing images and extract the image texture features; The feature fusion module is used to fuse the reflectance, vegetation index and image texture features of each band of the remote sensing image to obtain multi-band data to be classified. The first land-water binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using machine learning algorithms, and obtain the first land-water binary classification result. The second water-land binary classification result calculation module is used to classify multi-band data to be classified in different consecutive time periods within the same year using an automatic threshold segmentation algorithm, and obtain the second water-land binary classification result. The third water-land binary classification result calculation module is used to perform corresponding spatial superposition of the first water-land binary classification result and the second water-land binary classification result, extract the difference regions where the two classification results are inconsistent, use the spatial context method to determine the category for the difference regions, and retain the original classification result for the non-difference regions to obtain the third water-land binary classification result. The edge detection module is used to extract edges from the first, second, and third land-water binary classification results using an edge detection algorithm, and to spatially average the three edge extraction results to obtain the final coastline recognition result.
10. A system for extracting coastlines using optimized machine learning, the system comprising: Including storage media and processor; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the method according to any one of claims 1-8.