CN117057251A - Simulation distortion camera optimization method and system based on VTD - Google Patents

Simulation distortion camera optimization method and system based on VTD Download PDF

Info

Publication number
CN117057251A
CN117057251A CN202311103707.0A CN202311103707A CN117057251A CN 117057251 A CN117057251 A CN 117057251A CN 202311103707 A CN202311103707 A CN 202311103707A CN 117057251 A CN117057251 A CN 117057251A
Authority
CN
China
Prior art keywords
camera
vtd
distortion
simulation
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311103707.0A
Other languages
Chinese (zh)
Inventor
朱芮锋
赵旭娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Dongxin Powerise Technology Co ltd
Original Assignee
Shenyang Dongxin Powerise Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang Dongxin Powerise Technology Co ltd filed Critical Shenyang Dongxin Powerise Technology Co ltd
Priority to CN202311103707.0A priority Critical patent/CN117057251A/en
Publication of CN117057251A publication Critical patent/CN117057251A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/02Reliability analysis or reliability optimisation; Failure analysis, e.g. worst case scenario performance, failure mode and effects analysis [FMEA]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Medical Informatics (AREA)
  • Image Processing (AREA)

Abstract

The invention is suitable for the technical field of automatic driving automobiles, and provides a simulation distortion camera optimization method and system based on a VTD, which can improve ADAS development and test safety and can not cause any potential threat to people in a real road or a laboratory; stabilizing the control scene and environment; complex cases recur: under the condition of ensuring the authenticity, the VTD simulation distortion camera builds reproducible dynamic scenes in the simulation world, thereby being beneficial to development and test of ADAS functions; parameterized testing: if the camera hardware needs to be optimized, the configuration of the view angle, the perception algorithm and the like of the camera can be conveniently changed in the VTD simulation world, so that the development and test process of the ADAS algorithm can be accelerated; the integrated test is convenient. A quantifiable linear optimization method and a BP neural network-based nonlinear optimization method are provided for the simulation distortion camera based on the VTD, so that the reliability of the simulation distortion camera can be improved.

Description

Simulation distortion camera optimization method and system based on VTD
Technical Field
The invention belongs to the technical field of automatic driving automobiles, and particularly relates to a simulation distortion camera optimization method and system based on a VTD.
Background
In ADAS (Advanced Driving Assistance System) advanced driving assistance system technology, a camera is widely used as a core sensor in sensing, decision making, control and other aspects, and specific applications include: a visual perception function; lane keeping and departure warning functions; an adaptive cruise control function; front collision early warning and braking auxiliary functions; a traffic sign recognition function; pedestrian monitoring and protection functions; reversing assistance and panoramic imaging functions. In the era of continuous iterative updating of new energy automobile types, automatic driving research is usually combined with an automatic driving virtual simulation technology to accelerate the development process.
Currently, a simulation platform for ADAS VTD (Virtual Test Drive) can be used for simulating the behavior and performance of an automatic driving vehicle in various road scenes, and is widely applied to the development process of an automatic driving technology, so that developers are allowed to test the functional integrity, performance stability and safety of an automatic driving algorithm in a virtual environment. The VTD simulation platform has the following characteristics: simulating a real road scene; simulating vehicle behaviors; simulating a sensor; simulating a traffic participant; recording and playback of data; verification and testing.
In the aspect of evaluation and optimization of a simulation distortion camera built by using a VTD simulation platform, a real test scene is generally built in the VTD simulation world, wherein the real test scene is mostly a graph with obvious characteristics, and the parameter optimization is carried out on the simulation distortion camera in the VTD through the experience of an engineer and then the judgment is carried out through an observation method. In the field of VTD simulation platforms, the field of setting up distortion simulation cameras and picture correction optimization is left vacant, the cameras serving as core sensors of ADAS functions have important functions, and the accuracy of the simulation cameras in the simulation platform can influence the credibility of ADAS simulation test development conclusions. Therefore, we propose a simulation distortion camera optimization method and system based on VTD.
Disclosure of Invention
The invention aims to provide a simulation distortion camera optimization method and system based on a VTD, and aims to solve the problems in the background technology.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a simulation distortion camera optimization method based on a VTD comprises the following steps:
step S1, acquiring parameters of a real camera, and acquiring a real shooting scene of the real camera, wherein the real shooting scene specifically comprises the following steps: checkerboard calibration real shooting, ground feature real shooting and wall feature real shooting;
s2, calculating a transformation matrix of the distorted picture according to parameters of the real camera, generating a VTD configuration file, and modifying codes of XML files of the VTD configuration file to obtain an operable VTD project; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
s3, constructing a checkerboard static scene, a ground feature object scene and a wall feature object scene, and outputting a checkerboard calibration plate picture, a ground feature object simulation picture and a wall feature object simulation picture which are shot by a VTD simulation distortion camera; importing a checkerboard calibration plate picture into MATLAB for calibration, analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in the MATLAB, and outputting parameters of the internal reference matrix and the distortion matrix of the VTD simulation distortion camera;
s4, performing difference value operation on parameters of an internal reference matrix and a distortion matrix of the output VTD simulation distortion camera to obtain errors of the VTD simulation distortion camera; comparing and analyzing the ground characteristic picture and the wall characteristic picture acquired by the VTD simulation distortion camera with the picture acquired by the real camera, and qualitatively analyzing the picture of the VTD simulation distortion camera according to the distortion degree of the characteristic pattern and the difference between the characteristic pattern and the real picture;
s5, taking parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities, and performing error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into the step S2 to form an optimization closed loop; aiming at the distortion camera with special parameters, higher fidelity cannot be achieved through multiple times of linear optimization, a nonlinear optimization method based on the BP neural network is introduced, training of a neural network model is carried out by utilizing samples and experience samples in the linear optimization method, correction parameters are output, and the correction parameters are input into the step S2 as optimization parameters to form an optimization closed loop.
Further, the linear optimization method specifically comprises the following steps: performing linear optimization on the input VTD simulation distortion camera parameters based on the normalized data to generate optimization parameters, inputting the generated optimization parameters into the step S2, and re-building the simulation distortion camera in the VTD simulation platform to form an optimization closed loop.
Further, the nonlinear optimization method specifically comprises the following steps: building and training a BP neural network, generating optimization parameters by using the trained neural network, inputting the generated optimization parameters into the step S2, and re-building a simulation distortion camera in the VTD simulation platform to form an optimization closed loop.
Further, the neural network is a BP neural network, the input layer of the BP neural network is 15 inputs, the output layer is 5 outputs, and the hidden layer is 3 layers.
Further, in the step S2, parameters of the real camera include:
parameters obtained after calibration test of the real camera specifically comprise: a distortion matrix, an internal reference matrix and an external reference matrix; the core parameters of the distortion matrix are radial distortion K1, radial distortion K2, radial distortion K3, tangential distortion P1 and tangential distortion P2; the internal reference matrix is a matrix of 3x3, and the external reference matrix is a matrix of 2x 2;
the hardware parameters specifically include: horizontal field of view, vertical field of view, aperture, effective focal length, output pixel, distortion table and pixel point length.
Further, in the step S3, the specific operation of building the checkerboard static scene is as follows:
the checkerboard calibration plate is imported as an object format, is 10 black and white grids in the transverse direction and 10 black and white grids in the longitudinal direction, each single grid is a cube, the side length of each single grid is 0.2 m, and the whole checkerboard calibration plate is a cube plate of 2 m.
A VTD-based simulated distortion camera optimization system, comprising:
a camera system, comprising:
the calibration module is used for performing calibration test on the real camera;
the calibration output module is used for outputting parameters obtained after the real camera performs calibration test;
the hardware parameter module is used for providing hardware parameters of the real camera;
the real shooting picture module is used for acquiring a real shooting scene of the real camera;
a VTD simulation platform comprising:
the VTD simulation process module is used for calculating a transformation matrix of the distorted picture according to parameters of the real camera and generating a VTD configuration file, and carrying out code modification on an XML file of the VTD configuration file to obtain an operable VTD project; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
the test scene building module is used for building a checkerboard static scene, a ground feature object scene and a wall feature object scene, and outputting a checkerboard calibration plate picture, a ground feature object simulation picture and a wall feature object simulation picture which are shot by the VTD simulation distortion camera; the method comprises the steps of guiding a checkerboard calibration plate picture into MATLAB for calibration, analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in the MATLAB, and outputting parameters of the internal reference matrix and the distortion matrix of the VTD simulation distortion camera;
the comparison module is used for carrying out difference value operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera to obtain the error of the VTD simulation distortion camera; the method comprises the steps of comparing and analyzing ground characteristic pictures and wall characteristic pictures acquired by a VTD simulation distortion camera with pictures acquired by a real camera, and qualitatively analyzing the pictures of the VTD simulation distortion camera according to the distortion degree of characteristic patterns and the difference between the characteristic patterns and the real pictures;
the error optimization module takes parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities and is used for carrying out error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method or a nonlinear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into a VTD simulation process module to form an optimized closed loop.
Compared with the prior art, the invention has the beneficial effects that:
1. the ADAS development test safety is improved; the camera is an important sensor for sensing and deciding the surrounding environment of the vehicle by the ADAS function, and damage to an experimental site and injury to experimental staff can be caused when the ADAS function fails or has logic errors in field tests. The VTD simulation platform is used for building a simulation distortion camera to simulate a real camera, so that ADAS functions can be safely tested in a virtual environment, and no potential threat is caused to a real road or personnel in a laboratory.
2. Stabilizing the control scene and environment; the VTD-based simulation platform can accurately control different scenes and environments, including different weather conditions (such as rain, snow and fog), different traffic densities, different times (day and night) and different road conditions (expressways, urban roads and the like).
3. The complex situation is repeated; in an actual road, it is difficult to control complex road conditions, such as a road congestion condition of the peak in the morning and evening, and it is difficult to control vehicles in front of, at the side of and at the rear of a test vehicle, and in an ADAS development test, quantitative control needs to be performed on a test scene. The high-reality simulation distortion camera of the simulation platform based on the VTD can build reproducible dynamic scenes in the simulation world under the condition of ensuring the reality, and is beneficial to development and test of ADAS functions.
4. The test progress is quickened; after the simulation distortion camera of the VTD virtual platform is built, development tests of different dimensionalities can be carried out on ADAS functions through changing dynamic scenes, and compared with the experimental environment required to be built for field tests, the VTD simulation test is more convenient, time-saving and labor-saving.
5. Performing parameterization test; after the VTD simulation distortion camera is built, if the camera hardware needs to be optimized, the configuration such as the view angle and the perception algorithm of the camera can be conveniently changed in the VTD simulation world, and the development and test process of the ADAS algorithm can be accelerated.
6. The integration test is convenient; based on the strong simulation capability of the VTD simulation world, the VTD can coordinate with modules such as a simulation radar, dynamic software and the like after the simulation distortion camera is built, and the VTD can perform joint integration test on various sensors of the ADAS.
7. A quantifiable optimization method; the quantifiable optimization method for the VTD simulation distortion camera comprises a linear optimization method and a nonlinear optimization method based on a BP neural network, and the credibility of the simulation distortion camera model is improved.
Drawings
FIG. 1 is a flow chart of an implementation process of the simulation distortion camera optimization method based on the VTD.
FIG. 2 is a block diagram of a simulated distortion camera optimization system based on a VTD of the present invention.
FIG. 3 is a schematic diagram of the implementation process of the simulated distortion camera optimization system based on the VTD of the present invention.
Fig. 4 is a schematic diagram of a vehicle selection and coordinate system in embodiment 1 of the present invention.
FIG. 5 is a simulation diagram of a checkerboard calibration plate in example 1 of the present invention.
Fig. 6 is a schematic diagram of a checkerboard calibration plate coordinate system in embodiment 1 of the present invention.
Fig. 7 is a schematic diagram of setting up a static scene of wall features in embodiment 1 of the present invention.
Fig. 8 is a diagram showing an optimized overall configuration of a simulation camera in embodiment 1 of the present invention.
Fig. 9 is a diagram showing the overall structure of the BP neural network in embodiment 1 of the present invention.
Description of the embodiments
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Specific implementations of the invention are described in detail below in connection with specific embodiments.
As shown in fig. 1, the method for optimizing a simulated distortion camera based on a VTD according to an embodiment of the present invention is characterized by comprising the following steps:
parameters of a real camera are acquired, and a real shooting scene of the real camera is acquired, wherein the real shooting scene specifically comprises: checkerboard calibration real shooting, ground feature real shooting and wall feature real shooting;
VTD simulation process: and calculating a transformation matrix of the distorted picture according to parameters of the real camera and generating a VTD configuration file, wherein the transformation matrix is a 'dat' file, and providing a distortion comparison basis for the VTD simulation picture. Code modification is carried out on AutoCfg.xml, cfgDisplay.xml and IGbase.xml executable files of the VTD configuration file, so that an operable VTD project is obtained; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
the construction of a test scene is carried out through a static road drawing tool ROD and a dynamic traffic drawing tool SE of the VTD simulation platform, and the method specifically comprises the following steps:
setting up a checkerboard static scene: the checkerboard calibration plate is imported as an object format, is 10 black and white grids in the transverse direction and 10 black and white grids in the longitudinal direction, each single grid is a cube, the side length of each single grid is 0.2 m, and the whole checkerboard calibration plate is a cube plate of 2 m. The relative positions of the VTD simulation distortion cameras and the checkerboard calibration plates are consistent with the real-world positional relationship. Collecting and storing checkerboard calibration plate pictures shot by the VTD simulation distortion camera, and rapidly analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in MATLAB, so as to obtain the performance parameters of the current VTD simulation distortion camera.
Building a ground feature object scene: the method comprises the steps of constructing a ground characteristic pattern in a VTD simulation platform, wherein the relative position of a VTD simulation distortion camera and the ground characteristic pattern is consistent with that in the real world, and the ground characteristic pattern is used for qualitatively calibrating an acquisition picture of the simulation distortion camera, and analyzing the performance of the VTD simulation distortion camera through the performance of the distortion degree of a feature in the acquisition picture.
Building a wall surface feature object scene: and building a wall surface feature pattern in the VTD simulation platform, wherein the wall surface feature pattern is identical to a ground feature scene, and the relative position of the VTD simulation distortion camera in the wall surface feature scene and the wall surface feature pattern is identical to that in the real world, so as to qualitatively calibrate the image of the VTD simulation distortion camera.
Quantitative analysis: performing difference operation on parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera to obtain an error of the VTD simulation distortion camera;
qualitative analysis: comparing and analyzing the ground characteristic picture and the wall characteristic picture acquired by the VTD simulation distortion camera with the picture acquired by the real camera, and qualitatively analyzing the picture of the VTD simulation distortion camera according to the distortion degree of the characteristic pattern and the difference between the characteristic pattern and the real picture;
taking parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities, and carrying out error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into the step S2 to form an optimization closed loop; aiming at the distortion camera with special parameters, higher fidelity cannot be achieved through multiple times of linear optimization, a nonlinear optimization method based on the BP neural network is introduced, training of a neural network model is carried out by utilizing samples and experience samples in the linear optimization method, correction parameters are output, and the correction parameters are input into the step S2 as optimization parameters to form an optimization closed loop.
As a preferred embodiment of the present invention, in the step S2, parameters of the real camera include:
parameters obtained after calibration test of the real camera specifically comprise: a distortion matrix, an internal reference matrix and an external reference matrix; the core parameters of the distortion matrix are radial distortion K1, radial distortion K2, radial distortion K3, tangential distortion P1 and tangential distortion P2; the internal reference matrix is a matrix of 3x3, and the external reference matrix is a matrix of 2x 2;
the hardware parameters specifically include: horizontal field of view (HFOV), vertical field of view (VFOV), aperture (f.no), effective Focal Length (EFL), output pixels (output pixels), distortion look-up tables (angle of incidence, actual image height, theoretical image height), and pixel point lengths (pixelsize_x, pixelsize_y (mm/pixel)).
In the embodiment of the invention, in order to ensure the accuracy of the input of the simulation process, the hardware parameters of the camera sensor need to be clarified, and the parameters with seven cores, namely the hardware parameters, of the VTD simulation distortion camera are built.
As a preferred embodiment of the present invention, the linear optimization method specifically includes: the input VTD simulation distortion camera parameters based on the normalized data are subjected to linear optimization, optimization parameters are generated, the generated optimization parameters are input into a VTD simulation process, and the simulation distortion camera in the VTD simulation platform is built again to form an optimization closed loop.
In the embodiment of the invention, when the identification error is a linear error, parameters (an internal reference matrix and a distortion matrix) of a real camera are used as standard quantities, linear optimization is performed according to an error value, and new simulation input parameters are calculated. And inputting new simulation input parameters into the VTD simulation process, and constructing the VTD simulation distortion camera, so as to form an optimized closed loop. After the parameter optimization process is carried out for a plurality of times, if the image of the VTD simulation distortion camera still does not meet the requirement, a nonlinear method is introduced.
As a preferred embodiment of the present invention, the nonlinear optimization method specifically includes: building and training a neural network, generating optimization parameters by using the trained neural network, inputting the generated optimization parameters into a VTD simulation process, and re-building a simulation distortion camera in a VTD simulation platform to form an optimization closed loop.
As a preferred embodiment of the invention, the neural network is a BP neural network, the input layer of the BP neural network is 15 inputs, the output layer is 5 outputs, and the hidden layer is 3 layers.
In the embodiment of the invention, when multiple linear optimizations still cannot be close to real parameters, a plurality of samples are selected as inputs to build and train the BP neural network, and nonlinear optimization calculation is performed on required parameters.
After training the neural network model by using the experience sample, the input parameters built by the VTD simulation distortion camera can be predicted and calculated by the expected camera parameters.
As shown in fig. 2 and 3, a VTD-based simulated distortion camera optimization system according to an embodiment of the present invention includes:
the camera system, the prerequisite of camera system construction, the sensor hardware model that needs to clear up the camera system use, the camera system includes:
the calibration module is used for performing calibration test on the real camera; the camera sensor can be provided with relevant calibration parameters when leaving the factory, and when the accuracy of the camera parameters is high, the calibration test can be carried out on the real camera through the chessboard graph so as to make up the factory error of the camera.
The calibration output module is used for outputting parameters obtained after the real camera performs calibration test; after the calibration test is carried out on the real camera, three parameters, namely a distortion matrix, an internal reference matrix and an external reference matrix, are mainly obtained.
The hardware parameter module is used for providing hardware parameters of the real camera; the hardware parameters of the camera sensor need to be clarified, and the accuracy of the simulation process input is ensured. The parameters for constructing the distortion simulation camera have seven cores, namely a horizontal view field (HFOV), a vertical View Field (VFOV), an aperture stop (F.NO), an Effective Focal Length (EFL), an output pixel (output pixels), a distortion comparison table (incidence angle, actual image height and theoretical image height) and a pixel point length (Pixelsize_x and Pixelsize_y (mm/pixel)).
The real shooting picture module is used for acquiring a real shooting scene of the real camera; there are three scenes that need to be photographed: the checkerboard calibration real shooting, the ground feature real shooting and the wall feature real shooting are used for analyzing pictures.
A VTD simulation platform comprising:
the VTD simulation process module is used for calculating a transformation matrix of the distorted picture according to parameters of the real camera and generating a VTD configuration file, and carrying out code modification on an XML file of the VTD configuration file to obtain an operable VTD project; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
the test scene building module is used for building a checkerboard static scene, a ground feature object scene and a wall feature object scene, and outputting a checkerboard calibration plate picture, a ground feature object simulation picture and a wall feature object simulation picture which are shot by the VTD simulation distortion camera; the method comprises the steps of guiding a checkerboard calibration plate picture into MATLAB for calibration, analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in the MATLAB, and outputting parameters of the internal reference matrix and the distortion matrix of the VTD simulation distortion camera;
the comparison module is used for carrying out difference value operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera to obtain the error of the VTD simulation distortion camera; the method comprises the steps of comparing and analyzing ground characteristic pictures and wall characteristic pictures acquired by a VTD simulation distortion camera with pictures acquired by a real camera, and qualitatively analyzing the pictures of the VTD simulation distortion camera according to the distortion degree of characteristic patterns and the difference between the characteristic patterns and the real pictures;
the error optimization module takes parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities and is used for carrying out error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method or a nonlinear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into a VTD simulation process module to form an optimized closed loop.
Embodiment 1, specific scheme flow of the setting up and optimizing part of the VTD simulation camera in the VTD simulation platform.
1. Building a VTD simulation platform test site: in the VTD simulation platform, a fully open OpenDrive, openCRG and OpenSCENARIO standard is used to build a test scene, and a scene setting for simulating a camera test is described.
1.1, building a checkerboard calibration static scene, which comprises the following steps:
A. and (3) confirming the vehicle type of the own vehicle Ego, and placing a camera at the head position of the own vehicle Ego, wherein the vehicle coordinate system in the VTD simulation platform takes the midpoint of the connecting line of the rear wheels as the origin of coordinates, and the Z direction takes the ground as the zero point. The simulation camera in the invention is set at the head position of the vehicle model, and the vehicle is set as 'BMW_Z4_2010_velencia_orange'. As shown in fig. 4.
And B, manufacturing a checkerboard calibration plate in the VTD simulation platform in an object format, wherein the checkerboard calibration plate is square, 10 transverse black and white grids are set, 10 longitudinal black and white grids are set, 100 black and white grids are used in total, the side length of each small grid is set to be 0.2 m in the simulation world, and the total side length of the checkerboard calibration plate is 2 m. The object center of the checkerboard calibration plate is set as the center position of the cube. And placing the model file in the manufactured Object file under an Object common folder, and placing the XML file of the checkerboard under a Config/Players/Object path to complete the insertion of the checkerboard Object model. As shown in fig. 5.
C. Referring to fig. 6, a checkerboard calibration plate was placed in front of the simulated camera, with the Z-axis height of the camera set to 1m. The coordinate system of the checkerboard calibration plate is shown in Table 1, wherein the position point of the calibration plate in the VTD simulation platform is set as the center point of the object. The rotation of the checkerboard calibration plate in the present invention is set as: rotating around the Z axis to be reading, wherein the state of facing the camera is an initial state, and clockwise rotation is positive; rotating around the Y axis to be Pitch, wherein the state of facing the camera is an initial state, and clockwise rotation is positive; rotate around X axis to Roll, wherein rotate clockwise to positive with the state facing the camera as initial state; the relative positions of the X axis, the Y axis and the Z axis between the checkerboard calibration plate and the camera are marked in the table, wherein the relative positions are described by using a vehicle coordinate system with the camera placement position as 0 point. The positions of the calibration plates are 25, and 25 screen shots are required when the simulation camera based on the VTD is calibrated.
TABLE 1
Numbering device Relative X Relative Y Relative Z heading pitch roll
1 6 m 0 m 0 m 30°
2 6 m 0 m 0 m 330°
3 6 m 0 m 0 m 30°
4 6 m 0 m 0 m 330°
5 6 m 0 m 0 m
6 6 m 2 m 1 m 30°
7 6 m 2 m 1 m 330°
8 6 m 2 m 1 m 30°
9 6 m 2 m 1 m 330°
10 6 m 2 m 1 m
11 6 m -2 m 1 m 30°
12 6 m -2 m 1 m 330°
13 6 m -2 m 1 m 30°
14 6 m -2 m 1 m 330°
15 6 m -2 m 1 m
16 6 m 2 m -1 m 30°
17 6 m 2 m -1 m 330°
18 6 m 2 m -1 m 30°
19 6 m 2 m -1 m 330°
20 6 m 2 m -1 m
21 6 m -2 m -1 m 30°
22 6 m -2 m -1 m 330°
23 6 m -2 m -1 m 30°
24 6 m -2 m -1 m 330°
25 6 m -2 m -1 m
D. After the checkerboard scene is built, the IG picture of the simulation camera is used for screenshot operation, wherein the screenshot operation uses a snap shot tool carried by the VTD to perform screenshot, so that the current resolution and the picture transverse-longitudinal ratio of the IG picture of the VTD can be maintained, and the picture comparison and the calibration optimization of subsequent steps are facilitated.
E. And packaging and archiving the saved 25 pictures, and transmitting the packaged 25 pictures to a Windows system for archiving, wherein the files are used for calibrating and calculating the simulation pictures by a Camera Calibrator tool in MATLAB to obtain key parameters such as an internal reference matrix, a distortion matrix and the like of the simulation camera.
1.2, building a ground characteristic static scene:
the ground characteristic static scene is used for qualitatively analyzing the reality of the simulation camera, and provides a characteristic image of the ground for researchers, wherein the characteristic image of the ground is set as a cube, a DummyCubewhite module in an object is selected, and the model is enabled to be a cube sheet of 2m x 2m to be tiled on a road of a VTD simulation world through rotation and stretching. The characteristic object is placed at the position in front of the camera, the relative position is 8m in front of the camera, the same real scene is built in a real laboratory, and the real distortion camera is used for collecting pictures for comparison.
1.3, building a wall surface characteristic static scene:
the wall surface feature static scene is used for qualitatively analyzing the reality of the simulation camera, has the same meaning as ground calibration, and aims to provide feature images of the ground for researchers, wherein the feature patterns of the wall surface are set to be cubes, selected as a DummyCubewhite module in an object, and turned and stretched to be a cube sheet of 2m x 2m and vertically placed relative to the camera. The characteristic object is placed at the position in front of the camera, the relative position is 10m in front of the distortion camera, the same real scene is built in a real laboratory, and the real camera is used for collecting pictures for comparison. As shown in fig. 7.
2. Simulation camera optimization method
2.1, as shown in FIG. 8, the overall architecture is optimized for a simulated camera.
The optimization method of the simulation camera built for the VTD simulation platform mainly comprises two stages:
the first stage is a stage in which the assumed error can be linearly optimized, based on the simulated camera parameters calculated by the checkerboard calibration plate built in the VTD simulation world, the parameters of the real camera are used as standard quantities, the difference value calculation and the normalization calculation are carried out on the parameters of the simulated camera, in the first stage, the assumed error is linear, the input distortion camera parameters are linearly optimized based on the normalization data, the optimized camera parameters are generated, the simulated camera in the VTD simulation platform is built again, and the optimized closed loop of the first stage is formed.
Based on the strong simulation capability of the VTD simulation platform, for the simulation camera under the VTD simulation framework, less errors can be achieved for the simulation of the camera with common resolution in the market, such as 720P (1280 x 720), 1080P (1920 x 1080) and common 4k resolution (3840 x 2160), and in practical application, the picture of the simulation camera can reach higher matching degree with the real shot picture through linear error adjustment. Aiming at the camera simulation with special resolution, the condition that the simulation camera calibration and the real camera parameter error are larger can occur, the input camera parameter needs to be optimized at the moment, the linear assumption is used, the optimization effect is not obvious, and therefore the nonlinear parameter optimization step of the second stage is used.
The second stage is a stage in which the error is assumed to be nonlinear, and when the parameters of the simulation camera are still unable to be similar to those of the actual distortion camera in the optimization calculation of the first stage, the parameters used in the first stage are used as training samples of the BP neural network of the second stage in a matrix form.
2.2 nonlinear optimization method based on BP neural network
The deep learning neural network selects a mature BP neural network, the BP neural network is a multi-layer feedforward network which imitates the human neuron structure and is trained based on an error back propagation algorithm, the mapping relation of input and output is not required to be preset, a rule can be obtained through training of a model of the deep learning neural network, and a result closest to an expected output value is obtained when an input value is given.
The operating principle of the BP neural network is as follows: firstly, a forward input sample is calculated to obtain output, then, difference operation is carried out between a current output value and an expected value, error information is reversely propagated, and a gradient descent method is used as a core method to adjust the weight and the threshold value of the network, so that the error between the actual output value and the expected output value of the network is minimized. Finally, the above-mentioned process is repeatedly carried out until the error reaches a satisfactory interval.
Referring to fig. 9, the bp neural network system has 15 input variables, which are simulation camera parameters obtained by calculation and analysis by a Camera Calibrator tool in MATLAB, and are respectively:
radial distortion RK1, radial distortion RK2, radial distortion RK3, tangential distortion RP1, tangential distortion RP2, X-axis focal length RFx, Y-axis focal length RFy, X-axis principal point coordinate RCx, Y-axis principal point coordinate RCy, horizontal field of view RHFOV, vertical field of view RVFOV, output lateral pixel ROx, output longitudinal pixel row, single pixel lateral length RPx, and single pixel longitudinal length RPy.
The output variables of the BP neural network system are 5, and the output variables are respectively:
setting up an input radial distortion VTD_K1 of the VTD simulation camera, setting up an input radial distortion VTD_K2 of the VTD simulation camera, setting up an input radial distortion VTD_K3 of the VTD simulation camera, setting up an input tangential distortion VTD_P1 of the VTD simulation camera and setting up an input tangential distortion VTD_P2 of the VTD simulation camera.
The variable output in the neural network is the input quantity of the video camera with distortion built in the VTD simulation world, the optimal weight based on the sample training position is obtained after the neural network model is trained in the design logic of the neural network, the expected camera parameters are input in the BP neural network system after the training is completed, and the neural network system predicts the input core parameters required in the building of the corresponding simulation video camera, namely VTD_K1, VTD_K2, VTD_K3, VTD_P1 and VTD_P2. And (5) completing parameter optimization of the simulation camera.
Because the parameter quantity of the simulation camera is larger, based on the results of multiple practical experiments, the five parameters of the VTD_K1, the VTD_K2, the VTD_K3, the VTD_P1 and the VTD_P2 are proved to have larger influence on the construction of the simulation camera based on the VTD, and when the BP neural network is constructed, the output is set as the core parameters of the five distortion cameras, so that the training time of the neural network can be effectively shortened, and the effectiveness and the accuracy of the optimization method based on the BP neural network can be ensured.
The BP neural network built for parameter optimization of the VTD simulation camera is divided into two processes of forward propagation and error propagation, in the forward propagation, the number of input signals is 15, the input signals are acted and output through 3 groups of hidden layers, wherein the number of nodes of the hidden layers is 15, 12 and 10 respectively, and finally, the output signals are generated through nonlinear transformation.
In the back propagation process, in the BP neural network of the optimized VTD simulation camera, the error is set as the difference between the forward propagation output and the expected output, the error is reversed layer by layer to the input layer through the hidden layer, the error is averagely distributed to all units, and the error signals obtained by each layer are used as the basis for adjusting the weight of each unit.
The method comprises the steps of enabling prediction errors of a simulation camera to descend along a gradient direction through adjusting connection strength between an input node and a hidden node of a BP neural network built for a VTD simulation camera and connection strength between the hidden node and an output node and a threshold value, and finally obtaining specific parameters of weight and the threshold value of the BP neural network of an optimal solution through multiple training of the BP neural network system.
After BP neural network training aiming at the VTD simulation camera is completed, 15 parameters of the expected distortion camera are used as input, so that the optimization parameters for constructing the simulation camera in the VTD can be obtained, and parameter optimization based on nonlinear assumption is completed.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and improvements can be made by those skilled in the art without departing from the spirit of the present invention, and these should also be considered as the scope of the present invention, which does not affect the effect of the implementation of the present invention and the utility of the patent.

Claims (7)

1. The simulation distortion camera optimization method based on the VTD is characterized by comprising the following steps of:
step S1, acquiring parameters of a real camera, and acquiring a real shooting scene of the real camera, wherein the real shooting scene specifically comprises the following steps: checkerboard calibration real shooting, ground feature real shooting and wall feature real shooting;
s2, calculating a transformation matrix of the distorted picture according to parameters of the real camera, generating a VTD configuration file, and modifying codes of XML files of the VTD configuration file to obtain an operable VTD project; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
s3, constructing a checkerboard static scene, a ground feature object scene and a wall feature object scene, and outputting a checkerboard calibration plate picture, a ground feature object simulation picture and a wall feature object simulation picture which are shot by a VTD simulation distortion camera; importing a checkerboard calibration plate picture into MATLAB for calibration, analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in the MATLAB, and outputting parameters of the internal reference matrix and the distortion matrix of the VTD simulation distortion camera;
s4, performing difference value operation on parameters of an internal reference matrix and a distortion matrix of the output VTD simulation distortion camera to obtain errors of the VTD simulation distortion camera; comparing and analyzing the ground characteristic picture and the wall characteristic picture acquired by the VTD simulation distortion camera with the picture acquired by the real camera, and qualitatively analyzing the picture of the VTD simulation distortion camera according to the distortion degree of the characteristic pattern and the difference between the characteristic pattern and the real picture;
s5, taking parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities, and performing error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into the step S2 to form an optimization closed loop; aiming at the distortion camera with special parameters, higher fidelity cannot be achieved through multiple times of linear optimization, a nonlinear optimization method based on the BP neural network is introduced, training of a neural network model is carried out by utilizing samples and experience samples in the linear optimization method, correction parameters are output, and the correction parameters are input into the step S2 as optimization parameters to form an optimization closed loop.
2. The VTD-based simulated distortion camera optimization method of claim 1, characterized in that the linear optimization method specifically comprises: performing linear optimization on the input VTD simulation distortion camera parameters based on the normalized data to generate optimization parameters, inputting the generated optimization parameters into the step S2, and re-building the simulation distortion camera in the VTD simulation platform to form an optimization closed loop.
3. The VTD-based simulated distortion camera optimization method of claim 1, characterized in that the nonlinear optimization method specifically comprises: building and training a BP neural network, generating optimization parameters by using the trained neural network, inputting the generated optimization parameters into the step S2, and re-building a simulation distortion camera in the VTD simulation platform to form an optimization closed loop.
4. The VTD-based simulated distortion camera optimization method of claim 3, wherein the neural network is a BP neural network, the BP neural network has 15 inputs in the input layer, 5 outputs in the output layer, and 3 hidden layers.
5. The VTD-based simulated distortion camera optimization method of claim 1, wherein in step S1, parameters of the real camera include:
parameters obtained after calibration test of the real camera specifically comprise: a distortion matrix, an internal reference matrix and an external reference matrix; the core parameters of the distortion matrix are radial distortion K1, radial distortion K2, radial distortion K3, tangential distortion P1 and tangential distortion P2; the internal reference matrix is a matrix of 3x3, and the external reference matrix is a matrix of 2x 2;
the hardware parameters specifically include: horizontal field of view, vertical field of view, aperture, effective focal length, output pixel, distortion table and pixel point length.
6. The VTD-based simulated distortion camera optimization method of claim 1, wherein in step S3, the specific operation of building a checkerboard static scene is:
the checkerboard calibration plate is imported as an object format, is 10 black and white grids in the transverse direction and 10 black and white grids in the longitudinal direction, each single grid is a cube, the side length of each single grid is 0.2 m, and the whole checkerboard calibration plate is a cube plate of 2 m.
7. A VTD-based simulated distortion camera optimization system, comprising:
a camera system, comprising:
the calibration module is used for performing calibration test on the real camera;
the calibration output module is used for outputting parameters obtained after the real camera performs calibration test;
the hardware parameter module is used for providing hardware parameters of the real camera;
the real shooting picture module is used for acquiring a real shooting scene of the real camera;
a VTD simulation platform comprising:
the VTD simulation process module is used for calculating a transformation matrix of the distorted picture according to parameters of the real camera and generating a VTD configuration file, and carrying out code modification on an XML file of the VTD configuration file to obtain an operable VTD project; two IG pictures are set in the VTD simulation platform, namely a normal camera picture and a simulation distortion camera picture for monitoring;
the test scene building module is used for building a checkerboard static scene, a ground feature object scene and a wall feature object scene, and outputting a checkerboard calibration plate picture, a ground feature object simulation picture and a wall feature object simulation picture which are shot by the VTD simulation distortion camera; the method comprises the steps of guiding a checkerboard calibration plate picture into MATLAB for calibration, analyzing and calculating an internal reference matrix and a distortion matrix of the VTD simulation distortion camera by using a Camera Calibrator tool in the MATLAB, and outputting parameters of the internal reference matrix and the distortion matrix of the VTD simulation distortion camera;
the comparison module is used for carrying out difference value operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera to obtain the error of the VTD simulation distortion camera; the method comprises the steps of comparing and analyzing ground characteristic pictures and wall characteristic pictures acquired by a VTD simulation distortion camera with pictures acquired by a real camera, and qualitatively analyzing the pictures of the VTD simulation distortion camera according to the distortion degree of characteristic patterns and the difference between the characteristic patterns and the real pictures;
the error optimization module takes parameters of an internal reference matrix and a distortion matrix of the real camera as standard quantities and is used for carrying out error normalization operation on the parameters of the internal reference matrix and the distortion matrix of the output VTD simulation distortion camera; optimizing the VTD simulation distortion camera parameters based on the normalized data by using a linear optimization method or a nonlinear optimization method, outputting correction parameters, and inputting the correction parameters as optimization parameters into a VTD simulation process module to form an optimized closed loop.
CN202311103707.0A 2023-08-30 2023-08-30 Simulation distortion camera optimization method and system based on VTD Pending CN117057251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311103707.0A CN117057251A (en) 2023-08-30 2023-08-30 Simulation distortion camera optimization method and system based on VTD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311103707.0A CN117057251A (en) 2023-08-30 2023-08-30 Simulation distortion camera optimization method and system based on VTD

Publications (1)

Publication Number Publication Date
CN117057251A true CN117057251A (en) 2023-11-14

Family

ID=88664332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311103707.0A Pending CN117057251A (en) 2023-08-30 2023-08-30 Simulation distortion camera optimization method and system based on VTD

Country Status (1)

Country Link
CN (1) CN117057251A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893618A (en) * 2024-01-11 2024-04-16 长春众鼎科技有限公司 Advanced driving assistance system camera software calibration and training
CN118032377A (en) * 2024-04-11 2024-05-14 常州星宇车灯股份有限公司 ADAS function test bench and test method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893618A (en) * 2024-01-11 2024-04-16 长春众鼎科技有限公司 Advanced driving assistance system camera software calibration and training
CN118032377A (en) * 2024-04-11 2024-05-14 常州星宇车灯股份有限公司 ADAS function test bench and test method

Similar Documents

Publication Publication Date Title
CN117057251A (en) Simulation distortion camera optimization method and system based on VTD
CN113033029A (en) Automatic driving simulation method and device, electronic equipment and storage medium
CN109190488B (en) Front vehicle door opening detection method and device based on deep learning YOLOv3 algorithm
US20050275717A1 (en) Method and apparatus for testing stereo vision methods using stereo imagery data
CN114332385A (en) Monocular camera target detection and spatial positioning method based on three-dimensional virtual geographic scene
CN115292913A (en) Vehicle-road-cooperation-oriented drive test perception simulation system
CN111428558A (en) Vehicle detection method based on improved YO L Ov3 method
US11636684B2 (en) Behavior model of an environment sensor
WO2020199057A1 (en) Self-piloting simulation system, method and device, and storage medium
CN114201890B (en) Method for constructing abnormal event scene library of expressway
WO2021146905A1 (en) Deep learning-based scene simulator construction method and apparatus, and computer device
CN115291515A (en) Automatic driving simulation test system and evaluation method based on digital twinning
CN117152513A (en) Vehicle boundary positioning method for night scene
CN114620059B (en) Automatic driving method, system thereof and computer readable storage medium
CN110599588A (en) Particle reconstruction method and device in three-dimensional flow field, electronic device and storage medium
US12007499B2 (en) Sensor calibration in advanced driver-assistance system verification
CN112597996A (en) Task-driven natural scene-based traffic sign significance detection method
CN116958639A (en) Method for detecting and enhancing false behavior of traffic light recognition model
CN111160282A (en) Traffic light detection method based on binary Yolov3 network
CN113763447B (en) Method for completing depth map, electronic device and storage medium
CN115393822A (en) Method and equipment for detecting obstacle in driving in foggy weather
CN111950343B (en) Automatic transmission tower identification method and system based on satellite remote sensing technology
Khatry et al. Camera and Lidar sensor models for autonomous vehicles
CN115469635A (en) Verification method, device and equipment for safety of automatic driving simulation test function
CN103218916B (en) Method and system for detecting red light running based on complex high-dynamic environmental modeling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination