Vehicle-mounted camera real-time correction method, device and equipment and storage medium
By collecting and establishing a predictive regression model in the vehicle, the camera pose is corrected in real time, which solves the problem that the camera pose cannot be corrected in real time under vehicle driving conditions, and improves visual perception accuracy and driving safety.
Patent Information
- Application Number
- CN202410722738.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technology cannot correct the camera pose in real time under actual vehicle driving conditions, resulting in reduced visual perception accuracy and affecting the performance of automatic driving and automatic parking functions.
Collect sample data of camera changes and vehicle changes, establish a predictive regression model, and correct the camera pose in real time based on the current vehicle change data.
Through model training with strong diversity and generalization capabilities, the accuracy and stability of visual perception are ensured, and driving safety is improved.
Smart Images

Figure CN118736003A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle environment perception and sensor calibration, and in particular to a method, device, equipment, storage medium and computer program product for real-time correction of a vehicle-mounted camera. Background Art
[0002] Given that the camera extrinsic calibration of currently mass-produced autonomous driving vehicles is based on offline calibration at specific calibration sites, the scenes are generally relatively simple, and the calibrated camera extrinsic parameters cannot meet the complex autonomous driving scenes. Under special working conditions, such as bumpy roads and sloped roads, where the camera posture changes significantly, the accuracy of the camera's visual perception will be affected, resulting in reduced performance or even loss of the entire autonomous driving or automatic parking function.
[0003] To address the problem that camera visual perception is affected by changes in camera posture, the current approach is to match the target feature points of two camera frames and calculate the camera posture change based on information such as vehicle speed. This method relies on the speed of the vehicle and the accuracy of motion estimation, and cannot perform real-time correction of the camera posture under actual vehicle driving conditions.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a real-time correction method, device, equipment and storage medium for a vehicle-mounted camera, aiming to solve the technical problem that the camera posture under actual vehicle driving conditions cannot be corrected in real time.
[0006] To achieve the above objectives, the present application proposes a real-time correction method for a vehicle-mounted camera, the method comprising:
[0007] Collecting sample data, wherein the sample data includes camera change sample data and vehicle change sample data;
[0008] Establishing a prediction regression model based on the camera variation sample data and the vehicle variation sample data;
[0009] Based on the current vehicle change data and the prediction regression model, the camera posture is corrected in real time.
[0010] In one embodiment, the vehicle variation sample data includes a height sample parameter, and the step of collecting the sample data includes:
[0011] Building a test and calibration platform, wherein the calibration platform is used to simulate a vehicle system;
[0012] Based on the laser radar parameters of the test and calibration platform, obtaining the camera variation sample data;
[0013] The height sample parameters are obtained based on the distance sensor parameters of the test and calibration platform.
[0014] In one embodiment, the step of establishing a prediction regression model based on the camera variation sample data and the vehicle variation sample data includes:
[0015] Establishing an initial regression model according to the camera variation sample data and the height sample parameters;
[0016] According to the height sample parameters, the initial regression model is subjected to model inference to obtain a model prediction value;
[0017] Calculating a model loss value of the initial regression model according to the camera variation sample data and the model prediction value;
[0018] The initial regression model whose model loss value is less than a preset threshold is identified as a predictive regression model.
[0019] In one embodiment, after the step of calculating the model loss value of the initial regression model according to the camera variation sample data and the model prediction value, the method further includes:
[0020] When the model loss value is greater than a preset threshold, calculating the model descent gradient according to the model loss value;
[0021] Update the model weights according to the model descent gradient to obtain an updated regression model;
[0022] The updated regression model is identified as the initial regression model, and the step of performing model inference on the initial regression model according to the height parameter to obtain a model prediction value is returned.
[0023] In one embodiment, the step of correcting the camera pose in real time based on the current vehicle variation data and the prediction regression model includes:
[0024] Inputting a change amount threshold, a change rate threshold, a number threshold and the current vehicle change amount data into the prediction regression model to obtain a model output result, wherein the model output result includes a first preset condition and a second preset condition;
[0025] Determine whether to activate the camera pose prediction module according to the first preset condition;
[0026] When the camera pose prediction module is activated, outputting the model prediction value;
[0027] Determining whether the model prediction value is valid according to the second preset condition;
[0028] When the model prediction value is valid, the camera pose is corrected in real time.
[0029] In one embodiment, the vehicle change data includes a vehicle height change and a vehicle height change rate, and the step of determining whether to activate the camera pose prediction module according to the first preset condition includes:
[0030] When the number of times that the vehicle body height change is greater than the change amount threshold and the number of times that the vehicle body height change rate is greater than the change rate threshold are both greater than the number threshold, the camera posture prediction module is activated.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a real-time correction device for a vehicle-mounted camera, the real-time correction device for a vehicle-mounted camera comprising: a data acquisition module, for acquiring sample data, the sample data comprising camera variation sample data and vehicle variation sample data;
[0032] A model building module, used to build a prediction regression model based on the camera variation sample data and the vehicle variation sample data;
[0033] The camera correction module is used to correct the camera posture in real time based on the current vehicle change data and the prediction regression model.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a real-time correction device for a vehicle-mounted camera, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the real-time correction method for a vehicle-mounted camera as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the real-time correction method of the vehicle-mounted camera as described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the real-time correction method for a vehicle-mounted camera as described above are implemented.
[0037] One or more technical solutions proposed in this application have at least the following technical effects:
[0038] By collecting sample data and building a prediction regression model based on the sample data, the sample data includes camera variation sample data and vehicle variation sample data, which contains actual vehicle operation scenarios under different road conditions, different speeds and different postures. Therefore, the model built through sample data ensures the diversity and generalization ability of model training. According to the established prediction regression model, the current vehicle variation data is input to achieve real-time correction of camera posture, ensure the accuracy and stability of visual perception, and further improve driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 This is a flow chart of the first embodiment of the real-time correction method for a vehicle-mounted camera of the present application;
[0042] Figure 2 This is a flow chart of a second embodiment of the real-time correction method for a vehicle-mounted camera of the present application;
[0043] Figure 3 This is a flow chart of a third embodiment of the real-time correction method for a vehicle-mounted camera of the present application;
[0044] Figure 4 This is a schematic diagram of the module structure of the real-time correction device for a vehicle-mounted camera according to an embodiment of the present application;
[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the real-time correction method for a vehicle-mounted camera in an embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: collecting sample data, the sample data including camera change sample data and vehicle change sample data; establishing a prediction regression model based on the camera change sample data and the vehicle change sample data; and correcting the camera posture in real time based on the current vehicle change data and the prediction regression model.
[0050] The existing technology matches the target feature points of two frames of camera images and calculates the change in camera posture through information such as vehicle speed. This method relies on the speed of the vehicle and the accuracy of motion estimation, and cannot perform real-time correction of the camera posture under actual vehicle driving conditions.
[0051] The present application provides a solution, which realizes real-time correction of camera posture through a real-time correction method for a vehicle-mounted camera, ensures the accuracy and stability of visual perception, and further improves driving safety.
[0052] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a vehicle system, a personal computer, etc., or an electronic device capable of realizing the above functions, a vehicle-mounted terminal, etc. This embodiment uses a six-degree-of-freedom test and calibration platform to simulate the changes in the posture of the vehicle during driving.
[0053] Based on this, the embodiment of the present application provides a real-time correction method for a vehicle-mounted camera, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the real-time correction method for a vehicle-mounted camera of the present application.
[0054] In this embodiment, the vehicle-mounted camera real-time correction method includes steps S10 to S30:
[0055] Step S10, collecting sample data, the sample data includes camera change sample data and vehicle change sample data.
[0056] It should be noted that sample data refers to a part of the data extracted from the population for analysis, modeling or testing. Among them, the camera change sample data can be the changes in the position, angle and other parameters of the camera relative to the vehicle or the ground due to the changes in the vehicle posture (such as bumps, turns, uphill, etc.), and the vehicle change sample data can be the change data of the vehicle posture, such as the vehicle's tilt angle, pitch angle, roll angle, etc. Exemplarily, the data acquisition system can be started under selected road and environmental conditions. As the vehicle travels, the sensor will collect the vehicle's posture change data (such as tilt angle, pitch angle, etc.) in real time, and the camera will capture images of the vehicle's surroundings. Through image processing technology, the camera's posture change data (such as the camera's rotation angle, translation, etc.) can be extracted from the image.
[0057] Step S20, establishing a prediction regression model based on the camera change sample data and the vehicle change sample data.
[0058] It should be noted that the predictive regression model is a statistical model for predicting the relationship between one or more independent variables and a dependent variable. For example, the predictive regression model can be a statistical model of the relationship between vehicle posture change data and camera posture change data. The collected camera change sample data and vehicle change sample data can be divided into a training set and a validation set. The training set data is used to train the predictive regression model, and the prediction performance of the predictive regression model is optimized by adjusting the parameters and structure of the predictive regression model. During the training process, the validation set data is used to monitor the performance of the model to prevent overfitting or underfitting.
[0059] Step S30, based on the current vehicle change data and the prediction regression model, the camera posture is corrected in real time.
[0060] Exemplarily, the current vehicle change data can be obtained in real time through sensors installed on the vehicle (such as IMU, GPS, gyroscope, etc.), and the real-time obtained vehicle change data can be preprocessed as necessary to ensure that its quality and format meet the requirements of the predictive regression model. The preprocessed vehicle change data is used as an input variable, and the predictive regression model will output one or more prediction values. These prediction values represent the change in the camera's posture under a given vehicle posture change. According to the prediction results of the predictive regression model, the camera's posture is corrected in real time.
[0061] This embodiment collects sample data and establishes a prediction regression model based on the sample data. Since the sample data includes camera variation sample data and vehicle variation sample data, it contains actual vehicle operation scenarios under different road conditions, different speeds and different postures. Therefore, the model established by the sample data ensures the diversity and generalization ability of model training. According to the established prediction regression model, the current vehicle variation data is input to achieve real-time correction of the camera posture, ensure the accuracy and stability of visual perception, and further improve driving safety.
[0062] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the real-time correction method for a vehicle-mounted camera of the present application. Figure 1 The first embodiment shown is a second embodiment of the real-time correction method for a vehicle-mounted camera of the present application.
[0063] In the second embodiment, the step S10 includes:
[0064] Step S101, building a test calibration platform, the calibration platform is used to simulate the vehicle system.
[0065] It should be noted that the test and calibration platform provides a virtual or simulated environment for simulating various working states and scenarios of the vehicle system, so as to test, verify and calibrate the performance, parameters and algorithms of the vehicle system. For example, a six-degree-of-freedom test and calibration platform can be used to accurately simulate the posture changes of the vehicle during actual driving by simulating the movement of the vehicle in six degrees of freedom, such as translation of X, Y, and Z and rotation around X, Y, and Z.
[0066] Step S102, obtaining camera variation sample data based on the laser radar parameters of the test calibration platform.
[0067] It should be noted that the laser radar parameters can be understood as parameters measured by the laser radar. The laser radar has a high sensitivity to the posture changes caused by the changes in ground features, and the laser radar has a higher ranging accuracy. Therefore, the laser radar is fixedly connected to the vehicle-mounted camera, and the laser radar posture change is equivalent to the camera posture change. The laser radar parameters can be measured by the laser radar, and the laser radar parameters are pre-processed. For example, t1 and t2 are two time endpoints of a time interval, and multiple samples (laser radar parameters) at time t1 are subtracted from multiple samples (laser radar parameters) at time t2 to obtain multiple camera change sample data. For example, the camera change sample data can be defined as a pose data set, expressed as pose{x, y, z, roll, yaw, pitch}, where x, y, z are position components, x represents the position change of the camera in the X-axis direction, y represents the position change of the camera in the Y-axis direction, and z represents the position change of the camera in the Z-axis direction. roll, yaw, and pitch are rotation components. Roll represents the rotation angle of the camera around its own X-axis, yaw represents the rotation angle of the camera around its own Y-axis, and pitch represents the rotation angle of the camera around its own Z-axis.
[0068] Step S103, obtaining the height sample parameters based on the distance sensor parameters of the test and calibration platform.
[0069] It should be noted that the distance sensor parameters can be understood as parameters measured by the distance sensor. The height parameter can be the height change of the vehicle body at the four wheels. Exemplarily, t1 and t2 are two time endpoints of a time interval. Multiple samples (distance sensor parameters) at time t1 and multiple samples (distance sensor parameters) at time t2 are subtracted to obtain multiple height sample parameters. Exemplarily, the height of the vehicle body can be monitored by the distance sensor to estimate the height change of the vehicle body at the four wheels. The height sample parameter can be defined as a delta data set, expressed as delta{d1, d2, d3, d4}, where d1 represents the height change of the vehicle body at the left front wheel of the vehicle, d2 represents the height change of the vehicle body at the right front wheel of the vehicle, d3 represents the height change of the vehicle body at the left rear wheel of the vehicle, and d4 represents the height change of the vehicle body at the right rear wheel of the vehicle.
[0070] The above is only a feasible implementation of step S10 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S10.
[0071] This embodiment builds a test and calibration platform, which is used to simulate the vehicle system, and tests, verifies and calibrates the performance, parameters and algorithms of the vehicle system, thereby ensuring the validity of the model data. Based on the laser radar parameters of the test and calibration platform, the camera change sample data is obtained, and then based on the distance sensor parameters of the test and calibration platform, the height sample parameters are obtained. Since the laser radar has a high sensitivity to the posture changes caused by the changes in ground features, and the data measured by the distance sensor has a high accuracy and resolution, this measurement method can improve the accuracy of the measurement data.
[0072] Reference Figure 3 , Figure 3 This is a flow chart of the third embodiment of the real-time correction method for a vehicle-mounted camera of the present application. Figure 2 The second embodiment shown is a third embodiment of the real-time correction method for a vehicle-mounted camera of the present application.
[0073] In the third embodiment, the step S20 includes:
[0074] Step S201, establishing an initial regression model according to camera variation sample data and height sample parameters.
[0075] It should be noted that the initial regression model can be understood as the initial version of the prediction regression model. It can be understood that the initial regression model is an unoptimized prediction regression model. Exemplarily, a large amount of camera variation sample data and height sample parameters can be used for model training, and the trained model can be identified as the initial regression model. It can be understood that when applying this model, the height parameters delta{d1, d2, d3, d4} can be used as model input, and the model output is the camera variation data pose{x, y, z, roll, yaw, pitch}. The initial regression model can be expressed as formula (1):
[0076] pose{x,y,z,roll,yaw,pitch}=model(delta{d1,d2,d3,d4}) (1)
[0077] Considering the computational complexity and parameter complexity, the model is designed as a cubic polynomial regression model. The x in pose can be expressed as formula (2):
[0078]
[0079] Among them, a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, w are the weight parameters to be trained for the regression model. It can be understood that other information y, z, roll, yaw, pitch in pose can also be expressed in the form of a cubic polynomial as shown in the above formula.
[0080] Therefore, the established initial regression model can be expressed as formula (3):
[0081]
[0082] Step S202, performing model inference on the initial regression model according to the height sample parameters to obtain a model prediction value.
[0083] It should be noted that model inference can be understood as the process of using a trained model (i.e., the initial regression model) to predict new, unseen data. The model prediction value can be the prediction result of the camera pose based on the current vehicle change data and the established initial regression model. For example, the height sample parameters are input into the model, and the corresponding output prediction value is obtained through the forward propagation calculation process of the model. The model prediction value can be expressed as
[0084] Step S203, calculating the model loss value of the initial regression model according to the camera variation sample data and the model prediction value.
[0085] It should be noted that the model loss value is used to measure the difference between the model prediction value and the actual sample data. The greater the difference, the higher the loss value. It can be understood that the camera change sample data includes the true value of the data. For example, the true value of the data is represented by Calculate the value of each sample and The difference is then calculated, and the total loss of all samples is calculated. Further, the average loss is calculated based on the total loss and the total number of samples. The average loss obtained can be the loss value of the initial regression model.
[0086] Step S204: The initial regression model whose model loss value is less than a preset threshold is identified as a prediction regression model.
[0087] It should be noted that the preset threshold can be understood as a loss value threshold set during the model training process to determine whether the performance of the model meets the requirements. When the calculated model loss value of the initial regression model is less than the preset threshold, the model is identified as a predictive regression model.
[0088] Furthermore, considering that when the calculated model loss value of the initial regression model is greater than the preset threshold, the initial regression model needs to be optimized, the step S203 includes: when the model loss value is greater than the preset threshold, calculating the model descent gradient according to the model loss value; updating the model weight according to the model descent gradient to obtain an updated regression model; identifying the updated regression model as the initial regression model, and returning to step S202, that is, performing model inference on the initial regression model according to the height parameter to obtain the model prediction value.
[0089] It should be noted that the model descent gradient represents the partial derivative of the loss function with respect to the model parameters, which indicates how to adjust the model parameters to reduce the loss value. The model weight is a parameter in the machine learning model, which is used to calculate the prediction value based on the input data. During the training process, the model weight is continuously updated to optimize the model performance. For example, considering that the lateral movement and yaw movement of the camera caused by the posture change in the actual driving of the vehicle are small, two hyperparameters, the suppression factor and the enhancement factor, are set in the loss function of the regression model to speed up the training speed and improve the model accuracy. The prediction error of the regression model is {ex, ey, ez, eroll, eyaw, epich}, and the model loss is expressed as formula (4):
[0090] loss=l*(ex+eyaw)+e*(ey+ez+eroll+epitch) (4)
[0091] In the above formula, l is the suppression factor and e is the enhancement factor. It can be seen from formula (4) that the loss function reduces the position change of the camera in the X-axis direction and the rotation angle of the camera around its own Y-axis, and enhances the position change of the camera in the Y-axis and Z-axis directions and the rotation components of roll and pitch.
[0092] In this embodiment, an initial regression model is established based on the camera variation sample data and the height sample parameters, and the initial regression model is inferred based on the height sample parameters to obtain the model prediction value.
[0093] And according to the camera change sample data and the model prediction value, the model loss value of the initial regression model is calculated. The loss function is used to measure the gap between the predicted value and the true value. Calculating the loss value helps to evaluate the performance of the model and provide guidance for subsequent optimization. The initial regression model with a model loss value less than the preset threshold is identified as a prediction regression model. Through iterative optimization, the prediction performance of the model can be continuously improved, so that the model can predict the camera change more accurately. Using optimization algorithms such as gradient descent, the model parameter update direction that reduces the loss value can be efficiently found. Through multiple iterations, the model can gradually approach the optimal solution, thereby improving the accuracy and reliability of camera pose correction.
[0094] Based on the above Figure 3 The third embodiment shown is a fourth embodiment of the real-time correction method for a vehicle-mounted camera of the present application.
[0095] In the fourth embodiment, the step S30 includes:
[0096] Step S301, input the change amount threshold, change rate threshold, number threshold and current vehicle change amount data into the prediction regression model to obtain the model output result, and the model output result includes the first preset condition and the second preset condition.
[0097] It should be noted that in order to avoid the resource occupation caused by repeatedly calling the camera pose change prediction regression model and executing the camera pose real-time adjustment module, as well as reducing the stability of the camera visual perception, the camera pose change prediction module does not need to be called frequently during the actual vehicle operation. Therefore, in the post-processing process of the camera visual perception, the instantaneous and short-term drastic changes in the vehicle body height caused by the instantaneous bumps will be shielded. Therefore, the change threshold, the change rate threshold and the number threshold are set as the preset values of the judgment conditions. The model output results include the judgment conditions and the camera change data, and the judgment conditions include the first preset condition and the second preset condition. Exemplarily, the vehicle height change rate can be expressed as formula (5):
[0098]
[0099] In the above formula, delta1 and delta2 are the height parameters of consecutive frames, and t is the acquisition period of the distance sensor.
[0100] Step S302, determining whether to activate the camera pose prediction module according to a first preset condition.
[0101] It should be noted that the first preset condition is expressed as: when the number of times the vehicle height change is greater than the change threshold, and the number of times the vehicle height change rate is greater than the change rate threshold are both greater than the number threshold, the camera posture prediction module is activated. Exemplarily, let the change rate threshold be α, the change threshold be β, and the camera posture prediction module can be expressed as activated = true when it is activated. The first preset condition can be expressed as formula (6):
[0102]
[0103] It can be seen from the above formula that if the vehicle height change rate is greater than the threshold for more than N consecutive times, and the vehicle height change is greater than the threshold for more than M consecutive times, the camera posture prediction module is activated.
[0104] Step S303, when the camera pose prediction module is activated, output the model prediction value.
[0105] It is understandable that the model prediction value is output only when activated = true
[0106] Step S304: determine whether the model prediction value is valid according to the second preset condition.
[0107] It should be noted that the second preset condition is to determine whether the model prediction value is valid when the camera pose prediction module is activated. For example, let the camera change threshold be γ. When activated = True, the camera pose change prediction module will output the prediction value Determine camera posture change prediction Whether it exceeds the threshold γ, when two consecutive frames exceed the threshold, the current camera posture change prediction is considered efficient.
[0108] Step S305: When the model prediction value is valid, the camera posture is corrected in real time.
[0109] It is understandable that when the model predicts the value If it is effective, a weighted strategy can be used to adjust the camera posture. The adjusted camera posture can be expressed as formula (7):
[0110]
[0111] In the above formula, w1 and w2 are weighting factors, p0 is the original camera pose calibration result, is the model prediction value, and p is the final camera change data.
[0112] In this embodiment, the change amount threshold, the change rate threshold, the number threshold and the current vehicle change amount data are input into the prediction regression model to obtain the model output result, and the model output result includes the first preset condition and the second preset condition. By setting the first preset condition, it is determined whether to activate the camera posture prediction module. When the camera posture prediction module is activated, the model prediction value is output. This method avoids the resource occupation caused by repeatedly calling the camera posture change amount prediction regression model and executing the camera posture real-time adjustment module, and improves the stability of camera visual perception. By judging whether the model prediction value is valid according to the second preset condition, and correcting the camera posture in real time when the model prediction value is valid, the accuracy of the camera posture prediction itself is further improved, and the safety of the vehicle during automatic driving and automatic parking is guaranteed.
[0113] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the real-time correction method of the vehicle-mounted camera of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0114] This application also provides a real-time correction device for a vehicle-mounted camera, please refer to Figure 4 , the vehicle-mounted camera real-time correction device comprises:
[0115] The data acquisition module 10 is used to acquire sample data, wherein the sample data includes camera variation sample data and vehicle variation sample data;
[0116] A model building module 20, used to build a prediction regression model according to the camera variation sample data and the vehicle variation sample data;
[0117] The camera correction module 30 is used to correct the camera posture in real time based on the current vehicle change data and the prediction regression model.
[0118] The real-time correction device for a vehicle-mounted camera provided by the present application adopts the real-time correction method for a vehicle-mounted camera in the above-mentioned embodiment, which can solve the technical problem that the camera posture under actual vehicle driving conditions cannot be corrected in real time. Compared with the prior art, the beneficial effects of the real-time correction device for a vehicle-mounted camera provided by the present application are the same as the beneficial effects of the real-time correction method for a vehicle-mounted camera provided by the above-mentioned embodiment, and other technical features in the real-time correction device for a vehicle-mounted camera are the same as the features disclosed in the above-mentioned embodiment method, which will not be described in detail here.
[0119] The present application provides a real-time correction device for a vehicle-mounted camera, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the real-time correction method for the vehicle-mounted camera in the above-mentioned embodiment one.
[0120] Reference below Figure 5 , which shows a schematic diagram of the structure of a vehicle-mounted camera real-time correction device suitable for implementing the embodiment of the present application. The vehicle-mounted camera real-time correction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The vehicle-mounted camera real-time correction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0121] like Figure 5As shown, the on-board camera real-time correction device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the on-board camera real-time correction device are also stored in RAM1004. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the on-board camera real-time correction device to communicate wirelessly or wired with other devices to exchange data. Although the on-board camera real-time correction device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0122] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0123] The real-time correction device for a vehicle-mounted camera provided by the present application adopts the real-time correction method for a vehicle-mounted camera in the above-mentioned embodiment, which can solve the technical problem that the camera position under actual vehicle driving conditions cannot be corrected in real time. Compared with the prior art, the beneficial effects of the real-time correction device for a vehicle-mounted camera provided by the present application are the same as the beneficial effects of the real-time correction method for a vehicle-mounted camera provided by the above-mentioned embodiment, and the other technical features of the real-time correction device for a vehicle-mounted camera are the same as the features disclosed in the method of the previous embodiment, which will not be described in detail here.
[0124] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0125] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0126] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the real-time correction method for a vehicle-mounted camera in the above-mentioned embodiment.
[0127] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0128] The computer-readable storage medium may be included in the vehicle-mounted camera real-time correction device; or may exist independently without being assembled into the vehicle-mounted camera real-time correction device.
[0129] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the vehicle-mounted camera real-time correction device, the vehicle-mounted camera real-time correction device: collects sample data, and the sample data includes camera change sample data and vehicle change sample data; establishes a prediction regression model based on the camera change sample data and the vehicle change sample data; and corrects the camera posture in real time based on the current vehicle change data and the prediction regression model.
[0130] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0133] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned vehicle-mounted camera real-time correction method, and can solve the technical problem that the camera posture under actual vehicle driving conditions cannot be corrected in real time. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the vehicle-mounted camera real-time correction method provided by the above-mentioned embodiment, and will not be repeated here.
[0134] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned vehicle-mounted camera real-time correction method when executed by a processor.
[0135] The computer program product provided by the present application can solve the technical problem that the camera posture under actual vehicle driving conditions cannot be corrected in real time. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the real-time correction method for the vehicle-mounted camera provided by the above embodiment, and will not be elaborated here.
[0136] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A real-time correction method for a vehicle-mounted camera, characterized in that: The method includes: Collecting sample data, wherein the sample data includes camera change sample data and vehicle change sample data; Establishing a prediction regression model based on the camera variation sample data and the vehicle variation sample data; Based on the current vehicle change data and the prediction regression model, the camera posture is corrected in real time.
2. The method according to claim 1, characterized in that The vehicle variation sample data includes a height sample parameter, and the step of collecting the sample data includes: Building a test and calibration platform, wherein the calibration platform is used to simulate a vehicle system; Based on the laser radar parameters of the test and calibration platform, obtaining the camera variation sample data; The height sample parameters are obtained based on the distance sensor parameters of the test and calibration platform.
3. The method according to claim 2, characterized in that The step of establishing a prediction regression model according to the camera variation sample data and the vehicle variation sample data comprises: Establishing an initial regression model according to the camera variation sample data and the height sample parameters; According to the height sample parameters, the initial regression model is subjected to model inference to obtain a model prediction value; Calculating a model loss value of the initial regression model according to the camera variation sample data and the model prediction value; The initial regression model whose model loss value is less than a preset threshold is identified as a predictive regression model.
4. The method according to claim 3, characterized in that After the step of calculating the model loss value of the initial regression model according to the camera variation sample data and the model prediction value, the method further includes: When the model loss value is greater than a preset threshold, calculating the model descent gradient according to the model loss value; Update the model weights according to the model descent gradient to obtain an updated regression model; The updated regression model is identified as the initial regression model, and the step of performing model inference on the initial regression model according to the height parameter to obtain a model prediction value is returned.
5. The method according to any one of claims 1 to 4, characterized in that The step of correcting the camera posture in real time based on the current vehicle change data and the prediction regression model includes: Inputting a change amount threshold, a change rate threshold, a number threshold and the current vehicle change amount data into the prediction regression model to obtain a model output result, wherein the model output result includes a first preset condition and a second preset condition; Determine whether to activate the camera pose prediction module according to the first preset condition; When the camera pose prediction module is activated, outputting the model prediction value; Determining whether the model prediction value is valid according to the second preset condition; When the model prediction value is valid, the camera pose is corrected in real time.
6. The method according to claim 5, characterized in that The vehicle change data includes a vehicle height change and a vehicle height change rate. The step of determining whether to activate the camera posture prediction module according to the first preset condition includes: When the number of times that the vehicle body height change is greater than the change amount threshold and the number of times that the vehicle body height change rate is greater than the change rate threshold are both greater than the number threshold, the camera posture prediction module is activated.
7. A real-time correction device for a vehicle-mounted camera, characterized in that: The device comprises: A data acquisition module, used for acquiring sample data, wherein the sample data includes camera variation sample data and vehicle variation sample data; A model building module, used to build a prediction regression model based on the camera variation sample data and the vehicle variation sample data; The camera correction module is used to correct the camera posture in real time based on the current vehicle change data and the prediction regression model.
8. A real-time correction device for a vehicle-mounted camera, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the vehicle-mounted camera real-time correction method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the real-time correction method for a vehicle-mounted camera according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the real-time correction method for a vehicle-mounted camera according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Front vehicle ranging method based on monocular vision
CN102661733A
Method and device for estimating external parameters of camera under different loads and unmanned truck
CN116309856A
Camera online calibration method and device of unmanned logistics vehicle and storage medium
CN118015090A
Calibration device and calibration method
JP2020162040A
Apparatus and method for deciding road gradient
KR101846205B1
