Linear object generation method and device, equipment and storage medium

By acquiring and grouping the direction of linear objects on a two-dimensional image, three-dimensional linear objects are solved, and the problem of dependence on high-precision point cloud data in the prior art is improved, and the generation accuracy and effect of linear objects are improved.

CN119091098APending Publication Date: 2024-12-06GUANGZHOU XAIRCRAFT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310667906.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing three-dimensional linear object generation method relies on high-precision and complete point cloud data, resulting in low fitting accuracy of linear objects and poor generation effect when point cloud data is incomplete or noise.

Method used

By obtaining the directions of two-dimensional rod-shaped objects and linear objects on the two-dimensional image, grouping and mapping relationship determination are performed to generate three-dimensional linear objects to avoid dependence on high-precision point cloud data.

Benefits of technology

It improves the accuracy and effect of linear objects, and can achieve accurate three-dimensional reconstruction without relying on high-precision point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091098A_ABST
    Figure CN119091098A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a linear object generation method and device, equipment and a storage medium. According to the technical scheme provided by the embodiment of the invention, the linear object directions of the two-dimensional linear objects connected with the two-dimensional rod-shaped objects on the two-dimensional image are determined, the two-dimensional linear objects are grouped according to the linear object directions to obtain a plurality of linear object groups, and the linear object group direction of each linear object group is obtained; determining a connecting rod-shaped object corresponding to each two-dimensional rod-shaped object according to the direction of the linear object group, and generating a three-dimensional linear object in an electronic map according to the connection relationship between the two-dimensional rod-shaped objects and the connecting rod-shaped objects and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, according to the method, accurate three-dimensional reconstruction of the linear object can be realized without depending on high-precision and complete three-dimensional point cloud data, the accuracy of generating the linear object is effectively improved, and the generation effect of the linear object in the map is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a linear object generation method, device, equipment and storage medium. Background Art

[0002] The existing generation of three-dimensional linear objects generally obtains point cloud data of the target area through radar surveying, extracts linear object point cloud data from the point cloud data through classification algorithm, segments all linear objects according to the height extreme points of the linear object point cloud data, and then performs linear object fitting on the segmented linear object point cloud data to realize linear object vectorization.

[0003] However, this method of generating three-dimensional linear objects has high requirements on the recovery accuracy and integrity of linear object point cloud data. When the linear object point cloud data is incomplete, it is impossible to accurately segment the linear object point cloud data, and when there is a lot of noise in the linear object point cloud data, the linear object fitting accuracy is low, the linear object generation accuracy is low, and the linear object generation effect is poor. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and storage medium for generating linear objects, so as to solve the technical problems in the related art that the generation of linear objects depends on high-precision and complete point cloud data, the accuracy of generating linear objects is low, and the effect of generating linear objects is poor, so as to effectively improve the accuracy of generating linear objects and improve the effect of generating linear objects.

[0005] In a first aspect, an embodiment of the present application provides a linear object generation method for generating a linear object with rod-shaped objects connected to both ends, the method comprising:

[0006] Acquire the two-dimensional rod-shaped objects on the two-dimensional image, and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects;

[0007] Based on the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects, the two-dimensional linear objects are grouped to obtain a plurality of linear object groups, and a linear object group direction corresponding to each of the linear object groups is determined;

[0008] Determine a connected rod-shaped object corresponding to each of the two-dimensional rod-shaped objects based on the direction of the linear object group;

[0009] Based on the connection relationship between each of the two-dimensional rod-shaped objects and the connecting rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, a three-dimensional linear object is generated in the electronic map.

[0010] In a second aspect, an embodiment of the present application provides a linear object generation device for generating a linear object with rod-shaped objects connected to both ends, the device comprising a first direction module, a second direction module, a connection determination module and a target generation module, wherein:

[0011] The first direction module is used to obtain the two-dimensional rod-shaped objects on the two-dimensional image, and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects;

[0012] The second direction module is used to group the two-dimensional linear objects to obtain a plurality of linear object groups based on the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects, and determine the linear object group direction corresponding to each of the linear object groups;

[0013] The connection determination module is used to determine the connected rod-shaped object corresponding to each of the two-dimensional rod-shaped objects based on the direction of the linear object group;

[0014] The target generation module is used to generate a three-dimensional linear object in the electronic map based on the connection relationship between each of the two-dimensional rod-shaped objects and the connecting rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects.

[0015] In a third aspect, an embodiment of the present application provides a linear object generation device, including: a memory and one or more processors;

[0016] The memory is used to store one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the linear object generation method as described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the linear object generation method as described in the first aspect.

[0019] The embodiment of the present application determines the linear object direction of the two-dimensional linear objects connected to each two-dimensional rod-shaped object on the two-dimensional image, and groups the two-dimensional linear objects according to the linear object direction to obtain multiple linear object groups, obtains the linear object group direction of each linear object group, determines the connected rod-shaped object corresponding to each two-dimensional rod-shaped object according to the linear object group direction, and generates three-dimensional linear objects in an electronic map according to the connection relationship between the two-dimensional rod-shaped objects and the connected rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects. Accurate three-dimensional reconstruction of linear objects can be achieved without relying on high-precision and complete three-dimensional point cloud data, thereby effectively improving the accuracy of generating linear objects and improving the linear object generation effect in the map. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of a linear object generation method provided in an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of a mapping relationship determination process provided by an embodiment of the present application;

[0022] Figure 3 is a flow chart of another linear object generation method provided by an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of a first rod-shaped object set determination process provided by an embodiment of the present application;

[0024] Figure 5 is a schematic diagram of a second rod-shaped object set determination process provided by an embodiment of the present application;

[0025] Figure 6 This is a schematic diagram of a connecting rod-shaped object determination process provided by an embodiment of the present application;

[0026] Figure 7 It is a structural schematic diagram of a linear object generating device provided in an embodiment of the present application;

[0027] Figure 8 It is a structural schematic diagram of a linear object generating device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0029] Figure 1 A flowchart of a linear object generation method provided in an embodiment of the present application is given. The linear object generation method can be used to generate a linear object with rod-shaped objects connected at both ends. The linear object generation method provided in the embodiment of the present application can be executed by a linear object generation device, which can be implemented by hardware and / or software and integrated in a linear object generation device.

[0030] The following description is made by taking the linear object generation device executing the linear object generation method as an example. Figure 1 , the linear object generation method comprises:

[0031] S110: Acquire the two-dimensional rod-shaped objects on the two-dimensional image and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects.

[0032] The linear objects and rod-shaped objects provided by the present solution may be a combination of one or more of electric wires and electric poles, clotheslines and first support poles, bird nets and second support poles. The two-dimensional image provided by the present solution records the rod-shaped objects in the target area and the linear objects connected between the rod-shaped objects. The target area provided by the present solution may be understood as an area where three-dimensional reconstruction of linear objects is required. The two-dimensional image provided by the present solution may be obtained by photographing the target area, for example, by photographing the target area with a drone equipped with a camera above the target area.

[0033] Exemplarily, a two-dimensional image of the target area is acquired, and the two-dimensional rod-shaped objects present in the two-dimensional image and the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object are determined. In one embodiment, the two-dimensional linear objects connected to each two-dimensional rod-shaped object may be one or more, and the two-dimensional rod-shaped object may be connected to two-dimensional linear objects of different linear object directions.

[0034] It is understandable that when the linear object is laid out, it can be connected through multiple rod-shaped objects in the middle (for example, connected through insulators) to achieve support for the linear object. After the linear object is connected to a rod-shaped object, it continues to connect to the next rod-shaped object. At this time, both sides of the rod-shaped object are connected with linear objects, and the linear objects corresponding to the linear objects connected on both sides have different directions (for example, 180° apart). In the two-dimensional rod-shaped object corresponding to the two-dimensional image, both sides are connected with two-dimensional linear objects. The linear object direction of the two-dimensional linear object can be expressed as the direction extending from the connection point between the two-dimensional linear object and the rod-shaped object to the straight line or fitted straight line where the two-dimensional linear object is located. The deviation of the linear object direction of the linear objects connected on both sides of a rod-shaped object is determined according to the layout direction of the linear object after passing through the rod-shaped object. For example, after a linear object passes through a rod-shaped object, it is arranged along the original direction. The directions of the linear objects on both sides of the rod-shaped object differ by 180°. If the linear object passes through a rod-shaped object and is arranged along the direction of a right-angle turn, the directions of the linear objects on both sides of the rod-shaped object differ by 90° or 270°.

[0035] It needs to be explained that each rod-shaped object can be connected to multiple linear objects, and correspondingly, multiple two-dimensional linear objects are connected to both sides of the two-dimensional rod-shaped object on the two-dimensional image. For example, in a three-phase four-wire power supply line, the linear objects connected to the rod-shaped object include linear objects corresponding to the three-phase electricity and a neutral line, and correspondingly, four two-dimensional linear objects are connected to both sides of the two-dimensional rod-shaped object on the two-dimensional image (assuming that there is no occlusion between the linear objects).

[0036] In one possible embodiment, the two-dimensional rod-shaped object and the two-dimensional linear object on the two-dimensional image can be determined by a trained image detection model. Wherein the rod-shaped object may include a rod-shaped object head (e.g., the top of the rod-shaped object above the ground and connected to the linear object) and a rod-shaped object tail (e.g., the end of the rod-shaped object in contact with the ground), and the pixel coordinates of the two-dimensional rod-shaped object head and the two-dimensional rod-shaped object tail can be output by the image detection model. Then, the pixel coordinates corresponding to the two-dimensional rod-shaped object (e.g., the pixel coordinates of the two-dimensional rod-shaped object head and the pixel coordinates of the two-dimensional rod-shaped object tail) and the pixel coordinates of the two-dimensional linear object (e.g., the pixel coordinates of multiple points of the two-dimensional linear object) can be determined according to the output of the image detection model. Optionally, the linear object direction of each two-dimensional linear object can be determined based on the pixel coordinates of the two-dimensional linear object.

[0037] In one embodiment, the linear object direction of each two-dimensional linear object can be determined by regressing the linear object pixel points of the two-dimensional linear object within the set range of the rod-shaped object, or it can be obtained by analyzing and processing the two-dimensional rod-shaped objects and two-dimensional linear objects on the two-dimensional image through a deep learning model.

[0038] S120: based on the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object, group the two-dimensional linear objects to obtain a plurality of linear object groups, and determine the linear object group direction corresponding to each linear object group.

[0039] Exemplarily, for the multiple 2D linear objects connected to each 2D rod-shaped object, the 2D linear objects are grouped according to their linear object directions to obtain multiple linear object groups corresponding to each 2D rod-shaped object.

[0040] It needs to be explained that, for a two-dimensional rod-shaped object, the linear object directions corresponding to the multiple two-dimensional linear objects connected on the same side are the same or similar, and these same or similar two-dimensional linear objects can be divided into the same linear object group. In general, for a rod-shaped object with multiple linear objects connected on both sides, there are two linear object groups corresponding to the corresponding two-dimensional rod-shaped object in the two-dimensional image. For example, the linear object direction of each two-dimensional linear object is represented as {starting point: ending point}, where the starting point can be the connection point between the two-dimensional linear object and the two-dimensional rod-shaped object, and the ending point can be any point on the two-dimensional linear object. The multiple two-dimensional linear objects connected to each two-dimensional rod-shaped object can be grouped according to the pixel position coordinate relationship between the starting point and the ending point, and the two-dimensional linear objects with the same linear object direction or a direction deviation within a set angle range can be divided into the same linear object group.

[0041] Further, after obtaining the linear object groups of each two-dimensional rod-shaped object, the linear object group directions corresponding to each linear object group are determined. Optionally, the linear object group directions corresponding to each linear object group can be determined based on the average of the linear object directions in the linear object group.

[0042] In a possible embodiment, the linear object generation method provided by the present scheme may determine the slope information and intercept information of each two-dimensional linear object in each linear object group when determining the linear object group direction corresponding to each linear object group; and determine the linear object group direction corresponding to each linear object group based on the average slope information and average intercept information corresponding to each linear object group.

[0043] Exemplarily, after the two-dimensional linear objects are grouped to obtain a plurality of linear object groups, the slope information and intercept information of each two-dimensional linear object in each linear object group are obtained. The slope information and intercept information are referenced to the coordinate system of the corresponding two-dimensional image and can be calculated by two pixel points on the corresponding two-dimensional linear object (for example, the starting point and the end point used to indicate the direction of the linear object).

[0044] Furthermore, for each linear object group, the average slope information of the corresponding slope information and the average intercept information of the intercept information are calculated, and the direction of the linear object group corresponding to the linear object group is represented by the average slope information and the average intercept information. The position of the linear object group on the two-dimensional image can be accurately determined in the two-dimensional image according to the average slope information and the average intercept information. This solution effectively improves the accuracy of generating linear objects and improves the linear object generation effect in the map by accurately determining the direction of the linear object group according to the average slope information and the average intercept information corresponding to the linear object group.

[0045] S130: Determine the connected rod-shaped objects corresponding to each two-dimensional rod-shaped object based on the direction of the linear object group.

[0046] Exemplarily, for each two-dimensional rod-shaped object, a connecting rod-shaped object having a connection condition with the two-dimensional rod-shaped object is determined according to the direction of the corresponding linear object group.

[0047] In one embodiment, for a two-dimensional rod-shaped object, the connecting rod-shaped object having connection conditions therewith may be the two-dimensional rod-shaped object that is closest in the direction of the linear object group (or in an angle range determined based on the direction of the linear object group).

[0048] S140: generating a three-dimensional linear object in the electronic map based on a connection relationship between each two-dimensional rod-shaped object and a connecting rod-shaped object, and a mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object.

[0049] Exemplarily, after determining the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object, a three-dimensional linear object is generated in the electronic map based on the connection relationship between the two-dimensional rod-shaped object and the connecting rod-shaped object, and the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object, so that users can view the linear objects in the target area through the electronic map, or provide obstacle information for the operating equipment to ensure operating safety.

[0050] The mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object can be understood as the corresponding relationship between the position of the two-dimensional rod-shaped object in the two-dimensional image and the position of the three-dimensional rod-shaped object in the electronic map. For example, after determining a two-dimensional rod-shaped object in the two-dimensional image, the position of the three-dimensional rod-shaped object can be determined in the electronic map based on the mapping relationship, so as to subsequently generate a three-dimensional rod-shaped object at the position determined by the mapping relationship in the electronic map.

[0051] Optionally, the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects provided by the present solution can be determined in the process of building an electronic map corresponding to the target area. For example, three-dimensional reconstruction is performed using multiple original images of the target area, and three-dimensional rod-shaped objects corresponding to the two-dimensional rod-shaped objects on the original images are reconstructed in the electronic map, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects is determined based on the three-dimensional reconstruction results of the target area.

[0052] In one possible embodiment, Figure 2 As shown in a provided mapping relationship determination flow diagram, the linear object generation method provided by the present solution further includes: before generating a three-dimensional linear object in an electronic map based on the connection relationship between each two-dimensional rod-shaped object and the connecting rod-shaped object, and the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object:

[0053] S101: Acquire multiple original images of a target area, and determine the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in each original image.

[0054] S102: determining a matching relationship between rod-shaped objects in a common viewing area of ​​a plurality of original images, and determining a geographical position of a rod-shaped object head and a geographical position of a rod-shaped object tail based on the matching relationship between the rod-shaped objects, an image position of a rod-shaped object head and an image position of a rod-shaped object tail.

[0055] S103: Determine a mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object based on the image position of the rod-shaped object head, the image position of the rod-shaped object tail, the geographical position of the rod-shaped object head, and the geographical position of the rod-shaped object tail.

[0056] The original image provided by this scheme can be obtained by shooting images of the target area. For example, a drone equipped with a camera flies over the target area and continuously shoots multiple images, and multiple images of the complete flight are used as original images. The picture displayed by the original image provided by this scheme can be a picture of a part of the target area, and the picture corresponding to the entire target area can be displayed by splicing all the original images. Among them, one or more rod-shaped objects can be captured in part or all of the original images. The common viewing area provided by this scheme can be understood as the overlapping area in the field of view corresponding to different original images. Generally, in a complete flight, in order to ensure that the images captured can be successfully spliced ​​in post-processing, adjacent original images generally have to meet certain requirements for overlap, such as 50%, which is not limited here, so there is a common viewing area between adjacent original images.

[0057] Exemplarily, multiple original images of the target area are obtained, and the rod-shaped objects in each original image, as well as the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object are determined. The image position of the head of the rod-shaped object can be understood as the position of the head of the rod-shaped object displayed in the original image (for example, the pixel position of the center point of the top of the rod-shaped object in the original image), and the image position of the tail of the rod-shaped object can be understood as the position of the tail of the rod-shaped object displayed in the original image (for example, the pixel position of the center point of the bottom of the rod-shaped object in the original image). In a possible embodiment, the determination of the rod-shaped object, the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in each original image provided by this scheme can be obtained by analyzing a pre-trained key point detection model.

[0058] Further, the common viewing area between the original images provided by the present solution is determined, and the rod-shaped object matching relationship between the rod-shaped objects in the common viewing area is determined. Among them, the rod-shaped object matching relationship can be understood as the matching relationship of the same rod-shaped object in the common viewing area of ​​different original images, that is, two rod-shaped objects with a rod-shaped object matching relationship between two original images are in fact the same rod-shaped object. Thus, according to the above-determined rod-shaped object matching relationship, the rod-shaped object head image position and the rod-shaped object tail image position, the rod-shaped object head geographical location and the rod-shaped object tail geographical location corresponding to each rod-shaped object are determined, which can avoid information redundancy and information error caused by treating the same rod-shaped object as different rod-shaped objects, and is conducive to improving the acquisition accuracy of the rod-shaped object. Among them, the rod-shaped object head geographical location provided by the present solution can be understood as the actual geographical location (for example, the coordinates in the world coordinate system) of the rod-shaped object head (the center point of the top of the rod-shaped object), and the rod-shaped object tail geographical location can be understood as the actual geographical location of the rod-shaped object tail (the center point of the end of the rod-shaped object connecting to the ground).

[0059] Furthermore, the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object can be determined according to the rod-shaped object head image position, rod-shaped object tail image position, rod-shaped object head geographical position and rod-shaped object tail geographical position of each two-dimensional rod-shaped object in the original image. This solution effectively improves the accuracy of generating linear objects by performing three-dimensional reconstruction based on multiple original images and accurately determining the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object based on the three-dimensional reconstruction result.

[0060] In one embodiment, after obtaining an electronic map based on three-dimensional reconstruction, two three-dimensional rod-shaped objects corresponding to each two two-dimensional rod-shaped objects having a connection relationship on the electronic map can be determined based on the mapping relationship, and a three-dimensional linear object can be generated by fitting between the heads of the two three-dimensional rod-shaped objects. Optionally, the width of the three-dimensional linear object can be customized by the user or determined according to the type of the rod-shaped object.

[0061] In one embodiment, the linear object generation method provided by the present solution further comprises, after determining the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object:

[0062] S104: Determine a target rod-shaped object based on the geographical location of the rod-shaped object head and the geographical location of the rod-shaped object tail, and reconstruct the target rod-shaped object into the electronic map.

[0063] Exemplarily, multiple target rod-shaped objects are determined according to the geographical locations of the heads and tails of the rod-shaped objects. For example, the geographical location and height of each target rod-shaped object can be determined according to the geographical location of the heads and tails of the rod-shaped objects corresponding to each rod-shaped object.

[0064] Optionally, the geographic location of each target rod-shaped object can be determined based on the average of the geographic location of the head of the corresponding rod-shaped object and the geographic location of the tail of the rod-shaped object, and the rod-shaped object height of each target rod-shaped object can be determined based on the difference between the geographic location of the head of the corresponding rod-shaped object and the geographic location of the tail of the rod-shaped object.

[0065] Furthermore, after determining multiple target rod-shaped objects, these target rod-shaped objects can be reconstructed into an electronic map, so that users can view rod-shaped objects in the target area through the electronic map, or provide obstacle information for operating equipment to ensure operating safety. Optionally, the electronic map provided by the present solution can be determined based on the three-dimensional reconstruction of multiple original images, or can be determined through a set three-dimensional map.

[0066] Optionally, the corresponding rod-shaped object model can be obtained from a pre-built rod-shaped object vector model library according to the rod-shaped object type in the target area, and the rod-shaped object model can be scaled according to the rod-shaped object height of each target rod-shaped object, and the width of the rod-shaped object model can be set according to the set width, and the rod-shaped object model can be placed at a position corresponding to the geographical location of the target rod-shaped object on the electronic map to achieve vectorization and visualization of the rod-shaped object on the electronic map. Optionally, the setting of the rod-shaped object model width can be customized by the user, for example, the rod-shaped object model width can be set according to an empirical value, or the rod-shaped object empirical width value can be expanded as the rod-shaped object model width based on safety considerations.

[0067] This solution determines the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in each original image of the target area, and determines the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object according to the matching relationship of the rod-shaped objects in the common viewing area of ​​multiple original images, as well as the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object, and determines the target rod-shaped object according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and then reconstructs the target rod-shaped object on the electronic map. Accurate three-dimensional reconstruction of the rod-shaped object can be achieved without relying on high-precision and complete three-dimensional point cloud data, thereby effectively improving the accuracy of generating rod-shaped objects and improving the generation effect of rod-shaped objects in the map.

[0068] In a possible embodiment, before determining the matching relationship of rod-shaped objects in the common viewing area of ​​multiple original images, the present solution further includes: determining the common viewing area in each pair of original images, and obtaining the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in the common viewing area.

[0069] Exemplarily, after acquiring multiple original images of the target area, a common viewing area between any two original images may be determined, and the rod-shaped object head image position and the rod-shaped object tail image position of each original image in the common viewing area may be determined.

[0070] In one embodiment, the common view area between the original images can be determined based on the intermediate results of the three-dimensional reconstruction of the target area (e.g., feature points determined during the three-dimensional reconstruction process). Exemplarily, after obtaining multiple original images of the target area, three-dimensional reconstruction is performed using these original images to obtain the reconstructed camera position coordinate information, camera distortion parameters, coordinate transformation matrix, matching pair information, feature points (e.g., SIFT feature points) extracted from each original image, and depth data (e.g., DSM depth data) and other three-dimensional reconstruction information, and an electronic map corresponding to the target area can be reconstructed based on the above three-dimensional reconstruction information.

[0071] Optionally, the reconstructed feature points may be used to determine the common viewing area between the two original images, for example, by matching the feature points between the two original images, and determining the boundary information according to the number and area of ​​the matched feature points, and the area surrounded by the boundary information is the common viewing area corresponding to the two original images. Furthermore, for the two original images with a common viewing area, the rod-shaped objects existing in the common viewing area of ​​the two original images are respectively determined, and the rod-shaped object head image position and the rod-shaped object tail image position of the rod-shaped object in the common viewing area are determined.

[0072] This solution can more accurately find the matching relationship of rod-shaped objects in the common viewing area of ​​the original image, thereby improving the accuracy of generating rod-shaped objects in the electronic map by determining the common viewing area in the original images, and determining the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in the common viewing area.

[0073] In a possible embodiment, when determining the matching relationship of rod-shaped objects in a common viewing area of ​​a plurality of original images, and determining the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object based on the matching relationship of the rod-shaped objects, the image position of the head of the rod-shaped object, and the image position of the tail of the rod-shaped object, the solution may include:

[0074] S1021: using an epipolar matching algorithm to determine the matching relationship between rod-shaped objects in the common viewing area of ​​each pair of original images.

[0075] S1022: Determine the geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object by using a triangulation algorithm based on the matching relationship of the rod-shaped objects, the image position of the head of the rod-shaped object, and the image position of the tail of the rod-shaped object.

[0076] Exemplarily, after determining the image positions of the head of the rod-shaped object and the image positions of the tail of the rod-shaped object in the common viewing area of ​​the pairwise original images, the matching relationship of the rod-shaped objects in the common viewing area of ​​the pairwise original images is determined using an epipolar matching algorithm based on the image positions of the head of the rod-shaped object and the image positions of the tail of the rod-shaped object. For example, the rod-shaped objects in the common viewing area are matched using the pose information corresponding to each original camera (the pose of the camera in the reconstructed three-dimensional scene) and the matching relationship between the original images obtained during the three-dimensional reconstruction process to obtain the matching relationship of the rod-shaped objects.

[0077] Furthermore, based on the matching relationship of rod-shaped objects in the common viewing area of ​​each pair of original images, as well as the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object, a triangulation algorithm is used to calculate the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object corresponding to each rod-shaped object. The triangulation algorithm can triangulate the head position and the tail position of two rod-shaped objects with a matching relationship on different original images, and realize the conversion from two-dimensional image coordinates to three-dimensional geographical coordinates. Exemplarily, for rod-shaped objects that satisfy the matching relationship of rod-shaped objects in the common viewing area of ​​two original images, a triangulation algorithm is used to calculate the geographical location of the head of the rod-shaped object according to the image position of the head of the rod-shaped object corresponding to the same rod-shaped object in the two original images, and calculate the geographical location of the tail of the rod-shaped object according to the image position of the tail of the rod-shaped object corresponding to the same rod-shaped object in the two original images.

[0078] This solution obtains the matching relationship of rod-shaped objects between different original images in the common viewing area by utilizing the intermediate results generated by three-dimensional reconstruction (the matching relationship between the posture information and the original image), and uses a triangulation algorithm to determine the geographical location of the head and tail of each rod-shaped object, accurately determining the geographical location of each rod-shaped object, and improving the accuracy of generating rod-shaped objects in electronic maps.

[0079] In a possible embodiment, when determining the target rod-shaped object based on the geographical location of the rod-shaped object head and the geographical location of the rod-shaped object tail, the solution may include:

[0080] S1041: Determine a plurality of candidate stick-shaped objects based on the geographical location of the head of the stick-shaped object and the geographical location of the tail of the stick-shaped object.

[0081] S1042: Clustering the multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects.

[0082] Exemplarily, multiple candidate rod-shaped objects are determined based on the multiple determined geographic locations of the heads of the rod-shaped objects and the corresponding geographic locations of the tails of the rod-shaped objects. For example, the geographic location and the height of the rod-shaped object are determined based on each pair of the geographic location of the head of the rod-shaped object and the geographic location of the tail of the rod-shaped object, and the candidate rod-shaped object is determined based on the geographic location and the height of the rod-shaped object.

[0083] In a possible embodiment, the linear object generation method provided by the present solution may include, when determining a plurality of candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object:

[0084] S10411: Determine a plurality of initial rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object.

[0085] S10412: Screening the initial rod-shaped objects to obtain a plurality of candidate rod-shaped objects.

[0086] Exemplarily, after determining the geographical locations of the rod-shaped object heads and the rod-shaped object tails corresponding to the plurality of rod-shaped objects, a plurality of initial rod-shaped objects are determined according to the geographical locations of the rod-shaped object heads and the rod-shaped object tails. Further, the initial rod-shaped objects are screened to select a plurality of initial rod-shaped objects that meet the set rod-shaped object requirements or standards as candidate rod-shaped objects.

[0087] This solution preliminarily determines multiple initial rod-shaped objects according to the geographical locations of the rod-shaped object heads and the rod-shaped object tails, and screens these initial rod-shaped objects to obtain candidate rod-shaped objects that meet the rod-shaped object requirements or standards, thereby improving the accuracy of generating rod-shaped objects in a map.

[0088] In a possible embodiment, the linear object generation method provided by the present solution may be performed by a combination of one or more of the following methods when screening the initial rod-shaped objects:

[0089] Method 1: Determine the height information of each initial rod-shaped object according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screen the initial rod-shaped objects based on the height information and the set height standard.

[0090] Exemplarily, for each initial rod-shaped object, the height information of the initial rod-shaped object is determined according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and it is determined whether the height information of the initial rod-shaped object meets the set height standard, for example, it is determined whether the height information of the initial rod-shaped object is within the height range corresponding to the international linear object standard, and the initial rod-shaped objects whose height information meets the set height standard are screened as candidate rod-shaped objects. This solution improves the accuracy of generating rod-shaped objects in the map by screening out the initial rod-shaped objects that meet the set height standard according to the height information, and then obtaining accurate candidate rod-shaped objects.

[0091] Method 2: Determine the inclination of each initial rod-shaped object according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screen the initial rod-shaped objects based on the inclination and the set inclination threshold.

[0092] Exemplarily, for each initial rod-shaped object, the inclination of the initial rod-shaped object is determined according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and it is determined whether the inclination of the initial rod-shaped object is greater than a set inclination threshold, and the objects with inclinations within the set inclination threshold are screened as candidate rod-shaped objects. This solution obtains accurate candidate rod-shaped objects by screening the initial rod-shaped objects with inclinations within the set inclination threshold as candidate rod-shaped objects, thereby improving the accuracy of generating rod-shaped objects in the map.

[0093] Method 3: Determine the height above the ground of each initial rod-shaped object according to the geographical location of the tail of the rod-shaped object, and screen the initial rod-shaped objects based on the height above the ground and a set height threshold.

[0094] Exemplarily, the height of the initial rod-shaped object from the ground is calculated according to the geographical location of the tail of each initial rod-shaped object, and the initial rod-shaped objects whose height from the ground is within a set height threshold are screened as candidate rod-shaped objects. This solution obtains accurate candidate rod-shaped objects by screening the initial rod-shaped objects whose height from the ground is within a set height threshold as candidate rod-shaped objects, thereby improving the accuracy of generating rod-shaped objects in the map.

[0095] Optionally, a plurality of initial rod-shaped objects obtained by screening in combination of one or more of the above methods may be used as candidate rod-shaped objects.

[0096] It needs to be explained that after obtaining multiple candidate rod-shaped objects, since there may be a situation in which multiple candidate rod-shaped objects are generated for the same rod-shaped object during the process of generating the candidate rod-shaped objects (for example, due to errors, multiple rod-shaped object head image positions and rod-shaped object tail image positions are determined for the same rod-shaped object, or different rod-shaped object head geographical locations and rod-shaped object tail geographical locations are determined for the same rod-shaped object based on different common viewing areas), it is necessary to integrate the candidate rod-shaped objects generated based on the same rod-shaped object into a target rod-shaped object to ensure the accuracy of the rod-shaped object generation.

[0097] Exemplarily, this solution clusters multiple candidate rod-shaped objects and clusters candidate rod-shaped objects with similar positions into one target rod-shaped object, thereby obtaining multiple target rod-shaped objects. Wherein, when multiple candidate rod-shaped objects are generated based on the same rod-shaped object in the original image, these candidate rod-shaped objects can be clustered into one target rod-shaped object because of their close geographical locations. When one candidate rod-shaped object is generated based on the same rod-shaped object in the original image, the candidate rod-shaped object is independently assigned to a cluster classification, and the candidate rod-shaped object is the corresponding target rod-shaped object.

[0098] This scheme determines multiple candidate rod-shaped objects according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and clusters the multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects, accurately determines the target rod-shaped objects corresponding to each rod-shaped object in the target area in the three-dimensional scene, and improves the accuracy of rod-shaped object generation.

[0099] In a possible embodiment, the linear object generation method provided by the present solution may include, when clustering multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects:

[0100] S10421: Clustering multiple candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object.

[0101] S10422: Determine the mean of the head geographic location of the rod-shaped objects in each cluster classification, and the mean of the tail geographic location of the rod-shaped objects, and obtain target rod-shaped objects corresponding to multiple cluster classifications based on the mean of the head geographic location and the mean of the tail geographic location.

[0102] Exemplarily, based on the geographic location of the rod-shaped object head and the geographic location of the rod-shaped object tail of each candidate rod-shaped object, these candidate rod-shaped objects are clustered, and the candidate rod-shaped objects with similar geographic locations of the rod-shaped object heads and the rod-shaped object tails (for example, the distances between the heads and the tails are within a set distance threshold) are clustered and merged to obtain multiple cluster classifications.

[0103] Furthermore, for each cluster classification, the mean head geographic location of the rod-shaped objects' head geographic locations corresponding to all candidate rod-shaped objects in the cluster classification, and the mean tail geographic location of the rod-shaped objects' tail geographic locations are determined, and multiple target rod-shaped objects are obtained based on the mean head geographic location and the mean tail geographic location corresponding to each cluster classification.

[0104] It can be understood that the geographic location of each target rod-shaped object can be determined based on the average of the corresponding head geographic location average and the tail geographic location average, and the rod-shaped object height of each target rod-shaped object can be determined based on the difference between the corresponding head geographic location average and the tail geographic location average.

[0105] This solution clusters multiple candidate rod-shaped objects and accurately determines multiple target rod-shaped objects based on the mean of relevant information in the clustering processing results, thereby effectively improving the accuracy of rod-shaped object generation.

[0106] In one embodiment, the type of the three-dimensional linear object corresponding to the three-dimensional linear object generated in the electronic map can be determined based on the image recognition result of the two-dimensional image, or determined according to the type of linear object selected by the user. For example, the two-dimensional image is image recognized and the type of object existing in the two-dimensional image is determined, and the type of the three-dimensional linear object corresponding to the three-dimensional linear object generated in the electronic map is determined according to the object type. Assuming that the two-dimensional image is image recognized and the two-dimensional rod-shaped object is determined to be a telephone pole, then the three-dimensional linear object generated in the electronic map corresponds to the electric wire; when the two-dimensional image is image recognized and it is determined that there are clothes between the two-dimensional rod-shaped objects, it can be determined that the two-dimensional rod-shaped object is the first support rod, and the three-dimensional linear object generated in the electronic map corresponds to the clothes drying line; when the two-dimensional image is image recognized and it is determined that there are net objects or bird nets between the two-dimensional rod-shaped objects, it can be determined that the two-dimensional rod-shaped object is the second support rod, and the three-dimensional linear object generated in the electronic map corresponds to the bird net. It is also possible that the type of the linear object is not determined by image recognition, but the user directly determines the type of the linear object through human-computer interaction, and generates a three-dimensional linear object of the corresponding type in the electronic map. Alternatively, before generating the three-dimensional linear object in the electronic map, the user may be asked what type of three-dimensional linear object to generate, and the corresponding three-dimensional linear object may be generated in the electronic map according to the type of three-dimensional linear object specified by the user.

[0107] In the above, by determining the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object on the two-dimensional image, and grouping the two-dimensional linear objects according to the linear object directions to obtain multiple linear object groups, the linear object group direction of each linear object group is obtained, and the connected rod-shaped objects corresponding to each two-dimensional rod-shaped object are determined according to the linear object group direction, and according to the connection relationship between the two-dimensional rod-shaped objects and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, a three-dimensional linear object of each two-dimensional rod-shaped object is generated in the electronic map, and accurate three-dimensional reconstruction of the linear objects can be achieved without relying on high-precision and complete three-dimensional point cloud data, thereby effectively improving the accuracy of generating linear objects and improving the linear object generation effect in the map.

[0108] Based on the above embodiments, Figure 3 A flowchart of another linear object generation method provided by an embodiment of the present application is given. Figure 3 , the linear object generation method comprises:

[0109] S210: Acquire the two-dimensional rod-shaped objects on the two-dimensional image and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects.

[0110] S220: based on the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object, group the two-dimensional linear objects to obtain a plurality of linear object groups, and determine the linear object group direction corresponding to each linear object group.

[0111] S230: taking each two-dimensional rod-shaped object as a candidate rod-shaped object in turn, and determining a first rod-shaped object set for each candidate rod-shaped object based on a positional relationship between the candidate rod-shaped object and a direction of the linear object group, wherein the first rod-shaped object set records other two-dimensional rod-shaped objects that have a connection condition with the candidate rod-shaped object.

[0112] Exemplarily, after determining the multiple linear object groups and the linear object group directions corresponding to each two-dimensional rod-shaped object, each two-dimensional rod-shaped object is sequentially taken as a candidate rod-shaped object. And for each candidate rod-shaped object, the positional relationship between the candidate rod-shaped object and each other two-dimensional rod-shaped object is determined, and then the two-dimensional rod-shaped objects that have connection conditions with the candidate rod-shaped objects are determined from the multiple two-dimensional rod-shaped objects according to the positional relationship, and the first rod-shaped object set of the candidate rod-shaped objects is generated based on these two-dimensional rod-shaped objects that have connection conditions. It needs to be explained that the two-dimensional rod-shaped objects that have connection conditions with the candidate rod-shaped objects provided by this scheme can be understood as the two-dimensional rod-shaped objects that may be actually connected to the candidate rod-shaped objects, or may not actually be connected, that is: the physical rod-shaped objects corresponding to the two two-dimensional rod-shaped objects that have connection conditions may be connected through linear objects, or may not be connected through linear objects.

[0113] Therefore, in order to exclude the two-dimensional rod-shaped objects in the first rod-shaped object set that are not actually connected to the candidate rod-shaped objects through the linear objects, so as to improve the recognition accuracy of the two-dimensional rod-shaped objects that are connected to the candidate rod-shaped objects, and further improve the three-dimensional reconstruction results of the rod-shaped objects and the linear objects, in a possible embodiment, Figure 4 As shown in a schematic diagram of a first rod-shaped object set determination process, the linear object generation method provided by the present solution determines the first rod-shaped object set of each candidate rod-shaped object based on the positional relationship between the candidate rod-shaped object and the direction of the linear object group, including:

[0114] S231: Determine a first distance between the rod-shaped object head image position of each two-dimensional rod-shaped object and the straight line where the linear object group direction corresponding to the candidate rod-shaped object is located.

[0115] S232: Add the two-dimensional rod-shaped objects whose first distances are within the set straight-line distance threshold to a first rod-shaped object set of candidate rod-shaped objects.

[0116] Exemplarily, for each candidate rod-shaped object, the first distance from the rod-shaped object head image position of each two-dimensional rod-shaped object to the straight line where the linear object group direction corresponding to the candidate rod-shaped object is located is calculated, and it is determined whether the first distance corresponding to each two-dimensional linear object is within a set straight line distance threshold, and the two-dimensional rod-shaped object whose first distance is within the set straight line distance threshold is added to the first rod-shaped object set of the candidate rod-shaped object. It can be seen that through the above scheme, this solution considers that the two-dimensional rod-shaped objects whose first distance is greater than the set straight line distance threshold have no connection relationship with the candidate rod-shaped objects, thereby excluding these two-dimensional rod-shaped objects.

[0117] Therefore, this solution selects two-dimensional rod-shaped objects to be added to the first rod-shaped object set according to the first distance between the rod-shaped object head image position of each two-dimensional rod-shaped object and the straight line where the linear object group direction corresponding to the candidate rod-shaped object is located, which is conducive to improving the screening accuracy of two-dimensional rod-shaped objects that have connection conditions with the candidate rod-shaped objects.

[0118] In one embodiment, the determination of the rod-shaped object, the image position of the head of the rod-shaped object, and the image position of the tail of the rod-shaped object in the two-dimensional image provided by the present solution can be obtained by analyzing the trained key point detection model. For example, the key point detection model is trained by a large number of sample images with the rod-shaped object, the image position of the head of the rod-shaped object, and the image position of the tail of the rod-shaped object labeled, and after the training is completed, the key point detection model is configured in the linear object generation device. After the two-dimensional image of the target area is acquired, the two-dimensional image is sent to the key point detection model, and the rod-shaped object, the image position of the head of the rod-shaped object, and the image position of the tail of the rod-shaped object in the two-dimensional image are determined by the key point detection model. Optionally, the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object provided by the present solution can appear in pairs, that is, a pair of the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object can be determined for each rod-shaped object.

[0119] S240: Determine, based on the first stick-shaped object set, connected stick-shaped objects corresponding to the candidate stick-shaped objects.

[0120] Exemplarily, after determining the first rod-shaped object set of each candidate rod-shaped object, for each candidate rod-shaped object, all two-dimensional rod-shaped objects in the first rod-shaped object set are used as connected rod-shaped objects corresponding to the candidate rod-shaped object, thereby obtaining connected rod-shaped objects corresponding to each two-dimensional rod-shaped object.

[0121] This solution generates a first rod-shaped object set for each two-dimensional rod-shaped object, and determines the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object according to the first rod-shaped object set, so as to quickly generate a linear object. It should be explained that this solution uses all the two-dimensional rod-shaped objects in the first rod-shaped object set as connecting rod-shaped objects, and then directly connects the candidate rod-shaped objects with all the two-dimensional rod-shaped objects in the first rod-shaped object set based on the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects. Although the generated three-dimensional linear objects are relatively complex, they can also meet the obstacle reference application of linear object obstacle avoidance.

[0122] Although the above scheme can improve the screening accuracy of two-dimensional rod-shaped objects that have connection conditions with candidate rod-shaped objects to a certain extent, in some applications, the inventors found that although the rod-shaped objects that are actually connected to the candidate rod-shaped objects with linear objects can be screened out by the above scheme, the screened rod-shaped objects still include a small number of rod-shaped objects that are actually not connected to the candidate rod-shaped objects with linear objects, and these misscreened rod-shaped objects generally do not meet the layout requirements between actual rod-shaped objects and the candidate rod-shaped objects. Therefore, in order to further improve the screening accuracy of two-dimensional rod-shaped objects that are actually connected to linear objects with the candidate rod-shaped objects, in one embodiment, when determining the connected rod-shaped objects corresponding to the candidate rod-shaped objects based on the first rod-shaped object set, the scheme can also include the following steps:

[0123] S241: Screening the two-dimensional rod-shaped objects in the first rod-shaped object set based on the angle relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the first rod-shaped object set to obtain a second rod-shaped object set corresponding to each candidate rod-shaped object.

[0124] S242: Determine a connected stick-shaped object corresponding to the candidate stick-shaped object based on the second stick-shaped object set.

[0125] Exemplarily, after determining the first rod-shaped object set of each candidate rod-shaped object, for the first rod-shaped object set corresponding to each candidate rod-shaped object, determine the angle relationship between each two-dimensional rod-shaped object in the first rod-shaped object set and the candidate rod-shaped object, and select two-dimensional rod-shaped objects from the first rod-shaped object set according to the angle relationship, select two-dimensional rod-shaped objects that meet the angle relationship from the first rod-shaped object set, and obtain the second rod-shaped object set corresponding to each candidate rod-shaped object based on the selected two-dimensional rod-shaped objects. At this time, the two-dimensional rod-shaped objects in the second rod-shaped object set have connection conditions with the candidate rod-shaped objects, and the angle relationship between the two-dimensional rod-shaped objects and the candidate rod-shaped objects meets the set angle requirement.

[0126] In one possible embodiment, Figure 5As shown in a schematic diagram of a second rod-shaped object set determination process, the linear object generation method provided by the present solution screens the two-dimensional rod-shaped objects in the first rod-shaped object set based on the angle relationship between the candidate rod-shaped objects and each two-dimensional rod-shaped object in the first rod-shaped object set to obtain the second rod-shaped object set corresponding to each candidate rod-shaped object, including:

[0127] S2411: Calculating an angle between a first line connecting a set point of the two-dimensional image and the position of the rod-shaped object head image of each two-dimensional rod-shaped object in the first rod-shaped object set and a second line connecting the set point of the two-dimensional image and the position of the rod-shaped object head image of the candidate rod-shaped object.

[0128] S2412: Filter out two-dimensional rod-shaped objects whose included angles are within a set included angle threshold from each of the first rod-shaped object sets, and obtain a second rod-shaped object set corresponding to each candidate rod-shaped object.

[0129] Exemplarily, after determining the first rod-shaped object set of candidate rod-shaped objects, determine the rod-shaped object head image position of each two-dimensional rod-shaped object in the first rod-shaped object set, and respectively determine a first connecting line between a set point on the two-dimensional image and the rod-shaped object head image position of each two-dimensional rod-shaped object, and a second connecting line between the set point on the two-dimensional image and the rod-shaped object head image position of the candidate rod-shaped object, and respectively determine the angle between each first connecting line and the second connecting line. Optionally, the set point on the two-dimensional image may be the origin of the image coordinate system of the two-dimensional image.

[0130] Furthermore, for each candidate rod-shaped object, the angle corresponding to each two-dimensional rod-shaped object in the first rod-shaped object set is compared with a set angle threshold (for example, 30°), and two-dimensional rod-shaped objects whose angles are within the set angle threshold are screened out from the first rod-shaped object set, that is, two-dimensional rod-shaped objects whose angles are less than the set angle threshold are screened out, thereby obtaining a second rod-shaped object set of the candidate rod-shaped objects based on the screened two-dimensional rod-shaped objects.

[0131] This solution obtains a second set of rod-shaped objects that conform to the arrangement direction of the rod-shaped objects by screening out two-dimensional rod-shaped objects that conform to the arrangement direction of the rod-shaped objects from the first set of rod-shaped objects according to the angles between each two-dimensional rod-shaped object in the first set of rod-shaped objects and the candidate rod-shaped objects. This greatly improves the screening accuracy of two-dimensional rod-shaped objects that are actually connected to the candidate rod-shaped objects with linear objects, and greatly improves the accuracy of linear object generation.

[0132] Furthermore, after determining the second rod-shaped object set of each candidate rod-shaped object, for each candidate rod-shaped object, all two-dimensional rod-shaped objects in the second rod-shaped object set are used as connected rod-shaped objects corresponding to the candidate rod-shaped object, thereby obtaining connected rod-shaped objects corresponding to each two-dimensional rod-shaped object.

[0133] This solution generates a second rod-shaped object set for each two-dimensional rod-shaped object, and determines the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object according to the second rod-shaped object set, so as to quickly generate a linear object. It needs to be explained that this solution uses all the two-dimensional rod-shaped objects in the second rod-shaped object set as connecting rod-shaped objects, and then directly connects the candidate rod-shaped objects with all the two-dimensional rod-shaped objects in the second rod-shaped object set based on the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects. Although the generated three-dimensional linear objects are relatively complex, they can also meet the obstacle reference application of linear object obstacle avoidance. In addition, the second rod-shaped object set retains the two-dimensional rod-shaped objects that meet the layout direction of the rod-shaped objects. Compared with directly using the two-dimensional rod-shaped objects in the first rod-shaped object set as connecting rod-shaped objects, it can effectively reduce the complexity of generating three-dimensional linear objects, and the obstacle reference application of linear object obstacle avoidance is also more accurate.

[0134] Although the second rod-shaped object set determined by the above scheme is actually connected to the candidate rod-shaped objects by linear objects, in practice, three rod-shaped objects may be connected in sequence. It can be understood that: among the three rod-shaped objects that are sequentially connected to each other by linear objects, every two adjacent rod-shaped objects are connected by a linear object, but usually, among these three rod-shaped objects, the first rod-shaped object and the last rod-shaped object are not directly connected. Therefore, if it is directly assumed that there should be linear objects between the candidate rod-shaped objects and each two-dimensional rod-shaped object in the second rod-shaped object set, redundant lines may be generated. For example, the line between the first rod-shaped object and the last rod-shaped object in the above example is redundant, which is not conducive to the accurate generation of linear objects and will make the obstacle scene finally generated more complicated. Therefore, to solve this technical problem, in one embodiment, when determining the connecting rod-shaped object corresponding to the candidate rod-shaped object based on the second rod-shaped object set, the present solution may further include: determining the connecting rod-shaped object corresponding to each candidate rod-shaped object from the second rod-shaped object set based on the distance relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the second rod-shaped object set.

[0135] Exemplarily, after determining the second rod-shaped object set of each candidate rod-shaped object, for each candidate rod-shaped object, the distance relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the corresponding second rod-shaped object set is determined, and according to the distance relationship, one of the two-dimensional rod-shaped objects in the second rod-shaped object set is selected as the connecting rod-shaped object corresponding to the candidate rod-shaped object. By taking each two-dimensional rod-shaped object as a candidate rod-shaped object and determining the corresponding connecting rod-shaped object, the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object is obtained.

[0136] This solution generates a first rod-shaped object set for each two-dimensional rod-shaped object, screens the first rod-shaped object set to obtain a second rod-shaped object set, and accurately determines the connected rod-shaped objects corresponding to each two-dimensional rod-shaped object from the second rod-shaped object set, thereby achieving more accurate linear object generation.

[0137] In one possible embodiment, Figure 6 As shown in a schematic diagram of a connected rod-shaped object determination process, the linear object generation method provided by the present solution includes: determining a connected rod-shaped object corresponding to each candidate rod-shaped object from the second rod-shaped object set based on the distance relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the second rod-shaped object set;

[0138] S2421: Determine a second distance between each candidate stick-shaped object and each two-dimensional stick-shaped object in the second stick-shaped object set.

[0139] S2422: Taking the two-dimensional rod-shaped object with the smallest second distance in each second rod-shaped object set as a connected rod-shaped object corresponding to the candidate rod-shaped object.

[0140] Exemplarily, for each candidate rod-shaped object, the second distance between the candidate rod-shaped object and each two-dimensional rod-shaped object in the second rod-shaped object set is calculated according to the rod-shaped object tail image position of the candidate rod-shaped object and the rod-shaped object tail image position of each two-dimensional rod-shaped object in the second rod-shaped object set. Further, these second distances are sorted, the smallest second distance is determined, and the two-dimensional rod-shaped object with the smallest second distance is used as the connected rod-shaped object corresponding to the candidate rod-shaped object.

[0141] It should be explained that after obtaining the second rod-shaped object set corresponding to each candidate rod-shaped object, since there may still be other two-dimensional rod-shaped objects in the second rod-shaped object set that are not actually connected to the candidate rod-shaped object, it is necessary to determine a connected rod-shaped object connected to the candidate rod-shaped object from the second rod-shaped object set.

[0142] This solution uses the two-dimensional rod-shaped object with the smallest distance from the candidate rod-shaped object in the second rod-shaped object set as the connecting rod-shaped object, so as to more accurately determine the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object, generate more accurate linear objects in the electronic map based on the more accurate connection relationship of the rod-shaped objects, and improve the linear object generation effect.

[0143] S250: generating a three-dimensional linear object in the electronic map based on a connection relationship between each two-dimensional rod-shaped object and a connecting rod-shaped object, and a mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object.

[0144] In the above, by determining the linear object direction of the two-dimensional linear object connected to each two-dimensional rod-shaped object on the two-dimensional image, and grouping the two-dimensional linear objects according to the linear object direction to obtain multiple linear object groups, the linear object group direction of each linear object group is obtained, and the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object is determined according to the linear object group direction, and according to the connection relationship between the two-dimensional rod-shaped object and the connecting rod-shaped object, and the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object, a three-dimensional linear object is generated in the electronic map, and accurate three-dimensional reconstruction of the linear object can be achieved without relying on high-precision and complete three-dimensional point cloud data, effectively improving the accuracy of generating linear objects, and improving the linear object generation effect in the map. At the same time, by generating a first rod-shaped object set for each two-dimensional rod-shaped object, and screening the first rod-shaped object set to obtain a second rod-shaped object set, and accurately determining the connecting rod-shaped object corresponding to each two-dimensional rod-shaped object from the second rod-shaped object set, more accurate linear object generation is achieved.

[0145] Figure 7 A schematic diagram of the structure of a linear object generating device provided in an embodiment of the present application is provided, wherein the linear object generating device is used to generate a linear object with rod-shaped objects connected to both ends. Figure 7 The linear object generating device includes a first direction module 71, a second direction module 72, a connection determining module 73 and a target generating module 74.

[0146] Among them, the first direction module 71 is used to obtain the two-dimensional rod-shaped objects on the two-dimensional image, and the linear object direction of the two-dimensional linear objects connected to each two-dimensional rod-shaped object; the second direction module 72 is used to group the two-dimensional linear objects to obtain multiple linear object groups based on the linear object direction of the two-dimensional linear objects connected to each two-dimensional rod-shaped object, and determine the linear object group direction corresponding to each linear object group; the connection determination module 73 is used to determine the connected rod-shaped object corresponding to each two-dimensional rod-shaped object based on the linear object group direction; the target generation module 74 is used to generate a three-dimensional linear object in the electronic map based on the connection relationship between each two-dimensional rod-shaped object and the connected rod-shaped object, and the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object.

[0147] In the above, by determining the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object on the two-dimensional image, and grouping the two-dimensional linear objects according to the linear object directions to obtain multiple linear object groups, the linear object group direction of each linear object group is obtained, and the connecting rod-shaped objects corresponding to each two-dimensional rod-shaped object are determined according to the linear object group direction, and according to the connection relationship between the two-dimensional rod-shaped objects and the connecting rod-shaped objects, as well as the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, three-dimensional linear objects are generated in the electronic map, and accurate three-dimensional reconstruction of the linear objects can be achieved without relying on high-precision and complete three-dimensional point cloud data, thereby effectively improving the accuracy of generating linear objects and improving the linear object generation effect in the map.

[0148] In a possible embodiment, when determining the linear object group direction corresponding to each linear object group, the second direction module 72 includes:

[0149] Determine the slope information and intercept information of each two-dimensional linear object in each linear object group;

[0150] Based on the average slope information and the average intercept information corresponding to each linear object group, the linear object group direction corresponding to each linear object group is determined.

[0151] In a possible embodiment, when the connection determination module 73 determines the connected rod-shaped object corresponding to each two-dimensional rod-shaped object based on the direction of the linear object group, the connection determination module 73 includes:

[0152] Taking each two-dimensional rod-shaped object as a candidate rod-shaped object in turn, and determining a first rod-shaped object set for each candidate rod-shaped object based on a positional relationship between the candidate rod-shaped object and the direction of the linear object group, wherein the first rod-shaped object set records other two-dimensional rod-shaped objects that have a connection condition with the candidate rod-shaped object;

[0153] A connected stick-shaped object corresponding to the candidate stick-shaped object is determined based on the first stick-shaped object set.

[0154] In a possible embodiment, when the connection determination module 73 determines the connected stick-shaped objects corresponding to the candidate stick-shaped objects based on the first stick-shaped object set, the connection determination module 73 includes:

[0155] Based on the angle relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the first rod-shaped object set, the two-dimensional rod-shaped objects in the first rod-shaped object set are screened to obtain a second rod-shaped object set corresponding to each candidate rod-shaped object;

[0156] A connected stick-shaped object corresponding to the candidate stick-shaped object is determined based on the second stick-shaped object set.

[0157] In a possible embodiment, when the connection determination module 73 determines the connected stick-shaped object corresponding to the candidate stick-shaped object based on the second stick-shaped object set, the connection determination module 73 includes:

[0158] Based on the distance relationship between the candidate stick-shaped object and each two-dimensional stick-shaped object in the second stick-shaped object set, a connected stick-shaped object corresponding to each candidate stick-shaped object is determined from the second stick-shaped object set.

[0159] In a possible embodiment, when the connection determination module 73 determines the first stick-shaped object set of each candidate stick-shaped object based on the positional relationship between the candidate stick-shaped object and the direction of the line-shaped object group, it includes:

[0160] Determine a first distance between a rod-shaped object head image position of each two-dimensional rod-shaped object and a straight line where a linear object group direction corresponding to the candidate rod-shaped object is located;

[0161] The two-dimensional rod-shaped object whose first distance is within the set straight-line distance threshold is added to the first rod-shaped object set of candidate rod-shaped objects.

[0162] In a possible embodiment, the connection determination module 73 screens the two-dimensional rod-shaped objects in the first rod-shaped object set based on the angle relationship between the candidate rod-shaped object and each two-dimensional rod-shaped object in the first rod-shaped object set to obtain the second rod-shaped object set corresponding to each candidate rod-shaped object, including:

[0163] Calculating an angle between a first line connecting a set point of the two-dimensional image and a rod-shaped object head image position of each two-dimensional rod-shaped object in the first rod-shaped object set and a second line connecting the set point of the two-dimensional image and a rod-shaped object head image position of the candidate rod-shaped object;

[0164] Two-dimensional rod-shaped objects whose included angles are within a set included angle threshold are screened out from each first rod-shaped object set to obtain a second rod-shaped object set corresponding to each candidate rod-shaped object.

[0165] In a possible embodiment, when the connection determination module 73 determines the connected stick-shaped object corresponding to each candidate stick-shaped object from the second stick-shaped object set based on the distance relationship between the candidate stick-shaped object and each two-dimensional stick-shaped object in the second stick-shaped object set, the connection determination module 73 includes:

[0166] determining a second distance between each candidate rod-shaped object and each two-dimensional rod-shaped object in the second rod-shaped object set;

[0167] The two-dimensional rod-shaped object with the smallest second distance in each second rod-shaped object set is used as a connected rod-shaped object corresponding to the candidate rod-shaped object.

[0168] In a possible embodiment, the linear object generating device further includes an image determination module, a geographic determination module and a relationship determination module.

[0169] Among them, the image determination module is used to obtain multiple original images of the target area, and determine the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in each original image; the geographical determination module is used to determine the matching relationship of the rod-shaped objects in the common viewing area of ​​the multiple original images, and determine the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object based on the matching relationship of the rod-shaped objects, the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object; the relationship determination module is used to determine the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object based on the image position of the head of the rod-shaped object, the image position of the tail of the rod-shaped object, the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object.

[0170] In a possible embodiment, the linear object generation device provided by the present solution further includes a target determination module and a rod-shaped object reconstruction module, wherein:

[0171] A target determination module, used to determine the target rod-shaped object based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object;

[0172] The rod-shaped object reconstruction module is used to reconstruct the target rod-shaped object into the electronic map.

[0173] In a possible embodiment, the target determination module is specifically used to:

[0174] Determine a plurality of candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object;

[0175] Clustering is performed on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects.

[0176] In a possible embodiment, when the target determination module determines a plurality of candidate stick-shaped objects based on the geographical location of the head of the stick-shaped object and the geographical location of the tail of the stick-shaped object, the target determination module includes:

[0177] Determine a plurality of initial rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object;

[0178] The initial rod-shaped objects are screened to obtain a plurality of candidate rod-shaped objects.

[0179] In a possible embodiment, the step of screening the initial rod-shaped objects by the target determination module includes a combination of one or more of the following methods:

[0180] Method 1: determining the height information of each initial rod-shaped object according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screening the initial rod-shaped objects based on the height information and the set height standard;

[0181] Method 2: determining the inclination of each initial rod-shaped object according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screening the initial rod-shaped objects based on the inclination and the set inclination threshold;

[0182] Method 3: Determine the height above the ground of each initial rod-shaped object according to the geographical location of the tail of the rod-shaped object, and screen the initial rod-shaped objects based on the height above the ground and a set height threshold.

[0183] In a possible embodiment, when the target determination module performs clustering processing on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects, the target determination module includes:

[0184] Clustering multiple candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object;

[0185] The head geographic location mean of the head geographic location of the rod-shaped object in each cluster classification and the tail geographic location mean of the tail geographic location of the rod-shaped object are determined, and based on the head geographic location mean and the tail geographic location mean, target rod-shaped objects corresponding to multiple cluster classifications are obtained.

[0186] It is worth noting that in the embodiment of the above-mentioned linear object generating device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0187] The embodiment of the present application also provides a linear object generating device, which can be integrated with the linear object generating apparatus provided in the embodiment of the present application. Figure 8 Schematic diagram of a linear object generation device provided by an embodiment of the present application. Figure 8 The linear object generation device includes: an input device 83, an output device 84, a memory 82 and one or more processors 81; the memory 82 is used to store one or more programs; when one or more programs are executed by one or more processors 81, the one or more processors 81 implement the linear object generation method provided in the above embodiment. The input device 83, the output device 84, the memory 82 and the processor 81 can be connected by a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0188] The memory 82, as a computing device readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the linear object generation method provided in any embodiment of the present application (for example, the first direction module 71, the second direction module 72, the connection determination module 73 and the target generation module 74 in the linear object generation device). The memory 82 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 82 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 82 may further include a memory remotely arranged relative to the processor 81, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0189] The input device 83 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 84 may include a display device such as a display screen.

[0190] The processor 81 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 82, that is, realizes the above-mentioned linear object generation method.

[0191] The linear object generation device, equipment and computer provided above can be used to execute the linear object generation method provided by any of the above embodiments, and have corresponding functions and beneficial effects.

[0192] The embodiment of the present application also provides a storage medium storing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute the linear object generation method provided in the above embodiment. The linear object generation method includes: obtaining two-dimensional rod-shaped objects on a two-dimensional image, and the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object; based on the linear object directions of the two-dimensional linear objects connected to each two-dimensional rod-shaped object, grouping the two-dimensional linear objects to obtain multiple linear object groups, and determining the linear object group direction corresponding to each linear object group; determining the connected rod-shaped object corresponding to each two-dimensional rod-shaped object based on the linear object group direction; generating a three-dimensional linear object in an electronic map based on the connection relationship between each two-dimensional rod-shaped object and the connected rod-shaped object, and the mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object.

[0193] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0194] Of course, the computer executable instructions of a storage medium storing computer executable instructions provided in an embodiment of the present application are not limited to the linear object generation method provided above, and can also execute related operations in the linear object generation method provided in any embodiment of the present application.

[0195] The linear object generation device, equipment and storage medium provided in the above embodiments can execute the linear object generation method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the linear object generation method provided in any embodiment of the present application.

[0196] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments provided herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A method for generating a linear object, characterized in that: For generating a linear object with rod-shaped objects connected to both ends, the method comprises: Acquire the two-dimensional rod-shaped objects on the two-dimensional image, and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects; Based on the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects, the two-dimensional linear objects are grouped to obtain a plurality of linear object groups, and a linear object group direction corresponding to each of the linear object groups is determined; Determine a connected rod-shaped object corresponding to each of the two-dimensional rod-shaped objects based on the direction of the linear object group; Based on the connection relationship between each of the two-dimensional rod-shaped objects and the connecting rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, a three-dimensional linear object is generated in the electronic map.

2. The linear object generation method according to claim 1, characterized in that: The determining the linear object group direction corresponding to each linear object group includes: Determining slope information and intercept information of each of the two-dimensional linear objects in each of the linear object groups; Based on the average slope information and the average intercept information corresponding to each of the linear object groups, the linear object group direction corresponding to each of the linear object groups is determined.

3. The linear object generation method according to claim 1, characterized in that: The step of determining the connected rod-shaped object corresponding to each of the two-dimensional rod-shaped objects based on the direction of the linear object group includes: Taking each of the two-dimensional rod-shaped objects as a candidate rod-shaped object in turn, and determining a first rod-shaped object set for each of the candidate rod-shaped objects based on a positional relationship between the candidate rod-shaped object and the direction of the linear object group, wherein the first rod-shaped object set records other two-dimensional rod-shaped objects that have a connection condition with the candidate rod-shaped object; A connected stick-shaped object corresponding to the candidate stick-shaped object is determined based on the first stick-shaped object set.

4. The linear object generation method according to claim 3, characterized in that: The determining, based on the first set of stick-shaped objects, the connected stick-shaped objects corresponding to the candidate stick-shaped objects comprises: Based on the angle relationship between the candidate rod-shaped object and each of the two-dimensional rod-shaped objects in the first rod-shaped object set, the two-dimensional rod-shaped objects in the first rod-shaped object set are screened to obtain a second rod-shaped object set corresponding to each of the candidate rod-shaped objects; A connected stick-shaped object corresponding to the candidate stick-shaped object is determined based on the second stick-shaped object set.

5. The linear object generation method according to claim 4, characterized in that: The determining, based on the second set of stick-shaped objects, the connected stick-shaped objects corresponding to the candidate stick-shaped objects comprises: Based on the distance relationship between the candidate stick-shaped object and each of the two-dimensional stick-shaped objects in the second stick-shaped object set, a connected stick-shaped object corresponding to each of the candidate stick-shaped objects is determined from the second stick-shaped object set.

6. The linear object generation method according to claim 3, characterized in that: The determining a first rod-shaped object set of each candidate rod-shaped object based on the positional relationship between the candidate rod-shaped object and the direction of the linear object group includes: Determine a first distance between a rod-shaped object head image position of each of the two-dimensional rod-shaped objects and a straight line where a direction of a linear object group corresponding to the candidate rod-shaped object is located; The two-dimensional rod-shaped object whose first distance is within a set straight-line distance threshold is added to a first rod-shaped object set of candidate rod-shaped objects.

7. The linear object generation method according to claim 4, characterized in that: The method of screening the two-dimensional rod-shaped objects in the first rod-shaped object set based on the angle relationship between the candidate rod-shaped object and each of the two-dimensional rod-shaped objects in the first rod-shaped object set to obtain a second rod-shaped object set corresponding to each of the candidate rod-shaped objects comprises: calculating an angle between a first line connecting the set point of the two-dimensional image and the position of the rod-shaped object head image of each of the two-dimensional rod-shaped objects in the first rod-shaped object set and a second line connecting the set point of the two-dimensional image and the position of the rod-shaped object head image of the candidate rod-shaped object; The two-dimensional rod-shaped objects whose included angles are within a set included angle threshold are screened out from each of the first rod-shaped object sets to obtain a second rod-shaped object set corresponding to each of the candidate rod-shaped objects.

8. The linear object generation method according to claim 5, characterized in that: The determining, from the second stick-shaped object set, a connected stick-shaped object corresponding to each of the candidate stick-shaped objects based on the distance relationship between the candidate stick-shaped object and each of the two-dimensional stick-shaped objects in the second stick-shaped object set, comprises: determining a second distance between each of the candidate rod-shaped objects and each of the two-dimensional rod-shaped objects in the second rod-shaped object set; The two-dimensional rod-shaped object with the smallest second distance in each set of the second rod-shaped objects is used as a connected rod-shaped object corresponding to the candidate rod-shaped object.

9. The linear object generation method according to any one of claims 1 to 8, characterized in that: Before generating a three-dimensional linear object in an electronic map based on the connection relationship between each of the two-dimensional rod-shaped objects and the connecting rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects, the method further includes: Acquire multiple original images of the target area, and determine the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object in each of the original images; Determine a matching relationship between rod-shaped objects in a common viewing area of ​​the plurality of original images, and determine a geographical position of a rod-shaped object head and a geographical position of a rod-shaped object tail based on the matching relationship between the rod-shaped objects, an image position of a rod-shaped object head, and an image position of a rod-shaped object tail; A mapping relationship between the two-dimensional rod-shaped object and the three-dimensional rod-shaped object is determined based on the image position of the rod-shaped object head, the image position of the rod-shaped object tail, the geographical position of the rod-shaped object head, and the geographical position of the rod-shaped object tail.

10. The linear object generation method according to claim 9, characterized in that: After determining the geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object, the method further includes: Determine the target rod-shaped object based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object; The target rod-shaped object is reconstructed into an electronic map.

11. The linear object generation method according to claim 10, characterized in that: The determining the target rod-shaped object based on the geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object comprises: Determine a plurality of candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object; Clustering is performed on the plurality of candidate rod-shaped objects to obtain a plurality of target rod-shaped objects.

12. The linear object generation method according to claim 11, characterized in that: The determining of a plurality of candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object comprises: Determine a plurality of initial rod-shaped objects based on the geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object; The initial rod-shaped objects are screened to obtain a plurality of candidate rod-shaped objects.

13. The linear object generation method according to claim 12, characterized in that: The screening of the initial rod-shaped objects includes one or more of the following combinations: Method 1: determining the height information of each of the initial rod-shaped objects according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screening the initial rod-shaped objects based on the height information and a set height standard; Method 2: determining the inclination of each of the initial rod-shaped objects according to the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object, and screening the initial rod-shaped objects based on the inclination and a set inclination threshold; Method three: determining the height above the ground of each of the initial rod-shaped objects according to the geographical location of the tail of the rod-shaped object, and screening the initial rod-shaped objects based on the height above the ground and a set height threshold.

14. The linear object generation method according to claim 11, characterized in that: The clustering process is performed on the plurality of candidate rod-shaped objects to obtain a plurality of target rod-shaped objects, including: Performing clustering processing on the plurality of candidate rod-shaped objects based on the geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object; The head geographic location mean of the head geographic location of the rod-shaped object in each cluster classification and the tail geographic location mean of the tail geographic location of the rod-shaped object are determined, and based on the head geographic location mean and the tail geographic location mean, target rod-shaped objects corresponding to multiple cluster classifications are obtained.

15. The linear object generation method according to claim 1, characterized in that: The linear object and the rod-shaped object are respectively a combination of one or more of an electric wire and an electric wire pole, a clothesline and a first supporting pole, a bird catching net and a second supporting pole.

16. A linear object generating device, characterized in that: The device is used to generate a linear object with rod-shaped objects connected to both ends, the device comprises a first direction module, a second direction module, a connection determination module and a target generation module, wherein: The first direction module is used to obtain the two-dimensional rod-shaped objects on the two-dimensional image, and the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects; The second direction module is used to group the two-dimensional linear objects to obtain a plurality of linear object groups based on the linear object directions of the two-dimensional linear objects connected to each of the two-dimensional rod-shaped objects, and determine the linear object group direction corresponding to each of the linear object groups; The connection determination module is used to determine the connected rod-shaped object corresponding to each of the two-dimensional rod-shaped objects based on the direction of the linear object group; The target generation module is used to generate a three-dimensional linear object in the electronic map based on the connection relationship between each of the two-dimensional rod-shaped objects and the connecting rod-shaped objects, and the mapping relationship between the two-dimensional rod-shaped objects and the three-dimensional rod-shaped objects.

17. A linear object generating device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the linear object generation method as described in any one of claims 1-15.

18. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute the linear object generation method as described in any one of claims 1 to 15 when executed by a computer processor.