Road network extraction method, system and device based on image segmentation and medium
By constructing the overall quantity evaluation index of the segmented layer and selecting the optimal spatial segmentation scale for road extraction, the problems of insufficient universality and abnormal detection capabilities of road extraction in the existing technology are solved, and high-precision and high-efficiency road network extraction are achieved.
Patent Information
- Application Number
- CN202411309531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
AI Technical Summary
The existing spectral performance differences in road extraction in the prior art lead to limited algorithm universality, and deep learning models have limited ability to detect road abnormalities, making it difficult to achieve a completely accurate extraction effect.
By integrating the homogeneity inside the image object and the heterogeneity between adjacent objects, we construct the overall quantity evaluation index of the segmentation layer, select the optimal spatial segmentation scale for classification and extraction, and extract the road center line and calculate the road width to achieve high accuracy , efficient road network extraction.
The problem of road segmentation scales in different spatial segmentation scales is solved, "over-segment" and "under-segment" phenomena are avoided, and high-precision and efficient road network extraction is achieved, which is suitable for urban and rural transportation infrastructure planning and logistics planning.
Smart Images

Figure CN119295961A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image processing, and more specifically to a road network extraction method, system, device and medium based on image segmentation. Background Art
[0002] As an important infrastructure connecting cities and villages, accurate road extraction has vital application value in many fields such as geographic information system (GIS), urban planning, and traffic management. With the rapid progress of remote sensing technology, especially the widespread application of high-resolution satellite remote sensing images, it provides strong technical support for the rapid acquisition of road information. The combination of GIS technology and high-resolution satellite remote sensing images has greatly promoted the intelligent development of highway planning, construction, and management.
[0003] Among the traditional road extraction methods based on remote sensing technology, feature-based road extraction algorithms occupy an important position. This type of algorithm mainly relies on features such as the spectral behavior and intensity contrast of roads in remote sensing images, and identifies and extracts road areas by extracting these features. However, this method faces two major challenges in practical applications: first, there are differences in the spectral performance of road remote sensing images obtained by different satellite sensors, which limits the versatility and adaptability of the algorithm between different data sources; second, due to road anomalies caused by factors such as terrain undulations, building occlusions, and tree shadows, it is difficult for road extraction algorithms based on single features to accurately identify road information in these complex scenes.
[0004] In order to overcome the limitations of the above traditional methods, the rise of deep learning technology in recent years has provided new ideas and methods for road extraction. Deep learning has achieved remarkable results in image recognition, target detection and other fields with its powerful feature learning ability and nonlinear modeling ability. In the field of road extraction, various deep learning network structures such as multi-layer neural networks and high-order CRF models are widely used in the automatic extraction of road information. These learning-based methods can learn the complex features of roads in different scenarios by training a large amount of sample data, thereby improving the accuracy and robustness of road extraction to a certain extent.
[0005] However, although deep learning has shown great potential in road extraction, it also has some problems and challenges. First, the training of deep learning models requires a large amount of labeled sample data, and the high-quality sample labeling process is often time-consuming, labor-intensive, and costly. Second, although deep learning models can learn complex road features, their detection capabilities for road anomalies caused by shadows, occlusions, etc. are still limited, making it difficult to achieve completely accurate extraction results. Summary of the invention
[0006] In view of the above problems, the purpose of the present invention is to provide a road network extraction method, system, device and medium based on image segmentation, which constructs an overall quantity evaluation index of the segmentation layer by comprehensively considering the homogeneity within the image object and the heterogeneity between adjacent objects, thereby selecting the optimal spatial segmentation scale for classification extraction, and further extracting the road centerline and calculating the road width, so as to achieve high-precision and high-efficiency road network extraction.
[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0008] In a first aspect, the present invention discloses a road network extraction method based on image segmentation, comprising:
[0009] Acquire the original remote sensing image according to the image band information required by the area to be measured, and pre-process the original remote sensing image to generate remote sensing image data;
[0010] Setting function parameters for the multi-scale segmentation algorithm, and using the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers;
[0011] Constructing an evaluation model for calculating the segmentation layer scale selection index, and using the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer;
[0012] Based on the segmentation quality evaluation index, a curve of the change of segmentation scale is drawn and the optimal spatial segmentation scale of remote sensing image data is selected in combination with the set threshold.
[0013] The remote sensing image data is classified according to the optimal spatial segmentation scale, and a road block layer including multiple road blocks is generated after post-processing;
[0014] Perform image thinning and vectorization processing on the road blocks to generate the corresponding central axis;
[0015] Adjacent central axes are searched by defining the search radius and search angle, and then connected to generate a road network.
[0016] Furthermore, the preprocessing of the original remote sensing image includes:
[0017] The original remote sensing images are processed in sequence including radiation calibration, atmospheric correction, image fusion and reprojection.
[0018] Furthermore, the setting of function parameters for the multi-scale segmentation algorithm includes:
[0019] The functional parameters of the index function for determining the heterogeneity of the segmented object in the multi-scale segmentation algorithm are set as follows: the fluctuation weight is set to 1, the spectral heterogeneity weight is set to 0.9, the shape heterogeneity weight is set to 0.1, and the compactness and smoothness weights are set to 0.5 respectively.
[0020] Furthermore, the construction of an evaluation model for calculating the segmentation layer scale selection index includes:
[0021] The internal homogeneity index H of the segmented object is calculated using the following formula:
[0022]
[0023] Among them, n represents the number of objects in the segmentation layer, a i represents the area of the i-th segmentation object in the segmentation layer, v i Represents the variance of the spectral value of the i-th segmentation object in the segmentation layer;
[0024] The global Moran's index MI is calculated according to the following formula to measure the heterogeneity between adjacent segmented objects:
[0025]
[0026] Among them, w i,j represents the spatial weight value of segmented object i and segmented object j. In this study, the first-order Rook adjacency principle is used to calculate the spatial weight matrix, that is, when two objects have a common boundary, w i,j The value of is 1, otherwise it is 0; i and x j are the band spectral values of segmentation objects i and j respectively, It is the average value of the spectral value of the entire segmentation object in the segmentation layer, and the value range of MI is [-1,1];
[0027] Use the following formula to normalize H and MI respectively to obtain the standard value H of the internal homogeneity index H: norm and the standard value of the global Moran's index MI norm :
[0028]
[0029] Among them, Y represents the index H or MI, Y max and Y min Respectively represent the maximum and minimum values of the corresponding indicators. The normalized indicators calculated by the above formula are H norm and MI norm express;
[0030] According to the formula GI = H norm +MInorm Calculate the segmentation layer scale selection index GI.
[0031] Furthermore, the segmentation quality evaluation index of each segmentation layer is calculated by using the evaluation model, including:
[0032] The evaluation model is used to calculate each band of the remote sensing image data one by one to generate the corresponding segmentation layer scale selection index GI;
[0033] The segmentation quality evaluation index of the segmentation layer is calculated using the following formula:
[0034]
[0035] Where m represents the number of bands, GI i Represents the GI value calculated based on the i-th band of the image, using the mean It is used as a segmentation quality evaluation indicator to characterize the segmentation quality of the segmentation layer.
[0036] Furthermore, the segmentation quality evaluation index is used to draw a curve of the change of the segmentation scale and the optimal spatial segmentation scale of the remote sensing image data is selected in combination with a set threshold, including:
[0037] By formula Calculate The minimum threshold value T;
[0038] in, Indicates that in all segmentation layers The maximum value of the value, σ is The standard deviation of the values;
[0039] Segmentation quality evaluation index based on segmentation layer Draw a curve of changes with the spatial segmentation scale, generate a curve of changes in the segmentation scale selection index, and draw the critical line of the lowest threshold T in the graph;
[0040] In the segmentation scale selection index change curve diagram, the local maximum point greater than the minimum threshold T is identified as the optimal spatial segmentation scale of the remote sensing image data.
[0041] Furthermore, the remote sensing image data is classified according to the optimal spatial segmentation scale, and a road block layer including a plurality of road blocks is generated after post-processing, including:
[0042] Classify remote sensing image data according to the optimal spatial segmentation scale, extract preliminary road areas, and generate road block layers;
[0043] In the road block layer, the opening and closing operators of mathematical morphology are used to remove noise from the preliminary road area, generate road blocks, and connect adjacent road blocks;
[0044] Clean and delete patches in the road block layer.
[0045] In a second aspect, the present invention further discloses a road network extraction system based on image segmentation, comprising: a data preparation module, for obtaining original remote sensing images according to image band information required by the range of the area to be measured, and preprocessing the original remote sensing images to generate remote sensing image data;
[0046] The parameter setting module is used to set the function parameters for the multi-scale segmentation algorithm, and use the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers; the multi-scale segmentation module is used to construct an evaluation model for calculating the segmentation layer scale selection index, and use the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer;
[0047] The optimal spatial segmentation scale selection module is used to draw a curve of the change of segmentation scale based on the segmentation quality evaluation index and select the optimal spatial segmentation scale of remote sensing image data in combination with the set threshold;
[0048] A road block extraction module is used to classify the remote sensing image data according to the optimal spatial segmentation scale, and generate a road block layer including multiple road blocks after post-processing;
[0049] An image thinning and vectorization processing module is used to perform image thinning and vectorization processing on road blocks to generate corresponding central axes;
[0050] The road network construction module is used to search for adjacent central axes by defining a search radius and a search angle, and connect them to generate a road network.
[0051] In a third aspect, the present invention further discloses a road network extraction device based on image segmentation, comprising:
[0052] A memory, used for storing a road network extraction program based on image segmentation;
[0053] A processor is used to implement the steps of the road network extraction method based on image segmentation as described in any one of the above items when executing the road network extraction program based on image segmentation.
[0054] In a fourth aspect, the present invention further discloses a readable storage medium, on which is stored a road network extraction program based on image segmentation. When the road network extraction program based on image segmentation is executed by a processor, the steps of the road network extraction method based on image segmentation as described in any one of the above items are implemented.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. This invention constructs the evaluation index for segmentation object selection by analyzing the law of segmentation object changes with segmentation scale. Selecting the optimal segmentation layer of roads for object-oriented land use classification can not only accurately extract road patches, but also solve the problem that roads appear in images at different spatial segmentation scales, thereby further avoiding the influence of "over-segmentation" and "under-segmentation" phenomena.
[0057] 2. Based on the extracted road patches, the present invention can quickly obtain complete road network data through patch refinement and vectorization, and can be widely used in urban and rural transportation infrastructure planning, logistics planning and other fields, and can quickly and efficiently provide decision-making auxiliary support information for large-scale image analysis tasks.
[0058] 3. Starting from the overall perspective of the image segmentation layer, the present invention comprehensively considers the homogeneity within the image object and the heterogeneity between adjacent objects, constructs an overall quantitative evaluation index of the segmentation layer, and finally selects the optimal spatial segmentation scale corresponding to the road for classification and extraction, extracts the road centerline and calculates the road width based on the classification results, thereby achieving high-precision and high-efficiency road network extraction.
[0059] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0061] Figure 1 It is a method flow chart of a specific implementation mode of the present invention.
[0062] Figure 2 It is a schematic diagram of the evaluation index change curve of the segmentation layer according to a specific embodiment of the present invention.
[0063] Figure 3 It is a comparison diagram of road segmentation scales according to a specific implementation manner of the present invention.
[0064] Figure 4 It is a schematic diagram of object-oriented land cover classification according to a specific implementation mode of the present invention.
[0065] Figure 5 It is a specific embodiment of the present invention. Figure 4 Schematic diagram of the results after morphological processing.
[0066] Figure 6 It is a schematic diagram of the axis layer of a specific implementation mode of the present invention.
[0067] Figure 7 It is a road network schematic diagram of a specific implementation mode of the present invention.
[0068] Figure 8 It is a system structure diagram of a specific implementation mode of the present invention.
[0069] In the figure, 1. Data preparation module; 2. Parameter setting module; 3. Multi-scale segmentation module; 4. Optimal spatial segmentation scale selection module; 5. Road block extraction module; 6. Image refinement and vectorization processing module; 7. Road network construction module. DETAILED DESCRIPTION
[0070] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0071] See also Figure 1 As shown, this embodiment provides a road network extraction method based on image segmentation, comprising the following steps:
[0072] S1: Acquire the original remote sensing image according to the image band information required by the area to be measured, and pre-process the original remote sensing image to generate remote sensing image data.
[0073] In a specific implementation, the original remote sensing image is obtained according to the image band information required by the area to be measured, and preprocessed, which mainly includes image radiation calibration, atmospheric correction, image fusion, reprojection and other processes.
[0074] Among them, radiation calibration is used to convert the DN value of the image into radiation brightness or reflectivity; atmospheric correction is used to remove the influence of the atmosphere on the image and restore the true reflectivity of the surface; image fusion is used to improve the spatial resolution and spectral resolution of the image; reprojection is used to unify the image to the same geographic coordinate system and projection method.
[0075] S2: Set function parameters for the multi-scale segmentation algorithm, and use the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers.
[0076] In a specific implementation, the parameters that determine the heterogeneity index function of the segmented object in the image segmentation algorithm include band weight, spectral heterogeneity weight, shape heterogeneity weight, and compactness and smoothness weight. In this method, multi-scale segmentation is performed for all land cover types within the study area, so the above parameters are set to universal values, the band weight is uniformly set to 1, and then the spectral heterogeneity weight is set to 0.9, the shape heterogeneity weight is 0.1, and the weight of smoothness and compactness is set to 0.5, so as to explore the problem of selecting the optimal spatial segmentation scale of the road.
[0077] S3: constructing an evaluation model for calculating the segmentation layer scale selection index, and using the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer.
[0078] In a specific implementation, an evaluation model for calculating the segmentation layer scale selection index is first constructed:
[0079] Theoretically, an ideal segmented object should maintain uniformity within the object and have high heterogeneity between adjacent segmented objects, so that it can fit the real boundary of the object and express accurate semantic information.
[0080] First, variance, as an indicator to measure the degree of data dispersion, can effectively reflect the internal homogeneity of the object. Therefore, the internal homogeneity index H of the segmented object is calculated using the following formula:
[0081]
[0082] Among them, n represents the number of objects in the segmentation layer, a i represents the area of the i-th segmented object in the segmentation layer, which is calculated based on the number of pixels and the spatial resolution of the image. i It represents the variance of the spectral value of the i-th segmented object in the segmentation layer, which is calculated by a custom mathematical formula in the eCognition software.
[0083] Secondly, the global Moran's index (MI), as an important indicator for measuring the spatial correlation of data, can accurately measure the heterogeneity between adjacent segmented objects. The global Moran's index MI is calculated according to the following formula to measure the heterogeneity between adjacent segmented objects:
[0084]
[0085] Among them, n represents the number of objects in the segmentation layer, w i,j represents the spatial weight value of segmented object i and segmented object j. In this study, the first-order Rook adjacency principle is used to calculate the spatial weight matrix, that is, when two objects have a common boundary, w i,j The value of is 1, otherwise it is 0;i and x j are the band spectral values of segmentation objects i and j respectively, It is the average spectral value of the entire segmented object in the segmentation layer. The value range of MI is [-1,1]. The smaller the value, the lower the correlation between adjacent segmented objects, that is, the higher the heterogeneity.
[0086] In order to eliminate the influence of the order of magnitude of the two indicators and achieve the purpose of comprehensively applying the two indicators to construct the segmentation scale selection indicator, it is first necessary to perform standard normalization processing on H and MI respectively so that the value range of both is [0,1]. Specifically, the following formula is used to perform standard normalization processing on H and MI respectively to obtain the standard value H of the internal homogeneity indicator H norm and the standard value of the global Moran's index MI norm :
[0087]
[0088] Among them, Y represents the index H or MI, Y max and Y min Respectively represent the maximum and minimum values of the corresponding indicators. The normalized indicators calculated by the above formula are H norm and MI norm Indicates; H norm and MI norm The closer the value is to 1, the more uniform the interior of the segmented object in the segmentation layer is and the greater the heterogeneity between adjacent segmented objects is.
[0089] Therefore, according to the formula GI = H norm +MI norm Calculate the segmentation layer scale selection index (GlobalImdex, GI).
[0090] In a specific implementation, the evaluation model is used to calculate the segmentation quality evaluation index of each segmentation layer in the following manner:
[0091] Firstly, the evaluation model is used to calculate each band of the remote sensing image data one by one to generate the corresponding segmentation layer scale selection index GI;
[0092] Then, the segmentation quality evaluation index of the segmentation layer is calculated using the following formula:
[0093] Where m represents the number of bands, GI i Represents the GI value calculated based on the i-th band of the image, using the mean It is used as a segmentation quality evaluation index to characterize the segmentation quality of the segmentation layer, thereby achieving the purpose of comprehensive utilization of each band.
[0094] S4: Based on the segmentation quality evaluation index, a curve of the change with the segmentation scale is drawn and the optimal spatial segmentation scale of the remote sensing image data is selected in combination with the set threshold.
[0095] In a specific implementation, first, by setting a The minimum threshold value T of the value can be selected to obtain multiple more suitable spatial segmentation scales. The specific formula is Calculate The minimum threshold value T. Among them, Indicates that in all segmentation layers The maximum value of the value, σ is The standard deviation of the values; the spatial segmentation scale corresponding to the local maximum value greater than the threshold T is selected as the local optimal segmentation scale for subsequent object-oriented land cover classification research.
[0096] Then, the segmentation scale is selected. Including: Segmentation quality evaluation index based on segmentation layer Draw a curve of changes with the spatial segmentation scale, generate a segmentation scale selection index change curve, and draw the critical line of the minimum threshold T in the graph; in the segmentation scale selection index change curve, identify the local maximum point greater than the minimum threshold T as the optimal spatial segmentation scale of the remote sensing image data.
[0097] As an example, the above segmentation scale selection process includes:
[0098] First, the vector layer files of each segmentation layer are exported in turn. Then, the vector layer files of each segmentation layer are calculated by ArcMap and GeoDa software. Value, finally drawn The curve of the value changing with the spatial segmentation scale and the critical line of the threshold T. Evaluation indicators of the segmentation layer As the segmentation scale increases, multiple local maxima appear. The inflection point of the change curve is selected as the value greater than the threshold T. The remote sensing image is segmented at multiple scales according to the corresponding spatial segmentation scale, and then the optimal spatial segmentation scale corresponding to the road is selected through manual visual interpretation.
[0099] S5: Classify the remote sensing image data according to the optimal spatial segmentation scale, and generate a road block layer including multiple road blocks after post-processing.
[0100] In a specific implementation method, the remote sensing image data is first classified according to the optimal spatial segmentation scale, the preliminary road area is extracted, and a road block layer is generated; then, in the road block layer, the opening and closing operators of mathematical morphology are applied to remove noise from the preliminary road area to generate road blocks and connect adjacent road blocks; finally, the spots in the road block layer are cleaned and deleted.
[0101] Due to the influence of classification accuracy, noise and other factors, there are many errors and omissions in the classification. Therefore, the roads obtained at this time are discontinuous road blocks, and the initial divided image may appear fragmented. For this reason, this step uses the opening and closing operators of mathematical morphology for post-processing. The basis for adoption is as follows: Since the opening operation is to corrode the image first and then expand it, and the closing operation is to expand first and then corrode it, the opening operation can be used to remove the speckled noise of the image, and the closing operation can be used to connect adjacent spots and fill internal holes. In this step, binary opening and closing operators can be used to merge adjacent road blocks, delete over-sparse and broken spots, obtain a "clean" road block layer, and preliminarily connect discontinuous road blocks.
[0102] S6: Perform image refinement and vectorization processing on the road block to generate the corresponding central axis.
[0103] In a specific implementation, after obtaining the road block, it is thinned to extract the axis. Thinning is actually the process of peeling off the pixels on both sides of the middle axis of the road section one by one until the central axis of a single pixel width is obtained. Here, the number of peelings is recorded, and the width of the road section can be obtained, that is, pixel accuracy * number of peelings * 2. Then, the axis is recorded in the form of a vector through the line tracing method.
[0104] S7: Search adjacent central axes by defining a search radius and a search angle, and connect them to generate a road network.
[0105] In a specific implementation, since there are gaps between road blocks, the axes need to be connected to each other to construct a road network. Since many burr-like short sections may be generated during the refinement process, which will affect subsequent connection operations, it is necessary to specify a length parameter to delete them. To this end, this step specifies a minimum section length parameter, deletes these short hanging lines, and sets the search radius and search angle of the section. These two parameters control the size and shape of the head and tail search areas of the section; then search for a more suitable axis (long and straight) in the axis concentration, construct the head and tail fan-shaped search area according to its direction, search radius, and search angle, connect the axis that falls into its search area and is closest to it, and the final road network is obtained.
[0106] In addition, after the connection work is completed, it is necessary to sort out and rebuild the topological relationship, including deleting single-point line segments, repeated line segments, merging adjacent axes on a single road, splitting axes at intersections, etc. After these operations, it can be ensured that there are no redundant nodes except for the intersection, the start and end nodes of the axis, and the "clean" road network vector data with complete and correct topological relationships can be obtained.
[0107] As an example, in order to better illustrate the above-mentioned road network extraction method based on image segmentation, the specific implementation process of the method is described below with a specific example:
[0108] First, within the study area, 37 segmentation layers were generated in the segmentation scale interval [20, 200] using WorldView-2 images. The vector layer files of each segmentation layer were exported in turn. Then, the vector layer files of each segmentation layer were calculated using ArcMap and GeoDa software. Value, finally drawn The curve of the value changing with the spatial segmentation scale and the critical line of the threshold T, such as Figure 2 As shown. Evaluation indicators of the segmentation layer As the segmentation scale increases, multiple local maxima appear. There are only three corner points of the change curve that meet the threshold T, corresponding to spatial segmentation scales of 65, 75, and 105. Therefore, in the study area, the WorldView-2 image will be multi-scale segmented based on the above three segmentation scales, and then the optimal spatial segmentation scale corresponding to the road will be selected through manual visual interpretation.
[0109] Since the type of ground feature extracted corresponding to the segmentation scale 75 is road. Figure 3 As shown in the figure, within the area a, when the segmentation scale is 65, the road is segmented into multiple image objects, showing a more serious "over-segmentation" phenomenon, and when the segmentation scale is 105, it is found that the road and the surrounding residential areas are merged together, and the boundary of the segmented object is larger than the actual boundary of the road, showing "under-segmentation". However, it is worth noting that the highways within the study area show high differences in both spectrum and shape from the surrounding farmland and idle land and other types of features, so there is no obvious change in the segmentation objects at the three segmentation scales. Therefore, in the subsequent object-oriented land cover classification, it is also based on the segmentation layer with a spatial segmentation scale of 75.
[0110] Based on the segmentation level of 75 spatial segmentation scale, object-oriented land cover classification is obtained. Figure 4 The road patch map shown in the figure shows the Figure 4The results show that there are many errors in the classification, resulting in the presence of speckled pseudo-road blocks in the non-road area and gaps between the road blocks in the road area. Figure 5 As shown in FIG. 1 , by using a pair of morphological operators that open first and then close for post-processing, pseudo road blocks similar to speckle noise can be basically removed, and road sections with gaps between them can be preliminarily connected, and small holes in road blocks can be filled.
[0111] Then, Figure 5 Extract and vectorize the axis to obtain Figure 6 The axis layer shown. Since a large number of burr-like short sections may appear on the main axis during the refinement process, these hanging sections are removed according to the short section parameters to prevent interference with subsequent connection operations.
[0112] Then, if Figure 7 As shown, a heuristic search is performed on the remaining axes, and the road sections that are close to each other are connected to obtain the final road network.
[0113] The present invention provides a road network extraction method based on image segmentation. Starting from the overall perspective of the image segmentation layer, the homogeneity within the image object and the heterogeneity between adjacent objects are comprehensively considered to construct an overall quantity evaluation index of the segmentation layer. Finally, the optimal spatial segmentation scale corresponding to the road is selected for classification extraction, and the road centerline is extracted and the road width is calculated from the classification results, thereby achieving high-precision and high-efficiency road network extraction.
[0114] See also Figure 8 As shown, the present invention also discloses a road network extraction system based on image segmentation, including: a data preparation module 1, a parameter setting module 2, a multi-scale segmentation module 3, an optimal spatial segmentation scale selection module 4, a road block extraction module 5, an image refinement and vectorization processing module 6 and a road network construction module 7.
[0115] The data preparation module 1 is used to obtain the original remote sensing image according to the image band information required by the area to be measured, and pre-process the original remote sensing image to generate remote sensing image data.
[0116] The parameter setting module 2 is used to set the function parameters for the multi-scale segmentation algorithm, and use the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers.
[0117] The multi-scale segmentation module 3 is used to construct an evaluation model for calculating the segmentation layer scale selection index, and use the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer.
[0118] The optimal spatial segmentation scale selection module 4 is used to draw a curve of the change of the segmentation scale based on the segmentation quality evaluation index and select the optimal spatial segmentation scale of the remote sensing image data in combination with the set threshold.
[0119] The road block extraction module 5 is used to classify the remote sensing image data according to the optimal spatial segmentation scale, and generate a road block layer including multiple road blocks after post-processing.
[0120] The image thinning and vectorization processing module 6 is used to perform image thinning and vectorization processing on the road block to generate the corresponding central axis.
[0121] The road network construction module 7 is used to search for adjacent central axes by defining a search radius and a search angle, and connect them to generate a road network.
[0122] The specific implementation of the road network extraction system based on image segmentation in this embodiment is basically the same as the specific implementation of the road network extraction method based on image segmentation described above, and will not be repeated here.
[0123] The present invention also discloses a road network extraction device based on image segmentation, comprising a processor and a memory; wherein, when the processor executes the road network extraction program based on image segmentation stored in the memory, the steps of the road network extraction method based on image segmentation as described in any one of the above items are implemented.
[0124] Furthermore, the road network extraction device based on image segmentation in this embodiment may also include:
[0125] The input interface is used to obtain the road network extraction program based on image segmentation imported from the outside, and save the obtained road network extraction program based on image segmentation to the memory, and can also be used to obtain various instructions and parameters transmitted by external terminal devices, and transmit them to the processor, so that the processor can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.
[0126] The output interface is used to output various data generated by the processor to the terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor. In this embodiment, the output interface may specifically include but is not limited to a USB interface, a serial interface, etc.
[0127] The communication unit is used to establish a remote communication connection between the road network extraction device based on image segmentation and an external server, so that the road network extraction device based on image segmentation can mount the image file to the external server. In this embodiment, the communication unit may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.
[0128] The keyboard is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.
[0129] The display is used to display the relevant information of the road network extraction process based on image segmentation in real time.
[0130] The mouse can be used to assist users in inputting data and simplify user operations.
[0131] The present invention also discloses a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM or any other form of storage medium known in the technical field. The readable storage medium stores a road network extraction program based on image segmentation, and when the road network extraction program based on image segmentation is executed by a processor, the steps of the road network extraction method based on image segmentation as described in any one of the above items are implemented.
[0132] In summary, the present invention constructs an overall evaluation index of the segmentation layer by comprehensively considering the homogeneity within the image object and the heterogeneity between adjacent objects, thereby selecting the optimal spatial segmentation scale for classification extraction, and further extracting the road centerline and calculating the road width, thereby achieving high-precision and high-efficiency road network extraction.
[0133] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. As for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0134] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0135] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0138] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.
[0139] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0140] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0141] The above is a detailed introduction to the road network extraction method, system, device and readable storage medium based on image segmentation provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A road network extraction method based on image segmentation, characterized in that: include: Acquire the original remote sensing image according to the image band information required by the area to be measured, and pre-process the original remote sensing image to generate remote sensing image data; Setting function parameters for the multi-scale segmentation algorithm, and using the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers; Constructing an evaluation model for calculating the segmentation layer scale selection index, and using the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer; Based on the segmentation quality evaluation index, a curve of the change of segmentation scale is drawn and the optimal spatial segmentation scale of remote sensing image data is selected in combination with the set threshold. The remote sensing image data is classified according to the optimal spatial segmentation scale, and a road block layer including multiple road blocks is generated after post-processing; Perform image thinning and vectorization processing on the road blocks to generate the corresponding central axis; Adjacent central axes are searched by defining the search radius and search angle, and then connected to generate a road network.
2. The road network extraction method based on image segmentation according to claim 1, characterized in that: The preprocessing of the original remote sensing image includes: The original remote sensing images are processed in sequence including radiation calibration, atmospheric correction, image fusion and reprojection.
3. The road network extraction method based on image segmentation according to claim 1, characterized in that: The step of setting function parameters for the multi-scale segmentation algorithm includes: The functional parameters of the index function for determining the heterogeneity of the segmented object in the multi-scale segmentation algorithm are set as follows: the fluctuation weight is set to 1, the spectral heterogeneity weight is set to 0.9, the shape heterogeneity weight is set to 0.1, and the compactness and smoothness weights are set to 0.5 respectively.
4. The road network extraction method based on image segmentation according to claim 1, characterized in that: The construction of an evaluation model for calculating the segmentation layer scale selection index includes: The internal homogeneity index H of the segmented object is calculated using the following formula: Among them, n represents the number of objects in the segmentation layer, a i represents the area of the i-th segmentation object in the segmentation layer, v i Represents the variance of the spectral value of the i-th segmentation object in the segmentation layer; The global Moran's index MI is calculated according to the following formula to measure the heterogeneity between adjacent segmented objects: Among them, w i,j represents the spatial weight value of segmentation object i and segmentation object j, x i and x j are the band spectral values of segmentation objects i and j respectively, It is the average value of the spectral value of the entire segmentation object in the segmentation layer, and the value range of MI is [-1,1]; Use the following formula to normalize H and MI respectively to obtain the standard value H of the internal homogeneity index H: norm and the standard value of the global Moran's index MI norm : Among them, Y represents the index H or MI, Y max and Y min Respectively represent the maximum and minimum values of the corresponding indicators. The normalized indicators calculated by the above formula are H norm and MI norm express; According to the formula GI = H norm +MI norm Calculate the segmentation layer scale selection index GI.
5. The road network extraction method based on image segmentation according to claim 4 is characterized in that: The step of calculating the segmentation quality evaluation index of each segmentation layer by using the evaluation model includes: The evaluation model is used to calculate each band of the remote sensing image data one by one to generate the corresponding segmentation layer scale selection index GI; The segmentation quality evaluation index of the segmentation layer is calculated using the following formula: Where m represents the number of bands, GI i Represents the GI value calculated based on the i-th band of the image, using the mean It is used as a segmentation quality evaluation indicator to characterize the segmentation quality of the segmentation layer.
6. The road network extraction method based on image segmentation according to claim 5, characterized in that: The method of drawing a curve of variation with segmentation scale based on the segmentation quality evaluation index and selecting the optimal spatial segmentation scale of the remote sensing image data in combination with a set threshold value includes: By formula Calculate The minimum threshold value T; in, Indicates that in all segmentation layers The maximum value of the value, σ is The standard deviation of the values; Segmentation quality evaluation index based on segmentation layer Draw a curve of changes with the spatial segmentation scale, generate a curve of changes in the segmentation scale selection index, and draw the critical line of the lowest threshold T in the graph; In the segmentation scale selection index change curve diagram, the local maximum point greater than the minimum threshold T is identified as the optimal spatial segmentation scale of the remote sensing image data.
7. The road network extraction method based on image segmentation according to claim 2, characterized in that: The remote sensing image data is classified according to the optimal spatial segmentation scale, and a road block layer including multiple road blocks is generated after post-processing, including: Classify remote sensing image data according to the optimal spatial segmentation scale, extract preliminary road areas, and generate road block layers; In the road block layer, the opening and closing operators of mathematical morphology are used to remove noise from the preliminary road area, generate road blocks, and connect adjacent road blocks; Clean and delete patches in the road block layer.
8. A road network extraction system based on image segmentation, characterized in that: include: The data preparation module is used to obtain the original remote sensing image according to the image band information required by the area to be measured, and pre-process the original remote sensing image to generate remote sensing image data; The parameter setting module is used to set the function parameters for the multi-scale segmentation algorithm, and use the multi-scale segmentation algorithm to segment the remote sensing image data to generate image layers of different segmentation scales, which are recorded as segmentation layers; the multi-scale segmentation module is used to construct an evaluation model for calculating the segmentation layer scale selection index, and use the evaluation model to calculate the segmentation quality evaluation index of each segmentation layer; The optimal spatial segmentation scale selection module is used to draw a curve of the change of segmentation scale based on the segmentation quality evaluation index and select the optimal spatial segmentation scale of remote sensing image data in combination with the set threshold; A road block extraction module is used to classify the remote sensing image data according to the optimal spatial segmentation scale, and generate a road block layer including multiple road blocks after post-processing; An image thinning and vectorization processing module is used to perform image thinning and vectorization processing on road blocks to generate corresponding central axes; The road network construction module is used to search for adjacent central axes by defining a search radius and a search angle, and connect them to generate a road network.
9. A road network extraction device based on image segmentation, characterized in that: include: A memory, used for storing a road network extraction program based on image segmentation; A processor is used to implement the steps of the road network extraction method based on image segmentation as described in any one of claims 1 to 7 when executing the road network extraction program based on image segmentation.
10. A readable storage medium, characterized in that: The readable storage medium stores a road network extraction program based on image segmentation, and when the road network extraction program based on image segmentation is executed by a processor, the steps of the road network extraction method based on image segmentation as described in any one of claims 1 to 7 are implemented.