An Algorithm for Angle Calibration of Collimator in Image Measurement
Through an image measuring parallel light tube angle calibration algorithm that allows arbitrary attitude placement, the limitations of the calibration method in the prior art are solved, the measurement accuracy and reliability are improved, and the calibration process is simplified.
Patent Information
- Application Number
- CN202210986046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-08-16
AI Technical Summary
The existing parallel light tube calibration methods for image measurement have many limitations, including inapplicability to non-horizontal placement, failure to consider the pixel non-orthogonality of the image sensor and attitude influence, resulting in insufficient accuracy and reliability of the measurement results.
An angle calibration algorithm is proposed, allowing image measurement parallel light tubes to be placed in any posture without the need for horizontal constraints. By constructing observation equation systems and least squares estimation, precise angle calibration is performed considering the non-orthogonality of the pixels of the image sensor and the influence of attitude.
The accuracy and reliability of the measurement results of parallel light tubes in image measurement are improved, the effects of non-vertical errors of image sensors and attitude angle changes are eliminated, the calibration process is simplified, and the higher accuracy standardizer is not relied on.
Smart Images

Figure CN115290008B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image measurement collimator calibration, and in particular to an angle calibration algorithm for an image measurement collimator. Background Art
[0002] Image measurement collimator uses the method of "collimator + industrial camera" to measure angles. It can be divided into two categories, one is self-collimation type and the other is non-self-collimation type.
[0003] The calibration technology of self-collimating image measurement collimators, such as photoelectric autocollimators, requires high-precision standards, such as using a more accurate autocollimator or laser small angle measuring instrument as a reference, or using a high-precision precision two-dimensional turntable. The calibration of this type of image measurement collimator requires the use of a matching plane mirror and is not suitable for non-self-collimating types. Non-self-collimating image measurement collimators, such as those used to calibrate laser line projectors, currently do not have a very complete calibration technology for this type of image measurement collimator, and generally only consider the relationship between a single pixel and the corresponding angle. The output of these two types of image measurement collimators is the angle information relative to the image measurement collimator's own coordinate system, so they must be in a horizontal state during calibration, otherwise errors caused by posture will be introduced. In addition, the impact of non-orthogonality of image sensor pixels is not considered.
[0004] In summary, the existing calibration method of the image measurement collimator has many restrictions and its usage is also limited. The existing non-self-collimation calibration method is not suitable for non-horizontally placed image measurement collimators, does not consider the influence of posture, and the considered influencing factors are imperfect. Therefore, the existing calibration method needs to be improved urgently. Summary of the invention
[0005] The invention proposes an angle calibration algorithm for a non-self-collimating image measurement collimator which is not constrained by the horizontal direction during calibration, does not need to use a higher-precision standard, and takes into account the influence of non-orthogonality and posture of image sensor pixels.
[0006] The technical solution of the present invention is implemented as follows: The present invention provides an angle calibration algorithm for an image measurement collimator, comprising the following steps:
[0007] S0: Build an image measurement collimator, connect the collimator and industrial camera together using an adapter, and place the image sensor of the industrial camera on the focal plane of the collimator without placing a graticule; the image measurement collimator can be placed in any posture;
[0008] S1: Place the theodolite or total station at the other end of the collimator, focus to infinity, and place the light source behind the eyepiece of the theodolite or total station;
[0009] S2: Align the crosshairs of the theodolite or total station eyepiece with the n positions of the image measurement collimator in sequence, so that the crosshairs of the theodolite or total station eyepiece are evenly distributed in the camera image, and use the sub-pixel fitting algorithm to fit the n image plane pixel coordinates x of the crosshairs center. i and i , i = 1, 2, ... n, and simultaneously record the horizontal azimuth and zenith distance corresponding to each image plane coordinate;
[0010] S3: Based on the conversion relationship between the image plane pixel coordinates of the image measurement collimator and the horizontal azimuth angle and the zenith distance, an observation equation group is constructed for the uniformly distributed image plane pixel coordinates in the n camera images;
[0011] S4: using the least square method to obtain the spatial angle pixel factor of the axial direction of the image plane coordinate system of the industrial camera image sensor in the current posture, the rotation angle of the camera image sensor x-axis around the optical axis of the parallel light tube to the horizontal direction, and the estimated value of the non-vertical error angle of different coordinate axes of the image plane coordinate system;
[0012] S5: When the posture of the image measurement collimator changes after long-term placement, the corresponding observation equations are established and solved.
[0013] On the basis of the above technical solution, preferably, in step S3, the observation equation group is established according to the conversion relationship between the image plane pixel coordinates of the collimator image tube and the horizontal azimuth angle and the zenith distance measured by the image, and the following conversion relationship exists:
[0014]
[0015] in, It is a conversion matrix that converts the spatial angle of the optical axis direction of the parallel light tube into the horizontal azimuth and zenith distance in the coordinate system of the theodolite or total station; It is the transformation matrix of the image plane pixel coordinate system x-axis rotating around the optical axis to the horizontal direction; It is the transformation matrix between pixel coordinates and angle coordinates; It is the transformation matrix that transforms the actual non-perpendicular image sensor coordinate system to the strictly perpendicular image plane coordinate system; h i and v i are the horizontal azimuth and zenith distance of the i-th point, i = 1, 2, ... n; x i ,y i , i = 1, 2, ..., n is the pixel coordinate of the i-th point in the image plane; θ is the rotation angle of the image sensor coordinate system x-axis around the parallel light tube optical axis to the horizontal direction; p is the non-perpendicular error angle between the x-axis and the y-axis of the image sensor; k x and k yare the spatial angle pixel factors of the industrial camera on the x-axis and y-axis of the image plane coordinate system; h0 and v0 are the azimuth and zenith distances of the origin of the image plane coordinate system to the horizontal direction; for the i-th image plane pixel coordinate, let Then the transformation relationship can be rewritten as
[0016]
[0017] According to the conversion relationship, the observation equation group is listed, and d = Gm + e, where e is the residual;
[0018]
[0019] Preferably, in step S4, the least squares method is used to obtain the spatial angle pixel factor of the axial direction of the image plane coordinate system of the industrial camera image sensor in the current posture, the rotation angle of the camera image sensor x-axis around the optical axis of the parallel light pipe to the horizontal direction, and the estimated value of the non-vertical error angle of different coordinate axes of the image plane coordinate system,
[0020] Where m is the observation parameter, is the estimated value of the observed parameter; the standard deviation of the measurement Estimates of observed parameters The variance-covariance matrix of for The corresponding ones are: The estimated values of the observed parameters After linearization, we have yes The result after linearization is The variance-covariance matrix of for yes Corresponding The block matrix of .
[0021] Preferably, in step S5, when the posture of the image measurement collimator changes after long-term placement, the corresponding observation equations are established and solved, which is to calculate p, k after the posture of the image measurement collimator changes after long-term placement. x and k y It has no effect, but the rotation angle θ between the image sensor x-axis and the horizontal direction and the effect of changes in h0 and v0 on the calibration matrix need to be considered. Therefore, in the subsequent calibration, only θ, h0 and v0 are calibrated. At this time, p and k x and k y Follow step S4 The estimated value in is used to transform the pixel coordinates x' and y' of each point in the image plane currently acquired into coordinates with a horizontal rotation angle in the same image plane coordinate system: There is a conversion relationship
[0022] Specifically, the theodolite or total station is moved horizontally in the plane of the optical axis of the image measurement parallel light tube to obtain n target points (x' j ,y i ), i = 1, 2, ... n, and perform fitting. Using least squares estimation, we obtain θ, h0 and v0.
[0023] The angle calibration algorithm of the image measurement collimator provided by the present invention has the following beneficial effects compared with the prior art:
[0024] (1) The calibration technology of the collimator for non-self-collimating image measurement has been improved, eliminating the non-perpendicular error of the image sensor's x-axis and y-axis, and also eliminating the influence of the attitude angle change between the x-axis and the horizontal direction, thus improving the accuracy and reliability of the measurement results. The parameter standard deviation can be used to characterize the measurement accuracy level.
[0025] (2) The calibration of the image measurement collimator does not need to be constrained by the horizontal direction. The zenith distance corresponding to the optical axis direction can be any angle, which can also make the use of the image measurement collimator not constrained by the horizontal direction;
[0026] (3) After the image measurement collimator has been placed for a long time and the posture has changed, only the influence of the posture needs to be considered. The same number of measurement points as the first calibration is not required, and only horizontal micro-movement is required, which is simple and efficient.
[0027] (4) The calibration of the image measurement collimator does not need to rely on a higher-precision photoelectric autocollimator or a precision two-dimensional turntable. It is easy to set up and simple to operate. Moreover, it is a two-dimensional calibration and can obtain calibration parameters with the same accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0029] Figure 1 A flowchart of an angle calibration algorithm for an image measurement collimator according to the present invention;
[0030] Figure 2A schematic diagram of an arrangement of an image measurement collimator, a theodolite or a total station, a light source and an industrial camera for an angle calibration algorithm of an image measurement collimator according to the present invention;
[0031] Figure 3 A schematic diagram of an industrial camera's image sensor having a rotation angle with the horizontal direction in an angle calibration algorithm of an image measurement collimator according to the present invention;
[0032] Figure 4 A schematic diagram of the non-perpendicular errors of the x-axis and y-axis of the image sensor of an industrial camera of the present invention for an angle calibration algorithm of an image measurement collimator;
[0033] Figure 5 Schematic diagram of image plane pixel coordinates in step S2 of an angle calibration algorithm for an image measurement collimator according to the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] like Figure 1-3 As shown, the present invention provides an angle calibration algorithm for an image measurement collimator, comprising the following steps:
[0036] S0: Figure 2 As shown in the figure above, an image measurement collimator is constructed, the collimator and the industrial camera are connected together using an adapter, and the image sensor of the industrial camera is placed on the focal plane of the collimator. There is no need to place a graticule; the image measurement collimator can be placed in any posture.
[0037] S1: Figure 2 As shown in the figure below, place the theodolite or total station at the other end of the image measurement collimator, focus to infinity, and place the light source behind the eyepiece of the theodolite or total station; the image coordinates output by the image sensor of the industrial camera are the image plane pixel coordinates.
[0038] S2: Align the crosshairs of the theodolite or total station eyepiece with the n positions of the image measurement collimator in sequence, so that the crosshairs of the theodolite or total station eyepiece are evenly distributed in the camera image, and use the sub-pixel fitting algorithm to fit the n image plane pixel coordinates x of the crosshairs center. i and i, i = 1, 2, ... n, and record the horizontal azimuth and zenith distance of each image plane coordinate; let n = 50 here, and obtain 50 image plane pixel coordinates as follows Figure 5 shown.
[0039] S3: Based on the conversion relationship between the image plane pixel coordinates of the image measurement collimator and the horizontal azimuth and zenith distance, the observation equation group is constructed for the uniformly distributed image plane pixel coordinates in the 50 camera images.
[0040] like Figure 3 , Figure 4 As shown, let the image plane pixel coordinate be x j ,y i , i = 1, 2, ..., n, taking into full account the non-vertical error angle p between the x-axis and y-axis of the image sensor pixel distribution, and the rotation angle between the x-axis and the horizontal direction of the image sensor coordinate system; the following change relationship exists:
[0041] For the i-th image plane pixel coordinate, let The above formula can be rewritten as
[0042]
[0043] where h i and v i is the horizontal azimuth and zenith distance of the i-th point; x j ,y i , j = 1, 2, ..., n is the pixel coordinate of the image plane of the i-th point; θ is the rotation angle of the image sensor coordinate system x-axis around the optical axis of the parallel light tube to the horizontal direction; p is the non-perpendicular error angle between the x-axis and the y-axis of the image sensor; k x and k y are the spatial angle pixel factors of the industrial camera on the x-axis and y-axis of the image plane coordinate system; h0 and v0 are the azimuth and zenith distance of the origin of the image plane coordinate system in the horizontal direction. For the uniformly distributed image plane pixel coordinates in the n camera images, each image plane pixel coordinate has a change relationship corresponding to step S3. The n image plane pixel coordinates are converted into a matrix form according to the horizontal azimuth and zenith distance of the parallel light tube optical axis plane measured in step S3, and the observation equation group is listed, d = Gm + e, where e is the residual.
[0044] S4: Use the least squares method to obtain the spatial angle pixel factor of the axial direction of the image plane coordinate system of the industrial camera image sensor in the current posture, the rotation angle of the camera image sensor x axis around the optical axis of the parallel light tube to the horizontal direction, and the estimated value of the non-vertical error angle of different coordinate axes of the image plane coordinate system. The specific method is to use the observation equation group d=Gm+e listed in step S3, let Where m is the observation parameter, is the estimated value of the observed parameter; e is the residual; the measurement standard deviation Estimates of observed parameters The variance-covariance matrix of for The corresponding ones are: Unit degree; are the estimated values of a, b, c, and d respectively; the estimated values of the observed parameters After linearization, we have in yes The result after linearization is
[0045] The variance-covariance matrix of for yes Corresponding The block matrix of , so the standard deviation of each parameter is approximately A superscript T is the transposed matrix, and a superscript -1 is the inverse matrix.
[0046] S5: When the image measurement collimator changes its posture after long-term placement, the effect of the posture change on p and k x and k y It has no effect. We only need to consider the effect of changes in the rotation angle calibration θ, h0, and v0 between the x-axis and the horizontal direction of the image sensor on the calibration matrix. Therefore, in the subsequent calibration, we only need to calibrate θ, h0, and v0. At this time, p, k x and k y Follow step S4 Therefore, the relationship between the pixel coordinates of each point in the image plane currently acquired and the coordinates with a rotation angle relative to the horizontal direction in the same image plane is: There is a conversion relationship
[0047] Specifically, the theodolite or total station can be horizontally moved in the plane of the optical axis of the image measurement parallel light tube to obtain 10 target points (x' i, y' i ), in this example, the middle 10 points of the data in step S3 are directly selected, i = 1, 2, ... n, and fitted. By using least squares estimation, we obtain θ=0.0019°, h0=11212.36″=3.115° and v0=215993.09″=59.998°, which are basically consistent with the least squares result of step S4.
[0048] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An angle calibration algorithm for image measurement collimator, characterized in that: The steps include: S0: Build an image measurement collimator, connect the collimator and industrial camera together using an adapter, and place the image sensor of the industrial camera on the focal plane of the collimator without placing a graticule; the image measurement collimator can be placed in any posture; S1: Place the theodolite or total station at the other end of the collimator, focus to infinity, and place the light source behind the eyepiece of the theodolite or total station; S2: Align the crosshairs of the theodolite or total station eyepiece with the n positions of the image measurement collimator in sequence, so that the crosshairs of the theodolite or total station eyepiece are evenly distributed in the camera image, and use the sub-pixel fitting algorithm to fit the n image plane pixel coordinates x of the crosshairs center. i and i , i = 1, 2, ... n, and simultaneously record the horizontal azimuth and zenith distance corresponding to each image plane coordinate; S3: Based on the conversion relationship between the image plane pixel coordinates of the image measurement collimator and the horizontal azimuth angle and the zenith distance, an observation equation group is constructed for the uniformly distributed image plane pixel coordinates in the n camera images; S4: using the least square method to obtain the spatial angle pixel factor of the axial direction of the image plane coordinate system of the industrial camera image sensor in the current posture, the rotation angle of the camera image sensor x-axis around the optical axis of the parallel light tube to the horizontal direction, and the estimated value of the non-vertical error angle of different coordinate axes of the image plane coordinate system; S5: When the posture of the image measurement collimator changes after long-term placement, the corresponding observation equations are established and solved.
2. The angle calibration algorithm of the image measurement collimator according to claim 1, characterized in that: In step S3, an observation equation group is established according to the conversion relationship between the pixel coordinates of the image plane of the collimator and the horizontal azimuth angle and the zenith distance measured by the image, and the following conversion relationship exists: in, It is a conversion matrix that converts the spatial angle of the optical axis direction of the parallel light tube into the horizontal azimuth and zenith distance in the coordinate system of the theodolite or total station; It is the transformation matrix of the image plane pixel coordinate system x-axis rotating around the optical axis to the horizontal direction; It is the transformation matrix between pixel coordinates and angle coordinates; It is the transformation matrix that transforms the actual non-perpendicular image sensor coordinate system to the strictly perpendicular image plane coordinate system; h i and v i are the horizontal azimuth and zenith distance of the i-th point, i = 1, 2, ... n; x i ,y i , i = 1, 2, ..., n is the pixel coordinate of the i-th point in the image plane; θ is the rotation angle of the image sensor coordinate system x-axis around the parallel light tube optical axis to the horizontal direction; p is the non-perpendicular error angle between the x-axis and the y-axis of the image sensor; k x and k y are the spatial angle pixel factors of the industrial camera on the x-axis and y-axis of the image plane coordinate system; h0 and v0 are the azimuth and zenith distances of the origin of the image plane coordinate system to the horizontal direction; for the i-th image plane pixel coordinate, let Then the transformation relationship can be rewritten as According to the conversion relationship, the observation equation group is listed, and d = Gm + e, where e is the residual; 3. The angle calibration algorithm of the image measurement collimator according to claim 2, characterized in that: In step S4, the least square method is used to obtain the spatial angle pixel factor of the axial direction of the image plane coordinate system of the industrial camera image sensor in the current posture, the rotation angle of the camera image sensor x-axis around the optical axis of the parallel light tube to the horizontal direction, and the estimated value of the non-vertical error angle of different coordinate axes of the image plane coordinate system. Where m is the observation parameter, is the estimated value of the observed parameter; the standard deviation of the measurement Estimates of observed parameters The variance-covariance matrix of for The corresponding ones are: The estimated values of the observed parameters After linearization, we have yes The result after linearization is The variance-covariance matrix of for yes Corresponding The block matrix of .
4. The angle calibration algorithm of the image measurement collimator according to claim 3, characterized in that: Step S5 is to establish and solve the corresponding observation equations when the attitude of the image measurement collimator changes after long-term placement. x and k y It has no effect, but the rotation angle θ between the image sensor x-axis and the horizontal direction and the effect of changes in h0 and v0 on the calibration matrix need to be considered. Therefore, in the subsequent calibration, θ, h0 and v0 need to be calibrated. At this time, p and k x and k y Follow step S4 The estimated value in is used to transform the pixel coordinates x' and y' of each point in the image plane currently acquired into coordinates with a horizontal rotation angle in the same image plane coordinate system: There is a conversion relationship Specifically, the theodolite or total station is moved horizontally in the plane of the optical axis of the image measurement parallel light tube to obtain n target points (x' i , y' i ), i = 1, 2, ... n, and perform fitting. Using least squares estimation, we obtain θ, h0 and v0.
Citation Information
Patent Citations
Collimator based camera calibration method
CN108154535A
Calibration method for geometric imaging model of area-array camera with two-dimensional pointing mirror
CN110766757A