CN110796903B - Sign avoiding method - Google Patents

Sign avoiding method Download PDF

Info

Publication number
CN110796903B
CN110796903B CN201910735481.3A CN201910735481A CN110796903B CN 110796903 B CN110796903 B CN 110796903B CN 201910735481 A CN201910735481 A CN 201910735481A CN 110796903 B CN110796903 B CN 110796903B
Authority
CN
China
Prior art keywords
electric field
points
track
sign
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910735481.3A
Other languages
Chinese (zh)
Other versions
CN110796903A (en
Inventor
王毅
朱盼
王国强
陈通
常存喜
罗晓艳
潘建
石伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Second Research Institute of CAAC
Original Assignee
Second Research Institute of CAAC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Second Research Institute of CAAC filed Critical Second Research Institute of CAAC
Priority to CN201910735481.3A priority Critical patent/CN110796903B/en
Publication of CN110796903A publication Critical patent/CN110796903A/en
Application granted granted Critical
Publication of CN110796903B publication Critical patent/CN110796903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G5/00Traffic control systems for aircraft, e.g. air-traffic control [ATC]
    • G08G5/04Anti-collision systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a sign avoiding method, which comprises the following steps: determining all identification points of the label to be placed, and judging whether all the identification points are in a cluster state or not according to the distribution density of all the identification points; if all the identification points are in the cluster state, generating a connecting line for connecting the identification points and the label according to the electric field model; the place of the label is established at the end point of the connecting line. Wherein, the electric field model is: simulating a mark point as a charge and a connecting line as an electric field line, and establishing a two-dimensional electric field according to all mark points moving to the current moment; any two connecting lines originating from the same identification point are not intersected, and any two connecting lines originating from different identification points are also not intersected; when the charge amount of each identification point in the two-dimensional electric field is equal and the number of the divergent connecting lines is also equal, the intervals between the adjacent connecting lines tend to be uniform along with the outward divergence process of the connecting lines. The invention can provide the scheme for placing the label with the lowest label coverage rate.

Description

Sign avoiding method
Technical Field
The invention relates to the technical field of sign avoidance, in particular to a sign avoidance method.
Background
An Advanced airport scene Guidance and Control System (Advanced surface movement Guidance and Control System) proposed by the international civil aviation organization is a novel solution for solving the problems of safety, efficiency and capacity of an airport, and is called 'A-SMGCS' for short. Visual human-computer interaction terminal software is deployed in the A-SMGCS, and is called an A-SMGCS terminal for short. The A-SMGCS terminal can display the geographical information of an airport scene and the nearby airspace and display the aircrafts (generally referred to as civil airliners) in the area in real time in the form of digital marks, wherein the digital marks are icons or dots, and the icons or dots are called mark points for short.
Each identification point has a unique rectangular label associated with it and displayed, which is a text box containing the identification number, flight number, warning information, status information, etc. of the aircraft, called "label" for short. There is a unique connecting line between the mark point and the label to express the association relationship, which starts from the outline boundary of the mark icon or dot and ends at a certain point on the rectangular frame of the label, usually a straight line segment, called "connecting line" for short.
The A-SMGCS terminal receives the real-time data and dynamically displays the updated positions of the identification points. When the position of the mark point is changed, the spatial positions of the label and the connecting line can be updated, and the readability and the easy resolution of the information are guaranteed as much as possible.
In general, the sign keeps the relative position with the identification point in motion, and the default position relationship of the system is: the label is positioned right above the identification point, the middle line of the bottom edge of the label is vertically connected with the identification point, and the length of all the connecting lines is fixed.
The sign can be dragged manually to adjust the position relation between the sign and the identification point. And the system draws a new connecting line according to the adjusted relation. The new position of the tag relative to the identification point will be recorded and remain unchanged until the position is manually reset.
The display priority of the identification points, the connecting lines, the signs and the maps is in the order from high to low: sign > line > identification point > map. Examples are: when a certain sign and a certain identification point are overlapped, the user can see the sign and cannot see the identification point.
In the way of displaying the label on the geographic information interface of the A-SMGCS terminal by a fixed arrangement method, a significant man-machine interaction obstacle exists: firstly, the labels can be mutually covered, and the display of the covered label information is influenced; the label can cover other identification points to influence the identification point judgment; the label can cover other connecting lines to influence the judgment of the connecting line relation; and fourthly, the connecting lines are crossed with each other, and the judgment of the connecting line relation is influenced.
The problem reflected by the points (i) and (ii) is referred to as the label overlapping problem.
The label is an important component of the A-SMGCS terminal, the problem of label overlapping can seriously affect the correct judgment of a terminal operator, delay the decision of the operator and reduce the efficiency of the A-SMGCS.
In order to avoid the influence caused by the label overlapping problem as much as possible, A-SMGCS developers need to develop an algorithm to solve the label overlapping problem, the purpose of the algorithm is to enable labels to achieve automatic avoidance as much as possible and enhance the readability and the legibility of information, and the algorithm is called an avoidance algorithm for short. The main avoidance algorithms at present are the "grid marking method" and the "collision detection method".
The grid marking method divides an A-SMGCS terminal interface by grids, judges whether the signs are overlapped or not by using whether the signs occupy the same grids during movement or not, calculates the overlapping degree, and finally takes the minimum one of a plurality of candidate positions divided near the identification point as the place for placing the signs.
The collision detection method is that all moving objects are taken as rigid bodies, the collision condition of each position with other signs, connecting lines and identification points is detected in a plurality of candidate positions appointed near the identification points, a place sign without collision is found, if the position can not be found, a plurality of candidate positions appointed in farther places are repeated.
Disadvantages of the grid marking method: firstly, a large number of grids need to be marked when detecting the overlapping, and a large memory overhead needs to be maintained; secondly, the connecting line is of fixed length, the label only carries out avoidance on a circumferential area with fixed radius around the mark point, and overlapping cannot be effectively prevented; and thirdly, only the condition of the label and the label is considered, and the condition of the label and the mark point coverage is not considered.
The disadvantages of the collision detection method are: firstly, the effective avoidance of two objects, namely a label and a mark point, and a connecting line is not considered generally, and if the avoidance of the three objects and the connecting line are considered simultaneously, the calculation amount of geometric operation is very large; and secondly, no collision is an extremely harsh avoidance condition, the information identification is not influenced by the partial overlapping of the labels in most cases, and the labels are distributed too sparsely and are connected too long by an algorithm, so that the quick association of the user on the information is influenced.
Both avoidance algorithms fail to provide satisfactory avoidance for the following situations: firstly, the airport scene is busy, a large number of aircrafts occupy runways, taxiways and parking ramps, secondly, the map is zoomed to high power, and all aircrafts gather to the zoom focus. In both cases, all the identified points are densely clustered into a cluster, which is called "clustering" for short.
For the identification point set forming the cluster, a grid marking method is adopted, so that the label can cover a plurality of identification points or labels, and the information identification is seriously influenced; by adopting a collision detection method, distributed labels are all outside clusters, but the distribution is very uneven, the space utilization rate is low, and the cluster interconnects can be criss-cross, thus seriously affecting the information correlation.
At present, no suitable avoidance algorithm is provided, the defects of the two methods are overcome, and the problem of sign avoidance when the identification points form clusters can be well solved.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a sign avoiding method, which comprises the following steps:
s1, determining all the identification points of the label to be placed, and judging whether all the identification points are in a cluster state according to the distribution density of all the identification points;
s2, if all the identification points are in the cluster state, generating a connecting line for connecting the identification points and the label according to the electric field model;
s3, placing a label at the established position of the end point of the connecting line;
wherein the electric field model is: simulating a mark point as a charge and a connecting line as an electric field line, and establishing a two-dimensional electric field according to all mark points moving to the current moment; any two connecting lines originating from the same identification point are not intersected, and any two connecting lines originating from different identification points are also not intersected; when the charge amount of each identification point in the two-dimensional electric field is equal and the number of the scattered connecting lines is also equal, the interval between the adjacent connecting lines tends to be uniform along with the outward scattering process of the connecting lines.
Preferably, step S1 includes the following sub-steps:
step S11, acquiring all visible identification points in the screen range at the current moment;
step S12, judging whether the distribution density of all the identification points exceeds a preset threshold value;
step S13, if the distribution density of all the identification points exceeds a preset threshold value, all the identification points are in a cluster state;
and step S14, if the distribution density of all the identification points does not exceed a preset threshold value, switching to a grid marking method or a collision detection method for sign avoidance.
Preferably, step S2 includes the following sub-steps:
step S21, establishing a list for storing the tracks to be expanded, wherein the list comprises the tracks starting from all the identification points;
step S22, establishing an enclosure for enclosing all the identification points and tracks, wherein the tracks in the list extend outwards in an expanding manner and are uniformly dispersed until the tracks extend to the boundary of the enclosure and then are suspended for expansion;
step S23, screening out partial tracks from the list and deleting the partial tracks from the list, wherein the surrounding ring can be surrounded by a label placed near the tail end point of the partial tracks;
step S24, judging whether there is any track in the current list;
step S25, if there is a track in the current list, the enclosure needs to be enlarged, and the step S22 is skipped;
and step S26, if the track does not exist in the current list, converting the tracks spliced by the broken line segments into smoothly-transitional connecting lines through mathematical transformation.
Preferably, step S3 includes the following sub-steps:
step S31, generating arrows pointing to the signs at all the connecting line terminal points, wherein the direction of the arrows is consistent with the direction of the connecting line terminal points which are curve segments so as to ensure the harmony and consistency of the visual effect;
in step S32, the label is placed on the extended line indicated by the arrow, and the label is placed at a position where the center of the label slides on the extended line until the arrow touches the boundary of the label from the outside of the label.
Preferably, in step S22, each track in the list expands along the direction of the electric field lines under the action of the electric force of the two-dimensional electric field until the end point of the track touches the edge of the enclosure.
Preferably, step S23 includes the steps of:
step S23a, calculating the azimuth angle of the connecting line for connecting the end point of each track with the geometric gravity center points of all the identification points relative to the positive direction of the horizontal axis of the screen, sequencing the tracks according to the azimuth angle in the clockwise direction and updating the track index values of the tracks in the list;
step S23b, screening partial tracks from the list, sequentially connecting the tail end points of the partial tracks according to the track index values to form a fold line, connecting the head and the tail of the fold line to form a closed fold line, and deleting the partial tracks from the list; the surrounding ring can be surrounded by a label placed near the end point of the partial track.
Preferably, step S25 includes the steps of:
step S25a, after the track expansion of each round is finished, temporarily storing the tail end point of each track in the current list in a variable to be used as an electric field used in the track expansion of the next round;
step S25b, continuing to expand a section of space under the action of the two-dimensional electric field of each track in the current list, wherein the expanded area is a thin sheet annular area formed between the enclosure and the transition enclosure until the tail end point of the track touches the edge of the enclosure; the transition surrounding ring is a transition area for properly adjusting the track before the two-dimensional electric field is changed;
step S25c, updating a two-dimensional electric field according to each track in the current list;
step S25d, expanding the enclosure by one circle to meet the space requirement and restriction when the remaining tracks in the current list continue to expand, and jumping to the step S22.
Preferably, in step S31, the arrow direction of each link is determined as the tangent direction of the link end, and an arrow pointing to the direction is drawn at the link end, so that the generated arrow and the link are visually a harmonious whole.
Preferably, in step S32, the center position of the label is set in the direction pointed by the arrow of each link so that the center point of the label is on the tangent line of the end of the link and the label is just in contact with the pointed end point of the arrow, and the current position where the label is located is set as the placement position of the label.
Preferably, in step S22, if the track of the identification point is excessively bent, the generation of the connecting line and the placement of the label for the identification point are abandoned.
The invention has the beneficial effects that:
1) when the marking points are highly gathered together to form a dense cluster, the connecting lines generated by the cluster algorithm and the placed labels can be avoided with good effect. Compared with a fixed arrangement method, a grid marking method and a collision detection method, the cluster algorithm can provide a label placement scheme with the lowest label coverage rate.
2) The cluster algorithm of the invention not only can realize avoidance between the labels, but also can meet the requirements of sufficient avoidance between the connecting lines, absolute segmentation of the identification points and the labels, and complete separation of the connecting lines of the identification points and other identification points.
3) The clustering algorithm of the invention not only can realize space avoidance or separation among the identification points, the connecting lines and the signs, but also can ensure that the connecting lines and the signs are uniformly, symmetrically and compactly distributed in space, thereby maximally meeting the requirements of space saving and visual attractiveness.
4) The stability of the output result of the cluster algorithm of the invention is strong: no matter which identification point is used for generating the connecting line, the scheme for finally placing the label is not influenced by the execution sequence, namely for the same input set, the algorithm output is not influenced by the element sequence in the input set, the grid marking method and the collision detection method are influenced by the input sequence, and the label avoiding effect can be completely different due to different sequences.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of the distribution of electric field lines in a two-dimensional electric field;
fig. 2 is a flowchart of a sign avoidance method according to an embodiment of the present invention;
fig. 3 is a main flow chart of a sign avoidance method according to an embodiment of the present invention;
fig. 4 is a detailed flowchart of a sign avoidance method according to an embodiment of the present invention;
FIG. 5 is a distribution diagram of all the identification points according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a convex hull generating process according to an embodiment of the invention;
FIG. 7 is a schematic diagram of an envelope volume generation process according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating an advantage of the enveloping body as an enclosure according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a spatial relationship between an extended envelope and a transition envelope according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of the structure of the envelope according to the embodiment of the present invention;
FIG. 11 is a schematic diagram of the envelope with a split structure according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of the electric field applied force of an embodiment of the present invention;
FIG. 13 is a schematic diagram illustrating a method for determining points in a convex polygon according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of the envelope volume expansion of all trajectories at different stages according to an embodiment of the present invention;
FIG. 15 is a diagram illustrating a situation where the track is excessively bent to cause expansion failure according to an embodiment of the present invention;
FIG. 16 is a diagram illustrating a process of screening tracks in a list at different stages of expansion according to an embodiment of the present invention;
FIG. 17 is a schematic diagram illustrating a process of transforming a trajectory into a connection line through a smoothing process according to an embodiment of the present invention;
FIG. 18 is a schematic view of an embodiment of the present invention showing the creation of an arrow at the end of a wire and the placement of a tag;
FIG. 19 is a flowchart of cluster algorithm program simulation testing according to an embodiment of the present invention;
fig. 20 is a screenshot of a simulation program running of the cluster algorithm according to the embodiment of the present invention (in a general case, an actual effect is displayed);
fig. 21 is a simulation program running screenshot of the clustering algorithm according to the embodiment of the present invention (degradation, showing degraded convex hull and envelope);
FIG. 22 is a screenshot illustrating the simulation run for electric field model comparison according to an embodiment of the present invention;
FIG. 23 is a screenshot of a simulation run with a polyline of the trace converted into a smooth line, according to an embodiment of the present invention;
FIG. 24 is a simulation run screenshot representing simultaneous presentation of a center of gravity, a convex hull, an envelope, a trajectory, a sign and their spatial relationships, in accordance with an embodiment of the present invention;
fig. 25 is a screenshot of a simulation program for evaluating an avoidance effect according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which the invention pertains.
The embodiment provides a sign avoiding method, which mainly solves the sign avoiding problem under cluster distribution. The sign avoidance method of the embodiment can be combined with the existing sign avoidance method, dynamic switching is performed under the condition of cluster and non-cluster, and the generalized sign avoidance problem can be better solved.
Fig. 1 is a schematic diagram of the distribution of electric field lines in a two-dimensional electric field. An embodiment of the present invention builds an electric field model from the two-dimensional electric field shown in fig. 1. The electric field model is as follows: simulating a mark point as a charge and a connecting line as an electric field line, and establishing a two-dimensional electric field according to all mark points moving to the current moment; any two connecting lines originating from the same identification point are not intersected, and any two connecting lines originating from different identification points are also not intersected; when the charge amount of each identification point in the two-dimensional electric field is equal and the number of the divergent connecting lines is also equal, the intervals between the adjacent connecting lines tend to be uniform along with the outward divergence process of the connecting lines.
The model has the characteristics of self-adaptive optimization: the electric field intensity is higher at the position closer to the electric charge, the repulsive force is stronger, and the separation of the connecting line and the identification point is ensured; the electric field direction of any point in the electric field is unique, so that the connection lines are not intersected; in the process that the connecting lines are expanded outwards, the connecting lines are spontaneously repelled, so that the distribution is balanced quickly, and the effective avoidance between the labels and the connecting lines is ensured; the signs are all distributed in the cluster peripheral space, and the space isolation ensures that the signs and the identification points are not covered with each other absolutely.
The sign avoidance method can ensure that the sign has an ideal avoidance effect under the cluster condition, the signs are distributed compactly, uniformly and symmetrically, the information is clear, the resolution degree is obviously enhanced, and the efficiency and the accuracy of tracking and controlling the large-scene complex traffic dynamics by an A-SMGCS terminal operator are greatly improved. The details will be described below.
Fig. 2 is a flowchart of a sign avoidance method according to an embodiment of the present invention. As shown in fig. 2, steps S1 to S3 may be included.
In step S1, all the identification points where the label is to be placed are determined, and whether all the identification points are in a cluster state is determined according to the distribution density of all the identification points.
In step S2, if all the marker points are clustered, a connecting line for connecting the marker points and the label is generated based on the electric field model. Wherein the electric field model is: simulating a mark point as a charge and a connecting line as an electric field line, and establishing a two-dimensional electric field according to all mark points moving to the current moment; any two connecting lines originating from the same identification point are not intersected, and any two connecting lines originating from different identification points are also not intersected; when the charge amount of each identification point in the two-dimensional electric field is equal and the number of the scattered connecting lines is also equal, the interval between the adjacent connecting lines tends to be uniform along with the outward scattering process of the connecting lines.
In step S3, a location is established at the end point of the link where the placard is placed.
Specifically, step S1 may include the following sub-steps S11 to S14:
step S11, acquiring all the mark points AO visible in the screen range at the current time. The initialization list AO is a set of all visible identification points,
Figure BDA0002162034790000091
n is the number of the middle points of AO, and any two points in AO are required to be not overlapped, if two identification points are overlapped, the two identification points are regarded as one identification point. As shown in fig. 5, a distribution diagram of the identification points at a certain time T is obtained, a total of 22 identification points are visible,
Figure BDA0002162034790000092
each arrow identifies the direction of movement of a point at time T.
Wherein o isiScreen coordinate point of identification point denoted by index i, [ o ]i]X、[oi]YRespectively represent the horizontal coordinate value and the vertical coordinate value to satisfy the relationship
Figure BDA0002162034790000093
AO is a list of all the mark points in the visible area on the screen at the current time, N is the total number of the mark pointsNumber, satisfy the relationship
Figure BDA0002162034790000094
The index values of the list are from 1.
And step S12, judging whether the distribution density of all the identification points exceeds a preset threshold value. Step S12 may specifically include steps S12a to S12 c.
In step S12a, a convex hull COV of the AO, that is, COV ═ convex (AO), is calculated and determined, COV being a list composed of points on a two-dimensional plane as elements, and expressing each point of the convex hull in the clockwise direction.
Wherein COV is the smallest convex polygon containing AO, i.e., convex hull; the COV is represented by an array of screen coordinate points represented in a clockwise direction along the polygon; convex is a Convex hull generating function, satisfying the relationship COV ═ Convex (ao).
Figure BDA0002162034790000101
M is the number of the middle points of the COV, wherein ooje.AO, the execution process of the Convex function is as follows:
firstly, establishing an empty list
Figure BDA0002162034790000102
Establishing a replication list AO' ═ AO;
② if AO' is empty, jump to seventhly, otherwise: selection oo1Is epsilon' and satisfies [ oo1]YIs all of the values of [ oj]YSmallest in, COV1),AO'=AO'-oo1
Setting an angle variable alpha to be 2 pi and an angle variable beta to be 0;
setting a loop of a loop counting variable to be 0;
if AO' is empty, jump to seventhly, otherwise: selection ooloop+2E.g. AO', known ooloop+1E.g. COV is an element at the end of the list COV, so that there is a directed line segment
Figure BDA0002162034790000103
To directed line segments
Figure BDA0002162034790000104
Forming an angle beta of
Figure BDA0002162034790000105
To
Figure BDA0002162034790000106
The smallest of the angles formed, where o' e AO (if loop is 0, then oo is not present)loopE.g. COV, then use the vector
Figure BDA0002162034790000107
To replace
Figure BDA0002162034790000108
);
Sixthly, the known ooloop,ooloop+1E.g. COV, calculating directed line segment
Figure BDA0002162034790000109
To directed line segments
Figure BDA00021620347900001010
The angle formed alpha (if loop is 0, then oo is not presentloopE.g. COV, then α ═ 2 π), loop ═ loop +1, COVloop+2),AO'=AO'-ooloop+2And jumping back to the fifth step;
and seventhly, returning to the list COV.
As shown in fig. 6, the function runs to a state when loop is 5,
Figure BDA00021620347900001011
it can be seen that there are directional line segments
Figure BDA00021620347900001012
To directed line segments
Figure BDA00021620347900001013
Form an included angle beta5Is prepared from
Figure BDA00021620347900001014
To
Figure BDA00021620347900001015
The smallest included angle formed among them
Figure BDA00021620347900001016
Directed line segment
Figure BDA00021620347900001017
To directed line segments
Figure BDA00021620347900001018
Form an included angle alpha5Satisfy α5>β5So the function continues to add new points to the COV to complete the convex hull construction.
It should be noted that the convex hull is introduced because it is a simple linear geometry, easy to generate and calculate, and it better encloses the totality of the identified points distributed in space in the most compact way.
In step S12b, AO is calculated in the envelope EXPENV0In (b), i.e. EXPENV0The area (unit is pixel) of (a) is divided by the number of elements in AO.
Establishing an extended envelope
Figure BDA0002162034790000111
EXPENV0Is a radius Δ d0The circle of the COV is formed by a convex hull COV, a plurality of rectangles surrounding the COV and a plurality of sectors between the connected rectangles, namely, the sectors can be spliced into a circular sector, a rectangular chain with the length of the COV perimeter and a COV formed by a plurality of directed trapezoids, so that EXPENV (extended entry power network) is formed0The area calculation formula of (a) is:
Figure BDA0002162034790000112
so that the distribution density is
Figure BDA0002162034790000113
FIG. 7 schematically illustrates the construction process from convex hull COV to envelope; FIG. 10 illustrates the compositional structure partitioning of the envelope; the deconstruction diagram shown in fig. 11 is a decomposition of the composition of the envelope into three parts that are convenient for calculation.
It should be noted that the convex hull is not suitable for measuring the distribution density of the cluster, and when all points of the convex hull are distributed on a straight line, the convex hull degeneration occurs, and the convex hull area is 0; by expanding the footprint and distributing the sign space in a way that expands the convex hull, the distribution of the links and signs does not tend to be uniform, as shown in fig. 8. The envelope is a simple nonlinear geometric structure and is easy to generate and calculate; the area of the envelope would not be 0 whether the convex hull is degenerated or not; by expanding the footprint and distributing the signage space in a manner that expands the envelope, the distribution of the links and signs will tend to be circumferentially symmetric and evenly distributed, as shown in fig. 8.
In step S12c, it is determined whether the density ρ of the AO distribution exceeds a predetermined fixed value ρmin
Step S13, if the distribution density of all the identification points exceeds a preset threshold, all the identification points are in the cluster state. If rho is not less than rhominStep S2 is executed, otherwise, the process proceeds to step S14.
The criterion for judging AO cluster formation is that AO is in EXPENV0Has a distribution density of not less than a constant rhominThe meaning of expression is: each pixel on the screen contains p on averageminThe identification point of (2).
And step S14, if the distribution density of all the identification points does not exceed a preset threshold value, switching to a grid marking method or a collision detection method for sign avoidance. Step S14 may include steps S14a and S14 b.
In step S14a, the signs visible in the screen range are moved to the invisible area of the screen, the visible signs are the way of placing the signs at the last time, and as the positions of the identification points change, the sign positions need to be recalculated, so the signs need to be hidden in advance, but in order to improve the operation efficiency, the signs corresponding to all the identification points are all generated and set to be visible at the beginning of the algorithm execution, and the display and hiding state is realized by moving the positions.
Obtaining the position p of each sign, the width W of the screen, the height H of the screen, if- Δ W < [ p ]]x< W and- Δ h < [ p]YIf < H, the sign is in the screen range, and the sign is moved to infinity
Figure BDA0002162034790000121
The effect of hiding the label is realized.
In step S14b, the sign avoidance method of the present embodiment is switched to another sign avoidance method, and the sign avoidance method is abandoned, because in the non-clustering case, the average distance between the identification points is larger, and there is a greater probability that there is enough space inside the COV, and the sign can be placed smoothly using the space using a general algorithm.
Step S2 may include the following steps S21 to S26.
Step S21, a list for storing the tracks to be expanded is established, where the list includes the tracks starting from all the identification points. Step S21 may include steps S21a and S21 b.
In step S21a, two data, i.e., a trajectory list AL and an electric field distribution AZ, are initialized, where the trajectory of the identification point in each AO is established, the trajectory is initialized to a list of single elements including only the identification point itself, and AZ is initialized to a list of the identification points in the AO, that is, AZ is an electric field composed of the identification point in the AO as an electric charge.
Wherein l is a path represented by a broken line, and is a list containing all screen coordinate points from a starting point to an end point, which is called a track for short; l islIs the total number of coordinate points in the trajectory l, p(l,k)Is a screen coordinate point with index k in the track l, and satisfies the relationship
Figure BDA0002162034790000131
Figure BDA0002162034790000139
A terminal point designated l; AL is a list containing all current tracks to be expanded, initialized to
Figure BDA0002162034790000132
Wherein liIndicates the mark point oiIs initialized to
Figure BDA0002162034790000133
AZ is a list of several screen coordinate points, representing an electric field: each coordinate point represents a unit positive charge and its position; the electric field represented by AZ and the track in AL are mutually influenced and continuously changed in the track expanding process, and are initialized to AZ-AO; BACKUP _ AZ is used to temporarily store the electric field newly generated during the track expansion process for subsequent updating of AZ. The AT corresponds to the real-time position, t, of the label of each identification point in the AOiIs the mark point coordinate of mark point with mark number i, and satisfies the relation
Figure BDA0002162034790000134
Initializing the screen positions of the identification points and the center points of the labels at the moment that the corresponding labels are taken over by the clustering algorithm; the AT is used to store the final calculated position where the tag is placed.
Initialization
Figure BDA0002162034790000135
Wherein
Figure BDA0002162034790000136
I is more than or equal to 1 and less than or equal to N; initialization
Figure BDA0002162034790000137
In step S21b, a variable Level representing the size of the current envelope is set and initialized, which is initialized to 0, meaning that the trajectory extension is from the smallest envelope expeenv0And (4) starting.
As shown in FIG. 9, the dots are
Figure BDA0002162034790000138
All the identification points of (1); the polygon is an AO convex hull COV; a closed curve representing the extended envelope EXPENVLevel(ii) a Another closed curve is the transition envelope TRANSENVLevel(Level=0,1,2,3)。EXPENV0Spaced from COV by Δ d0Ensuring the separation of the label and the identification point; EXPENVLevelAnd EXPENVLevel+1Is Δ dradEnsuring that the sign surrounds EXPENVLevelThe monolayer is placed with little coverage in the radial direction; EXPENVLevelAnd TRANSENVLevelIs Δ d betweenminEnsure in EXPENVLevelThe track of completing the expansion is totally in TRANSENVLevelInside.
The envelope Envelop is a curve convex polygon, and is an envelope space formed by surrounding a convex polygon Cov boundary by a circle with the Radius, and satisfies the following relation:
Figure BDA0002162034790000141
the envelope is usually used as a constraint space for trajectory propagation, EXPENVLevelCalled a Level 'expansion enveloping body', is a main space place for track expansion and meets the relation
Figure BDA0002162034790000142
TRANSENVLevelThe transition enveloping body is called a Level transition enveloping body, is a transition region for properly adjusting the track before the electric field AZ is changed, ensures that the track can still smoothly expand outwards after the electric field AZ is changed, and satisfies the relation
Figure BDA0002162034790000143
Step S22, establishing an enclosure for enclosing all the identification points and tracks, where the tracks in the list extend outward in an expanding manner and diverge uniformly until the tracks extend to the boundary of the enclosure and then pause in the expanding. In step S22, each track in the list expands along the direction of the electric field lines under the action of the electric force of the two-dimensional electric field until the end point of the track touches the edge of the enclosure.
In ALUnder the action of AZ electric field force, each track expands along the direction of electric field line until reaching EXPENVLevelOf the edge of (a). For each track, each step of expansion is a straight line segment which advances along the electric field line direction by a distance delta step, then a new position electric field line direction is calculated, and the next step of expansion is carried out, and the process is repeated until the tail end point of the track is positioned in the envelope EXPENVLevelBorder or outside.
For track liSatisfies the condition ofiBelongs to AL and has a current value of
Figure BDA0002162034790000144
Current electric field
Figure BDA0002162034790000145
J is more than or equal to 1 and less than or equal to U, and U is the number of charge points in AZ.
liNew development point p ofiThe following function is called to generate: p is a radical ofi=ExtendF(FieldE,AZ,Δstep,Tail(li) Execution process of the function can be intuitively understood as a track liIn that
Figure BDA0002162034790000146
Is influenced by electric field force from
Figure BDA0002162034790000147
Is prolonged to piThe execution procedure of the function ExtendF is as follows:
obtaining each charge point zjFor the end point of the track
Figure BDA0002162034790000148
Is of an electric field strength of
Figure BDA0002162034790000149
② obtaining the included angle between the electric field force and the positive direction of the X axis
Figure BDA0002162034790000151
Calculating the electricityField AZ pair
Figure BDA0002162034790000152
Resultant force and vector of
Figure BDA0002162034790000153
Angle of (2)
Figure BDA0002162034790000154
Fourthly, calculating a new expansion point piHas a value of
Figure BDA0002162034790000155
The ExtendF function is used for expanding a track to a latest expansion point under the influence of an electric field; the expanding process is influenced by the electric field distribution AZ and the electric field intensity relation FieldE, the expanding accuracy is also influenced by the step distance delta step (defined) expanded forwards each time, Tail (l) is the tail end point of the expanded track l, and the latest expanding point pnewSatisfying the relationship; p is a radical ofnewExtndf (FieldE, AZ, Δ step, tail (l)). The Tail function returns a trace
Figure BDA0002162034790000156
The last element of (1), called end point for short, satisfies the relationship
Figure BDA0002162034790000157
The End function returns the End points of all tracks in the track list for updating BACKUP _ AZ, i.e. the End point of all tracks in the track list is updated
Figure BDA0002162034790000158
Wherein iNIs the length of the current AL; add function will update the development point pnewAdd to trace l, become the new end point of l, call l.Add (p)new) Then, the relationship is satisfied
Figure BDA0002162034790000159
As shown in fig. 12, point O21To be subjected to O22、O11、O1、O15The electric field forces given to it by the four points are respectively F1、F2、F3、F4Then a resultant force F1+F2+F3+F4Angle of direction of
Figure BDA00021620347900001510
The function FieldE satisfies the relationship:
Figure BDA00021620347900001511
where R is the radius of the circular charge with the identification point as the center, and fielde (R) is the electric field strength at a distance R from the center of the circular charge with one unit. The reason why the circular charges (two-dimensional electric field) are selected instead of the spherical charges (three-dimensional electric field) as the change rule of the field is that the environment avoided by the sign is in one plane (two-dimensional screen coordinate), and the electric field lines are prevented from being dissipated in the three-dimensional space by the charges serving as the identification points, so that the influence on the charges serving as other identification points in the same plane is weakened.
Wherein FieldE is a function of the electric field strength relationship of uniform circular charges in a two-dimensional electric field; r is the radius constant of the circular charge, and the value of R is small enough to simulate the point charge and prevent the calculation overflow, and usually R is approximately equal to 1.0E-5(ii) a The Circle is a Circle formed by a position P where the Circle center is located and a radius R, and satisfies the relation
Figure BDA0002162034790000161
r is the distance from the charge center, satisfying the relationship:
Figure BDA0002162034790000162
the segmented expressions respectively represent the change rule of the electric field intensity inside and outside the electric charge.
As shown in fig. 22, the program simulates the distribution of electric field lines in a two-dimensional or three-dimensional electric field for several points of charge, where FieldE satisfies the relationship:
Figure BDA0002162034790000163
in the procedure ofEach charge scatters electric field lines symmetrically around the plane. It can be seen that, in the process of moving outwards from the charges along the electric field lines, the electric field lines in the two-dimensional electric field are always uniform in area, while the electric field lines in the three-dimensional electric field are not uniformly distributed in the convex hull formed by the charges, but are uniform in area at the position far away from the convex hull, because in the three-dimensional space, the electric field intensity is sharply reduced at the position close to the charges, so that the resultant force of the electric field in the convex hull is caused, and the resultant force is changed dramatically due to slightly different spatial positions.
For track liNew expansion point p generated by E ALiThen p is addediIncorporated into the track,/i.add(pi) And call the following function to judge piWhether in the current envelope EXPENVLevelThe method comprises the following steps: BOOL (IsInEnveloop) (EXPENV)Level,pi) The IsInEnveloop function is executed as follows:
when the COV is composed of a single point or multiple points on the same straight line, the convex hull is a degenerate form:
if the COV is made up of a single point oo, then the THICK ═ Δ d is known0+Level×ΔdradThen its envelope EXPENVLevelIt degenerates into a circle:
Figure BDA0002162034790000164
thus piIn EXPENVLevelIs equivalent to: "judgment of piDistance value to oo
Figure BDA0002162034790000165
Whether less than THICK ".
If COV is composed of multiple points on the same straight line, [ oo ] is found outi]XThe minimum and maximum values (or oo)i]YValue min and max) of two points oo1Oo and oo2It is known that THICK ═ Δ d0+Level×Δdrad
Figure BDA0002162034790000171
And vector
Figure BDA0002162034790000172
Angle θ ═ Smartatan ([ oo)2]X-[oo1]X,[oo2]Y-[oo1]Y) Calculating a point P11,P12,P21,P22Respectively as follows:
Figure BDA0002162034790000173
thus piIn EXPENVLevelIs equivalent to: "p" isiIn that
Figure BDA0002162034790000174
On the straight line and
Figure BDA0002162034790000175
in a band-shaped region surrounded by straight lines, if piAt angle P11oo1P12Internal rule piGo to oo1If p is less than THICKiAt angle P21oo2P22Internal rule piGo to oo2Is less than THICK ", when the following Boolean expression value is TRUE, piIn EXPENVLevelInside:
Figure BDA0002162034790000176
wherein
Figure BDA0002162034790000177
The IsInEnveloop function is used for detecting whether a certain screen coordinate point is in a certain enveloping body or not; point is a screen coordinate POINT, ENVELOP is an envelope, a Boolean value BOOL belongs to { TRUE, FALSE }, and the relationship is satisfied: boul ═ isinenveloop (ENVELOP, POINT). Angelebetween judges whether theta is in theta1Through a clockwise direction to theta2In the range (including the boundary), returning a boolean value boul e { TRUE, FALSE }, and satisfying the relationship boul ═ Anglebetween (θ, θ)12)。
As shown in fig. 21The simulation program shows the degraded convex hull COV and the enveloping body EXPENV0Where N is 1, COV is formed of a single point, EXPENV0Is a circle; when N is 2, COV is reduced to a line segment (the boundary of COV is a closed broken line formed by two overlapped line segments), expeenv0Is a band-shaped closed body.
When the COV is composed of a plurality of points which are not on the same straight line, the convex hull is a non-degenerated general form, and the calculation is completed by the following steps:
(ii) generating EXPENVLevelExternal convex hull
Figure BDA0002162034790000181
Wherein
Figure BDA0002162034790000182
J is more than or equal to 1 and less than or equal to M, wherein
Figure BDA0002162034790000183
Since COV is non-degenerate, there is dP dV-dQ dU ≠ 0, so piIn COV' is equivalent to: "p" isiOn each side
Figure BDA0002162034790000184
Right side of (oo), when the following boolean expression value is TRUE, ooiInside the COV':
Figure BDA0002162034790000185
the polygon shown in FIG. 10
Figure BDA0002162034790000186
Is a convex hull
Figure BDA0002162034790000187
The circumscribed convex hull of (1) has two points P, Q respectively located inside and outside the circumscribed convex hull as shown in fig. 13, and it can be seen that P is always on the right side of each directed edge in the clockwise direction in the COV ', and the COV' directed edge where the point Q is located
Figure BDA0002162034790000188
To the left of (c).
②Pj、QjIs from oojStarting from this point, the COV 'is respectively provided with points oo'jTwo directed edges of
Figure BDA0002162034790000189
The point of the foot drop can be used to determine the envelope EXPENVLevelIs defined by a directed arc
Figure BDA00021620347900001810
And directed edges
Figure BDA00021620347900001811
A closed curve formed by connecting the two in series, wherein j is more than or equal to 1 and less than or equal to M, and p isiIn EXPENVLevelThe inner part is equivalent to: "p" isiLocated inside the outer convex hull COV', if piAt angle PjoojQjInternal rule piGo to oojIs less than THICK ", when the following Boolean expression value is TRUE, piIn the envelope EXPENVLevelInside:
Figure BDA00021620347900001812
wherein
Figure BDA00021620347900001813
As shown in FIG. 10, the boundary of the envelope ENVELOP is formed by
Figure BDA0002162034790000191
Figure BDA0002162034790000192
A closed curve formed by connecting the front and the rear in sequence if the point P is located at a position
Figure BDA0002162034790000193
Inside the enclosed area formed, P is then although in
Figure BDA0002162034790000194
But not in ENVELOP because P is at angle < P5o5Q5Inner and point o5Is greater than THICK of ENVELOPE.
After explaining the principle of the functions ExtendF and isinenveloop, the step S22 is performed as follows:
creating an index, initialized to 1, creating a constant N ', initialized to N' ═ length (al);
if index is more than N', returning AL;
obtaining track l'index=AL[index];
< creation of track l'indexNew expansion point newP ═ ExtendF (FieldE, AZ, Δ step, Tail'index)),l'index.add(newP);
Judging Boolean value BOOL IsInEnveloop (EXPENV)Level,newP),
If the value is TRUE, returning to the step (r),
otherwise, the index is equal to index +1, and the step is returned to.
As shown in fig. 14, when the algorithm completes the expansion of the Level-0 stage,
Figure BDA0002162034790000195
liextending to EXPENV0Boundary of (l)iThe end points are respectively as follows according to sequence numbers:
Figure BDA0002162034790000196
these points are located exactly in EXPENV in the trajectory0On the border or having gone beyond EXPENV0Points of the boundary, e.g. p (l)2212) in EXPENV0Otherwise, then IsInEnveloop (EXPENV)0,p(l22,12))==FALSE;p(l2211) in EXPENV0In, then IsInEnveloop (EXPENV)0,p(l22,11))==TRUE。
There is an extreme case where: when AO exhibits some special distribution, oiTrack l ofiNeed to pass through too many times of rubbingExhibition can reach EXPENVLevelBoundary of (2) or even no extension of EXPENVLevel. Therefore, the number of times of track expansion in the envelope needs to be limited, and the solution is as follows: as shown in FIG. 15, point o is identifiediTrack l ofiExcessive bending occurs,. liEnd point p ofiAnd oiIs a distance of
Figure BDA0002162034790000201
liLength of (2)
Figure BDA0002162034790000202
When in use
Figure BDA0002162034790000203
Or
Figure BDA0002162034790000204
When l is turned oniStop expanding and give up toiGenerate wiring and place tags.
Wherein the constant SD is an upper limit of the degree of track bending,
Figure BDA00021620347900002010
is an identification point oiTrack l ofiEnd point of
Figure BDA0002162034790000205
To oiThe distance of (a) to (b),
Figure BDA0002162034790000206
is a track liLength, degree of bending
Figure BDA0002162034790000207
Satisfy the relationship
Figure BDA0002162034790000208
When all the tracks to be expanded are in the same area as the AL, the expansion is suspended (the expansion is already extended to EXPENV)LevelOr the expansion stops due to an extreme condition (excessive buckling), and step S22 ends.
And step S23, screening out a partial track from the list and deleting the partial track from the list, wherein the surrounding ring can be surrounded by the label placed near the tail end point of the partial track. Step S23 includes the following steps S23a and S23 b.
Step S23a, calculating the azimuth angle of the connecting line for connecting each track end point in AL and the geometric gravity center WC of AO relative to the positive direction of the screen horizontal axis, and sorting the tracks according to the azimuth angle in the clockwise direction and updating the track index value in the list.
When all trajectories in AL reach EXPENVLevelWhen the boundary is in the boundary, calculating an included angle between a connecting line of each track terminal point and a geometric gravity center point WC of the AO and the positive direction of the X-direction of the screen abscissa axis, namely an azimuth angle value, and sequentially reading each terminal point according to the azimuth angle in the clockwise direction, and resetting the index value of the track related to the terminal point in the AL according to the sequence.
Wherein WC is the geometric center of gravity of the AO all points, satisfying the relationship
Figure BDA0002162034790000209
The list AL is reordered to update the positions of the trajectories in AL according to the positions of the end points of all the trajectories in AL with respect to the central point WC: AL ═ ReArrangeF (AL, WC). The function ReArrangeF is performed as follows:
returning AL when the number N' of elements in AL is less than or equal to 2;
l 'per trace'jL is satisfied'j=AL[j]L 'is obtained'jCurrent end point
Figure BDA0002162034790000211
Calculating each endPjAzimuth angle θ 'relative to gravity center WC of AO'j=Smartatan([endPj]X-[WC]X,[endPj]Y-[WC]Y) It is
Figure BDA0002162034790000212
In the clockwise direction to a directed edge
Figure BDA0002162034790000213
The included angle of (A); wherein Smartatan is a return P1Screen coordinates to P2Vector of screen coordinates
Figure BDA0002162034790000214
Unit vector corresponding to positive direction of X axis under screen coordinate reference system
Figure BDA0002162034790000215
Satisfies the relation of Smartatan ([ P ]2]X-[P1]X,[P2]Y-[P1]Y) The direction of theta is from
Figure BDA0002162034790000216
Clockwise to
Figure BDA0002162034790000217
The Onverside function determines a point P at which two points P are located1、P2Constructed vector
Figure BDA0002162034790000218
Where the enumeration variable enum POSITION { LEFT, RIGHT, ON } is returned, meaning that P is in
Figure BDA0002162034790000219
On the extended straight line, the return position variable Pos is equal to Onvectorside (P, P)1,P2)。
Fourthly, constructing a list
Figure BDA00021620347900002110
Selecting any two index values any1 and any2 in the theta List, and constructing the List
Figure BDA00021620347900002111
And θ LeftList ═ θ List- θ SortList;
if theta leftList is empty, then
Figure BDA00021620347900002112
Wherein kj}j=1,2,...,N'Is the index value before sorting, and establishes an empty list
Figure BDA00021620347900002113
The following sub-operations are performed:
creating an index u, initialising to u-1,
if u > N ', AL ═ AL', return AL,
ⅲ.
Figure BDA00021620347900002114
returning to the step ii when u is equal to u + 1;
selecting any index value any in the theta leftList, and enabling the theta 'to be theta leftList [ any ], the theta leftList to be theta leftList-theta';
creating an index, initialized to 1;
if index < Length (theta SortList), calculate Boolean value BOOL ═ Angelebetween (theta', theta SortList [ index ], theta SortList [ index +1]),
if not, theta SortList.
Ninthly, if BOOL is equal to TRUE and theta leftList is equal to theta leftList-theta ', inserting theta' after the element with index value in the list theta SortList: ad (index, theta'), return to step (v),
otherwise, the index is equal to index +1, and the procedure returns to step.
Wherein the rerarangef function is used to reorder all tracks in the track list in the list, specifically: firstly, determining a fixed point, connecting the tail end points of all tracks with the fixed point, reading the point corresponding to the tail end point of a certain track on each connecting line in the clockwise direction, recording the track sequence corresponding to the point, and arranging the track list according to the sequence; the function is generally used to update AL, and determine the position of its end point relative to the central point WC during AL expansion to determine which trajectories are adjacent to each other in a certain expansion stage, and satisfy the relationship AL ═ ReArrangeF (AL, WC).
As shown in FIG. 16, when the algorithm completes EXPENV0When expanding, can know1End point of
Figure BDA0002162034790000221
The azimuth angle with respect to the center of gravity point WC is
Figure BDA0002162034790000222
Similarly, it can be seen that
Figure BDA0002162034790000223
After performing the function operation AL ═ ReArrangeF (AL, WC),
Figure BDA0002162034790000224
the elements in (1) are rearranged, have
Figure BDA0002162034790000225
Step S23b, screening partial tracks from AL, sequentially connecting the tail end points of the partial tracks according to the track index values to form a broken line, connecting the head and the tail of the broken line to form a closed broken line, and deleting the partial tracks from the list; the surrounding ring can be surrounded by a label placed near the end point of the partial track.
Selecting as many tracks as possible from AL, connecting the end points of the tracks in turn according to the track index value to form a broken line, connecting the ends of the broken line to form a closed broken line, requiring that the average side length of the closed broken line (polygon) is approximately equal to the span of the space occupied by the sign, and deleting AL in the tracks.
The trajectory of the AL suitable for placing the label at its end point is deleted from the AL, since this part of the trajectory is no longer the trajectory to be expanded: AL ═ ReduceF (AL, Δ d)tan). The function reduce f is performed as follows:
when the number of elements N' in AL is length (AL) is less than or equal to 3, return to the empty list
Figure BDA0002162034790000231
L 'per trace'jL is satisfied'j=AL[j]L of'jCurrent end point
Figure BDA0002162034790000232
Building lists
Figure BDA0002162034790000233
Calculating closed broken line Ring formed by connecting points in EndPList end to endLevelOf circumference
Figure BDA0002162034790000234
Then RingLevelThe average side length of (a) is AvaL ═ C/N';
creating variables
Figure BDA0002162034790000235
Here, the
Figure BDA0002162034790000236
Is to round the symbol upwards and build an empty list
Figure BDA0002162034790000237
The following sub-operations are performed:
creating an index u, initialising to u-1,
if u > N ', AL ═ AL', return AL,
if (u + 1)% M'! 0, AL '. add (l'u) And u is u +1, and the step ii is returned.
The reduce F function is used for screening the track list, and the specific method comprises the following steps: inputting a track list, wherein the tail end points of all tracks are sequentially connected to form a closed broken line, a polygon is formed, points in the polygon are selected as many as possible to place a label, the tracks to which the rest points belong are required to be continuously expanded, and the track list is returned to a set formed by the tracks; this function is typically used to update AL, Δ dtanIs (defined) a circle along the polygonEquivalent dimensions of the plates placed without overlapping, satisfying the relationship AL ═ reduce f (AL, Δ d)tan)。
As shown in FIG. 16, when the algorithm completes EXPENV0After expanding and calling the function ReArrangeF, the track list
Figure BDA0002162034790000238
Then l'1=l1,l'2=l8,…,l'22=l20. Closed fold line Ring0Is formed by connecting elements in the following list end to end:
Figure BDA0002162034790000239
when executing the function operation AL ═ reduce F (AL, Δ d)tan) Then, M' can be obtained as 3, that is, the closed folding line Ring0The average side length of (a) is the sign dimension Δ d tan1/3 of (1). The size of the sign is when the center of the sign is at Ring0At a certain point endPtPerpendicular to the end PtThe span to the WC wiring direction is Δ dtan
When u is 1, (u + 1)% 3! 0, so trace l1The trajectory to be expanded is retained in the AL; when u is 2, (u + 1)% 3 is 0, so the trace l8Stopping expanding, and deleting AL from the expansion; analogizing the operation in turn, and updating the list to be expanded into
Figure BDA0002162034790000241
In step S24, it is determined whether there is any track in the current list. And if the AL is the empty list, indicating that all the tracks are expanded, switching to the step S26, otherwise, continuing to process the rest tracks to be expanded, and executing the step S25.
Step S25, if there is a track in the current list, the enclosure needs to be enlarged, and the process goes to step S22. Step S25 includes the following steps S25a to S25 d.
And step S25a, after the track expansion of each round is finished, temporarily storing the tail end point of each track in the current list in a variable to be used as an electric field used in the track expansion of the next round.
After the track expansion of each round is finished, the tail end point of each track in the AL is temporarily stored in a variable BACKUP _ AZ to be used as an electric field in the track expansion of the next round, so that the purpose of the method is to enhance the degree of influence of the tracks to be expanded on each other in the subsequent expansion process and shield the interference of the expanded tracks, and the generated tracks are more dispersed and more uniform.
BACKUP _ AZ is a variable for temporarily storing a charge point in the changed electric field, where N 'Length (AL), and a track l'jL is satisfied'j=AL[j]L of'jCurrent end point
Figure BDA0002162034790000242
Is updated to
Figure BDA0002162034790000243
As shown in FIG. 14, when the algorithm completes EXPENV0After calling functions ReArrangeF and ReduceF, the track list is updated to
Figure BDA0002162034790000244
Thus, the
Figure BDA0002162034790000245
Step S25b, continuing to expand a section of space under the action of the two-dimensional electric field of each track in the current list, wherein the expanded area is a thin sheet annular area formed between the enclosure and the transition enclosure until the tail end point of the track touches the edge of the enclosure; the transition enclosure is a transition region where the trajectory is properly adjusted just before the two-dimensional electric field is changed.
Each track in the AL continues to expand for a section of space under the action of the electric field in the step S22, and the expanded area is an expanded enveloping body TRANSENVLevelAnd transition envelope EXPENVLevelUntil the end point of the track is at TRANSENVLevelThe purpose of this is to adjust the shape of each trace in AL to ensure that the force of the updated electric field on AL is such that each trace extends far away, without the trace turning back in the direction close to COV.
Similar to step S22, the difference is that the expanding space of the trajectory AL is defined by an expanding envelope expeenvLevelChange to TRANSENVLevel. The trajectories in AL all extend to EXPENVLevelThe step of expanding is to change the track from EXPENVLevelTo TRANSENVLevelThe boundary of (2). This step ensures that BACKUP _ AZ is located in TRANSENVLevelInternally, the part of the track to be expanded is at TRANSENVLevelExternally, this ensures that the development of the tracks in the AL under the action of the electric field BACKUP _ AZ is outwardly divergent (TRANSENV)LevelConvex, charges located inside the convex body, the direction of the electric field at any point outside the convex body is far away from the convex body), no track is generated to TRANSENVLevelThe case of internal circuitous expansion.
As shown in FIG. 14, when the algorithm completes EXPENV0After calling functions ReArrangeF and ReduceF, the track list is updated to
Figure BDA0002162034790000251
Completion of TRANSENV0After the expansion, each trace is added with an expansion point, which is extended by a distance Δ step equal to 5, so that the end points of all traces in the trace list AL form a list as follows:
Figure BDA0002162034790000252
step S25c, the two-dimensional electric field is updated according to each track in the current list. The electric field AZ is updated by the value of BACKUP _ AZ, and the effect of the updated electric field on outward expansion of the track in the AL is more obvious.
The value of the updated AZ is AZ — BACKUP _ AZ, the correlation between the updated electric field and the elements in the current AL is stronger, and the interference of the part of the trajectory deleted in step S23b on the subsequent expansion process is eliminated, so that the intervals between the trajectories in the subsequent expansion process can more quickly reach a uniform state.
And S25d, expanding the enclosure by one circle outwards to meet the space requirement and restriction when the residual tracks in the current list continue to expand, and jumping to the step S22.
The variable Level is increased by 1, so that the enveloping body EXPENVLevelAnd expanding the AL by one circle outwards to meet the space requirement and constraint when the trace in the AL is expanded continuously, and jumping back to the step S22 after the step is executed.
At this time, the AL completes the expansion at the Level stage, updates the Level to Level +1, and prepares to execute the expansion process at the next stage.
As shown in fig. 24, the program simulates the whole process of trajectory expansion of the cluster with the number of identification points being 50, and draws the geometric objects used by the algorithm before step S26 on the interface, so as to comb the respective spatial relationships: the expansion process of the Level is 0,1 and 2 stages; EXPENVLevelIs a dark gray closed curve, TRANSENVLevelIs a light gray closed curve; in EXPENV0The periphery is allocated with 16 label positions in EXPENV117 label positions are allocated on the periphery, in EXPENV217 label positions are distributed on the periphery, and the total number of the label positions is 16+17+17 which is 50; the light black polygon is a convex hull COV; the light gray cross-star icon in the screenshot center region represents the center of gravity WC; the light gray broken line is a track, the starting point and the stopping point are respectively positioned on the identification point and the sign, and the track is divided into a plurality of relatively flat sections by an obvious turn in the middle of the track because the change of the electric field AZ causes the change of the expansion rule.
And step S26, if the track does not exist in the current list, converting the tracks spliced by the broken line segments into smoothly-transitional connecting lines through mathematical transformation.
And smoothing tracks (tracks starting from all the identification points) corresponding to each identification point in the AO, and converting tracks formed by splicing broken line segments into connecting lines through mathematical transformation, wherein the connecting lines are smoothly-transitional curves or straight lines.
Figure BDA0002162034790000261
All tracks have been generated,/iIs an identification point oiThe trajectory of (2). For simplicity, let l be li
Figure BDA0002162034790000262
Then
Figure BDA0002162034790000263
When the algorithm is initialized, the following preprocessing is carried out:
creating a constant variable SP, initializing SP to 27=128;
Creating constant list Combination, initializing to
Figure BDA0002162034790000271
Wherein
Figure BDA0002162034790000272
Creating a constant two-dimensional list Proavailability, and initializing as follows:
Figure BDA0002162034790000273
wherein Probasic [ i ]][t]=(1-(i-1)/SP)SP-t+1*((i-1)/SP)t-1,1≤i≤SP+1,1≤t≤SP+1;
And fourthly, updating the Proavailability in the updating list to obtain Proavailability [ i ] [ t ] - [ Combination [ i ] - [ Proavailability [ i ] [ t ].
Then, we perform Bezier smoothing on l to convert l's polyline into a relatively smooth transition polyline, which is an approximation to the smooth curve, i.e. perform l ═ somthf (l). The execution process of the SoomthF function is as follows:
if L is less than or equal to 2, returning to L;
create list TraceSP, initialized to: TraceSP [ 1]]=l[1]=p(l,1),TraceSP[SP+1]=l[L]=p(l,L)
Figure BDA0002162034790000274
Wherein j is more than or equal to 2 and less than or equal to SP;
update the element in track l with the list Proavailability and TraceSP:
Figure BDA0002162034790000275
wherein k is more than or equal to 1 and less than or equal to SP +1, l is converted into a track with the length fixed as SP +1, and l is returned.
Wherein, the SoomthF function is used to smooth a track l to become a connection line, that is: converting a broken line with possible direction mutation into a continuous and smooth curve, and satisfying the relation l ═ SoomthF (l); the smoothed curve (line) is also approximated by a broken line segment in nature, and the direction change amplitude between line segments is slight and visually appears as a smooth curve.
As shown in FIG. 17, when
Figure BDA0002162034790000281
When all the mark points finish the track expansion, executing li=SoomthF(li) And i is more than or equal to 1 and less than or equal to 22, all the tracks are converted into tracks with the length being fixed to 128, the points in the tracks are connected in a tail-in mode, the formed smooth broken line is visually consistent with an ideal curve, and the track is the finally formed connecting line. The verification proves that the connecting lines are the same as the non-smoothed tracks, and the connecting lines also meet the characteristics of mutual avoidance and uniform distribution.
As shown in fig. 23, a trajectory broken line, a segment subdivision approximation curve, and a Bezier connection line of the trajectory are simulated by program operation. The segment subdivision approximating curve is that each segment of the track is contracted 1/2 towards the midpoint of the segment, the contracted segments are connected together at a time to form a new fold line, and the process is repeated for the new fold line until the fold line converges into a smooth curve. The segment subdivision approximation curve in the figure is the result of 8 iterations. It can be seen that segment subdivision approaches cannot well smooth the trajectory broken line, the trend of severe bending of the trajectory broken line can be memorized, and Bezier connection line can well smooth the change mode between the head point and the tail point of the trajectory broken line, so that severe bending is avoided while the overall change trend is kept, and the weighting influence of the position of each point on the broken line on the whole curve is considered.
It should be noted that, in order to comply with the regulations of the civil aviation industry regarding the display of signs in air traffic control applications, it is recommended to use straight lines as the connecting lines from the identification points to the signs. Under such a requirement, step S26 is greatly simplified: let the first point (mark point) and the end point of the track be head and end respectively, so that there is head ═ p(l,1),end=p(l,L)Then the trajectory is converted into a simple straight line segment:
Figure BDA0002162034790000282
step S3 includes the following sub-steps S31 and S32.
In step S31, an arrow pointing to the sign is generated at all the link end points, and the direction of the arrow is aligned with the link end points as curved segments to ensure the visual effect is harmonious.
In step S31, the arrow direction of each link is determined as the tangent direction of the link end, and an arrow pointing in the direction is drawn at the link end, so that the generated arrow and the link are visually a harmonious whole.
Track of
Figure BDA0002162034790000283
Is a connecting line formed after smoothing processing, and the arrow point arrowp is generated by executing the process of arrowp-arrowm (l). The arrow is an isosceles triangle, the arrow point is the intersection of two equal sides of the triangle, let the constant Δ g be the height from the arrow point to the base, the constant be 1/2 of the opening angle from the arrow point to the base, and the constant Δ θ*Is the maximum deviation angle, the function ArrowM is performed as follows:
if L is less than 2, returning to null;
② calculating theta(L-1,L)=Smartatan([p(l,L)]X-[p(l,L-1)]X,[p(l,L)]Y-[p(l,L-1)]Y);
Establishing an index value k, and initializing to k as 1;
if L is 2 or k is not less than L-1, returning
Figure BDA0002162034790000291
Calculating theta(k,L)=Smartatan([p(l,L)]X-[p(l,k)]X,[p(l,L)]Y-[p(l,k)]Y);
Sixthly, calculating the angle p(l,k)p(l,L)p(l,L-1)=min{2π-|θ(L-1,L)(k,L)|,|θ(L-1,L)(k,L)|};
If delta theta < delta theta*Go back to
Figure BDA0002162034790000292
And k is k +1, and the process returns to the step (r).
The ArrowM function is used for generating an arrow of a connecting line end pointing to the sign, the generated arrow is consistent with the direction of the connecting line, the function returns to a coordinate point of the arrow, and a track liArrow point arrowp ofiSatisfy the relationship arrowpi=ArrowM(li)。
As shown in fig. 18, for
Figure BDA0002162034790000293
And connecting all the mark points to generate an arrow and placing the label. E.g. o11Connecting line l11Direction and vector of arrow
Figure BDA0002162034790000294
The directions of (a) and (b) are consistent:azimuth angle of
Figure BDA0002162034790000296
Figure BDA0002162034790000297
Azimuth angle of
Figure BDA0002162034790000298
Deviation angle Δ θ ═ min {2 pi- | θ(22,23)(7,23)|,|θ(22,23)(7,23)|}≈17°<Δθ*20 °; dot
Figure BDA0002162034790000299
Is a point
Figure BDA00021620347900002910
The minimum value of the medium k satisfies the condition that delta theta is less than delta theta*A point of (a); 30 is half of the angle from the top to the bottom of the arrow.
In step S32, the label is placed on the extended line indicated by the arrow at a position where the center of the label slides on the extended line until the arrow touches the boundary of the label from the outside of the label.
In step S32, the center position of the label is set in the direction pointed by the arrow of each link so that the center point of the label is on the tangent to the end of the link and the label is just in contact with the pointed end point of the arrow, and the current position where the label is located is set as the placement position of the label.
End point endp ═ p of trajectory l(l,L)And an arrow point arrowp of l, the center position tagp of the placard is generated by a process of performing tagp-Tagposition (endp, arrowp). The length and width of the known sign are constant deltaw and deltah respectively,*is the angle between the diagonal and the broadside (Δ w) of a rectangular sign:*smartatan (Δ w, Δ h), the function Tagposition is performed as follows:
calculating the azimuth angle theta of the arrowarrow=Smartatan([arrowp]X-[endp]X,[arrowp]Y-[endp]Y) And converted to a value in the interval [0,2 π): thetaarrow=(θarrow≥0)?θarrowarrow+2π;
Creating variables Δ x and Δ y, and initializing to be 0 for Δ x and 0 for Δ y;
③ if*≤θarrow<π-*Calculating
Figure BDA0002162034790000301
Δ y ═ Δ h/2, go step (c);
if pi-*≤θarrow<π+*Calculating Δ x ═ Δ w/2,
Figure BDA0002162034790000302
rotating step (c);
if pi +*≤θarrow<2π-*Calculating
Figure BDA0002162034790000303
Δ y ═ Δ h/2, go step (c);
sixthly, calculating the value of Deltax as Delaw/2,
Figure BDA0002162034790000304
creating variable tagp, initializing to
Figure BDA0002162034790000305
Returning tagp.
Wherein the Tagposition function is used for finding a position suitable for the display sign near the end of the connecting line, and the specific method is as follows: placing the central point of the label on a connecting line from the tail end of the connecting line to the arrow point, so that the boundary of the label touches the arrow point and the label does not overlap the connecting line or the arrow point; the function returns the coordinate position where the center of the sign should be placed, track liEnd point of
Figure BDA0002162034790000306
Track liArrow point arrowp ofiCenter of the label tagpiSatisfies the relationship tagpi=Tagposition(endpi,arrowpi). The length and width of the sign are constants Δ w and Δ h, respectively, and the dimensional metric of the sign is constant Δ d, satisfying the relationship
Figure BDA0002162034790000307
coefradAnd coeftanIs a coefficient, usually taking values in the interval [0.5,2.0 ]]Internal; constant Δ dradSatisfies the relation Δ drad=coefradX Δ d; constant Δ dtanSatisfies the relation Δ dtan=coeftanX Δ d; constant Δ dminSatisfies the relation Δ dmin≤Δdrad(ii) a The constant Deltastep satisfies the relationship Deltastep ≦ 0.5 × Deltadmin
It should be noted that 1/2, which is the flare angle from the arrow point to the arrow base, must satisfy < >*This is because ≧*It may result in an overlap of the triangle forming the arrow and the rectangle forming the sign.
As shown in fig. 18, for
Figure BDA0002162034790000311
And connecting all the mark points to generate an arrow and placing the label. E.g. o11Connecting line l11End point of
Figure BDA0002162034790000312
The arrow point is arrowp11=ArrowM(l11),*Approximately equal to 40 degrees. Arrow azimuth angle thetaarrow=Smartatan([arrowp11]X-[endp11]X,[arrowp11]Y-[endp11]Y) Calculated as thetaarrowIs approximately equal to 58 degrees and is positioned in the interval [ pi +*,2π-*) Between [220 °,320 °). 30 ° is known, which satisfies the algorithm requirement < ≦*
When calculating
Figure BDA0002162034790000313
Of each identification point oiOf the signiThen, o is mixediAssociated signage tagiMoving to this position:
Figure BDA0002162034790000314
the placement of the label is completed.
After the explanation of the sign avoidance method proposed in this embodiment is completed, the following description and analysis will be made on the effect after the operation.
Fig. 19 is a screenshot of the sign placement effect operation at the distribution of identification points at time T. The program simulates the movement mode of the aircraft in the busy airspace by placing 30 identification points in the convex polygon G with 33 sides, giving each identification point different movement speed and random initial direction, and changing the movement direction of the identification points through collision-rebound of the sides of the polygon. The distribution state of the identification points at a certain time T is used as the input of the algorithm, and the obtained sign placing result is shown in the figure.
From the screenshot, the operation effect meets the following 3-point requirements: connecting lines of each identification point and other identification points are separated and are not passed by the connecting lines; the connecting lines are separated from one another, and no cross exists; the signs are separated from the signs, and the signs are hardly covered by other signs; and fourthly, the identification point and the label are separated and do not belong to the same piece of divided space (inside the convex hull and outside the convex hull). Furthermore, a line of one identification point may pass through signs of other identification points, causing the signs to obscure part of the line, but this does not visually affect the continuity of the line.
After verifying the data state of the program during screenshot, the distribution of the generated connecting lines is relatively uniform, wherein the uniform definition is as follows: each link is approximately the same distance from the nearest link. Connecting wire liTo the connecting line ljDistance d (l) ofi,lj) The definition of (A) is:
Figure BDA0002162034790000321
connecting wire liDistance d (l) to nearest linki) The definition of (A) is: d (l)i)=min{d(li,lj) I ≠ j }; setting a total of N identification points, the average nearest distance of the connecting line
Figure BDA0002162034790000322
Then d (l)i) Variance of (2)
Figure BDA0002162034790000323
Is usually very small and satisfies
Figure BDA0002162034790000324
After verifying the data state of the program during screenshot, the placement of the label is relatively uniform, where the uniform definition is: each sign is approximately the same distance from the nearest sign. t is tiAnd tjIs the center point of the label,*=Smartatan(Δw,Δh),θ=Smartatan([ti]X-[tj]X,[ti]Y-[tj]Y),BOOL=(*≤θ<π-*)∧(-π+*≤θ<-*),
Figure BDA0002162034790000325
d(i,j)*=d(ti,tj) - (BOOL? Δ h/sin θ Δ h/cos θ), the distance d (i, j) from index i sign to index j sign is defined as: d (i, j) ═ d (i, j)*<0)?0:d(i,j)*(ii) a The distance from the sign with index i to the nearest sign is defined as: d (i) ═ min { d (i, j) | i ≠ j }; setting a total of N signs, the average nearest distance of the signs
Figure BDA0002162034790000326
Then the variance of d (i)
Figure BDA0002162034790000327
Is usually very small and satisfies
Figure BDA0002162034790000328
The effect of the sign avoidance method proposed in this embodiment is verified below.
To verify the efficiency of the algorithm, a long run of simulation is required. And testing whether the arrangement of the sign by the algorithm meets the requirement of mutual avoidance in the scene of each form by the distribution of the identification points of different forms.
A test framework as in FIG. 19 was designed that contained three loop threads, Thread-1, Thread-2, and Thread-3. Each circulation thread comprises three parts of a data set, a processing module and a thread waiting part:
firstly, Thread-1 is a motion simulation module marked as a dense dotted workflow, an input and output data set is ' all identification points expressed as two-dimensional screen coordinate points ', a processing module is ' a function set for judging whether the identification points of uniform linear motion are in contact with the boundaries of convex polygons, if so, the motion direction is changed according to complete elastic collision, otherwise, the original motion mode is continuously kept ', and Thread waiting is ' Thread dormancy T after the processing module is executed1Duration of 50ms ".
Thread-2 is a sign algorithm module marked as a solid-line workflow, the input data set is 'all identification points expressed as two-dimensional screen coordinate points', the output data set is 'all sign center point positions expressed as two-dimensional screen coordinate points', the processing module is 'a function set for selectively executing' fixed arrangement method 'or' cluster algorithm 'by judging whether the identification points form clusters, and Thread waiting is' Thread dormancy T after executing the processing module2Duration of 100ms ".
Thread-3 is a coverage statistics module marked as a sparse dotted workflow, the input data set is a function set of ' the position of the center point of the whole sign expressed as a two-dimensional screen coordinate point ', the output data set is a ' coverage value ', the processing module is a function set of ' calculating the ratio of the pixel occupied by the union set graphics ' of all signs distributed on the screen to the ' sum of all sign pixel areas ', and the Thread waiting is ' Thread dormancy T after executing the processing module3Duration of 500ms ".
Under the test framework, the avoidance effect evaluation of the cluster algorithm on the statistical level is obtained through operation simulation. As shown in fig. 25, a screenshot of the simulation program for evaluating the avoidance effect satisfies the following constraint conditions:
firstly, 30 identification points collide and rebound in a 45-side convex polygon area to ensure that a dense cluster is formed;
in order to meet the industrial standard, straight line segments are used as connecting lines;
calculating and counting the coverage rate of a fixed arrangement method and a cluster algorithm at the same time;
and thirdly, obtaining data of coverage rate after long-time operation.
And observing the effect of program operation and finding: after the straight line segment is used as a connecting line between the identification point and the label, the separation of the connecting lines of the identification point and other identification points can still be well ensured; secondly, separating the connecting line from the connecting line; thirdly, the label is separated from the label; and fourthly, separating the identification points from the labels.
The light black label is a component formulated according to the fixed placement method, and the light gray label is a component formulated according to the clustering algorithm. Under the condition that the identification points form clusters, the former cannot realize the separation of the labels and the signs, so that the labels are highly overlapped; the labels of the latter basically realize complete avoidance and meet the characteristic of uniform distribution.
Further illustrated with statistical data: after about 160 hours of continuous operation test, the real-time coverage rate and the historical average coverage rate of the fixed setting method and the clustering algorithm are respectively calculated, when the coverage index rate eta is displayed, the change degree of the coverage rate p is highlighted, and the 4-time root of the coverage rate is adopted, namely the root of the coverage rate p
Figure BDA0002162034790000341
As a display numerical value.
At time T shown in the screenshot, the average historical coverage of the fixed placement method and the clustering algorithm is 0.86 and 0.09 respectively, and then the average historical coverage p of the fixed placement method is1=0.86454.7%, historical average coverage p of cluster algorithm2=0.0940.0066%, it can be seen that p2<<<p1The cluster algorithm has an obvious effect on label avoidance under the condition that the identification points are densely distributed, the historical average coverage rate of the cluster algorithm is lower than one ten thousandth, and complete label avoidance is basically realized.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (9)

1. A sign avoidance method, comprising the steps of:
s1, determining all the identification points of the label to be placed, and judging whether all the identification points are in a cluster state according to the distribution density of all the identification points;
s2, if all the identification points are in the cluster state, generating a connecting line for connecting the identification points and the label according to the electric field model;
step S2 includes the following substeps:
step S21, establishing a list for storing the tracks to be expanded, wherein the list comprises the tracks starting from all the identification points;
step S22, establishing an enclosure for enclosing all the identification points and tracks, wherein the tracks in the list extend outwards in an expanding manner and are uniformly dispersed until the tracks extend to the boundary of the enclosure and then are suspended for expansion;
step S23, screening out partial tracks from the list and deleting the partial tracks from the list, wherein the surrounding ring can be surrounded by a label placed near the tail end point of the partial tracks;
step S24, judging whether there is any track in the current list;
step S25, if there is a track in the current list, the enclosure needs to be enlarged, and the step S22 is skipped;
step S26, if there is no track in the current list, the tracks spliced by the broken line segments are converted into smooth transition connecting lines through mathematical transformation;
s3, placing a label at the established position of the end point of the connecting line;
wherein the electric field model is: simulating a mark point as a charge and a connecting line as an electric field line, and establishing a two-dimensional electric field according to all mark points moving to the current moment; any two connecting lines originating from the same identification point are not intersected, and any two connecting lines originating from different identification points are also not intersected; when the charge amount of each identification point in the two-dimensional electric field is equal and the number of the scattered connecting lines is also equal, the interval between the adjacent connecting lines tends to be uniform along with the outward scattering process of the connecting lines.
2. The sign avoidance method according to claim 1, wherein the step S1 includes the substeps of:
step S11, acquiring all visible identification points in the screen range at the current moment;
step S12, judging whether the distribution density of all the identification points exceeds a preset threshold value;
step S13, if the distribution density of all the identification points exceeds a preset threshold value, all the identification points are in a cluster state;
and step S14, if the distribution density of all the identification points does not exceed a preset threshold value, switching to a grid marking method or a collision detection method for sign avoidance.
3. The sign avoidance method according to claim 1, wherein the step S3 includes the substeps of:
step S31, generating arrows pointing to the signs at all the connecting line terminal points, wherein the direction of the arrows is consistent with the direction of the connecting line terminal points which are curve segments so as to ensure the harmony and consistency of the visual effect;
in step S32, the label is placed on the extended line indicated by the arrow, and the label is placed at a position where the center of the label slides on the extended line until the arrow touches the boundary of the label from the outside of the label.
4. The sign avoidance method according to claim 1, wherein in step S22, each trajectory in the list is expanded in a direction of electric field lines by an electric field force of the two-dimensional electric field until an end point of the trajectory touches an edge of the enclosure.
5. The sign avoidance method according to claim 1, wherein the step S23 includes the steps of:
step S23a, calculating the azimuth angle of the connecting line for connecting the end point of each track with the geometric gravity center points of all the identification points relative to the positive direction of the horizontal axis of the screen, sequencing the tracks according to the azimuth angle in the clockwise direction and updating the track index values of the tracks in the list;
step S23b, screening partial tracks from the list, sequentially connecting the tail end points of the partial tracks according to the track index values to form a fold line, connecting the head and the tail of the fold line to form a closed fold line, and deleting the partial tracks from the list; the surrounding ring can be surrounded by a label placed near the end point of the partial track.
6. The sign avoidance method according to claim 1, wherein the step S25 includes the steps of:
step S25a, after the track expansion of each round is finished, temporarily storing the tail end point of each track in the current list in a variable to be used as an electric field used in the track expansion of the next round;
step S25b, continuing to expand a section of space under the action of the two-dimensional electric field of each track in the current list, wherein the expanded area is a thin sheet annular area formed between the enclosure and the transition enclosure until the tail end point of the track touches the edge of the enclosure; the transition surrounding ring is a transition area for properly adjusting the track before the two-dimensional electric field is changed;
step S25c, updating a two-dimensional electric field according to each track in the current list;
step S25d, expanding the enclosure by one circle to meet the space requirement and restriction when the remaining tracks in the current list continue to expand, and jumping to the step S22.
7. The sign avoidance method according to claim 3, wherein in step S31, the arrow direction of each link is determined to be a tangential direction of the link end, and an arrow pointing in the direction is drawn at the link end so that the generated arrow and the link are visually a harmonious whole.
8. The sign escape method according to claim 3, wherein in step S32, the center position of the sign is set in a direction in which the arrow of each link points so that the center point of the sign is on a tangent to the end of the link and the sign just touches the end point of the arrow tip, and the current position at which the sign is located is set as the placement position of the sign.
9. The sign escape method according to claim 1, wherein in step S22, if the trajectory of the identification point is excessively bent, the generation of the connection line and the placement of the sign are abandoned for the identification point.
CN201910735481.3A 2019-08-09 2019-08-09 Sign avoiding method Active CN110796903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910735481.3A CN110796903B (en) 2019-08-09 2019-08-09 Sign avoiding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910735481.3A CN110796903B (en) 2019-08-09 2019-08-09 Sign avoiding method

Publications (2)

Publication Number Publication Date
CN110796903A CN110796903A (en) 2020-02-14
CN110796903B true CN110796903B (en) 2020-10-27

Family

ID=69427446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910735481.3A Active CN110796903B (en) 2019-08-09 2019-08-09 Sign avoiding method

Country Status (1)

Country Link
CN (1) CN110796903B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580213B (en) * 2020-12-24 2024-07-05 北京砍石高科技有限公司 Method and device for generating display image of electric field lines and storage medium
CN113448476B (en) * 2021-07-26 2023-11-24 中国电子科技集团公司第十四研究所 Interactive display method of multi-target sign
CN117197408B (en) * 2023-09-15 2024-07-16 南京芯传汇电子科技有限公司 Automatic avoiding method, device, medium and equipment for label based on osgEarth D simulation environment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5227786A (en) * 1989-06-30 1993-07-13 Honeywell Inc. Inside/out perspective format for situation awareness displays
CN102930749A (en) * 2012-10-17 2013-02-13 北京东进记录科技有限公司 Method and device for displaying labels of aerial targets

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5227786A (en) * 1989-06-30 1993-07-13 Honeywell Inc. Inside/out perspective format for situation awareness displays
CN102930749A (en) * 2012-10-17 2013-02-13 北京东进记录科技有限公司 Method and device for displaying labels of aerial targets

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Force-Based Label Number Maximization;Dietmar Ebner,et al.;《ResearchGate》;20030131;全文 *
优化的标牌自动避让算法;马超等;《计算机工程与设计》;20120930;第33卷(第9期);全文 *
基于MWF改进的航迹标牌避让算法;毛坚桓等;《信息化研究》;20160229;第42卷(第1期);全文 *

Also Published As

Publication number Publication date
CN110796903A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN110796903B (en) Sign avoiding method
US10489913B2 (en) Methods and apparatuses, and computing devices for segmenting object
Levinshtein et al. Turbopixels: Fast superpixels using geometric flows
CA2419818C (en) System and method for automatic placement of labels for interactive graphics applications
Frishman et al. Multi-level graph layout on the GPU
CN109345540B (en) Image processing method, electronic device and storage medium
EP3506160A1 (en) Semantic segmentation of 2d floor plans with a pixel-wise classifier
CN110908510B (en) Application method of oblique photography modeling data in immersive display equipment
US8676552B2 (en) Methods and apparatus for simulation of fluid motion using procedural shape growth
EP3822586B1 (en) Systems and methods for labeling areas on an airport map
CN112287913B (en) Intelligent supervisory system for fish video identification
De Waen et al. Scalable multirotor UAV trajectory planning using mixed integer linear programming
Lacoste et al. Coronary tree extraction from X-ray angiograms using marked point processes
CN111881919A (en) Intelligent line element simplification method and device based on tracking type grid subdivision
US20030218617A1 (en) Information presentation apparatus and method in three-dimensional virtual space and computer program therefor
Puligandla et al. A multiresolution approach for large real-world camera placement optimization problems
CN102800125B (en) Large-scale point cloud selection method for supporting lasso
US11907846B2 (en) Learning and propagating visual attributes
Chang et al. Hierarchical simplification of city models to maintain urban legibility.
Alonso et al. Automatic uav-based airport pavement inspection using mixed real and virtual scenarios
JP2017146102A (en) Radioactive ray position specification device, radioactive ray position specification method, and program for radioactive ray position specification
US10607387B2 (en) Techniques for generating dynamic illustrations using principles of animation
De Gyves et al. Proximity queries for crowd simulation using truncated Voronoi diagrams
Zhao et al. Predicting the spread of forest diseases and pests
JPH07271847A (en) Method and device for modeling formation ground

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant