A method for identifying and locating local narrow areas of a pattern

By rasterizing the image patches and utilizing the diffusion behavior of grid cell value data to identify and locate local narrow and long areas of the image patches, the problem of inaccurate recognition in the existing technology is solved, and automated and efficient narrow and long area positioning is achieved.

CN117058229BActive Publication Date: 2025-09-16SURVEYING & MAPPING INST LANDS & RESOURCE DEPT OF GUANGDONG PROVINCE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310846589.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-11
Publication Date
2025-09-16
Estimated Expiration
2043-07-11

AI Technical Summary

Technical Problem

Existing technologies have difficulty in effectively identifying and locating local narrow and long areas of map patches, especially in county-level databases of land change surveys. Since the locations of narrow and long map patches may have unpredictable situations such as over-dense nodes and redundant nodes, the existing methods are not applicable enough.

Method used

By rasterizing the patch vector graphics to form a rasterized patch, the diffusion behavior of the cell value data of the raster unit is used to screen out the range with abnormally high cell values, which is considered to be a local narrow area. The original vector data is then combined for spatial analysis to locate the narrow area.

Benefits of technology

It realizes the automatic recognition and positioning of local narrow areas of the patch, avoids the unpredictable factors caused by the topological problems of the patch vector graphics themselves, and improves the accuracy and efficiency of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058229B_ABST
    Figure CN117058229B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for identifying and locating a local narrow and long area of ​​a pattern spot, which is characterized by comprising the following steps: rasterizing a pattern spot vector graphic to form a rasterized pattern spot; initializing the cell values ​​of all grid cells in the rasterized pattern spot, dividing the rasterized pattern spot into edge grids and non-edge grids, and entering a loop, wherein each loop increases the same cell value for all edge grids, and distributes the cell values ​​of the edge grids to adjacent non-edge grids until a preset number of loops is reached; screening out a range of grid cells in the rasterized pattern spot whose cell values ​​are higher than a threshold value, and identifying them as local narrow and long areas; and performing spatial analysis based on the local narrow and long areas and the original vector data to locate the vector range where the local narrow and long situation exists. The beneficial effect of the present invention is that the shape distribution characteristics of the narrow and long pattern spot are identified by utilizing the diffusion behavior of the cell value data of the grid cells, thereby avoiding the unpredictable factors caused by the topological problems of the pattern spot vector graphic itself.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of map making technology, and in particular to a method for identifying and locating a local narrow and long area of ​​a map spot. Background Art

[0002] The construction of a county-level database for land change surveys involves the adjustment, correction, and spatial analysis of numerous vector graphics. Due to the varying sources and requirements of various operational data, and the extensive manual organization involved in the entire process, unchecked database output often exhibits topological issues such as overlaps, gaps, localized narrowness, overcrowded nodes, and self-intersections, severely impacting subsequent data use and organization. Therefore, systematic inspection and correction of vector graphics is crucial to the quality of database development.

[0003] Among topological issues in databases, clearly defined situations, such as overlapping shapes, can be inspected and repaired directly through simple vector graphics processing. However, for locally narrow and elongated patches, since narrowness is a subjective concept, despite extensive research and application, a universal method is still lacking.

[0004] Currently, there are corresponding data inspection systems for county-level databases of land change surveys. Research has also been conducted on geographic conditions monitoring and other tasks, resulting in the development of quality inspection tools to perform topological inspections of patch graphics. Existing research also includes methods for addressing local and overall patch slenderness, as well as the identification and processing of linear features and narrow branches. In these studies, patch slenderness is often determined through the patch's vector features, such as by translating the patch's boundaries, determining the perimeter-to-area ratio, or combining Delaunay triangulation to segment the patch.

[0005] In actual work, since local narrow and long patches are generally caused by uncontrollable factors such as human operational errors, the local narrow and long locations may have irregular and unpredictable situations such as over-dense nodes and redundant nodes. As a result, the method of detecting through edges and points is usually difficult to cope with all situations. In the production process, the algorithm needs to be improved for new scenarios or combined with manual interpretation, and its applicability is affected to a certain extent.

[0006] However, when manually interpreting localized, narrow regions of a pattern, analysis is typically performed in conjunction with the location distribution of the pattern's shape and local features. Even if an edge or point in the pattern is abnormal, as long as the resulting pattern can be manually read, interpretation of the localized, narrow region can still be completed. In other words, when identifying narrow regions of a pattern, the focus is essentially on the location distribution of the pattern, and recognition should be achieved regardless of whether the pattern itself exhibits anomalies. Summary of the Invention

[0007] In response to the problem of insufficient applicability of existing methods for determining narrow and long patches, the present invention proposes a method for identifying and locating local narrow and long areas of patches, which can achieve the positioning of narrow and long areas of patches while avoiding unpredictable factors caused by the topological problems of the patch vector graphics themselves.

[0008] In order to solve the above technical problems, the technical solutions of the present invention are as follows:

[0009] A method for identifying and locating a local narrow area of ​​a pattern spot includes the following steps:

[0010] S1, rasterizing the spot vector graphics to form a rasterized spot;

[0011] S2, initializing the cell values ​​of all grid cells in the rasterized pattern, dividing the rasterized pattern into edge grids and non-edge grids, and entering a loop, wherein each loop increases the same cell value for all edge grids, and distributes the cell value of the edge grid to the adjacent non-edge grids, until a preset number of loops is reached;

[0012] S3, screening out a range of grid cells in the rasterized image patch whose cell values ​​are higher than a threshold value, and identifying it as a local narrow and long area;

[0013] S4, performing spatial analysis based on the local narrow and long area and the original vector data to locate the vector range where the local narrow and long situation exists.

[0014] In some embodiments, in S1, the process of forming the rasterized pattern includes:

[0015] S11, set the grid cell side length;

[0016] S12, calculating the envelope of the pattern vector graphic to obtain the width and height of the envelope;

[0017] S13, calculating the number of rows and columns of the matrix according to the side length of the grid unit and the width and height of the envelope;

[0018] S14, forming a pattern envelope matrix A based on the number of rows and columns of the matrix;

[0019] S15, traversing each grid cell in the spot envelope matrix, and if the current grid cell position overlaps with the spot vector graphic, determining that the grid cell is within the range of the spot vector graphic;

[0020] S16, the set U of the grid cells within the range of the spot vector graphic A , which is determined to be the range of the rasterized image patch.

[0021] In some implementations, in S13, if the number of rows or columns of the matrix is ​​not an integer, it is rounded up.

[0022] In some embodiments, in S2, the process of dividing the edge grid and the non-edge grid includes: traversing and calculating each grid cell in the gridded pattern, and determining whether there is at least one grid cell adjacent to the current grid cell that does not belong to the set U. A If yes, it is classified as an edge grid, if not, it is classified as a non-edge grid.

[0023] In some embodiments, in S2, the method for setting the number of cycles includes:

[0024]

[0025] Where T is the number of cycles, n A is the total number of grid cells, n E is the number of edge grids. If the number of cycles T is not an integer, it is rounded up.

[0026] In some embodiments, in S2, a matrix B for calculation is generated according to the pattern envelope matrix A, and the cell values ​​of the matrix B are initialized to 0.

[0027] In some embodiments, in S2, the cell values ​​of all the edge grids are increased by 1 in each cycle; the distance parameter d is set, and with the current grid cell as the center, the non-edge grids adjacent to the current grid cell and whose adjacent distance is within the distance parameter d are included in the apportionment range and evenly apportioned.

[0028] In some embodiments, in S2, the coordinates of the current edge grid are set to (x i ,y i ), traverse the coordinates (x j ,y j ), then the distance d between any two grid cells ij Expressed as:

[0029] d ij =|x i -x j |+|y i -y j |.

[0030] In some embodiments, in S2, in each cycle, the edge grids are traversed in a random order until all the edge grids have completed one increment of the unit value, and then the next cycle is performed.

[0031] In some embodiments, in S3, the cell values ​​of all the grid cells are obtained, sorted in descending order, and a difference threshold D is set, which has the following value:

[0032]

[0033] T is the number of cycles. When the cell values ​​of two adjacent grid cells are greater than the difference threshold D, the larger grid cell value is used as the threshold F for judging the local narrow area. The grid cells with values ​​greater than the local narrow area threshold F are considered to be the grid cells corresponding to the local narrow area.

[0034] The beneficial effects of the present invention are as follows: by rasterizing the spots, the range of the spots is reflected in the form of a matrix, and the cell value data diffusion behavior of the grid cells is used to identify the shape distribution characteristics of the narrow and long spots. Finally, the range with abnormally high cell values ​​is screened out, and it is considered to be a locally narrow and long area. Spatial analysis is performed based on the area and the original vector data to locate the vector range with local narrow and long conditions, thereby avoiding the unpredictable factors brought about by the topological problems of the spot vector graphics themselves. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of a pattern vector graphic in an embodiment of the present invention;

[0036] Figure 2 Schematic diagram of a speckle envelope matrix A in an embodiment of the present invention;

[0037] Figure 3 Schematic diagram of the range of the rasterized pattern in an embodiment of the present invention;

[0038] Figure 4 is a schematic diagram of an edge grid to be identified in an embodiment of the present invention;

[0039] Figure 5 Schematic diagram of edge grid determination in an embodiment of the present invention;

[0040] Figure 6 Schematic diagram of edge grid recognition results in an embodiment of the present invention;

[0041] Figure 7 Schematic diagram of the allocation of edge grids in a non-narrow and long patch area in an embodiment of the present invention;

[0042] Figure 8 Schematic diagram of the distribution of edge grids in a narrow and long image patch area in an embodiment of the present invention;

[0043] Figure 9 Schematic diagram of the distribution of cell values ​​of grid cells with local narrow and long area spots in an embodiment of the present invention;

[0044] Figure 10 Schematic diagram of the distribution of cell values ​​of grid cells without local narrow and long area spots in an embodiment of the present invention;

[0045] Figure 11 Schematic diagram of a local narrow and long area in a rasterized pattern in an embodiment of the present invention;

[0046] Figure 12 Schematic diagram of positioning of a local narrow and long area in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] To identify narrow, elongated areas of a pattern, we need to analyze the characteristics of this type of pattern and how it differs from other patterns. While general patterns are typically distributed relatively evenly, patterns with narrow, elongated areas typically appear evenly distributed across most of the pattern, with some areas exhibiting unusually narrow, elongated, or sharp shapes.

[0048] Imagine a patch as a traversable area, with pedestrians constantly entering from outside. When a location becomes crowded, people will move toward a location with lower density within a certain distance. In locations with evenly distributed patches, the space is relatively open, offering more directions for movement, resulting in relatively high mobility efficiency and a relatively even distribution of pedestrians. However, in narrow, elongated areas, pedestrians are forced to pass through one by one, significantly reducing mobility efficiency and leading to a more concentrated distribution of pedestrians.

[0049] Based on this characteristic, areas with pedestrian density far exceeding that of other locations can be considered to have local narrow areas. To transform this idea into a quantitative and executable method, this paper rasterizes the image patches, representing the patch range in matrix form, with the grid cell value representing the number of people within the corresponding range. By simulating the increase, decrease, and movement of pedestrians through the changes in the grid cell values, this paper ultimately selects areas with abnormally high grid cell values ​​and identifies them as areas with local narrow areas. Spatial analysis is then performed based on this area and the original vector data to locate the vector range where the local narrow areas exist.

[0050] To make the objectives, technical solutions, and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all of the present invention.

[0051] This embodiment proposes a method for identifying and locating local narrow and long areas of a patch. The patch is rasterized to represent the patch range in matrix form, and the cell value data diffusion behavior of the grid cells is used to identify the shape distribution characteristics of the narrow and long patches. Finally, the range with abnormally high cell values ​​is screened out and considered to be the area with local narrow and long areas. Spatial analysis is performed based on the area and the original vector data to locate the vector range with local narrow and long conditions, thereby avoiding the unpredictable factors caused by the topological problems of the patch vector graphics themselves.

[0052] The method comprises the following steps S1-S4:

[0053] S1, rasterizing the spot vector graphics to form a rasterized spot.

[0054] Specifically, in S1, the process of forming the rasterized pattern includes:

[0055] S11, set the grid cell side length l;

[0056] S12, calculate the envelope of the pattern vector graphics to obtain the width w and height h of the envelope; in this embodiment, Figure 1 The patch vector graphics are shown as an example.

[0057] S13, calculating the number of rows and columns of the matrix according to the side length l of the grid unit and the width w and height h of the envelope;

[0058] The details are as follows:

[0059] ①Number of rows: n h =h÷l

[0060] ②Number of columns: n w =w÷l

[0061] In S13, if the number of rows or columns of the matrix is ​​not an integer, it is rounded up.

[0062] S14, based on the number of rows and columns of the matrix, forms Figure 2 The pattern envelope matrix A shown;

[0063] S15, traversing each grid cell in the spot envelope matrix, and if the current grid cell position overlaps with the spot vector graphic, then the grid cell is determined to be within the range of the spot vector graphic;

[0064] S16, for the set U of grid cells within the range of the patch vector graphics A , is identified as the range of the rasterized image patch. The range of the rasterized image patch is as follows Figure 3 shown.

[0065] S2, initializes the cell values ​​of all grid cells in the rasterized pattern, divides the rasterized pattern into edge grids and non-edge grids, and enters a loop. Each loop increases the same cell value for all edge grids, and distributes the cell value of the edge grid to the adjacent non-edge grids until the preset number of loops is reached.

[0066] In S2, the following steps S21-S23 are also included:

[0067] S21: The division process of edge grid and non-edge grid includes: traversing and calculating each grid cell in the gridded patch, judging whether there is at least one grid cell that does not belong to the set U in the four adjacent grid cells of the current grid cell. A If yes, it is classified as an edge grid, if not, it is classified as a non-edge grid. In S21, it is mainly used to judge edge grids and non-edge grids. For all grid cells, it is necessary to traverse the grid cells, such as those in the set U A If it is within the range, proceed to the next step, otherwise skip it, thereby eliminating the grid cells that do not belong to the rasterized pattern.

[0068] Figure 4 The edge grid to be identified in S21 is shown. During the identification process, for the current grid cell, the grid cells in the four directions of above, below, left and right are located in the set U A If it is outside the grid, it is considered to be an edge grid, such as Figure 5 As shown, for the grid cell (B, 2), the grid cells (A, 2) and (B, 3) located on its left and above are located at U A If the grid cell is outside the range, it is considered to be an edge grid cell. The final edge grid recognition result is as follows Figure 6 shown.

[0069] S22: The method for setting the number of cycles includes:

[0070]

[0071] Where T is the number of cycles, n A is the total number of grid cells, n E is the number of edge grids. If the number of cycles T is not an integer, it is rounded up. The more cycles, the better the final recognition effect.

[0072] S21: Generate a matrix B for calculation according to the pattern envelope matrix A, and initialize all cell values ​​of the matrix B to 0.

[0073] In order to reduce the tendency of calculation results to a certain direction due to the sequential traversal of grid cells, the edge grids are traversed in a random order in each cycle until all edge grids have completed one cell value increment before the next cycle is carried out.

[0074] Each cycle increases the cell value of all edge grids by 1; set the distance parameter d, take the current grid cell as the center, and include the non-edge grids adjacent to the current grid cell and within the distance parameter d into the apportionment range for even distribution.

[0075] Let the coordinates of the current edge grid be (x i ,y i ), and then traverse the coordinates of other non-edge grids (x j ,y j ), then the distance d between any two grid cells ij Expressed as:

[0076] d ij =|x i -x j |+|y i -y j |.

[0077] The more spacious the current edge grid is, the larger the apportionment range will be, and vice versa. Figure 7 As shown, the current edge grid has two adjacent grids, so according to the above distance parameter d, it can share the unit value to 6 grids in total, and as Figure 8 As shown in the figure, if there is only one adjacent grid, the cell value can only be shared between two grids. Obviously, for a local narrow area, the cell value around it will inevitably be higher than the cell value in other areas of the entire gridded image after multiple cycles.

[0078] For the current edge grid (x i ,y i ), within its apportionment range, if there is a non-edge grid whose value is less than 1, a random one (x j ,y j ), the current edge grid cell (x i ,y i ) is reduced by 1, and the non-edge grid (x j ,y j ) increases by 1.

[0079] S3, screening out the range of grid cells in the rasterized image patch whose cell values ​​are higher than the threshold, and identifying them as local narrow and long areas.

[0080] After calculating the cell values ​​of the rasterized patch, the cell values ​​of the rasterized patch are gradually accumulated from the edge, and the values ​​are gradually distributed to the empty positions inside through the grid cell value distribution.

[0081] As the number of cycles increases, the cell values ​​of the rasterized spots become more evenly distributed and lower for locations that are evenly distributed within the spot range; the cell values ​​of locations with sharp and narrow shapes within the spot range are relatively concentrated and higher; and the cell values ​​of locations with local narrow and long shapes within the spot range are much higher than those of other locations.

[0082] Based on this feature, the present invention traverses the grid cells within the range of the gridded image, obtains their cell values, and groups the grid cells with the same cell values ​​into a group based on the cell values, and analyzes the distribution of the grid cell values. Figure 9 For the cell values ​​of the grid cells with local narrow and long area patches, when the grid cell values ​​of the patches containing local narrow and long areas are arranged from small to large, the grid cell values ​​will rise slowly at first, rise suddenly and rapidly at a certain position, and then tend to be smooth again. Figure 10 For the cell values ​​of grid cells that do not have local narrow and long area patches, there is no mutation.

[0083] Therefore, based on this feature, in S3, the cell values ​​of all grid cells are obtained, sorted in descending order, and the difference threshold D is set, and the value is as follows:

[0084]

[0085] T is the number of cycles. When the cell values ​​of two adjacent grid cells are greater than the difference threshold D, the larger grid cell value is used as the threshold F for judging the local narrow area. The grid cells with values ​​greater than the local narrow area threshold F are considered to be the grid cells corresponding to the local narrow area.

[0086] According to the above setting method of the difference threshold D, the grid cells that have been determined to be locally narrow and long are assigned a value of 2, and the others are assigned a value of 1. The color of the area with a larger cell value is artificially darkened (according to the technician's own choice, or it is possible to use direct digital comparison without using a visual method). Finally, the darker part is the local narrow and long area, such as Figure 11 shown.

[0087] S4, and perform spatial analysis based on the local narrow and long area and the original vector data to locate the vector range where the local narrow and long situation exists.

[0088] Finally, according to the judgment result of S3, the local narrow and long area is extracted and converted into a vector graphic, and located in the narrow and long area in the patch vector graphic, such as Figure 12 shown.

[0089] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made based on the essence of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A method for identifying and locating a local narrow area of ​​a pattern, characterized in that: The following steps are involved: S1, rasterizing the pattern vector graphics to form a rasterized pattern; the formation process of the rasterized pattern includes: S11, setting the side length of the grid unit; S12, calculating the envelope of the pattern vector graphics to obtain the width and height of the envelope; S13, calculating the number of rows and columns of the matrix based on the side length of the grid unit and the width and height of the envelope; S14, forming a pattern envelope matrix based on the number of rows and columns of the matrix ; S15, traverse each grid cell in the pattern envelope matrix, if the current grid cell position overlaps with the pattern vector graphic, then it is determined that the grid cell is within the range of the pattern vector graphic; S16, for the set of grid cells within the range of the pattern vector graphic , identified as the range of the rasterized image patch; S2, initialize the cell values ​​of all grid cells in the rasterized pattern, divide the rasterized pattern into edge grids and non-edge grids, enter a loop, each loop increases the same cell value for all edge grids, and distributes the cell value of the edge grid to the adjacent non-edge grids until a preset number of loops is reached; the division process of the edge grid and the non-edge grid includes: traversing and calculating each of the grid cells in the rasterized pattern, judging whether there is at least one grid cell that does not belong to the set among the four adjacent grid cells of the current grid cell , if yes, it is divided into edge grid, if no, it is divided into non-edge grid; S3, filter out the range of grid cells in the gridded image with cell values ​​higher than the threshold, and identify them as local narrow areas; obtain the cell values ​​of all the grid cells, sort them in descending order, and set the difference threshold , the values ​​are as follows: is the number of cycles, when the cell values ​​of two adjacent grid cells are greater than the difference threshold When , the larger grid cell value is used as the threshold F for judging the local narrow and long area, and the grid cells with values ​​greater than the local narrow and long area threshold F are considered to be the local narrow and long area; S4, performing spatial analysis based on the local narrow and long area and the original vector data to locate the vector range where the local narrow and long situation exists.

2. The method for identifying and locating a local narrow area of ​​a pattern according to claim 1, wherein: In S13, if the number of rows or columns of the matrix is ​​not an integer, it is rounded up.

3. The method for identifying and locating a local narrow area of ​​a pattern according to claim 1, wherein: In S2, the method for setting the number of cycles includes: Where, is the number of cycles, is the total number of grid cells, is the number of edge grids, if the number of cycles If it is not an integer, round it up.

4. The method for identifying and locating a local narrow area of ​​a pattern according to claim 1, wherein: In S2, according to the pattern envelope matrix Generate matrices for calculations , the matrix The cell values ​​are all initialized to 0.

5. The method for identifying and locating a local narrow area of ​​a pattern according to claim 1, wherein: In S2, each cycle increases the cell value of all edge grids by 1; set the distance parameter , with the current grid cell as the center, it will be adjacent to the current grid cell, and the adjacent distance is within the distance parameter The non-edge grids within the range are included in the apportionment range and evenly apportioned.

6. The method for identifying and locating a local narrow area of ​​a pattern according to claim 5, wherein: In S2, let the current coordinates of the edge grid be , traverse the coordinates of the other non-edge grids in turn , then the distance between any two grid cells is Expressed as: 。 7. The method for identifying and locating a local narrow area of ​​a pattern according to claim 5, wherein: In S2, in each cycle, the edge grids are traversed in a random order until all the edge grids have completed one increment of the unit value, and then the next cycle is carried out.

Citation Information

Patent Citations

  • Long and narrow map spot partitioning and melting method and device

    CN109636870A

  • Pattern spot map symbol filling method and device, computer device and storage medium

    CN109816749A