A method for calculating the height difference of camera external parameter calibration target

By setting the reference target and calculating the height difference of the camera's external parameter calibration target, the problem of inconsistent calibration target heights is solved, real-time and accurate calibration results are achieved, and the automation and efficiency of the vehicle assembly factory are improved.

CN117689710BActive Publication Date: 2024-09-20NANJING YUXIN CHENYANG TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311721574.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2024-09-20
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

During the vehicle assembly process, the height of the camera's external parameter calibration target may be inconsistent, resulting in errors in the calibration results and affecting the accuracy of the ADAS visual perception algorithm. Currently, there is no real-time measurement method to solve this problem.

Method used

By setting the reference target, obtain the images of the calibration target and the reference target, extract the corner points, calculate the pixel height difference, and obtain the physical height difference through the lookup table to judge the calibration target height in real time to ensure the reliability of the calibration parameters.

Benefits of technology

Real-time calculation of calibration target height difference is achieved, which improves calibration accuracy and automation, reduces the need for regular calibration, reduces modification costs, and meets the needs of an efficient vehicle assembly factory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117689710B
    Figure CN117689710B
Patent Text Reader

Abstract

The invention discloses a method for calculating the height difference of a camera external parameter calibration target, comprising the following steps: a reference target is arranged on one side of the calibration target; when the calibration target is lowered into place, images of the calibration target and the reference target are acquired; corner points of the calibration target and the reference target are extracted, and pixel height differences between the calibration target and the reference target are calculated according to the coordinates of the corner points of the calibration target and the reference target; the physical height difference of the calibration target is acquired by querying the pixel height difference in a lookup table; the method has the characteristics of judging whether there is an error in the height of the calibration target, thereby judging the effect of each calibration in real time, ensuring the quality of factory calibration of each vehicle in a timely manner, and simultaneously performing external parameter calibration and calibration target height measurement without regular calibration of the calibration target, thereby improving the degree of automation and efficiency of a vehicle assembly plant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application field of autonomous driving vision algorithms, and in particular to a method for calculating the height difference of a camera extrinsic parameter calibration target. Background Art

[0002] The camera external parameter calibration station in the vehicle assembly workshop needs to be designed to be automatically raised and lowered. The calibration target is lowered during calibration, and then raised after calibration to facilitate the vehicle to move forward to the next station. This design of the calibration target lifting may cause the calibration target to be out of place, resulting in the calibration target height value being inconsistent with the set value. Generally, the vehicle assembly factory will regularly calibrate the calibration target at the calibration station, but there is currently no method to measure the calibration target height in real time.

[0003] Vehicles with ADAS cameras need to have a camera calibration process during the assembly process in the vehicle assembly plant to complete the camera external parameter calibration. The external parameter calibration is mainly to obtain the posture of the camera relative to the vehicle after assembly. The camera posture includes pitch, yaw, and roll, which correspond to the pitch angle, yaw angle, and roll angle of the camera respectively.

[0004] The camera calibration function needs to obtain some parameter information of the calibration target, which includes the height of the calibration target from the ground and the distance from the calibration target to the camera. Before the calibration program is executed, these parameters are input to the camera calibration program through the diagnostic instrument of the calibration station. These parameters are fixed values ​​relative to the same calibration station.

[0005] For various reasons, the parameters of these calibration targets may be inconsistent with the input values, such as factory personnel manually adjusting the values ​​of the calibration targets without resetting them, or the calibration station itself may have unpredictable errors after running for a period of time. The accuracy of the camera calibration results is closely related to the accuracy of the parameters of the calibration station, and the difference in calibration results will further affect the accuracy of the ADAS visual perception algorithm in terms of distance and speed measurement.

[0006] Due to the design of the calibration target lifting, the height of the calibration target changes. If the lifting is not in place, it may cause an error in the height of the calibration target. According to empirical data, when the distance from the camera to the target is 3.6 meters, every 1 cm error in the target height will cause a 0.15 degree error in the pitch angle calibration result. This image directly collected by the camera cannot measure the height difference of the calibration target, and the calibration target itself cannot guarantee whether its height is accurate. Therefore, it is urgent to provide a method for calculating the height difference of the camera external parameter calibration target to solve the above problem. Summary of the invention

[0007] To this end, it is necessary to provide a method for calculating the height difference of the camera external parameter calibration target. The calibration target height is calculated in real time during the calibration process. By comparing the coordinate difference between the reference point on the calibration target and the reference point of the known height outside the calibration target, the actual height of the calibration target is calculated, and the reliability of the input calibration target parameters is judged, so as to have an estimate of the calibration effect.

[0008] To achieve the above object, the inventor provides a method for calculating the height difference of a camera extrinsic calibration target, comprising the following steps:

[0009] A reference target is provided on one side of the calibration target;

[0010] When the calibration target is lowered into place, the images of the calibration target and the reference target are acquired;

[0011] Extract the corner points of the calibration target and the reference target, and calculate the pixel height difference between the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target;

[0012] The physical height difference of the calibration target is obtained by querying the pixel height difference in the lookup table.

[0013] As a preferred embodiment of the present invention, obtaining the physical height difference of the calibration target by querying the lookup table includes the following steps:

[0014] A reference target with a fixed and known height is set on one side of the calibration target, and through pre-calibration, the correspondence between the physical height difference between the calibration target corner point and the reference target corner point and the pixel height difference of the image is obtained to make a lookup table.

[0015] As a preferred embodiment of the present invention, the physical heights of the calibration target and the reference target are consistent during pre-calibration.

[0016] As a preferred embodiment of the present invention, extracting corner points of the calibration target and the reference target, and calculating the pixel heights of the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target include the following steps:

[0017] The color of each point in the obtained calibration target and reference target images is used as input, and the clustering method is used to divide them into two classes: black points and white points, and the clustered color value sets of the two classes of black points and white points are obtained;

[0018] Calculate the average color value of black points and white points as the standard value of black points and white points respectively, and then calculate the middle value with the same distance from the black value and the white value as the dividing value of image binarization;

[0019] Use the obtained boundary value to binarize the image, assuming that 0 represents black and 1 represents white, and convert it into a two-dimensional matrix, where x corresponds to the width of the image and y corresponds to the height of the image;

[0020] The black points of the calibration target and the reference target are used as black squares, and each black square is numbered respectively, and xy thresholds are set for the four inflection points of each square;

[0021] Take the coordinates of the upper and lower endpoints of each black square in turn, take a column of pixel values ​​from left to right, judge the length of the line segment by 0 or 1, and record the coordinates of the upper and lower ends until the x and y values ​​of the upper and lower ends exceed the set threshold;

[0022] The black square at the top takes the y value of the lower boundary, and the black square at the bottom takes the y value of the upper boundary;

[0023] The pixel height value of the calibration target is obtained by calculating the arithmetic mean of the boundary y value of the calibration target, and the pixel height value of the reference target is obtained by calculating the arithmetic mean of the boundary y value of the reference target;

[0024] The pixel height value of the calibration target is subtracted from the pixel height value of the reference target to obtain the pixel height difference of the calibration target.

[0025] As a preferred embodiment of the present invention, obtaining the physical height difference of the calibration target by querying the pixel height difference in the lookup table also includes the steps of:

[0026] The obtained pixel height difference of the calibration target is between two consecutive pixel height differences in the lookup table. At this time, obtaining the physical height difference of the calibration target includes the following calculation steps:

[0027] D=((A)-(A+)) / ((A-)-(A+))*(BC)+C

[0028] Among them, D represents the physical height difference of the calibration target, A represents the pixel height difference of the obtained calibration target, A+ and A- represent the height difference of two consecutive pixels in the lookup table, A is located between A+ and A-, B represents the physical height difference of the calibration target corresponding to A- in the lookup table, and C represents the physical height difference of the calibration target corresponding to A+ in the lookup table.

[0029] As a preferred embodiment of the present invention, the A+ is greater than A-.

[0030] As a preferred embodiment of the present invention, when the extracted calibration target corner point is located at the center position of the acquired calibration target image in the vertical direction, and the distribution spacing of the image pixel points is uniformly distributed, the physical height difference of the calibration target is calculated by linear interpolation.

[0031] Different from the prior art, the above technical solution has the following beneficial effects:

[0032] This method determines whether there is an error in the height of the calibration target by calculating the height difference of the calibration target in real time during calibration, thereby determining the effect of each calibration in real time, and can ensure the quality of the factory calibration of each vehicle in a timely manner. During the measurement process, external parameter calibration and calibration target height measurement are carried out simultaneously, and there is no need to calibrate the calibration target regularly, thereby improving the degree of automation and efficiency of the vehicle assembly plant; in addition, this method only requires a small amount of modification to the existing calibration station to meet the requirements, and the modification cost is low; the algorithm is simple and reliable, and the performance requirements of the calibration equipment are not high. External parameter calibration generally requires the target error to be within 1 cm. This solution meets the accuracy requirements for target height measurement; the amount of calculation is relatively small, and the result can be obtained from one image, which has almost no impact on the original calibration process, so it does not affect the original assembly line operation process of the factory. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of the method described in the specific implementation mode;

[0034] Figure 2 This is an example diagram of the calibration target grid pattern described in the specific implementation method;

[0035] Figure 3 This is an example diagram of the corner points of the target grid for calibration described in the specific implementation method;

[0036] Figure 4 This is an example diagram of a reference target grid pattern described in a specific implementation manner;

[0037] Figure 5 This is an example diagram of the calibration target and the reference target being at the same horizontal position as described in the specific implementation manner;

[0038] Figure 6 This is an example diagram of the height difference between the calibration target and the reference target described in the specific implementation method;

[0039] Figure 7 This is an example diagram of the calibration target and reference target numbering described in the specific implementation method. DETAILED DESCRIPTION

[0040] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.

[0041] like Figures 1 to 6 As shown, this embodiment provides a method for calculating the height difference of a camera extrinsic calibration target, comprising the following steps:

[0042] A reference target is provided on one side of the calibration target;

[0043] When the calibration target is lowered into place, the images of the calibration target and the reference target are acquired;

[0044] Extract the corner points of the calibration target and the reference target, and calculate the pixel height difference between the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target;

[0045] The physical height difference of the calibration target is obtained by querying the pixel height difference in the lookup table.

[0046] In the above embodiment, obtaining the physical height difference of the calibration target by querying the lookup table includes the following steps:

[0047] A reference target with a fixed and known height is set on one side of the calibration target, and the correspondence between the physical height difference between the calibration target corner point and the reference target corner point and the pixel height difference of the image is obtained through pre-calibration, and a lookup table is prepared. Figure 5 As shown, the physical heights of the calibration target and the reference target are consistent during pre-calibration.

[0048] There are many types of calibration targets in the factory calibration room. This method uses the chevron calibration target pattern as an example to illustrate the implementation method. Figure 2 As shown. Figure 2 There are 4 corner points in the grid calibration target. These 4 corner points need to be identified during external parameter calibration. For a fixed calibration station, the height of the corner points is fixed. Figure 3 Where the arrow points.

[0049] This method adds a reference target of fixed height on the basis of the original calibration target that needs to be lifted up and down. In this embodiment, Figure 4 As shown, the pattern of the reference target is two black squares. The side length of the black square is consistent with the width of the black square of the calibration target. The two squares overlap at one corner, and the other three corners are symmetrical in the tilt direction. The four sides of the black square are parallel to the horizontal and vertical directions respectively.

[0050] When not in calibration state, Figure 6 As shown in the figure, the calibration target rises and is retracted, and the calibration target and the reference target are not at the same horizontal position; when performing external parameter calibration, the calibration target is lowered to the preset height. At this time, if the calibration target height is normal, it should be at the same horizontal position as the reference target. If the calibration target has an error in height after it is lowered and is not the preset value, there will be a height difference with the reference target of fixed height, and it will no longer be on the same horizontal line.

[0051] In the above embodiment, extracting the corner points of the calibration target and the reference target, and calculating the pixel heights of the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target include the following steps:

[0052] The color of each point in the obtained calibration target and reference target images is used as input, and the clustering method is used to divide them into two classes: black points and white points, and the clustered color value sets of the two classes of black points and white points are obtained;

[0053] Calculate the average color value of black points and white points as the standard value of black points and white points respectively, and then calculate the middle value with the same distance from the black value and the white value as the dividing value of image binarization;

[0054] Use the obtained boundary value to binarize the image, assuming that 0 represents black and 1 represents white, and convert it into a two-dimensional matrix, where x corresponds to the width of the image and y corresponds to the height of the image;

[0055] The black points of the calibration target and the reference target are used as black squares, and each black square is numbered respectively, and xy thresholds are set for the four inflection points of each square;

[0056] Take the coordinates of the upper and lower endpoints of each black square in turn, take a column of pixel values ​​from left to right, judge the length of the line segment by 0 or 1, and record the coordinates of the upper and lower ends until the x and y values ​​of the upper and lower ends exceed the set threshold;

[0057] The black square at the top takes the y value of the lower boundary, and the black square at the bottom takes the y value of the upper boundary;

[0058] The pixel height value of the calibration target is obtained by calculating the arithmetic mean of the boundary y value of the calibration target, and the pixel height value of the reference target is obtained by calculating the arithmetic mean of the boundary y value of the reference target;

[0059] The pixel height value of the calibration target is subtracted from the pixel height value of the reference target to obtain the pixel height difference of the calibration target.

[0060] like Figure 7 As shown, an example is given below:

[0061] (1) Take the color value of each point in the image as input, use the clustering algorithm to divide it into two classes, and obtain the clustered color value sets of the two classes of black points and white points;

[0062] (2) Calculate the average color value of the black point and the white point as the standard value of the black point and the white point respectively, and then calculate the middle value with the same distance from the black point value and the white point value as the demarcation value of the image binarization;

[0063] (3) Use the obtained threshold value to binarize the image, assuming that 0 represents a black point and 1 represents a white point, and convert it into a two-dimensional matrix, where x corresponds to the width of the image and y corresponds to the height of the image;

[0064] (4) There are 8 black squares in the calibration target and reference target, numbered ABCDEFGH respectively. The xy threshold is set for the 4 points of each square;

[0065] (5) Take the coordinates of the upper and lower endpoints of the eight blocks ABCDEFGH in turn, take a column of pixel values ​​from left to right, judge the length of the line segment by 0 or 1, and record the coordinates of the upper and lower ends until the x and y values ​​of the upper and lower ends exceed the set threshold. The y values ​​of the lower boundaries of the four blocks ACEG are taken, and the y values ​​of the upper boundaries of the four blocks BDFH are taken.

[0066] (6) The arithmetic mean of the boundary y values ​​of the six blocks ABCDEF is calculated to obtain the pixel height value of the target, and the arithmetic mean of the boundary y values ​​of the two blocks GH is calculated to obtain the pixel height value of the reference target.

[0067] (7) Subtract the pixel height value of the reference target from the pixel height value of the calibration target to obtain the pixel height difference of the calibration target.

[0068] In the above embodiment, obtaining the physical height difference of the calibration target by querying the pixel height difference in the lookup table also includes the steps of:

[0069] The obtained pixel height difference of the calibration target is between two consecutive pixel height differences in the lookup table. At this time, obtaining the physical height difference of the calibration target includes the following calculation steps:

[0070] D=((A)-(A+)) / ((A-)-(A+))*(BC)+C

[0071] Wherein, D represents the physical height difference of the calibration target, A represents the pixel height difference of the obtained calibration target, A+ and A- represent the height difference of two consecutive pixels in the lookup table, A is between A+ and A-, B represents the physical height difference of the calibration target corresponding to A- in the lookup table, and C represents the physical height difference of the calibration target corresponding to A+ in the lookup table. In this embodiment, A+ is greater than A-.

[0072] The following are some examples:

[0073] The camera sensor is set to have 2 million pixels, a resolution of 1824*940, the distance from the camera to the target is 3.6 meters, the calibration target height is 160 centimeters, and the camera height is 150 centimeters.

[0074] Through the prior height calibration, the corresponding relationship lookup table between the physical height and the pixel height difference is obtained. Because the height error exceeding 1 cm is considered unacceptable, the corresponding relationship lookup table only needs to write a small number of reference values; as shown in the following table:

[0075] Physical height Physical height difference Pixel height difference 162 cm 2.0 cm -11 161.4 cm 1.4 cm -9 161 cm 1.0 cm -6 160.5 cm 0.5 cm -3 160 cm 0 cm 0 159.5 cm -0.5 cm 3 159 cm -1.0 cm 6 158.5 cm -1.5 cm 9 158 cm -2.0 cm 13

[0076] Physical height error calculation example 1:

[0077] In a certain calculation, the pixel height of the calibration target was 433, and the pixel height of the reference target was 443. The difference in pixel height obtained by subtracting the two was -10. Therefore, by querying the lookup table, it can be seen that the physical height error of the calibration target is between 1.5 cm and 2 cm, which exceeds the design standard requirement of an error of within plus or minus 1 cm.

[0078] If you need to calculate the specific value of the physical height difference of the calibration target more accurately, the calculation formula is:

[0079] ((-10)-(-9)) / ((-11)-(-9))*(2.0-1.4)+1.4=1.7;

[0080] That is, the calculated physical height error of the calibration target is 1.7 cm.

[0081] Physical height error calculation example 2:

[0082] In a certain calculation, the pixel height of the calibration target was 445, and the pixel height of the reference target was 441. The pixel height difference obtained by subtracting the two was 4. Therefore, the physical height error of the calibration target was between -0.5 cm and -1.0 cm, which met the design standard requirement of an error within plus or minus 1 cm.

[0083] If you need to calculate the specific value of the physical height difference of the calibration target more accurately, the calculation formula is:

[0084] ((4)-(6)) / ((3)-(6))*(-0.5-(-1.0))+(-1.0)=-0.67;

[0085] That is, the calculated physical height error of the calibration target is -0.67 cm.

[0086] In some embodiments, when the extracted calibration target corner point is located at the center position of the acquired calibration target image in the vertical direction, and the distribution spacing of the image pixels is uniform, a linear interpolation method is used to calculate the physical height difference of the calibration target.

[0087] It can be seen from the above embodiments that the height of the calibration target cannot be measured directly through the image captured by the camera, and the calibration target itself cannot guarantee whether its height is accurate. However, by setting a fixed height reference object outside the calibration target, the height of the calibration target can be indirectly calculated through the height difference between the calibration target and the reference object.

[0088] It should be noted that, although the above embodiments have been described in this article, the patent protection scope of the present invention is not limited thereby. Therefore, based on the innovative concept of the present invention, changes and modifications made to the embodiments described herein, or equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included in the patent protection scope of the present invention.

Claims

1. A method for calculating the height difference of a camera external parameter calibration target, characterized in that: The following steps are involved: A reference target is provided on one side of the calibration target; When the calibration target is lowered into place, the images of the calibration target and the reference target are acquired; Extract the corner points of the calibration target and the reference target, and calculate the pixel height difference between the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target; By querying the pixel height difference in the lookup table, the physical height difference of the calibration target is obtained; Obtaining the physical height difference of the calibration target by querying the lookup table includes the following steps: A reference target with a fixed and known height is set on one side of the calibration target, and through pre-calibration, the correspondence between the physical height difference between the calibration target corner point and the reference target corner point and the pixel height difference of the image is obtained to make a lookup table.

2. The method for calculating the camera extrinsic calibration target height difference according to claim 1, characterized in that: During pre-calibration, the physical heights of the calibration target and the reference target are consistent.

3. The method for calculating the camera extrinsic parameter calibration target height difference according to claim 1, characterized in that: Extracting corner points of the calibration target and the reference target, and calculating pixel heights of the calibration target and the reference target according to the coordinates of the corner points of the calibration target and the reference target include the following steps: The color of each point in the obtained calibration target and reference target images is used as input, and the clustering method is used to divide them into two classes: black points and white points, and the clustered color value sets of the two classes of black points and white points are obtained; Calculate the average color value of black points and white points as the standard value of black points and white points respectively, and then calculate the middle value with the same distance from the black value and the white value as the dividing value of image binarization; Use the obtained boundary value to binarize the image, assuming that 0 represents black and 1 represents white, and convert it into a two-dimensional matrix, where x corresponds to the width of the image and y corresponds to the height of the image; The black points of the calibration target and the reference target are used as black squares, and each black square is numbered respectively, and xy thresholds are set for the four inflection points of each square; Take the coordinates of the upper and lower endpoints of each black square in turn, take a column of pixel values ​​from left to right, judge the length of the line segment by 0 or 1, and record the coordinates of the upper and lower ends until the x and y values ​​of the upper and lower ends exceed the set threshold; The black square at the top takes the y value of the lower boundary, and the black square at the bottom takes the y value of the upper boundary; The pixel height value of the calibration target is obtained by calculating the arithmetic mean of the boundary y value of the calibration target, and the pixel height value of the reference target is obtained by calculating the arithmetic mean of the boundary y value of the reference target; The pixel height value of the calibration target is subtracted from the pixel height value of the reference target to obtain the pixel height difference of the calibration target.

4. The method for calculating the camera extrinsic parameter calibration target height difference according to claim 3, characterized in that: Obtaining the physical height difference of the calibration target by querying the pixel height difference in the lookup table also includes the following steps: The obtained pixel height difference of the calibration target is between two consecutive pixel height differences in the lookup table. At this time, obtaining the physical height difference of the calibration target includes the following calculation steps: D=((A)-(A+)) / ((A-)-(A+))*(BC)+C Among them, D represents the physical height difference of the calibration target, A represents the pixel height difference of the obtained calibration target, A+ and A- represent the height difference of two consecutive pixels in the lookup table, A is located between A+ and A-, B represents the physical height difference of the calibration target corresponding to A- in the lookup table, and C represents the physical height difference of the calibration target corresponding to A+ in the lookup table.

5. The method for calculating the camera extrinsic parameter calibration target height difference according to claim 4, characterized in that: The A+ is greater than A-.

6. The method for calculating the camera extrinsic calibration target height difference according to claim 1, characterized in that: When the extracted calibration target corner point is located at the center position of the acquired calibration target image in the vertical direction, and the distribution spacing of the image pixels is uniform, the physical height difference of the calibration target is calculated using linear interpolation.

Citation Information

Patent Citations

  • Online automatic blank calibration method applied to intelligent sniper rifle

    CN108288290A

  • Method for measuring shape of general cable strand of suspension bridge based on machine vision

    CN112815840A

  • Machine vision recognition algorithm applied to displacement monitoring

    CN113255643A

  • Dynamic deformation measuring method for immersed tunnel pipe joint construction process

    CN114636383A

  • Circuit board processing method and system, expansion and shrinkage control forming machine and storage medium

    CN116507025A