Method, device, medium and equipment for identifying electronic chart elements
By detecting and dividing the polygonal outer contour and inner ring of the annular object in the electronic nautical chart, splitting it into a polygon combination without inner ring, and extracting the internal pre-marked points, the problem of misidentification during annular image identification is solved, and more accurate identification point extraction is achieved.
Patent Information
- Application Number
- CN202210591346.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-05-27
AI Technical Summary
In the prior art, when marking a ring image in an electronic nautical chart, it is easy to mark an area inside the ring that does not belong to the object.
By detecting whether there is an inner ring in the polygonal outer contour of the object to be identified, and dividing it into a combination of at least two polygons, further detecting whether there is an inner ring inside the polygon, if so, repeating the division until a polygon without an inner ring is formed, and then extracting the pre-identified points inside the polygon as identification points.
It effectively avoids the pre-marked points from falling into the annular area and the area that does not belong to the object to be marked, reduces the difficulty of extracting the marking points in the annular area, and meets the electronic nautical chart marking standards.
Smart Images

Figure CN114969136B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic nautical charts, and in particular to a method, device, medium and equipment for identifying surface elements of an electronic nautical chart. Background Art
[0002] The Electronic Chart Display and Information System (ECDIS) is a crucial navigational device required for modern ship bridge systems. It provides rich and accurate environmental information for intelligent collision avoidance systems. An ideal intelligent navigation environment model should be compatible with the data structure of the electronic chart. Spatial vector data in ECDIS, which complies with the S-57 and S-101 standards, is represented using points, lines, and surfaces. This environmental information is often extremely complex, with distinct characteristics. Autonomous navigation in confined waters requires considering the diverse attributes of these various information elements and establishing an appropriate environmental model for autonomous collision avoidance and path planning.
[0003] When studying the content of Symbol drawing related to electronic nautical chart drawing in the S101 standard, the standard stipulates AreaSymbolPlacement (9-12.3.1.4). This value defines how the logo is displayed in the surface feature tracking, and this attribute can be set to two values: visibleParts and geographic. When AreaSymbolPlaceMent is set to visibleParts, it means that the feature logo should be in a representative position of the visible part of each surface. However, due to the presence of various surface graphics in electronic nautical charts, such as the waters around islands, it is in the shape of a ring. In the prior art, how to avoid marking areas inside the ring that do not belong to the object when marking such annular images is a problem that technicians in this field need to solve.
[0004] In summary, the present invention aims to provide a method for implementing the electronic nautical chart identification standard so that it is applicable to objects such as ring charts. Summary of the Invention
[0005] To address the above-mentioned deficiencies in the prior art, the present invention provides a method for identifying elements of an electronic nautical chart, comprising the following steps:
[0006] S10: providing data of an object to be identified, detecting whether the object data includes an inner ring, the object data including a polygonal outer contour of the object to be identified, and the inner ring is within the range of the polygonal outer contour;
[0007] S20: if an inner ring is detected, dividing the object data into a combination of at least two polygons according to the inner ring and the outer contour of the polygon;
[0008] S30: Detect whether there is an inner ring in the polygon. If there is an inner ring, return to step S20; if there is no inner ring, input the polygon into the polygon set;
[0009] S40: Extract several pre-identification points located inside each polygon, and the pre-identification points are used as candidate points for placing the identification of the to-be-identified object.
[0010] In one embodiment, the outer contour of the polygon and the inner ring are respectively identified and stored by several vertices located thereon. The storage method includes:
[0011] S1 = {(X11, Y11), (X12, Y12) … (X1m, Y1m), 2 < m < ∞}, where S1 represents the outer contour of the polygon, and the storage order of the outer contour S1 of the polygon is the clockwise arrangement of several vertices;
[0012] S2 = {(X21, Y21), (X22, Y22) … (X2n, Y2n), 2 < n < ∞}, where S2 represents the inner ring, and the storage order of the inner ring S2 of the polygon is the counterclockwise arrangement of several vertices.
[0013] In one embodiment, the method for dividing the object data into a combination of at least two polygons according to the inner ring and the outer contour in step S20 includes the following steps:
[0014] S21: Determine the center point C(X0, Y0) of the inner ring, where
[0015] X0 = (X21 + X22 + … + X2n) / n, Y0 = (Y21 + Y22 + … + Y2n) / n;
[0016] S22: Based on the center point, select the first point pair (P, Q) and the second point pair (P`, Q`) located on both sides of the center point C respectively. Among them, point P and point P` both belong to the outer contour S1 of the polygon, and point Q and point Q` both belong to the inner ring S2;
[0017] S23: Take the connections of the first point pair (P, Q) and the second point pair (P`, Q`) as boundaries, and divide the to-be-identified object into a first polygon and a second polygon.
[0018] In one embodiment, step S22 includes:
[0019] Use a first straight line passing through the center point C to divide the points on the outer contour S1 of the polygon into a first point set T11 and a second point set T12 located on both sides of the first straight line respectively, and divide the points on the inner ring S2 into a third point set T21 and a fourth point set T22 located on both sides of the first straight line respectively;
[0020] Take a second straight line passing through the center point C, where the second straight line is perpendicular to the first straight line, and calculate the distance from each point in the first point set T11, the second point set T12, the third point set T21, and the fourth point set T22 to the second straight line;
[0021] Take the point closest to the second straight line in the first point set T11 as the point P, take the point closest to the second straight line in the second point set T12 as the point P`, take the point closest to the second straight line in the third point set T21 as the point Q, and take the point closest to the second straight line in the fourth point set T22 as the point Q`.
[0022] In one embodiment, step S23 includes:
[0023] Starting from point P, search along the polygon outer contour S1 in the order in which they are stored, jump to point Q' when point P' is found, search along the inner loop S2 in the order in which they are stored, jump to point P when point Q is found, and obtain the first polygon;
[0024] Taking the point P' as the starting point, search along the polygon outer contour S1 in the order of its storage, jump to the point Q when the point P is found, search along the inner ring S2 in the order of its storage, jump to the point P' when the point Q' is found, and obtain the second polygon.
[0025] In one embodiment, the method for extracting pre-marked points in step S40 includes:
[0026] Extract the skeleton lines of the polygon, and use the intersection points of the skeleton lines as the pre-marked points.
[0027] In one embodiment, the skeleton line extraction method includes a polygon skeleton extraction algorithm based on a Voronoi diagram.
[0028] The present invention also provides an electronic chart element identification device, comprising:
[0029] An inner ring detection module is configured to provide data of an object to be identified and detect whether the object data includes an inner ring, wherein the object data includes a polygonal outer contour of the object to be identified, and the inner ring is located within the range of the outer contour;
[0030] A polygon division module, configured to divide the object data into a combination of at least two polygons according to the detected inner ring and the outer contour;
[0031] An inner ring recheck module is used to detect whether there is an inner ring in the polygon, and if so, return to the polygon division module; if not, input the polygon into the polygon set;
[0032] The marking module is used to extract a representative position from the polygon and mark the representative position.
[0033] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer is executed by a processor, the computer implements a method for identifying electronic nautical chart elements as described in any one of the above items.
[0034] The present invention also provides a computer device comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor to enable the processor to execute a method for identifying electronic nautical chart elements as described in any one of the above items.
[0035] Based on the above, compared with the prior art, the method for identifying electronic chart surface elements provided by the present invention first detects whether there is an inner ring inside the polygonal outer contour of the object to be identified. When the inner ring is detected, the object to be identified in the annular area between the inner ring and the polygonal outer contour is divided into a combination of at least two polygons. Then, it is further detected whether there is an inner ring inside the formed polygon. If there is an inner ring, the division step of the previous step is repeated to divide the object to be identified into several polygons without inner rings. Then, several pre-identified points located inside each of the polygons are taken, and the pre-identified points are used as the points to be selected for placing the identification of the object to be identified. The present invention extracts the internal points of the polygon by dividing the object to be identified with an annular area into a combination of several ringless polygons, thereby avoiding the possibility that the pre-identified points may fall into the area inside the ring that does not belong to the object to be identified when extracting the internal points of the annular area, thereby reducing the difficulty of extracting identification points in the ring area.
[0036] Other features and beneficial effects of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The objectives and other beneficial effects of the present invention can be achieved and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work. The positional relationships described in the drawings in the following description are based on the directions of the components drawn in the diagrams, unless otherwise specified.
[0038] Figure 1 A schematic flow chart of the method for identifying electronic chart elements provided by the present invention;
[0039] Figure 2 This is a schematic diagram of an object to be identified according to an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the center point of the inner ring according to an embodiment of the present invention;
[0041] Figure 4 Schematic diagram of the first point pair and the second point pair according to an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the segmentation of the first polygon and the second polygon according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments; the technical features designed in different implementation modes of the present invention described below can be combined with each other as long as they do not conflict with each other; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0044] In the description of the present invention, it should be understood that the terms "center", "lateral", "up", "down", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more. In addition, the term "including" and any variations thereof all mean "at least including".
[0045] The terms used herein are intended only to describe specific embodiments and are not intended to limit exemplary embodiments. Unless the context clearly indicates otherwise, the singular forms "a", "an", "an item" used herein are also intended to include the plural. It should also be understood that the terms "comprise" and / or "include" used herein specify the presence of stated features, integers, steps, operations, units and / or components, and do not preclude the presence or addition of one or more other features, integers, steps, operations, units, components and / or combinations thereof.
[0046] To achieve at least one of the advantages or other advantages, such as Figure 1 As shown, the present invention provides a method for identifying electronic chart surface elements, comprising the following steps:
[0047] S10: providing data of an object to be identified, detecting whether the object data includes an inner ring, the object data including a polygonal outer contour of the object to be identified, and the inner ring is within the range of the polygonal outer contour;
[0048] S20: if an inner ring is detected, dividing the object data into a combination of at least two polygons according to the inner ring and the outer contour of the polygon;
[0049] S30: Check whether there is an inner ring in the polygon. If there is an inner ring, return to step S20; if there is no inner ring, enter the polygon into the polygon set;
[0050] S40: extracting a number of pre-marked points located inside each polygon, and using the pre-marked points as points to be selected for placing a mark on the object to be marked.
[0051] Specifically, in some embodiments, the outer contour and inner ring of the polygon are respectively identified and stored by a number of vertices located on each of them, and the storage method includes:
[0052] S1 = {(X11, Y11), (X12, Y12) … (X1m, Y1m), 2 < m < ∞}, where S1 represents the outer contour of the polygon, and the storage order of the outer contour S1 of the polygon is the clockwise arrangement of several vertices;
[0053] S2 = {(X21, Y21), (X22, Y22) … (X2n, Y2n), 2 < n < ∞}, where S2 represents the inner ring, and the storage order of the inner ring S2 is the counterclockwise arrangement of several vertices.
[0054] Then, the method for dividing object data into combinations of at least two polygons according to the inner ring and the outer contour in step S20 includes the following steps:
[0055] S21: Determine the center point C(X0, Y0) of the inner ring, where
[0056] X0 = (X21 + X22 + … + X2n) / n, Y0 = (Y21 + Y22 + … + Y2n) / n;
[0057] S22: Based on the center point, select the first point pair (P, Q) and the second point pair (P`, Q`) that are respectively on both sides of the center point C, where point P and point P` both belong to the outer contour S1 of the polygon, and point Q and point Q` both belong to the inner ring S2;
[0058] S23: Take the lines connecting the first point pair (P, Q) and the second point pair (P`, Q`) as boundaries, and divide the object to be marked into the first polygon and the second polygon.
[0059] Preferably, step S22 includes:
[0060] Use the first straight line passing through the center point C to divide the points on the outer contour S1 of the polygon into the first point set T11 and the second point set T12 that are respectively on both sides of the first straight line, and divide the points on the inner ring S2 into the third point set T21 and the fourth point set T22 that are respectively on both sides of the first straight line;
[0061] Take the second straight line passing through the center point C, where the second straight line is perpendicular to the first straight line, and calculate the distances from the points in the first point set T11, the second point set T12, the third point set T21, and the fourth point set T22 to the second straight line;
[0062] Take the point in the first point set T11 that is closest to the second straight line as point P, take the point in the second point set T12 that is closest to the second straight line as point P`, take the point in the third point set T21 that is closest to the second straight line as point Q, and take the point in the fourth point set T22 that is closest to the second straight line as point Q`.
[0063] The lines formed by the first point pair (P, Q) and the second point pair (P', Q') obtained by the above method will not pass through the interior of the inner ring S2, which is convenient for the subsequent polygon segmentation of the object to be identified.
[0064] Preferably, in some embodiments, the first and second lines can be horizontal and vertical lines passing through point C, respectively. For the center point C(X0, Y0), all points (X, Y) in the first point set T11 only need to satisfy Y-Y0>0, and all points (X, Y) in the second point set T12 only need to satisfy Y-Y0<0. Similarly, the division of points in the third and fourth point sets T21 and T22 can be obtained.
[0065] Next, step S23 includes:
[0066] Starting from point P, search along the polygon outer contour S1 in the order in which it is stored. When point P' is found, jump to point Q'. Search along the inner loop S2 in the order in which it is stored. When point Q is found, jump to point P to obtain the first polygon.
[0067] Starting from point P', search along the polygon outer contour S1 in the order in which it is stored. When point P is found, jump to point Q. Search along the inner ring S2 in the order in which it is stored. When point Q' is found, jump to point P' to obtain the second polygon.
[0068] Then, step S30 is used to process the first polygon and the second polygon. If an inner ring still exists in the first polygon or the second polygon, the segmentation is continued according to the above steps until several polygons without inner rings are formed and input into the polygon set.
[0069] For the above process, the present invention is illustrated by the following embodiments.
[0070] like Figure 2 As shown, the object to be identified has two sets of edges: a polygonal outer contour S1 and an inner ring S2. The polygonal outer contour S1 includes {P10, P11, P12, P13, P14, P15, P16, P17}, and the storage order is clockwise; the inner ring S2 includes {Q20, Q21, Q22, Q23}, and the storage order is counterclockwise.
[0071] like Figure 3 As shown, the center point C(X,Y) of the inner ring is calculated according to the coordinates of each point of the inner ring S2, then X=(X Q20 +X Q21 +X Q22 +X Q23 ) / 4; Y=(Y Q20 +Y Q21 +Y Q22 +Y Q23 ) / 4.
[0072] like Figure 4 As shown, according to the vertical coordinate Y of the inner ring center point C(X,Y) C The first horizontal line divides S1 and S2 into two point sets respectively to form four point sets. The first point set T11 and the third point set T21 are divided into two point sets respectively according to the rule ΔY>0(ΔY=YY C , Y is the vertical coordinate of each point in the point set), so T11 is {P10, P11, P12, P17}, and T21 is {Q20, Q21}; the second point set T12 and the fourth point set T22 are divided according to the rule ΔY<0, so T12 is {P13, P14, P15, P16}, and T22 is {Q22, Q23}.
[0073] The second straight line is a line that passes vertically through the center point C of the inner ring, and can be calculated based on Min(|ΔX|)(ΔX=XX C , X is the horizontal coordinate of each point in the point set) to obtain the four points closest to the second straight line in the four point set. Figure 4 As shown, point P10 in T11 is point P; point P15 in T12 is point P'; point Q21 in T21 is point Q; and point Q22 in T22 is point Q'. This gives us two sets of points: the first point pair (P, Q) and the second point pair (P', Q').
[0074] Then, if Figure 5 As shown, starting from point P(P10), traversing in the order of storage, passing through P11, P12, P13, P14 to point P15(P'), point P' jumps to point Q'(Q22), Q22 continues in the order of storage through Q23, Q20, to point Q(Q21), point Q jumps to point P(P10), thus forming a closed area Path1{P10, P11, P12, P13, P14, P15 5, Q22, Q23, Q20, Q21}; starting from point P`(P15), traverse through P16 and P17 in storage order to reach point P(P10), jump from point P to point Q(Q21), traverse in storage order to point Q22(Q`), and jump from point Q` to point P`(P15), forming the closed area Path2{P15, P16, P17, P10, Q21, Q22}. In this way, the original annular area is naturally divided into two polygonal areas without inner rings, namely the first polygon enclosed by Path1 and the second polygon enclosed by Path2.
[0075] Then, in one embodiment, the pre-marking point extraction method in step S40 includes: extracting the skeleton line of the polygon, and using the intersection points in the skeleton line as the pre-marking points. The skeleton line extraction method includes but is not limited to the polygon skeleton extraction algorithm based on the Voronoi diagram. The skeleton (Skeleton), also known as the medial axis (Medial Axis), has the same topology and shape information as the original object. It is a geometric feature with excellent performance and can effectively describe the object. Therefore, the present invention uses the intersection skeleton points on the skeleton line as pre-marking points to ensure that they fall within the area of the object to be marked, so as to meet the requirements of the electronic nautical chart marking standard.
[0076] In polygon skeleton extraction algorithms, a polygon's skeleton can be viewed as consisting of skeleton points between countless pairs of points. The skeleton between two points (equivalent to the medial axis) is the locus of points equidistant from the two points. It is the perpendicular bisector of the line connecting the two points. The half-plane adjacent to each point is the set of points with the minimum distance to it, which can be expanded to define the medial axis of a discrete set of points. It is the locus of points with the following properties: any point on it is equidistant from the two nearest discrete points, and accordingly, it also produces the set of points with the minimum distance from each point. The medial axis between two lines is the locus of points equidistant from the two lines. It is a line parallel to the angle bisector when the two lines intersect, or the distance to the two lines when the lines are parallel. The area adjacent to each line and bounded by the medial axis is the set of points with the minimum distance to it. The medial axis between a line and a point is the locus of points equidistant from the point (or line). It is a parabola with the point as the focus and the line as the directrix. The area adjacent to the point or line and bounded by the medial axis is the set of points with the minimum distance to it.
[0077] For the convenience of explanation, the following concepts are introduced: (1) The starting central axis segment of a polygon: The angle bisector of the vertex angle (less than or equal to 180 degrees) can be drawn through each convex vertex of a polygon, and it ends at the intersection of the perpendicular lines of the short sides of the line segments on both sides of its angle or the intersection of the angle bisectors of adjacent convex vertices. (2) Opposite shore lines and points: The edges and points on both sides of the above-mentioned ray or the edges and points adjacent to it in the positive direction (same direction as the ray) are called shore lines and opposite shore lines and points. Sometimes, the opposite shore line or point has not only one corresponding side, but two or more corresponding sides, and there is a dynamic relative relationship between multiple sides in the operation. (3) Line segment exhaustion: All the ordered point sets of the shore line segment find the corresponding ordered point set or node of the opposite shore line as symmetry. The central axis segment generated in the exhaustion process is an ordered combination of the three types of basic line segments in the above basic concepts. (4) Vertex consumption: For each concave vertex of the polygon, an ordered set of points or nodes of symmetrical opposite shores are found on each direction line of the vertex angle (greater than 180 degrees). The central axis segment generated in the process of consumption is an ordered combination of the three basic line segments in the above basic concepts.
[0078] The polygon skeleton line can then be obtained through the following process: first, digitize the contour points and organize all the contour points into a sequential ring; then, triangulate the contour points according to the Delaunay principle and remove the triangles that are not in the connected domain; next, starting from a starting node, according to a central axis algorithm, dynamically organize the edge operations on both sides of the ring in sequence until a generated central axis reaches another starting node, or encounters another central axis, and erases one or two starting nodes; finally, implement the previous step for the starting nodes that have not been erased in turn until all starting nodes are erased.
[0079] It should be understood that the present invention is not limited to extracting polygon skeleton lines for pre-marked points. Other methods may include further dividing the concave polygon obtained by segmentation into a combination of convex polygons and then calculating the centroid of each convex polygon as the pre-marked point. The present invention does not impose any particular limitation on this.
[0080] The present invention also provides an electronic chart element identification device, comprising:
[0081] An inner ring detection module is used to provide data of an object to be identified and detect whether the object data includes an inner ring, the object data including the polygonal outer contour of the object to be identified, and the inner ring is located within the outer contour range;
[0082] A polygon division module is used to divide the object data into a combination of at least two polygons according to the inner ring and the outer contour of the detected inner ring;
[0083] The inner ring recheck module is used to detect whether there is an inner ring in the polygon. If there is an inner ring, it returns to the polygon division module; if there is no inner ring, the polygon is input into the polygon set;
[0084] The identification module is used to extract representative positions of polygons and mark the representative positions.
[0085] The present invention also provides a computer-readable storage medium, which stores computer instructions and implements a method for identifying electronic chart elements as described above when executed by a computer processor.
[0086] The present invention also provides a computer device comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the processor to execute a method for identifying electronic nautical chart elements as described in any one of the above items.
[0087] Based on the above, compared with the prior art, the method for identifying electronic chart surface elements provided by the present invention first detects whether there is an inner ring inside the polygonal outer contour of the object to be identified. When the inner ring is detected, the object to be identified in the annular area between the inner ring and the polygonal outer contour is divided into a combination of at least two polygons. Then, it is further detected whether there is an inner ring inside the formed polygon. If there is an inner ring, the division step of the previous step is repeated to divide the object to be identified into several polygons without inner rings. Then, several pre-identified points located inside each polygon are taken, and the pre-identified points are used as the points to be selected for placing the identification of the object to be identified. The present invention extracts the internal points of the polygon by dividing the object to be identified with an annular area into a combination of several ringless polygons, thereby avoiding the possibility that the pre-identified points may fall into the area inside the ring that does not belong to the object to be identified when extracting the internal points of the annular area, thereby reducing the difficulty of extracting identification points in the ring area.
[0088] In addition, those skilled in the art should understand that, although there are many problems in the prior art, each embodiment or technical solution of the present invention may be improved in only one or several aspects, without having to simultaneously solve all the technical problems listed in the prior art or background art. Those skilled in the art should understand that any content not mentioned in a claim should not be construed as limiting the claim.
[0089] Although this document frequently uses terms such as "object to be marked," "pre-marked point," "polygon outline," "inner ring," or "skeleton point," other terms are not excluded. These terms are used solely to more conveniently describe and explain the essence of the present invention; interpreting them as any additional limitation would be contrary to the spirit of the present invention.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying elements of an electronic chart, characterized in that: The following steps are involved: S10: providing data of an object to be identified, detecting whether the object data includes an inner ring, the object data including a polygonal outer contour of the object to be identified, and the inner ring is within the range of the polygonal outer contour; The polygonal outer contour and the inner ring are respectively marked and stored by a plurality of vertices located on each of them, and the storage method includes: ,in represents the outer contour of the polygon, are the coordinates of several vertices on the polygonal outer contour, and the storage order of the polygonal outer contour S1 is the clockwise arrangement of the several vertices; ,in represents the inner ring, are the coordinates of several vertices on the inner ring, and the storage order of the inner ring S2 is the counterclockwise arrangement of the several vertices; S20: If an inner ring is detected, dividing the object data into a combination of at least two polygons according to the inner ring and the outer contour of the polygon, comprising the following steps: S21: Determine the center point of the inner ring ,in ; S22: With the center point as a reference, select a first point pair (P, Q) and a second point pair (P', Q') located on both sides of the center point C, wherein both point P and point P' belong to the polygonal outer contour S1, and both point Q and point Q' belong to the inner ring S2; S23: Split the object to be identified into a first polygon and a second polygon using the line connecting the first point pair (P, Q) and the second point pair (P', Q') as a boundary; Wherein, step S22 includes: Divide the points on the polygonal outer contour S1 into a first point set T11 and a second point set T12, each located on either side of the first straight line, using a first straight line passing through the center point C; and divide the points on the inner ring S2 into a third point set T21 and a fourth point set T22, each located on either side of the first straight line; Take a second straight line passing through the center point C, where the second straight line is perpendicular to the first straight line, and calculate the distance from each point in the first point set T11, the second point set T12, the third point set T21, and the fourth point set T22 to the second straight line; The point closest to the second straight line in the first point set T11 is taken as point P, the point closest to the second straight line in the second point set T12 is taken as point P', the point closest to the second straight line in the third point set T21 is taken as point Q, and the point closest to the second straight line in the fourth point set T22 is taken as point Q'; Wherein, step S23 includes: Starting from point P, search along the polygon outer contour S1 in the order in which they are stored, jump to point Q' when point P' is found, search along the inner loop S2 in the order in which they are stored, jump to point P when point Q is found, and obtain the first polygon; Starting from the point P', search along the polygon outer contour S1 in the order of storage, and when the point P is found, jump to the point Q, and search along the inner ring S2 in the order of storage, and when the point Q' is found, jump to the point P' to obtain the second polygon S30: Detect whether there is an inner ring in the first polygon and the second polygon, and if so, return to step S20; if not, add the first polygon and the second polygon to a polygon set; S40: extracting a plurality of pre-marked points located inside each of the polygons, and using the pre-marked points as points to be selected for placing a mark on the object to be marked.
2. The method for identifying electronic chart elements according to claim 1, characterized in that: The method for extracting pre-marked points in step S40 includes: Extract the skeleton lines of the polygon, and use the intersection points of the skeleton lines as the pre-marked points.
3. The method for marking electronic nautical chart elements according to claim 2, characterized in that: The skeleton line extraction method includes a polygon skeleton extraction algorithm based on the Voronoi diagram.
4. An electronic chart element marking device, characterized in that: A method for implementing an electronic chart element identification method according to any one of claims 1 to 3, comprising: An inner ring detection module is configured to provide data of an object to be identified and detect whether the object data includes an inner ring, wherein the object data includes a polygonal outer contour of the object to be identified, and the inner ring is located within the range of the outer contour; A polygon division module, configured to divide the object data into a combination of at least two polygons according to the detected inner ring and the outer contour; An inner ring recheck module is used to detect whether there is an inner ring in the polygon, and if so, return to the polygon division module; if not, input the polygon into the polygon set; The marking module is used to extract a representative position from the polygon and mark the representative position.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer is executed by a processor, the method for identifying electronic nautical chart elements according to any one of claims 1 to 3 is implemented.
6. A computer device, characterized in that: The invention comprises at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the processor executes a method for identifying electronic chart elements according to any one of claims 1 to 3.
Citation Information
Patent Citations
Identification point identification method and device, electronic device and storage medium
CN109978903A
Splitting polygons with interior rings
US8275800B1