Method, device, electronic device and storage medium for generating electronic map
By acquiring and processing scene images and point cloud data of road scenes, the three-dimensional coordinates of target pixels and spatial points are determined, solving the problem of insufficient road marking accuracy in high-precision map construction in the existing technology, and achieving more accurate map generation. and navigation support.
Patent Information
- Application Number
- CN202110321572.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-03-25
AI Technical Summary
It is difficult to construct a high-precision autonomous driving map with existing technology, especially in terms of the accuracy of road markings, which affects the navigation accuracy of autonomous vehicles.
By obtaining the scene image and point cloud data of the road scene, the target pixel points and target space points corresponding to the road signs are determined, and these data are used to generate three-dimensional coordinate data, thereby supplementing the sparsity of the point cloud data and improving the accuracy of the electronic map.
It achieves more accurate electronic map generation, improves the recognition accuracy of road signs and the density of the map, and supports higher-precision autonomous driving navigation.
Smart Images

Figure CN112907746B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of navigation technology, and in particular to a method, device, electronic device and storage medium for generating an electronic map. Background Art
[0002] With the rapid development of autonomous driving technology, the importance of high-precision maps has become increasingly prominent, and has played a vital role in the fields of autonomous driving and intelligent transportation. Among them, high-precision maps are usually machine-oriented maps for use by autonomous driving vehicles. High-precision maps not only have high-precision coordinates, but also accurate road shape expressions, such as lane solid lines, dotted lines, turn arrows, and zebra crossings.
[0003] Therefore, the construction of high-precision maps is particularly important. Summary of the invention
[0004] In view of this, the present disclosure at least provides a method, device, electronic device and storage medium for generating an electronic map.
[0005] In a first aspect, the present disclosure provides a method for generating an electronic map, comprising:
[0006] Acquire scene images and point cloud data of road scenes;
[0007] Determine, from the multiple point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene and the corresponding target space point does not overlap with the multiple point cloud points;
[0008] Determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point;
[0009] An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the point cloud data.
[0010] By adopting the above method, by acquiring the scene image and point cloud data of the road scene, and determining the target point cloud point corresponding to the target pixel point in the scene image from the multiple point cloud points indicated by the point cloud data, the target point cloud point that satisfies the preset constraint conditions is determined, and the three-dimensional coordinate data of the target space point corresponding to the target pixel point on the road sign in the scene image is determined by using the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point, and the three-dimensional coordinate data of the target space point is used to supplement the point cloud data, so that the supplemented point cloud data is relatively dense, and then based on the determined three-dimensional coordinate data of the target space point and the point cloud data, a relatively accurate electronic map can be generated.
[0011] In a possible implementation manner, before determining, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition, the method further includes:
[0012] Detecting the scene image to determine contour area information of road signs included in the scene image;
[0013] Based on the point cloud data and the contour area information of the road sign, the target pixel point corresponding to the road sign in the scene image is determined.
[0014] Since road signs are an important part of electronic maps, the accuracy of road signs in electronic maps is particularly important. Therefore, the scene image can be detected to determine the contour area information of the road signs included in the scene image, and then based on the point cloud data and the contour area information of the road signs, the target pixel points corresponding to the road signs in the scene image can be more accurately determined. After determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point, a more accurate electronic map can be generated.
[0015] In a possible implementation manner, determining the target pixel point corresponding to the road sign in the scene image based on the point cloud data and the contour area information of the road sign includes:
[0016] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0017] Based on the pixel coordinates of each of the projection points and the contour area information of the road sign in the scene image, a pixel point in the scene image that is located in the contour area of the road sign and has no matching projection point is determined as the target pixel point.
[0018] In the above implementation, the point cloud data is projected into the scene image to obtain the pixel coordinates of the projection point in the scene image corresponding to each point cloud point in the point cloud data, and then based on the pixel coordinates of each projection point and the contour area information of the road sign in the scene image, the target pixel points that are located in the contour area of the road sign and for which there are no matching projection points are more accurately determined.
[0019] In a possible implementation, determining, from the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition, includes:
[0020] Based on the pixel coordinates of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold is determined from a plurality of point cloud points indicated by the point cloud data.
[0021] In a possible implementation manner, determining, based on the pixel coordinates of the target pixel point, from a plurality of point cloud points indicated by the point cloud data, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold, includes:
[0022] Taking the pixel coordinates of the target pixel point as the center and based on a set distance threshold, determining a first target area corresponding to the target pixel point;
[0023] From the plurality of point cloud points indicated by the point cloud data, a plurality of target point cloud points whose pixel coordinates corresponding to the projection points on the scene image are located within the first target area are screened.
[0024] Generally, it can be approximately considered that the pixel points whose distance to the target pixel point is less than a certain value are in the same plane as the target pixel point. Therefore, a distance threshold can be set here, and the pixel coordinates of the target pixel point are taken as the center to determine the first target area corresponding to the target pixel point. Then, from the multiple point cloud points indicated by the point cloud data, the multiple target point cloud points whose pixel coordinates of the projection points on the scene image are located in the first target area can be more accurately screened.
[0025] In a possible implementation manner, the method further includes:
[0026] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0027] Determine a depth map corresponding to the scene image based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data;
[0028] The step of determining, based on the pixel coordinate of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold from a plurality of point cloud points indicated by the point cloud data, comprises:
[0029] Based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image, a plurality of target point cloud points are determined from a plurality of point cloud points indicated by the point cloud data.
[0030] In a possible implementation, the determining a plurality of target point cloud points from a plurality of point cloud points indicated by the point cloud data based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image includes:
[0031] Taking the pixel coordinates of the target pixel as the center and based on a set distance threshold, determining from the depth map a second target area corresponding to the target pixel and a plurality of candidate point cloud points located in the second target area;
[0032] Based on the depth information indicated by each candidate point cloud point, a target point cloud point is determined from a plurality of candidate point cloud points.
[0033] In the above implementation, the pixel coordinates of the target pixel can be taken as the center, and based on the set distance threshold, the second target area corresponding to the target pixel and multiple candidate point cloud points located in the second target area can be determined from the depth map; then, based on the depth information indicated by each candidate point cloud point, the multiple candidate point cloud points can be screened, for example, the candidate point cloud points with large depth information deviations can be screened out, and the target point cloud points can be determined more accurately from the multiple candidate point cloud points.
[0034] In a possible implementation manner, determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point includes:
[0035] Based on the position coordinates of the multiple target point cloud points, plane fitting is performed to generate plane fitting parameters corresponding to the target pixel points;
[0036] Based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point, three-dimensional coordinate data of the target space point corresponding to the target pixel point is generated.
[0037] Generally, the target pixel point is located in a plane, such as the ground, so the position coordinates of multiple target point cloud points can be used to determine the plane fitting parameters corresponding to the target pixel point; based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point, the three-dimensional coordinate data of the target space point corresponding to the target pixel point is generated.
[0038] In a possible implementation, performing plane fitting based on the position coordinates of the plurality of target point cloud points to generate plane fitting parameters corresponding to the target pixel points includes:
[0039] Based on the position coordinates of the multiple target point cloud points, a least squares method is used to perform plane fitting to determine the plane fitting parameters corresponding to the target pixel points.
[0040] In a possible implementation manner, after acquiring the scene image and point cloud data of the road scene, the method further includes:
[0041] Performing coordinate conversion processing on the point cloud data to generate processed point cloud data in a camera coordinate system corresponding to a camera device that captures the scene image;
[0042] The step of determining, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition, comprises:
[0043] A target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition is determined from a plurality of point cloud points indicated by the processed point cloud data.
[0044] Taking into account that the camera coordinate system corresponding to the camera device may be inconsistent with the coordinate system corresponding to the radar device, in order to avoid inaccurate three-dimensional coordinate data of the determined target point cloud points caused by inconsistent coordinate systems, the point cloud data collected by the radar device can be subjected to coordinate conversion processing to generate processed point cloud data, and then based on the processed point cloud data, the target point cloud points can be determined more accurately.
[0045] In a possible implementation manner, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, generating an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data includes:
[0046] Convert the three-dimensional coordinate data of the target space point into a coordinate system corresponding to the radar device that collects the point cloud data, and generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data;
[0047] generating an electronic map corresponding to the road scene based on the converted three-dimensional coordinate data and the point cloud data; or,
[0048] Converting the point cloud data to a camera coordinate system corresponding to a camera device that captures the scene image, to generate processed point cloud data in the same coordinate system as the three-dimensional coordinate data of the target space point;
[0049] An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
[0050] By adopting the above method, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, the point cloud data or the three-dimensional coordinate data of the target space point can be subjected to coordinate system conversion processing. For example, the point cloud data can be converted to the camera coordinate system corresponding to the camera device, or the three-dimensional coordinate data of the target space point can be converted to the coordinate system corresponding to the radar device, and then a more accurate electronic map can be generated based on the converted three-dimensional coordinate data and the point cloud data; or, a more accurate electronic map can be generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
[0051] The effects of the following devices, electronic devices, etc. are described in the description of the above method and will not be repeated here.
[0052] In a second aspect, the present disclosure provides a device for generating an electronic map, comprising:
[0053] An acquisition module, used to acquire scene images and point cloud data of road scenes;
[0054] A first determination module is used to determine, from the multiple point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene and the corresponding target space point does not overlap with the multiple point cloud points;
[0055] A second determination module is used to determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point;
[0056] A generation module is used to generate an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data.
[0057] In a possible implementation manner, the device further includes: a detection module, configured to:
[0058] Before the first determining module determines, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition,
[0059] Detecting the scene image to determine contour area information of road signs included in the scene image;
[0060] Based on the point cloud data and the contour area information of the road sign, the target pixel point corresponding to the road sign in the scene image is determined.
[0061] In a possible implementation manner, the detection module is further used to:
[0062] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0063] Based on the pixel coordinates of each of the projection points and the contour area information of the road sign in the scene image, a pixel point in the scene image that is located in the contour area of the road sign and has no matching projection point is determined as the target pixel point.
[0064] In a possible implementation manner, the first determining module is further configured to:
[0065] Based on the pixel coordinates of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold is determined from a plurality of point cloud points indicated by the point cloud data.
[0066] In a possible implementation manner, the first determining module is further configured to:
[0067] Taking the pixel coordinates of the target pixel point as the center and based on a set distance threshold, determining a first target area corresponding to the target pixel point;
[0068] From the plurality of point cloud points indicated by the point cloud data, a plurality of target point cloud points whose pixel coordinates corresponding to the projection points on the scene image are located within the first target area are screened.
[0069] In a possible implementation manner, the device further includes: a depth map determining module, configured to:
[0070] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0071] Determine a depth map corresponding to the scene image based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data;
[0072] The first determining module is further used to:
[0073] Based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image, a plurality of target point cloud points are determined from a plurality of point cloud points indicated by the point cloud data.
[0074] In a possible implementation manner, the first determining module is further configured to:
[0075] Taking the pixel coordinates of the target pixel as the center and based on a set distance threshold, determining from the depth map a second target area corresponding to the target pixel and a plurality of candidate point cloud points located in the second target area;
[0076] Based on the depth information indicated by each candidate point cloud point, a target point cloud point is determined from a plurality of candidate point cloud points.
[0077] In a possible implementation manner, the second determining module is further configured to:
[0078] Based on the position coordinates of the multiple target point cloud points, plane fitting is performed to generate plane fitting parameters corresponding to the target pixel points;
[0079] Based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point, three-dimensional coordinate data of the target space point corresponding to the target pixel point is generated.
[0080] In a possible implementation manner, the second determining module is further configured to:
[0081] Based on the position coordinates of the multiple target point cloud points, a least squares method is used to perform plane fitting to determine the plane fitting parameters corresponding to the target pixel points.
[0082] In a possible implementation manner, the device further includes: a processing module, configured to:
[0083] After the acquisition module acquires the scene image and point cloud data of the road scene, coordinate conversion processing is performed on the point cloud data to generate processed point cloud data in a camera coordinate system corresponding to the camera device that acquires the scene image;
[0084] The first determining module is further configured to:
[0085] A target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition is determined from a plurality of point cloud points indicated by the processed point cloud data.
[0086] In a possible implementation manner, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, the generating module is further configured to:
[0087] Convert the three-dimensional coordinate data of the target space point into a coordinate system corresponding to the radar device that collects the point cloud data, and generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data;
[0088] generating an electronic map corresponding to the road scene based on the converted three-dimensional coordinate data and the point cloud data; or,
[0089] Converting the point cloud data to a camera coordinate system corresponding to a camera device that captures the scene image, to generate processed point cloud data in the same coordinate system as the three-dimensional coordinate data of the target space point;
[0090] An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
[0091] In a third aspect, the present disclosure provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for generating an electronic map as described in the first aspect or any one of the embodiments are performed.
[0092] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for generating an electronic map as described in the first aspect or any one of the embodiments above are executed.
[0093] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0095] Figure 1 A schematic diagram showing a flow chart of a method for generating an electronic map provided by an embodiment of the present disclosure;
[0096] Figure 2 A schematic diagram of a process for determining three-dimensional coordinate data of a target space point corresponding to a target pixel point in an embodiment of the present disclosure is shown;
[0097] Figure 3A schematic diagram of the architecture of an electronic map generation device provided by an embodiment of the present disclosure is shown;
[0098] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0099] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0100] With the rapid development of autonomous driving technology, the importance of high-precision maps has become increasingly prominent, and has played a vital role in the fields of autonomous driving and intelligent transportation. Among them, high-precision maps are usually machine-oriented maps for use by autonomous driving vehicles. High-precision maps not only have high-precision coordinates, but also accurate road shape expressions, such as lane solid lines, dotted lines, turn arrows, and zebra crossings. In order to solve the above problems and more accurately construct high-precision maps, the embodiments of the present disclosure provide a method, device, electronic device, and storage medium for generating an electronic map.
[0101] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0102] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0103] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0104] To facilitate understanding of the embodiments of the present disclosure, a method for generating an electronic map disclosed in the embodiments of the present disclosure is first introduced in detail. The execution subject of the method for generating an electronic map provided in the embodiments of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for generating an electronic map can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0105] See also Figure 1 FIG. 1 is a flow chart of a method for generating an electronic map provided by an embodiment of the present disclosure, the method comprising S101-S104, wherein:
[0106] S101, acquiring a scene image and point cloud data of a road scene.
[0107] S102, determining, from a plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies preset constraints; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene, and the corresponding target space point does not overlap with the plurality of point cloud points.
[0108] S103, determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point.
[0109] S104, generating an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data.
[0110] In the above method, by acquiring a scene image and point cloud data of a road scene, and determining a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition from a plurality of point cloud points indicated by the point cloud data, the three-dimensional coordinate data of the target space point corresponding to the target pixel point on the road sign in the scene image is determined using the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point, and the three-dimensional coordinate data of the target space point is used to supplement the point cloud data so that the supplemented point cloud data is denser, and then a more accurate electronic map can be generated based on the determined three-dimensional coordinate data and point cloud data of the target space point.
[0111] The following is a specific description of S101 to S104.
[0112] For S101:
[0113] The scene image of the road scene can be collected by the camera device, and the point cloud data corresponding to the road scene can be collected by the radar device. During implementation, the camera device and the radar device can be set on the target device. During the movement of the target device, the camera device can collect the scene image of the road scene where the target device is located in real time, and the radar device can collect the point cloud data of the road scene in real time. Among them, the target device can be a movable device such as a motor vehicle, a non-motor vehicle, a robot, etc.
[0114] The point cloud data may include three-dimensional coordinate data of multiple point cloud points in the coordinate system corresponding to the radar device, or may also include reflectivity, color information, etc. of multiple point cloud points.
[0115] For S102 and S103:
[0116] Since the point cloud data collected by the radar equipment is relatively sparse point cloud data, multiple target pixel points can be determined from the scene image, and the three-dimensional coordinate data of the target space point corresponding to the multiple target pixel points can be determined. The target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene, and the corresponding target space point does not overlap with the multiple point cloud points. The point cloud data is supplemented by using the three-dimensional coordinate data of the target space point corresponding to the target pixel point to obtain relatively dense point cloud data.
[0117] In an optional implementation, before determining, from among the plurality of point cloud points indicated by the point cloud data, a target space point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition, the method further includes:
[0118] Step 1: Detect the scene image to determine the contour area information of the road sign included in the scene image;
[0119] Step 2: Based on the point cloud data and the contour area information of the road sign, determine the target pixel point corresponding to the road sign in the scene image.
[0120] Since road signs are an important part of electronic maps, the accuracy of road signs in electronic maps is particularly important. Therefore, the scene image can be detected to determine the contour area information of the road signs included in the scene image, and then based on the point cloud data and the contour area information of the road signs, the target pixel points corresponding to the road signs in the scene image can be more accurately determined. After determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point, a more accurate electronic map can be generated.
[0121] In step 1, illustratively, a trained target neural network for detecting road signs may be used to detect the scene image to determine the contour area information of the road signs included in the scene image. For example, the road signs may include lane lines, zebra crossings, road arrows, etc.
[0122] The target neural network can be trained by the following steps: obtaining a training sample image carrying annotation data, where the annotation data indicates the annotation contour area information corresponding to the road signs included in the training sample, inputting the training sample with the annotation data into the neural network to be trained, training the neural network to be trained through multiple rounds of training until the accuracy of the trained neural network is greater than the set accuracy threshold, and obtaining a target neural network for detecting road signs.
[0123] In step 2, based on the point cloud data and the contour area information of the road sign, determining the target pixel point corresponding to the road sign in the scene image may include:
[0124] Step A1, projecting the point cloud data into the scene image to obtain the pixel coordinates of the projected point in the scene image;
[0125] Step A2: Based on the pixel coordinates corresponding to each projection point and the contour area information of the road sign in the scene image, determine the pixel points in the scene image that are located in the contour area of the road sign and have no matching projection points as target pixels.
[0126] In the above implementation, the point cloud data is projected into the scene image to obtain the pixel coordinates of the projection point in the scene image corresponding to each point cloud point in the point cloud data, and then based on the pixel coordinates corresponding to each projection point and the contour area information of the road sign in the scene image, the target pixel points that are located in the contour area of the road sign and for which there are no matching projection points are more accurately determined.
[0127] In the disclosed embodiment, the point cloud data is projected into the scene image to obtain the pixel coordinates of the projection point in the scene image. The point cloud data includes a plurality of point cloud points, each of which corresponds to a projection point, and the pixel coordinates of the projection point corresponding to each point cloud point in the scene image are obtained. Exemplarily, the pixel coordinates of the projection point corresponding to each point cloud point in the scene image can be determined based on the imaging model of the pinhole camera and the three-dimensional coordinate data of each point cloud point in the point cloud data.
[0128] Then, other pixel points in the scene image that are located in the contour area of the road sign, except for the pixel points that match the projection points corresponding to each point cloud point, can be determined as target pixel points in the scene image. That is, the target pixel point is a pixel point that is located in the contour area of the road sign and has no matching projection point.
[0129] Road signs play a relatively significant role in electronic maps and receive a lot of attention. The above implementation method improves the accuracy of road sign information in electronic maps and realizes the effective construction of electronic maps by finding pixel points within the outline of road signs as target pixel points, determining target point cloud points representing road signs, and then restoring the three-dimensional coordinate data of the target point cloud points.
[0130] In a possible implementation, in S102, determining a target point cloud point corresponding to a target pixel point in a scene image that satisfies preset constraints from among a plurality of point cloud points indicated by the point cloud data may include: based on the pixel coordinates of the target pixel point, determining a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold from among a plurality of point cloud points indicated by the point cloud data.
[0131] During implementation, for the target space point corresponding to each target pixel point, the distance between each point cloud point and the target space point among the multiple point cloud points indicated by the point cloud data can be calculated, and the point cloud point whose distance is less than the set distance threshold is determined as the target point cloud point corresponding to the target space point. For example, the distance between the point cloud point and the target space point can be determined by using the pixel coordinates of the projection point corresponding to the point cloud point and the pixel coordinates of the target pixel point corresponding to the target space point.
[0132] The distance threshold may be set according to the area of the plane region in the road scene. For example, the distance threshold may be 5 centimeters, or may be the length corresponding to 50 pixels.
[0133] In an optional implementation, based on the pixel coordinates of the target pixel point, determining, from the plurality of point cloud points indicated by the point cloud data, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold, comprises:
[0134] Step B1, taking the pixel coordinates of the target pixel point as the center and determining a first target area corresponding to the target pixel point based on a set distance threshold;
[0135] Step B2: Filter, from the plurality of point cloud points indicated by the point cloud data, a plurality of target point cloud points whose pixel coordinates corresponding to the projection points on the scene image are located within the first target area.
[0136] For example, if the distance threshold is the length value corresponding to 50 pixels, the first target area corresponding to the target pixel is determined with the pixel coordinates of the target pixel as the center and the length value corresponding to 50 pixels as the radius. Then, according to the pixel coordinates of the projection point corresponding to each point cloud point in the multiple point cloud points indicated by the point cloud data, the projection point located in the first target area is determined, and the point cloud point corresponding to the projection point located in the first target area is determined as the target point cloud point.
[0137] Generally, it can be approximately considered that the pixel points whose distance to the target pixel point is less than a certain value are in the same plane as the target pixel point. Therefore, a distance threshold can be set here, and the pixel coordinates of the target pixel point are taken as the center to determine the first target area corresponding to the target pixel point. Then, from the multiple point cloud points indicated by the point cloud data, the multiple target point cloud points whose pixel coordinates of the projection points on the scene image are located in the first target area can be more accurately screened.
[0138] In another optional embodiment, the method further comprises:
[0139] Step C1, projecting the point cloud data into the scene image to obtain the pixel coordinates of the projected point in the scene image;
[0140] Step C2: determining a depth map corresponding to the scene image based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data.
[0141] In an optional implementation, based on the pixel coordinates of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold is determined from multiple point cloud points indicated by the point cloud data, including: based on the pixel coordinates of the target pixel point and a depth map corresponding to the scene image, multiple target point cloud points are determined from multiple point cloud points indicated by the point cloud data.
[0142] Here, before determining the target point cloud point, the imaging model of the pinhole camera can be used to determine the pixel coordinates of the projection point corresponding to each point cloud point in the point cloud data in the scene image. And based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data, the depth map corresponding to the scene image is determined. For example, the depth information of each point cloud point indicated by the point cloud data is determined as the pixel value of the projection point corresponding to the point cloud point, and the depth map corresponding to the scene image is generated. The depth map has the same size as the scene image.
[0143] In an optional implementation, based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image, determining multiple target point cloud points from multiple point cloud points indicated by the point cloud data includes:
[0144] Step D1, taking the pixel coordinates of the target pixel as the center and based on a set distance threshold, determining a second target area corresponding to the target pixel and a plurality of candidate point cloud points located in the second target area from the depth map;
[0145] Step D2: determining a target point cloud point from multiple candidate point cloud points based on the depth information indicated by each candidate point cloud point.
[0146] For example, if the distance threshold is set to 5 cm, the second target area can be a circular area with a radius of 5 cm centered on the pixel coordinates of the target pixel point, or a square area with a side length of 5 cm centered on the pixel coordinates of the target pixel point.
[0147] The target point cloud point can be determined from multiple candidate point cloud points based on the depth information indicated by each candidate point cloud point. For example, the depth information indicated by multiple candidate point cloud points can be averaged to obtain the average depth, and then the difference between each candidate point cloud point and the average depth can be calculated, and the target point cloud point whose difference is less than the set difference threshold can be selected from the multiple candidate point cloud points.
[0148] In the above implementation, the pixel coordinates of the target pixel can be taken as the center, and based on the set distance threshold, the second target area corresponding to the target pixel and multiple candidate point cloud points located in the second target area can be determined from the depth map; then, based on the depth information indicated by each candidate point cloud point, the multiple candidate point cloud points can be screened, for example, the candidate point cloud points with large depth information deviations can be screened out, and the target point cloud points can be determined more accurately from the multiple candidate point cloud points.
[0149] In one possible implementation, see Figure 2 As shown, based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point, determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point may include:
[0150] S201, performing plane fitting based on the position coordinates of the plurality of target point cloud points to generate plane fitting parameters corresponding to the target pixel points;
[0151] S202: Generate three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point.
[0152] Generally, the target pixel point is located in a plane, such as the ground, so the position coordinates of multiple target point cloud points can be used to determine the plane fitting parameters corresponding to the target pixel point; based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point, the three-dimensional coordinate data of the target space point corresponding to the target pixel point is generated.
[0153] In S201, the position coordinates of multiple target point cloud points can be plane fitted to determine the plane fitting parameters corresponding to the target pixel point, wherein the position coordinates of the target point cloud point can be determined according to the target point cloud data corresponding to the target point cloud point. For example, the RANSAC algorithm can be used to plane fit the position coordinates of multiple target point cloud points to determine the plane fitting parameters corresponding to the target pixel point, and then the plane equation corresponding to the target pixel point is obtained: Ax+By+Cz+D=0, wherein A, B, C, and D are the generated plane fitting parameters.
[0154] In an optional implementation, in S201, plane fitting is performed based on the position coordinates of multiple target point cloud points to generate plane fitting parameters corresponding to the target pixel points, which may include: performing plane fitting based on the position coordinates of multiple target point cloud points using the least squares method to determine the plane fitting parameters corresponding to the target pixel points.
[0155] In S202, based on the pixel coordinates of the target pixel and the plane fitting parameters corresponding to the target pixel, generating three-dimensional coordinate data of the target space point corresponding to the target pixel may include:
[0156] Step E1, based on the pixel coordinates of the target pixel point, the focal length parameters corresponding to the camera device and the reference coordinates of the principal point, generating a first relational expression between the horizontal axis coordinate value and the vertical axis coordinate value, and a second relational expression between the vertical axis coordinate value and the vertical axis coordinate value in the three-dimensional coordinate data of the target space point corresponding to the target pixel point;
[0157] Step E2: Generate three-dimensional coordinate data of a target space point corresponding to the target pixel point based on the first relationship expression, the second relationship expression, and the plane fitting parameters corresponding to the target pixel point.
[0158] In step E1, the pinhole camera imaging model can be used to generate a first relationship expression between the horizontal axis coordinate value and the vertical axis coordinate value, and a second relationship expression between the vertical axis coordinate value and the vertical axis coordinate value in the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the pixel coordinates of the target pixel point, the focal length parameters corresponding to the camera device and the reference coordinates of the principal point.
[0159] The first relational expression generated is as follows:
[0160] X=(uc x )×Z / f x ; (1)
[0161] The generated second relational expression is as follows:
[0162] Y=(vc y )×Z / f y ; (2)
[0163] Among them, X, Y, X are the three-dimensional coordinate data of the target space point corresponding to the target pixel point, X is the horizontal axis coordinate value, Y is the vertical axis coordinate value, and Z is the vertical axis coordinate value; u and v are the pixel coordinates of the target pixel point; c x 、c y is the reference coordinate of the principal point corresponding to the camera device; x 、f y It is the focal length parameter corresponding to the camera device.
[0164] In step E2, the first relationship expression and the second relationship expression can be input into the plane equation formed by the plane fitting parameters to determine the vertical axis coordinate value Z of the target space point corresponding to the target pixel point; the horizontal axis coordinate value X of the target pixel point is determined by using the first relationship expression and the vertical axis coordinate value, and the vertical axis coordinate value Y of the target pixel point is determined by using the second relationship expression and the vertical axis coordinate value, thereby obtaining the three-dimensional coordinate data of the target space point corresponding to the target pixel point.
[0165] It can be known from the pinhole camera imaging model that there is a relationship between the horizontal axis coordinate value and the vertical axis coordinate value in the three-dimensional coordinate data of the pixel point, and there is a relationship between the longitudinal axis coordinate value and the vertical axis coordinate value. Therefore, here, based on the pixel coordinates of the target pixel point, the focal length parameters corresponding to the camera device and the reference coordinates of the principal point, a first relationship expression between the horizontal axis coordinate value and the vertical axis coordinate value and a second relationship expression between the longitudinal axis coordinate value and the vertical axis coordinate value in the three-dimensional coordinate data of the target space point corresponding to the target pixel point can be generated; based on the first relationship expression, the second relationship expression, and the plane fitting parameters corresponding to the target pixel point, the three-dimensional coordinate data of the target space point corresponding to the target pixel point can be generated.
[0166] For example, based on the assumption that the road surface is within a larger range (e.g., within 0.5 meters), the distance threshold for determining the target point cloud point from the point cloud data can be set to 0.5 meters, for example. In this way, multiple target point cloud points can be determined from the point cloud data within a larger range, thereby improving the accuracy of the plane information obtained by fitting, and then obtaining more accurate three-dimensional coordinate data of the target space point.
[0167] In an optional implementation, after acquiring the scene image of the road scene and the point cloud data, the method further includes: performing coordinate conversion processing on the point cloud data to generate processed point cloud data in a camera coordinate system corresponding to the camera device that captures the scene image;
[0168] Determine, from among a plurality of point cloud points indicated by the point cloud data, a target point cloud point whose target space point corresponding to a target pixel point in a scene image satisfies preset constraints, including: determining, from among a plurality of point cloud points indicated by the processed point cloud data, a target point cloud point whose target space point corresponding to a target pixel point in a scene image satisfies preset constraints.
[0169] Generally, the point cloud data collected by the radar device is the point cloud data in the coordinate system corresponding to the radar device, and the scene image is generated in the camera coordinate system corresponding to the camera device. When the installation positions of the radar device and the camera device are different, the point cloud data needs to be converted to generate processed point cloud data in the camera coordinate system corresponding to the camera device; then, from the multiple point cloud points indicated by the processed point cloud data, the target space point corresponding to the target pixel point in the scene image that meets the preset constraint conditions is determined.
[0170] In specific implementation, the external parameters between the radar device and the camera device can be determined, and the determined external parameters can be used to perform coordinate transformation processing on the point cloud data collected by the radar device. The processed point cloud data in the camera coordinate system corresponding to the camera device is generated. That is, P cam =R cl ×P lidar +t cl , where P cam is the processed point cloud data in the camera coordinate system corresponding to the camera device, P lidar is the point cloud data before processing, that is, the point cloud data in the coordinate system corresponding to the radar device; R cl ,t cl is an external reference, R cl is the rotation extrinsic parameter generated based on the Euler angle, t cl is the translation external reference.
[0171] Taking into account that the camera coordinate system corresponding to the camera device may be inconsistent with the coordinate system corresponding to the radar device, in order to avoid inaccurate three-dimensional coordinate data of the determined target point cloud points caused by inconsistent coordinate systems, the point cloud data collected by the radar device can be subjected to coordinate conversion processing to generate processed point cloud data, and then based on the processed point cloud data, the target point cloud points can be determined more accurately.
[0172] For S104:
[0173] Here, based on the three-dimensional coordinate data and point cloud data of the determined target space point, relatively dense point cloud data can be generated, and vector information can be extracted from the relatively dense point cloud data, and an electronic map can be constructed using the extracted vector information. For example, the electronic map can be a high-precision map.
[0174] In an optional implementation, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, an electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the point cloud data, including:
[0175] Method 1: Convert the three-dimensional coordinate data of the target space point to the coordinate system corresponding to the radar device that collects the point cloud data, and generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data; based on the converted three-dimensional coordinate data and the point cloud data, generate an electronic map corresponding to the road scene.
[0176] Method 2: Convert the point cloud data to the camera coordinate system corresponding to the camera device that collects the scene image, and generate processed point cloud data that is in the same coordinate system as the three-dimensional coordinate data of the target space point; based on the three-dimensional coordinate data of the target space point and the processed point cloud data, generate an electronic map corresponding to the road scene.
[0177] Here, when the point cloud data and the three-dimensional coordinate data of the target space point are not in the same coordinate system, for example, the point cloud data is in the coordinate system corresponding to the radar device, and the three-dimensional coordinate data of the target space point is in the camera coordinate system corresponding to the camera device, then it is necessary to unify the coordinate systems of the point cloud data and the three-dimensional coordinate data of the target pixel point.
[0178] In method one, the three-dimensional coordinate data of the target space point can be converted to the coordinate system corresponding to the radar device to generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data; then, based on the vectorization information extracted from the converted three-dimensional coordinate data and the point cloud data, a high-precision map corresponding to the road scene can be generated using the extracted vectorization information.
[0179] In method 2, the point cloud data can be converted to the camera coordinate system corresponding to the camera device to generate processed point cloud data in the same coordinate system as the three-dimensional coordinate data of the target space point; then, vectorization information can be extracted from the three-dimensional coordinate data of the target space point and the processed point cloud data, and the extracted vectorization information can be used to generate a high-precision map corresponding to the road scene.
[0180] By adopting the above method, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, the point cloud data or the three-dimensional coordinate data of the target pixel point can be subjected to coordinate system conversion processing. For example, the point cloud data can be converted to the camera coordinate system corresponding to the camera device, or the three-dimensional coordinate data of the target space point can be converted to the coordinate system corresponding to the radar device, and then a more accurate electronic map can be generated based on the converted three-dimensional coordinate data and the point cloud data; or, a more accurate electronic map can be generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
[0181] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0182] Based on the same concept, the present disclosure also provides a device for generating an electronic map, see Figure 3 As shown, it is a schematic diagram of the architecture of an electronic map generation device provided by an embodiment of the present disclosure, including an acquisition module 301, a first determination module 302, a second determination module 303, and a generation module 304. Specifically:
[0183] An acquisition module 301 is used to acquire a scene image and point cloud data of a road scene;
[0184] A first determination module 302 is used as a first determination module, and is used to determine, from a plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image, which satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image corresponding to a road sign in the road scene, and the corresponding target space point does not overlap with the plurality of point cloud points;
[0185] A second determination module 303 is used to determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point;
[0186] The generating module 304 is used to generate an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data.
[0187] In a possible implementation manner, the device further includes: a detection module 305, configured to:
[0188] Before the first determining module determines, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition,
[0189] Detecting the scene image to determine contour area information of road signs included in the scene image;
[0190] Based on the point cloud data and the contour area information of the road sign, the target pixel point corresponding to the road sign in the scene image is determined.
[0191] In a possible implementation manner, the detection module 305 is further configured to determine the target pixel point corresponding to the road sign in the scene image in the following manner:
[0192] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0193] Based on the pixel coordinates of each of the projection points and the contour area information of the road sign in the scene image, a pixel point in the scene image that is located in the contour area of the road sign and has no matching projection point is determined as the target pixel point.
[0194] In a possible implementation manner, the first determining module 302 is further configured to determine a target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition in the following manner:
[0195] Based on the pixel coordinates of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold is determined from a plurality of point cloud points indicated by the point cloud data.
[0196] In a possible implementation manner, the first determining module 302 is further configured to determine a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold in the following manner:
[0197] Taking the pixel coordinates of the target pixel point as the center and based on a set distance threshold, determining a first target area corresponding to the target pixel point;
[0198] From the plurality of point cloud points indicated by the point cloud data, a plurality of target point cloud points whose pixel coordinates corresponding to the projection points on the scene image are located within the first target area are screened.
[0199] In a possible implementation manner, the apparatus further includes: a depth map determining module 306, configured to:
[0200] Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image;
[0201] Determine a depth map corresponding to the scene image based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data;
[0202] The first determination module 302 is further configured to determine a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold in the following manner:
[0203] Based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image, a plurality of target point cloud points are determined from a plurality of point cloud points indicated by the point cloud data.
[0204] In a possible implementation manner, the first determining module 302 is further configured to determine a plurality of target point cloud points from a plurality of point cloud points indicated by the point cloud data in the following manner:
[0205] Taking the pixel coordinates of the target pixel as the center and based on a set distance threshold, determining from the depth map a second target area corresponding to the target pixel and a plurality of candidate point cloud points located in the second target area;
[0206] Based on the depth information indicated by each candidate point cloud point, a target point cloud point is determined from multiple candidate point cloud points.
[0207] In a possible implementation manner, the second determination module 303 is further configured to determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point in the following manner:
[0208] Based on the position coordinates of the multiple target point cloud points, plane fitting is performed to generate plane fitting parameters corresponding to the target pixel points;
[0209] Based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point, three-dimensional coordinate data of the target space point corresponding to the target pixel point is generated.
[0210] In a possible implementation manner, the second determining module 303 is further configured to perform plane fitting in the following manner to generate a plane fitting parameter corresponding to the target pixel point:
[0211] Based on the position coordinates of the multiple target point cloud points, a least squares method is used to perform plane fitting to determine the plane fitting parameters corresponding to the target pixel points.
[0212] In a possible implementation manner, the device further includes: a processing module 307, configured to:
[0213] After the acquisition module acquires the scene image and point cloud data of the road scene, coordinate conversion processing is performed on the point cloud data to generate processed point cloud data in a camera coordinate system corresponding to the camera device that acquires the scene image;
[0214] The first determining module 302 is further configured to:
[0215] A target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition is determined from a plurality of point cloud points indicated by the processed point cloud data.
[0216] In a possible implementation manner, when the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, the generating module 304 further generates an electronic map corresponding to the road scene in the following manner:
[0217] Convert the three-dimensional coordinate data of the target space point to a coordinate system corresponding to the radar device that collects the point cloud data, and generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data;
[0218] generating an electronic map corresponding to the road scene based on the converted three-dimensional coordinate data and the point cloud data; or,
[0219] Converting the point cloud data to a camera coordinate system corresponding to a camera device that captures the scene image, to generate processed point cloud data in the same coordinate system as the three-dimensional coordinate data of the target space point;
[0220] An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
[0221] In some embodiments, the functions or templates contained in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0222] Based on the same technical concept, the embodiment of the present disclosure also provides an electronic device. Figure 4As shown, it is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, including a processor 401, a memory 402, and a bus 403. Among them, the memory 402 is used to store execution instructions, including a memory 4021 and an external memory 4022; the memory 4021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 401, and the data exchanged with the external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the memory 4021. When the electronic device 400 is running, the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
[0223] Acquire scene images and point cloud data of road scenes;
[0224] Determine, from the multiple point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene and the corresponding target space point does not overlap with the multiple point cloud points;
[0225] Determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point;
[0226] An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the point cloud data.
[0227] In addition, the embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for generating an electronic map described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0228] The embodiment of the present disclosure also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the method for generating an electronic map described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0229] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0230] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0231] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0232] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0233] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0234] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for generating an electronic map, characterized in that: include: Acquire scene images and point cloud data of road scenes; Determine, from the multiple point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene and the corresponding target space point does not overlap with the multiple point cloud points; Determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point; generating an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data; The step of determining, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point whose target space point corresponding to the target pixel point in the scene image satisfies a preset constraint condition comprises: determining, based on the pixel coordinates of the target pixel point, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold; The method of determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point includes: performing plane fitting to generate plane fitting parameters corresponding to the target pixel point based on the position coordinates of the multiple target point cloud points; and generating the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point.
2. The method according to claim 1, characterized in that Before determining, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition, the method further includes: Detecting the scene image to determine contour area information of road signs included in the scene image; Based on the point cloud data and the contour area information of the road sign, the target pixel point corresponding to the road sign in the scene image is determined.
3. The method according to claim 2, characterized in that The determining, based on the point cloud data and the contour area information of the road sign, the target pixel point corresponding to the road sign in the scene image comprises: Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image; Based on the pixel coordinates of each of the projection points and the contour area information of the road sign in the scene image, a pixel point of the projection point in the scene image that is located in the contour area of the road sign and has no matching pixel point is determined as the target pixel point.
4. The method according to claim 1, characterized in that: The step of determining, based on the pixel coordinate of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold from a plurality of point cloud points indicated by the point cloud data, comprises: Taking the pixel coordinates of the target pixel point as the center and based on a set distance threshold, determining a first target area corresponding to the target pixel point; From the plurality of point cloud points indicated by the point cloud data, a plurality of target point cloud points whose pixel coordinates corresponding to the projection points on the scene image are located within the first target area are screened.
5. The method according to claim 1, characterized in that The method further comprises: Projecting the point cloud data into the scene image to obtain pixel coordinates of the projected points in the scene image; Determine a depth map corresponding to the scene image based on the pixel coordinates of each projection point in the scene image and the depth information of each projection point indicated by the point cloud data; The step of determining, based on the pixel coordinate of the target pixel point, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold from a plurality of point cloud points indicated by the point cloud data, comprises: Based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image, a plurality of target point cloud points are determined from a plurality of point cloud points indicated by the point cloud data.
6. The method according to claim 5, characterized in that The determining a plurality of target point cloud points from a plurality of point cloud points indicated by the point cloud data based on the pixel coordinates of the target pixel point and the depth map corresponding to the scene image comprises: Taking the pixel coordinates of the target pixel as the center and based on a set distance threshold, determining from the depth map a second target area corresponding to the target pixel and a plurality of candidate point cloud points located in the second target area; Based on the depth information indicated by each candidate point cloud point, a target point cloud point is determined from a plurality of candidate point cloud points.
7. The method according to claim 1, characterized in that The performing plane fitting based on the position coordinates of the plurality of target point cloud points to generate plane fitting parameters corresponding to the target pixel points includes: Based on the position coordinates of the multiple target point cloud points, a least squares method is used to perform plane fitting to determine the plane fitting parameters corresponding to the target pixel points.
8. The method according to any one of claims 1 to 7, characterized in that: After obtaining the scene image and point cloud data of the road scene, it also includes: Performing coordinate conversion processing on the point cloud data to generate processed point cloud data in a camera coordinate system corresponding to a camera device that captures the scene image; The step of determining, from among the plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition, comprises: A target point cloud point corresponding to a target pixel point in the scene image and satisfying a preset constraint condition is determined from a plurality of point cloud points indicated by the processed point cloud data.
9. The method according to any one of claims 1 to 7, characterized in that: In a case where the point cloud data and the three-dimensional coordinate data are not located in the same coordinate system, generating an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data includes: Convert the three-dimensional coordinate data of the target space point into a coordinate system corresponding to the radar device that collects the point cloud data, and generate converted three-dimensional coordinate data in the same coordinate system as the point cloud data; generating an electronic map corresponding to the road scene based on the converted three-dimensional coordinate data and the point cloud data; or, Converting the point cloud data to a camera coordinate system corresponding to a camera device that captures the scene image, to generate processed point cloud data in the same coordinate system as the three-dimensional coordinate data of the target space point; An electronic map corresponding to the road scene is generated based on the three-dimensional coordinate data of the target space point and the processed point cloud data.
10. A device for generating an electronic map, characterized in that: include: An acquisition module, used to acquire scene images and point cloud data of road scenes; A first determination module is used to determine, from a plurality of point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition; wherein the target pixel point is a pixel point in the scene image that corresponds to a road sign in the road scene and the corresponding target space point does not overlap with the plurality of point cloud points; A second determination module is used to determine the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point; A generating module, used for generating an electronic map corresponding to the road scene based on the three-dimensional coordinate data of the target space point and the point cloud data; The first determination module is used, when determining, from among the multiple point cloud points indicated by the point cloud data, a target point cloud point corresponding to a target pixel point in the scene image that satisfies a preset constraint condition, to: determine, based on the pixel coordinates of the target pixel point, from among the multiple point cloud points indicated by the point cloud data, a target point cloud point whose distance to the target space point corresponding to the target pixel point is less than a set distance threshold; The second determination module, when determining the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the target point cloud data corresponding to the target point cloud point and the pixel coordinates of the target pixel point, is used to: perform plane fitting based on the position coordinates of the multiple target point cloud points to generate the plane fitting parameters corresponding to the target pixel point; and generate the three-dimensional coordinate data of the target space point corresponding to the target pixel point based on the pixel coordinates of the target pixel point and the plane fitting parameters corresponding to the target pixel point.
11. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for generating an electronic map as described in any one of claims 1 to 9 are performed.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating an electronic map as claimed in any one of claims 1 to 9 are executed.
Citation Information
Patent Citations
Method and apparatus for processing high-precision map data, storage medium and device
US20180253625A1
Automatic occlusion detection in road network data
US20190138823A1
