A binocular vision system error modeling method
By introducing covariance to describe the relationship between system parameters in the binocular vision system, a more accurate error analysis model is established, and the problem of the choice of the optimal camera angle in the prior art is not consistent with the actual situation, and the system accuracy is improved.
Patent Information
- Application Number
- CN202211469827.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-11-23
AI Technical Summary
The existing binocular vision system error calculation model fails to fully consider the relationship between system parameters, resulting in the choice of the optimal camera angle does not match the actual situation and has low accuracy.
A new binocular vision system error calculation model is adopted to describe the relationship between system parameters by introducing covariance, calculate the impact of camera angle, focal length and baseline on camera corresponding point detection errors, and establish a more accurate error analysis model .
A more accurate binocular vision system accuracy evaluation is achieved, helping to select the best camera parameters, and the resulting camera angle range is closer to the actual application, improving the system accuracy.
Smart Images

Figure CN115741702B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer vision and relates to a binocular vision system error modeling method. Background Art
[0002] Binocular stereo vision (StereoVision) can determine the three-dimensional coordinates of an object by matching corresponding points from two cameras (or images). A typical binocular vision system consists of two cameras with their main axes at a certain angle. The factors that affect the accuracy of the binocular vision system can be divided into two parts: intrinsic factors and extrinsic factors. Intrinsic factors include camera image resolution, signal-to-noise ratio of image sensor and lens distortion; extrinsic factors include system calibration, detection of corresponding points and camera pose. Among them, intrinsic factors are largely determined by the hardware of the camera itself. Once the camera hardware is determined, the accuracy of the system is only related to extrinsic factors. Among the extrinsic factors, with the development of system calibration and corresponding point detection technology, the accuracy of both has reached sub-pixel level. Choosing the appropriate camera pose, that is, determining the angle between the camera baseline and the optical axis and the baseline distance requires calculation and analysis. The accuracy of the binocular vision system is the most important to evaluate its performance. Most binocular vision systems are built by engineers based on experience, resulting in low accuracy. Therefore, an accurate indicator system error modeling method is needed to guide the construction of a high-precision binocular vision system.
[0003] In most previous studies on system parameters, the error transfer and synthesis theory was used to calculate the measurement error transfer function of each system parameter to determine the optimal camera angle range. For example, Liu Qiong et al. [Liu Q, Qin X, Yin S, et al. Structural parameters optimal design and accuracy analysis for binocular vision measure system [C] / / 2008 IEEE / ASME International Conference on Advanced Intelligent Mechatronics. IEEE, 2008: 156-161.] took the system parameters as independent parameters and calculated the optimal camera angle range for the two cases where the angles between the two cameras were equal and the angles were unequal. The calculation and analysis process was simple and intuitive, but this model method ignored the constraint relationship between the camera parameters. The calculated optimal camera angle range (30° ~ 60°) was also inconsistent with the camera angles used in the binocular system in actual applications and commercial products (60° ~ 80°). Lu Yang et al. [Yang L, Wang B, Zhang R, et al. Analysis on location accuracy for the binocular stereo vision system [J]. IEEE Photonics Journal, 2017, 10 (1): 1-16.] designed an improved analysis model that takes into account the relationship between the camera baseline, camera focal length, and camera angle, and then conducts a comprehensive analysis of the errors caused by the combination of these three parameters. This method obtains a more accurate camera angle value, but it only considers the relationship between the three system parameters and ignores the feature point defocus blur caused by the change in camera angle, which still has certain limitations.
[0004] Through experiments, it is found that for binocular vision systems, there are certain relationships between camera system parameters such as camera baseline, focal length, camera angle, corresponding point detection, etc. For example, changes in camera angle will cause certain perspective distortion errors in the detection of feature points on the image. This correlation between system parameters will directly affect the calculation of binocular vision system accuracy. The above existing error calculation models do not systematically consider the influence of the relationship between all system parameters. Therefore, it is necessary to propose a more accurate and comprehensive error analysis model that considers the error components of the interaction between errors of different system parameters, achieves more accurate and quantifiable binocular vision system accuracy evaluation, and solves the problem of selecting the optimal camera angle. Summary of the invention
[0005] In view of the above defects or improvement needs of the prior art, the present invention provides a new binocular vision system error modeling method. When the camera parameters are determined, the accuracy of the binocular vision system can be calculated more accurately, thereby realizing the selection of the optimal numerical values of the camera parameters, and solving the problem that the optimal camera parameters calculated by the existing model for calculating the errors of the camera parameters independently are inconsistent with the actual ones.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] A binocular vision system error calculation model includes the following steps:
[0008] Step S1: Establish binocular vision system error analysis model:
[0009] S1.1: Traditional camera error model
[0010] For a binocular vision system, define P w (x w ,y w ,z w ) is a point in space, P L (x L ,y L ), P R (x R ,y R ) represent P w Corresponding points on the left and right image planes, are the angles between the left and right cameras and the baseline B, O L , O R Respectively represent the projection center of the left and right cameras, f L 、f R are the focal lengths of the left and right cameras, point P′ w (x w ,0,z w ) is a spatial point P w The projection point on the horizontal plane. L P w , O R P w With O L P′ w , O R P′ w The angles are denoted as α L , α R , O L P′ w , O R P′ w The angles with the optical axes of the two cameras are denoted as β L , β R. Among them, the subscript "L" represents left, and the subscript "R" represents right.
[0011] According to the binocular vision imaging principle, the spatial point P w The three-dimensional coordinates of can be expressed as:
[0012]
[0013] Among them, the left and right camera angles Both α and baseline B can be obtained by camera calibration, and the calculation formulas for the remaining parameters are:
[0014]
[0015] From the above formula, we can use the system parameters to calculate the coordinates of the space point. It should be noted that the system parameters are not independent of each other, but have a certain correlation. The system parameter δ can be expressed as:
[0016]
[0017] The coordinates of a space point can be expressed as a function of the system parameter δ, namely:
[0018]
[0019] According to the error propagation theory, point P w The total error of the calculation ε c It can be expressed as the superposition of errors in the three coordinate system directions. The traditional error calculation formula is:
[0020]
[0021] in, Respectively represent x w ,y w 、z w The respective error components are calculated as follows:
[0022]
[0023] in, Represents the three error components of the spatial point coordinates; A function representing the three coordinates of a point in space; represents the i-th parameter in the system parameter δ; Represents the spatial point coordinates and the system parameters δ and the i-th parameter δ i Independent partial derivatives.
[0024] S1.2: Improved camera error model
[0025] In the model of the present invention, the system parameters It is found in the experiment that the system parameters are not completely independent of each other, but have certain interactions. For example, the change of camera angle will cause the corresponding point detection error of the camera to change. Taking this relationship into account, the error combination component is introduced on the basis of formula (6), and the result is:
[0026]
[0027] Among them, δ i , Represents the i-th and j-th parameters in the system parameter δ; error combination component Represents the coordinates of the space point and the system parameters δ and the i-th and j-th parameters δ i , δ j The combined partial derivatives of the correlation, where the covariance To express The correlation between them is calculated as:
[0028]
[0029] in, Represents the i-th parameter δ in the system parameter δ i The error component of Represents the jth parameter δ in the system parameter δ j The error component of is the correlation coefficient, which is A measure of the relative interdependence between two variables.
[0030] Therefore, for system parameter pairs (δ i ,δ j ), the corresponding relationship number can be used To represent the correlation under consideration. The size of this correlation coefficient is only related to the camera itself. Therefore, by completing the calculation of several correlation coefficients of the binocular vision system, the error of the binocular vision system with given camera parameters can be accurately calculated using formulas (7) and (8).
[0031] Step S2: Solve for the correlation coefficient
[0032] For the correlation coefficient to be determined in step S1.2 The specific ideas for solving the problem are as follows:
[0033] S2.1: Select system parameters
[0034] As described in step S1.2, the nine system parameters are not independent of each other. Some of the system parameters are correlated with each other, and the correlation coefficients are This is the measure of the correlation. Therefore, to solve the correlation coefficient, we first need to select the system parameter pairs that have a mutual relationship (δ i ,δ j ).
[0035] In the experiment, it was found that the system parameters The first four parameters, i.e. the detection accuracy of the corresponding point coordinate pixel position, will be affected by the last five parameters in the system parameters. For a single camera, changes in the camera angle and camera focal length will cause different degrees of error in the horizontal and vertical directions of the camera's corresponding point coordinate detection; for a binocular vision system, the choice of the baseline will also have a certain impact on the corresponding point coordinate detection error of the left and right cameras.
[0036] Therefore, for the single camera case of the left camera (or right camera), the corresponding camera angle in the camera system parameters is (or ) and the camera focal length f L (δ8)(or f R Any parameter in (δ9)) is the horizontal error x detected by the corresponding point of the camera L (δ1)(or x R (δ3)) or vertical error y L (δ2)(or y R Any combination of parameters in (δ4) can form 8 sets of interrelated system parameter pairs; for the binocular vision system, the baseline B (δ7) in the camera parameters and the corresponding point coordinates of the left and right cameras are detected x L (δ1),y L (δ2), x R (δ3),y R Any parameter in (δ4) can also form 4 sets of interrelated system parameter pairs.
[0037] For the above two situations, 12 sets of system parameter pairs with mutual relations can be selected after combination (δ i ,δ j ), further, each system parameter pair includes a corresponding point coordinate detection parameter and a system parameter that will cause an error in the coordinate pixel detection.
[0038] S2.2: Determine relevant relationships
[0039] As described in step S2.1, there are 12 sets of system parameter pairs, and 12 correlation coefficients need to be solved. Therefore, it is necessary to find the influence relationship between the two parameters in each set of system parameter pairs, that is, to find the influence of the camera angle, camera focal length, and baseline on the error of corresponding point coordinate detection. The specific method is as follows:
[0040] For the cameras that make up the binocular vision system, their actual camera parameters, such as camera intrinsic parameters, distortion parameters, etc., are taken, and the corresponding virtual cameras are generated using computer software.
[0041] Generate a virtual grid model of the calibration plate in the software, and use the newly obtained virtual camera to simulate shooting of the virtual calibration plate in the software to generate a simulated shooting image of the calibration plate, and then use the standard center detection algorithm to extract the calculated position of the center of the dot on the calibration plate model. By projecting the known three-dimensional center in the grid model onto the two-dimensional image plane, the real position of the center of the dot on the calibration plate is calculated. Subtract the center position coordinates extracted by the detection algorithm from the real position coordinates of the grid model dot center to get the distortion error that occurs when detecting the corresponding point.
[0042] For a certain system parameter pair, change the camera angle (or camera focal length, baseline), calculate the distortion error of corresponding point detection under different values, and establish a distortion change model caused by the change. According to the model, a curve of the distortion error of the camera corresponding point detection and the value of a certain system parameter of the camera can be drawn, where the horizontal axis is the camera angle (or camera focal length, baseline), and the vertical axis is the measurement error of the camera corresponding point.
[0043] For the 12 sets of system parameter pairs (δ i ,δ j ), the above curves can be generated in the virtual software. It should be noted that the real camera also has the same performance when shooting.
[0044] S2.3: Solving for the correlation coefficient
[0045] According to the corresponding point detection distortion error-camera parameter change curve obtained in step S2.2, the corresponding correlation coefficients of the 12 sets of system parameters can be solved. The solution formula is as follows:
[0046]
[0047] In the formula, Represents the i-th parameter δ in the system parameter δ i The error component of Represents the jth parameter δ in the system parameter δ j The error components of Δδ can be directly calculated; i , Δδ j Respectively represent the i-th and j-th parameters δ in the system parameters i , δ j The change value of That is, the slope of the corresponding point detection distortion error-camera parameter change curve in step S2.2 is obtained from the image and substituted into formula (9), and then the corresponding correlation coefficients of the 12 sets of system parameters are obtained.
[0048] Step S3: Calculate camera error
[0049] The new system error model given by formula (7) can be further rewritten as:
[0050]
[0051] in, is the Jacobian matrix of the input, i.e. the partial derivative The covariance matrix Λ can be written as:
[0052]
[0053] The parameters on the diagonal are the nine system parameters calculated independently, and the remaining related covariances are The interaction curves of different camera parameters obtained in step S2.2 can be used to solve the equations (8) and (9). As shown in equation (11), the 12 camera system parameter pairs (δ i ,δ j ) There are 12 different relevant covariances And there are:
[0054]
[0055] Get each set of camera system parameter pairs (δ i ,δ j ) Correlation covariance After that, the binocular vision system error under given camera system parameters can be calculated by formula (10)(11)(12). By continuously changing the camera system parameters (such as camera angle, camera focal length, baseline), the corresponding binocular vision system error can be calculated. A model of how the camera error changes with camera parameters can be established to achieve more accurate calculation of the binocular vision system accuracy and help workers choose the best camera parameters.
[0056] In summary, the present invention has the following beneficial effects:
[0057] Different from the traditional error calculation model that regards the system parameters δ as independent of each other, the model proposed in this invention introduces covariance to describe the relationship between different system parameters in the binocular vision system, especially the camera angle, camera focal length, and the distortion error of the baseline to the camera corresponding point detection. After fully considering the interaction between the system parameters, a new error analysis model is established, which can obtain more accurate camera error estimation and effectively solve the problem that the optimal camera parameters obtained by the traditional error model are inconsistent with the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a schematic diagram of the imaging principle of a typical binocular vision system;
[0059] Figure 2 is a perspective distortion variation model of the camera in an embodiment of the present invention;
[0060] Figure 3 It is a flow chart of solving the camera error model of the present invention. DETAILED DESCRIPTION
[0061] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is described in detail in conjunction with the embodiments below. It should be noted that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Products that can achieve the same functions are equivalent replacements and improvements, and are all included in the protection scope of the present invention.
[0062] The method of the present invention is described in detail below with reference to specific examples.
[0063] The specific steps of the present invention are as follows:
[0064] The embodiment of the present invention uses a standard binocular vision system for error analysis. The specific system includes two industrial cameras, with a resolution of 2448×2048 pixels; the system baseline distance B is 400mm, and the focal length of the two camera lenses is 16mm. In order to ensure the simplicity of calculation, in the embodiment of the present invention, the left and right camera baselines are equal to the angle between the optical axis, that is,
[0065] Step S1: Establish binocular vision system error analysis model:
[0066] S1.1: Traditional camera error model
[0067] A binocular vision system imaging model is as follows Figure 1 As shown, define P w (x w ,y w ,z w ) is a point in space, P L (x L,y L ), P R (x R ,y R ) represent P w Corresponding points on the left and right image planes, are the angles between the left and right cameras and the baseline B, O L , O R Respectively represent the projection center of the left and right cameras, f L 、f R are the focal lengths of the left and right cameras, point P′ w (x w ,0,z w ) is a spatial point P w The projection point on the horizontal plane. L P w , O R P w With O L P′ w , O R P′ w The angles are denoted as α L , α R , O L P′ w , O R P′ w The angles with the optical axes of the two cameras are denoted as β L , β R . Among them, the subscript "L" represents left, and the subscript "R" represents right.
[0068] According to the binocular vision imaging principle, the spatial point P w The three-dimensional coordinates of can be expressed as:
[0069]
[0070] Among them, the left and right camera angles Both α and baseline B can be obtained by camera calibration, and the calculation formulas for the remaining parameters are:
[0071]
[0072] From the above formula, we can use the system parameters to calculate the coordinates of the space point. It should be noted that the system parameters are not independent of each other, but have a certain correlation. The system parameter δ can be expressed as:
[0073]
[0074] The coordinates of a space point can be expressed as a function of the system parameter δ, namely:
[0075]
[0076] According to the error propagation theory, point P w The total error of the calculation ε c It can be expressed as the superposition of errors in the three coordinate system directions. The traditional error calculation formula is:
[0077]
[0078] in, Respectively represent x w ,y w 、z w The respective error components are calculated as follows:
[0079]
[0080] in Represents the three error components of the spatial point coordinates; A function representing the three coordinates of a point in space; represents the i-th parameter in the system parameter δ; Represents the spatial point coordinates and the system parameters δ and the i-th parameter δ i Independent partial derivatives.
[0081] S1.2: Improved camera error model
[0082] In the embodiment of the present invention, the system parameters Taking into account the phenomenon that the camera angle is related to the perspective distortion found in the experiment, the error combination component is introduced on the basis of formula (6), and the following is obtained:
[0083]
[0084] Among them, δ i , Represents the i-th and j-th parameters in the system parameter δ; error combination component Represents the coordinates of the space point and the system parameters δ and the i-th and j-th parameters δ i ,δ j The combined partial derivatives of the correlation, where the covariance To express The correlation between them is calculated as:
[0085]
[0086] in, Represents the i-th parameter δ in the system parameter δ i The error component of represents the jth parameter δ in the system parameters δ j The error component of is the correlation coefficient, which is A measure of the relative interdependence between two variables. Therefore, for system parameter pairs (δ i ,δ j ), the corresponding relationship number can be used To represent the correlation under consideration. The size of this correlation coefficient is only related to the camera itself. Therefore, by completing the calculation of several correlation coefficients of the binocular vision system, the error of the binocular vision system with given camera parameters can be accurately calculated using formulas (7) and (8).
[0087] Step S2: Calculate the correlation coefficient
[0088] The specific calculation method for the correlation coefficient mentioned in the above step S1.2 is:
[0089] S2.1: Select system parameters
[0090] It is found in the experiment that the change of camera angle will cause the detection error of the corresponding point of the camera to change, that is, the left and right camera directions Detection of corresponding points with the camera x L (δ1),y L (δ2), x R (δ3),y R (δ4) is related to each other. However, the traditional camera error calculation method given in formulas (5) and (6) assumes that the camera parameter δ i are independent of each other, which leads to inaccurate camera error calculation. For the left camera (or right camera) single camera case, the corresponding camera angle in the camera system parameters (or ) and the horizontal error x detected by the corresponding point of the camera L (δ1)(or x R (δ3)) or vertical error y L (δ2)(or y R Any one of the parameters in δ4)) can form 4 sets of interrelated system parameter pairs.
[0091] Note that, for ease of explanation, the present invention only selects the relationship between the camera angle and the camera corresponding point detection for simplified consideration. Therefore, only four correlation coefficients are used. To represent the correlation under consideration. The magnitude of these four correlation coefficients is only related to the camera itself. Therefore, by completing the calculation of the four correlation coefficients of a certain camera, the error of the binocular vision system with given camera parameters can be accurately calculated using formulas (7) and (8).
[0092] S2.2: Determine relevant relationships
[0093] Based on the camera parameters of the industrial camera in the embodiment of the present invention, a pinhole camera model is created, and its actual camera parameters are taken. The corresponding virtual camera model is generated using computer software. In this process, the camera introduces the distortion parameters of the real camera, including radial distortion coefficients k1=-0.076, k2=0.068; and tangential distortion coefficients p1=-0.0003, p2=-0.0005.
[0094] Generate a virtual grid model of the calibration plate in the software, and use the newly obtained virtual camera to simulate shooting of the virtual calibration plate in the software. Generate a simulated shooting image of the calibration plate. Change the posture of the calibration plate grid model and the posture of the camera, adjust the angle between the camera optical axis and the plane of the virtual calibration plate, generate different images, and then use the standard center detection algorithm to extract the center position of the dot on the calibration plate model. By projecting the known three-dimensional center in the grid model onto the two-dimensional image plane, calculate the true position of the center of the dot on the calibration plate. Subtract the center position coordinates extracted by the detection algorithm from the true center position coordinates of the grid model to get the distortion error that occurs when detecting the corresponding point.
[0095] Constantly change the value of the camera angle when generating the image, calculate the distortion error of the corresponding point detection under different camera angles, and establish the camera angle of the industrial camera in the embodiment of the present invention The change in the camera’s perspective distortion caused by the change in the corresponding point detection. According to the model, a curve of the camera’s perspective distortion value and the camera angle can be drawn, where the horizontal axis is the camera angle and the vertical axis is the measurement error of the camera’s corresponding point. For each camera, two curves can be drawn in the horizontal and vertical directions. The results of a single camera are as follows: Figure 2 As shown in the figure, it can be found that in the simulation experiment, as the camera angle decreases, the error of corresponding point detection will gradually increase, and the speed of change in the horizontal direction and the vertical direction is different. The same performance is also found on the real camera.
[0096] By performing the above steps for the two cameras respectively, a total of 4 change curves can be obtained, corresponding to four correlation coefficients
[0097] S2.3: Solving for the correlation coefficient
[0098] According to the 4 corresponding point detection distortion error-camera angle change curves obtained in step S2.2, the correlation coefficients corresponding to the 4 sets of system parameters can be solved The solution formula is as follows:
[0099]
[0100] In the formula, Represents the i-th parameter δ in the system parameter δ i The error component of represents the jth parameter δ in the system parameters δ j The error components of Δδ can be directly calculated; i , Δδ j Respectively represent the i-th and j-th parameters δ in the system parameters i ,δ j The change in value of the camera angle of view The change values Δδ5, Δδ6, and their corresponding corresponding point detection values x L (δ1),y L (δ2), x R (δ3),y R The change values Δδ1, Δδ2, Δδ3, and Δδ4 of (δ4) can all be obtained from step S2. That is, the slope of the corresponding parameter curve of the change curve of the viewing angle distortion value and the camera angle in step S2.2. The four correlation coefficients are obtained by formula (9):
[0101] Step S3: Calculate camera error
[0102] Based on the above analysis, the new system error model given by formula (7) can be further rewritten as:
[0103]
[0104] in, is the Jacobian matrix of the input, i.e. the partial derivative The covariance matrix Λ can be written as:
[0105]
[0106] The parameters on the diagonal are the nine system parameters calculated independently; the remaining related covariances Step S2 can be used to find the camera perspective distortion values and camera angle change curves of the left and right cameras in the horizontal and vertical directions, which can be solved by formulas (8) and (9); and the relevant covariances that are not considered are all recorded as 0. As shown in formula (11), the four groups of camera system parameters in S2.1 (δ i ,δ j ) There are 4 different related covariances And there are:
[0107]
[0108] Get each set of camera system parameter pairs (δ i ,δ j) Correlation covariance After that, the binocular vision system error under given camera system parameters can be calculated by formulas (10), (11), (12). By continuously changing the camera system parameters (such as camera angle, camera focal length, baseline), the corresponding binocular vision system error can be calculated. A model can be established to show how the camera error changes with camera parameters, so as to help workers choose the best camera parameters.
[0109] In the embodiment of the present invention, the remaining camera system parameters are fixed, the camera angles of the left and right cameras are changed, the binocular vision system error is calculated, and a system error-camera angle curve is drawn. It can be concluded that the optimal camera angle range is (60°~80°), which is consistent with the actual industrial situation and is more accurate than the (30°~60°) obtained by the traditional method.
[0110] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A binocular vision system error modeling method, characterized in that: The following steps are involved: Step S1: Establish binocular vision system error analysis model: S1.1: Traditional camera error model For a binocular vision system, define P w (x w ,y w , z w ) is a point in space, P L (x L ,y L ), P R (x R ,y R ) represent P w Corresponding points on the left and right image planes, are the angles between the left and right cameras and the baseline B, O L , O R Respectively represent the projection center of the left and right cameras, f L 、f R are the focal lengths of the left and right cameras, point P′ w (x w , 0, z w ) is a spatial point P w Projection point on the horizontal plane; O L P w , O R P w With O L P′ w , O R P′ w The angles are denoted as α L , α R , O L P′ w , O R P′ w The angles with the optical axes of the two cameras are denoted as β L , β R ; Wherein, the subscript "L" represents left, and the subscript "R" represents right; The system parameters can be used to calculate the coordinates of the space points. The system parameters are not independent of each other and have certain correlations. The system parameter δ is expressed as: Space point P w The coordinates of can be expressed as a function of the system parameter δ, namely: According to the error propagation theory, the space point P w The total error of the calculation ε c It can be expressed as the superposition of errors in the three coordinate system directions. The traditional error calculation formula is: in, Respectively represent x w ,y w 、z w The respective error components are calculated as follows: in, Represents the three error components of the spatial point coordinates; A function representing the three coordinates of a point in space; represents the i-th parameter in the system parameter δ; Represents the spatial point coordinates and the system parameters δ and the i-th parameter δ i Independent partial derivatives; S1.2: Improved camera error model In the improved camera error model, the system parameters Moreover, the system parameters are not completely independent of each other, but have certain interactions. Therefore, the error combination component is introduced on the basis of formula (6), and the following is obtained: in, Represents the i-th and j-th parameters in the system parameter δ; error combination component Represents the coordinates of the space point and the system parameters δ and the i-th and j-th parameters δ i , δ j The combined partial derivatives of the correlation, where the covariance To express The correlation between them is calculated as: in, Represents the i-th parameter δ in the system parameter δ i The error component of represents the jth parameter δ in the system parameters δ j The error component of is the correlation coefficient, which is A measure of the relative interdependence between two variables; Therefore, for system parameter pairs (δ i , δ j ), the corresponding relationship number can be used To represent the correlation under consideration; the size of this correlation coefficient is only related to the camera itself, so by completing the calculation of several correlation coefficients of the binocular vision system, the error of the binocular vision system with given camera parameters can be accurately calculated using formulas (7) and (8); Step S2: Solve the correlation coefficient in step S1.2 S2.1: Select system parameters To solve the correlation coefficient, we first need to select the system parameter pairs that have a mutual relationship (δ i , δ j ); System parameters The first four parameters, i.e. the detection accuracy of the corresponding point coordinate pixel position, will be affected by the last five parameters in the system parameters; for a single camera, changes in the camera angle and camera focal length will cause different degrees of error in the horizontal and vertical directions of the camera's corresponding point coordinate detection; for a binocular vision system, the choice of the baseline will also affect the detection error of the corresponding point coordinates of the left and right cameras; For the above two cases of single camera and binocular vision system, 12 sets of system parameter pairs with mutual relationship can be selected after combination (δ i , δ j ), further, each system parameter pair includes a corresponding point coordinate detection parameter and a system parameter that will have an error effect on the coordinate pixel detection; S2.2: Determine relevant relationships As described in step S2.1, there are 12 sets of system parameter pairs, and 12 correlation coefficients need to be solved. Therefore, it is necessary to find the influence relationship between the two parameters in each set of system parameter pairs, that is, to find the influence of the camera angle, camera focal length, and baseline on the error of corresponding point coordinate detection. The specific method is as follows: For the cameras that make up the binocular vision system: first, take its actual camera parameters, use a computer to generate the corresponding virtual camera, generate a virtual grid model of the calibration plate in the computer, use the virtual camera to simulate shooting of the virtual calibration plate, and generate a simulated shooting image of the calibration plate; then, use a standard center detection algorithm to extract the calculated position of the center of the dot on the calibration plate model; calculate the real position of the center of the dot on the calibration plate by projecting the known three-dimensional center in the virtual grid model onto the two-dimensional image plane; finally, subtract the center position coordinates extracted by the detection algorithm from the real position coordinates of the grid model dot center to obtain the distortion error that occurs when detecting the corresponding point; For a certain system parameter pair, change the size of the camera angle, calculate the distortion error of the corresponding point detection under different values, and establish a distortion change model caused by the change in the corresponding point detection; according to the model, a curve of the change of the distortion error of the camera corresponding point detection and the value of a certain system parameter of the camera can be drawn, where the horizontal axis is the camera angle and the vertical axis is the measurement error of the camera corresponding point; the camera angle can be replaced by the camera focal length or baseline; For the 12 sets of system parameter pairs (δ i , δ j ), the above change curve can be generated; S2.3: Solving for the correlation coefficient According to the corresponding point detection distortion error-camera parameter change curve obtained in step S2.2, the corresponding correlation coefficients of the 12 sets of system parameters can be solved. The solution formula is as follows: In the formula, Represents the i-th parameter δ in the system parameter δ i The error component of represents the jth parameter δ in the system parameters δ j The error components of Δδ can be directly calculated; i , Δδ j Respectively represent the i-th and j-th parameters δ in the system parameters i , δ j The change value of That is, the slope of the corresponding point detection distortion error-camera parameter change curve in step S2.2 is obtained from the image and substituted into formula (9), and then the corresponding correlation coefficients of the 12 sets of system parameters are obtained. Step S3: Calculate camera error The new system error model given by formula (7) can be further rewritten as: in, is the Jacobian matrix of the input, i.e. the partial derivative The covariance matrix Λ can be written as: The parameters on the diagonal are the nine system parameters calculated independently, and the remaining related covariances are The interaction curves of different camera parameters obtained in step S2.2 can be used to solve the equations (8) and (9); as shown in equation (11), the 12 camera system parameter pairs (δ i , δ j ) There are 12 different relevant covariances And there are: Get each set of camera system parameter pairs (δ i , δ j ) Correlation covariance After that, the binocular vision system error under given camera system parameters can be obtained through formulas (10)(11)(12). By continuously changing the size of the camera system parameters and calculating the corresponding binocular vision system error, a model can be established to show how the camera error changes with the camera parameters, so as to achieve more accurate calculation of the binocular vision system accuracy and select the optimal camera parameters.
2. A binocular vision system error modeling method according to claim 1, characterized in that: In step S1.1, according to the binocular vision imaging principle, the spatial point P w The three-dimensional coordinates of can be expressed as: Among them, the left and right camera angles Both α and baseline B can be obtained by camera calibration, and the calculation formulas for the remaining parameters are:
3. A binocular vision system error modeling method according to claim 1, characterized in that: In step S2.1, for a single camera and a binocular vision system, the influence between the parameters is specifically as follows: For the single camera case of the left camera (or right camera), the corresponding camera angle in the camera system parameters (or ) and the camera focal length f L (δ8)(or f R Any parameter in (δ9)) is the horizontal error x detected by the corresponding point of the camera L (δ1)(or x R (δ3)) or vertical error y L (δ2)(or y R Any combination of parameters in (δ4)) can form 8 sets of system parameter pairs with mutual relations; For the binocular vision system, the baseline B(δ7) in the camera parameters and the corresponding point coordinates of the left and right cameras are detected x L (δ1),y L (δ2), x R (δ3),y R Any parameter in (δ4) can also form 4 sets of interrelated system parameter pairs.
