A method, device and equipment for calibrating external parameters of a vehicle-mounted front-view camera
By calculating the average value of the effective vanishing point of the vehicle front view camera in multiple time periods and judging its distance, solving the external parameters based on these average values, the cumbersome problem of external parameters calibration of the vehicle front view camera in the prior art is solved, and a simple and efficient external parameter calibration process is realized.
Patent Information
- Application Number
- CN202111406817.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The external parameter calibration method of existing vehicle-mounted front-view cameras is cumbersome, making it difficult to achieve simple and efficient external parameter calibration.
By obtaining the driving parameters of the vehicle under test in a number of consecutive first preset time periods, the average value of the effective vanishing point is calculated, and whether the average distance of the vanishing point in the adjacent time period is less than the preset threshold value, if it is less, the external parameters are solved based on these average values.
The simple and efficient process of calibration of external parameters of the vehicle front-view camera is realized, and the calculation process is more concise than that of the existing technical solutions.
Smart Images

Figure CN114092567B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera calibration and ranging, and in particular to a method, device and equipment for calibrating extrinsic parameters of a vehicle-mounted forward-looking camera. Background Art
[0002] Camera calibration is an important prerequisite for accurate distance measurement and positioning in computer vision. Camera calibration includes camera extrinsic parameters and camera intrinsic parameters. Camera intrinsic parameters are determined by the properties of the camera itself, while camera extrinsic parameters are determined by the camera installation position and angle. The connection between the vehicle coordinate system and the camera coordinate system is established through extrinsic parameter calibration.
[0003] Existing on-vehicle forward-looking cameras are generally calibrated using calibration objects, such as a chessboard or a cross point, etc., and some are calibrated using parallel lane lines. The calibration method and process are relatively complicated. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method, device and equipment for calibrating extrinsic parameters of a vehicle-mounted forward-looking camera, so as to provide a simple camera extrinsic parameter calibration solution.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A method for calibrating external parameters of a vehicle-mounted front-view camera, comprising:
[0007] Acquiring driving parameters of the tested vehicle within a plurality of consecutive first preset time periods;
[0008] Calculating an average value of the effective vanishing points within each of the first preset time periods;
[0009] Determine whether the distance between the average values of two adjacent valid vanishing points in the first preset time period is less than a preset threshold;
[0010] If it is less than a preset threshold, the external parameter is solved based on the average value of the two effective vanishing points in the first preset time period.
[0011] Optionally, in the above-mentioned vehicle-mounted front-view camera external parameter calibration method, before obtaining the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods, the method further includes:
[0012] Obtaining the driving data of the vehicle within a preset driving time;
[0013] It is determined whether the driving data within the preset driving time meets the preset calibration condition, and when the preset calibration condition is met, the execution continues.
[0014] Optionally, in the above-mentioned vehicle-mounted front-view camera extrinsic calibration method, the preset calibration conditions include:
[0015] The vehicle does not change lanes within the preset driving time, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion.
[0016] Optionally, in the above-mentioned vehicle-mounted front-view camera extrinsic parameter calibration method, after obtaining the driving parameters of the tested vehicle in a plurality of consecutive first preset time periods and before calculating the average value of the effective vanishing points in each of the first preset time periods, the method further includes:
[0017] Determining whether the driving parameters within the first preset time period meet preset calibration conditions;
[0018] If the preset calibration condition is met, the execution continues; otherwise, the driving parameters of the tested vehicle within the next first preset time period are obtained.
[0019] Optionally, in the above-mentioned vehicle-mounted front-view camera extrinsic parameter calibration method, solving the extrinsic parameter based on the average value of the two effective vanishing points within the first preset time period includes:
[0020] Recording an average value of valid vanishing points within a first preset time period as a first average value;
[0021] Recording the average value of the valid vanishing points in another first preset time period as a second average value;
[0022] calculating an average of the first average value and the second average value;
[0023] Get the camera intrinsic parameter matrix and camera coordinates;
[0024] The camera pitch angle is calculated based on the camera intrinsic parameter matrix and the average of two valid vanishing points;
[0025] The camera yaw angle is calculated based on the camera intrinsic parameter matrix and the average of two valid vanishing points;
[0026] The camera roll angle is recorded as 0;
[0027] The rotation matrix of the camera is calculated based on the camera pitch angle, the camera yaw angle and the camera roll angle;
[0028] The camera translation matrix is calculated based on the rotation matrix and the camera coordinates.
[0029] Optionally, the above-mentioned vehicle-mounted front-view camera extrinsic calibration method further includes:
[0030] When the distance between the average values of two adjacent valid vanishing points in the first preset time period is not less than a preset threshold, the counter is incremented by 1;
[0031] When the value of the counter is greater than a preset calibration value, a prompt message indicating that the calibration has failed is output.
[0032] A vehicle-mounted front-view camera extrinsic parameter calibration device, comprising:
[0033] The driving parameter acquisition unit is used to obtain the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods:
[0034] an effective vanishing point processing unit, configured to calculate an average value of effective vanishing points in each of the first preset time periods, and determine whether a distance between the average values of effective vanishing points in two adjacent first preset time periods is less than a preset threshold;
[0035] The extrinsic parameter calculation unit is used to solve the extrinsic parameter based on the average values of two adjacent effective vanishing points in the first preset time period when the distance between the average values of the two adjacent effective vanishing points is less than a preset threshold.
[0036] Optionally, the above-mentioned vehicle-mounted front-view camera extrinsic calibration device further includes:
[0037] The condition judgment unit is used to obtain the driving data of the vehicle within a preset driving time before obtaining the driving parameters of the tested vehicle within multiple consecutive first preset time periods; judge whether the driving data within the preset driving time meets the preset calibration conditions, and when the preset calibration conditions are met, trigger the driving parameter collection unit to continue execution.
[0038] Optionally, in the above-mentioned vehicle-mounted forward-view camera extrinsic parameter calibration device, the preset calibration conditions include:
[0039] The vehicle does not change lanes within the preset driving time, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion.
[0040] A vehicle-mounted forward-view camera extrinsic calibration device comprises: a memory and a processor; the memory stores a program suitable for execution by the processor, the program being used to:
[0041] Acquiring driving parameters of the tested vehicle within a plurality of consecutive first preset time periods;
[0042] Calculating an average value of the effective vanishing points within each of the first preset time periods;
[0043] Determine whether the distance between the average values of two adjacent valid vanishing points in the first preset time period is less than a preset threshold;
[0044] If it is less than the preset threshold, the extrinsic parameter is solved based on the average value of the two valid vanishing points.
[0045] Based on the above technical scheme, in the above scheme provided by the embodiment of the present invention, the present application provides a method, device and equipment for calibrating the external parameters of a vehicle-mounted forward-looking camera. The calibration process includes: first, obtaining the driving parameters of the vehicle under test in multiple consecutive first preset time periods; then calculating the average value of the effective vanishing points in each of the first preset time periods; then judging whether the distance between the average values of the effective vanishing points in two adjacent first preset time periods is less than a preset threshold; if it is less than the preset threshold, then finally solving the external parameters based on the average values of the effective vanishing points in the two first preset time periods. The present application adopts the vanishing point method to solve the camera external parameters. Compared with the existing technical scheme, the calculation process is simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart of an extrinsic parameter calibration method for a vehicle-mounted front-view camera disclosed in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a process for solving external parameters disclosed in an embodiment of the present application;
[0049] Figure 3 This is a schematic diagram of the ID naming rules for each lane line on the test road;
[0050] Figure 4 It is a structural schematic diagram of the extrinsic parameter calibration device for a vehicle-mounted forward-looking camera disclosed in an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of the structure of the vehicle-mounted forward-looking camera extrinsic calibration device disclosed in the embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In order to more specifically emphasize the independence of implementation, this specification involves many modules or units. For example, a module or unit can be implemented by a hardware circuit, which includes a special VLSI circuit or gate array, such as a logic chip, a transistor, or other components. The module or unit can also be implemented in a programmable hardware device, such as a field-effect programmable gate array, a programmable array logic, a programmable logic device, and the like.
[0054] Modules or units may also be implemented in software executed by various forms of processors. For example, an executable code module may include one or more physical or logical blocks of computer instructions, which may be formed, for example, as objects, procedures or functions. However, the executable portions of the identified modules or units need not be physically located together, but may be composed of different instructions stored in different locations, which, when logically combined together, form the module or unit and achieve the desired purpose of the module or unit.
[0055] In practice, an executable code module or unit may be a single instruction or multiple instructions, and may even be distributed over several different code segments located in different programs and across several storage devices. Similarly, operational data may be identified and displayed in such a module or unit, and may be implemented in any suitable form and organized in any suitable data structure form. The operational data may be aggregated into a single data set, or may be distributed over different locations with different storage devices, and may exist at least partially only in the form of electronic signals in a system or network.
[0056] The "embodiment" or similar terms mentioned in this specification indicate that the characteristics, structures or features related to the embodiment are included in at least one embodiment of the present invention. Therefore, the terms "in one embodiment", "in an embodiment" and similar terms appearing in this specification may but not necessarily refer to the same embodiment.
[0057] Furthermore, the characteristics, structures or features of the present invention may be combined in any manner in one or more embodiments. The following description will provide many specific details, such as programming, software modules, user selections, network transactions, database queries, database structures, hardware modules, hardware circuits, hardware chips, etc., to provide an understanding of the embodiments of the present invention. However, a person of ordinary skill in the relevant art will see that the present invention can be implemented without using one or more of the specific details, or using other methods, components, materials, etc. On the other hand, in order to avoid confusing the present invention, known structures, materials or operations are not described in detail.
[0058] In order to provide a simple calibration method for the extrinsic parameters of a vehicle-mounted forward-looking camera, the present application adopts a vanishing point method to solve the camera extrinsic parameters. Compared with the existing technical solutions, the calculation process is simple.
[0059] See also Figure 1 The vehicle-mounted forward-looking camera extrinsic calibration method disclosed in the embodiment of the present application may include: steps S101-S105.
[0060] Step S101: Acquire driving parameters of the tested vehicle within a plurality of consecutive first preset time periods.
[0061] During the calibration process of this solution, the vehicle needs to travel on a straight test road with clear lane lines. The length of the road can be selected based on user needs. For example, the length of the road is not less than 500 meters.
[0062] The driving parameters at least include coordinate values of each vanishing point during the driving process.
[0063] During the calibration process, the vehicle travels on the test road, and the driving process is divided into a plurality of continuous first preset time periods. For example, the vehicle travels for 5 minutes, and each minute is regarded as a first preset time period. The driving parameters of the vehicle under test within 5 consecutive 1-minute periods can be obtained.
[0064] Step S102: calculating the average value of the effective vanishing points in each of the first preset time periods.
[0065] In this step, the coordinate values of the effective vanishing points in each of the first preset time periods are calculated. After the coordinate values of the effective vanishing points in the first preset time period are obtained, the average value of the coordinates of the vanishing points in the first preset time period is obtained.
[0066] Step S103: determining whether the distance between the average values of two adjacent effective vanishing points in the first preset time period is less than a preset threshold; if so, executing step S104.
[0067] An average value of valid vanishing points in two adjacent first preset time periods is obtained, and it is determined whether a distance between the two average values is less than a preset threshold value, where the preset threshold value is a pre-calibrated threshold value. If the distance between the two average values is less than the threshold value, it indicates that the two vanishing points meet the calibration requirement; otherwise, it indicates that the two vanishing points do not meet the calibration requirement. The average value of the vanishing points in the next first preset time period and the average value of the vanishing points in the next first preset time period are continuously measured to determine whether the distance between the average value of the vanishing points in the next first preset time period is less than the preset threshold value.
[0068] Step S104: if it is less than the preset threshold, solving the external parameter based on the average value of the two valid vanishing points in the first preset time period.
[0069] When the distance between the average values of the vanishing points in two adjacent first preset time periods is less than a preset threshold, the extrinsic parameter is solved based on the average values of the vanishing points in the two first preset time periods.
[0070] In this solution, after the external parameter calibration is completed, an external parameter result verification diagram is output. Based on the verification diagram, it is possible to intuitively observe whether the calibration result is correct.
[0071] For details, see Figure 2 , the process of solving the external parameters is as follows:
[0072] Step S201: record the average value of valid vanishing points in a first preset time period as a first average value; record the average value of valid vanishing points in another first preset time period as a second average value; and calculate the average value of the first average value and the second average value.
[0073] In this step, the average of the first average value and the second average value is recorded as (v x , v y ).
[0074] Step S202: Obtain the camera intrinsic parameter matrix and camera coordinates.
[0075] The camera intrinsic parameter matrix is The camera coordinates are (X, Y, Z).
[0076] Step S203: Calculate the camera pitch angle based on the camera intrinsic parameter matrix and the average of two valid vanishing points.
[0077] Based on the formula Calculate the camera pitch angle.
[0078] Step S204: Calculate the camera yaw angle based on the camera intrinsic parameter matrix and the average of two valid vanishing points.
[0079] Based on the formula Calculate the camera yaw angle.
[0080] Step S205: the camera roll angle is recorded as 0.
[0081] Step S206: Calculate the rotation matrix of the camera based on the camera pitch angle, camera yaw angle and camera roll angle.
[0082] In this step, the rotation matrix R of the camera is recorded as:
[0083]
[0084] Step S207: Calculate the camera translation matrix based on the rotation matrix and the camera coordinates.
[0085] Based on the formula The translation matrix t of the camera is calculated.
[0086] Among them, the rotation matrix R and translation matrix t of the camera are the external parameters of the camera.
[0087] In the technical solution disclosed in another embodiment of the present application, it is considered that during the calibration process, the vehicle changing lanes will affect the calibration result of the camera heading angle. If the lane change occurs, the external parameter calibration result will be affected. Therefore, in this solution, before obtaining the driving parameters of the tested vehicle in a plurality of consecutive first preset time periods, it also includes:
[0088] Step S301: Acquire the driving data of the vehicle within a preset driving time.
[0089] In this solution, before formally calibrating the external parameters, the vehicle is controlled to travel on the test road for a preset driving time, and driving data within the preset driving time is obtained.
[0090] Step S302: Determine whether the driving data within the preset driving time meets the preset calibration conditions, and continue to execute when the preset calibration conditions are met.
[0091] In this step, it is determined whether the driving parameters meet the preset calibration conditions. If the preset calibration conditions are met, it indicates that the calibration can continue to be performed. Otherwise, the vehicle is controlled to travel for a preset time and then the determination is made again.
[0092] The preset calibration conditions may specifically be:
[0093] The vehicle does not change lanes during driving, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion, wherein the values of the first preset proportion and the second preset proportion can be set according to user needs. For example, in this solution, the first preset proportion and the second preset proportion are both 90%.
[0094] The vehicle's lane change will affect the calibration result of the camera heading angle. If a lane change occurs, the output data of the lane line model can be used to determine whether the vehicle has changed lanes during driving. When the vehicle changes lanes, the lane line model will output the middle-line result. The built-in program determines whether the vehicle has changed lanes during driving by whether there is a middle-line. The naming rules of the lane line IDs on the test road can be found in Figure 3 .
[0095] In this scheme, the IDs output by the lane line model include next-left (the left lane line of the left adjacent lane), host-left (the left lane line of the main lane), host-right (the right lane line of the main lane) and next-right (the right lane line of the right adjacent lane). Considering that the blind spots of next-left and next-right are large, the calculation results are less accurate, while the blind spots of host-left and host-right are small, this method only uses the segmentation results of host-left and host-right, that is, during the test, the vehicle needs to keep driving between host-left and host-right.
[0096] In a technical solution disclosed in another embodiment, in order to eliminate the influence of curve and ramp scenes on the camera extrinsic parameter calibration, before calculating the vanishing point, the straight line loss function is used to determine whether the lane line output by the lane line model is a straight line. If it is a straight line, the calibration continues.
[0097] In this solution, initialization is required before external parameter calibration. During initialization, the original external parameter file is used, or the camera coordinates are entered. The camera coordinates are x, y, and z relative to the origin of the vehicle coordinate system. Automatic calibration parameters also need to be set: effective vehicle speed range v1~v2, automatic calibration judgment time T1 (i.e. the preset form time mentioned above), and vehicle driving time T2 (i.e. the first preset time period mentioned above). Since sudden acceleration and deceleration will affect the camera pitch angle, the effective vehicle speed v1~v2 is set to exclude this scene. Of course, the scene can also be excluded by setting the vehicle acceleration threshold. The effective vehicle speed setting range should not be too large.
[0098] In the technical solution disclosed in another embodiment of the present application, in order to ensure the reliability of the maintenance results, the driving parameters within each first preset time period can also be judged to determine whether the driving process of the vehicle within each first preset time period meets the above-mentioned preset calibration conditions. If the above-mentioned preset calibration conditions are met, the driving parameters within the first preset time period are retained; otherwise, the driving parameters within the first preset time period are discarded.
[0099] In another embodiment of the present application, if it is detected that the distance between the average values of two consecutive valid vanishing points in the first preset time period is not less than a preset threshold, it indicates that the test result is unreliable and the test is stopped. That is, the above method also includes: when it is detected that the distance between the average values of two adjacent valid vanishing points in the first preset time period is not less than the preset threshold, the counter is increased by 1; when the value of the counter is greater than a preset calibration value (for example, the preset calibration value can be 3), a prompt message for indicating calibration failure is output.
[0100] This embodiment discloses an extrinsic parameter calibration device for a vehicle-mounted forward-looking camera. For the specific working contents of each unit in the device, please refer to the contents of the above method embodiment.
[0101] The following is a description of an extrinsic parameter calibration device for a vehicle-mounted forward-looking camera provided in an embodiment of the present invention. The extrinsic parameter calibration device for a vehicle-mounted forward-looking camera described below and the extrinsic parameter calibration method for a vehicle-mounted forward-looking camera described above can be referenced to each other.
[0102] For details, see Figure 4 The vehicle-mounted forward-looking camera extrinsic parameter calibration device may include: a driving parameter acquisition unit A, an effective vanishing point processing unit B, and an extrinsic parameter calculation unit C.
[0103] The driving parameter acquisition unit A corresponds to step S101 in the above method and is used to obtain the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods:
[0104] an effective vanishing point processing unit B, corresponding to steps S102-S103 in the above method, for calculating an average value of effective vanishing points in each of the first preset time periods, and determining whether a distance between the average values of effective vanishing points in two adjacent first preset time periods is less than a preset threshold;
[0105] The external parameter calculation unit C corresponds to step S104 in the above method, and is used to solve the external parameter based on the average values of two adjacent effective vanishing points in the first preset time period when the distance between the average values of the two adjacent effective vanishing points in the first preset time period is less than a preset threshold.
[0106] Corresponding to the above method, the above device also includes: a condition judgment unit, which is used to obtain the driving data of the vehicle within a preset driving time before obtaining the driving parameters of the vehicle under test within multiple consecutive first preset time periods, or before calculating the average value of the effective vanishing points in each of the first preset time periods; judge whether the driving data within the preset driving time meets the preset calibration conditions, and when the preset calibration conditions are met, trigger the driving parameter collection unit to continue execution.
[0107] Corresponding to the above method, the preset calibration conditions include:
[0108] The vehicle does not change lanes within the preset driving time, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion.
[0109] Corresponding to the above method, when solving the external parameter based on the average value of the two effective vanishing points, the external parameter calculation unit is specifically used to:
[0110] Recording an average value of valid vanishing points within a first preset time period as a first average value;
[0111] Recording the average value of the valid vanishing points in another first preset time period as a second average value;
[0112] calculating an average of the first average value and the second average value;
[0113] Get the camera intrinsic parameter matrix and camera coordinates;
[0114] The camera pitch angle is calculated based on the camera intrinsic parameter matrix and the average of two valid vanishing points;
[0115] The camera yaw angle is calculated based on the camera intrinsic parameter matrix and the average of two valid vanishing points;
[0116] The camera roll angle is recorded as 0;
[0117] The rotation matrix of the camera is calculated based on the camera pitch angle, the camera yaw angle and the camera roll angle;
[0118] The camera translation matrix is calculated based on the rotation matrix and the camera coordinates.
[0119] Figure 5 For a hardware structure diagram of the server provided in the embodiment of the present invention, see Figure 5 As shown, it may include: at least one processor 100, at least one communication interface 200, at least one memory 300 and at least one communication bus 400;
[0120] In the embodiment of the present invention, the number of the processor 100, the communication interface 200, the memory 300, and the communication bus 400 is at least one, and the processor 100, the communication interface 200, and the memory 300 communicate with each other through the communication bus 400; obviously, Figure 5 The communication connections shown for the processor 100, the communication interface 200, the memory 300, and the communication bus 400 are merely optional;
[0121] Optionally, the communication interface 200 may be an interface of a communication module, such as an interface of a GSM module;
[0122] The processor 100 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0123] The memory 300 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0124] The processor 100 is specifically configured to:
[0125] Acquiring driving parameters of the tested vehicle within a plurality of consecutive first preset time periods;
[0126] Calculating an average value of the effective vanishing points within each of the first preset time periods;
[0127] Determine whether the distance between the average values of two adjacent valid vanishing points in the first preset time period is less than a preset threshold;
[0128] If it is less than the preset threshold, the extrinsic parameter is solved based on the average value of the two valid vanishing points.
[0129] For the convenience of description, the above system is described by dividing the functions into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0131] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0132] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0133] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0134] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for calibrating external parameters of a vehicle-mounted forward-looking camera, characterized in that: include: Acquiring driving parameters of the tested vehicle within a plurality of consecutive first preset time periods; Calculating an average value of the effective vanishing points within each of the first preset time periods; Determine whether the distance between the average values of two adjacent valid vanishing points in the first preset time period is less than a preset threshold; If it is less than a preset threshold, solving the external parameter based on the average value of the two effective vanishing points in the first preset time period; Solving external parameters based on the average values of the two valid vanishing points in the first preset time periods, including: recording the average value of the valid vanishing points in one first preset time period as a first average value; recording the average value of the valid vanishing points in another first preset time period as a second average value; calculating the average value of the first average value and the second average value; obtaining a camera intrinsic parameter matrix and camera coordinates; calculating the camera pitch angle based on the camera intrinsic parameter matrix and the average value of the two valid vanishing points; calculating the camera yaw angle based on the camera intrinsic parameter matrix and the average value of the two valid vanishing points; recording the camera roll angle as 0; calculating the camera rotation matrix based on the camera pitch angle, the camera yaw angle and the camera roll angle; and calculating the camera translation matrix based on the rotation matrix and the camera coordinates.
2. The method for calibrating the external parameters of a vehicle-mounted front-view camera according to claim 1, characterized in that: Before obtaining the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods, the method further includes: Obtaining the driving data of the vehicle within a preset driving time; It is determined whether the driving data within the preset driving time meets the preset calibration condition, and when the preset calibration condition is met, the execution continues.
3. The method for calibrating the external parameters of a vehicle-mounted front-view camera according to claim 2, characterized in that: The preset calibration conditions include: The vehicle does not change lanes within the preset driving time, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion.
4. The method for calibrating the external parameters of a vehicle-mounted front-view camera according to claim 1, characterized in that: After obtaining the driving parameters of the tested vehicle in a plurality of consecutive first preset time periods and before calculating the average value of the effective vanishing points in each of the first preset time periods, the method further includes: Determining whether the driving parameters within the first preset time period meet preset calibration conditions; If the preset calibration condition is met, the execution continues; otherwise, the driving parameters of the tested vehicle within the next first preset time period are obtained.
5. The method for calibrating external parameters of a vehicle-mounted front-view camera according to claim 1, characterized in that: Also includes: When the distance between the average values of two adjacent valid vanishing points in the first preset time period is not less than a preset threshold, the counter is incremented by 1; When the value of the counter is greater than a preset calibration value, a prompt message indicating that the calibration has failed is output.
6. A vehicle-mounted forward-looking camera extrinsic calibration device, characterized in that: include: The driving parameter acquisition unit is used to obtain the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods: an effective vanishing point processing unit, configured to calculate an average value of effective vanishing points in each of the first preset time periods, and determine whether a distance between the average values of two adjacent effective vanishing points in the first preset time periods is less than a preset threshold; an external parameter calculation unit, configured to solve an external parameter based on the average values of two adjacent effective vanishing points in the first preset time period when the distance between the average values of the two adjacent effective vanishing points is less than a preset threshold; The external parameter calculation unit is specifically used to record the average value of the effective vanishing points in a first preset time period as a first average value; record the average value of the effective vanishing points in another first preset time period as a second average value; and calculate the average value of the first average value and the second average value; Obtaining a camera intrinsic parameter matrix and camera coordinates; calculating the camera pitch angle based on the camera intrinsic parameter matrix and the average of two valid vanishing points; calculating the camera yaw angle based on the camera intrinsic parameter matrix and the average of two valid vanishing points; The camera roll angle is recorded as 0; the camera rotation matrix is calculated based on the camera pitch angle, camera yaw angle and camera roll angle; The camera translation matrix is calculated based on the rotation matrix and the camera coordinates.
7. The extrinsic parameter calibration device for a vehicle-mounted front-view camera according to claim 6, characterized in that: Also includes: A condition judgment unit, used to obtain the driving data of the vehicle within a preset driving time before obtaining the driving parameters of the tested vehicle within a plurality of consecutive first preset time periods; It is determined whether the driving data within the preset driving time meets a preset calibration condition, and when the preset calibration condition is met, the driving parameter acquisition unit is triggered to continue execution.
8. The extrinsic parameter calibration device for a vehicle-mounted forward-looking camera according to claim 7, characterized in that: The preset calibration conditions include: The vehicle does not change lanes within the preset driving time, the proportion of effective vehicle speed is greater than a first preset proportion, and the vanishing point success rate is greater than a second preset proportion.
9. A vehicle-mounted forward-looking camera external parameter calibration device, characterized in that: include: Memory and processor; The memory stores a program suitable for execution by the processor, wherein the program is used to: Acquiring driving parameters of the tested vehicle within a plurality of consecutive first preset time periods; Calculating an average value of the effective vanishing points within each of the first preset time periods; Determine whether the distance between the average values of two adjacent valid vanishing points in the first preset time period is less than a preset threshold; If it is less than the preset threshold, the external parameter is solved based on the average value of the two valid vanishing points; Solving external parameters based on the average values of the two valid vanishing points in the first preset time periods, including: recording the average value of the valid vanishing points in one first preset time period as a first average value; recording the average value of the valid vanishing points in another first preset time period as a second average value; calculating the average value of the first average value and the second average value; obtaining a camera intrinsic parameter matrix and camera coordinates; calculating the camera pitch angle based on the camera intrinsic parameter matrix and the average value of the two valid vanishing points; calculating the camera yaw angle based on the camera intrinsic parameter matrix and the average value of the two valid vanishing points; recording the camera roll angle as 0; calculating the camera rotation matrix based on the camera pitch angle, the camera yaw angle and the camera roll angle; and calculating the camera translation matrix based on the rotation matrix and the camera coordinates.
Citation Information
Patent Citations
Camera external parameter calibration method and device
CN110349219A