A coordinate transformation method for lane line recognition
By deriving the coordinate transformation method for tanγ0 calibration, the transformation between the image coordinate system and the camera coordinate system is optimized, solving the problem of complex coordinate transformation and low accuracy in the lane line recognition system, and realizing high-precision lane line recognition.
Patent Information
- Application Number
- CN202311033146.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-08-16
AI Technical Summary
In existing lane recognition systems, the transformation methods between the image coordinate system and the world coordinate system are complex and inaccurate, resulting in insufficient lane recognition accuracy, especially in alarm algorithms based on image coordinates where recognition errors exist.
By deriving a coordinate transformation method based on tanγ0 calibration, the coordinate transformation calculation is simplified. A high-quality image acquisition system is used to analyze and optimize the transformation between the image coordinate system and the camera coordinate system. Considering the camera installation deviation and the influence of vehicle motion, six tanγ0 calibration methods are designed, the optimal method is selected for calibration, and the calibration value is substituted into the transformation formula.
It improves the coordinate transformation accuracy and real-time performance of lane line recognition, enhances the accuracy of automatic lane line recognition, and has good engineering application value.
Smart Images

Figure CN117079234B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for transforming an image coordinate system into a world coordinate system, specifically a coordinate transformation method for lane line recognition. Background Technology
[0002] The transformation method between the image coordinate system and the world coordinate system serves as the foundation of lane line recognition systems. It primarily aims to improve the accuracy of the transformation between the world coordinate system and the computer's digital image storage coordinate system in natural scenes, thereby enhancing the recognition accuracy of lane line recognition systems based on vehicle-mounted cameras. In addition to considering the transformation relationships between the world coordinate system, the camera coordinate system, and the image plane coordinate system, the general camera model must also consider the geometric distortion produced by the camera's optical imaging lens and the imaging of continuous points in 3D space onto the 2D image plane, followed by the changes in discrete points and coordinate reference points generated during storage in computer memory (M*N). This transformation method is relatively complex and lacks high accuracy.
[0003] Research and analysis reveal that most current lane line recognition algorithms employ world coordinate transformation for lane line identification and alarm control. However, image coordinate-based alarm algorithms inevitably suffer from recognition errors on vehicles because the bottom of the image is actually located several meters in front of the vehicle, and the coordinates on the image do not accurately reflect the distance to the wheels. Therefore, it is necessary to analyze and research coordinate transformation formulas to improve the accuracy and speed of coordinate transformation. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a coordinate transformation method for lane line recognition. Based on a high-quality image acquisition system and the analysis and derivation of the world coordinate transformation algorithm in lane line recognition algorithms, this invention further analyzes and derives the transformation methods between the image coordinate system and the camera coordinate system regarding the horizontal and vertical coordinates, and points out existing problems and optimization directions in the coordinate transformation algorithm. To simplify coordinate transformation calculations, a coordinate transformation method based on tanγ0 calibration is derived. Substituting the tanγ0 calibration value into the transformation formula realizes the coordinate transformation function for lane line recognition. Finally, the transformation method is tested, and hardware installation suggestions for improving coordinate transformation accuracy are provided.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] A coordinate transformation method for lane line recognition includes the following steps:
[0007] S1. To acquire high-quality forward-looking video, construct an in-vehicle forward video image acquisition system;
[0008] S2. First, analyze and derive the general coordinate transformation process in the lane line recognition algorithm;
[0009] S3. To address the problems in the general coordinate transformation process, analyze and derive the transformation method between the image coordinate system and the world coordinate system;
[0010] S4. Analyze the problems existing in the coordinate transformation method in the previous step, and take these three problems as guidance to give a method to optimize the coordinate transformation;
[0011] S5. Considering the conditions set in the above coordinate transformation method, such as ideal camera installation, camera optical axis perpendicular to the vehicle, and a fixed pitch angle, the coordinate transformation method is further simplified;
[0012] S6. To simplify the coordinate transformation method, the parameter values in the coordinate transformation formula are calculated based on the physical size specifications of the CCD and CMOS chips;
[0013] S7. Based on the lens imaging theory, the principle that an object passing through the optical axis centerline is imaged at the center point of the image, the value of tanγ0 is directly applied to the conversion formula calculation by calibration measurement; six tanγ0 calibration methods are designed and analyzed, the optimal tanγ0 calibration method is selected, and the calibration value is substituted into the coordinate transformation formula, thus realizing high-precision coordinate transformation for lane line recognition.
[0014] A further improvement of the present invention is that the specific implementation method of step S1 is as follows:
[0015] Considering image quality and the stability of the detection system, an industrial camera was selected as the image acquisition module of the system. It is fixed to the windshield with a suction cup. The camera housing is designed to adjust the vertical tilt angle and the horizontal tilt angle. The camera lens is a zoom lens, which can adjust the brightness and color saturation of the captured image.
[0016] A further improvement of the present invention is that the specific implementation method of step S2 is as follows:
[0017] S201. The general camera model, in addition to considering the transformation relationships between the world coordinate system, camera coordinate system, and image plane coordinate system, also needs to consider the geometric singularities produced by the camera's optical imaging lens and the imaging of continuous points in 3D space onto the 2D image plane, as well as the changes in discrete points and coordinate reference points generated during storage in computer memory; the imaging transformation from objective scene to digital image is decomposed into four steps:
[0018] (1) Transformation from the world coordinate system W(X,Y,Z) to the camera 3D coordinate system C(x,y,z);
[0019] (2) Transformation from the camera 3D coordinate system C(x,y,z) to the distortion-free image plane coordinate system C(x',y');
[0020] (3) Transformation from the distortion-free image plane coordinate system C(x',y') to the actual image plane coordinate system E(x*,y*) with optical imaging distortion;
[0021] (4) Transformation from the actual image plane coordinate system E(x*,y*) with optical imaging distortion to the computer digital image storage coordinate system F(M,N);
[0022] S202. Analyze and derive the transformation between the vehicle coordinate system and the camera coordinate system; to obtain the mapping relationship between image coordinates and ground coordinates, first establish the vehicle coordinate system and the camera coordinate system; wherein, the camera coordinate system is fixed at the center of the camera lens, and the vehicle coordinate system is fixed at the vertical projection of the center of the vehicle's front axle onto the horizontal plane; first, the vehicle coordinate system O w Translate the coordinate axes X, Y, and Z, then rotate them by α around the Z-axis to obtain rotation matrix R1; next, rotate the coordinate axes by θ around the new X-axis to obtain rotation matrix R2; finally, rotate the coordinate axes by β around the new Y-axis to obtain rotation matrix R3. Combine these three rotations to obtain rotation matrix R, and obtain a new coordinate system O. C This is the camera coordinate system; assuming the ground is a plane, the transformation relationship between the two coordinate systems is:
[0023]
[0024] in,
[0025] Let t be a rotation matrix; t = [t1 t2 t3] T , is a translation matrix; converting to homogeneous coordinates, we have
[0026]
[0027] S203. Analyze and derive the transformation between the camera coordinate system and the imaging plane coordinate system; Let P(xc,yc,zc) be any point in the camera coordinate system. According to the pinhole imaging principle, its projection onto the imaging plane is P'(x',y'). According to the principle of similar triangles, the coordinate transformation formula is:
[0028]
[0029] The above formula is nonlinear; therefore, we introduce the homogeneous coordinate method to represent it as a linear matrix; the coordinates in the Cartesian coordinate system are P = [x...]. c ,y c ,z c The homogeneous matrix form of P is: ch= [kx c ,ky c ,kz cThe transformation matrix from Oc to O' is the superposition of the perspective transformation matrix and the translation transformation matrix, resulting in:
[0030]
[0031]
[0032]
[0033] Neglecting distortion, we have:
[0034] [x” y” 1] T =E3[x' y' 1] (7)
[0035] S204. Transformation between the imaging plane coordinate system and the image coordinate system: The coordinates from the camera imaging plane to the final computer image include scaling and translation. The transformation matrix is:
[0036]
[0037] The above transformation matrices are combined to form the camera intrinsic parameter transformation matrix, which has the following properties.
[0038]
[0039] Combining the processing steps S201 to S203, the camera transformation formula is obtained.
[0040]
[0041] R w-c (4*4) is the extrinsic transformation matrix, containing 6 independent parameters; R c-uv (3*3) is the intrinsic parameter transformation matrix, which contains 4 independent variables.
[0042] A further improvement of the present invention is that the specific implementation method of step S3 is as follows:
[0043] S301. The coordinate transformation algorithm for lane line recognition uses a world coordinate transformation algorithm for lane line recognition and alarm control, and the coordinate transformation formula is further optimized.
[0044] S302. Give the imaging model in the Y-axis direction of the image coordinate system and the camera coordinate system; let point O be the optical center of the camera, rectangle abcd be the imaging plane of the image with width W and height H, the road surface area corresponding to rectangle abcd is trapezoid ABCD, and OOC is the installation height h of the camera; take any point P on the road surface with coordinates (Px, Py), and the corresponding point of point P in the image is p with coordinates (px, py). The process of deriving the transformation formula between the two coordinate systems is equivalent to deriving the correspondence between (Px, Py) and (px, py);
[0045]
[0046]
[0047]
[0048]
[0049] This leads to the relationship between the ordinates of the two coordinate systems on the Y-axis;
[0050] S303. Similar to S302, the relationship between the horizontal coordinates of the two coordinate systems is derived below. The imaging model along the X-axis of the image coordinate system and the camera coordinate system is given. Based on geometric relationships, the following formula is derived:
[0051]
[0052]
[0053]
[0054] And the following relationship exists:
[0055]
[0056] P x =PQ=OQtanβ1(20)
[0057] Substituting equations (18) and (19) into equation (20), and after simplification, we obtain the conversion formula between the horizontal coordinates of the two coordinate systems, as shown in equation (21).
[0058]
[0059] Thus, equations (15) and (21) together form the coordinate transformation formula between the camera coordinate system and the image coordinate system.
[0060] A further improvement of this invention lies in the following specific improvements made in step S4, which analyzes the problems existing in the coordinate transformation algorithm:
[0061] The coordinate transformation algorithm has the following three problems: (1) The assumption of the field of view is not supported. What is actually needed is the image-side field of view, but the object-side field of view is used. (2) The method of taking the value of the field of view is prone to causing large calculation deviations. (3) The camera installation deviation and the angle deviation caused by vehicle movement are not considered. Based on these three problems, an optimized coordinate transformation method is given.
[0062] A further improvement of this invention lies in that, in step S5, the conditions of ideal camera installation, camera optical axis perpendicular to the vehicle, and a fixed pitch angle are set, further simplifying the coordinate transformation method. The specific implementation method of the coordinate transformation algorithm is analyzed as follows:
[0063] S501. Let point O be the optical center of the camera, rectangle abcd be the imaging plane of the image with width W and height H, and the road surface region corresponding to rectangle abcd be trapezoid ABCD. C That is, the installation height h of the camera; take any point P on the road surface, its coordinates are (P x P y Point P corresponds to point p in the image, and its coordinates are (p... x p y The coordinates of point P on the CCD chip are (p') x ,p' y The CCD chip has a width of w' and a height of h', and the image pixel size has a width of W and a height of H. The process of deriving the transformation formula between the two coordinate systems is equivalent to deriving (P). x P y ) and (p x p y The correspondence between them is shown; based on geometric relationships, the following formula is derived:
[0064]
[0065]
[0066]
[0067] This leads to the relationship between the ordinates of the two coordinate systems on the Y-axis;
[0068] S502. For the X-axis direction, based on geometric relationships, the following formula is derived:
[0069]
[0070]
[0071]
[0072] This leads to the derivation of the relationship between the ordinates of the two coordinate systems on the X-axis.
[0073] A further improvement of the present invention is that the specific implementation method of step S6 is as follows:
[0074] S601. For standard CCD and CMOS chips, their physical dimensions are fixed; the aspect ratio of a CCD image sensor chip is 4:3, and the length and width of a 1 / 4-inch CCD chip are 3.2mm and 2.4mm respectively; for a selected 6mm lens, and the corresponding image pixel size of 720x480:
[0075]
[0076]
[0077] A further improvement of the present invention is that the specific implementation method of step S7 is as follows:
[0078] S701. Regarding the calibration of tanγ0, according to the lens imaging theory, an object passing through the optical axis centerline is imaged at the center point of the image. Using this principle, the value of tanγ0 is measured by calibration and directly applied to the formula calculation, avoiding larger errors in the calculation of the tangent caused by angular deviation.
[0079] S702. Design and analyze six calibration methods for tanγ0;
[0080] Method 1:
[0081] Method 2:
[0082] For other calibration methods, the coordinate transformation formula in the y-direction has been derived previously as follows:
[0083]
[0084] At this point, if h has been measured, then for point G located on the optical axis,
[0085] P yG =htanγ0
[0086] If a plane is erected at a distance D from the camera, the height L of point A through which the optical axis passes;
[0087]
[0088]
[0089] Similarly, on the same vertical plane, the image of point B coincides with that of point Q;
[0090] Method 3:
[0091]
[0092]
[0093]
[0094] By moving the optical center, a point on the grid is aligned with the cursor, thus obtaining an L. B Simultaneously, the image coordinates can also be obtained, and tanγ0 can be calculated in reverse; L B Subtracting the two equations above, we get:
[0095] Method 4:
[0096]
[0097] Method 5: Actual road calibration. On a flat and open road, move the position of the optical center so that the cursor coincides with the ground plane point. This will give you an image coordinate point whose image coordinates correspond to the ground plane point.
[0098]
[0099]
[0100]
[0101]
[0102]
[0103] Y1C1-Y1y1 tanγ0=hy1+hC1 tanγ0
[0104] Y2C1-Y2y2 tanγ0=hy2+hC1 tanγ0
[0105] Y3C1-Y3y3 tanγ0=hy3+hC1 tanγ0
[0106] Method Six:
[0107] By selecting the optimal calibration method for tanγ0 and substituting the calibration value into the coordinate transformation formula, high-precision coordinate transformation for lane line recognition can be achieved.
[0108] A further improvement of the present invention is that it further includes the following steps:
[0109] S8. Test the coordinate transformation method and provide hardware installation suggestions for using the method to improve the accuracy of coordinate transformation.
[0110] A further improvement of the present invention is that the specific implementation method of step S8 is as follows:
[0111] S801. Analysis of the impact of camera installation position on coordinate transformation accuracy; The camera installation position has a horizontal offset, that is, a distance O from the vehicle centerline. x In this case, if the camera's centerline is perpendicular to the vehicle and parallel to the lane lines, then it has no effect on the theoretical derivation formula above; only the positions of the left and right lane lines will not be symmetrical in the camera coordinate system. If the camera's installation position has a horizontal offset angle, it is equivalent to having a yaw angle. In this case, the world coordinates corresponding to the above theoretical formula will be deflected. Assuming the camera's world coordinates relative to the vehicle's world coordinates change... The deflection, then the camera's world coordinates (X) C Y C ) and vehicle world coordinates (X) V Y V There is a transformation relationship:
[0112]
[0113]
[0114] cos0°=1
[0115] cos10°=0.985
[0116] cos18°=0.95
[0117] cos20°=0.94
[0118] For lane line recognition applications, X C The physical range is 0 to 3m, and if a 5% error is allowed in the measurement, the limit deviation will be 0.15m; Y C The physical range is from 0 to 40m. A 5% measurement error will result in a 2m limit deviation. To meet the 5% measurement error requirement, if we use the coordinate transformation formula derived earlier and do not consider the deflection angle, the 5% error requirement can be met when the deflection angle is <18 degrees.
[0119] S802. Analysis of the impact of vehicle motion on the camera; 1. Horizontal yaw angle: Theoretically, the horizontal yaw angle is affected by the same deflection angle as the camera's installation position; 2. Vertical pitch angle: As seen in the previous derivation, the accuracy of the coordinate transformation formula largely depends on the accuracy of the pitch angle measurement. The pitch motion of the vehicle during actual operation and the influence of road slope will both cause changes in the camera's pitch angle, thus introducing measurement errors; the following is a quantitative analysis of this error:
[0120]
[0121]
[0122] The installation location of the camera will vary depending on the vehicle model. Based on experience:
[0123] (1) The trolley is installed near the rearview mirror of the vehicle at a height of 1.3 to 1.5 m and a pitch angle of 70 to 85 degrees;
[0124] (2) The large vehicle is installed on the windshield in the middle of the dashboard, at a height of 1.5 to 1.7 m, with a pitch angle between 60 and 80 degrees;
[0125] For the trolley, take h = 1.4 and γ0 = 75° for calculation:
[0126]
[0127] Take a point (200, 0) on the horizontal center line of the image;
[0128]
[0129] If the pitch angle changes by 5 degrees, the resulting pitch angle should be 80 degrees;
[0130]
[0131] Take a point (200, 0) on the horizontal center line of the image;
[0132]
[0133] The errors in the horizontal and vertical coordinates are 33% and 34% respectively. That is to say, if the pitch angle changes by 5 degrees, it will bring a 30% error to the coordinate transformation. However, when driving on a slope, as long as the vehicle remains parallel to the road, the pitch angle will not change much.
[0134] For the large vehicle, take h = 1.6 and γ0 = 65° for calculation;
[0135]
[0136] Take a point (200, 0) on the horizontal center line of the image;
[0137]
[0138] If the pitch angle changes by 5 degrees, the resulting pitch angle should be 70 degrees.
[0139]
[0140] Take a point (200, 0) on the horizontal center line of the image;
[0141] The errors in the horizontal and vertical coordinates are 19% and 23% respectively. That is to say, if the pitch angle changes by 5 degrees, it will introduce a 20% error to the coordinate transformation. The above calculations are based on points on the X-axis of the image. Based on this, the calculation error for the X-axis should be close to the maximum, and the calculation error for the Y-axis should be close to the minimum.
[0142] S803. Analysis of coordinate transformation accuracy under two extreme working conditions;
[0143] To verify the extreme cases, the following two operating conditions are considered:
[0144] (a) h = 1.6, γ0 = 65°, take the point (360, -240) closest to the camera:
[0145]
[0146] Taking a point near the edge of the image (360, -240), the errors in the horizontal and vertical coordinates are 6% and 15%, respectively.
[0147] (b) h = 1.6, γ0 = 85°, take the point (200, 0) furthest from the camera:
[0148]
[0149] Take a point (200, 0) near the edge of the image;
[0150]
[0151] If the pitch angle changes by 1 degree, the resulting pitch angle should be 86 degrees;
[0152]
[0153] Take a point (200, 0) on the horizontal center line of the image;
[0154]
[0155] At this point, when the pitch angle changes by 1 degree, the errors in the horizontal and vertical coordinates are 20% and 20%, respectively.
[0156] tan60°=1.732
[0157] tan70°=2.747
[0158] tan80°=5.671
[0159] tan85°=11.43
[0160] tan86° = 14.3
[0161] tan87° = 19.08
[0162] The test results show that the larger the pitch angle, the more tangent value increases, and the measurement error caused by the change in pitch angle will also be magnified many times over.
[0163] The present invention has at least the following beneficial technical effects:
[0164] This invention provides a coordinate transformation method for lane line recognition. Based on a high-quality image acquisition system and the analysis and derivation of the world coordinate transformation algorithm in lane line recognition, this invention further analyzes and derives the transformation method between the image coordinate system and the camera coordinate system regarding the horizontal and vertical coordinates, and points out existing problems and optimization directions in the coordinate transformation algorithm. To simplify the coordinate transformation calculation, a coordinate transformation method based on tanγ0 calibration is derived. Six methods for tanγ0 calibration are proposed, and the optimal method is selected for calibration. Substituting the tanγ0 calibration value into the transformation formula achieves the coordinate transformation function for lane line recognition. Finally, the transformation method is tested, and hardware installation suggestions for improving coordinate transformation accuracy are given. This effectively improves the accuracy and real-time performance of coordinate transformation, thereby improving the accuracy of automatic lane line recognition, and has significant engineering application value. Attached Figure Description
[0165] Figure 1 This is a schematic diagram of the image coordinate transformation steps according to an embodiment of the present invention;
[0166] Figure 2 This is a schematic diagram of the vehicle coordinate system and camera coordinate system according to an embodiment of the present invention;
[0167] Figure 3 This is a projection diagram on the phase plane of an embodiment of the present invention;
[0168] Figure 4 This is a schematic diagram illustrating the transformation between the imaging plane coordinate system and the image coordinate system according to an embodiment of the present invention;
[0169] Figure 5 This is a schematic diagram of an imaging model in the Y-axis direction according to an embodiment of the present invention; wherein Figure 5 (a) is the image coordinate system. Figure 5 (b) is the camera coordinate system;
[0170] Figure 6 This is a schematic diagram of an imaging model along the X-axis according to an embodiment of the present invention; wherein Figure 6 (a) is the image coordinate system. Figure 6 (b) is the camera coordinate system;
[0171] Figure 7 This is a schematic diagram of the external shape of a CCD image sensor chip according to an embodiment of the present invention;
[0172] Figure 8 This is a physical dimension diagram of a CCD image sensor chip according to an embodiment of the present invention;
[0173] Figure 9 This is a schematic diagram of lens imaging according to an embodiment of the present invention;
[0174] Figure 10 This is a schematic diagram of the camera installation position coordinates according to an embodiment of the present invention;
[0175] Figure 11 This is a flowchart of a coordinate transformation method for lane line recognition according to the present invention. Detailed Implementation
[0176] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0177] like Figure 11 As shown, the present invention provides a coordinate transformation method for lane line recognition, comprising the following steps:
[0178] S1. Construct a high-quality vehicle-mounted forward video image acquisition system;
[0179] S2. Analyze and derive the coordinate transformation algorithm in the lane line recognition algorithm;
[0180] S3. Analyze and derive the method for transforming the image coordinate system to the world coordinate system;
[0181] S4. Analyze the problems in the coordinate transformation algorithm and provide directions for further algorithm optimization;
[0182] S5. Set the conditions that the camera is ideally installed, the camera's optical axis is perpendicular to the vehicle, and there is a fixed pitch angle to further simplify the coordinate transformation method;
[0183] S6. Based on the physical dimensions of the CCD and CMOS chips, calculate the parameter values in the coordinate transformation formula to further simplify the coordinate transformation method;
[0184] S7. Based on the lens imaging theory, the principle that an object passing through the optical axis centerline is imaged at the center point of the image, the value of tanγ0 is directly applied to the conversion formula calculation by calibration measurement; six tanγ0 calibration methods are designed and analyzed, the optimal tanγ0 calibration method is selected, and the calibration value is substituted into the coordinate transformation formula, thus realizing high-precision coordinate transformation for lane line recognition;
[0185] S8. The coordinate transformation method in this invention is tested, and hardware installation suggestions for using the method of this invention are given to improve the accuracy of coordinate transformation.
[0186] In embodiments of this application, step S1 includes:
[0187] Considering image quality and system stability, an industrial camera was selected as the system's image acquisition module. It is fixed to the windshield using a suction cup, and the camera housing is designed for adjustable tilt and yaw angles. A zoom lens is used, allowing for flexible adjustment of image brightness and color saturation. This mounting method offers the advantage of adjustable camera position and simplifies image quality adjustments.
[0188] In embodiments of this application, step S2 includes:
[0189] S201. The general camera model, in addition to considering the transformation relationships between the world coordinate system, camera coordinate system, and image plane coordinate system, also needs to consider the geometric singularities produced by the camera's optical imaging lens and the imaging of continuous points in 3D space onto the 2D image plane, as well as the changes in discrete points and coordinate reference points generated by storing them in computer memory (M*N). The imaging transformation from the objective scene to the digital image is decomposed into... Figure 1 The four steps shown:
[0190] (1) Transformation from the world coordinate system W(X,Y,Z) to the camera 3D coordinate system C(x,y,z);
[0191] (2) Transformation from the camera 3D coordinate system C(x,y,z) to the distortion-free image plane coordinate system C(x',y');
[0192] (3) Transformation from the distortion-free image plane coordinate system C(x',y') to the actual image plane coordinate system E(x*,y*) with optical imaging distortion;
[0193] (4) Transformation from the actual image plane coordinate system E(x*,y*) with optical imaging distortion to the computer digital image storage coordinate system F(M,N).
[0194] S202. Analyze and derive the transformation between the vehicle coordinate system and the camera coordinate system. To obtain the mapping relationship between image coordinates and ground coordinates, first establish... Figure 2 The diagram shows the vehicle coordinate system and the camera coordinate system. The camera coordinate system is fixed at the center of the camera lens, and the vehicle coordinate system is fixed at the vertical projection of the vehicle's front axle center onto the horizontal plane. First, the vehicle coordinate system O... w Translate the coordinate axes X, Y, and Z, then rotate them by α around the Z-axis to obtain rotation matrix R1; next, rotate the coordinate axes by θ around the new X-axis to obtain rotation matrix R2; finally, rotate the coordinate axes by β around the new Y-axis to obtain rotation matrix R3. Combine these three rotations to obtain rotation matrix R, and obtain a new coordinate system O. C This is the camera coordinate system. Assuming the ground is a plane, the transformation relationship between the two coordinate systems can be easily derived as follows:
[0195]
[0196] in,
[0197] Let t be a rotation matrix; t = [t1 t2 t3] T Let be the translation matrix. Converting to homogeneous coordinates, we have...
[0198]
[0199] S203. Analyze and derive the transformation between the camera coordinate system and the imaging plane coordinate system. Figure 3 Let P(xc,yc,zc) be any point in the camera coordinate system, and its projection onto the image plane be P'(x',y'). According to the principle of pinhole imaging, its projection onto the image plane is P'(x',y'). Based on the principle of similar triangles, the coordinate transformation formula is:
[0200]
[0201] The above formula is nonlinear; therefore, we introduce the homogeneous coordinate method to represent it in linear matrix form. The coordinates in the Cartesian coordinate system are P = [x...]. c ,y c ,z c The homogeneous matrix form of P is: ch= [kx c ,ky c ,kz c The transformation matrix from Oc to O' is the superposition of the perspective transformation matrix and the translation transformation matrix, resulting in:
[0202]
[0203]
[0204]
[0205] Neglecting distortion, we have:
[0206] [x” y” 1] T =E3[x' y' 1] (7)
[0207] S204. Transformation between the imaging plane coordinate system and the image coordinate system, the coordinate system transformation between the imaging plane coordinate system and the image coordinate system is as follows: Figure 4 As shown. The coordinates from the camera's imaging plane to the final computer image include scaling and translation, and the transformation matrix is:
[0208]
[0209] The above transformation matrices are combined to form the camera intrinsic parameter transformation matrix, which has the following properties.
[0210]
[0211] Combining the processing steps S201 to S203, the camera transformation formula is obtained.
[0212]
[0213] R w-c (4*4) is the extrinsic transformation matrix, containing 6 independent parameters; R c-uv (3*3) is the intrinsic parameter transformation matrix, which contains 4 independent variables.
[0214] In embodiments of this application, step S3 includes:
[0215] S301. The coordinate transformation algorithm for lane line recognition uses a world coordinate transformation algorithm for lane line recognition and alarm control. However, the alarm algorithm based on image coordinates inevitably has recognition errors on a car because the bottom of the image is actually a few meters away from the front of the car, and the coordinates on the image cannot actually reflect the distance of the wheel position. Further optimization of the coordinate transformation formula is needed.
[0216] S302. Provide a diagram illustrating the imaging model along the Y-axis of the image coordinate system and the camera coordinate system, as shown below. Figure 5 As shown. Figure 5 In the diagram, point O is the optical center of the camera, rectangle abcd is the imaging plane of the image with width W and height H, and the road surface area corresponding to rectangle abcd is trapezoid ABCD. OOC is the camera's installation height h. Take any point P on the road surface with coordinates (Px, Py). The corresponding point P in the image is p with coordinates (px, py). The process of deriving the transformation formula between the two coordinate systems is equivalent to deriving the correspondence between (Px, Py) and (px, py).
[0217]
[0218]
[0219]
[0220]
[0221] This leads to the derivation of the relationship between the ordinates of the two coordinate systems on the Y-axis.
[0222] S303. Similar to S302, the relationship between the horizontal coordinates of the two coordinate systems is derived below, and an imaging model diagram along the X-axis of the image coordinate system and the camera coordinate system is given, as follows: Figure 6 As shown. According to Figure 6 The geometric relationships in the equations allow us to derive the following formula:
[0223]
[0224]
[0225]
[0226] exist Figure 6 (b) contains the following relationship:
[0227]
[0228] P x =PQ=OQtanβ1(20)
[0229] Substituting equations (18) and (19) into equation (20), we can obtain the conversion formula between the horizontal coordinates of the two coordinate systems after simplification, as shown in equation (21).
[0230]
[0231] Thus, equations (15) and (21) together form the coordinate transformation formula between the camera coordinate system and the image coordinate system.
[0232] In an embodiment of this application, step S4 includes:
[0233] The above coordinate transformation algorithm still has the following three problems: (1) The assumption of the field of view is not supported. What is actually needed is the image-side field of view, but the object-side field of view is used in practice; (2) The method of determining the value of the field of view is prone to causing large calculation deviations; (3) The angle deviation caused by camera installation deviation and vehicle movement is not considered. Based on these three problems, an optimized coordinate transformation method is given.
[0234] In an embodiment of this application, step S5 includes:
[0235] S501. Figure 5 In the diagram, point O is the optical center of the camera, rectangle abcd is the imaging plane of the image with width W and height H, and the road surface region corresponding to rectangle abcd is trapezoid ABCD. C This refers to the camera's installation height h. Take any point P on the road surface; its coordinates are (P... x P y Point P corresponds to point p in the image, and its coordinates are (p... x p y The coordinates of point P on the CCD chip are (p') x ,p' y The CCD chip has a width of w' and a height of h', and the image pixel size has a width of W and a height of H. The process of deriving the transformation formula between the two coordinate systems is equivalent to deriving (P). x P y ) and (p x p y The correspondence between ) . According to Figure 5 The geometric relationships in the equations allow us to derive the following formula:
[0236]
[0237]
[0238] (For a fixed CCD chip, the chip size is constant; for a given (23)
[0239] The lens has a fixed focal length f; plus, the image pixel size is determined.
[0240] (It is a certain value)
[0241]
[0242] This leads to the derivation of the relationship between the ordinates of the two coordinate systems on the Y-axis.
[0243] S502. For the X-axis direction, according to Figure 6 The geometric relationships in the equations allow us to derive the following formula:
[0244]
[0245]
[0246]
[0247] This leads to the derivation of the relationship between the ordinates of the two coordinate systems on the X-axis.
[0248] In an embodiment of this application, step S6 includes:
[0249] S601. For standard CCD and CMOS chips, their physical dimensions are fixed. As follows: Figure 7 , Figure 8 As shown, the aspect ratio of the CCD image sensor chip is 4:3, and the length and width of the 1 / 4-inch CCD chip are 3.2mm and 2.4mm, respectively.
[0250] For the selected 6mm lens, and the corresponding image pixel size of 720x480:
[0251]
[0252]
[0253] In an embodiment of this application, step S7 includes:
[0254] S701. Regarding the calibration of tanγ0, the lens imaging diagram is as follows: Figure 9 As shown. According to lens imaging theory, an object passing through the optical axis centerline is imaged at the center point of the image. Using this principle, the value of tanγ0 is directly applied to the formula calculation by calibration measurement, avoiding larger errors in calculating the tangent value caused by angular deviation.
[0255] S702. Design and analyze six calibration methods for tanγ0.
[0256] Method 1:
[0257] Direct measurement will introduce errors in h, D, and L, potentially reducing accuracy. This calibration method is simple and intuitive, but the accuracy of L is difficult to guarantee, and it requires two people to perform the calibration. Similarly, the following formula will also introduce measurement errors during calibration.
[0258] Method 2:
[0259] The advantage of this calibration is that it can reduce the measurement errors of h and D, but the accuracy of L is still difficult to guarantee, and it requires two people to perform the calibration. Other calibration methods can be tried; the coordinate transformation formula in the y-direction has been derived previously as follows:
[0260]
[0261] At this point, if h has been measured, then for point G located on the optical axis,
[0262] P yG =htanγ0
[0263] If a plane is erected at a distance D from the camera, the height L of point A through which the optical axis passes is...
[0264]
[0265]
[0266] Similarly, on the same vertical plane, the image of point B coincides with that of point Q.
[0267] Method 3:
[0268]
[0269]
[0270]
[0271] By moving the optical center, a point on the grid is aligned with the cursor, thus obtaining an L. B Simultaneously, the image coordinates can also be obtained, allowing for the inverse calculation of tanγ0. The advantage of this calibration method is that it can be performed by one person, eliminating the need for two people, and the measurement error of L can be guaranteed. B Subtracting the two equations above, we get:
[0272] Method 4:
[0273]
[0274] Therefore, as long as we know p y Given the image coordinates, the distance D from the vertical plane to the camera, and the perpendicular distance between two points on the vertical plane, theoretically, solving the equations could yield the inverse calculation of tanγ0. However, the computational load is too high, and the equations may not even have a solution. This is not very feasible.
[0275] Method 5: Actual road calibration. On a flat and open road, move the position of the optical center so that the cursor coincides with the ground plane point. This will give you an image coordinate point, which corresponds to the ground plane point (FOE).
[0276]
[0277]
[0278] The advantage of this method is its simplicity; calibration can be completed by a single person. However, its disadvantage lies in the difficulty of guaranteeing accuracy when selecting the point at infinity.
[0279]
[0280]
[0281]
[0282] Y1C1-Y1y1 tanγ0=hy1+hC1 tanγ0
[0283] Y2C1-Y2y2 tanγ0=hy2+hC1 tanγ0
[0284] Y3C1-Y3y3 tanγ0=hy3+hC1 tanγ0
[0285] Method Six:
[0286] The problem with method six is that it requires finding three points on the ground plane, which makes it difficult to guarantee accuracy, and it is also difficult for two people to coordinate the calibration.
[0287] By selecting the optimal calibration method for tanγ0 and substituting the calibration value into the coordinate transformation formula, high-precision coordinate transformation for lane line recognition can be achieved.
[0288] In an embodiment of this application, step S8 includes:
[0289] S801. Analysis of the impact of camera installation position on coordinate transformation accuracy. The camera installation position has a horizontal offset, specifically a distance O from the vehicle centerline. x In this case, if the camera's centerline is perpendicular to the vehicle and parallel to the lane lines, then it has no impact on the theoretical derivation formula above; only the positions of the left and right lane lines will not be symmetrical in the camera's coordinate system. If the camera's installation position has a horizontal offset angle, it is equivalent to having a yaw angle. In this case, the world coordinates corresponding to the above theoretical formula will be deflected. Assuming... Figure 10 The diagram shows the coordinates of the camera's installation location. The camera's world coordinates relative to the vehicle's world coordinates change. The deflection, then the camera's world coordinates (X) C Y C ) and vehicle world coordinates (X) V Y V There is a transformation relationship:
[0290]
[0291]
[0292] cos0°=1
[0293] cos10°=0.985
[0294] cos18°=0.95
[0295] cos20°=0.94
[0296] For lane line recognition applications, X C The physical range is approximately 0 to 3 meters. If a 5% measurement error is allowed, the maximum allowable deviation will be 0.15 meters. C The physical range is approximately 0 to 40 meters, and a 5% measurement error will result in a 2-meter limit deviation. To meet the 5% measurement error requirement, if the coordinate transformation formula derived earlier is used for calculation without considering the deflection angle, the 5% error requirement can be met when the deflection angle is <18 degrees.
[0297] S802. Analysis of the impact of vehicle motion on the camera. 1. Horizontal yaw angle: Theoretically, the horizontal yaw angle is affected by the same deflection angle as the camera's installation position. 2. Vertical pitch angle: As seen in the previous derivation, the accuracy of the coordinate transformation formula largely depends on the measurement accuracy of the pitch angle. The pitch motion of the vehicle during actual operation and the influence of road slope both cause changes in the camera's pitch angle, thus introducing measurement errors. The following is a quantitative analysis of this error:
[0298]
[0299]
[0300] The installation location of the camera generally varies depending on the vehicle model. Based on experience:
[0301] (1) The car is installed near the rearview mirror of the vehicle, at a height of about 1.3 to 1.5 m, with a pitch angle between 70 and 85 degrees;
[0302] (2) The large vehicle is mounted on the center windshield of the dashboard, at a height of 1.5–1.7 m, with a pitch angle between 60 and 80 degrees. For the small vehicle, take h = 1.4 and γ0 = 75° for calculation:
[0303]
[0304] Take a point (200, 0) on the horizontal center line of the image.
[0305]
[0306] If the pitch angle changes by 5 degrees, the resulting pitch angle should be 80 degrees.
[0307]
[0308] Take a point (200, 0) on the horizontal center line of the image.
[0309]
[0310] =1.2
[0311] The errors in the horizontal and vertical coordinates are 33% and 34% respectively. This means that a 5-degree change in the pitch angle will introduce approximately 30% error into the coordinate transformation. However, when driving on a slope, as long as the vehicle remains parallel to the road, the pitch angle will not change significantly.
[0312] For the large vehicle, take h = 1.6 and γ0 = 65° for calculation.
[0313]
[0314] Take a point (200, 0) on the horizontal center line of the image.
[0315]
[0316] If the pitch angle changes by 5 degrees, the resulting pitch angle should be 70 degrees.
[0317]
[0318] Take a point (200, 0) on the horizontal center line of the image.
[0319] The errors in the x and y coordinates are 19% and 23% respectively. This means that a 5-degree change in the pitch angle will introduce approximately 20% error into the coordinate transformation. The above calculations use points on the X-axis of the image. Based on this, the calculation error for the X-axis should be close to its maximum, and the calculation error for the Y-axis should be close to its minimum.
[0320] S803. Analysis of coordinate transformation accuracy under two extreme working conditions.
[0321] To verify the extreme cases, the following two operating conditions are considered:
[0322] (1) h = 1.6, γ0 = 65°, take the point (360, -240) closest to the camera:
[0323]
[0324] Taking a point near the edge of the image (360, -240), the errors in the horizontal and vertical coordinates are 6% and 15%, respectively.
[0325] (2) h = 1.6, γ0 = 85°, take the point (200, 0) farthest from the camera:
[0326]
[0327] Take a point (200, 0) near the edge of the image.
[0328]
[0329] If the pitch angle changes by 1 degree, the resulting pitch angle should be 86 degrees.
[0330]
[0331] Take a point (200, 0) on the horizontal center line of the image.
[0332]
[0333] At this point, when the pitch angle changes by 1 degree, the errors in the horizontal and vertical coordinates are 20% and 20%, respectively.
[0334] tan60°=1.732
[0335] tan70°=2.747
[0336] tan80°=5.671
[0337] tan85°=11.43
[0338] tan86° = 14.3
[0339] tan87° = 19.08
[0340] The test results show that the larger the pitch angle, the more drastically the tangent value increases, and the measurement error caused by the change in pitch angle is magnified exponentially. Therefore, minimizing the installation pitch angle while ensuring the recognition distance is a crucial consideration during installation.
[0341] The foregoing description illustrates and describes a preferred embodiment of the present invention. However, as previously stated, it should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A coordinate transformation method for lane line recognition, characterized by, Comprising the following steps: S1. For collecting high-quality front video, a vehicle-mounted front video image acquisition system is constructed; S2. First, analyze and deduce the general coordinate transformation process for lane line recognition algorithm; S3. In view of the problems in the general coordinate transformation process, the conversion method of the image coordinate system and the world coordinate system is analyzed and deduced; S4. Analyze the problems in the coordinate transformation method in the last step, and give the method of optimizing the coordinate transformation according to the three problems as the guide direction; S5. Considering the above coordinate transformation method, the ideal camera installation condition, the camera optical axis is perpendicular to the vehicle and there is a fixed pitch angle, the coordinate conversion method is further simplified; S6. In order to simplify the coordinate conversion method, according to the physical size specification of CCD and CMOS chip, the parameter value in the coordinate conversion formula is calculated; S7. According to the lens imaging theory, the object through the optical axis center line is imaged on the image center point principle, through the calibration measurement The value is directly applied to the conversion formula calculation; six Calibration methods are designed and analyzed, and the optimal Calibration method is selected, and the calibration value is brought into the coordinate conversion formula, that is, the high-precision coordinate conversion for lane line recognition is realized; The specific implementation method is as follows: S701. Regarding the calibration of the lens, according to the lens imaging theory, the object through the optical axis center line is imaged on the image center point, using this principle, the value of the calibration measurement is directly applied to the formula calculation, avoiding greater error of the tangent value caused by the angle deviation; S702. Design and analyze six kinds of calibration methods of calibration methods; Method 1: ; Method 2: ; Other calibration methods, the coordinate transformation formula in y direction has been derived as follows: At this time, if h has been measured, for the G point on the optical axis, At this time, a vertical plane is erected at a distance D from the camera, and point A on the optical axis has a height L; By the same reasoning, on the same vertical plane, the image of point B coincides with Q; Method 3: By moving the optical center, the point on the grid coincides with the cursor, so that a At the same time, the image coordinates can also be obtained, and the inverse calculation is ; Subtracting the above two equations, we get: Method 4: Method 5: Actual road calibration, on a flat and open road, move the position of the optical center so that the light mark coincides with the ground point, so that an image coordinate point is obtained, whose image coordinates correspond to the ground point; Method Six: selecting the optimal calibration method, and bringing the calibration value into the coordinate conversion formula, i.e. realizing high-precision coordinate conversion for lane line recognition.
2. The lane line recognition-oriented coordinate transformation method according to claim 1, characterized in that, The specific implementation method of step S1 is as follows: Considering the image quality and the stability of the detection system, an industrial camera is selected as the image acquisition module of the system, a suction cup is used to fix it on the front windshield, the camera shell is set to be adjustable in up-down pitch angle and left-right deviation angle, and a variable focus lens is selected for the camera lens, which can adjust the brightness and color saturation of the captured image.
3. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein The specific implementation method of step S2 is as follows: S201. In addition to considering the transformation relationship between the world coordinate system, the camera coordinate system and the image plane coordinate system, the geometric anomaly caused by the camera optical imaging lens and the change of the discrete point and coordinate reference point caused by the continuous point in 3D space to the 2D image plane are also considered; The imaging transformation from the objective scene to the digital image is divided into four steps: (1) Transformation between world coordinate system W(X, Y, Z) and camera 3D coordinate system C(x, y, z); (2) Transformation between camera 3D coordinate system C(x, y, z) and non-distortion image plane coordinate system C(x’, y’); (3) transformation between the no-distortion image plane coordinate system C(x', y') and the actual image plane coordinate system with optical imaging distortion ; (4) the transformation between the actual image plane coordinate system with optical imaging distortions F(x, y) to the computer digital image memory coordinate system F(M, N). S202. Analyzing and deriving the transformation between the vehicle coordinate system and the camera coordinate system; in order to obtain the mapping relationship between the image coordinates and the ground coordinates, first, the vehicle coordinate system and the camera coordinate system are established; wherein the camera coordinate system is fixed at the center of the camera lens, and the vehicle coordinate system is fixed at the vertical projection of the vehicle front axle center on the horizontal plane; first, the vehicle coordinate system O w is translated x, y, z, and then rotated around the Z axis , to obtain the rotation matrix R1; then the coordinate axis is rotated around the new x axis , to obtain the rotation matrix R2; finally, the coordinate axis is rotated around the new y axis , to obtain the rotation matrix R3; the above three rotations are combined to obtain the rotation matrix R, and a new coordinate system O c , which is the camera coordinate system; assuming that the ground is a plane, the conversion relationship between the two coordinate systems is derived as: (1) Wherein, is a rotation matrix; is a translation matrix; in homogeneous coordinates, there is , (2) S203. Analysis and deduction of camera coordinate system and imaging plane coordinate system transformation; Let P(xc, yc, zc) be any point in the camera coordinate system, according to the pinhole imaging principle, its projection on the image plane is P’(x’, y’), according to the similar triangle principle, the coordinate transformation formula is: , (3) The above formula is nonlinear, and a homogeneous coordinate method is introduced to express it in a linear matrix form; the homogeneous matrix form of the coordinates P = [x c ,y c ,z c ] in the Cartesian coordinate system is P ch= [kx c ,ky c ,kz c ,k];the transformation matrix from Oc to O' is the superposition of the perspective transformation matrix and the translation transformation matrix, and the following is obtained: (4) (5) (6) Without considering distortion, then: (7) S204. Transformation between imaging plane coordinate system and image coordinate system, the coordinate transformation matrix of camera imaging plane to the final computer image includes scaling and translation, and the transformation matrix is: (8) Combine the above transformation matrix to form the camera intrinsic parameter transformation matrix, which is (9) The camera conversion formula is obtained by integrating the processing steps of S201-S203 (10) is an extrinsic transformation matrix, containing 6 independent parameters; is an intrinsic transformation matrix, containing 4 independent parameters.
4. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein The specific implementation method of step S3 is as follows: S301. In the coordinate transformation algorithm for lane line recognition, the world coordinate transformation algorithm is used for lane line recognition and alarm control, and the coordinate transformation formula is further optimized; S302. Give the imaging model of Y axis direction of image coordinate system and camera coordinate system; set O Point is the optical center of the camera, rectangle abcd is the imaging plane of the image, the width is W , the height is H , rectangle abcd The corresponding road surface area is trapezoidal ABCD , OO C is the installation height of the camera h ; take a point on the road surface P , the coordinates are ( Px , Py ), P The corresponding point in the image is p , the coordinates are ( px , py ), the process of deriving the conversion formula of the two coordinate systems is equivalent to deriving the corresponding relationship between ( Px , Py ) and ( px , py ) ; The conversion relationship between the longitudinal coordinates of the two coordinate systems on the Y axis is derived as follows: S303. Similar to S302, the relationship between the horizontal coordinates of the two coordinate systems is derived as follows: the imaging model of the X axis direction of the image coordinate system and the camera coordinate system is given, and the following formula is derived according to the geometric relationship: And the following relationship exists: Substitute formula (18) and (19) into formula (20), and after rearrangement, the conversion formula between the horizontal coordinates of the two coordinate systems is obtained, as shown in formula (21); Therefore, formula (14) and (20) together constitute the coordinate conversion formula between the camera coordinate system and the image coordinate system.
5. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein The specific implementation method of step S4 for analyzing the problems in the coordinate conversion algorithm is as follows: The coordinate conversion algorithm has the following three problems: (1) the assumption of the field of view angle lacks support, and the actual requirement is the image field of view angle, but the object field of view angle is used when used; (2) the method of selecting the field of view angle is easy to cause large calculation deviation; (3) the camera installation deviation and the angle deviation caused by vehicle movement are not considered; taking the above three problems as the guide direction, the method for optimizing the coordinate transformation is given.
6. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein In step S5, the ideal camera installation condition that the camera optical axis is perpendicular to the vehicle and there is a fixed pitch angle is set, and the coordinate conversion method is further simplified. The specific implementation method of the coordinate conversion algorithm is as follows: S501. Set O is the optical center of the camera, the rectangle abcd is the imaging plane of the image, with a width of W and a height of H , and the rectangle abcd corresponds to a road surface area that is a trapezoid ABCD , OO C , which is the installation height of the camera h ; a random point P on the road surface has coordinates P x , P y ), P , the corresponding point of the point in the image is p , with coordinates p x , p y ), P , the imaging point coordinates of the point on the CCD chip are , , the CCD chip has a width of w' and a height of h', the image pixel size has a width of W and a height of H, and the process of deriving the conversion formula between the two coordinate systems is equivalent to deriving the corresponding relationship between P x , P y and p x , p y ; according to the geometric relationship, the following formula is derived: The conversion relationship between the longitudinal coordinates of the two coordinate systems on the Y axis is derived as follows: S502. For the X axis direction, the following formula is derived according to the geometric relationship: The conversion relationship between the longitudinal coordinates of the two coordinate systems on the X axis is derived as follows.
7. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein The specific implementation method of step S6 is as follows: S601. For standard CCD and CMOS chips, the physical size specifications are fixed; the length-width ratio of a CCD image sensor chip is 4:3, and the length and width of a 1 / 4-inch CCD chip are 3.2 mm and 2.4 mm respectively; for a selected 6 mm lens and the corresponding image pixel size 720 x 480: 。 8. The lane line recognition-oriented coordinate transformation method according to claim 1, wherein The following steps are also included: S8. Test the coordinate conversion method, and give the hardware installation suggestion for using the method to improve the accuracy of coordinate conversion.
9. The lane line recognition-oriented coordinate transformation method according to claim 8, wherein, The specific implementation method of step S8 is as follows: S801. Analysis of the influence of camera mounting position on coordinate transformation accuracy; the camera mounting position has a horizontal direction offset, that is, the distance from the vehicle center line ; in this case, if the camera center line is perpendicular to the vehicle and parallel to the lane line, then the above theoretical derivation formula has no effect, only the positions of the left and right lane lines are not symmetrical in the camera coordinates; the camera mounting position has a horizontal direction offset angle, which is equivalent to having a yaw angle, in this case, the world coordinates corresponding to the above theoretical formula will be deflected; assuming that the camera world coordinates are deflected relative to the vehicle world coordinates , then the camera world coordinates ( , ) and the vehicle world coordinates ( , ) have a conversion relationship: For the application of lane line recognition, The physical range is 0 to 3 m, and if a 5% measurement error is allowed, the limit deviation will allow 0.15 m; The physical range is 0 to 40 m, and a 5% measurement error will bring a 2 m limit deviation; and to meet the 5% measurement error requirement, if the coordinate transformation formula derived above is used for calculation without considering the deflection angle, the 5% error requirement can be met in the case of a deflection angle < 18 degrees; S802. Analysis of the influence of vehicle movement on the camera; 1. Horizontal yaw angle: the influence of the horizontal yaw angle is theoretically consistent with the deflection angle of the camera installation position; 2. Vertical pitch angle: from the previous derivation process, the accuracy of the coordinate transformation formula is mostly dependent on the measurement accuracy of the pitch angle, and the pitch movement in the actual vehicle operation process and the influence of the road slope will cause the change of the camera pitch angle, thereby causing measurement errors; the following quantitatively analyzes the error: The installation position of the camera will be different according to the vehicle type. According to experience: (1) Small car is installed near the rearview mirror, height is 1.3~1.5m, pitch angle is between 70~85 degrees; (2) Large car is installed in the middle of the instrument panel above the windshield, height is 1.5~1.7m, pitch angle is between 60~80 degrees; For the trolley, take , Calculation: Take a point on the horizontal center line of the image (200, 0); If the pitch angle changes by 5 degrees, the pitch angle should be 80 degrees; Take a point on the horizontal center line of the image (200, 0); The error of horizontal and vertical coordinates is 33% and 34% respectively, that is, if the pitch angle changes by 5 degrees, it will bring 30% error to coordinate transformation; And for the slope driving, as long as the vehicle and the road keep parallel, the pitch angle will not change much; For the cart, take , calculations; Take a point on the horizontal center line of the image (200, 0); If the pitch angle changes by 5 degrees, the pitch angle should be 70 degrees; Take a point on the horizontal center line of the image (200, 0); The error of horizontal and vertical coordinates is 19% and 23% respectively, that is, if the pitch angle changes by 5 degrees, it will bring 20% error to coordinate transformation; The above calculation takes the point on the X axis of the image, based on this consideration, the calculation error of X axis should be close to the maximum, and the calculation error of Y axis should be close to the minimum; S803. Analysis of coordinate conversion accuracy under two extreme conditions; To verify the extreme case, take the following two conditions: (a) , , take the point near the camera (360, -240): Take a point near the edge of the image (360, -240) to get the error of horizontal and vertical coordinates respectively: 6%, 15%; (b) , , take the point far from the camera (200, 0): Take a point on the horizontal center line of the image (200, 0); If the pitch angle changes by 1 degree, the pitch angle should be 86 degrees; Take a point on the horizontal center line of the image (200, 0); At this time, when the pitch angle changes by 1 degree, the error of horizontal and vertical coordinates is 20% and 20% respectively; From the above test results, the greater the pitch angle, the tangent value increases sharply, and the measurement error caused by the change of pitch angle will also be multiplied.
Citation Information
Patent Citations
Method for measuring vehicle lane deviation
CN113569663A
Lane line detection method and system, and method and system for lane deviation prewarning
WO2015043510A1