CN113391736B - Method and device for determining object connection line, storage medium and electronic equipment - Google Patents

Method and device for determining object connection line, storage medium and electronic equipment Download PDF

Info

Publication number
CN113391736B
CN113391736B CN202011391051.3A CN202011391051A CN113391736B CN 113391736 B CN113391736 B CN 113391736B CN 202011391051 A CN202011391051 A CN 202011391051A CN 113391736 B CN113391736 B CN 113391736B
Authority
CN
China
Prior art keywords
group
boundary
points
coordinates
scale
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
CN202011391051.3A
Other languages
Chinese (zh)
Other versions
CN113391736A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011391051.3A priority Critical patent/CN113391736B/en
Publication of CN113391736A publication Critical patent/CN113391736A/en
Application granted granted Critical
Publication of CN113391736B publication Critical patent/CN113391736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for determining an object connection line, a storage medium and electronic equipment. Wherein, the method comprises the following steps: acquiring a first group of coordinates of a first group of key points on the first object in a target coordinate system and a second group of coordinates of a second group of key points on the second object in the target coordinate system; determining a first point array according to the first group of coordinates and the second group of coordinates; determining a first group of positions of the first group of key points in the first lattice, and determining a second group of positions of the second group of key points in the first lattice; a first link is determined in the first lattice based on the first set of locations and the second set of locations. The invention solves the technical problem that the drawing board is interfered by the connecting line.

Description

Method and device for determining object connection line, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for determining an object connection line, a storage medium, and an electronic device.
Background
In a designer collaboration product in which draft viewing, sharing, and collaboration are primary functions, logical links appear as secondary functions. An orthogonal logic connection line mostly appears in a professional flowchart product, but the connection line always covers or passes through a drawing board node, as shown in fig. 1, the connection line passes through the drawing board node in the prior art, and the coverage or the passing of the connection line interferes with the drawing board node.
In the related art, an effective solution does not exist at present for the problem that the drawing board is interfered by the connecting line.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining object connecting lines, a storage medium and electronic equipment, which are used for at least solving the technical problem that a drawing board is interfered by the connecting lines.
According to an aspect of the embodiments of the present invention, a method for determining an object connection line is provided, including: acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, wherein the first object and the second object are objects to be connected, the first group of key points comprise boundary points and central points of the first object, and the second group of key points comprise boundary points and central points of the second object; determining a first lattice according to the first set of coordinates and the second set of coordinates; determining a first set of positions of the first set of keypoints in the first lattice, and determining a second set of positions of the second set of keypoints in the first lattice, wherein the first set of positions is used for representing the actual size of the first object, and the second set of positions is used for representing the actual size of the second object; and determining a first connecting line in the first dot matrix according to the first group of positions and the second group of positions, wherein the first connecting line connects a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connecting line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
According to another aspect of the embodiments of the present invention, there is provided an apparatus for determining an object connecting line, including: the system comprises an acquisition module, a comparison module and a display module, wherein the acquisition module is used for acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, the first object and the second object are objects to be connected, the first group of key points comprise boundary points and center points of the first object, and the second group of key points comprise boundary points and center points of the second object; the first determining module is used for determining a first dot matrix according to the first set of coordinates and the second set of coordinates; a second determining module, configured to determine a first set of locations of the first set of keypoints in the first lattice, and determine a second set of locations of the second set of keypoints in the first lattice, where the first set of locations is used for representing an actual size of the first object, and the second set of locations is used for representing an actual size of the second object; a third determining module, configured to determine a first connection line in the first dot matrix according to the first group of positions and the second group of positions, where the first connection line connects a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connection line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the method for determining the object connecting line when the computer program runs.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method for determining an object connection line through the computer program.
In the embodiment of the invention, a first set of coordinates of a first set of key points on a first object in a target coordinate system and a second set of coordinates of a second set of key points on a second object in the target coordinate system are obtained; determining a first point array according to the first group of coordinates and the second group of coordinates; determining a first group of positions of the first group of key points in the first lattice, and determining a second group of positions of the second group of key points in the first lattice; according to the first group of positions and the second group of positions, a first connecting line is determined in the first dot matrix, and a first area defined by the first connecting line and the first group of positions and a second area defined by the second group of positions are not overlapped, so that the purposes of logically connecting the line and not covering the first object and the second object are achieved, and the technical problem that the drawing board is interfered by the connecting line is further solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a diagram illustrating an alternative prior art connection through a palette node in accordance with an embodiment of the present invention;
fig. 2 is a schematic diagram of an application environment of an optional object link determination method according to an embodiment of the present invention;
FIG. 3 is a flowchart of an alternative method for determining object links according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of key points in an alternative actual coordinate map according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative way-finding algorithm according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an alternative division of a palette into 3x3 grids with obstacles according to an embodiment of the present invention;
FIG. 7 is a first schematic diagram of coordinates of an alternative keypoint in a dot matrix, according to an embodiment of the invention;
FIG. 8 is a diagram illustrating coordinates of an alternative keypoint in a dot matrix, according to an embodiment of the present invention;
FIG. 9 is a first diagram illustrating an alternative boundary point, according to an embodiment of the present invention;
FIG. 10 is a second schematic diagram of an alternative boundary point in accordance with an embodiment of the present invention;
FIG. 11 is a first alternative dot matrix diagram according to an embodiment of the invention;
FIG. 12 is a third schematic diagram of an alternative boundary point in accordance with an embodiment of the present invention;
FIG. 13 is a second alternative first dot matrix diagram in accordance with embodiments of the present invention;
FIG. 14 is a schematic diagram of key points in an alternative virtual coordinate map, in accordance with embodiments of the present invention;
FIG. 15 is a schematic diagram of an alternative second lattice according to an embodiment of the present invention;
FIG. 16 is an alternative second wiring diagram according to embodiments of the invention;
FIG. 17 is an alternative schematic diagram of the overlay of the abscissa of the drawing board according to the embodiment of the invention;
FIG. 18 is a schematic diagram of an alternative second wire and transition of the first wire in accordance with embodiments of the invention;
fig. 19 is a schematic structural diagram of an alternative apparatus for determining an object connecting line according to an embodiment of the present invention;
fig. 20 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a method for determining an object connecting line is provided, optionally, as an optional implementation manner, the method for determining an object connecting line may be applied to, but not limited to, a system environment as shown in fig. 2, where the system environment may include: user device 102, network 110, and server 112.
Optionally, in this embodiment, the user equipment may be a terminal device, and may include but is not limited to at least one of the following: the Mobile phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, an MID (Mobile Internet Devices), a PAD, a desktop computer, an intelligent household device (such as an intelligent television, an intelligent washing machine, an intelligent air conditioner, etc.), etc. The user device may be a configuration target client, which may be a design client, a video client, an instant messaging client, a browser client, an educational client, a shopping client, and the like. In this embodiment, the user equipment may be, but is not limited to: memory 104, processor 106, and display 108. The memory 104 may be used to store data, such as a first set of locations of the first set of keypoints in the first lattice and a second set of locations of the second set of keypoints in the first lattice. The processor may be configured to process a first set of locations of the first set of keypoints in the first lattice and a second set of locations of the second set of keypoints in the first lattice. The display 108 may be used to display the first wires in the first lattice.
Optionally, the network 110 may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication.
Alternatively, the server 112 may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The server 112 may be, but is not limited to: a database 114 and a processing engine 116. The database 114 may be used to store data, for example, a first set of locations of the first set of keypoints in the first lattice and a second set of locations of the second set of keypoints in the first lattice. The processing engine is configured to process the first set of locations and the second set of locations, for example, to determine a first connection in the first lattice based on the first set of locations and the second set of locations.
The above is only an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 3, the method for determining the object connection line includes:
step 302, acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, wherein the first object and the second object are objects to be connected, the first group of key points include boundary points and center points of the first object, and the second group of key points include boundary points and center points of the second object;
step 304, determining a first lattice according to the first set of coordinates and the second set of coordinates;
step 306, determining a first set of positions of the first set of the keypoints in the first lattice, and determining a second set of positions of the second set of the keypoints in the first lattice, wherein the first set of the positions is used for representing the actual size of the first object, and the second set of the positions is used for representing the actual size of the second object;
step 308, determining a first connecting line in the first dot matrix according to the first group of positions and the second group of positions, wherein the first connecting line connects a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connecting line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
Through the steps, a first group of coordinates of a first group of key points on the first object in a target coordinate system and a second group of coordinates of a second group of key points on the second object in the target coordinate system are obtained; determining a first point array according to the first group of coordinates and the second group of coordinates; determining a first group of positions of the first group of key points in the first lattice, and determining a second group of positions of the second group of key points in the first lattice; according to the first group of positions and the second group of positions, a first connecting line is determined in the first dot matrix, and a first area defined by the first connecting line and the first group of positions and a second area defined by the second group of positions are not overlapped, so that the purposes of logically connecting the line and not covering the first object and the second object are achieved, and the technical problem that the drawing board is interfered by the connecting line is further solved.
As an alternative embodiment, the first object and the second object may be two design objects in a design platform, for example, a design drawing board, a circuit board, and the like. In this embodiment, taking the design draft drawing board as an example, the drawing board may be a rectangular area with a fixed size, and a designer may add a plurality of layer contents therein to form a design drawing. The two design drawing boards can be connected through a logic connecting line, and the logic connecting line can be used for representing the relation between the two design drawing boards. The two design draft drawing boards can also be connected through an orthogonal connecting line, and the difference between the two design draft drawing boards and the logic connecting line is that the orthogonal connecting line is a line formed by connecting a plurality of straight lines which form a right angle of 90 degrees.
As an optional implementation mode, in the product with the design draft viewing, sharing and cooperation as the main function, the logic connection line appears in the auxiliary function, and the connection line between the drawing boards automatically determines the access anchor points to be connected into a curve according to the relative positions of the drawing boards. Compared with the orthogonal straight line of the traditional flow chart, the scheme for realizing the pure straight line and the curve between the two rectangles is lighter and faster, and only two rectangle gaps need to be determined, and the two adjacent middle points are respectively taken as a starting point and an end point, so that the straight line or the curve can be directly drawn. And the starting point and the end point of the connecting line are customized, so that the jump logic between the design drafts, such as the logic of the previous page, the next page, the upturning logic, the downturning logic and the like, can be more clearly and intuitively represented.
As an optional implementation manner, taking the first object and the second object as rectangular areas of the drawing board in the design platform as an example, the target coordinate system may be an actual coordinate map in the design platform, and center points and boundary points of the first object and the second object may be selected as key points, as shown in fig. 4, the diagram of key points in the actual coordinate map according to the optional embodiment of the present invention is shown, the rectangular area represented by the upper left corner in fig. 4 is the first object, the area represented by the lower corner is the second object, the boundary points and the center points on the first object constitute a first group of key points of the first object, and the boundary points and the center points on the second object constitute a second group of key points of the second object.
As an alternative embodiment, the first dot matrix may be a dot matrix determined according to key points of the first object and the second object in the actual coordinate map, and a connection line between the first object and the second object is determined according to positions of the first object and the second object in the first dot matrix, where the connection line does not cover and pass through the two drawing boards. Specifically, the optimal path between two rectangles for specifying the entry point can be found through a routing algorithm. The route finding algorithm is mainly used for finding a route with the shortest path in the map in the shortest time. Fig. 5 is a schematic diagram of a route-finding algorithm according to an alternative embodiment of the present invention, where gray dots in fig. 5 represent a start point and an end point of a connection line, a black dot is used to represent an obstacle, a line segment from the start point will avoid the obstacle and connect to the end point, the route-finding algorithm may open a path upward, and then a next more efficient turning point is found according to a position distance from the end point, and the connection line between the start point and the end point will avoid the obstacle and will not cover or cross the obstacle.
As a preferred embodiment, the drawing board may be abstracted into a 3 × 3 grid rectangle, and the upper left, upper right, middle left, lower left, and lower right points of the rectangle are set as the obstacle markers, and the upper middle, middle left, middle right, and lower middle four points are optional connecting line endpoints, so that after processing, the line segment starting from the endpoints will avoid the obstacle. Fig. 6 is a schematic diagram of a 3 × 3 grid with obstacles partitioned by a drawing board according to an alternative embodiment of the present invention, where a point indicated by an arrow in fig. 6 may be a departure end point of a logical connection line, for example, an upper middle point may be the departure end point of the logical connection line. The upper left, lower left, upper right and lower right of the drawing board are all obstacles, such as the marked points shown in black in fig. 6, the drawing board is abstracted into a rectangle of a 3x3 grid, the obstacle at the marked point naturally opens up a path through a routing algorithm, and then the next more efficient turning point is searched according to the position distance from the end point. In the process, the connecting line between the drawing boards can avoid the drawing boards. Because the obstacle avoided by the second connecting line in the map can not pass through the drawing board, the connecting line is converted into the connecting line in the actual coordinate map and can not pass through the drawing board, and therefore the problem that the drawing board is interfered by the fact that the connecting line passes through the drawing board is solved.
As an alternative implementation, the grid shown in fig. 4 may be converted into a lattice, coordinates of key points of the first object and the second object in the grid shown in fig. 4 are obtained, the first lattice corresponding to the grid shown in fig. 4 may be determined according to the key point coordinates, and the coordinates of the key points of the first object and the second object in the lattice may be determined. Fig. 7 is a schematic diagram showing coordinates of key points in a dot matrix according to an alternative embodiment of the invention, where the coordinates of a first group of key points of a first object in the dot matrix are (x 1, y 1), (x 1+ w1/2, y 1), (x 1+ w1, y 1), (x 1, y1+ h 1/2), (x 1+ w1/2, y1+ h 1/2), (x 1+ w1, y1+ h 1/2), (x 1, y1+ h 1), (x 1+ w1/2, y1+ h 1), and (x 1+ w1, y1+ h 1), respectively. The coordinates of the second object in the lattice are (x 2, y 2), (x 2+ w2/2, y 2), (x 2+ w2, y 2), (x 2, y2+ h 2/2), (x 2+ w2/2, y2+ h 2/2), (x 2+ w2, y2+ h 2/2), (x 2, y2+ h 2), (x 2+ w2/2, y2+ h 2), and (x 2+ w2, y2+ h 2). In this embodiment, the grids are converted into the dot matrixes, so that the connection lines between the drawing boards are determined in the dot matrixes, and then the connection lines of the drawing boards determined in the virtual map can be converted into the actual coordinate map, so that the technical effect that the drawing boards are not affected by the connection lines is achieved.
Optionally, the determining the first lattice according to the first set of coordinates and the second set of coordinates includes: under the condition that the first object and the second object do not overlap on the abscissa axis and the ordinate axis in the target coordinate system, determining the first dot matrix according to a first mode according to the first group of coordinates and the second group of coordinates; and under the condition that the first object and the second object are overlapped on the abscissa axis and/or the ordinate axis in the target coordinate system, determining the first lattice according to the first group of coordinates and the second group of coordinates and a second mode.
As an optional implementation, the following situations may occur in the two drawing boards in the actual coordinate map: the horizontal coordinates and the vertical coordinates are not overlapped, the horizontal coordinates are overlapped, the total vertical coordinates are not overlapped, the horizontal coordinates are not overlapped, the vertical coordinates are not overlapped, and the horizontal coordinates and the vertical coordinates are overlapped. For example, the abscissa and ordinate of the two drawing boards represented in the first diagram of the coordinates of the key points in the actual coordinate map shown in fig. 4 are not overlapped, and the second diagram of the coordinates of the key points in the actual coordinate map shown in fig. 8 is shown in which the abscissa and ordinate of the two drawing boards are overlapped and the ordinate of the two drawing boards are not overlapped.
Optionally, the determining the first lattice according to the first set of coordinates and the second set of coordinates according to a first method includes: acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group boundary point and the second group boundary point, the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates, setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
As an optional embodiment, for two drawing boards whose horizontal and vertical coordinates do not overlap, the first lattice may be determined as follows:
step S1, respectively acquiring boundary points on the transverse boundary of the first object and longitudinal boundary points on the longitudinal boundary, and respectively acquiring boundary points on the transverse boundary of the second object and longitudinal boundary points. The first and second boundaries are transverse boundaries and the third and fourth boundaries are longitudinal boundaries. Specifically, as shown in the boundary point diagram one of fig. 9, the first boundary may include a boundary formed by the boundary point 1, the boundary point 2, and the boundary point 3, the second boundary may include a boundary formed by the boundary point 9, the boundary point 10, and the boundary point 11, the third boundary may include a boundary formed by the boundary point 3, the boundary point 4, and the boundary point 5, and the fourth boundary may include a boundary formed by the boundary point 11, the boundary point 12, and the boundary point 13.
And S2, sequencing the boundary points on the transverse boundary according to the sequence of the coordinate values from small to large, and sequencing the boundary points on the longitudinal boundary according to the sequence of the coordinate values from small to large to obtain the transverse and longitudinal coordinate scales in the first dot matrix. Specifically, the boundary points on the first boundary and the second boundary may be sorted in the order of descending abscissa values, for example, in fig. 9, the boundary point 1, the boundary point 2, the boundary point 3, the boundary point 9, the boundary point 10, and the boundary point 11 are sorted in the order of descending abscissa values, and the abscissa of the sorted boundary point 1, the boundary point 2, the boundary point 3, the boundary point 9, the boundary point 10, and the boundary point 11 is taken as the abscissa scale in the first dot matrix. Sorting the boundary points on the third boundary and the fourth boundary according to the sequence of the vertical coordinate values from small to large, sorting the boundary points 3, 4 and 5, the boundary points 11, the boundary points 12 and the boundary points 13 according to the sequence of the vertical coordinate values from small to large in the corresponding graph 9, and taking the vertical coordinates of the boundary points 3, 4 and 5, the boundary points 11, the boundary points 12 and the boundary points 13 obtained by sorting as the vertical coordinate scale in the first dot matrix.
And S3, adding an abscissa and an ordinate to a coordinate array formed by the first object and the second object. In this embodiment, the first object and the second object shown in fig. 9 form a 6 × 6 grid, and a grid needs to be added between the two panels and on the upper, lower, left, and right sides of the panels, respectively, so as to form a 9 × 9 grid. Specifically, abscissa scales may be added to the left and right sides of the abscissa scale, and the added abscissa scale on the left side is the first abscissa scale, which is the smallest abscissa after sorting. The abscissa scale added on the right side is the third abscissa scale which is the maximum abscissa after sorting. Adding the abscissa scale between two adjacent boundary points of the first object and the second object is a second abscissa scale, for example, adding the abscissa scale between the boundary point 3 and the boundary point 9 in fig. 9. For the ordinate, ordinate scales can be added above and below the determined ordinate scale of the first dot matrix, and the ordinate scale added above is the first ordinate scale and is the smallest ordinate after sorting. The ordinate scale added below is the third ordinate scale, which is the maximum ordinate after sorting. Adding the ordinate scale between two adjacent boundary points of the first object and the second object as the second ordinate scale, for example, adding the ordinate scale between the boundary point 5 and the boundary point 11 in fig. 9, the first lattice corresponding to the grid shown in fig. 9 may be the lattice shown in fig. 7.
Through the steps, the 6x6 grid formed by the two drawing boards can be converted into the 9x9 grid, and because the new grid is added in the 9x9 grid, more paths can be provided for the routing algorithm, so that the purpose that the drawing board connecting line cannot cover or penetrate through the drawing board is achieved.
Optionally, the setting of the first transverse coordinate scale, the second transverse coordinate scale and the third transverse coordinate scale in the first dot matrix includes: when the sorted abscissas comprise 2N abscissas, and the first N abscissas in the 2N abscissas are the abscissas of the first group of boundary points, and the last N abscissas in the 2N abscissas are the abscissas of the second group of boundary points, setting the first abscissa scale to be smaller than the 1 st abscissa in the first N abscissas, setting the second abscissa scale to be located between the nth abscissa and the N +1 abscissas in the 2N abscissas, and setting the third abscissa scale to be larger than the last 1 abscissas in the last N abscissas, where N is a natural number larger than 1; the setting first longitudinal coordinate scale, second longitudinal coordinate scale and third longitudinal coordinate scale in the first dot matrix include: the ordinate after the sequencing includes 2N ordinates, just first N ordinates in 2N ordinates are under the condition that the ordinate of first group boundary point, last N ordinates in 2N ordinates are the ordinate of second group boundary point, will first longitudinal coordinate scale sets up to be less than the 1 st ordinate in the first N ordinates, will third longitudinal coordinate scale sets up to be located between the nth ordinate and the (N + 1) th ordinate in 2N ordinates, will third longitudinal coordinate scale sets up to be greater than last 1 ordinate in the last N ordinates.
As an optional implementation manner, taking the above N as 3 as an example, the drawing board is a rectangle composed of 3x3 coordinate points formed by 3 abscissas and 3 ordinates, and the 3x3 coordinate points form a 3x3 grid, that is, the drawing board is abstracted to be a rectangle composed of 3x3 grids. The two panels form a 6x6 grid. A 9x9 grid can be formed by adding a grid between two drawing boards and on the upper, lower, left and right sides of the drawing boards. Specifically, abscissa scales may be added to the left and right sides of the abscissa scale, and the added abscissa scale on the left side is the first abscissa scale, which is the smallest abscissa after sorting. The abscissa scale added on the right side is the third abscissa scale which is the maximum abscissa after sorting. The abscissa scale is added between two adjacent boundary points of the first object and the second object to form a second abscissa scale, for example, the abscissa scale is added between the boundary point 3 and the boundary point 9 in fig. 9. For the ordinate, ordinate scales can be added above and below the determined ordinate scale of the first dot matrix, and the ordinate scale added above is the first ordinate scale and is the smallest ordered ordinate. The ordinate scale added below is the third ordinate scale, which is the maximum ordinate after sorting. The ordinate scale is added between two boundary points adjacent to the first object and the second object as a second ordinate scale, for example, the ordinate scale is added between the boundary point 5 and the boundary point 11 in fig. 9. Therefore, a 6x6 grid formed by the two drawing boards can be converted into a 9x9 grid, and since a new grid is added in the 9x9 grid, more paths can be provided for a routing algorithm, and the purpose that drawing board connecting lines cannot cover or penetrate through the drawing boards is achieved. In the present embodiment, N =3 is only for illustrating the present embodiment, and is not limited herein, and the value of N may be selected according to actual situations, and may be, for example, 4, 5, 6, and the like. The added first abscissa, second abscissa, third abscissa, and the number of the first ordinate, the second ordinate, and the third ordinate may be determined according to actual conditions, for example, the first abscissa, the second abscissa, and the third abscissa, and the number of the first ordinate, the second ordinate, and the third ordinate may be set to 2, and the 6 × 6 grid formed by two panels may be converted into a 12 × 12 grid. In this embodiment, a new grid is added to provide more paths for the routing algorithm, so that the effect that the drawing board connecting line does not cover or pass through the drawing board is achieved.
Optionally, the determining the first lattice according to the first set of coordinates and the second set of coordinates in a second manner includes: acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; under the condition that the first object and the second object are overlapped on the abscissa axis in the target coordinate system, setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum abscissa in the sorted abscissas, the second transverse coordinate scale and the third transverse coordinate scale are larger than the maximum abscissa in the sorted abscissas, and the second transverse coordinate scale is smaller than the third transverse coordinate scale; setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
As an alternative embodiment, for two drawing boards with overlapped horizontal and vertical coordinates and non-overlapped vertical coordinates, the first lattice may be determined as follows:
step S1, respectively acquiring boundary points on a transverse boundary and longitudinal boundary points on a longitudinal boundary of a first object, and respectively acquiring boundary points on a transverse boundary and longitudinal boundary points on a transverse boundary of a second object. The first boundary and the second boundary are transverse boundaries, and the third boundary and the fourth boundary are longitudinal boundaries. Specifically, as shown in the boundary point diagram two shown in fig. 10, the first boundary may include a boundary formed by the boundary point 1, the boundary point 2, and the boundary point 3, the second boundary may include a boundary formed by the boundary point 9, the boundary point 10, and the boundary point 11, the third boundary may include a boundary formed by the boundary point 3, the boundary point 4, and the boundary point 5, and the fourth boundary may include a boundary formed by the boundary point 11, the boundary point 12, and the boundary point 13.
And S2, sequencing the boundary points on the transverse boundary according to the sequence of the coordinate values from small to large, and sequencing the boundary points on the longitudinal boundary according to the sequence of the coordinate values from small to large to obtain the transverse and longitudinal coordinate scales in the first dot matrix. Specifically, the boundary points on the first boundary and the second boundary may be sorted in the order of descending abscissa values, for example, in fig. 10, the boundary point 1, the boundary point 2, the boundary point 3, the boundary point 9, the boundary point 10, and the boundary point 11 are sorted in the order of descending abscissa values, and the abscissa of the boundary point 1, the boundary point 2, the boundary point 9, the boundary point 3, the boundary point 10, and the boundary point 11, which is a sorting result, is taken as the abscissa scale in the first dot matrix. Sorting the boundary points on the third boundary and the fourth boundary according to the sequence from small to large of the ordinate values, sorting the boundary points 3, 4, 5, 11, 12 and 13 according to the sequence from small to small of the ordinate in fig. 10, and using the ordinate of the sorted boundary points 3, 4, 5, 11, 12 and 13 as the ordinate scale in the first dot matrix.
And S3, adding coordinate scales in a coordinate array formed by the first object and the second object. Specifically, the abscissa scales may be added to the left and right sides of the abscissa scale, and the first abscissa scale may be added to the left side, which is the smallest abscissa after sorting. And a second abscissa scale and a third abscissa scale are added on the right side, and the third abscissa is the maximum abscissa after sorting. For the ordinate, ordinate scales can be added above and below the ordinate scale, and the ordinate scale added above is the first ordinate scale and is the smallest ordered ordinate. The ordinate scale added below is the third ordinate scale, which is the maximum ordinate after sorting. The ordinate scale is added between two adjacent boundary points of the first object and the second object as a second ordinate scale, for example, the ordinate scale is added between the boundary point 5 and the boundary point 11 in fig. 10. The first lattice corresponding to the grid shown in fig. 10 may be the lattice shown in fig. 11.
Through the steps, the two drawing boards can be converted into the 9x9 grids, and because the new grids are added in the 9x9 grids, more paths can be provided for the routing algorithm, so that the purpose that the drawing board connecting lines cannot cover or penetrate through the drawing boards is achieved.
Optionally, the determining the first lattice according to the first set of coordinates and the second set of coordinates in a second manner includes: acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; under the condition that the first object and the second object are overlapped on the ordinate axis in the target coordinate system, setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum ordinate in the sorted ordinate coordinates, the second longitudinal coordinate scale and the third longitudinal coordinate scale are larger than the maximum ordinate in the sorted ordinate coordinates, and the second longitudinal coordinate scale is smaller than the third longitudinal coordinate scale; setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
As an alternative embodiment, for two drawing boards with non-overlapped horizontal and vertical coordinates and overlapped vertical coordinates, the first lattice may be determined as follows:
step S1, respectively acquiring boundary points on the transverse boundary of the first object and longitudinal boundary points on the longitudinal boundary, and respectively acquiring boundary points on the transverse boundary of the second object and longitudinal boundary points. The first boundary and the second boundary are transverse boundaries, and the third boundary and the fourth boundary are longitudinal boundaries. Specifically, as shown in the boundary point diagram three shown in fig. 12, the first boundary may include a boundary formed by the boundary point 1, the boundary point 2, and the boundary point 3, the second boundary may include a boundary formed by the boundary point 9, the boundary point 10, and the boundary point 11, the third boundary may include a boundary formed by the boundary point 3, the boundary point 4, and the boundary point 5, and the fourth boundary may include a boundary formed by the boundary point 11, the boundary point 12, and the boundary point 13.
And S2, sequencing the boundary points on the transverse boundary according to the sequence of the coordinate values from small to large, and sequencing the boundary points on the longitudinal boundary according to the sequence of the coordinate values from small to large to obtain the transverse and longitudinal coordinate scales in the first dot matrix. Specifically, the boundary points on the first boundary and the second boundary may be sorted in the descending order of the abscissa values, for example, in fig. 12, the boundary point 1, the boundary point 2, the boundary point 3, the boundary point 9, the boundary point 10, and the boundary point 11 are sorted in the descending order of the abscissa values, and the abscissa of the sorted boundary point 1, the boundary point 2, the boundary point 3, the boundary point 9, the boundary point 10, and the boundary point 11 is taken as the abscissa scale in the first dot matrix. Sorting the boundary points on the third boundary and the fourth boundary according to the sequence from small to large of the ordinate values, sorting the boundary points 3, 4 and 5, the boundary points 11, 12 and 13 according to the sequence from small to small of the ordinate in the corresponding graph 12, and using the ordinate of the sorted boundary points 11, 12, 3, 13, 4 and 5 as the ordinate scale in the first dot matrix.
And S3, adding coordinate scales in a coordinate array formed by the first object and the second object. Specifically, the abscissa scale may be added to the left and right of the abscissa scale, and the first abscissa scale may be added to the left, which is the smallest abscissa after sorting. And a third abscissa scale is added on the right side, the third abscissa is the maximum abscissa after sorting, and the second abscissa scale is added between two adjacent boundary points of the first object and the second object, for example, the abscissa scale is added between the boundary point 3 and the boundary point 9 in fig. 12. For the ordinate, ordinate scales can be added above and below the determined ordinate scale of the first dot matrix, and the ordinate scale added above is the first ordinate scale and is the smallest ordered ordinate. A second ordinate scale and a third ordinate scale are added below, the third ordinate scale is the maximum ordinate after sorting, and the first lattice corresponding to the grid shown in fig. 12 may be the lattice shown in fig. 13.
Through the steps, the two drawing boards can be converted into the 9x9 grids, and because the new grids are added in the 9x9 grids, more paths can be provided for the routing algorithm, so that the purpose that the drawing board connecting lines cannot cover or penetrate through the drawing boards is achieved.
Optionally, said determining a first connection line in the first lattice according to the first set of positions and the second set of positions comprises: converting the first group of positions into a third group of positions in a second dot matrix, and converting the second group of positions into a fourth group of positions in the second dot matrix, wherein the dots in the second dot matrix are uniformly distributed, and the dots in the first dot matrix and the dots in the second dot matrix have a one-to-one correspondence relationship; determining a second connecting line in the second dot matrix according to the third group of positions and the fourth group of positions, wherein the second connecting line connects a third boundary point in the third group of positions and a fourth boundary point in the fourth group of positions, and a third area surrounded by the second connecting line and the third group of positions and a fourth area surrounded by the fourth group of positions are not overlapped; and converting the second connecting line into the first connecting line in the first dot matrix, wherein the first boundary point corresponds to the third boundary point, and the second boundary point corresponds to the fourth boundary point.
As an alternative embodiment, the second lattice may be a lattice in a virtual coordinate map. The virtual coordinate map formed by the second dot matrix and the actual coordinate map formed by the first dot matrix can be in one-to-one correspondence, and key points of the drawing board in the first dot matrix can be converted into corresponding key points in the virtual coordinate map according to the mapping relationship between the actual coordinate map and the virtual coordinate map. Fig. 14 is a schematic diagram of key points in a virtual coordinate map according to an alternative embodiment of the present invention, and fig. 15 is a schematic diagram of a second lattice according to an alternative embodiment of the present invention, in which coordinate points are uniformly distributed, and the coordinate points in the second lattice have a one-to-one correspondence with the coordinate points in the first lattice, for example, the coordinate points (x 1, y 1) in fig. 7 have a one-to-one correspondence with the coordinate points (1, 1) in fig. 15. Because the coordinate points in the second dot matrix are uniformly distributed, calculation can be facilitated, the connecting lines between the drawing boards are determined in the second dot matrix, and the connecting lines between the drawing boards determined in the second dot matrix are converted into an actual coordinate map according to the mapping relation between the second dot matrix and the first dot matrix, so that the speed of connecting the drawing boards can be improved.
Optionally, the determining a second line in the second lattice according to the third group of positions and the fourth group of positions includes: determining a first set of obstacle points and a first end point in the third set of locations, and a second set of obstacle points and a second end point in the fourth set of locations, wherein the first set of obstacle points includes points in the third set of locations corresponding to respective vertices and a center point of the first object, the first end point is a point in the third set of locations corresponding to a first point on a boundary of the first object, the first point is not a vertex of the first object, the second set of obstacle points includes points in the fourth set of locations corresponding to respective vertices and a center point of the second object, the second end point is a point in the fourth set of locations corresponding to a second point on a boundary of the second object, the second point is not a vertex of the second object; and determining the second connecting line in the second dot matrix according to the first group of barrier points, the first end point, the second group of barrier points and the second end point, wherein the second connecting line avoids the first group of barrier points and the second group of barrier points and connects the first end point and the second end point.
As an optional embodiment, the upper left, upper right, middle, lower left and lower right points of the drawing board may be set as obstacle marks, and the upper middle, left middle, right middle and lower middle points are optional end points of the connecting line. For example, the black mark point in fig. 15 is an obstacle point, and the first end point may be a point on the boundary line other than the obstacle point, for example, a midpoint of the boundary line. Taking the dot matrix shown in fig. 15 as an example, the connecting line from the end point of the first object avoids the obstacle. For example, if the upper middle point of the first object is used as the starting end point of the logical connection, and the left, lower, and right sides thereof are all obstacles, the routing algorithm will naturally open a path upward to connect to the second end point of the second object, and the connection formed between the first end point and the second end point is the second connection, as shown in fig. 16, which is a schematic diagram of the second connection according to the optional embodiment of the present invention, and the second connection shown in the diagram avoids the obstacle point of the drawing board, so that the drawing board will not be interfered by the connection.
Optionally, in a case where the first overlapped part in the first object overlaps with the second overlapped part in the second object on an abscissa axis and/or an ordinate axis in a target coordinate system, determining a first group of obstacle points in the third group of positions includes: setting the first set of obstacle points to include points of the third set of locations corresponding to respective vertices and a center point of the first object, and points of the third set of locations corresponding to the first overlap portion; determining a second set of obstacle points in the fourth set of locations, comprising: setting the second set of obstacle points to include points of the fourth set of locations corresponding to respective vertices and a center point of the second object, and points of the fourth set of locations corresponding to the second overlap portion.
As an optional implementation manner, there is a case where two drawing boards overlap, as shown in fig. 17, which is a schematic diagram of overlapping abscissa of the drawing boards according to an optional embodiment of the present invention, where an upper drawing board in the drawing is a first object, and a lower drawing board in the drawing is a second object. The abscissas of the two panels overlap, in which case the abscissas of all the key points of the first object overlap with the abscissas of part of the key points of the second object, in which case the upper left, lower left, upper right and lower right points and the middle points are selected as the obstacle points in the first object, and the upper left, lower left, upper right, lower right, middle points are selected as the obstacle points in the second object, and the points overlapping the abscissas of the first object, as indicated by black marks in fig. 17. The mode of selecting barrier points by the longitudinal coordinate overlapping is the same as the mode of selecting barrier points by the transverse coordinate overlapping, and points with the longitudinal coordinate overlapping are selected as the barrier points.
Optionally, said determining the second line in the second lattice according to the first group of obstacle points, the first endpoint, the second group of obstacle points, and the second endpoint includes: and determining a shortest path between the first end point and the second end point in the second lattice according to the first group of barrier points, the first end point, the second group of barrier points and the second end point, and determining the shortest path as the second connecting line, wherein the shortest path avoids the first group of barrier points and the second group of barrier points.
As an optional implementation, after determining the obstacle point and the end point of the drawing board, the end points of the two drawing boards may be connected according to a routing algorithm, and the obstacle point is avoided. After the second connection line is determined in the virtual coordinate map, the second connection line may be mapped to the actual coordinate map according to a mapping relationship between the virtual coordinate map and the actual coordinate map to obtain the first connection line, as shown in fig. 18, which is a schematic conversion diagram of the second connection line and the first connection line according to the embodiment of the present invention, a right portion in the diagram is the second connection line in the virtual coordinate map, and a left portion is the first connection line mapped to the actual coordinate map. In this embodiment, the problem that the connecting line passes through or covers the drawing board can be avoided, and the effect that the drawing board is not interfered by the connecting line is achieved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art will appreciate that the embodiments described in this specification are presently preferred and that no acts or modules are required by the invention.
According to another aspect of the embodiment of the present invention, an apparatus for determining an object connecting line is further provided, which is used for implementing the method for determining an object connecting line. As shown in fig. 19, the apparatus includes: an obtaining module 1902, configured to obtain a first set of coordinates of a first set of key points on a first object in a target coordinate system and a second set of coordinates of a second set of key points on a second object in the target coordinate system, where the first object and the second object are objects to be connected, the first set of key points includes boundary points and center points of the first object, and the second set of key points includes boundary points and center points of the second object; a first determining module 1904, configured to determine a first lattice according to the first set of coordinates and the second set of coordinates; a second determining module 1906, configured to determine a first set of locations of the first set of keypoints in the first lattice, and determine a second set of locations of the second set of keypoints in the first lattice, wherein the first set of locations is used for representing an actual size of the first object, and the second set of locations is used for representing an actual size of the second object; a third determining module 1908, configured to determine a first connection line in the first dot matrix according to the first group of locations and the second group of locations, where the first connection line connects a first boundary point in the first group of locations and a second boundary point in the second group of locations, and a first area surrounded by the first connection line and a second area surrounded by the second group of locations are not overlapped.
Optionally, the apparatus is further configured to determine the first lattice in a first manner according to the first set of coordinates and the second set of coordinates when the first object and the second object do not overlap on both an abscissa axis and an ordinate axis in the target coordinate system; and under the condition that the first object and the second object are overlapped on the abscissa axis and/or the ordinate axis in the target coordinate system, determining the first lattice according to the first group of coordinates and the second group of coordinates and a second mode.
Optionally, the apparatus is further configured to obtain a first set of boundary points on a first boundary and a third set of boundary points on a third boundary in the first set of coordinates, and obtain a second set of boundary points on a second boundary and a fourth set of boundary points on a fourth boundary in the second set of coordinates, where the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates; setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
Optionally, the above apparatus is further configured to, in a case that the sorted abscissas include 2N abscissas, and a first N abscissas in the 2N abscissas are the abscissas of the first group of boundary points, and a second N abscissas in the 2N abscissas are the abscissas of the second group of boundary points, set the first abscissa scale to be smaller than a 1 st abscissas in the first N abscissas, set the second abscissa scale to be located between an nth abscissa and an N +1 th abscissa in the 2N abscissas, and set the third abscissa scale to be larger than a last 1 abscissas in the second N abscissas, where N is a natural number larger than 1; the ordinate after the sequencing includes 2N ordinates, just first N ordinates in 2N ordinates are the ordinate of first group boundary point, last N ordinates in 2N ordinates are under the condition of the ordinate of second group boundary point, will first ordinate scale sets up to be less than the 1 st ordinate in first N ordinates will second ordinate scale sets up to be located between the nth ordinate and the (N + 1) th ordinate in 2N ordinates, will third ordinate scale sets up to be greater than last 1 ordinate in last N ordinates.
Optionally, the apparatus is further configured to obtain a first set of boundary points on a first boundary and a third set of boundary points on a third boundary in the first set of coordinates, and obtain a second set of boundary points on a second boundary and a fourth set of boundary points on a fourth boundary in the second set of coordinates, where the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; under the condition that the first object and the second object are overlapped on the abscissa axis in the target coordinate system, setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum abscissa in the sorted abscissas, the second transverse coordinate scale and the third transverse coordinate scale are larger than the maximum abscissa in the sorted abscissas, and the second transverse coordinate scale is smaller than the third transverse coordinate scale; setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
Optionally, the apparatus is further configured to obtain a first set of boundary points on a first boundary and a third set of boundary points on a third boundary in the first set of coordinates, and obtain a second set of boundary points on a second boundary and a fourth set of boundary points on a fourth boundary in the second set of coordinates, where the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; under the condition that the first object and the second object are overlapped on the ordinate axis in the target coordinate system, setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum ordinate in the sorted ordinate axes, the second longitudinal coordinate scale and the third longitudinal coordinate scale are larger than the maximum ordinate in the sorted ordinate axes, and the second longitudinal coordinate scale is smaller than the third longitudinal coordinate scale; setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates; and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
Optionally, the apparatus is further configured to convert the first group of positions into a third group of positions in a second dot matrix, and convert the second group of positions into a fourth group of positions in the second dot matrix, where dots in the second dot matrix are uniformly distributed, and dots in the first dot matrix and dots in the second dot matrix have a one-to-one correspondence; determining a second connecting line in the second dot matrix according to the third group of positions and the fourth group of positions, wherein the second connecting line is connected with a third boundary point in the third group of positions and a fourth boundary point in the fourth group of positions, and the second connecting line is not overlapped with a third area surrounded by the third group of positions and a fourth area surrounded by the fourth group of positions; and converting the second connecting line into the first connecting line in the first dot matrix, wherein the first boundary point corresponds to the third boundary point, and the second boundary point corresponds to the fourth boundary point.
Optionally, the apparatus is further configured to determine a first group of obstacle points and a first end point in the third group of positions, and determine a second group of obstacle points and a second end point in the fourth group of positions, wherein the first group of obstacle points includes points in the third group of positions corresponding to respective vertices and a center point of the first object, the first end point is a point in the third group of positions corresponding to a first point on a boundary of the first object, the first point is not a vertex of the first object, the second group of obstacle points includes points in the fourth group of positions corresponding to respective vertices and a center point of the second object, the second end point is a point in the fourth group of positions corresponding to a second point on a boundary of the second object, and the second point is not a vertex of the second object; and determining the second connecting line in the second dot matrix according to the first group of barrier points, the first end point, the second group of barrier points and the second end point, wherein the second connecting line avoids the first group of barrier points and the second group of barrier points and connects the first end point and the second end point.
Optionally, the apparatus is further configured to set the first set of obstacle points to include points of the third set of locations corresponding to respective vertices and a center point of the first object, and points of the third set of locations corresponding to the first overlap portion; determining a second set of obstacle points in the fourth set of locations, comprising: setting the second set of obstacle points to include points of the fourth set of locations corresponding to respective vertices and a center point of the second object, and points of the fourth set of locations corresponding to the second overlap portion.
Optionally, the apparatus is further configured to determine a shortest path between the first endpoint and the second endpoint in the second lattice according to the first set of obstacle points, the first endpoint, the second set of obstacle points, and the second endpoint, and determine the shortest path as the second connection line, where the shortest path avoids the first set of obstacle points and the second set of obstacle points.
According to another aspect of the embodiment of the present invention, there is further provided an electronic device for implementing the method for determining an object connection line, where the electronic device may be a terminal device or a server shown in fig. 2. The present embodiment takes the electronic device as a terminal device as an example for explanation. As shown in fig. 20, the electronic device comprises a memory 2002 and a processor 2004, the memory 2002 having stored therein a computer program, the processor 2004 being arranged for executing the steps of any of the method embodiments described above by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, wherein the first object and the second object are objects to be connected, the first group of key points comprise boundary points and center points of the first object, and the second group of key points comprise boundary points and center points of the second object;
s2, determining a first dot matrix according to the first group of coordinates and the second group of coordinates;
s3, determining a first group of positions of the first group of key points in the first lattice, and determining a second group of positions of the second group of key points in the first lattice, wherein the first group of positions are used for representing the actual size of the first object, and the second group of positions are used for representing the actual size of the second object;
and S4, determining a first connecting line in the first dot matrix according to the first group of positions and the second group of positions, wherein the first connecting line is connected with a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connecting line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 20 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 20 is a diagram illustrating a structure of the electronic device. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 20, or have a different configuration than shown in FIG. 20.
The memory 2002 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for determining an object connection line in the embodiment of the present invention, and the processor 2004 executes various functional applications and data processing by running the software programs and modules stored in the memory 2002, that is, the method for determining an object connection line is implemented. The memory 2002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 2002 can further include memory located remotely from the processor 2004, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 2002 may be specifically, but not limited to, used to store information such as a first set of positions of the first object in the first lattice and a second set of positions of the second object in the first lattice. As an example, as shown in fig. 20, the memory 2002 may include, but is not limited to, an obtaining module 1902, a first converting module 1904, a determining module 1906, and a second converting module 1908 of the determining device of the object connection. In addition, other module units in the above-mentioned device for determining an object connection line may also be included, but are not limited to this, and are not described in detail in this example.
Optionally, the transmitting device 2006 is configured to receive or transmit data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 2006 includes a Network adapter (NIC) that can be connected to a router via a Network cable to communicate with the internet or a local area Network. In one example, the transmitting device 2006 is a Radio Frequency (RF) module used to communicate with the internet via wireless means.
In addition, the electronic device further includes: a display 2008 for displaying the first connection line; and a connection bus 2010 for connecting the respective module components in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. The nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, and other electronic devices, may become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above. Wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, wherein the first object and the second object are objects to be connected, the first group of key points comprise boundary points and center points of the first object, and the second group of key points comprise boundary points and center points of the second object;
s2, determining a first dot matrix according to the first group of coordinates and the second group of coordinates;
s3, determining a first group of positions of the first group of key points in the first lattice, and determining a second group of positions of the second group of key points in the first lattice, wherein the first group of positions are used for representing the actual size of the first object, and the second group of positions are used for representing the actual size of the second object;
and S4, determining a first connecting line in the first dot matrix according to the first group of positions and the second group of positions, wherein the first connecting line is connected with a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connecting line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be essentially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described in detail in a certain embodiment.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method for determining an object connecting line is characterized by comprising the following steps:
acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, wherein the first object and the second object are objects to be connected, the first group of key points comprise boundary points and center points of the first object, and the second group of key points comprise boundary points and center points of the second object;
under the condition that the first object and the second object do not overlap on an abscissa axis and an ordinate axis of the target coordinate system, acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis;
sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in a first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix;
setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates;
setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates;
each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix;
determining a first set of positions of the first set of keypoints in the first lattice and determining a second set of positions of the second set of keypoints in the first lattice, wherein the first set of positions is used for representing the actual size of the first object and the second set of positions is used for representing the actual size of the second object;
and determining a first connecting line in the first dot matrix according to the first group of positions and the second group of positions, wherein the first connecting line connects a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connecting line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
2. The method of claim 1, wherein after obtaining a first set of coordinates of a first set of keypoints on the first object in a target coordinate system and a second set of coordinates of a second set of keypoints on the second object in the target coordinate system, further comprising:
and under the condition that the first object and the second object are overlapped on the abscissa axis and/or the ordinate axis in the target coordinate system, determining the first lattice according to the first group of coordinates and the second group of coordinates and a second mode.
3. The method of claim 1,
the setting first horizontal coordinate scale, second horizontal coordinate scale and third horizontal coordinate scale in the first dot matrix include: setting the first abscissa scale to be less than a 1 st abscissa of the first N abscissas, the second abscissa scale to be between an Nth abscissa and an N +1 th abscissa of the 2N abscissas, and the third abscissa scale to be greater than a last 1 abscissa of the last N abscissas, where the sorted abscissas include 2N abscissas, and a first N abscissas of the 2N abscissas are the abscissas of the first set of boundary points, and a last N abscissas of the 2N abscissas are the abscissas of the second set of boundary points, wherein,
n is a natural number greater than 1;
the setting first longitudinal coordinate scale, second longitudinal coordinate scale and third longitudinal coordinate scale in the first dot matrix include: the ordinate after the sequencing includes 2N ordinates, just first N ordinates in 2N ordinates are the ordinate of first group boundary point, last N ordinates in 2N ordinates are under the condition of the ordinate of second group boundary point, will first ordinate scale sets up to be less than the 1 st ordinate in first N ordinates will second ordinate scale sets up to be located between the nth ordinate and the (N + 1) th ordinate in 2N ordinates, will third ordinate scale sets up to be greater than last 1 ordinate in last N ordinates.
4. The method of claim 2, wherein determining the first lattice in a second manner based on the first set of coordinates and the second set of coordinates comprises:
acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis;
sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix;
under the condition that the first object and the second object are overlapped on the abscissa axis in the target coordinate system, setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum abscissa in the sorted abscissas, the second transverse coordinate scale and the third transverse coordinate scale are larger than the maximum abscissa in the sorted abscissas, and the second transverse coordinate scale is smaller than the third transverse coordinate scale;
setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates;
and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
5. The method of claim 2, wherein determining the first lattice in a second manner based on the first set of coordinates and the second set of coordinates comprises:
acquiring a first group of boundary points on a first boundary and a third group of boundary points on a third boundary in the first group of coordinates, and acquiring a second group of boundary points on a second boundary and a fourth group of boundary points on a fourth boundary in the second group of coordinates, wherein the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis;
sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in the first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix;
under the condition that the first object and the second object are overlapped on the ordinate axis in the target coordinate system, setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum ordinate in the sorted ordinate axes, the second longitudinal coordinate scale and the third longitudinal coordinate scale are larger than the maximum ordinate in the sorted ordinate axes, and the second longitudinal coordinate scale is smaller than the third longitudinal coordinate scale;
setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates;
and each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix.
6. The method of any of claims 1 to 5, wherein determining a first line in the first lattice based on the first and second sets of locations comprises:
converting the first group of positions into a third group of positions in a second dot matrix, and converting the second group of positions into a fourth group of positions in the second dot matrix, wherein the dots in the second dot matrix are uniformly distributed, and the dots in the first dot matrix and the dots in the second dot matrix have a one-to-one correspondence relationship;
determining a second connecting line in the second dot matrix according to the third group of positions and the fourth group of positions, wherein the second connecting line connects a third boundary point in the third group of positions and a fourth boundary point in the fourth group of positions, and a third area surrounded by the second connecting line and the third group of positions and a fourth area surrounded by the fourth group of positions are not overlapped;
and converting the second connecting line into the first connecting line in the first dot matrix, wherein the first boundary point corresponds to the third boundary point, and the second boundary point corresponds to the fourth boundary point.
7. The method of claim 6, wherein determining a second line in the second lattice according to the third set of positions and the fourth set of positions comprises:
determining a first set of obstacle points and a first end point in the third set of locations, and a second set of obstacle points and a second end point in the fourth set of locations, wherein the first set of obstacle points includes points in the third set of locations corresponding to respective vertices and a center point of the first object, the first end point is a point in the third set of locations corresponding to a first point on a boundary of the first object, the first point is not a vertex of the first object, the second set of obstacle points includes points in the fourth set of locations corresponding to respective vertices and a center point of the second object, the second end point is a point in the fourth set of locations corresponding to a second point on a boundary of the second object, the second point is not a vertex of the second object;
and determining the second connecting line in the second dot matrix according to the first group of barrier points, the first end point, the second group of barrier points and the second end point, wherein the second connecting line avoids the first group of barrier points and the second group of barrier points and connects the first end point and the second end point.
8. The method according to claim 7, wherein in the case where the first overlapping portion in the first object overlaps the second overlapping portion in the second object on an abscissa axis and/or an ordinate axis in a target coordinate system,
determining a first set of obstacle points in the third set of locations, comprising: setting the first set of obstacle points to include points of the third set of locations corresponding to respective vertices and center points of the first object, and points of the third set of locations corresponding to the first overlap portion;
determining a second set of obstacle points in the fourth set of locations, comprising: setting the second set of obstacle points to include points of the fourth set of locations corresponding to respective vertices and center points of the second object, and points of the fourth set of locations corresponding to the second overlap portion.
9. The method of claim 7, wherein said determining the second connection in the second lattice based on the first set of obstacle points, the first endpoint, the second set of obstacle points, and the second endpoint comprises:
and determining a shortest path between the first end point and the second end point in the second lattice according to the first group of barrier points, the first end point, the second group of barrier points and the second end point, and determining the shortest path as the second connecting line, wherein the shortest path avoids the first group of barrier points and the second group of barrier points.
10. An apparatus for determining a connection line of an object, comprising:
the system comprises an acquisition module, a comparison module and a display module, wherein the acquisition module is used for acquiring a first group of coordinates of a first group of key points on a first object in a target coordinate system and a second group of coordinates of a second group of key points on a second object in the target coordinate system, the first object and the second object are objects to be connected, the first group of key points comprise boundary points and center points of the first object, and the second group of key points comprise boundary points and center points of the second object;
a first determining module, configured to, in a case that the first object and the second object do not overlap on an abscissa axis and an ordinate axis in the target coordinate system, obtain a first set of boundary points on a first boundary and a third set of boundary points on a third boundary in the first set of coordinates, and obtain a second set of boundary points on a second boundary and a fourth set of boundary points on a fourth boundary in the second set of coordinates, where the first boundary and the second boundary are parallel to the abscissa axis, and the third boundary and the fourth boundary are parallel to the ordinate axis; sorting the abscissa of the first group of boundary points and the second group of boundary points from small to large, taking each sorted abscissa as a horizontal coordinate scale in a first dot matrix, sorting the ordinate of the third group of boundary points and the ordinate of the fourth group of boundary points from small to large, and taking each sorted ordinate as a longitudinal coordinate scale in the first dot matrix; setting a first transverse coordinate scale, a second transverse coordinate scale and a third transverse coordinate scale in the first dot matrix, wherein the first transverse coordinate scale is smaller than the minimum transverse coordinate in the sorted transverse coordinates, the second transverse coordinate scale is located between two adjacent transverse coordinates in the sorted transverse coordinates, the two adjacent transverse coordinates are two transverse coordinates adjacent to the first group of boundary points and the second group of boundary points, and the third transverse coordinate scale is larger than the maximum transverse coordinate in the sorted transverse coordinates; setting a first longitudinal coordinate scale, a second longitudinal coordinate scale and a third longitudinal coordinate scale in the first dot matrix, wherein the first longitudinal coordinate scale is smaller than the minimum longitudinal coordinate in the sorted longitudinal coordinates, the second longitudinal coordinate scale is located between two adjacent longitudinal coordinates in the sorted longitudinal coordinates, the two adjacent longitudinal coordinates are two longitudinal coordinates adjacent to the third group boundary point and the fourth group boundary point, and the third longitudinal coordinate scale is larger than the maximum longitudinal coordinate in the sorted longitudinal coordinates; each horizontal coordinate scale and each vertical coordinate scale in the first dot matrix form the first dot matrix;
a second determining module, configured to determine a first set of locations of the first set of keypoints in the first lattice, and determine a second set of locations of the second set of keypoints in the first lattice, where the first set of locations is used for representing an actual size of the first object, and the second set of locations is used for representing an actual size of the second object;
a third determining module, configured to determine a first connection line in the first dot matrix according to the first group of positions and the second group of positions, where the first connection line connects a first boundary point in the first group of positions and a second boundary point in the second group of positions, and a first area surrounded by the first connection line and the first group of positions and a second area surrounded by the second group of positions are not overlapped.
11. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 9 by means of the computer program.
CN202011391051.3A 2020-12-02 2020-12-02 Method and device for determining object connection line, storage medium and electronic equipment Active CN113391736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011391051.3A CN113391736B (en) 2020-12-02 2020-12-02 Method and device for determining object connection line, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011391051.3A CN113391736B (en) 2020-12-02 2020-12-02 Method and device for determining object connection line, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113391736A CN113391736A (en) 2021-09-14
CN113391736B true CN113391736B (en) 2023-04-07

Family

ID=77616579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011391051.3A Active CN113391736B (en) 2020-12-02 2020-12-02 Method and device for determining object connection line, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113391736B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357846A (en) * 2017-06-26 2017-11-17 北京金堤科技有限公司 The methods of exhibiting and device of relation map

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5073956A (en) * 1988-10-25 1991-12-17 Brother Kogyo Kabushiki Kaisha Apparatus for converting image outline data into dot data representative of dots to be formed
US8068136B2 (en) * 2007-05-16 2011-11-29 Honeywell International Inc. Method and system for determining angular position of an object
CN107168697B (en) * 2017-04-22 2020-11-24 华南理工大学 Connection automatic obstacle avoidance optimization method of graphical programming software
CN109816754A (en) * 2018-12-28 2019-05-28 航天信息股份有限公司 Creation method, display methods and the system and storage medium of flow chart
CN111338245B (en) * 2020-02-26 2021-06-11 杭州和利时自动化有限公司 Graphic conversion method, device and medium based on VISIO
CN111598738A (en) * 2020-05-18 2020-08-28 上海明略人工智能(集团)有限公司 Method and device for determining position distribution, storage medium and electronic device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357846A (en) * 2017-06-26 2017-11-17 北京金堤科技有限公司 The methods of exhibiting and device of relation map

Also Published As

Publication number Publication date
CN113391736A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US20180182104A1 (en) Segmentation of an image based on color and color differences
CN107890671A (en) Threedimensional model rendering intent, device, computer equipment and the storage medium of WEB terminal
CN108038897A (en) Shadow map generation method and device
JP7566270B2 (en) Systems, methods and apparatus for image processing - Patents.com
CN109671133A (en) Generation method, device, electronic equipment and the storage medium of track
CN112985413A (en) Scenic spot path planning method and device based on improved A-x algorithm
CN112675545B (en) Method and device for displaying surface simulation picture, storage medium and electronic equipment
KR102121189B1 (en) Part information retrieval device, part information retrieval method and program
CN107102833A (en) Line information interactive approach and electronic equipment
CN104881448A (en) Map path marking method and device
CN109701271A (en) Show the methods, devices and systems of icon
CN107305134A (en) The method and apparatus for showing the navigation way of predetermined shape on the electronic map
CN112287325A (en) Operation verification method, operation verification device, storage medium and electronic device
CN110851050B (en) Method and device for testing clicking of page elements
Hussain et al. A standards-based approach for Auto-drawing single line diagram of multivendor smart distribution systems
CN116227566A (en) Calculation graph visualization method, device, equipment and medium applied to AI chip
CN113391736B (en) Method and device for determining object connection line, storage medium and electronic equipment
CN108847120B (en) Drawing method based on electronic fence map order thermodynamic diagram distribution
CN112734900B (en) Baking method, device and equipment for shadow map and computer readable storage medium
CN112711647A (en) Map information display method and device, storage medium and electronic equipment
US10366125B2 (en) Object display system for relationship graph
CN105323141A (en) Information transmission method and system based on image recognition and mobile terminal
CN110991050A (en) CAD (computer-aided design) image stacking method and related product
CN109189524A (en) Image resource generation method and device
CN115794245A (en) Data loading method and device, electronic equipment and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40053127

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant