Track geometry detection system calibration method and device
By using specially-made calibration targets and nonlinear optimization objective functions in the orbital geometry detection system, the problem of failing to calibrate the camera coordinate system transformation relationship of the left and right laser camera components is solved, and the function of representing the measurement results of the laser camera components on both sides in the same coordinate system is realized.
Patent Information
- Application Number
- CN202110080825.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-01-21
AI Technical Summary
The existing track geometry detection system fails to calibrate the transformation relationship between the camera coordinate systems of the two laser camera components on the left and right, resulting in the inability to correlate the spatial position relationship of the two laser camera components on the left and right, it is impossible to determine whether the left and right laser planes are installed coplanarly, and the measurement results of the laser camera components on both sides cannot be represented in the same coordinate system.
By using a specially designed calibration target in the orbital geometry detection system, the plane calibration plate images of multiple calibration targets in the camera's laser camera components on the left and right sides under different postures, the feature points of each image are extracted, and the nonlinear optimization objective function is constructed, and the transformation relationship between the camera coordinate systems on the left and right sides is solved.
The transformation relationship between the camera coordinate systems of the left and right laser camera components is realized, and the problem of not being able to correlate the spatial position relationship between the left and right laser camera components is solved. The measurement results of the laser camera components on both sides can be represented in the same coordinate system, and whether the left and right laser planes are installed coplanarly.
Smart Images

Figure CN112785654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of track detection technology, and in particular to a calibration method and device for a track geometry detection system. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] In the current track geometry detection system, the transformation relationship between the camera coordinate systems of the left and right laser camera assemblies is not calibrated, that is, the transformation relationship between the two camera coordinate systems is an unknown parameter. This will cause many problems, such as the inability to associate the spatial position relationship between the left and right laser camera assemblies, the inability to determine whether the left and right laser planes are installed coplanar, and the inability to represent the measurement results of the laser camera assemblies on both sides in the same coordinate system. Summary of the invention
[0004] An embodiment of the present invention provides a calibration method for a track geometry detection system, which is used to calibrate the transformation relationship between camera coordinate systems in left and right laser camera assemblies. The method includes:
[0005] The cameras in the left and right laser camera assemblies in the track geometry detection system collect multiple plane calibration plate images of the calibration target in different postures; the calibration target includes a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and the plane calibration plates are provided with multiple evenly distributed marking points, and the calibration target is set within the working range of the left and right laser camera assemblies;
[0006] Extract the feature points of each plane calibration plate image, and construct a nonlinear optimization objective function based on the extracted feature point pairs of the left and right plane calibration plates;
[0007] According to the nonlinear optimization objective function, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained.
[0008] The embodiment of the present invention further provides a track geometry detection system calibration device, which is used to calibrate the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies, and the device includes:
[0009] The acquisition unit is used to acquire multiple plane calibration plate images of the calibration target in different postures through the cameras in the left and right laser camera assemblies in the track geometry detection system; the calibration target includes a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and the plane calibration plates are provided with multiple evenly distributed marking points, and the calibration target is arranged within the working range of the left and right laser camera assemblies;
[0010] A construction unit is used to extract feature points of each plane calibration plate image, and construct a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates;
[0011] The calibration unit is used to obtain the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the nonlinear optimization objective function.
[0012] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned track geometry detection system calibration method when executing the computer program.
[0013] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned track geometry detection system calibration method.
[0014] In an embodiment of the present invention, a calibration scheme for a track geometry detection system is provided by: collecting multiple plane calibration plate images of calibration targets in different postures through cameras in left and right laser camera assemblies in the track geometry detection system; the calibration target comprises a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and a plurality of evenly distributed marking points are arranged on the plane calibration plates, and the calibration target is arranged within the working range of the left and right laser camera assemblies; extracting feature points of each plane calibration plate image, and constructing a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates; and obtaining the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the nonlinear optimization objective function. The present invention can calibrate the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0016] Figure 1 This is a schematic diagram of track geometry measurement in an embodiment of the present invention;
[0017] Figure 2 Schematic diagram of the camera coordinate system on both sides of the track geometry detection system in an embodiment of the present invention;
[0018] Figure 3A-3B Schematic diagram of a specially prepared calibration target in an embodiment of the present invention, wherein: Figure 3A is a top view of the calibration target. Figure 3BThis is a side view of the calibration target;
[0019] Figure 4 It is a schematic diagram of the structure of track geometry measurement in an embodiment of the present invention;
[0020] Figure 5 Schematic diagram of the principle of the track geometry measurement process in an embodiment of the present invention;
[0021] Figure 6 A schematic diagram of the movement of a specially made target in an embodiment of the present invention;
[0022] Figure 7A-7B Schematic diagram of a plane calibration plate image of a special target in a certain posture captured by cameras on both sides in an embodiment of the present invention, wherein: Fig. 7A This is a schematic diagram of the plane calibration plate image captured by the left camera. Figure 7B Schematic diagram of the plane calibration plate image captured by the right camera;
[0023] Figure 8 Schematic diagram of feature point extraction process in an embodiment of the present invention;
[0024] Fig. 9 are feature points acquired by the left camera under the reference coordinate system rcs1 in the embodiment of the present invention;
[0025] Fig.10 are feature points acquired by the right camera under the reference coordinate system rcs2 in the embodiment of the present invention;
[0026] Fig.11 is the distance D between the special target feature point pairs in the embodiment of the present invention k Schematic diagram;
[0027] Fig.12 Schematic diagram of a checkerboard plane target calibration plate in an embodiment of the present invention;
[0028] Fig.13 Schematic diagram of a calibration method for a track geometry detection system in an embodiment of the present invention;
[0029] Fig.14 Schematic diagram of the structure of the track geometry detection system calibration device in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0031] The track geometry detection system can measure various types of geometric irregularity parameters such as track gauge, track direction, height, level and triangular pit in real time. It has the characteristics of good stability, high repeatability and strong accuracy. It is widely used in daily inspection of existing railways in my country and joint commissioning and testing of new railways. Figure 1 is the schematic diagram of track geometry measurement (in Figure 1 In the figure, 1-1 is the left camera, 1-2 is the right camera, 2-1 is the left line laser, 2-2 is the right line laser, 3-1 is the left rail, 3-2 is the right rail, 4 is the inertial measurement unit, and 5 is the detection beam). A set of laser camera components is composed of 1 camera and 1 line laser, and there is a set of laser camera components obliquely above each of the two rails. In the two sets of laser camera components, the laser plane emitted by the line laser is perpendicular to the longitudinal direction of the rail. The camera takes the laser cross-sectional image of the rail at a certain angle. Through the extraction of the center of the light strip and data calibration, the half-section profile of the left and right rails is obtained, and then the lateral and vertical displacements of the rails relative to the detection beam can be obtained. The track gauge is synthesized by the lateral displacement of the two rails. The data obtained by combining the lateral displacement and vertical displacement with the inertial measurement unit can be used to synthesize the track direction and height. It can be seen that the measurement results of the laser camera component directly affect the final track geometry measurement accuracy.
[0032] Figure 2 This is a schematic diagram of the camera coordinate system on both sides of the track geometry detection system (in Figure 2 In the figure, 1-1 is the left camera, 1-2 is the right camera, 2-1 is the left line laser, 2-2 is the right line laser, 3-1 is the left rail, and 3-2 is the right rail). The camera coordinate systems ccs1 and ccs2 are established in the left and right laser camera assemblies respectively. The transformation relationship of the camera coordinate systems on both sides includes the rotation matrix and the translation vector. The rotation matrix and the translation vector from the left camera coordinate system ccs1 to the right camera coordinate system ccs2 are respectively and It can be expressed by the following formula (1):
[0033]
[0034] in,
[0035]
[0036]
[0037]
[0038] Let P = (x ccs1 ,y ccs1 ,z ccs1 ) T is any point in the left camera coordinate system, Q=(x ccs2 ,yccs2 ,z ccs2 ) T is any point in the right camera coordinate system, Q'=(x' ccs1 ,y' ccs1 ,z' ccs1 ) is the coordinate of point Q in the left camera coordinate system. If the transformation relationship between the left and right camera coordinate systems is known, it can be obtained by the formula:
[0039]
[0040] The coordinates of any point in the right camera coordinate system are transformed into the left camera coordinate system, and then the spatial position relationship of the left and right laser camera assemblies can be associated, and it can be determined whether the left and right laser planes are installed coplanar, so as to achieve the measurement results of the laser camera assemblies on both sides in the same coordinate system.
[0041] The inventor discovered a technical problem: since the left and right cameras do not have a common field of view, the current track geometry detection system does not calibrate the transformation relationship between the left and right camera coordinate systems. Therefore, the transformation relationship between the two camera coordinate systems is an unknown parameter, which makes it impossible to associate the spatial position relationship between the left and right laser camera assemblies, and it is impossible to express the measurement results of the laser camera assemblies on both sides in the same coordinate system, and it is even more impossible to determine whether the left and right laser planes are installed coplanarly.
[0042] In summary, it is precisely because the inventors have taken the above-mentioned technical problems into consideration that in order to obtain the transformation relationship between the left and right camera coordinate systems of the track geometry detection system, an embodiment of the present invention proposes a calibration scheme for a track geometry detection system. The scheme designs a special calibration target, which rigidly connects two plane calibration plates through a connecting rod. The left and right cameras simultaneously collect images of the plane calibration plate under different postures of the special target (calibration target), and utilize the rule that the distance between the feature point pairs of the left and right plane calibration plates remains unchanged during the movement or rotation of the special target to construct a nonlinear optimization objective function, and solve the transformation relationship between the coordinate systems of the cameras on the left and right sides through nonlinear optimization. The calibration scheme for the track geometry detection system is introduced in detail as follows.
[0043] Fig.13 FIG. 1 is a schematic diagram of a calibration method for a track geometry detection system according to an embodiment of the present invention. Fig.13 As shown, the method comprises the following steps:
[0044] Step 101: collecting a plurality of plane calibration plate images of calibration targets in different postures through cameras in the left and right laser camera assemblies in the track geometry detection system; the calibration target comprises a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, the plane calibration plates are provided with a plurality of evenly distributed marking points, and the calibration target is arranged within the working range of the left and right laser camera assemblies;
[0045] Step 102: extracting feature points of each plane calibration plate image, and constructing a nonlinear optimization objective function based on the extracted feature point pairs of the left and right plane calibration plates;
[0046] Step 103: According to the nonlinear optimization objective function, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained.
[0047] The present invention can calibrate the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies. The left and right sides mentioned in the embodiments of the present invention refer to both the left and right sides.
[0048] Figure 3A-3B is a specially made calibration target in the embodiment of the present invention (in Figure 3A-3B In the figure, 4 is a connecting rod, 5-1 is a left plane calibration plate, and 5-2 is a right plane calibration plate), which consists of 1 connecting rod and 2 plane calibration plates. The two plane calibration plates are rigidly connected by the connecting rod. The length of the connecting rod is 1600mm, which is slightly larger than the standard track gauge of 1435mm. Figure 4 is a schematic diagram of the structure of an embodiment of the present invention (in Figure 4 In the figure, 1-1 is the left camera, 1-2 is the right camera, 2-1 is the left line laser, 2-2 is the right line laser, 3-1 is the left rail, 3-2 is the right rail, 4 is the connecting rod, 5-1 is the left plane calibration plate, 5-2 is the right plane calibration plate), the special target is set within the working range of the left and right laser camera components. For example, it is best to place the special target directly below the existing track geometry detection system and directly above the left and right rails to ensure that the left camera can fully capture the left plane calibration plate of the special target, and at the same time ensure that the right camera can also fully capture the right plane calibration plate of the special target. Figure 5 As shown, with the center of the plane calibration plate as the origin and the upper surface as the XOY plane, corresponding target coordinate systems tcs1 and tcs2 are established on the two plane calibration plates respectively.
[0049] According to the pinhole imaging model, a point (x tcs ,y tcs ,z tcs ) T and a point (u,v) in the imaging plane T The transformation relationship can be:
[0050]
[0051] Among them, s is the scale factor, R and t are the rotation matrix and translation vector from the camera coordinate system to the target coordinate system, which belong to the camera external parameters, and A is the camera internal parameter matrix, including the camera internal parameters f x ,fy ,u0,v0, expressed by formula (7):
[0052]
[0053] Figure 5 It is a schematic diagram of the principle of the track geometry measurement process in an embodiment of the present invention, which is mainly divided into the following 6 steps.
[0054] In the first step, the traditional calibration method of the track geometry detection system is used to obtain the camera intrinsic parameter matrix A of the left and right laser camera assemblies respectively.
[0055] Step 2: Use the cameras on both sides to simultaneously capture images of the special target in different postures. Place the special target in the field of view of the left and right cameras, ensuring that the left camera can fully capture the left plane calibration plate of the special target, and the right camera can fully capture the right plane calibration plate of the special target. Each left and right camera captures an image of the special target. Figure 6 As shown, a motion coordinate system mcs is established at the center of the special target. The special target can translate along the three axes of the motion coordinate system and rotate around the three axes. Figure 6 The motion diagram of the special target in the figure adjusts the posture of the special target, and always ensures that the left and right cameras can simultaneously capture the complete plane calibration plate. The left and right cameras are used to simultaneously capture images of the special target in different postures, and the left and right cameras capture at least 10 images respectively. The target image sequence captured by the left and right cameras is recorded as:
[0056] I={I ij |i=1,2,j=1,2,3...n}; (8)
[0057] Wherein, i=1 represents the target image captured by the left camera, i=2 represents the target image captured by the right camera, and n is the number of target images captured by the camera on either side.
[0058] From the above, it can be seen that in one embodiment, collecting multiple plane calibration plate images of the calibration target in different postures by the cameras in the left and right laser camera assemblies in the track geometry detection system can include: collecting at least 10 plane calibration plate images of the calibration target in different postures by the cameras in the left and right laser camera assemblies in the track geometry detection system respectively, so as to improve the calibration accuracy of the track geometry detection system.
[0059] From the above, it can be seen that in one embodiment, multiple images of the plane calibration plate of the calibration target in different postures are collected by the cameras in the left and right laser camera assemblies in the track geometry detection system, including: while ensuring that the left and right cameras can simultaneously capture the complete corresponding plane calibration plate, multiple images of the plane calibration plate of the calibration target in different postures are collected by the cameras in the left and right laser camera assemblies in the track geometry detection system along the three axes of the motion coordinate system and rotated around the three axes, thereby improving the calibration accuracy of the track geometry detection system.
[0060] In one embodiment, extracting feature points of each plane calibration plate image and constructing a nonlinear optimization objective function based on the extracted feature point pairs of the left and right plane calibration plates may include:
[0061] Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points;
[0062] According to the pre-acquired intrinsic parameter matrix of the camera in the left and right laser camera assemblies, the pixel coordinates of the feature points are transformed into the target coordinate system;
[0063] Establish reference coordinate systems for the laser camera assemblies on both sides, and transform the coordinates of the feature points in the target coordinate system to their respective reference coordinate systems;
[0064] The nonlinear optimization objective function is constructed according to the feature point pairs of the left and right plane calibration plates in the reference coordinate system.
[0065] In specific implementation, the above-mentioned implementation method of constructing the nonlinear optimization objective function further improves the calibration accuracy of the track geometry detection system. The steps of the nonlinear optimization objective function (ie, steps 3 to 6 below) are described in detail below.
[0066] Step 3: Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points to calculate the transformation relationship from the camera coordinate system to the target coordinate system corresponding to each image. Figure 7A-7B It is a plane calibration plate image of a special target in a certain posture collected by the cameras on both sides. The following takes the plane calibration plate image on the left as an example to explain the feature point extraction process. The plane calibration plate has a total of 49 (7×7=49) black dots, and the center of each dot is a feature point. Figure 8 As shown in the figure, first, threshold the image of the calibration plate on the left to obtain the black dot area in the image, then obtain the boundary of each black dot, fit a circle (or fit an ellipse) to each boundary, and the center coordinates of the fitted circle are the pixel coordinates of the corresponding feature point, recorded as:
[0067]
[0068] Where j is the index of the calibration plate image, k is the index of the feature point in each image, and n is the number of calibration plate images collected by the left camera. Based on Zhang Zhengyou's camera calibration method, under the premise that the internal parameters of the left camera are known, the transformation relationship from the left camera coordinate system to the target coordinate system corresponding to each calibration plate image is calculated, including the rotation matrix and translation vectors Among them, j is the index of the calibration plate image, and n is the number of calibration plate images captured by the left camera.
[0069] It can be seen from the above that, in one embodiment, the marking point can be a black dot;
[0070] Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points, which may include:
[0071] Perform threshold processing on the calibration plate image to obtain the black dot area in the calibration plate image;
[0072] Get the boundaries of each black dot;
[0073] A circle or ellipse is fitted to each boundary, and the coordinates of the center of the fitted circle or ellipse are used as the pixel coordinates of the corresponding feature point.
[0074] In specific implementation, the above implementation method of obtaining the pixel coordinates of the corresponding feature points further improves the calibration accuracy of the track geometry detection system.
[0075] Step 4: Transform the pixel coordinates of the feature points to the target coordinate system. Take the left camera as an example to explain the coordinate transformation process. Since the left camera collects the plane calibration plate images of the special target in different postures, each calibration plate image corresponds to a new target coordinate system, and there are n target coordinate systems in total. For the jth calibration plate image, the rotation matrix and translation vector from the camera coordinate system to the current target coordinate system are respectively and The coordinates of the feature points of this image are Therefore, the coordinates of the feature points in the corresponding target coordinate system can be obtained by formula (1), which is recorded as
[0076] Step 5: Establish reference coordinate systems rcs1 and rcs2 for the laser camera components on both sides, and transform the feature point coordinates in the target coordinate system to their respective reference coordinate systems. Take the plane calibration plate image in the first posture as the reference image, and regard the left target coordinate system in the current posture as the reference coordinate system rcs1 of the left component, and regard the right target coordinate system in the current posture as the reference coordinate system rcs2 of the right component. Take the left camera as an example to explain the coordinate transformation process:
[0077]
[0078] Passing type:
[0079]
[0080] Calculate the rotation matrix from the reference coordinate system rcs1 to the target coordinate system corresponding to the jth posture and translation vectors Passing type:
[0081]
[0082] Transform the coordinates of the feature points of the left calibration plate in the jth posture to the reference coordinate system rcs1, and obtain the coordinates of the feature points of the left calibration plate in the jth posture in the left reference coordinate system Using the same method, we can get the coordinates of the feature points of the right calibration plate in the jth posture in the right reference coordinate system: Fig. 9 and Fig.10 The feature points acquired by the left camera in the reference coordinate system rcs1 and the feature points acquired by the right camera in the reference coordinate system rcs2 are given respectively.
[0083] Step 6: Construct a nonlinear optimization objective function to solve the rotation matrix and translation vector of the left and right reference coordinate systems. Fig.11 As shown in the figure, the feature points of the left and right plane calibration plates of the special target are numbered from 1 to 49 in sequence, and the kth feature point of the left plane calibration plate is recorded as P k , the kth feature point of the plane calibration plate on the right is Q k , P k With Q k It is called the kth feature point pair, and the distance between them is D k , then the distance between the kth corresponding feature point pair of the left and right plane calibration plates in the jth posture is j D k It can be expressed as:
[0084]
[0085] in, and They represent the rotation matrix and translation vector from the left reference coordinate system rcs1 to the right reference coordinate system rcs2 respectively.
[0086] Since the left and right plane calibration plates are rigidly connected by a connecting rod, the distance D between the kth feature point pair of the left and right plane calibration plates (right plane calibration plate and right plane calibration plate) is kAlways remain unchanged. The distance between the kth feature point pair of the left and right plane calibration plates in the j+1th posture is j+1 D k , then no matter how the posture of the special target changes, j+1 D k and j D k are always equal, that is, they satisfy the formula:
[0087] j E k = j D k - j+1 D k =0,j=1,2,3...n-1,k=1,2,3...49; (14)
[0088] in, j E k is the distance difference between the kth feature point pair in two different postures. Based on this feature, a nonlinear optimization objective function f(R,t) is constructed:
[0089]
[0090] Find the rotation matrix that minimizes f and translation vectors Thus, the rotation matrix from the left reference coordinate system rcs1 to the right reference coordinate system rcs2 can be obtained and translation vectors
[0091] Step 7: Solve the transformation relationship between the left and right camera coordinate systems. After obtaining the rotation matrix from the left reference coordinate system rcs1 to the right reference coordinate system rcs2 and translation vectors After that, first pass the formula:
[0092]
[0093] Calculate the rotation matrix from the left camera coordinate system ccs1 to the right reference coordinate system rcs2 and translation vectors in, On this basis, through the formula:
[0094]
[0095] Calculate the rotation matrix from the left camera coordinate system ccs1 to the right camera coordinate system ccs2 and translation vectors in,
[0096] From the above, it can be seen that in one embodiment, according to the nonlinear optimization objective function, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained, which may include:
[0097] Find the rotation matrix and translation vector corresponding to the minimum value of the nonlinear optimization objective function, and obtain the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system;
[0098] According to the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system, the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system are obtained;
[0099] According to the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained (rotation matrix and translation vectors ).
[0100] In specific implementation, the above-mentioned implementation method of obtaining the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies further improves the calibration accuracy of the track geometry detection system.
[0101] In addition, the two plane calibration plates of the special target in the embodiment of the present invention can be selected as a circular dot matrix or a chessboard, such as Fig.12 shown.
[0102] At the same time, in order to facilitate the understanding of the track geometry detection system calibration solution provided by the embodiment of the present invention, the following is an explanation of the glossary of related technical terms.
[0103] Rotation matrix from coordinate system C1 to coordinate system C2 and translation vectors It can be expressed as:
[0104]
[0105] in,
[0106]
[0107]
[0108]
[0109] Rotation Matrix and translation vectors Indicates that the coordinate system c1 first passes through the translation vector Translate coordinate system c1 to coordinate system c2 to obtain temporary coordinate system t1. At this time, the origins of coordinate systems t1 and c2 coincide. Then, coordinate system t1 is rotated around the X-axis of t1 by an angle α to obtain temporary coordinate system t2. Then, coordinate system t2 is rotated around the Y-axis of t2 by an angle β to obtain temporary coordinate system t3. Then, coordinate system t3 is rotated around the Z-axis of t3 by an angle γ to finally obtain coordinate system c2.
[0110] The track geometry detection system calibration solution provided by the embodiment of the present invention is characterized by:
[0111] 1) A special target device was designed.
[0112] 2) The left and right cameras are used to collect images of the calibration plate under different postures of the special target. The law that the distance between the feature point pairs of the left and right plane calibration plates remains unchanged during the movement or rotation of the special target is used to construct a nonlinear optimization objective function, and the transformation relationship of the left and right camera coordinate systems is solved through nonlinear optimization.
[0113] 3) Method for constructing nonlinear optimization objective function.
[0114] 4) Feature point extraction method of calibration plate image.
[0115] The advantages of the track geometry detection system calibration method provided by the embodiment of the present invention are:
[0116] 1. The connecting rod of the special target and the two plane calibration plates are rigidly connected. Therefore, no matter how the special target moves, the distance between the feature point pairs of the special target always remains constant. A certain number of feature point pairs are obtained by the left and right cameras respectively, and these feature point pairs are expressed in their respective reference coordinate systems, which is equivalent to having a set of point cloud data in each reference coordinate system, and these two sets of point clouds are associated in pairs. Therefore, the calibration problem of the two camera coordinate systems can be transformed into the registration problem of two sets of point cloud data.
[0117] 2. The left and right cameras are used to collect images of the calibration plate under different postures of the special target. The law that the distance between the feature point pairs of the left and right plane calibration plates remains unchanged during the movement or rotation of the special target is used to construct a nonlinear optimization objective function, and the transformation relationship of the left and right camera coordinate systems is solved through nonlinear optimization.
[0118] The present invention also provides a track geometry detection system calibration device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the track geometry detection system calibration method, the implementation of the device can refer to the implementation of the track geometry detection system calibration method, and the repeated parts will not be repeated.
[0119] Fig.14 FIG. 1 is a schematic diagram of the structure of a calibration device for a track geometry detection system according to an embodiment of the present invention. Fig.14 As shown, the device comprises:
[0120] The acquisition unit 01 is used to acquire multiple plane calibration plate images of calibration targets in different postures through cameras in the left and right laser camera assemblies in the track geometry detection system; the calibration target includes a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and the plane calibration plates are provided with multiple evenly distributed marking points, and the calibration target is arranged within the working range of the left and right laser camera assemblies;
[0121] A construction unit 02 is used to extract feature points of each plane calibration plate image, and construct a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates;
[0122] The calibration unit 03 is used to obtain the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the nonlinear optimization objective function.
[0123] In one embodiment, the acquisition unit is specifically used to: respectively acquire at least 10 images of the plane calibration plate of the calibration target in different postures through the cameras in the left and right laser camera assemblies in the track geometry detection system.
[0124] In one embodiment, the acquisition unit is specifically used to: ensure that the cameras on the left and right sides can simultaneously capture the complete corresponding plane calibration plate, and use the cameras in the left and right laser camera assemblies in the track geometry detection system to capture multiple calibration target images along the three axes of the motion coordinate system and rotate around the three axes to obtain plane calibration plate images in different postures.
[0125] In one embodiment, the construction unit is specifically used for:
[0126] Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points;
[0127] According to the pre-acquired intrinsic parameter matrix of the camera in the left and right laser camera assemblies, the pixel coordinates of the feature points are transformed into the target coordinate system;
[0128] Establish reference coordinate systems for the laser camera assemblies on both sides, and transform the coordinates of the feature points in the target coordinate system to their respective reference coordinate systems;
[0129] The nonlinear optimization objective function is constructed according to the feature point pairs of the left and right plane calibration plates in the reference coordinate system.
[0130] In one embodiment, the marking point is a black dot;
[0131] Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points, which may include:
[0132] Perform threshold processing on the calibration plate image to obtain the black dot area in the calibration plate image;
[0133] Get the boundaries of each black dot;
[0134] A circle or ellipse is fitted to each boundary, and the coordinates of the center of the fitted circle or ellipse are used as the pixel coordinates of the corresponding feature point.
[0135] In one embodiment, the calibration unit is specifically used for:
[0136] Find the rotation matrix and translation vector corresponding to the minimum value of the nonlinear optimization objective function, and obtain the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system;
[0137] According to the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system, the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system are obtained;
[0138] According to the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained.
[0139] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned track geometry detection system calibration method when executing the computer program.
[0140] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned track geometry detection system calibration method.
[0141] In an embodiment of the present invention, a calibration scheme for a track geometry detection system is provided by: collecting multiple plane calibration plate images of calibration targets in different postures through cameras in left and right laser camera assemblies in the track geometry detection system; the calibration target comprises a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and a plurality of evenly distributed marking points are arranged on the plane calibration plates, and the calibration target is arranged within the working range of the left and right laser camera assemblies; extracting feature points of each plane calibration plate image, and constructing a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates; and obtaining the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the nonlinear optimization objective function. The present invention can calibrate the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies.
[0142] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0143] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0146] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A calibration method for a track geometry detection system, characterized in that: include: The cameras in the left and right laser camera assemblies in the track geometry detection system collect multiple plane calibration plate images of the calibration target in different postures; the calibration target includes a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and the plane calibration plates are provided with multiple evenly distributed marking points, and the calibration target is set within the working range of the left and right laser camera assemblies; Extract the feature points of each plane calibration plate image, and construct a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates, which includes: extracting the feature points of each calibration plate image to obtain the pixel coordinates of the corresponding feature points; transforming the pixel coordinates of the feature points to the target coordinate system according to the pre-acquired intrinsic parameter matrix of the camera in the left and right laser camera assemblies; establishing the reference coordinate system of the laser camera assemblies on both sides, and transforming the coordinates of the feature points in the target coordinate system to their respective reference coordinate systems; constructing the nonlinear optimization objective function according to the feature point pairs of the left and right plane calibration plates in the reference coordinate system; According to the nonlinear optimization objective function, the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies is obtained, which includes: finding the rotation matrix and translation vector corresponding to the minimum value of the nonlinear optimization objective function, and obtaining the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system; according to the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system, obtaining the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system; according to the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system, obtaining the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies.
2. The track geometry detection system calibration method according to claim 1, characterized in that: The cameras in the left and right laser camera assemblies in the track geometry detection system are used to collect multiple plane calibration plate images of the calibration target in different postures, including: at least 10 plane calibration plate images of the calibration target in different postures are collected by the cameras in the left and right laser camera assemblies in the track geometry detection system.
3. The track geometry detection system calibration method according to claim 1, characterized in that: The cameras in the left and right laser camera assemblies in the track geometry detection system are used to collect multiple images of the plane calibration plate in different postures of the calibration target, including: while ensuring that the cameras on the left and right sides can simultaneously capture the complete corresponding plane calibration plate, the cameras in the left and right laser camera assemblies in the track geometry detection system are used to collect multiple images of the plane calibration plate in different postures of the calibration target along the three axes of the motion coordinate system and rotated around the three axes.
4. The track geometry detection system calibration method according to claim 1, characterized in that: The marking point is a black dot; Extract the feature points of each calibration plate image and obtain the pixel coordinates of the corresponding feature points, including: Perform threshold processing on the calibration plate image to obtain the black dot area in the calibration plate image; Get the boundaries of each black dot; A circle or ellipse is fitted to each boundary, and the coordinates of the center of the fitted circle or ellipse are used as the pixel coordinates of the corresponding feature point.
5. The track geometry detection system calibration method according to claim 1, characterized in that: The nonlinear optimization objective function is: In the formula, j E k = j D k - j+1 D k =0,j=1,2,3...n-1,k=1,2,3...49; in, j E k is the difference in distance between the kth feature point pair in two different postures, j is the index of the calibration plate image, k is the index of the feature point pair, n is the number of images collected by the camera on either side, j D k is the distance between the kth corresponding feature point pair of the left and right plane calibration plates in the jth posture, j+1 D k is the distance between the kth feature point pair of the left and right plane calibration plates in the j+1th posture, rcs1 is the left reference coordinate system, rcs2 is the right reference coordinate system, is the rotation matrix from the left reference coordinate system rcs1 to the right reference coordinate system rcs2 in the jth posture, The translation vector from the left reference coordinate system rcs1 to the right reference coordinate system rcs2 in the jth posture, is the coordinate of the feature point of the left calibration plate in the jth posture in the left reference coordinate system, is the coordinate of the feature point of the right calibration plate in the jth posture in the right reference coordinate system.
6. A track geometry detection system calibration device, characterized in that: include: The acquisition unit is used to acquire multiple plane calibration plate images of the calibration target in different postures through the cameras in the left and right laser camera assemblies in the track geometry detection system; the calibration target includes a connecting rod and two plane calibration plates arranged at both ends of the connecting rod, and the plane calibration plates are provided with multiple evenly distributed marking points, and the calibration target is arranged within the working range of the left and right laser camera assemblies; A construction unit is used to extract feature points of each plane calibration plate image, and construct a nonlinear optimization objective function according to the extracted feature point pairs of the left and right plane calibration plates, which includes: extracting feature points of each calibration plate image to obtain pixel coordinates of corresponding feature points; transforming the pixel coordinates of the feature points to the target coordinate system according to the pre-acquired intrinsic parameter matrix of the camera in the left and right laser camera assemblies; establishing a reference coordinate system of the laser camera assemblies on both sides, and transforming the coordinates of the feature points in the target coordinate system to their respective reference coordinate systems; constructing the nonlinear optimization objective function according to the feature point pairs of the left and right plane calibration plates in the reference coordinate system; The calibration unit is used to obtain the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the nonlinear optimization objective function, which includes: finding the corresponding rotation matrix and translation vector when the nonlinear optimization objective function obtains the minimum value, and obtaining the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system; obtaining the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system according to the rotation matrix and translation vector from the left reference coordinate system to the right reference coordinate system; obtaining the transformation relationship between the camera coordinate systems in the left and right laser camera assemblies according to the rotation matrix and translation vector from the left camera coordinate system to the right reference coordinate system.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Symmetric motion platform pose measurement method based on binocular vision
CN107292927A
Binocular camera external parameter calibration method and system based on linear solution nonlinear optimization
CN111784778A