A method, apparatus and equipment for generating road data

By acquiring world coordinate data and ground coordinate data from image acquisition devices, a virtual road surface is established, which solves the problem of inaccurate road data in slope areas and improves the accuracy of road data.

CN115731304BActive Publication Date: 2026-04-03NAVINFO
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot accurately calculate the world coordinates of image pixels when generating road data for ramp areas, resulting in inaccurate data.

Method used

By acquiring world coordinate data of the first and second positions of the image acquisition device in the slope area, the ground coordinate data in the camera coordinate system is determined, a virtual road surface is established, and third world coordinate data is generated based on the pixel coordinate data.

Benefits of technology

This improves the accuracy of road data in slope areas and ensures the accuracy of world coordinate data at various locations of the image acquisition equipment during its movement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115731304B_ABST
    Figure CN115731304B_ABST
Patent Text Reader

Abstract

This specification discloses a method, apparatus, and device for generating road data. The solution may include: acquiring first world coordinate data of a first position and second world coordinate data of a second position of an image acquisition device during the acquisition of road images; determining first and second ground coordinate data corresponding to the first and second positions respectively based on the first and second world coordinate data in a preset camera coordinate system, and establishing a virtual road surface based on the aforementioned ground coordinate data; determining third world coordinate data of each third position traversed by the image acquisition device during its movement between the first and second positions based on the pixel coordinate data of the virtual road surface and the road image, and generating road data between the first and second positions based on the third world coordinate data. This solution improves the accuracy of the generated road data by generating accurate third world coordinate data for the third positions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic map technology, and in particular to a method, apparatus and equipment for generating road data. Background Technology

[0002] With the rapid development of computer technology and spatial data acquisition technology, 3D digital maps have become a hot topic in the field of electronic mapping, impacting people's daily lives from multiple perspectives. Currently, after acquiring road images for a section of road using image acquisition equipment, the height of the image acquisition equipment above a certain horizontal surface is first measured. Then, based on this measured ground height, the world coordinate data corresponding to each pixel in the road image is calculated. Based on the calculated world coordinate data of each pixel, the corresponding road data is generated.

[0003] However, since road surfaces often have horizontal and sloping areas when using image acquisition equipment to capture road images, the height of the image acquisition equipment above the ground in the horizontal area is not the same as that in the sloping area. Therefore, if the height above the ground measured on the horizontal surface is used to calculate the world coordinate data corresponding to the corresponding image pixels of the sloping area, the calculated world coordinate data corresponding to the corresponding image pixels of the sloping area will be inaccurate, and thus it will be impossible to generate accurate road data for the sloping area.

[0004] Therefore, how to obtain accurate world coordinate data corresponding to the image pixels of the slope in the road image, and then obtain accurate road data of the slope area, has become an urgent technical problem to be solved. Summary of the Invention

[0005] The embodiments of this specification provide a road data generation method, apparatus, and device that can obtain accurate world coordinate data corresponding to the image pixels of a slope in a road image, thereby improving the accuracy of road data acquired for slopes.

[0006] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:

[0007] A method for generating road data, comprising,

[0008] Acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images.

[0009] Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system.

[0010] A virtual road surface is established based on the first ground coordinate data and the second ground coordinate data.

[0011] Based on the pixel coordinate data of the virtual road surface and the road image, the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first position and the second position are determined.

[0012] Based on the aforementioned third-world coordinate data, road data between the first location and the second location is generated.

[0013] A road data generation device, comprising,

[0014] The acquisition module is used to acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images.

[0015] The first determining module is used to determine, based on the first world coordinate data and the second world coordinate data, the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system.

[0016] A module is established to create a virtual road surface based on the first ground coordinate data and the second ground coordinate data.

[0017] The second determining module is used to determine the third-world coordinate data of each third position that the image acquisition device passes through during its movement between the first position and the second position, based on the pixel coordinate data of the virtual road surface and the road image.

[0018] The generation module is used to generate road data between the first location and the second location based on the third-world coordinate data.

[0019] A road data generation device, comprising,

[0020] At least one processor; and,

[0021] A memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0023] Acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images.

[0024] Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system.

[0025] A virtual road surface is established based on the first ground coordinate data and the second ground coordinate data;

[0026] Based on the pixel coordinate data of the virtual road surface and the road image, the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first position and the second position are determined.

[0027] Based on the aforementioned third-world coordinate data, road data between the first location and the second location is generated.

[0028] At least one embodiment provided in this specification can achieve the following beneficial effects:

[0029] The method involves determining the first world coordinates of the first location and the second world coordinates of the second location along the path of the road image captured by the image acquisition device. Under a preset camera coordinate system, the first camera coordinates of the first location and the second camera coordinates of the second location are obtained. Based on these coordinates, first ground coordinates of the first ground location corresponding to the first location and second ground coordinates of the second location corresponding to the second location are generated. A virtual road surface is then constructed based on these coordinates. Finally, based on this virtual road surface and the pixel coordinates of the road image, the third world coordinates of each third location along the path of the image acquisition device during its movement between the first and second locations are determined. This improves the accuracy of the third world coordinates of the third locations along the path of the image acquisition device during its movement between the first and second locations, thereby enhancing the accuracy of the road data generated from these third world coordinates. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A schematic flowchart illustrating a road data generation method provided in an embodiment of this specification;

[0032] Figure 2 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of a road data generation device;

[0033] Figure 3 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a road data generation device. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.

[0035] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0036] Figure 1 This is a flowchart illustrating a road data generation method provided in an embodiment of this specification. From a programming perspective, the entity executing this process can be a device used to generate road data. Figure 1 As shown, the process may include the following steps:

[0037] Step 102: Obtain the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images.

[0038] In the embodiments of this specification, the image acquisition device can be a camera, camcorder, or other device with a camera function, such as a mobile phone or tablet computer. When the image acquisition device acquires road images for a specific road, it generates a trajectory route map. Multiple locations are selected from this trajectory route map according to preset intervals or time intervals. While acquiring road images at these selected locations, the location of the image acquisition device is simultaneously determined to obtain world coordinate data of the multiple locations traversed by the image acquisition device during the image acquisition process. Two adjacent locations are selected as the first location and the second location. The world coordinate data obtained by locating the first location and the second location respectively are the first world coordinate data and the second world coordinate data.

[0039] It should be noted that the preset interval distance can be 1 meter, 2 meters, 3 meters, or other values. The higher the required accuracy of the final road data, the smaller the interval distance. Similarly, the preset interval time can be 1 second, 2 seconds, 3 seconds, or other values. The higher the required accuracy of the final road data, the smaller the interval time. Furthermore, the interval distance or interval time between two adjacent positions can be the same or different. For example, the interval distance between two adjacent positions in one step can be 1 meter, and the interval distance between two adjacent positions in the next step can be 1 meter or 2 meters; or the interval time between two adjacent positions in one step can be 1 second, and the interval time between two adjacent positions in the next step can be 1 second or 2 seconds. Therefore, the specific interval distance or interval time needs to be determined according to actual needs, and this manual does not impose specific limitations on it.

[0040] Step 104: Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system.

[0041] In the embodiments of this specification, in order to facilitate the simplicity of data processing, the coordinate data needs to be operated in a preset camera coordinate system. Therefore, it is necessary to convert the first world coordinate data and the second world coordinate data into first camera coordinate data and second camera coordinate data according to the transformation relationship between the world coordinate system and the camera coordinate system.

[0042] The world coordinate system, also known as the measurement coordinate system, can be a three-dimensional rectangular coordinate system (xw, yw, zw) that describes the spatial position of the camera and the object being measured. The world coordinate system can also be a geocentric coordinate system (ECEF), which is an Earth coordinate system with the Earth's center as its origin. The origin is the Earth's center of mass, with the z-axis parallel to the Earth's axis pointing towards the North Pole, the x-axis pointing towards the intersection of the Prime Meridian and the equator, and the y-axis perpendicular to the xOz plane (the intersection of 90° East longitude and the equator), forming a right-handed coordinate system. The world coordinate system can also be determined according to specific circumstances.

[0043] The preset camera coordinate system can also be a three-dimensional rectangular coordinate system (xc, yc, zc). The origin of the preset camera coordinate system can be the optical center of the lens. The x and y axes are parallel to the two sides of the image plane, and the z axis is the optical axis of the lens, which is perpendicular to the image plane.

[0044] In the embodiments described in this specification, the transformation from the world coordinate system to the preset camera coordinate system can be a rigid body transformation, which means that only the spatial position (translation) and orientation (rotation) of the object are changed, without changing the shape of the object. This transformation can be represented by a rotation matrix R and a translation vector T.

[0045] In the embodiments of this specification, when the image acquisition device acquires road images, it moves according to the actual route of the road. Therefore, the trajectory route map of the image acquisition device will be approximately consistent with the actual route of the road. Based on this, the first ground coordinate data of the actual road corresponding to the first position can be determined according to the first camera coordinate data at the first position, and the second ground coordinate data of the actual road corresponding to the second position can be determined according to the second camera coordinate data at the second position.

[0046] Step 106: Establish a virtual road surface based on the first ground coordinate data and the second ground coordinate data.

[0047] In the embodiments of this specification, since the first ground coordinate data and the second ground coordinate data are obtained in a preset camera coordinate system, both the first ground coordinate data and the second ground coordinate data are camera coordinate data in the preset camera coordinate system. Simultaneously, since the first ground coordinate data and the second ground coordinate data are used to represent the positions of the first position and the second position on the ground, a virtual road surface in the preset camera coordinate system can be constructed based on the first ground coordinate data and the second ground coordinate data. This virtual road surface is used to represent a road surface that is absolutely horizontal relative to the ground.

[0048] Step 108: Based on the pixel coordinate data of the virtual road surface and the road image, determine the third-world coordinate data of each third position that the image acquisition device passes through during its movement between the first position and the second position.

[0049] In the embodiments of this specification, the road images are composed of pixels, and the pixel coordinate data is used to reflect the position of the pixels in the road image.

[0050] The image acquisition device acquires pixel coordinate data of each third location it traverses during its movement between the first and second locations, corresponding to various pixel coordinates in the road image. Based on the pixel coordinate data of the third locations in the road image and the virtual road surface, third camera coordinate data is generated at the third locations. Then, according to the transformation relationship between the world coordinate system and the camera coordinate system, the third camera coordinate data is converted into third-world coordinate data. The third-world coordinate data is the data information of the third locations traversed by the image acquisition device in the world coordinate system.

[0051] Step 110: Generate road data between the first location and the second location based on the respective third-world coordinate data.

[0052] In this embodiment of the specification, the third-world coordinate data of each third location traversed by the image acquisition device during its movement between the first and second locations are used to generate corresponding road data between the first and second locations. Based on the obtained road data, a corresponding road route map is generated. The obtained road route map is compared with the road image to verify the accuracy of the acquired third-world coordinate data.

[0053] Figure 1 The method described herein determines the first world coordinate data of the first location and the second world coordinate data of the second location traversed by the image acquisition device when acquiring road images. Under a preset camera coordinate system, the first camera coordinate data of the first location and the second camera coordinate data of the second location are obtained. Based on the first and second camera coordinate data of the first and second locations, first ground coordinate data of the first ground location corresponding to the first location and second ground coordinate data of the second ground location corresponding to the second location are generated. A virtual road surface is constructed based on the first and second ground coordinate data. Based on the virtual road surface and the pixel coordinate data of the road image, the third world coordinate data of each third location traversed by the image acquisition device during its movement between the first and second locations are determined. This improves the accuracy of the third world coordinate data of each third location traversed by the image acquisition device during its movement between the first and second locations, thereby improving the accuracy of the road data generated based on the third world coordinate data.

[0054] based on Figure 1 In addition to the method described in the embodiments of this specification, some specific implementation schemes of the method are also provided, which will be described below.

[0055] Since the camera coordinate system of the image acquisition device uses the optical center as its origin, the position of the optical center of the image acquisition device is different in the first position and the second position. Therefore, the camera coordinate system of the image acquisition device at the first position and the camera coordinate system at the second position are different. In order to perform data operations under a unified camera coordinate system, the camera coordinate system of the image acquisition device at the first position can be defined as a preset camera coordinate system. Based on this, step 104: Determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system according to the first world coordinate data and the second world coordinate data. Specifically, this may include:

[0056] The image acquisition device obtains a first rotation matrix and a first translation amount of its camera coordinate system relative to the world coordinate system at the first position, and a second translation amount of its camera coordinate system relative to the world coordinate system at the second position.

[0057] Based on the preset camera coordinate system, the first rotation matrix, the first translation amount, and the second translation amount, the first camera coordinate data for the first position and the second camera coordinate data for the second position are generated.

[0058] Based on the first camera coordinate data at the first location, generate the first ground coordinate data of the first real road surface location corresponding to the first location.

[0059] Based on the second camera coordinate data of the second position, the second ground coordinate data of the second real road surface position corresponding to the second position is generated.

[0060] In this embodiment, since the camera coordinate system of the image acquisition device at the first position and the camera coordinate system at the second position are different, an intermediate coordinate system can be used to indirectly obtain the relationship between the camera coordinate systems at the first and second positions in order to obtain the relationship between them. The intermediate coordinate system used must be associated with both the camera coordinate systems at the first and second positions. The intermediate coordinate system used in this specification can be a geocentric coordinate system (ECEF) or other world coordinate systems determined according to actual conditions. Based on the position transformation relationship between the camera coordinate system and the geocentric coordinate system, the first rotation matrix and the first translation amount of the camera coordinate system at the first position relative to the geocentric coordinate system, and the second translation amount of the camera coordinate system at the second position relative to the geocentric coordinate system are obtained. After indirectly obtaining the relationship between the camera coordinate systems at the first and second positions, and combining this with using the camera coordinate system at the first position as a preset camera coordinate system, the first camera coordinate data at the first position and the second camera coordinate data at the second position can be obtained.

[0061] In the embodiments of this specification, when the image acquisition device is at the first position, assuming that the image acquisition device is in free fall, the position where the image acquisition device just touches the road surface is the first real road surface position. Similarly, when the image acquisition device is at the second position, assuming that the image acquisition device is in free fall, the position where the image acquisition device just touches the road surface is the second real road surface position. Based on the first camera coordinate data, the first ground coordinate data at the first real road surface position can be generated, and based on the second camera coordinate data, the second ground coordinate data at the second real road surface position can be generated. At this time, the first ground coordinate data and the second ground coordinate data are both the corresponding camera coordinate data of the image acquisition device at the first real road surface position and the second real road surface position.

[0062] In the embodiments of this specification, camera coordinate data from different camera coordinate systems are converted to the same camera coordinate system for data operations, thereby improving the simplicity of data operations.

[0063] During the process of acquiring road images, the image acquisition device maintains a certain distance and rotation from the first actual road surface location. Based on this, generating the first ground coordinate data for the first ground location corresponding to the first camera coordinate data at the first location may specifically include:

[0064] Obtain the distance value between the image acquisition device at the first position and the first actual road surface position.

[0065] Obtain the second rotation matrix of the image acquisition device relative to the first real road surface position;

[0066] The first ground coordinate data is generated based on the distance value, the second rotation matrix, and the first camera coordinate data at the first position.

[0067] In this embodiment of the specification, the distance between the image acquisition device at the first position and the first actual road surface position can be the distance traveled by the image acquisition device during its free fall motion from the first position to the first actual road surface position. This distance value can be obtained by measuring with a measuring instrument.

[0068] In the embodiments described in this specification, the image acquisition device needs to be pre-installed on a vehicle so that its movement can be controlled by driving the vehicle, thereby acquiring road images at various road locations. However, the image acquisition device is not perfectly horizontal to the actual road surface, but rather has a certain rotational angle. To obtain relatively accurate ground coordinate data, this rotational angle needs to be acquired in advance so that its influence can be eliminated during the subsequent actual generation of ground coordinate data. This rotational angle can be obtained by measuring using an inertial measurement unit (IMU).

[0069] In the embodiments of this specification, after obtaining the distance value and rotation of the image acquisition device at the first position relative to the first real road surface position, the first ground coordinate data can be generated based on the first camera coordinate data. Since the distance value and rotation angle of the image acquisition device at the first position relative to the first real road surface position are considered when generating the first ground coordinate data, the accuracy of the generated first ground coordinate data can be improved.

[0070] The step of generating the second ground coordinate data of the second real road surface location corresponding to the second location based on the second camera coordinate data of the second location may specifically include:

[0071] Obtain the third rotation matrix that transforms the first rotation matrix into the second rotation matrix.

[0072] The second ground coordinate data is generated based on the third rotation matrix, the second camera coordinate data, and the first ground coordinate data.

[0073] In this embodiment, since the second camera coordinate data is generated based on the first camera coordinate data using a first rotation matrix, and the first ground coordinate data is generated based on the first camera coordinate data using a second rotation matrix, the first and second rotation matrices need to be unified for simplified calculation when generating the second ground coordinate data. This embodiment converts the first rotation matrix into the second rotation matrix for simplified calculation. Therefore, a third rotation matrix is ​​needed to convert the first rotation matrix into the second rotation matrix. For example, if the rotation direction represented by the first rotation matrix is ​​front-right-downward, and the rotation direction represented by the second rotation matrix is ​​right-downward-front, then the obtained third rotation matrix can change the rotation direction from front-right-downward to right-downward-front. After obtaining the third rotation matrix that converts the first rotation matrix into the second rotation matrix, the second ground coordinate data can be generated based on the second camera coordinate data and the first ground coordinate data. Because the first rotation matrix is ​​converted into the second rotation matrix during the generation of the second ground coordinate data, only one type of rotation matrix is ​​used in the generation process, thus simplifying the generation process of the second ground coordinate data and improving the accuracy of the data.

[0074] To improve the rigor and accuracy of the camera coordinate data and ground coordinate data generation process, camera coordinate data and ground coordinate data can be generated based on fixed formulas. Therefore, the step of generating first camera coordinate data for the first position and second camera coordinate data for the second position based on the preset camera coordinate system, the first rotation matrix, the first translation amount, and the second translation amount can specifically include:

[0075] The first position is determined as the starting position of the preset camera coordinate system, and the first camera coordinate data of the first position is obtained.

[0076] Based on the first formula, the second camera coordinate data for the second position is generated according to the first rotation matrix, the first translation amount, and the second translation amount.

[0077] Wherein, the first formula is R1.inv()×(T2-T1), where R1 represents the first rotation matrix, R1.inv() represents the inversion of the first rotation matrix, T1 represents the first translation amount, T2 represents the second translation amount, and (T2-T1) represents the difference between the second translation amount and the first translation amount.

[0078] In this embodiment, the first position of the image acquisition device can be determined as the starting position of the preset camera coordinate system. Therefore, the first camera coordinate data at the first position is (0,0,0). Based on the conversion formula between the second camera coordinate data and the first camera coordinate data, and according to the first rotation matrix, the first translation amount, and the second translation amount, the second camera coordinate data at the second position is generated from the first camera coordinate data (0,0,0) as R1.inv()×(T2-T1). Here, R1 represents the first rotation matrix, R1.inv() represents the inversion of the first rotation matrix, T1 represents the first translation amount, T2 represents the second translation amount, and (T2-T1) represents the difference between the second translation amount and the first translation amount.

[0079] The step of generating the first ground coordinate data based on the distance value, the second rotation matrix, and the first camera coordinate data at the first position may specifically include:

[0080] Based on the second formula, and according to the distance value and the second rotation matrix, the first ground coordinate data is generated based on the first camera coordinate data at the first position.

[0081] Wherein, the second formula is Rc.inv()×(0,H,0), where Rc represents the second rotation matrix, Rc.inv() represents the inversion of the second rotation matrix, and H represents the distance value.

[0082] In the embodiments of this specification, based on the conversion formula between the first ground coordinate data and the first camera coordinate data, the first ground coordinate data generated from the first camera coordinate data (0,0,0) according to the distance value and the second rotation matrix is ​​Rc.inv()×(0,H,0), where Rc represents the second rotation matrix, Rc.inv() represents the inversion of the second rotation matrix, H represents the distance value, and (0,H,0) represents the data obtained by moving (0,0,0) by a distance value H.

[0083] The step of generating the second ground coordinate data based on the third rotation matrix, the second camera coordinate data at the second position, and the first ground coordinate data may specifically include:

[0084] Based on the third formula, the second ground coordinate data is generated according to the third rotation matrix, the second camera coordinate data at the second position, and the first ground coordinate data.

[0085] The third formula is one×(R1.inv()×(T2-T1))+Rc.inv()×(0,H,0), where one represents the third rotation matrix, (R1.inv()×(T2-T1)) represents the second camera coordinate data, and Rc.inv()×(0,H,0) represents the first ground coordinate data.

[0086] In the embodiments of this specification, based on the conversion formula between the second ground coordinate data and the second camera coordinate data, the second ground coordinate data generated according to the rotation matrix and the first ground coordinate data and the second camera coordinate data R1.inv()×(T2-T1) is one×(R1.inv()×(T2-T1))+Rc.inv()×

[0087] (0,H,0), where one represents the rotation matrix, (R1.inv()×(T2-T1)) represents the second camera coordinate data, and Rc.inv()×(0,H,0) represents the first ground coordinate data.

[0088] In the embodiments of this specification, since both camera coordinate data and ground coordinate data are generated based on fixed formulas, the rigor of the data generation process and the accuracy of the generated data are improved.

[0089] After obtaining the first ground coordinate data of the first real road surface location corresponding to the first position and the second ground coordinate data of the second real road surface location corresponding to the second position, since two ground coordinate points are known, multiple planes passing through these two ground coordinate points can be determined based on these two ground coordinate points. Therefore, in order to obtain accurate third camera coordinate data, a virtual plane that can be used to generate accurate third camera coordinate data is needed. Based on this, step 106: Based on the first ground coordinate data and the second ground coordinate data, a virtual road surface is established, which may specifically include:

[0090] Based on the first world coordinate data of the first position and the second world coordinate data of the second position, the movement direction vector of the image acquisition device between the first position and the second position is determined, and a first vector is obtained.

[0091] A first line segment is established based on the first and second real road surface locations.

[0092] The vector that passes through any point in the first line segment and points towards the Earth's center is defined as the second vector.

[0093] Determine the vector perpendicular to the first vector and the second vector to obtain the third vector.

[0094] The vector perpendicular to the first vector and the third vector is determined to obtain the normal vector of the virtual road surface.

[0095] In the preset camera coordinate system, the plane equation of the virtual road surface is generated based on the first line segment and the normal vector.

[0096] In the embodiments of this specification, during the movement of the image acquisition device through the first position and the second position, if the image acquisition device first passes through the first position and then moves from the first position to the second position, then the direction in which the image acquisition device moves from the first position to the second position can be determined as the movement direction of the image acquisition device. If the image acquisition device first passes through the second position and then moves from the second position to the first position, then the direction in which the image acquisition device moves from the second position to the first position can be determined as the movement direction of the image acquisition device, so that the movement direction vector of the image acquisition device is determined as the required first vector.

[0097] In the embodiments of this specification, based on the first and second positions that the image acquisition device passes through during its movement, the corresponding first and second real road surface positions are determined on the road surface traveled by the vehicle carrying the image acquisition device. The first and second real road surface positions can determine two position endpoints. Connecting these two position endpoints yields a line segment, which is the first line segment.

[0098] In the embodiments of this specification, any point 'a' is selected on the first line segment, and the vector pointing from point 'a' to the Earth's center can be determined as the second vector. Since the Earth's circumference is approximately 40,000 kilometers, the length of the first line segment in this specification is negligible compared to the Earth's circumference. Therefore, the vectors obtained by passing through any point on the first line segment and pointing to the Earth's center can be approximated as consistent.

[0099] In the embodiments of this specification, a third vector is determined based on the obtained first and second vectors. The third vector is a vector that is perpendicular to both the first and second vectors.

[0100] In this embodiment, the normal vector of the virtual road surface is determined based on the obtained first and third vectors. The normal vector of the virtual road surface is the vector that is perpendicular to both the first and third vectors. In a preset camera coordinate system, among the multiple planes determined by the two ground coordinate points, the plane perpendicular to the obtained normal vector is the desired virtual road surface. The plane equation obtained based on the two ground coordinate points and the normal vector is the plane equation of the virtual road surface, and the formula for the plane equation can be: Ax + By + Cz + D = 0.

[0101] In the embodiments described in this specification, the virtual road surface is determined based on the plane equations corresponding to two ground coordinate points and their normal vectors, thereby improving the accuracy of the virtual road surface. Furthermore, since the virtual road surface is absolutely level with respect to the real road surface, the coordinate data of the subsequent third cameras generated based on the virtual road surface are more accurate, thus helping to ensure the accuracy of the generated road data.

[0102] After obtaining the virtual road surface corresponding to the first and second positions traversed by the image acquisition device, the camera coordinate data at other positions traversed by the image acquisition device during its movement between the first and second positions can be determined based on the virtual road surface. Therefore, step 108: determining the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first and second positions based on the virtual road surface and the pixel coordinate data of the road image, specifically may include:

[0103] Determine the target pixel coordinate data corresponding to the third position in the pixel coordinate data of the road image.

[0104] Using the target pixel coordinate data at the third position and the plane equation, the third camera coordinate data at the third position in the preset camera coordinate system is generated.

[0105] Based on the first transformation relationship between the preset camera coordinate system and the world coordinate system, the third world coordinate data of the third position is generated according to the third camera coordinate data of the third position.

[0106] In the embodiments of this specification, in a road image frame acquired by the image acquisition device, each third position traversed by the image acquisition device during its movement between the first and second positions is identified, and the pixel coordinate data corresponding to each third position is determined in the road image. Based on the pixel coordinate data corresponding to the third position in the road image, and the plane equation of the virtual road surface determined based on the first and second ground coordinate data, the coordinate data of the third camera at the third position can be obtained.

[0107] In this embodiment, since the virtual road surface plane equation is a camera coordinate plane equation generated under a preset camera coordinate system, the generated third camera coordinate data is also generated under the preset camera coordinate system. Because the third camera coordinate data at the third location is generated under the preset camera coordinate system, it can be converted into third-world coordinate data at the third location based on the transformation relationship between the preset camera coordinate system and the world coordinate system.

[0108] In the embodiments of this specification, the required pixel coordinate data can be selected from the road image according to the user's needs. Based on the selected pixel coordinate data, the camera coordinate data corresponding to the image pixels is generated purposefully using the virtual road surface plane equation, so as to avoid generating camera coordinate data from all pixel coordinate data in the road image and reduce the interference of camera coordinate data that is irrelevant to the user's needs.

[0109] In the process of generating camera coordinate data corresponding to image pixels based on known pixel coordinate data and the acquired plane equation of the virtual road surface, pixel coordinate data can be converted into camera coordinate data according to the fixed transformation relationship between the camera coordinate system and the pixel coordinate system. Based on this, the step of generating third camera coordinate data for the third position in the preset camera coordinate system using the target pixel coordinate data at the third position and the plane equation can specifically include:

[0110] Obtain the intrinsic parameter matrix of the image acquisition device.

[0111] Based on the second transformation relationship between the preset camera coordinate system and the pixel coordinate system corresponding to the road image, and the plane equation, the scaling factor between the preset camera coordinate system and the pixel coordinate system is determined.

[0112] Based on the second transformation relationship, the third camera coordinate data is generated according to the scaling factor, the intrinsic parameter matrix, and the pixel coordinate data of the third position.

[0113] In the embodiments of this specification, the intrinsic parameter matrix of the image acquisition device can reflect the attributes of the image acquisition device itself. The intrinsic parameter matrix of each image acquisition device is usually different and can be determined by calibration. However, the intrinsic parameter matrix of any image acquisition device can be fixed after calibration.

[0114] In the embodiments of this specification, the transformation relationship between the camera coordinate system and the pixel coordinate system can be: in, It can represent the camera coordinate system , It can represent a pixel coordinate system, Zc represents the scaling factor, and K-1 This represents the inverse of the intrinsic parameter matrix. Through the analysis above, K... -1 Given that the quantities are known and the pixel coordinate data is also known, let's assume the known pixel coordinate data is... Then, in the camera coordinate data, X = 1 × ZcK -1 Y = 2 × ZcK -1 Z = 3 × ZcK -1 Based on the plane equation formula of the virtual road surface obtained above: Ax + By + Cz + D = 0, we can set X = 1 × ZcK. -1 Y = 2 × ZcK -1 Z = 3 × ZcK -1 Substituting these values ​​into Ax + By + Cz + D = 0, we obtain A × 1 × ZcK. -1 +B×2×ZcK -1 +C×3×ZcK -1 +D=0, which simplifies further to: (A+2B+3C)×ZcK -1 +D=0, because A, B, C, D, K -1 Since all the data are known, the proportionality coefficient Zc can be calculated.

[0115] In the embodiments of this specification, after obtaining the scaling factor Zc, the transformation relationship between the camera coordinate system and the pixel coordinate system is also as follows: Given the intrinsic parameter matrix of the image acquisition device and the image pixel coordinates corresponding to the third position, the scaling factor Zc and the inverse K of the intrinsic parameter matrix of the image acquisition device are... -1 Image pixel coordinate data corresponding to the third position The coordinates of the third camera at the third position can then be calculated.

[0116] In the embodiments of this specification, the coordinate data of the third camera at each third position are calculated under the premise of an inherent conversion formula. Therefore, the rigor and accuracy of obtaining the coordinate data of the third camera at each third position can be improved.

[0117] After obtaining the third camera coordinate data for each third location, in order to describe the position of each third location relative to the image acquisition device in the spatial world, it is necessary to convert the third camera coordinate data for each third location into third-world coordinate data for each third location. Based on this, and according to the first transformation relationship between the preset camera coordinate system and the world coordinate system, the third-world coordinate data for each third location is generated based on the third camera coordinate data for that third location. Specifically, this may include:

[0118] Based on the first transformation relationship, the third world coordinate data is generated according to the first rotation matrix, the first translation amount, and the third camera coordinate data.

[0119] In this embodiment of the specification, the first transformation relationship can be the transformation relationship between the preset camera coordinate system and the world coordinate system. Since the preset camera coordinate system is known to be the camera coordinate system at the first position, and the first rotation matrix and first translation amount of the camera coordinate system at the first position relative to the world coordinate system are known, the transformation formula between the camera coordinate system and the world coordinate system is as follows: The third-world coordinates of the third location can then be calculated. Among them: Let R represent the camera coordinate system, R represent the rotation of the world coordinate system relative to the camera coordinate system, and T represent the translation of the world coordinate system relative to the camera coordinate system. Represents the world coordinate system.

[0120] In the embodiments of this specification, the third-world coordinate data of each third position are calculated under the premise of the inherent transformation formula. Therefore, the rigor and accuracy of obtaining the third-world coordinate data of each third position can be improved.

[0121] After obtaining the third-world coordinate data for each third location, the characteristics of different third-world coordinate data differ. To simplify the subsequent road data generation process and improve data accuracy, the obtained third-world coordinate data needs to be processed accordingly. Based on this, step 110: generating road data between the first location and the second location based on each of the third-world coordinate data may specifically include:

[0122] The third-world coordinate data are grouped to obtain at least one third-world coordinate data set; the grouping process is used to divide the third-world coordinate data with similar characteristics into the same third-world coordinate data set.

[0123] The third-world coordinate data in each of the aforementioned third-world coordinate datasets are fitted to obtain fitted curves.

[0124] Based on the fitted curve, road data between the first location and the second location is generated.

[0125] In the embodiments of this specification, each third-world coordinate data has its own characteristics, and the third-world coordinate data can be grouped according to these characteristics. The characteristics of the third-world coordinate data can be reflected in considering the linear elements of each line segment formed by any two world coordinate data.

[0126] Specifically, by grouping the various Third World coordinate data, Third World coordinate data with similar characteristics can be classified into a single Third World coordinate data set, thus obtaining multiple Third World coordinate data sets. For each Third World coordinate data set, all Third World coordinate data within the set are stitched together into a curve using a fitting method, resulting in a fitting curve for each Third World coordinate data set. Based on the obtained fitting curve, road data of the road between the first and second positions traversed by the image acquisition device is generated.

[0127] In the embodiments of this specification, third-world coordinate data with similar features are divided into a set, and only third-world coordinate data belonging to the same set are fitted into curves to avoid interference from other third-world coordinate data with large feature differences, reduce the error rate of the fitted curves, and improve the accuracy of road data.

[0128] To quickly obtain third-world coordinate data with similar characteristics, when considering the linear elements of line segments formed by any two world coordinate data, specific considerations can include the length of different line segments, the distance between different line segments, and the angle between different line segments. Based on this, the process of grouping the various third-world coordinate data to obtain at least one third-world coordinate data set can specifically include:

[0129] For any two second line segments constructed from the third-world coordinate data, determine whether the difference in length between any two second line segments is less than a first threshold, and / or determine whether the distance between any two second line segments is less than a second threshold, and / or determine whether the included angle between any two second line segments is less than a third threshold, and obtain the determination result.

[0130] Based on the judgment result, the various third-world coordinate data are grouped to obtain at least one third-world coordinate data set.

[0131] In the embodiments of this specification, for any two third-world coordinate data forming multiple line segments, the third-world coordinate data are grouped based on the linear elements of the line segments. The grouping methods can be as follows: First, grouping can be based on whether the difference in length between any two line segments is less than a first threshold. For example, the third-world coordinate data corresponding to line segments with lengths less than the first threshold are divided into the first group, the third-world coordinate data corresponding to line segments with lengths equal to the first threshold are divided into the second group, and the third-world coordinate data corresponding to line segments with lengths greater than the first threshold are divided into the third group. Alternatively, a second grouping method can be based on whether the distance between any two line segments is less than a second threshold, with the same grouping principle as the first method. Alternatively, a third grouping method can be based on whether the included angle between any two line segments is less than a third threshold, with the same grouping principle as the first method. Alternatively, a fourth grouping method can be used, where each group obtained from the first grouping method is further grouped based on either the second or third grouping method. Alternatively, a fifth grouping method can be used, where each group obtained from the first grouping method is grouped multiple times, sequentially based on the second and third grouping methods. The specific grouping method can be determined according to the user's requirements for the accuracy of the grouping results, and this manual does not impose any restrictions on it.

[0132] After grouping the various Third World coordinate data according to their characteristics, multiple Third World coordinate data sets are obtained. To obtain the final road data, it is necessary to perform fitting processing on the Third World coordinate data within each Third World coordinate data set. Therefore, the fitting processing of the Third World coordinate data in each Third World coordinate data set to obtain a fitting curve may specifically include:

[0133] For each set of third-world coordinate data, a fitted sub-curve is generated based on each third-world coordinate data in the set of third-world coordinate data. The fitted sub-curve is the curve with the minimum sum of distances to each third-world coordinate data in the set of third-world coordinate data.

[0134] The fitted curve is generated based on each of the fitted sub-curves.

[0135] In the embodiments of this specification, the fitting process for the third-world coordinate data within each third-world coordinate dataset can be based on Principal Component Eigenvalue Analysis (PCA). Principal Component Analysis (PCA) is a technique for analyzing and simplifying datasets, primarily used to reduce the dimensionality of data. According to the PCA fitting process, the curve that minimizes the sum of distances to all third-world coordinate data within the dataset is determined as the fitted sub-curve for that dataset. These fitted sub-curves are then combined to generate the final fitted curve.

[0136] In the embodiments described in this specification, the curve with the smallest sum of distances from all third-world coordinate data within the third-world coordinate data set is determined as the fitting curve, so that the fitting curve is closest to the actual road route, thereby improving the accuracy of the acquired road data.

[0137] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 2 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a road data generation device. (See diagram below.) Figure 2 As shown, the device may include:

[0138] The acquisition module 202 is used to acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images.

[0139] The first determining module 204 is used to determine, based on the first world coordinate data and the second world coordinate data, the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system.

[0140] The module 206 is used to establish a virtual road surface based on the first ground coordinate data and the second ground coordinate data.

[0141] The second determining module 208 is used to determine the third-world coordinate data of each third position that the image acquisition device passes through during its movement between the first position and the second position, based on the pixel coordinate data of the virtual road surface and the road image.

[0142] The generation module 210 is used to generate road data between the first location and the second location based on the respective third-world coordinate data.

[0143] Optionally, the preset camera coordinate system is the camera coordinate system of the image acquisition device at the first position.

[0144] The first determining module 204 specifically includes:

[0145] The first acquisition unit is used to acquire a first rotation matrix and a first translation amount of the camera coordinate system of the image acquisition device at the first position relative to the world coordinate system, and a second translation amount of the camera coordinate system of the image acquisition device at the second position relative to the world coordinate system.

[0146] The first generation unit is used to generate first camera coordinate data at the first position and second camera coordinate data at the second position based on the preset camera coordinate system, the first rotation matrix, the first translation amount, and the second translation amount.

[0147] The second generation unit is used to generate the first ground coordinate data of the first real road surface location corresponding to the first location based on the first camera coordinate data of the first location.

[0148] The third generation unit is used to generate the second ground coordinate data of the second real road surface position corresponding to the second position based on the second camera coordinate data of the second position.

[0149] Optionally, the second generation unit specifically includes:

[0150] The first acquisition subunit is used to acquire the distance value between the image acquisition device at the first position and the first real road surface position.

[0151] The second acquisition subunit is used to acquire a second rotation matrix of the image acquisition device relative to the first real road surface position.

[0152] The first generation subunit is used to generate the first ground coordinate data based on the distance value, the second rotation matrix, and the first camera coordinate data at the first position.

[0153] The third generation unit specifically includes:

[0154] The third acquisition subunit is used to acquire the third rotation matrix that transforms the first rotation matrix into the second rotation matrix.

[0155] The second generation subunit is used to generate the second ground coordinate data based on the third rotation matrix, the second camera coordinate data, and the first ground coordinate data.

[0156] Optionally, the first generation unit specifically includes:

[0157] The first determining subunit is used to determine the first position as the starting position of the preset camera coordinate system and obtain the first camera coordinate data of the first position.

[0158] The third generation subunit is used to generate second camera coordinate data for the second position based on the first formula, according to the first rotation matrix, the first translation amount, and the second translation amount.

[0159] Wherein, the first formula is R1.inv()×(T2-T1), where R1 represents the first rotation matrix, R1.inv() represents the inversion of the first rotation matrix, T1 represents the first translation amount, T2 represents the second translation amount, and (T2-T1) represents the difference between the second translation amount and the first translation amount.

[0160] The first generating subunit specifically includes:

[0161] Based on the second formula, and according to the distance value and the second rotation matrix, the first ground coordinate data is generated based on the first camera coordinate data at the first position.

[0162] Wherein, the second formula is Rc.inv()×(0,H,0), where Rc represents the second rotation matrix, Rc.inv() represents the inversion of the second rotation matrix, and H represents the distance value.

[0163] The second generating subunit specifically includes:

[0164] Based on the third formula, the second ground coordinate data is generated according to the third rotation matrix, the second camera coordinate data at the second position, and the first ground coordinate data.

[0165] The third formula is one×(R1.inv()×(T2-T1))+Rc.inv()×(0,H,0), where one represents the third rotation matrix, (R1.inv()×(T2-T1)) represents the second camera coordinate data, and Rc.inv()×(0,H,0) represents the first ground coordinate data.

[0166] Optionally, the establishment module 206 specifically includes:

[0167] The first determining unit is configured to determine the movement direction vector of the image acquisition device between the first position and the second position based on the first world coordinate data of the first position and the second world coordinate data of the second position, thereby obtaining a first vector.

[0168] The first establishing unit is used to establish a first line segment based on the first real road surface position and the second real road surface position.

[0169] The second determining unit is used to determine the vector that passes through any point in the first line segment and points to the center of the earth as the second vector.

[0170] The third determining unit is used to determine a vector perpendicular to the first vector and the second vector to obtain a third vector.

[0171] The fourth determining unit is used to determine the vector perpendicular to the first vector and the third vector to obtain the normal vector of the virtual road surface.

[0172] The fourth generation unit is used to generate the plane equation of the virtual road surface based on the first line segment and the normal vector in the preset camera coordinate system.

[0173] Optionally, the second determining module 208 specifically includes:

[0174] The fifth determining unit is used to determine the target pixel coordinate data corresponding to the third position in the pixel coordinate data of the road image.

[0175] The fifth generation unit is used to generate third camera coordinate data of the third position in the preset camera coordinate system using the target pixel coordinate data of the third position and the plane equation.

[0176] The sixth generation unit is used to generate the third world coordinate data of the third position based on the first transformation relationship between the preset camera coordinate system and the world coordinate system, and according to the third camera coordinate data of the third position.

[0177] Optionally, the fifth generation unit specifically includes:

[0178] The fourth acquisition subunit is used to acquire the intrinsic parameter matrix of the image acquisition device.

[0179] The second determining subunit is used to determine the scaling factor between the preset camera coordinate system and the pixel coordinate system based on the second transformation relationship between the preset camera coordinate system and the pixel coordinate system corresponding to the road image, and the plane equation.

[0180] The fourth generation subunit is used to generate the third camera coordinate data based on the second transformation relationship, according to the scaling factor, the intrinsic parameter matrix, and the pixel coordinate data of the third position.

[0181] Optionally, the sixth generation unit specifically includes:

[0182] The fifth generation subunit is used to generate the third world coordinate data based on the first transformation relationship, the first rotation matrix, the first translation amount, and the third camera coordinate data.

[0183] Optionally, the generation module 210 specifically includes:

[0184] The first grouping unit is used to group the various third-world coordinate data to obtain at least one third-world coordinate data set; the grouping process is used to divide the third-world coordinate data with similar features into the same third-world coordinate data set.

[0185] The first fitting unit is used to perform fitting processing on the third-world coordinate data in each of the third-world coordinate data sets to obtain a fitting curve.

[0186] The seventh generation unit is used to generate road data between the first position and the second position based on the fitted curve.

[0187] Optionally, the first grouping unit specifically includes:

[0188] The first judgment subunit is used to construct each second line segment for any two of the third world coordinate data, determine whether the difference in length between any two second line segments is less than a first threshold, and / or determine whether the distance between any two second line segments is less than a second threshold, and / or determine whether the included angle between any two second line segments is less than a third threshold, and obtain the judgment result.

[0189] The first grouping subunit is used to group each of the third-world coordinate data according to the judgment result to obtain at least one third-world coordinate data set.

[0190] Optionally, the first fitting unit specifically includes:

[0191] The sixth generation subunit is used to generate a fitting sub-curve for each of the third-world coordinate data sets based on each of the third-world coordinate data in the third-world coordinate data set. The fitting sub-curve is the curve with the minimum sum of distances to each of the third-world coordinate data in the third-world coordinate data set.

[0192] The seventh generation subunit is used to generate the fitting curve based on each of the fitting sub-curves.

[0193] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.

[0194] Figure 3 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a road data generation device. (See diagram below.) Figure 3 As shown, device 300 may include:

[0195] At least one processor 310; and,

[0196] Memory 330 communicatively connected to the at least one processor; wherein,

[0197] The memory 330 stores instructions 320 that can be executed by the at least one processor 310, the instructions being executed by the at least one processor 310 to enable the at least one processor 310 to:

[0198] Acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images;

[0199] Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system;

[0200] A virtual road surface is established based on the first ground coordinate data and the second ground coordinate data;

[0201] Based on the pixel coordinate data of the virtual road surface and the road image, the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first position and the second position are determined.

[0202] Based on the aforementioned third-world coordinate data, road data between the first location and the second location is generated.

[0203] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 3 As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0204] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating road data, characterized in that, include: Acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images; Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system; Based on the first world coordinate data of the first position and the second world coordinate data of the second position, the movement direction vector of the image acquisition device between the first position and the second position is determined to obtain a first vector; a first line segment is established based on the first real road surface position corresponding to the first position and the second real road surface position corresponding to the second position. The vector passing through any point in the first line segment and pointing towards the Earth's center is determined as the second vector; a vector perpendicular to both the first and second vectors is determined to obtain the third vector; a vector perpendicular to both the first and third vectors is determined to obtain the normal vector of the virtual road surface; in the preset camera coordinate system, the plane equation of the virtual road surface is generated based on the first line segment and the normal vector; wherein, the virtual road surface is used to represent a road surface that is absolutely horizontal relative to the ground. Based on the pixel coordinate data of the virtual road surface and the road image, the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first position and the second position are determined. Based on the aforementioned third-world coordinate data, road data between the first location and the second location is generated.

2. The method as described in claim 1, characterized in that, The preset camera coordinate system is the camera coordinate system of the image acquisition device at the first position; The step of determining the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system based on the first world coordinate data and the second world coordinate data specifically includes: The image acquisition device obtains a first rotation matrix and a first translation amount of its camera coordinate system relative to the world coordinate system at the first position, and a second translation amount of its camera coordinate system relative to the world coordinate system at the second position. Based on the preset camera coordinate system, the first rotation matrix, the first translation amount, and the second translation amount, generate the first camera coordinate data for the first position and the second camera coordinate data for the second position; Based on the first camera coordinate data at the first location, generate the first ground coordinate data of the first real road surface location corresponding to the first location; Based on the second camera coordinate data of the second position, the second ground coordinate data of the second real road surface position corresponding to the second position is generated.

3. The method as described in claim 2, characterized in that, The step of generating the first ground coordinate data of the first real road surface location corresponding to the first location based on the first camera coordinate data of the first location specifically includes: Obtain the distance value between the image acquisition device at the first position and the first actual road surface position; Obtain the second rotation matrix of the image acquisition device relative to the first real road surface position; The first ground coordinate data is generated based on the distance value, the second rotation matrix, and the first camera coordinate data at the first position; The step of generating the second ground coordinate data of the second real road surface location corresponding to the second location based on the second camera coordinate data of the second location specifically includes: Obtain the third rotation matrix that transforms the first rotation matrix into the second rotation matrix; The second ground coordinate data is generated based on the third rotation matrix, the second camera coordinate data, and the first ground coordinate data.

4. The method as described in claim 3, characterized in that, The step of generating first camera coordinate data for the first position and second camera coordinate data for the second position based on the preset camera coordinate system, the first rotation matrix, the first translation amount, and the second translation amount specifically includes: The first position is determined as the starting position of the preset camera coordinate system, and the first camera coordinate data of the first position is obtained; Based on the first formula, the second camera coordinate data for the second position is generated according to the first rotation matrix, the first translation amount, and the second translation amount. Wherein, the first formula is R1.inv()×(T2-T1), where R1 represents the first rotation matrix, R1.inv() represents the inversion of the first rotation matrix, T1 represents the first translation amount, T2 represents the second translation amount, and (T2-T1) represents the difference between the second translation amount and the first translation amount; The step of generating the first ground coordinate data based on the distance value, the second rotation matrix, and the first camera coordinate data at the first position specifically includes: Based on the second formula, and according to the distance value and the second rotation matrix, the first ground coordinate data is generated based on the first camera coordinate data at the first position; Wherein, the second formula is Rc.inv()×(0,H,0), where Rc represents the second rotation matrix, Rc.inv() represents the inversion of the second rotation matrix, and H represents the distance value; The step of generating the second ground coordinate data based on the third rotation matrix, the second camera coordinate data at the second position, and the first ground coordinate data specifically includes: Based on the third formula, the second ground coordinate data is generated according to the third rotation matrix, the second camera coordinate data at the second position, and the first ground coordinate data; The third formula is one×(R1.inv()×(T2-T1))+Rc.inv()×(0,H,0), where one represents the third rotation matrix, (R1.inv()×(T2-T1)) represents the second camera coordinate data, and Rc.inv()×(0,H,0) represents the first ground coordinate data.

5. The method as described in claim 2, characterized in that, The step of determining the third-world coordinate data of each third location traversed by the image acquisition device during its movement between the first and second locations, based on the pixel coordinate data of the virtual road surface and the road image, specifically includes: Determine the target pixel coordinate data corresponding to the third position in the pixel coordinate data of the road image; Using the target pixel coordinate data at the third position and the plane equation, generate the third camera coordinate data at the third position in the preset camera coordinate system; Based on the first transformation relationship between the preset camera coordinate system and the world coordinate system, the third world coordinate data of the third position is generated according to the third camera coordinate data of the third position.

6. The method as described in claim 5, characterized in that, The step of generating third camera coordinate data for the third position in the preset camera coordinate system using the target pixel coordinate data at the third position and the plane equation specifically includes: Obtain the intrinsic parameter matrix of the image acquisition device; Based on the second transformation relationship between the preset camera coordinate system and the pixel coordinate system corresponding to the road image, and the plane equation, the scaling factor between the preset camera coordinate system and the pixel coordinate system is determined; Based on the second transformation relationship, the third camera coordinate data is generated according to the scaling factor, the intrinsic parameter matrix, and the pixel coordinate data of the third position.

7. The method as described in claim 5, characterized in that, Based on the first transformation relationship between the preset camera coordinate system and the world coordinate system, and according to the third camera coordinate data at the third position, the third world coordinate data at the third position is generated, specifically including: Based on the first transformation relationship, the third world coordinate data is generated according to the first rotation matrix, the first translation amount, and the third camera coordinate data.

8. The method according to any one of claims 1-7, characterized in that, The step of generating road data between the first location and the second location based on the respective third-world coordinate data specifically includes: The third-world coordinate data are grouped to obtain at least one third-world coordinate data set; the grouping process is used to divide the third-world coordinate data with similar features into the same third-world coordinate data set. The third-world coordinate data in each of the aforementioned third-world coordinate datasets are respectively fitted to obtain a fitted curve; Based on the fitted curve, road data between the first location and the second location is generated.

9. The method as described in claim 8, characterized in that, The step of grouping the various third-world coordinate data to obtain at least one third-world coordinate data set specifically includes: For any two sets of third-world coordinate data, construct each second line segment, determine whether the difference in length between any two second line segments is less than a first threshold, and / or determine whether the distance between any two second line segments is less than a second threshold, and / or determine whether the included angle between any two second line segments is less than a third threshold, and obtain the determination result; Based on the judgment result, the various third-world coordinate data are grouped to obtain at least one third-world coordinate data set.

10. The method as described in claim 9, characterized in that, The process of fitting the third-world coordinate data in each of the third-world coordinate datasets to obtain a fitting curve specifically includes: For each set of third-world coordinate data, a fitted sub-curve is generated based on each third-world coordinate data in the set of third-world coordinate data. The fitted sub-curve is the curve with the minimum sum of distances to each third-world coordinate data in the set of third-world coordinate data. The fitted curve is generated based on each of the fitted sub-curves.

11. A road data generation device, characterized in that, include: The acquisition module is used to acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images; The first determining module is used to determine, based on the first world coordinate data and the second world coordinate data, the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system. A module is used to establish a virtual road surface based on the first ground coordinate data and the second ground coordinate data; wherein the virtual road surface is used to represent a road surface that is absolutely horizontal relative to the ground. The second determining module is used to determine the third-world coordinate data of each third position that the image acquisition device passes through during its movement between the first position and the second position, based on the pixel coordinate data of the virtual road surface and the road image. The processing module is used to generate road data between the first location and the second location based on the third-world coordinate data. The establishment module specifically includes: The first determining unit is configured to determine the movement direction vector of the image acquisition device between the first position and the second position based on the first world coordinate data of the first position and the second world coordinate data of the second position, thereby obtaining a first vector; The first establishing unit is used to establish a first line segment based on the first real road surface position corresponding to the first position and the second real road surface position corresponding to the second position. The second determining unit is used to determine the vector that passes through any point in the first line segment and points to the center of the earth as the second vector; The third determining unit is used to determine a vector perpendicular to the first vector and the second vector to obtain a third vector; The fourth determining unit is used to determine the vector perpendicular to the first vector and the third vector to obtain the normal vector of the virtual road surface; The fourth generation unit is used to generate the plane equation of the virtual road surface based on the first line segment and the normal vector in the preset camera coordinate system.

12. A road data generation device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Acquire the first world coordinate data of the first position and the second world coordinate data of the second position of the image acquisition device during the process of acquiring road images; Based on the first world coordinate data and the second world coordinate data, determine the first ground coordinate data corresponding to the first position and the second ground coordinate data corresponding to the second position in the preset camera coordinate system; Based on the first world coordinate data of the first position and the second world coordinate data of the second position, the movement direction vector of the image acquisition device between the first position and the second position is determined to obtain a first vector; a first line segment is established based on the first real road surface position corresponding to the first position and the second real road surface position corresponding to the second position; a vector passing through any point in the first line segment and pointing towards the center of the earth is determined as a second vector; a vector perpendicular to the first vector and the second vector is determined to obtain a third vector; a vector perpendicular to the first vector and the third vector is determined to obtain the normal vector of the virtual road surface; under the preset camera coordinate system, the plane equation of the virtual road surface is generated based on the first line segment and the normal vector; wherein, the virtual road surface is used to represent a road surface that is absolutely horizontal relative to the ground; Based on the pixel coordinate data of the virtual road surface and the road image, the third-world coordinate data of each third position traversed by the image acquisition device during its movement between the first position and the second position are determined. Based on the aforementioned third-world coordinate data, road data between the first location and the second location is generated.

Citation Information

Patent Citations

  • Mapping generation method and device and roadside equipment

    CN112037316A