Method and device for generating rod-shaped object in map, equipment and storage medium
Patent Information
- Application Number
- CN202310664476.4
- 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
The existing rod-like object generation methods in three-dimensional maps rely on high-precision and complete point cloud data, resulting in low generation accuracy and poor effect when the point cloud data at the bottom or head of the rod-like object are incomplete.
By acquiring multiple original images of the target area, the head and tail positions of the rod-shaped object are determined, the geographical location is determined based on the image matching relationship, and the target rod-shaped object is reconstructed to an electronic map to avoid dependence on high-precision point cloud data.
The three-dimensional reconstruction accuracy and map generation effect of rod-shaped objects are improved, and accurate rod-shaped objects can be realized without relying on high-precision point cloud data.
Smart Images

Figure CN119091096A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a method, device, equipment and storage medium for generating rod-shaped objects in a map. Background Art
[0002] The generation of rod-shaped objects in existing three-dimensional maps is generally done by obtaining point cloud data of the target area through radar surveying, extracting the point cloud data of the rod-shaped objects from the point cloud data through a segmentation algorithm, and instantiating the point cloud data of the rod-shaped objects through a clustering algorithm. The point cloud bounding box of the rod-shaped objects is then calculated to obtain the length, width, and height attributes of the rod-shaped objects, and then a vectorized rod-shaped object is generated based on the length, width, and height attributes.
[0003] However, this method of generating rod-shaped objects in 3D maps requires high accuracy and integrity in the restoration of rod-shaped object point cloud data. When the bottom point cloud data of the rod-shaped object is largely incomplete, the point cloud data may be judged as wires or noise. When the head point cloud data of the rod-shaped object is largely incomplete, the accurate height of the rod-shaped object cannot be obtained, the accuracy of generating the rod-shaped object is low, and the generation effect of the rod-shaped object in the map is poor. Summary of the invention
[0004] The embodiments of the present application provide a method, device, equipment and storage medium for generating rod-shaped objects in a map, so as to solve the technical problems in the related art that the generation of rod-shaped objects in a map relies on high-precision and complete point cloud data, the accuracy of generating rod-shaped objects is low, and the generation effect of rod-shaped objects in the map is poor, so as to effectively improve the accuracy of generating rod-shaped objects and improve the generation effect of rod-shaped objects in the map.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a rod-shaped object in a map, comprising:
[0006] 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;
[0007] 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;
[0008] 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;
[0009] The target rod-shaped object is reconstructed into an electronic map.
[0010] In a second aspect, an embodiment of the present application provides a device for generating a rod-shaped object in a map, comprising an image determination module, a geographic determination module, a target determination module, and a target reconstruction module, wherein:
[0011] 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 of the original images;
[0012] The geographic determination module is used to determine the matching relationship of the rod-shaped objects in the common viewing area of the plurality of original images, and determine the geographic location of the rod-shaped object head and the geographic location of the rod-shaped object tail based on the matching relationship of the rod-shaped objects, the image position of the rod-shaped object head and the image position of the rod-shaped object tail;
[0013] The target determination module is 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;
[0014] The target reconstruction module is used to reconstruct the target rod-shaped object into an electronic map.
[0015] In a third aspect, an embodiment of the present application provides a device for generating a rod-shaped object in a map, comprising: 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 method for generating rod-shaped objects in a map 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 method for generating rod-shaped objects in a map as described in the first aspect.
[0019] The embodiment of the present application 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 position of the head of the rod-shaped object and the geographical position 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 position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object, and then reconstructs the target rod-shaped object on the electronic map, so that 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a method for generating a rod-shaped object in a map provided by an embodiment of the present application;
[0021] Figure 2 is a flow chart of another method for generating rod-shaped objects in a map provided by an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a candidate rod-shaped object determination process provided by an embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of a clustering process flow for candidate rod-shaped objects provided in an embodiment of the present application;
[0024] Figure 5 It is a structural schematic diagram of a rod-shaped object generating device in a map provided by an embodiment of the present application;
[0025] Figure 6 It is a structural schematic diagram of a rod-shaped object generating device in a map provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] 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.
[0027] Figure 1 A flowchart of a method for generating rod-shaped objects in a map provided in an embodiment of the present application is given. The method for generating rod-shaped objects in a map provided in an embodiment of the present application can be executed by a rod-shaped object generating device in a map. The rod-shaped object generating device in a map can be implemented by hardware and / or software and integrated in a rod-shaped object generating device in a map.
[0028] The following description is made by taking the method for generating a rod-shaped object in a map executed by the rod-shaped object generating device in the map as an example. Figure 1, the rod-shaped object generation method in the map includes:
[0029] S110: 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 original image.
[0030] The rod-shaped objects provided by the present solution include but are not limited to one or more combinations of electric poles, tree trunks, street lamps, traffic sign poles, and flag poles. For example, when the rod-shaped object is an electric pole, a corresponding electric pole is generated on the electronic map based on the rod-shaped object generation method in the map provided by the present solution.
[0031] The target area provided by this solution can be understood as an area where three-dimensional reconstruction of rod-shaped objects is required, and the original image provided by this solution 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 a complete flight are used as original images. The original image provided by this solution may display 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 may be captured in part or all of the original images, wherein the rod-shaped objects may include the head of the rod-shaped object (for example, the top of the rod-shaped object is higher than the ground and connected to the wire) and the tail of the rod-shaped object (for example, the end of the rod-shaped object in contact with the ground).
[0032] Exemplarily, multiple original images of the target area are acquired, and the rod-shaped object 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 (e.g., 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 (e.g., the pixel position of the center point of the bottom of the rod-shaped object in the original image).
[0033] 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 the present solution can be obtained by analyzing a 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 marked, and after the training is completed, the key point detection model is configured in the rod-shaped object generation device in the map. After obtaining multiple original images of the target area, these original images are 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 each original 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.
[0034] It needs to be explained that the rod-shaped object, the image position of the rod-shaped object head and the image position of the rod-shaped object tail detected in the original image can be one or more. For example, when there is only one picture corresponding to a rod-shaped object in the original image, the image position of the rod-shaped object head and the image position of the rod-shaped object tail corresponding to the rod-shaped object can be detected, and when there are multiple pictures corresponding to multiple rod-shaped objects in the original image, the image positions of the rod-shaped object heads and the image positions of the rod-shaped object tails corresponding to multiple rod-shaped objects can be detected.
[0035] S120: determining a matching relationship of 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 of the rod-shaped objects, an image position of a rod-shaped object head, and an image position of a rod-shaped object tail.
[0036] The common viewing area provided by this solution can be understood as the overlapping area in the field of view corresponding to different original images. Generally, in a complete flight, adjacent original images have a larger common viewing area due to the small deviation between the shooting positions.
[0037] Exemplarily, 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. The rod-shaped object matching relationship provided by the present solution 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 actually the same rod-shaped object.
[0038] Further, according to the 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 position and the rod-shaped object tail geographical position corresponding to each rod-shaped object are determined. The rod-shaped object head geographical position provided in this solution can be understood as the actual geographical position (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 position can be understood as the actual geographical position of the rod-shaped object tail (the center point of the end of the rod-shaped object connected to the ground).
[0039] S130: Determine the target stick-shaped object 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.
[0040] 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.
[0041] 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.
[0042] S140: Reconstruct the target rod-shaped object into the electronic map.
[0043] For example, after determining multiple target rod-shaped objects, these target rod-shaped objects can be reconstructed into an electronic map so that users can view the 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 this solution can be determined based on the three-dimensional reconstruction of multiple original images, or can be determined through a set three-dimensional map.
[0044] 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.
[0045] In the above, by 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 each original image of the target area, 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 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 determining 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 reconstructing 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.
[0046] Based on the above embodiments, Figure 2 A flowchart of another method for generating a rod-shaped object in a map provided by an embodiment of the present application is given. Figure 2 , the rod-shaped object generation method in the map includes:
[0047] S210: 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 original image.
[0048] S220: Determine a common viewing area in each pair of original images, and obtain an image position of a rod-shaped object head and an image position of a rod-shaped object tail in the common viewing area.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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 pairwise 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.
[0053] S230: 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.
[0054] S240: 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] S250: 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.
[0059] 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.
[0060] In one possible embodiment, Figure 3 As shown in a schematic diagram of a candidate rod-shaped object determination process, the rod-shaped object generation method provided by the present solution may include:
[0061] S251: Determine a plurality of initial 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.
[0062] S252: Screening the initial rod-shaped objects to obtain a plurality of candidate rod-shaped objects.
[0063] 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.
[0064] 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.
[0065] In a possible embodiment, the rod-shaped 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:
[0066] 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.
[0067] 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 wire 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] In one embodiment, the rod-shaped object provided by the present solution may be a combination of one or more of a telephone pole, a tree trunk, a street lamp, a traffic sign pole, a flagpole, a cement pole, and a wooden pole. Different initial rod-shaped object screening methods can achieve different screening effects for different types of rod-shaped objects, and different initial rod-shaped object screening methods or combinations of initial rod-shaped object screening methods can be used for different types of rod-shaped objects. The initial rod-shaped object screening methods can be preliminarily screened for rod-shaped object types in advance to determine the initial rod-shaped object screening method or combination of initial rod-shaped object screening methods suitable for the current rod-shaped object type or combination of rod-shaped object types. For example, since the adaptability of method one to rod-shaped objects with large height variations (such as tree trunks) is general, when the rod-shaped objects include tree trunks, method two and / or method three can be used to screen the initial rod-shaped objects; since method two is generally adaptable to non-vertical rod-shaped objects (such as inclined tree trunks, concrete poles, etc.), when there are rod-shaped objects with an inclination reaching a set inclination degree, method one and / or method three can be used to screen the initial rod-shaped objects; among them, method three can achieve good screening effects in various types of rod-shaped objects, and method three can be applied to the screening of various types of rod-shaped objects.
[0074] S260: performing clustering processing on the multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] For example, Figure 4 As shown in a schematic diagram of a clustering process for candidate rod-shaped objects, the rod-shaped object generation method provided by the present solution performs clustering processing on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects, including:
[0079] S261: Clustering a plurality of candidate rod-shaped objects based on the geographical locations of the heads of the rod-shaped objects and the geographical locations of the tails of the rod-shaped objects.
[0080] S262: 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] S270: Reconstruct the target rod-shaped object into the electronic map.
[0086] In the above, by 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 each original image of the target area, and determining the geographical position of the head of the rod-shaped object and the geographical position 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, and the image position of the head of the rod-shaped object and the image position of the tail of the rod-shaped object, and determining the target rod-shaped object according to the geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object, and then reconstructing 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, effectively improving the accuracy of generating rod-shaped objects, and improving the generation effect of rod-shaped objects in the map. At the same time, the intermediate result generated by the three-dimensional reconstruction is used to obtain the matching relationship of the rod-shaped objects between different original images in the common viewing area, and the geographical position of the head and tail of each rod-shaped object is determined by using a triangulation algorithm, and the geographical position of each rod-shaped object is accurately determined, so as to improve the accuracy of generating rod-shaped objects in the electronic map. Clustering is also performed on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects, and the target rod-shaped objects corresponding to each rod-shaped object in the target area in the three-dimensional scene are accurately determined, thereby improving the accuracy of rod-shaped object generation.
[0087] Figure 5 A schematic diagram of the structure of a rod-shaped object generating device in a map provided by an embodiment of the present application is given. Figure 5 The rod-shaped object generating device in the map includes an image determination module 51, a geographic determination module 52, a target determination module 53 and a target reconstruction module 54.
[0088] The image determination module 51 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;
[0089] A geographic determination module 52 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;
[0090] A target determination module 53, configured to determine a target rod-shaped object based on a geographical location of a head of the rod-shaped object and a geographical location of a tail of the rod-shaped object;
[0091] The target reconstruction module 54 is used to reconstruct the target rod-shaped object into the electronic map.
[0092] In the above, by 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 each original image of the target area, 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 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 determining 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 reconstructing 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.
[0093] In a possible embodiment, the geographic determination module 52 is specifically configured to:
[0094] The matching relationship of rod-shaped objects in the common viewing area of two original images is determined by using the epipolar matching algorithm;
[0095] The geographical location of the head of the rod-shaped object and the geographical location of the tail of the rod-shaped object are determined by using a triangulation algorithm based on the matching relationship 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.
[0096] In a possible embodiment, the target determination module 53 is specifically used to:
[0097] 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;
[0098] Clustering is performed on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects.
[0099] In a possible embodiment, when the target determination module 53 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 53 includes:
[0100] 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;
[0101] The initial rod-shaped objects are screened to obtain a plurality of candidate rod-shaped objects.
[0102] In a possible embodiment, the step of screening the initial rod-shaped objects by the target determination module 53 includes a combination of one or more of the following methods:
[0103] 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;
[0104] 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;
[0105] 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.
[0106] In a possible embodiment, when the target determination module 53 performs clustering processing on multiple candidate rod-shaped objects to obtain multiple target rod-shaped objects, the target determination module 53 includes:
[0107] 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;
[0108] 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.
[0109] In a possible embodiment, the rod-shaped object generating device in the map further includes a common view area determination module, which is used to determine the common view areas in the original images before the determination module 52 determines the matching relationship of the rod-shaped objects in the common view areas of the multiple original images, and obtain 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 view area.
[0110] In a possible embodiment, the rod-shaped object includes a combination of one or more of a telephone pole, a tree trunk, a street lamp, a traffic sign pole, and a flagpole.
[0111] It is worth noting that in the embodiment of the rod-shaped object generation device in the above map, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; 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.
[0112] The embodiment of the present application also provides a device for generating rod-shaped objects in a map, and the device for generating rod-shaped objects in a map can be integrated with the apparatus for generating rod-shaped objects in a map provided in the embodiment of the present application. Figure 6 Schematic diagram of a rod-shaped object generation device in a map provided by an embodiment of the present application. Figure 6The rod-shaped object generation device in the map includes: an input device 63, an output device 64, a memory 62 and one or more processors 61; the memory 62 is used to store one or more programs; when the one or more programs are executed by the one or more processors 61, the one or more processors 61 implement the rod-shaped object generation method in the map provided by the above embodiment. The input device 63, the output device 64, the memory 62 and the processor 61 can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0113] The memory 62, 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 rod-shaped object generation method in the map provided in any embodiment of the present application (for example, the image determination module 51, the geographic determination module 52, the target determination module 53 and the target reconstruction module 54 in the rod-shaped object generation device in the map). The memory 62 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 62 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 62 may further include a memory remotely arranged relative to the processor 61, 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.
[0114] The input device 63 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 64 may include a display device such as a display screen.
[0115] The processor 61 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 62, that is, realizes the above-mentioned method for generating rod-shaped objects in the map.
[0116] The apparatus, device and computer for generating rod-shaped objects in a map provided above can be used to execute the method for generating rod-shaped objects in a map provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0117] 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 rod-shaped object generation method in the map provided by the above embodiment. The rod-shaped object generation method in the map includes: acquiring multiple original images of the target area, 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 each original image; determining the matching relationship of the rod-shaped objects in the common viewing area of the multiple 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; determining 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; and reconstructing the target rod-shaped object into the electronic map.
[0118] 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.
[0119] Of course, the storage medium storing computer executable instructions provided in the embodiment of the present application is not limited to the method for generating rod-shaped objects in a map provided above, and the computer executable instructions can also execute the related operations in the method for generating rod-shaped objects in a map provided in any embodiment of the present application.
[0120] The rod-shaped object generation device, equipment and storage medium in the map provided in the above embodiments can execute the rod-shaped object generation method in the map provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the rod-shaped object generation method in the map provided in any embodiment of the present application.
[0121] 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 also 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 rod-shaped object in a map, characterized in that: include: 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; 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.
2. The method for generating rod-shaped objects in a map according to claim 1, characterized in that: The determining of the matching relationship of the rod-shaped objects in the common viewing area of the plurality of original images, and determining the geographical position of the head of the rod-shaped object and the geographical position 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, comprises: Determine the matching relationship between the rod-shaped objects in the common viewing area of the original images using an epipolar matching algorithm; The geographical position of the head of the rod-shaped object and the geographical position of the tail of the rod-shaped object are determined 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.
3. The method for generating rod-shaped objects in a map according to claim 1, 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.
4. The method for generating rod-shaped objects in a map according to claim 3, 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.
5. The method for generating rod-shaped objects in a map according to claim 4, 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.
6. The method for generating rod-shaped objects in a map according to claim 3, 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.
7. The method for generating rod-shaped objects in a map according to claim 1, characterized in that: Before determining the matching relationship of the rod-shaped objects in the common viewing area of the plurality of original images, the method further includes: Determine the common viewing area in the pair of original images, and obtain 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.
8. The method for generating rod-shaped objects in a map according to claim 1, characterized in that: The rod-shaped object includes a combination of one or more of a telephone pole, a tree trunk, a street lamp, a traffic sign pole, and a flagpole.
9. A device for generating rod-shaped objects in a map, characterized in that: It includes an image determination module, a geographic determination module, a target determination module and a target reconstruction module, wherein: 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 of the original images; The geographic determination module is used to determine the matching relationship of the rod-shaped objects in the common viewing area of the plurality of original images, and determine the geographic location of the rod-shaped object head and the geographic location of the rod-shaped object tail based on the matching relationship of the rod-shaped objects, the image position of the rod-shaped object head and the image position of the rod-shaped object tail; The target determination module is 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; The target reconstruction module is used to reconstruct the target rod-shaped object into an electronic map.
10. A device for generating rod-shaped objects in a map, 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 method for generating rod-shaped objects in a map as described in any one of claims 1 to 8.
11. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the method for generating rod-shaped objects in a map as described in any one of claims 1 to 8.
