A camera pose correction method, apparatus, computer device, and storage medium
By acquiring the coordinate transformation relationship between the imaging and monitoring of lane lines, calculating the vanishing point information, and fusing the pitch angle parameters, the accuracy problem of camera pitch angle correction under special driving conditions is solved, thus improving the safety of autonomous driving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE INNOVATION CORP
- Filing Date
- 2023-09-27
- Publication Date
- 2026-06-30
Smart Images

Figure CN117274384B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and in particular to a camera pose correction method, apparatus, computer device, storage medium, and computer program product. Background Technology
[0002] Autonomous driving refers to the use of technologies such as artificial intelligence, computer vision, radar, monitoring devices, and global positioning systems to enable computers to operate motor vehicles automatically and safely without any human intervention. Lane detection technology is a crucial component of autonomous driving. Autonomous vehicles need to perceive lane lines of different colors and under varying lighting conditions. Lane detection technology guides the vehicle to drive within the correct lanes, providing a basis for actions such as automatic cruise control, lane keeping, and lane overtaking. It also provides warnings to the driver when the vehicle deviates from its lane, contributing to safe driving. In the field of autonomous driving, changes in the vehicle's position cause changes in the camera's pitch angle. These changes can alter the position of targets relative to the vehicle, leading to inaccurate target distance and speed measurements, and inaccurate lane line positioning, increasing the risks during autonomous driving. Therefore, effectively correcting the camera pitch angle is a pressing issue that needs to be addressed in this field.
[0003] In related technologies, multiple sampling levels are typically set in the process of correcting the camera pitch angle. Each sampling level corresponds to different coordinate values of the lane line in the X direction. The vanishing point between each pair of adjacent lane lines is calculated at each sampling level, and a set of vanishing points is formed. Finally, the final vanishing point is selected from the set of vanishing points through processing such as median filtering, and the corresponding pitch angle is calculated based on the final vanishing point.
[0004] However, current methods for correcting camera pitch angles have the following technical problems:
[0005] Existing solutions can correct pitch angles on flat roads, but when special driving conditions occur, such as vehicle bumps, rapid acceleration, or changes in road slope, it is difficult to accurately calculate the vanishing point of the lane lines, resulting in inaccurate pitch angle correction results. Summary of the Invention
[0006] Therefore, it is necessary to provide a camera pose correction method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of pitch angle calculation results by referencing the angular relationship between the vehicle body and the road during the pitch angle calculation process.
[0007] Firstly, this application provides a camera pose correction method. The method includes:
[0008] Acquire target image information, environmental monitoring information, and camera intrinsic parameters of the target camera, wherein the environmental monitoring information includes the monitoring coordinates of lane line sampling points;
[0009] Based on the target image information, the imaging coordinates of the lane line sampling point on the target image are obtained, and the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point is determined according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates.
[0010] Based on the transformation relationship, the environmental monitoring information, and the target image information, determine the vanishing point information corresponding to the lane lines in the target image;
[0011] The pitch angle parameters of the target camera are determined based on the vanishing point information, and the pose of the target camera is corrected according to the pitch angle parameters.
[0012] In one embodiment, determining the pitch angle parameters of the target camera based on the vanishing point information, and correcting the pose of the target camera according to the pitch angle parameters, includes:
[0013] Obtain several first pitch angle parameters corresponding to different lane lines;
[0014] The pitch angle parameters used to achieve pose correction are determined based on a plurality of the first pitch angle parameters.
[0015] In one embodiment, determining the pitch angle parameters for achieving pose correction based on a plurality of first pitch angle parameters includes:
[0016] Based on a preset median filtering algorithm, several first pitch angle parameters are fused to obtain the pitch angle parameters.
[0017] In one embodiment, obtaining the imaging coordinates of the lane line sampling point on the target image based on the target image information, and determining the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point according to the camera intrinsic parameters, the imaging coordinates, and the monitoring coordinates includes:
[0018] Based on the environmental monitoring information, obtain the first vector from the target camera to the monitoring coordinate point;
[0019] The focal length parameter of the target camera is determined based on the camera intrinsic parameters, and a second vector from the target camera to the imaging coordinate point is determined based on the focal length parameter.
[0020] Obtain a first scaling factor between the first vector and the second vector, and determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor.
[0021] In one embodiment, determining the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information includes:
[0022] Construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and obtain the projection point parameters of the third vector in the target image;
[0023] The width of the imaging lane line in the target image is determined based on the two imaging coordinates, and the actual lane line width is obtained based on the transformation relationship.
[0024] The vanishing point information is determined based on a second proportionality coefficient between the imaged lane width and the actual lane width.
[0025] In one embodiment, determining the width of the imaging lane line in the target image based on the two imaging coordinates, and obtaining the actual lane line width based on the transformation relationship, includes:
[0026] The yaw angle parameters of the target camera are obtained based on the environmental monitoring information;
[0027] The actual lane width is determined based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
[0028] Secondly, this application also provides a camera pose correction device. The device includes:
[0029] The data acquisition module is used to acquire target image information, environmental monitoring information, and camera intrinsic parameters of the target camera. The environmental monitoring information includes the monitoring coordinates of lane line sampling points.
[0030] The conversion relationship module is used to obtain the imaging coordinates of the lane line sampling point on the target image based on the target image information, and to determine the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates.
[0031] The vanishing point calculation module is used to determine the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information.
[0032] The pose correction module is used to determine the pitch angle parameters of the target camera based on the vanishing point information, and to correct the pose of the target camera according to the pitch angle parameters.
[0033] In one embodiment, the pose correction module includes:
[0034] The first pitch angle parameter module is used to obtain several first pitch angle parameters corresponding to different lane lines;
[0035] A multi-parameter fusion module is used to determine the pitch angle parameters used to achieve pose correction based on several first pitch angle parameters.
[0036] In one embodiment, the multi-parameter fusion module includes:
[0037] The parameter fusion module is used to fuse several first pitch angle parameters based on a preset median filtering algorithm to obtain the pitch angle parameters.
[0038] In one embodiment, the conversion relationship module includes:
[0039] The first vector module is used to obtain a first vector from the target camera to the monitoring coordinate point based on the environmental monitoring information;
[0040] The second vector module is used to determine the focal length parameter of the target camera based on the camera intrinsic parameters, and to determine the second vector from the target camera to the imaging coordinate point based on the focal length parameter.
[0041] The scaling factor module is used to obtain a first scaling factor between the first vector and the second vector, and to determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor.
[0042] In one embodiment, the vanishing point calculation module includes:
[0043] The third vector module is used to construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and to obtain the projection point parameters of the third vector in the target image.
[0044] The real lane line width module is used to determine the imaging lane line width in the target image based on the two imaging coordinates, and to obtain the real lane line width based on the transformation relationship.
[0045] The second scaling factor module is used to determine the vanishing point information based on a second scaling factor between the imaged lane width and the actual lane width.
[0046] In one embodiment, the actual lane line width module includes:
[0047] The yaw angle parameter module is used to obtain the yaw angle parameters of the target camera based on the environmental monitoring information.
[0048] The trigonometric function relationship module is used to determine the actual lane width based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
[0049] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of a camera pose correction method as described in any embodiment of the first aspect.
[0050] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of a camera pose correction method as described in any embodiment of the first aspect.
[0051] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of a camera pose correction method as described in any embodiment of the first aspect.
[0052] The aforementioned camera pose correction method, apparatus, computer equipment, storage medium, and computer program product, derived through the technical features described herein, can achieve beneficial effects to address the technical problems in the background art.
[0053] In processing the camera pitch angle parameters, the system first acquires data obtainable from vehicle-mounted sensors, such as target image information and environmental monitoring information, as well as camera intrinsic parameters from the vehicle's own cameras. Then, based on the target image information, the imaging coordinates of the lane line sampling points are obtained. Using the camera intrinsic parameters, imaging coordinates, and monitoring coordinates, the transformation relationship between the monitoring and imaging coordinates is derived. After obtaining the transformation relationship between the two coordinate systems, the vanishing point information can be calculated. Based on this vanishing point information, the pitch angle parameters are determined, ultimately allowing for the correction of the target camera's pose. In practice, by acquiring the transformation relationship between the camera coordinate system and the image coordinate system beforehand, the calculation of the vanishing point information is based on this transformation relationship. This allows the parameters to reflect road bumps, slopes, and other factors, improving the accuracy of the pitch angle calculation and thus enhancing the camera pose correction effect. Attached Figure Description
[0054] Figure 1This is a schematic diagram of the first process of a camera pose correction method in one embodiment;
[0055] Figure 2 This is a schematic diagram of the second process of a camera pose correction method in another embodiment;
[0056] Figure 3 This is a schematic diagram of the third process of a camera pose correction method in another embodiment;
[0057] Figure 4 This is a schematic diagram of the fourth process of a camera pose correction method in another embodiment;
[0058] Figure 5 This is a schematic diagram illustrating the geometric relationship between monitoring coordinates and imaging coordinates in one embodiment;
[0059] Figure 6 This is a schematic diagram of the fifth step of a camera pose correction method in another embodiment;
[0060] Figure 7 This is a schematic diagram illustrating the geometric relationship of lane width in one embodiment;
[0061] Figure 8 This is a schematic diagram illustrating the geometric relationship of the pitch angle in one embodiment;
[0062] Figure 9 This is a schematic diagram of the sixth process of a camera pose correction method in another embodiment;
[0063] Figure 10 This is a structural block diagram of a camera pose correction device in one embodiment;
[0064] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] In related technologies, multiple sampling levels are typically set in the process of correcting the camera pitch angle. Each sampling level corresponds to different coordinate values of the lane line in the X direction. The vanishing point between each pair of adjacent lane lines is calculated at each sampling level, and a set of vanishing points is formed. Finally, the final vanishing point is selected from the set of vanishing points through processing such as median filtering, and the corresponding pitch angle is calculated based on the final vanishing point.
[0067] However, current methods for correcting camera pitch angles have the following technical problems:
[0068] Existing solutions can correct pitch angles on flat roads, but when special driving conditions occur, such as vehicle bumps, rapid acceleration, or changes in road slope, it is difficult to accurately calculate the vanishing point of the lane lines, resulting in inaccurate pitch angle correction results.
[0069] In one embodiment, such as Figure 1 As shown, a camera pose correction method is provided. This embodiment uses the application of this method to a terminal as an example for illustration. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.
[0070] In this embodiment, the method includes the following steps:
[0071] Step 102: Obtain target image information, environmental monitoring information, and camera intrinsic parameters of the target camera. The environmental monitoring information includes the monitoring coordinates of lane line sampling points.
[0072] Specifically, target image information refers to image information collected by the vehicle from the environment in a specific direction using visual sensors. This can be presented as an image, and the sampling points in the target image can be positioned based on the image coordinate system. Environmental monitoring information refers to environmental information acquired by the vehicle within its perception range using other types of sensors. This information can include the perceived position information of a specific sampling point in the environment, and the perceived position can be determined based on the camera coordinate system. Camera intrinsic parameters refer to fixed parameters set in the vehicle-mounted camera, such as the camera's focal length.
[0073] For example, the terminal can acquire the target image information, environmental monitoring information, and camera intrinsic parameters required for analysis and processing, respectively.
[0074] Step 104: Based on the target image information, obtain the imaging coordinates of the lane line sampling point on the target image, and determine the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates.
[0075] Lane lines refer to the markings on the road used to guide and restrict the movement of vehicles. In autonomous driving, lane lines need to be detected in order to achieve dynamic control of the vehicle body. During the detection, lane line sampling points can be selected on the perceived lane lines according to preset sampling rules, and lane line detection is carried out based on the lane line sampling points.
[0076] For example, the terminal can analyze and process the target image information to obtain the imaging coordinates of the lane line sampling points on the target image, where the imaging coordinates are based on the image coordinate system. The terminal can also obtain the monitoring coordinates of the lane line sampling points in the environmental monitoring information, where the monitoring coordinates are based on the camera coordinate system. Due to the camera's focal length, there is an offset between the camera coordinate system and the image coordinate system based on the focal length. Furthermore, since the road surface is rarely perfectly smooth and the vehicle body is rarely perfectly parallel to the lane lines, there is a difference between the imaging coordinates and the monitoring coordinates of the lane line sampling points. By obtaining the imaging coordinates and the monitoring coordinates separately, the transformation relationship of the coordinates of the same lane line sampling point in the two coordinate systems can be obtained.
[0077] Step 106: Determine the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information.
[0078] The vanishing point can refer to the intersection of parallel lines in the three-dimensional space of the vehicle, and in this embodiment, it can refer to the intersection of lane lines.
[0079] For example, after determining the transformation relationship of the lane line sampling points in two coordinate systems, the obtained transformation relationship can be used to determine the vanishing point information of the lane line in the target image based on the mathematical relationship of the data obtained from environmental monitoring information and target image information.
[0080] Step 108: Determine the pitch angle parameters of the target camera based on the vanishing point information, and correct the pose of the target camera according to the pitch angle parameters.
[0081] Among them, pitch angle can refer to the angle between the ground and the vector parallel to the vehicle axis and pointing forward of the vehicle, and pitch angle parameter can refer to the parameter used to describe the vehicle pitch angle.
[0082] For example, after obtaining the vanishing point information, the terminal can obtain the camera's pitch angle parameters based on the mathematical relationship between the vanishing point and the pitch angle. In this way, the terminal can correct the pose of the target camera based on the pitch angle parameters.
[0083] The above-described camera pose correction method, when reasonably derived in conjunction with the technical features in the embodiments, can achieve the beneficial effect of solving the technical problems raised in the background art:
[0084] In processing the camera pitch angle parameters, the system first acquires data obtainable from vehicle-mounted sensors, such as target image information and environmental monitoring information, as well as camera intrinsic parameters from the vehicle's own cameras. Then, based on the target image information, the imaging coordinates of the lane line sampling points are obtained. Using the camera intrinsic parameters, imaging coordinates, and monitoring coordinates, the transformation relationship between the monitoring and imaging coordinates is derived. After obtaining the transformation relationship between the two coordinate systems, the vanishing point information can be calculated. Based on this vanishing point information, the pitch angle parameters are determined, ultimately allowing for the correction of the target camera's pose. In practice, by acquiring the transformation relationship between the camera coordinate system and the image coordinate system beforehand, the calculation of the vanishing point information is based on this transformation relationship. This allows the parameters to reflect road bumps, slopes, and other factors, improving the accuracy of the pitch angle calculation and thus enhancing the camera pose correction effect.
[0085] In one embodiment, such as Figure 2 As shown, step 108 includes:
[0086] Step 202: Obtain several first pitch angle parameters corresponding to different lane lines;
[0087] For example, the terminal can obtain multiple first pitch angle parameters by using multiple different lane lines as references.
[0088] Step 204: Determine the pitch angle parameters used to achieve pose correction based on a plurality of the first pitch angle parameters.
[0089] For example, the terminal can determine the final pitch angle parameter used to achieve pose correction from multiple different first pitch angle parameters.
[0090] In this embodiment, in a multi-lane scenario, information from multiple lanes is referenced simultaneously to obtain multiple different first pitch angle parameters. The final pitch angle parameter is determined based on these multiple first pitch angle parameters, which helps to improve the effectiveness of the pitch angle parameter.
[0091] In one embodiment, such as Figure 3 As shown, step 204 includes:
[0092] Step 302: Based on a preset median filtering algorithm, several first pitch angle parameters are fused to obtain the pitch angle parameters.
[0093] Median filtering can refer to an algorithm that obtains a specific set of data from the median of multiple sets of data. The median filtering algorithm can be used as a data fusion algorithm that combines multiple objects into one object.
[0094] In this embodiment, the pitch angle calculation results of multiple lanes are fused by the median filtering algorithm, which helps to improve the accuracy of the pitch angle parameters.
[0095] In one embodiment, such as Figure 4 As shown, step 104 includes:
[0096] Step 402: Obtain the first vector from the target camera to the monitoring coordinate point based on the environmental monitoring information.
[0097] For example, it can be as follows Figure 5 As shown, the terminal can obtain the first vector from the target camera to the monitoring coordinate point based on environmental monitoring information. For example, the camera origin can be set as A, and the monitoring coordinate points of the paired lane line sampling points can be set as B and C to obtain the first vector.
[0098] Step 404: Determine the focal length parameter of the target camera based on the camera intrinsic parameters, and determine the second vector from the target camera to the imaging coordinate point based on the focal length parameter.
[0099] For example, the terminal can determine the focal length parameter f of the target camera based on the camera's intrinsic parameters. In this way, the terminal can determine a second vector from the camera origin of the target camera to the imaging coordinate points based on the focal length parameter. For instance, the second vector can be obtained by taking the camera origin as A and the imaging coordinate points of the paired lane line sampling points as B′ and C′.
[0100] Step 406: Obtain the first scaling factor between the first vector and the second vector, and determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor.
[0101] For example, the terminal can set the scaling factors between the first vector and the second vector to be m and n. Based on the mathematical relationship between the first vector and the second vector, the transformation relationship between the monitoring coordinates and the imaging coordinates can be determined, as shown in the following formula:
[0102]
[0103]
[0104] Where f can represent the focal length of the camera, the coordinates of B′ can be (x2, y2, f), and the coordinates of C′ can be (x1, y1, f).
[0105] In this embodiment, by solving the mathematical relationship between the first vector and the second vector, the scaling factor between the monitoring coordinates and the imaging coordinates can be obtained.
[0106] In one embodiment, it can be as follows Figure 6 As shown, step 106 may include:
[0107] Step 602: Construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and obtain the projection point parameters of the third vector in the target image.
[0108] For example, it can be as follows Figure 7 As shown, the terminal can construct a third vector with the camera coordinate system as the origin and parallel to the lane line, thereby obtaining the projection point parameters of the third vector in the target image. For example, the camera origin can be set as O, and the third vector can be... The projection point is VP.
[0109] Step 604: Determine the width of the imaging lane line in the target image based on the two imaging coordinates, and obtain the actual lane line width based on the transformation relationship.
[0110] For example, the terminal can determine the width of the imaged lane line in the target image based on two imaging coordinates, and obtain the actual lane line width according to a transformation relationship. For instance, the actual lane line width can be W, or it can be a vector. The magnitude of the vector The angle α between the vehicle and the imaging plane xoy can be the vehicle's yaw angle, as shown in the following formula:
[0111]
[0112] Furthermore, the width of the imaging lane line can be w, and the projection point parameters can be expressed as follows:
[0113]
[0114] Where dy can be the distance from the vanishing point VP to the midpoint of vector B′C′, and CamH can be the distance from point P to the midpoint of vector BC, which is also the camera's mounting height.
[0115] Step 606: Determine the vanishing point information based on the second proportionality coefficient between the imaged lane width and the actual lane width.
[0116] For example, the terminal can determine the vanishing point information based on a second scaling factor between the imaged lane width and the actual lane width. This second scaling factor can be a trigonometric function. The coordinates of the vanishing point VP can be... Where the coordinate point (pt) x ,pt y () is the midpoint of B′C′.
[0117] Accordingly, as shown in Figure 8, the pitch angle parameters can be expressed as follows:
[0118]
[0119]
[0120] Where, c(c x ,c y ) can represent the coordinates of the center point of the image, and pitch and yaw can represent the angles shown in the image, respectively.
[0121] In one embodiment, such as Figure 9 As shown, step 604 may include:
[0122] Step 902: Obtain the yaw angle parameters of the target camera based on the environmental monitoring information.
[0123] Step 904: Determine the actual lane width based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
[0124] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0125] Based on the same inventive concept, this application also provides a camera pose correction device for implementing the camera pose correction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more embodiments of the camera pose correction device provided below can be found in the limitations of the camera pose correction method described above, and will not be repeated here.
[0126] In one embodiment, such as Figure 10 As shown, a camera pose correction device is provided, including: a data acquisition module, a transformation relationship module, a vanishing point calculation module, and a pose correction module, wherein:
[0127] The data acquisition module is used to acquire target image information, environmental monitoring information, and camera intrinsic parameters of the target camera. The environmental monitoring information includes the monitoring coordinates of lane line sampling points.
[0128] The conversion relationship module is used to obtain the imaging coordinates of the lane line sampling point on the target image based on the target image information, and to determine the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates.
[0129] The vanishing point calculation module is used to determine the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information.
[0130] The pose correction module is used to determine the pitch angle parameters of the target camera based on the vanishing point information, and to correct the pose of the target camera according to the pitch angle parameters.
[0131] In one embodiment, the pose correction module includes:
[0132] The first pitch angle parameter module is used to obtain several first pitch angle parameters corresponding to different lane lines;
[0133] A multi-parameter fusion module is used to determine the pitch angle parameters used to achieve pose correction based on several first pitch angle parameters.
[0134] In one embodiment, the multi-parameter fusion module includes:
[0135] The parameter fusion module is used to fuse several first pitch angle parameters based on a preset median filtering algorithm to obtain the pitch angle parameters.
[0136] In one embodiment, the conversion relationship module includes:
[0137] The first vector module is used to obtain a first vector from the target camera to the monitoring coordinate point based on the environmental monitoring information;
[0138] The second vector module is used to determine the focal length parameter of the target camera based on the camera intrinsic parameters, and to determine the second vector from the target camera to the imaging coordinate point based on the focal length parameter.
[0139] The scaling factor module is used to obtain a first scaling factor between the first vector and the second vector, and to determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor.
[0140] In one embodiment, the vanishing point calculation module includes:
[0141] The third vector module is used to construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and to obtain the projection point parameters of the third vector in the target image.
[0142] The real lane line width module is used to determine the imaging lane line width in the target image based on the two imaging coordinates, and to obtain the real lane line width based on the transformation relationship.
[0143] The second scaling factor module is used to determine the vanishing point information based on a second scaling factor between the imaged lane width and the actual lane width.
[0144] In one embodiment, the actual lane line width module includes:
[0145] The yaw angle parameter module is used to obtain the yaw angle parameters of the target camera based on the environmental monitoring information.
[0146] The trigonometric function relationship module is used to determine the actual lane width based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
[0147] The various modules in the aforementioned camera pose correction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0148] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a camera pose correction method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0149] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0150] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0151] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0152] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0153] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0154] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0155] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0156] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A camera pose correction method, characterized in that, The method includes: Acquire target image information, environmental monitoring information, and camera intrinsic parameters of the target camera, wherein the environmental monitoring information includes the monitoring coordinates of lane line sampling points; Based on the target image information, the imaging coordinates of the lane line sampling point on the target image are obtained, and the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point is determined according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates. Based on the transformation relationship, the environmental monitoring information, and the target image information, determine the vanishing point information corresponding to the lane lines in the target image; The pitch angle parameters of the target camera are determined based on the vanishing point information, and the pose of the target camera is corrected according to the pitch angle parameters. The step of obtaining the imaging coordinates of the lane line sampling points on the target image based on the target image information, and determining the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling points according to the camera intrinsic parameters, the imaging coordinates, and the monitoring coordinates includes: Based on the environmental monitoring information, obtain the first vector from the target camera to the monitoring coordinate point; The focal length parameter of the target camera is determined based on the camera intrinsic parameters, and a second vector from the target camera to the imaging coordinate point is determined based on the focal length parameter. Obtain a first scaling factor between the first vector and the second vector, and determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor; The step of determining the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information includes: Construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and obtain the projection point parameters of the third vector in the target image; The width of the imaging lane line in the target image is determined based on the two imaging coordinates, and the actual lane line width is obtained based on the transformation relationship. The vanishing point information is determined based on a second proportionality coefficient between the imaged lane width and the actual lane width. The step of determining the width of the imaging lane line in the target image based on the two imaging coordinates, and obtaining the actual lane line width based on the transformation relationship, includes: The yaw angle parameters of the target camera are obtained based on the environmental monitoring information. The actual lane width is determined based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
2. The method according to claim 1, characterized in that, The step of determining the pitch angle parameters of the target camera based on the vanishing point information, and correcting the pose of the target camera according to the pitch angle parameters, includes: Obtain several first pitch angle parameters corresponding to different lane lines; The pitch angle parameters used to achieve pose correction are determined based on a plurality of the first pitch angle parameters.
3. The method according to claim 2, characterized in that, The step of determining the pitch angle parameters used for pose correction based on a plurality of first pitch angle parameters includes: Based on a preset median filtering algorithm, several first pitch angle parameters are fused to obtain the pitch angle parameters.
4. A camera pose correction device, characterized in that, The device includes: The data acquisition module is used to acquire target image information, environmental monitoring information, and camera intrinsic parameters of the target camera. The environmental monitoring information includes the monitoring coordinates of lane line sampling points. The conversion relationship module is used to obtain the imaging coordinates of the lane line sampling point on the target image based on the target image information, and to determine the conversion relationship between the monitoring coordinates and the imaging coordinates of the lane line sampling point according to the camera intrinsic parameters, the imaging coordinates and the monitoring coordinates. The vanishing point calculation module is used to determine the vanishing point information corresponding to the lane lines in the target image based on the transformation relationship, the environmental monitoring information, and the target image information. The pose correction module is used to determine the pitch angle parameters of the target camera based on the vanishing point information, and to correct the pose of the target camera according to the pitch angle parameters. The conversion relationship module includes: The first vector module is used to obtain a first vector from the target camera to the monitoring coordinate point based on the environmental monitoring information; The second vector module is used to determine the focal length parameter of the target camera based on the camera intrinsic parameters, and to determine the second vector from the target camera to the imaging coordinate point based on the focal length parameter. The scaling factor module is used to obtain a first scaling factor between the first vector and the second vector, and to determine the transformation relationship between the monitoring coordinates and the imaging coordinates based on the first scaling factor. The vanishing point calculation module includes: The third vector module is used to construct a third vector with the camera coordinate system as the origin and parallel to the lane line, and to obtain the projection point parameters of the third vector in the target image. The real lane line width module is used to determine the imaging lane line width in the target image based on the two imaging coordinates, and to obtain the real lane line width based on the transformation relationship. The second scaling factor module is used to determine the vanishing point information based on a second scaling factor between the imaged lane line width and the actual lane line width. The actual lane line width module includes: The yaw angle parameter module is used to obtain the yaw angle parameters of the target camera based on the environmental monitoring information. The trigonometric function relationship module is used to determine the actual lane width based on the trigonometric function relationship between the fourth vector between the two monitoring coordinate points and the camera coordinate system.
5. The camera pose correction device according to claim 4, characterized in that, The pose correction module includes: The first pitch angle parameter module is used to obtain several first pitch angle parameters corresponding to different lane lines; A multi-parameter fusion module is used to determine the pitch angle parameters used to achieve pose correction based on several first pitch angle parameters.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.