A method, device, equipment, medium and product for identifying a local narrow or narrow area of a map spot

By calculating the minimum perpendicular bisector distance of the boundary of a land parcel and the minimum angle bisector distance of its vertex, and combining this with a preset threshold, it is determined whether the land parcel has a narrow or elongated region. This solves the problems of low recognition efficiency and insufficient accuracy in existing technologies, achieving efficient and accurate land parcel recognition and improving the quality of land use classification.

CN122265369APending Publication Date: 2026-06-23GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
Filing Date
2026-02-09
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently identify and accurately determine narrow or elongated areas in land use vector maps, leading to a decline in the quality of database outputs and inaccurate subsequent data applications.

Method used

By calculating the minimum perpendicular bisector distance of the boundary of a patch and the minimum angle bisector distance of its vertex, and combining this with a preset threshold, a method is provided to identify whether a patch has a narrow or elongated region.

Benefits of technology

It improves the efficiency and accuracy of identifying narrow or elongated areas of map patches, and enhances the accuracy and rationality of land use status classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265369A_ABST
    Figure CN122265369A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, medium, and product for identifying locally elongated or narrow regions of a map patch. The method includes: acquiring a sequence of boundary coordinate points of the map patch to be identified; based on the boundary coordinate point sequence, traversing all edges of the map patch to be identified and calculating the minimum perpendicular bisector distance of each edge; based on the boundary coordinate point sequence, traversing all vertices of the map patch to be identified and calculating the minimum angle bisector distance of each vertex; determining whether the map patch to be identified is locally elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and outputting the determination result. This invention can effectively improve the efficiency and accuracy of identifying locally elongated or narrow regions of a map patch, thereby improving the accuracy and rationality of land use status classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mapmaking technology, and in particular to a method, apparatus, equipment, medium, and product for identifying elongated or narrow areas of a map patch. Background Technology

[0002] In the fields of natural resource management and territorial spatial planning, basic geographic information such as land cover and land use patterns is mainly displayed and managed through land use vector maps. During actual surveys and database construction, due to data collection errors, manual drawing errors, or batch erasure, cropping, segmentation, and merging of data, some vector maps may have elongated or narrow areas. These problems can seriously affect the quality of database results and the application of subsequent data results. They can be identified manually, but this is inefficient and prone to misjudgment. Therefore, the ability to quickly and easily identify local elongated or narrow areas of land use vector maps is of great significance for the refinement of territorial spatial governance.

[0003] In existing research, scholars at home and abroad have used the Delaunay triangulation overlay centerline fusion method for identification. However, this method is not sensitive enough to complex, narrow or elongated regions and has high algorithm complexity. Other scholars have used methods such as area-to-perimeter ratio, negative buffering to compare the theoretical difference in perimeter of the graphic before and after, and grid cell assignment diffusion for identification. However, these methods are not sensitive to narrow or elongated regions that are concave inward and may miss some identifications. Summary of the Invention

[0004] This invention provides a method for identifying elongated or narrow areas in localized areas of a map patch, which can effectively improve the efficiency and accuracy of identifying elongated or narrow areas in localized areas of a map patch, thereby improving the accuracy and rationality of land use status classification.

[0005] In a first aspect, embodiments of the present invention provide a method for identifying locally elongated or narrow regions of a patch, comprising: Obtain the sequence of boundary coordinate points of the patch to be identified; Based on the boundary coordinate point sequence, traverse all edges of the patch to be identified and calculate the minimum perpendicular bisector distance for each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. Based on the boundary coordinate point sequence, traverse all vertices of the patch to be identified and calculate the minimum angle bisector distance for each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and reverse angle bisector with the boundary of the patch to be identified. The local elongation or narrowness of the target image patch is determined based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and the determination result is output.

[0006] Furthermore, the calculation of the minimum perpendicular bisector distance for each edge includes: Extract the coordinates of the two endpoints of the target edge, and calculate the coordinates of the midpoint of the target edge based on the coordinates of the two endpoints; Calculate the direction vector perpendicular to the target edge and normalize it. Then, calculate the vertical direction vector of the target edge based on the normalized direction vector. Calculate the equation of the perpendicular bisector of the target side based on the midpoint coordinates and the vertical direction vector; Calculate the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation.

[0007] Furthermore, the step of calculating the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation includes: Calculate the intersection points of the perpendicular bisector equation with all edges of the patch to be identified except the target edge to obtain the first set of intersection points; Calculate the distance from the midpoint coordinates to each intersection point in the first set of intersection points, and take the minimum distance as the minimum perpendicular bisector distance of the target edge.

[0008] Furthermore, the calculation of the minimum angle bisector distance for each vertex includes: Extract the coordinates of the preceding and following vertices of each target vertex, and calculate the angle bisector direction vector and the angle bisector reverse vector of the target vertex; Calculate the angle bisector equation of the target vertex based on the angle bisector direction vector, and calculate the reverse angle bisector equation of the target vertex based on the angle bisector reverse vector. Calculate the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation.

[0009] Furthermore, the step of calculating the minimum angle bisector distance of the target vertex based on the angle bisector equation and the reverse angle bisector equation includes: Calculate the intersection points of the angle bisector equation and the reverse angle bisector equation with all edges of the patch to be identified, respectively, and remove the target vertex from all intersection points to obtain the second set of intersection points; Calculate the distance from the target vertex to each intersection point in the second set of intersection points, and take the minimum distance as the minimum angle bisector distance of the target vertex.

[0010] Furthermore, the step of determining the local elongation or narrowness of the patch to be identified based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and obtaining the determination result, includes: Pre-set the distance thresholds for the perpendicular bisector and the angle bisector; The minimum perpendicular bisector distance and the minimum angle bisector distance are compared with the perpendicular bisector distance threshold and the angle bisector distance threshold, respectively. If either distance is less than the corresponding threshold, it is determined that there is a local elongated or narrow region.

[0011] Secondly, embodiments of the present invention provide a device for identifying locally elongated or narrow regions of a patch, comprising: The data preparation module is used to obtain the sequence of boundary coordinate points of the patch to be identified; The first calculation module is used to traverse all edges of the patch to be identified based on the boundary coordinate point sequence and calculate the minimum perpendicular bisector distance of each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. The second calculation module is used to traverse all vertices of the patch to be identified based on the boundary coordinate point sequence, and calculate the minimum angle bisector distance of each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and reverse angle bisector with the boundary of the patch to be identified; The elongated or narrow determination module is used to determine whether the patch to be identified is elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and output the determination result.

[0012] Thirdly, embodiments of the present invention provide an electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program; Wherein, when the processor executes the computer program, it implements the method for identifying locally elongated or narrow regions of a patch as described in any of the first aspects above.

[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed, implements the method for identifying locally elongated or narrow regions of a patch as described in any of the first aspects above.

[0014] Fifthly, embodiments of the present invention provide a computer program product, including computer instructions, which, when executed by a processor, implement the method for identifying locally elongated or narrow regions of a patch as described in any of the first aspects above.

[0015] Compared with existing technologies, the present invention provides a method for identifying locally elongated or narrow regions of a map patch. Its advantages include: obtaining a sequence of boundary coordinate points of the map patch to be identified; based on the boundary coordinate point sequence, traversing all edges of the map patch to be identified and calculating the minimum perpendicular bisector distance for each edge; wherein the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of that edge with the boundary of the map patch to be identified; based on the boundary coordinate point sequence, traversing all vertices of the map patch to be identified and calculating the minimum angle bisector distance for each vertex; wherein the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and its reverse angle bisector with the boundary of the map patch to be identified; determining whether the map patch to be identified is locally elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and outputting the determination result. This invention can effectively improve the efficiency and accuracy of identifying locally elongated or narrow regions of a map patch, thereby improving the accuracy and rationality of land use status classification. Attached Figure Description

[0016] To more clearly illustrate the technical features of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating a method for identifying locally elongated or narrow regions of a patch according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a narrow or elongated region in a method for identifying a local narrow or elongated region of a patch provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the first recognition result of a method for recognizing locally elongated or narrow regions of a patch provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the second recognition result of a method for recognizing locally elongated or narrow regions of a patch provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the third recognition result of a method for recognizing locally elongated or narrow regions of a patch provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a device for identifying a localized narrow or elongated area of ​​a patch, provided in an embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0021] The accuracy and rationality of land use vector maps are crucial for the construction of land use databases. When land use vector maps contain localized narrow or elongated areas, it can affect the accuracy and rationality of land use status classification, increase data processing complexity, and impact subsequent land resource management. Therefore, efficient and accurate data analysis methods are needed to identify localized narrow or elongated areas.

[0022] In a first aspect, embodiments of the present invention provide a method for identifying locally elongated or narrow regions of a patch, see [link to previous section]. Figure 1 This is a flowchart illustrating an embodiment of a method for identifying locally elongated or narrow regions of a patch provided by the present invention.

[0023] like Figure 1 As shown, the method includes the following steps: S1: Obtain the sequence of boundary coordinate points of the patch to be identified; S2: Based on the boundary coordinate point sequence, traverse all edges of the patch to be identified and calculate the minimum perpendicular bisector distance for each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. S3: Based on the boundary coordinate point sequence, traverse all vertices of the patch to be identified and calculate the minimum angle bisector distance for each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection of its angle bisector and the reverse angle bisector with other points on the boundary of the patch to be identified; S4: Determine whether the patch to be identified is locally elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and output the determination result.

[0024] For example, see Figure 2 As shown, there are two situations in the local narrow and elongated region, one of which is as follows: Figure 2 (a) shows the location inside the vector patch; another type is as shown in the image. Figure 2 (b) shows a narrow local area located outside the vector graphic patch, as shown in the image. Figure 2 As shown in (c).

[0025] In the specific implementation, step S1 uses professional geographic information processing tools to read the map patch data to be identified, parses and extracts the ordered coordinate points of its boundary, verifies the closure of the coordinate point sequence (if the first and last ends do not coincide, they are automatically supplemented to coincide), and finally obtains the boundary coordinate point sequence that can be used for subsequent calculations.

[0026] Based on the boundary coordinate point sequence obtained from S1, each edge is traversed sequentially, and the minimum perpendicular bisector distance of each edge is calculated. The minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. The distance calculation can use Euclidean distance, or other distance calculation methods can be used according to the actual application scenario and business requirements.

[0027] Based on the boundary coordinate point sequence obtained from S1, each vertex is traversed sequentially, and the minimum angle bisector distance of each vertex is calculated. The minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and the reverse angle bisector with other points of the boundary of the patch to be identified.

[0028] Step S4 compares the obtained distance data with the preset distance threshold to determine whether the minimum distance corresponding to the edge or vertex of the image satisfies the "long / narrow" condition. Finally, it outputs structured data and visualization charts containing the judgment conclusion and the location information of the long / narrow area.

[0029] For example, see Figure 3 , Figure 4 and Figure 5 As shown, the image patches are identified using the method for identifying locally elongated or narrow regions according to the present invention. Figure 2 (a) Figure 2 (b) and Figure 2 (c) is a schematic diagram of the recognition results output after identifying the patches. Figure 2 (a) Calculating the edge of the lower right corner of the patch, it was found that the distance from the midpoint (yellow dot) to the opposite edge of the patch by the perpendicular line (green dashed line) is less than a preset threshold. Therefore, the area containing this edge is determined to be locally narrow and elongated. This is further investigated by... Figure 2(b) Calculating the perpendicular bisector of the upper edge of the patch reveals that the green dashed line extends from the midpoint of the yellow area and intersects the opposite edge at the indentation inside the patch. The distance is less than a preset threshold, indicating that the area containing this edge is locally elongated. Further analysis... Figure 2 (c) Calculate the vertex at the bottom of the patch and find that its angle bisector (green dashed line) starts from the vertex and quickly intersects the opposite side of the patch. The distance of the minimum angle bisector is less than the threshold, so the area where the vertex is located is determined to be locally narrow.

[0030] In summary, this invention measures the distance between the minimum perpendicular bisector of the edge and the minimum angle bisector of the vertex in a dual-dimensional manner, while simultaneously covering both elongated bands convex outwards and narrow gaps concave inwards in a patch. This allows for accurate identification of both elongated or narrow regions located inside and outside the patch. The identification results are simple and intuitive, improving the efficiency of identifying elongated or narrow regions in localized areas of a patch.

[0031] In one optional implementation, calculating the minimum perpendicular bisector distance for each edge includes: Extract the coordinates of the two endpoints of the target edge, and calculate the coordinates of the midpoint of the target edge based on the coordinates of the two endpoints; Calculate the direction vector perpendicular to the target edge and normalize it. Then, calculate the vertical direction vector of the target edge based on the normalized direction vector. Calculate the equation of the perpendicular bisector of the target side based on the midpoint coordinates and the vertical direction vector; Calculate the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation.

[0032] Specifically, based on the acquired sequence of boundary coordinate points of the target patch to be identified, the current target edge to be calculated is determined by traversing the map. Then, based on the two endpoints of the target edge... and Given the coordinates, calculate the midpoint of the target edge. Coordinates, calculated using the following formula: ; Furthermore, the original direction vector of the target edge is calculated, with the endpoints of the target edge as the reference point. Starting point Construct the original direction vector of the target edge with the endpoint as the endpoint. The calculation formula is: ; To eliminate the interference of the target edge length on subsequent direction calculations, the direction vector of the target edge is... After normalization, the normalized edge vectors are obtained: ; in, For vectors The length of the module.

[0033] The perpendicular direction vector of the target edge is calculated based on the normalized direction vector. The calculation formula is as follows: or ; in, For vectors Components on the x-axis For vectors The component on the y-axis.

[0034] Furthermore, the minimum bounding rectangle of the patch to be identified is calculated, and the length and width of this rectangle are extracted. The maximum value of the two is taken as the maximum side length of the minimum bounding rectangle. The side length It can intuitively reflect the overall scale of the map feature. Using this as a benchmark, the extension length of the perpendicular bisector can be set to ensure that the extended perpendicular bisector covers the entire map feature. The extension length of the perpendicular bisector of the target edge can then be set. This length is twice the maximum scale of the patch, ensuring that the perpendicular bisector not only penetrates the patch but also extends a certain distance beyond it. This avoids the problem of insufficient extension preventing it from intersecting with other parts of the patch boundary. The calculated midpoint M... i Starting from the vertical direction vector, construct the equation of the perpendicular bisector of the target edge: ; Finally, the minimum perpendicular bisector distance of the target side is calculated based on the perpendicular bisector equation.

[0035] This embodiment calculates the minimum perpendicular bisector distance of a single target edge. After traversing all edges of the patch, the minimum perpendicular bisector distance for each edge can be obtained, providing core data support for the subsequent determination of local narrow and elongated regions.

[0036] In one optional implementation, calculating the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation includes: Calculate the intersection points of the perpendicular bisector equation with all edges of the patch to be identified except the target edge to obtain the first set of intersection points; Calculate the distance from the midpoint coordinates to each intersection point in the first set of intersection points, and take the minimum distance as the minimum perpendicular bisector distance of the target edge.

[0037] Specifically, the intersection points of the perpendicular bisector equation with all edges of the boundary of the patch to be identified are calculated. It should be noted that the target edge itself needs to be excluded here to avoid misjudging the endpoints of the target edge as valid intersection points. Finally, the first set of intersection points is obtained. For each intersection point in the first set of intersection points, the distance from the midpoint to each intersection point is calculated, and the minimum value is taken as the minimum perpendicular bisector distance of the current target edge.

[0038] In one optional implementation, calculating the minimum angle bisector distance for each vertex includes: Extract the coordinates of the preceding and following vertices of each target vertex, and calculate the angle bisector direction vector and the angle bisector reverse vector of the target vertex; Calculate the angle bisector equation of the target vertex based on the angle bisector direction vector, and calculate the reverse angle bisector equation of the target vertex based on the angle bisector reverse vector. Calculate the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation.

[0039] Specifically, based on the acquired sequence of coordinate points of the closed boundary of the patch to be identified, the target vertex to be calculated is determined by traversing the map. Extract the previous order vertices of each target vertex. and postorder vertices The coordinates of the points are used to construct a pointer to the vertex. Two edge vectors: ; ; Normalizing the two edge vectors above, we get: ; ; Calculate the angle bisector direction vector and the reverse angle bisector direction vector. According to the principle of vector superposition, the sum of the two normalized adjacent edge vectors is the angle bisector direction vector of the interior angle of the target vertex, denoted as . The calculation formula is: ; It should be noted that when the target vertex is a convex vertex (internal angle < 180°), the angle bisector direction vector... Pointing towards the interior of the feature, when the target vertex is a concave vertex (interior angle > 180°), the direction vector of the angle bisector. It will point outwards from the patch and cannot cover the narrow area concave towards the opening. Therefore, to achieve full scene coverage, the reverse vector of the angle bisector needs to be calculated simultaneously, denoted as... The calculation formula is: ; Furthermore, the minimum bounding rectangle of the patch to be identified is calculated, and the length and width of this rectangle are extracted. The maximum value of the two is taken as the maximum side length of the minimum bounding rectangle. Set the extension length of the angle bisector of the target vertex. , with target vertex Starting from the angle bisector direction vector, respectively and the direction vector of the angle bisector of the opposite direction To extend the direction, construct the parametric equations of the two angle bisectors, with the following expressions: ; ; Finally, the minimum angle bisector distance to the target vertex is calculated based on the angle bisector equation and the reverse angle bisector equation.

[0040] This embodiment calculates the minimum angle bisector distance of a single target vertex. After traversing all vertices of the patch, the minimum angle bisector distance corresponding to each vertex can be obtained, providing key data support for the subsequent comprehensive determination of local narrow areas.

[0041] In one optional implementation, calculating the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation includes: Calculate the intersection points of the angle bisector equation and the reverse angle bisector equation with all edges of the patch to be identified, respectively, and remove the target vertex from all intersection points to obtain the second set of intersection points; Calculate the distance from the target vertex to each intersection point in the second set of intersection points, and take the minimum distance as the minimum angle bisector distance of the target vertex.

[0042] Specifically, the intersection points of the angle bisector equation and the reverse angle bisector equation with all edges of the patch to be identified are calculated separately. The target vertex itself is removed from all intersection points to ensure that all intersection points in the set are valid intersection points of the angle bisector and the non-adjacent part of the patch boundary. Finally, a second set of intersection points is obtained. For each intersection point in the filtered second set of intersection points, its distance to the target vertex is calculated, and the minimum value is taken as the minimum angle bisector distance of the current target vertex.

[0043] In one optional implementation, the step of determining the local elongation or narrowness of the patch to be identified based on the minimum perpendicular bisector distance and the minimum angle bisector distance to obtain a determination result includes: Pre-set the distance thresholds for the perpendicular bisector and the angle bisector; The minimum perpendicular bisector distance and the minimum angle bisector distance are compared with the perpendicular bisector distance threshold and the angle bisector distance threshold, respectively. If either distance is less than the corresponding threshold, it is determined that there is a local elongated or narrow region.

[0044] Specifically, a threshold for the distance to the perpendicular bisector and a threshold for the distance to the angle bisector are preset. The minimum distance to the perpendicular bisector and the minimum distance to the angle bisector are compared with the thresholds for the distance to the perpendicular bisector and the distance to the angle bisector, respectively. If any distance is less than the corresponding threshold, it is determined that there is a local elongated or narrow area. Subsequently, through manual review, combined with professional knowledge and business scenarios, it is accurately determined whether it is an elongated or narrow type.

[0045] This embodiment, based on the calculated minimum perpendicular bisector distance of each side and the minimum angle bisector distance of each vertex, achieves accurate positioning and result output of the local narrow or elongated area of ​​the image patch to be identified by setting a reasonable threshold and making a comparison judgment.

[0046] Secondly, embodiments of the present invention provide a device for identifying locally elongated or narrow regions of a patch, see [link to relevant documentation]. Figure 6 This is a schematic diagram of an embodiment of a device for identifying locally elongated or narrow areas of a pattern provided by the present invention.

[0047] like Figure 6 As shown, the device includes: Data preparation module 21 is used to obtain the sequence of boundary coordinate points of the patch to be identified; The first calculation module 22 is used to traverse all edges of the patch to be identified based on the boundary coordinate point sequence and calculate the minimum perpendicular bisector distance of each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. The second calculation module 23 is used to traverse all vertices of the patch to be identified based on the boundary coordinate point sequence and calculate the minimum angle bisector distance of each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and reverse angle bisector with the boundary of the patch to be identified. The elongated or narrow determination module 24 is used to determine whether the patch to be identified is elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and output the determination result.

[0048] In one optional implementation, calculating the minimum perpendicular bisector distance for each edge includes: Extract the coordinates of the two endpoints of the target edge, and calculate the coordinates of the midpoint of the target edge based on the coordinates of the two endpoints; Calculate the direction vector perpendicular to the target edge and normalize it. Then, calculate the vertical direction vector of the target edge based on the normalized direction vector. Calculate the equation of the perpendicular bisector of the target side based on the midpoint coordinates and the vertical direction vector; Calculate the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation.

[0049] In one optional implementation, calculating the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation includes: Calculate the intersection points of the perpendicular bisector equation with all edges of the patch to be identified except the target edge to obtain the first set of intersection points; Calculate the distance from the midpoint coordinates to each intersection point in the first set of intersection points, and take the minimum distance as the minimum perpendicular bisector distance of the target edge.

[0050] In one optional implementation, calculating the minimum angle bisector distance for each vertex includes: Extract the coordinates of the preceding and following vertices of each target vertex, and calculate the angle bisector direction vector and the angle bisector reverse vector of the target vertex; Calculate the angle bisector equation of the target vertex based on the angle bisector direction vector, and calculate the reverse angle bisector equation of the target vertex based on the angle bisector reverse vector. Calculate the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation.

[0051] In one optional implementation, calculating the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation includes: Calculate the intersection points of the angle bisector equation and the reverse angle bisector equation with all edges of the patch to be identified, respectively, and remove the target vertex from all intersection points to obtain the second set of intersection points; Calculate the distance from the target vertex to each intersection point in the second set of intersection points, and take the minimum distance as the minimum angle bisector distance of the target vertex.

[0052] In one optional implementation, the step of determining the local elongation or narrowness of the patch to be identified based on the minimum perpendicular bisector distance and the minimum angle bisector distance to obtain a determination result includes: Pre-set the distance thresholds for the perpendicular bisector and the angle bisector; The minimum perpendicular bisector distance and the minimum angle bisector distance are compared with the perpendicular bisector distance threshold and the angle bisector distance threshold, respectively. If either distance is less than the corresponding threshold, it is determined that there is a local elongated or narrow region.

[0053] It should be noted that the identification device for a local elongated or narrow area of ​​a patch provided in the embodiments of the present invention is used to execute all the process steps of the identification method for a local elongated or narrow area of ​​a patch in the above embodiments. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0054] Thirdly, embodiments of the present invention provide an electronic device, see [link to previous document]. Figure 7 The diagram shown is a structural schematic of an electronic device provided in an embodiment of the present invention.

[0055] like Figure 7 As shown, the device includes: Memory 31 is used to store computer programs; Processor 32 is used to execute the computer program; When the processor 32 executes the computer program, it implements the method for identifying local elongated or narrow regions of a patch as described in any of the above embodiments.

[0056] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0057] The processor 32 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0058] The memory 31 can be used to store the computer programs and / or modules. The processor 32 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 31 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0059] It should be noted that the aforementioned electronic devices include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 7 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device. It may include more components than shown in the diagram, or combine certain components, or use different components.

[0060] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed, implements the method for identifying locally elongated or narrow regions of a patch as described in any of the above embodiments.

[0061] It should be understood that all or part of the processes in the above-described method for identifying locally elongated or narrow regions of an image patch can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-described method for identifying locally elongated or narrow regions of an image patch. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0062] Fifthly, embodiments of this application also provide a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method for identifying locally elongated or narrow regions of a patch as described in any of the above embodiments.

[0063] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. It should be noted that, for those skilled in the art, several equivalent obvious modifications and / or equivalent substitutions can be made without departing from the technical principles of the present invention, and these obvious modifications and / or equivalent substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A method for identifying locally elongated or narrow regions of a map, characterized in that, include: Obtain the sequence of boundary coordinate points of the patch to be identified; Based on the boundary coordinate point sequence, traverse all edges of the patch to be identified and calculate the minimum perpendicular bisector distance for each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. Based on the boundary coordinate point sequence, traverse all vertices of the patch to be identified and calculate the minimum angle bisector distance for each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and reverse angle bisector with the boundary of the patch to be identified. The local elongation or narrowness of the target image patch is determined based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and the determination result is output.

2. The method for identifying locally elongated or narrow regions of a patch as described in claim 1, characterized in that, The calculation of the minimum perpendicular bisector distance for each edge includes: Extract the coordinates of the two endpoints of the target edge, and calculate the coordinates of the midpoint of the target edge based on the coordinates of the two endpoints; Calculate the direction vector perpendicular to the target edge and normalize it. Then, calculate the vertical direction vector of the target edge based on the normalized direction vector. Calculate the equation of the perpendicular bisector of the target side based on the midpoint coordinates and the vertical direction vector; Calculate the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation.

3. The method for identifying locally elongated or narrow regions of a patch as described in claim 2, characterized in that, The step of calculating the minimum perpendicular bisector distance of the target side based on the perpendicular bisector equation includes: Calculate the intersection points of the perpendicular bisector equation with all edges of the patch to be identified except the target edge to obtain the first set of intersection points; Calculate the distance from the midpoint coordinates to each intersection point in the first set of intersection points, and take the minimum distance as the minimum perpendicular bisector distance of the target edge.

4. The method for identifying locally elongated or narrow regions of a patch as described in claim 1, characterized in that, The calculation of the minimum angle bisector distance for each vertex includes: Extract the coordinates of the preceding and following vertices of each target vertex, and calculate the angle bisector direction vector and the angle bisector reverse vector of the target vertex; Calculate the angle bisector equation of the target vertex based on the angle bisector direction vector, and calculate the reverse angle bisector equation of the target vertex based on the angle bisector reverse vector. Calculate the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation.

5. The method for identifying locally elongated or narrow regions of a patch as described in claim 4, characterized in that, The step of calculating the minimum angle bisector distance to the target vertex based on the angle bisector equation and the reverse angle bisector equation includes: Calculate the intersection points of the angle bisector equation and the reverse angle bisector equation with all edges of the patch to be identified, respectively, and remove the target vertex from all intersection points to obtain the second set of intersection points; Calculate the distance from the target vertex to each intersection point in the second set of intersection points, and take the minimum distance as the minimum angle bisector distance of the target vertex.

6. The method for identifying locally elongated or narrow regions of a patch as described in claim 1, characterized in that, The step of determining the local elongation or narrowness of the patch to be identified based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and obtaining the determination result, includes: Pre-set the distance thresholds for the perpendicular bisector and the angle bisector; The minimum perpendicular bisector distance and the minimum angle bisector distance are compared with the perpendicular bisector distance threshold and the angle bisector distance threshold, respectively. If either distance is less than the corresponding threshold, it is determined that there is a local elongated or narrow region.

7. A device for identifying a locally elongated or narrow area of ​​a patch, characterized in that, include: The data preparation module is used to obtain the sequence of boundary coordinate points of the patch to be identified; The first calculation module is used to traverse all edges of the patch to be identified based on the boundary coordinate point sequence and calculate the minimum perpendicular bisector distance of each edge; wherein, the minimum perpendicular bisector distance refers to the shortest distance from the midpoint of the edge to the intersection point of the perpendicular bisector of the edge and the boundary of the patch to be identified. The second calculation module is used to traverse all vertices of the patch to be identified based on the boundary coordinate point sequence, and calculate the minimum angle bisector distance of each vertex; wherein, the minimum angle bisector distance refers to the shortest distance from the vertex to the intersection point of its angle bisector and reverse angle bisector with the boundary of the patch to be identified; The elongated or narrow determination module is used to determine whether the patch to be identified is elongated or narrow based on the minimum perpendicular bisector distance and the minimum angle bisector distance, and output the determination result.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program; The processor, when executing the computer program, implements the method for identifying locally elongated or narrow regions of a patch as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method for identifying locally elongated or narrow regions of a patch as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The method includes computer instructions that, when executed by a processor, implement the method for identifying locally elongated or narrow regions of a patch as described in any one of claims 1 to 6.