A parallel tracking grid line vectorization method and system based on skeleton refinement
By adopting a parallel tracking grid line vectorization method based on skeleton refinement, the problems of poor intersection point judgment and topological representation in the vectorization of complex grid lines are solved, achieving faster vectorization speed and more effective topological information extraction.
Patent Information
- Application Number
- CN202311073541.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2043-08-24
AI Technical Summary
Existing technologies are not effective in determining intersection points and expressing vector line topology in complex raster line vectorization tasks. Furthermore, traditional methods are slow in extracting independent line features, making subsequent topology construction difficult after vectorization.
A parallel tracking raster line vectorization method based on skeleton refinement is adopted. The skeleton of the raster data to be processed is refined, each raster region is searched in parallel to generate multiple independent multi-line features, effective vector line segments are selected, and vector line segments are tracked in parallel to generate a set of vector lines.
It improves vectorization speed, enabling more efficient extraction of multi-line features from complex raster data, accurate processing of intersection points, and generation of more effective topological information.
Smart Images

Figure CN117132779B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a parallel tracking grid line vectorization method and system based on skeleton thinning. BACKGROUND
[0002] Grid line vectorization refers to extracting vector line elements in grid data. In image processing and terrain analysis, grid line vectorization has a wide range of applications. For example, in road extraction and water system extraction, a traditional image processing or deep learning method is usually used to extract the road area first, and then the area is vectorized into a road network or water system vector data for subsequent path planning or attribute storage analysis. In terrain analysis, the extraction of terrain feature lines, such as ridge lines, hill foot lines, and valley lines, usually requires first extracting feature points that meet the terrain characteristics on DEM data, and then using a grid vectorization method to connect the points into lines.
[0003] Among the methods related to grid vectorization, the method for extracting vector surface elements is already quite mature, but the method for extracting vector lines is mainly based on thinning-based tracking vectorization and tracking box-based vectorization. These grid line vectorization methods mostly track a single line element at a time, whether they use clustering to segment line elements or use a lookup table to find feature points of vector lines to improve speed. Overall, the efficiency is still not high when the vectorization task is large. In addition, in the vectorization of complex road networks and water systems, the tracking box-based vectorization method performs poorly in extracting intersection points.
[0004] In actual grid line vectorization tasks, such as road network and water system vectorization tasks, there are often a large number of complex intersection points. For line elements with complex branches, traditional tracking methods do not perform well in judging intersection points and expressing vector line topology. When tracking a single vector line element, if the intersection point is extracted as an independent line element with the intersection point as an endpoint, it will greatly affect the vectorization speed and subsequent topology construction and application analysis. In addition, there is still much room for improvement in how to extract the skeleton of the vector line more quickly, improve the vectorization speed, and extract more effective topological information.
[0005] Therefore, it is necessary to provide a parallel tracking grid line vectorization method based on skeleton thinning to solve the above problems. SUMMARY
[0006] The present application intends to provide a skeleton refinement-based parallel tracking raster line vectorization method and system to solve the technical problems of the prior art, such as the poor intersection point judgment and vector line topology expression processing effect of the traditional tracking method for complex raster line vectorization tasks, the slow vectorization speed of the existing method for extracting and processing independent line elements when tracking a single vector line element, and the difficulty in subsequent topology construction after vectorization.
[0007] The first aspect of the present application proposes a skeleton refinement-based parallel tracking raster line vectorization method, which comprises: skeleton refinement of the to-be-processed raster data, parallel search of each raster region to obtain a plurality of independent multi-line elements, and the to-be-processed raster data comprising image data; searching and determining each element vertex and its related vector line segment element in the multi-line element in each raster region in a left-to-right and top-to-bottom traversal manner, wherein for each element vertex, the following steps are performed: judging whether there are positive four-neighborhood pixel points and diagonal four-neighborhood pixel points on the same side in the adjacent element points at the current element point to screen the effective vector line segments related to the current element point and generate an initial multi-line element set; performing a vector line tracking step according to the generated initial multi-line element set, specifically comprising traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking the vector line segments connectable with the vector line initial starting point, and when the first endpoint or the first node is tracked, the first endpoint or the first node is taken as the vector line ending point, the tracking of the connectable vector line segments is ended, and a new vector line is obtained, the new vector line is composed of endpoints and nodes, and is a directional vector line segment; repeating the vector line tracking step until all vector line segments in the initial multi-line element set are traversed, and a vector line set is obtained; and outputting a vectorization result corresponding to the to-be-processed raster data according to the obtained vector line set.
[0008] According to an optional embodiment, the judgment of whether there are positive four-neighborhood pixel points and diagonal four-neighborhood pixel points on the same side in the adjacent element points at the current element point to screen the effective vector line segments related to the current element point comprises: searching and determining the positive four-neighborhood pixel points having a positive adjacent relationship with the current element point and the diagonal four-neighborhood pixel points having a diagonal adjacent relationship with the current element point, connecting the current element point with the determined positive four-neighborhood pixel points and diagonal four-neighborhood pixel points respectively to form a plurality of vector line segments; when the positive four-neighborhood pixel points and the diagonal four-neighborhood pixel points in the adjacent element points at the current element point are located on the same side, the diagonal four-neighborhood pixel point at the current element point is determined as a deletion point, and the vector line segment containing the deletion point is removed from the plurality of vector line segments formed to screen the effective vector line segments related to the current element point.
[0009] According to an optional embodiment, the generating the initial multi-line element set comprises: judging whether the eight domains of the current element point are marked with feature points and judging whether the vector line segment formed by the current element point belongs to the initial multi-line element set, so as to determine whether to re-establish a new multi-line element set; when judging that each element vertex is not a marked feature point and judging that the vector line segment formed by the current element point does not belong to the initial multi-line element set, it is determined to re-establish a new multi-line element set; when judging that each element vertex is a marked feature point and judging that the vector line segment formed by the current element point belongs to the initial multi-line element set, the same vector line segment is not added repeatedly, and only the new vector line segment is added to the initial multi-line element set.
[0010] According to an optional embodiment, when it is determined that there is at least one existing multi-line element set in the eight domains of the current element point, all the existing initial multi-line element sets are merged to update the vector line segments in the initial multi-line element vector set.
[0011] According to an optional embodiment, when each grid region is searched in parallel to obtain a plurality of independent multi-line elements, the feature points of the element vertices in different independent multi-line elements are marked in parallel, specifically including endpoint marking and junction point marking, or when the element vertices in each grid region and the related vector line segments are searched repeatedly to determine, the feature points of the element vertices in different independent multi-line elements are marked in parallel, specifically including endpoint marking and junction point marking.
[0012] According to an optional embodiment, when the first endpoint or the first junction point is tracked, the first endpoint or the first junction point is taken as the vector line starting point of the next new vector line, and the vector line tracking step is repeatedly executed to obtain a new vector line.
[0013] According to an optional embodiment, while the vector line tracking step is executed, the number of adjacent orthogonal four-neighbor domain pixel points and diagonal four-neighbor domain pixel points adjacent to the current element point is calculated, and the adjacent element points existing in the orthogonal four-neighbor domain and the diagonal four-neighbor domain of the current element point are excluded.
[0014] If the calculated number is 1, the current element point is an endpoint;
[0015] If the calculated number is greater than 2, the current element point is a junction point;
[0016] If the calculated number is 2, the current element point is a connecting point.
[0017] According to an optional embodiment, the outputting a vectorization result corresponding to the to-be-processed grid data according to the obtained vector line set comprises: simultaneously outputting a plurality of single-line segments and line elements in each grid region.
[0018] According to optional embodiments, according to a road network vectorization task or a water system vectorization task, the multi-line elements in the obtained new vector line set are converted into single-line elements, and topological information of roads corresponding to the vector lines or topological information of water system branches corresponding to the vector lines is generated.
[0019] The second aspect of the present application provides a parallel tracking grid line vectorization system based on skeleton refinement, comprising: a parallel search processing module, which performs skeleton refinement on the to-be-processed grid data, and obtains a plurality of independent multi-line elements by searching each grid region in parallel, wherein the to-be-processed grid data comprises image data; a screening and generating module, which searches and determines the vertexes of each element in the multi-line elements in each grid region and the related vector line segment elements in a left-to-right and top-to-bottom traversal manner, wherein for each vertex, the following steps are performed: judging whether there exist a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point on the same side among the adjacent element points at the current element point, so as to screen the effective vector line segments related to the current element point, and generate an initial multi-line element set; a tracking module, which performs a vector line tracking step according to the generated initial multi-line element set, and specifically comprises traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking the vector line segments connectable with the vector line initial starting point, and when a first end point or a first node is tracked, taking the first end point or the first node as a vector line end point, ending the tracking of the connectable vector line segments to obtain a new vector line, wherein the new vector line is composed of end points and nodes, and is a directional vector line segment; repeatedly performing the vector line tracking step until all the vector line segments in the initial multi-line element set are traversed, so as to obtain a vector line set; and an output module, which outputs a vectorization result corresponding to the to-be-processed grid data according to the obtained vector line set.
[0020] The embodiments of the present application have the following advantages:
[0021] Compared with the prior art, the present application can quickly extract the skeleton of the vector line, more efficiently obtain the multi-line element, improve the vectorization speed, and extract more effective topological information by performing skeleton refinement on the to-be-processed grid data, obtaining a plurality of independent multi-line elements by searching each grid region in parallel, judging whether there exist a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point on the same side among the adjacent element points at the current element point to screen the effective vector line segments related to the current element point, generating an initial multi-line element set, and then performing a vector line tracking step according to the generated initial multi-line element set until all the vector line segments in the initial multi-line element set are traversed, so as to obtain a vector line set and output a vectorization result corresponding to the to-be-processed grid data.
[0022] In addition, the parallel skeleton thinning algorithm is particularly suitable for extracting vector line elements from complex raster data with complex targets and large data volume, and can quickly extract the skeleton of the vector line, efficiently obtain multi-line elements, further improve the vectorization speed, and extract more effective topological information. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 is a step flow chart of an example of the parallel skeleton thinning-based raster line vectorization method of the present application;
[0024] Figure 2 is a schematic diagram of a multi-line element in an application example of the parallel skeleton thinning-based raster line vectorization method of the present application;
[0025] Figure 3 is Figure 2 a schematic diagram of binary raster data of a multi-line element (c) in
[0026] Figure 4 is Figure 3 an example diagram of generating vector line segments from the multi-line element of
[0027] Figure 5 is Figure 4 a schematic diagram of effective vector line segments after removing the deletion points in
[0028] Figure 6 is a schematic diagram of generating a vector line set from the effective vector line segments based on Figure 5
[0029] Figure 7 is a schematic diagram of a vectorization result of a multi-line element in another application example of the parallel skeleton thinning-based raster line vectorization method of the present application;
[0030] Figure 8 is a step flow chart of another example of the parallel skeleton thinning-based raster line vectorization method of the present application;
[0031] Figure 9 is a schematic diagram of an example of raster data for verifying the effect;
[0032] Figure 10 is a schematic diagram of an example of a raster line vectorization result obtained by performing the parallel skeleton thinning-based raster line vectorization on the raster data of Figure 9
[0033] Figure 11 is a structural schematic diagram of an example of the parallel skeleton thinning-based raster line vectorization system according to the present application;
[0034] Figure 12 is a structural schematic diagram of an electronic device embodiment according to the present application;
[0035] Figure 13 is a structural schematic diagram of a computer readable medium embodiment according to the present application. DETAILED DESCRIPTION
[0036] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0037] In view of the above problems, the present application proposes a parallel tracking grid line vectorization method based on skeleton refinement, which extracts vector line elements from target complex and large data volume complex grid data, uses parallel refinement algorithm to extract the skeleton of the vector line elements in a parallel and serial combination (specifically, skeleton refinement, generation of vector line segment set, and vector line tracking steps, which are serial between the three steps) manner, then generates vector line segment set in parallel by block, and finally parallel tracks the vector line for each independent vector line segment set to extract topological information, which can extract the skeleton of the vector line more quickly, can improve the vectorization speed, and can extract more effective topological information.
[0038] Reference will now be made to Figures 1 to 9 The content of the present application will be described in detail.
[0039] Figure 1 is a step flowchart of an example of the parallel tracking grid line vectorization method based on skeleton refinement of the present application. Figure 2 is a schematic diagram of multi-line elements in an application example of the parallel tracking grid line vectorization method of the present application.
[0040] In Figure 2 the example, a total of 18 vector single line elements are included, but it can also be regarded as two multi-line elements (a), (b) and (c) containing a large number of intersection points, and the two multi-line elements are independent of each other and are composed of all the intersecting single line elements.
[0041] It should be noted that in raster vectorization, the tracked vector line features can be stored as single-line vector features or multi-line vector features. A single-line vector feature (hereinafter, also referred to as a single-line feature) represents a single line, while a multi-line vector feature (hereinafter, also referred to as a multi-line feature) represents a collection of multiple single-line features. In actual raster data, the vector lines to be extracted usually have many branches, which greatly affects the accuracy and extraction speed of vector line features. The parallel tracking raster line vectorization method of this invention is particularly suitable for extracting vector line features from complex raster data with complex targets and large data volumes. It can greatly improve the speed of raster vectorization, accurately handle intersection points, and thus achieve efficient parallel processing. It can also effectively generate subsequent topology information.
[0042] The specific implementation process of this invention will be explained below with specific examples.
[0043] like Figure 1 As shown, in step S101, the raster data to be processed is skeletonized by searching each raster region in parallel to obtain multiple independent multi-line features. The raster data to be processed includes image data.
[0044] Specifically, the raster data to be processed is, for example, a road network image. After binarization, this road network image is transformed into a binary raster of a black and white image. Further processing is applied to the black lines within the binary raster to thin them. Then, each raster region is searched in parallel (in... Figure 2 In the example, there are three raster regions to obtain multiple independent multiline features, such as... Figure 2 The three independent multi-line elements are shown.
[0045] In one alternative implementation, for example, Zhang's fast parallel refinement algorithm is used to search each raster region in the raster data to be processed in parallel to obtain multiple independent multi-line features.
[0046] As shown in Table 1 below, eight neighborhoods centered at P1 are illustrated, with P2 to P9 representing the eight neighboring feature points adjacent to P1.
[0047] Table 1
[0048]
[0049] Specifically, the first refinement step is performed in parallel, and the first refinement step includes deleting boundary points that simultaneously satisfy the following conditions:
[0050] (1) 2≤N(P1)≤6; (2) S(P1)=1; (3) P2xP4xP6=0; (4) P4xP6xP8=0; wherein N(P1) is the number of non-zero neighboring points of P1; S(P1) is the number of times the values of P2, P3,..., P9 change from 0 to 1 in order.
[0051] Next, a second refinement step is performed in parallel. The second refinement step includes deleting boundary points that simultaneously satisfy the following conditions:
[0052] (1) 2≤N(P1)≤6; (2) S(P1)=1; (3) P2xP4xP8=0; (4) P2xP6xP8=0; wherein N(P1) is the number of non-zero neighboring points of P1; S(P1) is the number of times the values of P2, P3,..., P9 change from 0 to 1 in order.
[0053] The above first refinement step and second refinement step constitute one iteration, and the first refinement step and second refinement step are repeatedly performed until no points satisfy the above conditions, at which time the line composed of the remaining points is the skeleton after refinement.
[0054] By using the Zhang fast parallel refinement algorithm to perform parallel processing on each grid region in the to-be-processed grid data, the skeleton of the vector line can be quickly and efficiently extracted in parallel while the characteristics of straight lines, intersecting lines and inflection points are maintained.
[0055] It should be noted that in other embodiments, the to-be-processed grid data can be, for example, a water system image, and can also be an image, a picture, etc. related to a road or a water system. The above is only described as an optional example and should not be construed as a limitation of the present application.
[0056] Next, in step S102, each element vertex and its related vector line segment element in the multi-line element in each grid region are searched and determined in a left-to-right and top-to-bottom traversal manner, and for each element vertex, the following steps are performed: judging whether there exist a positive four-neighborhood pixel and an oblique four-neighborhood pixel in the adjacent element points at the current element point on the same side, to screen the effective vector line segment related to the current element point, to generate an initial multi-line element set.
[0057] Specifically, each element vertex and its related vector line segment element in the multi-line element in each grid region are searched and determined in a left-to-right and top-to-bottom traversal manner in parallel. Below, the generation of an initial multi-line element set for an independent multi-line element (specifically, the multi-line element (c) in Figures 2 to 5 ) in a grid region will be specifically described. Figure 2
[0058] In a specific embodiment, a first element point in the multi-line element in each grid region is searched and determined in a traversal manner from left to right and from top to bottom (as shown by point 1 in particular, which is the first element point and also the current element point. Figure 3
[0059] Next, points 2, 3, 4,..., 12 are searched and determined in sequence (as shown in FIG. 2). When points 2, 3, 4,..., 12 are searched and determined, points 2, 3, 4,..., 12 are the current element points. Figure 3
[0060] For each element vertex, the following steps are performed: a judging step and a screening step.
[0061] In the judging step, it is specifically judged whether a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point exist at the same time in the adjacent element points at the current element point.
[0062] In the screening step, based on the judging result of the judging step, valid vector line segments related to the current element point are screened to generate an initial multi-line element set.
[0063] In the present embodiment, before the judging step is performed, it is further included that whether a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point exist in the eight fields of the current element point. For example, when point 1 is the current element point, point 1 has two oblique four-neighborhood pixel points (specifically, points 3 and 4) and one positive four-neighborhood pixel point (specifically, point 2). For example, when point 2 is the current element point, point 2 has no oblique four-neighborhood pixel point and two positive four-neighborhood pixel points (specifically, points 1 and 4). For another example, when point 3 is the current element point, point 3 has one oblique four-neighborhood pixel point (specifically, point 1).
[0064] The adjacent element points existing in the eight fields of points 4,..., 12 are searched and determined in sequence (as shown in FIG. 2). Figure 3
[0065] Specifically, the positive four-neighborhood pixel point having a positive adjacent relationship with the current element point and the oblique four-neighborhood pixel point having an oblique adjacent relationship with the current element point are searched and determined, and the current element point is connected with the determined positive four-neighborhood pixel point and oblique four-neighborhood pixel point respectively to form multiple vector line segments. For example, for point 1, the adjacent element points at point 1 include points 2, 4 and 3, and the formed vector line segments include line segment (1, 3), line segment (1, 2), line segment (1, 4). The formed vector line segments also include multiple vector line segments such as line segment (2, 4), line segment (4, 6), line segment (4, 5), line segment (5, 6), line segment (5, 11), line segment (5, 10), line segment (6, 7), line segment (11, 10), line segment (11, 6), line segment (11, 12), etc., which can be specifically referred to FIG. 2. Figure 4 .
[0066] Further, it is determined whether the positive four-neighbor pixel point and the diagonal four-neighbor pixel point exist simultaneously on the same side among the adjacent element points at the current element point. For example, for the point 1, the positive four-neighbor pixel point (specifically, the point 2) and the diagonal four-neighbor pixel point (specifically, the point 4) exist simultaneously on the same side among the adjacent element points at the point 1.
[0067] Then, when it is determined that the positive four-neighbor pixel point and the diagonal four-neighbor pixel point are located on the same side among the adjacent element points at the current element point, it is determined that the diagonal four-neighbor pixel point at the current element point is a deletion point, and the vector line segment containing the deletion point is removed from the plurality of vector line segments formed, so as to screen out the effective vector line segment related to the current element point (for details, see Figure 4 and Figure 5 ). For example, the positive four-neighbor pixel point (specifically, the point 2) and the diagonal four-neighbor pixel point (specifically, the point 4) exist simultaneously on the same side among the adjacent element points at the point 1, it is determined that the point 4 is a deletion point, and the vector line segment (1, 4) containing the deletion point (specifically, the point 4) is removed.
[0068] Through the above screening steps, the initial multi-line element set is generated. For example, the initial multi-line element set is generated by using the screened effective vector line segment (for example, the line segment (1, 3) and the line segment (1, 2)), for example, marked as a P set.
[0069] In an optional embodiment, when each grid region is searched in parallel to obtain a plurality of independent multi-line elements, the feature point marking of the element vertex in different independent multi-line elements is performed in parallel, including the end point marking and the junction point marking.
[0070] Specifically, the end point of the element vertex in different independent multi-line elements is determined to perform the end point marking. The junction point of the element vertex in different independent multi-line elements is determined to perform the junction point marking.
[0071] More specifically, by calculating the number of the positive four-neighbor pixel point and the diagonal four-neighbor pixel point adjacent to the current element point, the adjacent pixel points of the positive four-neighbor and the diagonal four-neighbor of the current element point are excluded, so as to determine whether it is an end point, a junction point or other points (for example, a connection point).
[0072] If the calculated number is 1, the current element point is an end point.
[0073] If the calculated number is greater than 2, the current element point is a junction point.
[0074] If the calculated number is 2, the current element point is a connection point.
[0075] For example, eight neighborhoods of the current element point (e.g., point 12) are searched, and adjacent pixel points in the positive four-neighborhood and the diagonal four-neighborhood of the current element point are calculated. The positive four-neighborhood of the current element point (e.g., point 12) has point 11, and the diagonal four-neighborhood has point 10. Therefore, the diagonal four-neighborhood point (point 10) is not counted in the number of adjacent pixel points. Thus, the number of adjacent pixel points of point 12 is 1, i.e., point 12 is an end point.
[0076] It should be noted that the above is described only as an optional example and cannot be understood as a limitation of the present application.
[0077] Next, in step S103, according to the generated initial multi-line element set, a vector line tracking step is performed, specifically including traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking a vector line segment connectable with the vector line initial starting point, when a first end point or a first node is tracked, taking the first end point or the first node as a vector line end point, ending the tracking of the connectable vector line segment to obtain a new vector line, the new vector line is composed of end points and nodes, and is a vector line segment with direction; the vector line tracking step is repeatedly performed until all vector line segments in the initial multi-line element set are traversed, and a vector line set is obtained.
[0078] Specifically, according to the generated initial multi-line element set, a vector line tracking step is performed: traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking a vector line segment connectable with the vector line initial starting point, when a first end point or a first node is tracked, taking the first end point or the first node as a vector line end point, ending the tracking of the connectable vector line segment to obtain a new vector line, the new vector line is composed of end points and nodes, and is a vector line segment with direction.
[0079] More specifically, it is determined that the two points of each vector line segment are end points, nodes or other points (e.g., connection points). For example, it is determined that points 1, 3, 7, 8, 12 in Figure 2 are end points. It is determined that points 5, 11 are nodes.
[0080] In the example of Figure 2 , it is determined that point 3 is a vector line starting point, and a vector line segment (line segment (3, 1), line segment (1, 2), line segment (2, 4), line segment (4, 5)) connectable with the vector line initial starting point (specifically, point 3) is tracked. When a first node (specifically, point 5) is tracked, the first node is taken as a vector line end point, and the tracking of the connectable vector line segment is ended to obtain a new vector line (specifically, line segment (3, 1, 2, 4, 5)).
[0081] Specifically, upon tracing the first endpoint or node, the first endpoint or node is used as the starting point of the next new vector line, and the vector line tracing steps are repeated to obtain a new vector line. For example, point 5 is determined as the initial starting point of the vector line, and vector line segments (the first branch segment includes line segment (5, 11)) that can be connected to the initial starting point of the vector line (specifically point 5) are traced. Upon tracing the first node (specifically point 11), the first node is used as the ending point of the vector line, and the tracing of connectable vector line segments ends to obtain a new vector line (specifically the first branch segment (5, 6)). Upon tracing the first endpoint (specifically point 7), the first endpoint is used as the ending point of the vector line, and the tracing of connectable vector line segments (the second branch segment includes line segment (5, 6) and line segment (6, 7)) ends to obtain a new vector line (specifically the second branch segment (5, 6, 7)).
[0082] Next, the vector line tracing step is repeated until all vector line segments in the initial multi-line feature set have been traversed, resulting in a vector line set (e.g., ...). Figure 6 The vector lines shown are (3, 1, 2, 4, 5), (5, 11), (5, 6, 7), (8, 9, 10, 11), and (11, 12). See details in the original text. Figure 6 .
[0083] In one optional implementation, it is specifically determined whether the eight neighborhoods of the current feature point have been marked with feature points, and whether the vector line segment formed by the current feature point does not belong to the initial multi-line feature set, so as to determine the need to re-establish a new multi-line feature set.
[0084] Specifically, the marked feature points include marked endpoints and marked nodes.
[0085] It should be noted that the content of the endpoint and node annotations in step S103 is largely the same as that in step S102 above, therefore, the explanation of the same content is omitted. Furthermore, in another embodiment, while performing the vector line tracing step, the number of adjacent four-neighbor pixels and four-diagonal neighbor pixels of the current feature point is calculated, and adjacent feature points where both four-neighbor pixels and four-diagonal neighbor pixels of the current feature point exist are excluded, in order to determine whether the current feature point is an endpoint, node, or connection point. The specific calculation and judgment process is largely the same as the specific calculation and judgment process for determining whether the current feature point is an endpoint, node, or connection point in step S102, therefore, the explanation of the same parts is omitted. The above is only described as an optional example and should not be construed as a limitation of the present invention.
[0086] More specifically, the binarized raster data is traversed to search for any pixel point (i.e. any element vertex) where a multi-line element is located and eight directions of the pixel point (specifically including four directions of the upper, lower, left and right in the positive four-neighborhood of any pixel point, and four directions of the diagonally left upper, diagonally right upper, diagonally left lower and diagonally right lower in the diagonal four-neighborhood of any pixel point).
[0087] When it is determined that each element vertex is not a marked feature point and that the vector line segment formed by the current element point does not belong to the initial multi-line element set, it is determined to re-establish a new multi-line element set. For example, when point 8 includes a positive four-neighborhood point (specifically point 9), a vector line segment (8, 9) is formed, and the vector line segment (8, 9) does not belong to the initial multi-line element set, it is determined to re-establish a new multi-line element set, such as set P1. Meanwhile, the multi-line element set (such as set P1) to which the current element point (such as point 9) belongs is recorded.
[0088] Next, when it is determined that there is at least one existing multi-line element set in the eight domains of the current element point, all existing initial multi-line element sets are merged to update the vector line segments in the initial multi-line element vector set. For example, when the vector line segment (9, 10) is tracked, it is determined that there are two existing multi-line element sets (specifically initial multi-line element set P and new multi-line element set P1) in the eight domains of the current element point (specifically point 10), and the initial multi-line element set P and the new multi-line element set P1 are merged.
[0089] In another embodiment, when it is determined that each element vertex is a marked feature point and that the vector line segment formed by the current element point belongs to the initial multi-line element set, the same vector line segment is no longer repeatedly added, and only the new vector line segment is added to the initial multi-line element set. For example, when it is determined that point 3 is an endpoint and a vector line segment (3, 1) is formed, and it is determined that the formed vector line segment (3, 1) belongs to the initial multi-line element set, since it is determined that point 1 is searched and a vector line segment (1, 3) is formed, and the vector line segment (1, 3) is added to the initial multi-line element set, the same vector line segment (3, 1) is no longer repeatedly added.
[0090] In yet another embodiment, in the actual raster vectorization task, when the vector line segment tracking step is completed, the vectorization result and the vectorization result of each independent multi-line element are completely displayed. The vectorization result and the vectorization result of each independent multi-line element are used for subsequent application analysis of the vector line element. For isolated points, i.e. points without adjacent pixels in the neighborhood, the points cannot be saved as vector line segments in this step, and the isolated points can be directly ignored or stored as vector point elements.
[0091] Then, the obtained multiple independent multi-line elements are stored instead of storing separate vector lines (i.e., single-line elements). Compared with the prior art of tracking all branches as separate vector lines (i.e., single-line elements), the storage mode of using multi-line elements can effectively improve the tracking speed and is also beneficial to subsequent operations such as constructing the topology of vector lines and removing short branches.
[0092] In an example of extracting vector line elements from complex raster data with a target complex and a large amount of data, the steps of parallel raster vectorization are as follows.
[0093] Step S201: Determine the number p of parallel threads.
[0094] Step S202: Divide the raster data according to the number p of threads.
[0095] Step S203: In each raster block, use the Zhang refinement algorithm, and after parallel refinement of the raster data blocks in different threads, generate a set of vector line segments in the raster data blocks in a parallel + serial manner under the same block mode.
[0096] For example, a set of vector line segments is generated from top to bottom and from left to right for each raster data block with a width w and a height h, and the calculated raster range is w*(h-1), that is, the last row of raster data does not participate in the calculation of the set of vector line segments. When generating the set of vector line segments, the original raster data is marked based on the number of the set to which it belongs.
[0097] For example, the total raster data size is 8*7, and the raster data is divided into two parts with sizes of 8*4 and 8*3. Under the condition that the last row does not participate in the calculation, the two raster blocks belong to one set, but due to the parallel block, they actually belong to two sets, and the extracted vector line segment is an independent vector line. Then, the set of vector line segments is generated in parallel, and the last row of each raster block is used to generate a set of vector line segments in a serial manner. In this process, the set 1 in the vector block 1 (such as Figure 5 ) and the set 1 in the vector block 2 (such as Figure 5 ) in the example of the initial multi-line element set P) and the set 1 in the vector block 2 (such as
[0098] After generating the set of vector line segments (i.e., the set of multi-line elements), the total number n of sets is divided according to the number p of threads, and each thread performs vector line tracking on (n / p) sets of vector line segments in parallel. For example, for three threads, three threads are independently tracked.
[0099] It should be noted that the above is only used as an optional example for description, and should not be understood as a limitation on the present application.
[0100] Next, in step S104, according to the obtained vector line set, a vectorization result corresponding to the to-be-processed raster data is output.
[0101] Specifically, according to the obtained vector line set, a vectorization result corresponding to the to-be-processed raster data is output, specifically including simultaneously outputting multiple single-line segments, line elements in each raster region. As shown in the vectorization result. Figure 7
[0102] For example, using the gdal library, a vector data file is generated, which includes the output vectorization result.
[0103] In another example, as shown in the figure, Figure 8 The skeleton-refined parallel tracking raster line vectorization method includes a step S801 of generating topology information corresponding to each vector line.
[0104] It should be noted that, Figure 8 The steps S101, S102, S103, S104 in the example of Figure 1 The steps S101, S102, S103, S104 in the example of
[0105] In step S801, topology information corresponding to each vector line is generated.
[0106] Specifically, according to the road network vectorization task or the water system vectorization task, the multi-line elements in the obtained new vector line set are converted into single-line elements, and the topology information of the road corresponding to each vector line is generated, or the topology information of the water system branch corresponding to each vector line is generated.
[0107] The topology information includes point information of each vector line, a unique identifier (such as ID) of each vector line, and an identifier (such as ID) of a vector line connected to each vector line.
[0108] The unique identifier of the current vector line is determined, and the vector lines related to the current vector line are found.
[0109] In order to verify the application effect of the skeleton-refined parallel tracking raster line vectorization method of the present application, refer to Figure 9 and Figure 10 The following will be compared and described.
[0110] The method of the present application is used in steps S101, S103, S104 using parallel running mode, and the method of the present application is used in steps S101, S103, S104 using non-parallel running mode to Figure 9 The raster data of the grid are tracked and vectorized, and the grid line vectorization results of the grid data of the grid are obtained Figure 10 The raster data of the grid are tracked and vectorized, and the grid line vectorization results of the grid data of the grid are obtained
[0111] In addition, the vector line can be extracted completely and accurately, and the geometric information of the vector line and the intersection point between the vector lines can be extracted. The independent vector lines are extracted as independent multi-line elements, and the intersection points are extracted as different single-line elements.
[0112] It should be noted that the above is only described as an optional example and cannot be understood as a limitation of the present application. In addition, the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not for limiting purposes. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0113] Compared with the prior art, the present application can quickly extract the skeleton of the vector line, more efficiently obtain the multi-line element, reduce the running time by 24%-30% compared with the running time without using the parallel mode, further improve the vectorization speed, and extract more effective topological information.
[0114] In addition, the present application is particularly suitable for extracting vector line elements from complex grid data with complex targets and large data volume, using a parallel refinement algorithm to extract the skeleton of the vector line element, and generating a vector line segment set in blocks in parallel, which can more quickly extract the skeleton of the vector line, more efficiently obtain the multi-line element, further improve the vectorization speed, and extract more effective topological information.
[0115] The following is an embodiment of the system of the present application, which can be used to implement the embodiment of the method of the present application. For details not disclosed in the embodiment of the system of the present application, please refer to the embodiment of the method of the present application.
[0116] Figure 11 is a structural schematic diagram of an example of a skeleton-refined parallel tracking raster line vectorization system according to the present application.
[0117] As shown in Figure 11 , the second aspect of the present disclosure provides a skeleton-refined parallel tracking raster line vectorization system 900, which comprises a parallel search processing module 910, a screening generation module 920, a tracking module 930 and an output module 940.
[0118] Specifically, the parallel search processing module 910 performs skeleton refinement on the to-be-processed raster data, which comprises image data, and searches each raster region in parallel to obtain a plurality of independent multi-line elements. The screening generation module 920 searches and determines each element vertex and its related vector line segment element in the multi-line element in each raster region in a traversal manner from left to right and from top to bottom, wherein for each element vertex, the following steps are performed: judging whether there are a normal four-neighborhood pixel point and an oblique four-neighborhood pixel point at the same side among the adjacent element points at the current element point, to screen the effective vector line segment related to the current element point, to generate an initial multi-line element set. The tracking module 930 performs a vector line tracking step according to the generated initial multi-line element set, which specifically comprises traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking a vector line segment connectable with the vector line initial starting point, when the first end point or the first node is tracked, taking the first end point or the first node as a vector line end point, ending the tracking of the connectable vector line segment to obtain a new vector line, the new vector line is composed of end points and nodes, and is a directional vector line segment; repeating the vector line tracking step until all vector line segments in the initial multi-line element set are traversed, to obtain a vector line set. The output module 940 outputs a vectorization result corresponding to the to-be-processed raster data according to the obtained vector line set.
[0119] In an optional embodiment, the to-be-processed raster data is skeleton-refined, and a plurality of independent multi-line elements are obtained by searching each raster region in parallel, the to-be-processed raster data comprising image data.
[0120] The search determines the vertexes of the elements in the multi-line elements in the grid regions and the related vector line segment elements according to the traversal from left to right and from top to bottom, wherein for each vertex, the following steps are performed: judging whether the positive four-neighborhood pixel point and the diagonal four-neighborhood pixel point exist at the same side among the adjacent vertexes at the current vertex, so as to screen the effective vector line segments related to the current vertex, and to generate an initial multi-line element set.
[0121] According to the generated initial multi-line element set, a vector line tracing step is performed, specifically including traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracing the vector line segments connectable with the vector line starting point, when the first end point or the first junction point is traced, taking the first end point or the first junction point as the vector line ending point, ending the tracing of the connectable vector line segments to obtain a new vector line, the new vector line is composed of end points and junction points, and is a vector line segment with direction; the vector line tracing step is repeatedly performed until all the vector line segments in the initial multi-line element set are traversed, to obtain a vector line set; and according to the obtained vector line set, a vectorization result corresponding to the grid data to be processed is output.
[0122] In an optional embodiment, the judgment whether the positive four-neighborhood pixel point and the diagonal four-neighborhood pixel point exist at the same side among the adjacent vertexes at the current vertex, so as to screen the effective vector line segments related to the current vertex.
[0123] Specifically, the positive four-neighborhood pixel point having a positive adjacent relationship with the current vertex and the diagonal four-neighborhood pixel point having a diagonal adjacent relationship with the current vertex are searched and determined, and the current vertex is connected with the determined positive four-neighborhood pixel point and diagonal four-neighborhood pixel point respectively, to form a plurality of vector line segments.
[0124] When the positive four-neighborhood pixel point and the diagonal four-neighborhood pixel point at the current vertex are determined to be located at the same side among the adjacent vertexes at the current vertex, the diagonal four-neighborhood pixel point at the current vertex is determined as a deletion point, and the vector line segment containing the deletion point is removed from the plurality of vector line segments formed, to screen the effective vector line segments related to the current vertex.
[0125] For generating the initial multi-line element set, it is judged whether the eight domains of the current vertex are marked with feature points, and it is judged whether the vector line segment formed by the current vertex belongs to the initial multi-line element set, to determine whether to re-establish a new multi-line element set; when it is judged that each vertex is not a marked feature point and it is judged that the vector line segment formed by the current vertex does not belong to the initial multi-line element set, it is determined to re-establish a new multi-line element set; when it is judged that each vertex is a marked feature point and it is judged that the vector line segment formed by the current vertex belongs to the initial multi-line element set, the same vector line segment is not repeatedly added, and only the new vector line segment is added to the initial multi-line element set.
[0126] When it is determined that there is at least one existing multi-line element set in the eight fields of the current element point, all existing initial multi-line element sets are merged to update the vector line segments in the initial multi-line element vector set.
[0127] When each grid region is searched in parallel to obtain multiple independent multi-line elements, the feature points of the element vertices in different independent multi-line elements are labeled in parallel, including endpoint labeling and node labeling, or when the element vertices and their related vector line elements in each grid region are repeatedly searched and determined, the feature points of the element vertices in different independent multi-line elements are labeled in parallel, including endpoint labeling and node labeling.
[0128] When the first endpoint or the first node is tracked, the first endpoint or the first node is taken as the vector line starting point of the next new vector line, and the vector line tracking step is repeatedly executed to obtain a new vector line.
[0129] In an optional embodiment, while the vector line tracking step is executed, the number of adjacent orthogonal four-neighbor and diagonal four-neighbor pixel points of the current element point is calculated, and the adjacent pixel points of the orthogonal four-neighbor and diagonal four-neighbor of the current element point are excluded.
[0130] If the calculated number is 1, the current element point is an endpoint.
[0131] If the calculated number is greater than 2, the current element point is a node.
[0132] If the calculated number is 2, the current element point is a connection point.
[0133] According to the obtained vector line set, a vectorization result corresponding to the to-be-processed grid data is output, specifically, multiple single-line line segments and line elements in each grid region are output at the same time.
[0134] In an optional embodiment, according to a road network vectorization task or a water system vectorization task, the multi-line elements in the obtained new vector line set are converted into single-line elements, and the topological information of the roads corresponding to each vector line is generated, or the topological information of the water system branches corresponding to each vector line is generated.
[0135] It should be noted that in this embodiment, the parallel tracking grid line vectorization method based on skeleton thinning performed by the parallel tracking grid line vectorization system based on skeleton thinning is substantially the same as the parallel tracking grid line vectorization method based on skeleton thinning in Figure 1 Therefore, the same part is omitted.
[0136] Figure 12 is a structural schematic diagram of an electronic equipment embodiment according to the present application.
[0137] As Figure 12 shown, the electronic device is in the form of a general computing device. The processor can be one or multiple and work cooperatively. The present application does not exclude distributed processing, i.e. the processor can be dispersed in different physical devices. The electronic device of the present application is not limited to a single physical device, but can also be the sum of multiple physical devices.
[0138] The memory stores computer executable programs, usually machine readable codes. The computer readable programs can be executed by the processor to enable the electronic device to perform the method of the present application, or at least some steps of the method.
[0139] The memory includes volatile memory, such as random access memory (RAM) and / or cache memory, and / or non-volatile memory, such as read only memory (ROM).
[0140] Optionally, the electronic device further comprises an I / O interface for data exchange between the electronic device and external devices. The I / O interface can be one or more of several types of bus structures, including memory bus or memory controller, peripheral bus, graphics acceleration port, processing unit, or local bus using any of the bus structures.
[0141] It should be understood that Figure 12 the electronic device shown is only an example of the present application, and the electronic device of the present application can further comprise elements or components not shown in the above examples. For example, some electronic devices further comprise display units such as display screens, and some electronic devices further comprise human-computer interaction elements such as buttons and keyboards. As long as the electronic device can execute the computer readable programs in the memory to implement the method of the present application or at least some steps of the method, it can be considered as an electronic device covered by the present application.
[0142] From the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, as Figure 13 shown, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network, and includes a number of commands to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above method according to the embodiments of the present application.
[0143] The software product can employ any combination of one or more computer readable media. The computer readable media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0144] The computer readable storage medium can include a computer-readable medium in the form of a data signal embodied in a carrier wave, wherein the data signal modulates an electromagnetic wave, a magnetic field, or other transport mechanism. The computer readable storage medium can also include any computer-readable medium excluding propagated signals per se.
[0145] The program code can be executed by one or more programmable processors, which can be individually, or within a group, integral to one or more machines or apparatus-based implementations set forth in the instant disclosure. Program code can be stored in one or more machine-readable medium, which can, for example, be integrated into a computer system, or be stored, either on a temporary or a long-term basis, on computer-readable media including, but not limited to, magnetic, optical, or semiconductor storages. Program code, when executed by the one or more programmable processors, can implement any of the methods, techniques, or processes described herein.
[0146] The computer readable medium described above can bear one or more programs (e.g., computer-executable programs), which, when executed by one of the devices, cause the computer readable medium to implement the method of the present disclosure.
[0147] Those skilled in the art can understand that the above-mentioned modules can be distributed in the device according to the description of the embodiments, and can also be changed in one or more devices different from the embodiments. The modules of the above-mentioned embodiments can be combined into one module, or further split into multiple sub-modules.
[0148] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of commands to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the present application.
[0149] The example embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structure, arrangement or implementation method described herein; on the contrary, the present application is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the appended claims.
Claims
1. A parallel tracking skeleton-refined raster line vectorization method, characterized by, The method comprises the following steps: Skeleton thinning is performed on to-be-processed raster data, which comprises image data, to obtain a plurality of independent multi-line elements by searching each raster region in parallel; In a left-to-right and top-to-bottom traversal manner, each element vertex in the multi-line element in each raster region and its related vector line segment element are searched and determined, wherein, for each element vertex, the following steps are performed: judging whether there exist a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point on the same side among the adjacent element points at the current element point, so as to screen the effective vector line segment related to the current element point, and generate an initial multi-line element set; The judgment whether there exist a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point on the same side among the adjacent element points at the current element point comprises the following steps: A positive four-neighborhood pixel point having a positive adjacent relationship with the current element point and an oblique four-neighborhood pixel point having an oblique adjacent relationship with the current element point are searched and determined, and the current element point is connected with the determined positive four-neighborhood pixel point and oblique four-neighborhood pixel point respectively, so as to form a plurality of vector line segments; When it is determined that the positive four-neighborhood pixel point and the oblique four-neighborhood pixel point among the adjacent element points at the current element point are located on the same side, the oblique four-neighborhood pixel point at the current element point is determined as a deletion point, and the vector line segment containing the deletion point is removed from the plurality of vector line segments formed, so as to screen the effective vector line segment related to the current element point; The generation of the initial multi-line element set comprises the following steps: judging whether the eight domains of the current element point are marked feature points, and judging whether the vector line segment formed by the current element point belongs to the initial multi-line element set, so as to determine whether to re-establish a new multi-line element set; When it is judged that each element vertex is not a marked feature point, and it is judged that the vector line segment formed by the current element point does not belong to the initial multi-line element set, it is determined to re-establish a new multi-line element set; When it is judged that each element vertex is a marked feature point, and it is judged that the vector line segment formed by the current element point belongs to the initial multi-line element set, the same vector line segment is not repeatedly added, and only the new vector line segment is added to the initial multi-line element set; According to the generated initial multi-line element set, a vector line tracking step is performed, which specifically comprises the following steps: traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point, and tracking the vector line segment connectable with the vector line starting point, when a first end point or a first junction point is tracked, the first end point or the first junction point is taken as a vector line ending point, the tracking of the connectable vector line segment is ended, a new vector line is obtained, the new vector line is composed of end points and junction points, and is a directional vector line segment; the vector line tracking step is repeatedly performed until all the vector line segments in the initial multi-line element set are traversed, so as to obtain a vector line set; while the vector line tracking step is performed, the number of the positive four-neighborhood pixel point and the oblique four-neighborhood pixel point adjacent to the current element point is calculated, and the adjacent element point existing in the positive four-neighborhood and the oblique four-neighborhood of the current element point is excluded; If the calculated number is 1, the current element point is an end point. If the calculated number is greater than 2, the current element point is a node; If the calculated number is 2, the current element point is a junction; According to the obtained vector line set, a vectorization result corresponding to the to-be-processed raster data is output.
2. The parallel tracking raster line vectorization method based on skeleton refinement according to claim 1, characterized in that, When it is determined that there is at least one existing multi-line element set in the eight domains of the current element point, all existing initial multi-line element sets are merged to update the vector line segments in the initial multi-line element vector set.
3. The parallel tracking raster line vectorization method based on skeleton refinement according to claim 1, characterized in that, When each raster region is searched in parallel to obtain a plurality of independent multi-line elements, the element vertices in different independent multi-line elements are marked in parallel, including end point marking and node marking, or When the element vertices in each raster region and their related vector line segments are repeatedly searched and determined, the element vertices in different independent multi-line elements are marked in parallel, including end point marking and node marking.
4. The skeleton-refined parallel tracing raster line vectorization method according to claim 3, wherein, When the first end point or the first node is tracked, the first end point or the first node is taken as the vector line starting point of the next new vector line, and the vector line tracking step is repeatedly executed to obtain a new vector line.
5. The skeleton-refined parallel tracing raster line vectorization method according to claim 1, wherein, The outputting of the vectorization result corresponding to the to-be-processed raster data according to the obtained vector line set includes: The single line segments and line elements in each raster region are output simultaneously.
6. The parallel tracking raster line vectorization method based on skeleton refinement according to claim 1, characterized in that, According to a road network vectorization task or a water system vectorization task, the multi-line elements in the obtained new vector line set are converted into single-line elements, and the topological information of the roads corresponding to each vector line is generated, or the topological information of the water system branches corresponding to each vector line is generated.
7. A parallel tracking raster line vectorization method based on skeleton refinement according to any one of claims 1 to 6, A line vectorization system characterized by including: A parallel search processing module, which performs skeleton refinement on to-be-processed raster data, and obtains a plurality of independent multi-line elements by searching each raster region in parallel, wherein the to-be-processed raster data includes image data; A screening generation module, which searches and determines each element vertex and its related vector line segment element in each raster region in a multi-line element according to a left-to-right and top-to-bottom traversal manner, wherein for each element vertex, the following steps are performed: judging whether there are a positive four-neighborhood pixel point and an oblique four-neighborhood pixel point in the adjacent element points on the same side at the current element point, screening the effective vector line segment related to the current element point, and generating an initial multi-line element set. The tracking module performs a vector line tracking step according to the generated initial multi-line element set, specifically including traversing two points of each vector line segment in the initial multi-line element set, determining a vector line starting point and tracking a vector line segment connectable with the vector line initial starting point, ending the tracking of the connectable vector line segment to obtain a new vector line when a first end point or a first node is tracked to, the new vector line being composed of end points and nodes and being a vector line segment with a direction; the vector line tracking step is repeatedly performed until all vector line segments in the initial multi-line element set are traversed, and a vector line set is obtained; The output module outputs a vectorization result corresponding to the to-be-processed raster data according to the obtained vector line set.
Citation Information
Patent Citations
Automatic construction method and system for road network of open mine
CN105139434A
Image element vectorization method and device
CN111383293A