Method for determining external parameter initial value of photogrammetry camera under large rotation angle and suitable for control point coplane
通过建立共线条件方程和最小二乘法迭代计算,解决了大转角场景下相机外参解算的精度和效率问题,实现了高效、准确的相机位姿求解。
Patent Information
- Application Number
- CN202510202555.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-11
AI Technical Summary
In large angle scenarios, the camera external parameter solution accuracy and efficiency are insufficient in existing photogrammetry methods. It is easy to fall into numerical traps and it is difficult to quickly and accurately solve the camera position.
By establishing collinear conditional equations, calculating the approximate coordinates of the plane normal vector and the imaging center, linearizing the error equation, and iteratively computing the external parameter correction number until the parameter correction amount is less than the threshold, avoiding the simplified model limitations of traditional methods.
提高了大转角场景下的测量准确性,减少迭代次数,缩短计算时间,确保每次计算结果的可靠性和便捷性。
Smart Images

Figure CN120293180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photogrammetry technology, and particularly relates to a method for determining the initial value of the external parameters of a photogrammetry camera under large rotation angles applicable to coplanar control points. Background Art
[0002] Single-image space resection is a method for determining the external parameters (position and attitude parameters) of a camera in a geographic coordinate system by using the known geographic coordinates of control points in three-dimensional space. The idea is to establish a collinearity condition equation that includes the geographic coordinates of control points and the external parameters of the camera, linearize the collinearity equation after giving an approximate value of the external parameters, and then solve for the correction of the external parameters using the least squares method. Reasonably determining the approximate value of the external parameters is an important prerequisite for achieving fast and accurate solution of the equation.
[0003] However, in the conventional method for determining the initial value of the collinearity equation in photogrammetry, due to the usually approximately perpendicular measurement method, the initial value of the angular element in the collinearity equation is set to zero for calculation. This simplification is applicable to small-angle situations, but in large-rotation-angle scenarios, it may cause the iterative algorithm to fall into a numerical trap and fail to obtain the correct coordinate values. Although certain progress has been made in the research on large rotation angles, there are still many problems. The current literature has proposed various methods to solve the large-rotation-angle pose determination problem, including the indirect adjustment method that takes the direction cosine in the rotation matrix as the parameter to be solved, and the method of numerically solving using the error equation expanded by Taylor series. Although these methods have advantages in terms of accuracy, they still have deficiencies in terms of the number of control points, the number of iterations, and convergence. In addition, although the existing solutions based on relative orientation and the hybrid conjugate gradient algorithm have high solution accuracy, they are mainly applicable to stereo image pairs and are difficult to apply to single images, which limits their practicality. Therefore, there is an urgent need for a method to effectively improve the accuracy and efficiency of camera external parameter solution in large-rotation-angle scenarios and quickly solve the camera pose. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for determining the initial value of the external parameters of a photogrammetry camera under large rotation angles applicable to coplanar control points, which can accurately solve the parameters, has good convergence in iterative solution, and compared with the conventional method of setting the initial value of the collinearity equation linearization to zero, reduces the number of iterations and significantly improves the reliability of the results, and is applicable to space resection solution with arbitrary rotation angles.
[0005] To achieve the above technical purpose, the technical solution adopted by the present invention is as follows:
[0006] The present invention discloses a method for determining the initial value of the external parameters of a photogrammetry camera under large rotation angles applicable to coplanar control points, and the method includes the following steps:
[0007] S1: Establish a collinearity condition equation;
[0008] S2: Calculate the plane normal vector based on the geographical three-dimensional coordinates of three non-collinear control points among the n known points on the plane.
[0009] S3: Calculate the approximate coordinates of the camera center in the geographical coordinate system based on the approximate distance from the known camera center to the plane, the plane normal vector obtained in step S2, and the geographical three-dimensional coordinates of the plane center.
[0010] S4: Calculate the initial values of the image rotation angle, heading tilt angle, and lateral tilt angle under large rotation angles based on the plane normal vector obtained in step S2.
[0011] S5: Linearize the collinearity condition equation based on the geographical three-dimensional coordinate data and pixel coordinate data of the control points, list the error equation, substitute the approximate coordinates of the camera center obtained in step S3 and the initial values of the three angular elements obtained in step S4, calculate each external parameter correction number according to the least squares principle, and use the corrected external parameter adjusted value as the new initial value to recalculate the external parameter correction number and perform iterative calculation until the correction amounts of all parameters are less than a certain threshold.
[0012] Further, the collinearity condition equation in step S1 is:
[0013]
[0014] In the formula, f is the focal length; (x i , y i ) is the coordinate of the i-th control point in the image plane coordinate system, x i = u i - u0, y i = v0 - v i , (u0, v0) is the pixel coordinate of the principal point of the image, (u i , v i ) is the coordinate of the i-th control point in the pixel coordinate system; (X i , Y i , Z i ) is the coordinate of the i-th control point in the geographical coordinate system; (X S , Y S , Z S ) is the coordinate of the camera center in the geographical coordinate system; a1, a2, a3, b1, b2, b3, c1, c2, c3 are direction cosine parameters;
[0015]
[0016] In the formula, the heading tilt angle is the angle between the projection So x of the optical axis So on the S-XZ plane of the geographical coordinate system and the Z axis; the lateral tilt angle ω is the angle between the optical axis So and the projection So xThe included angle between; the photo rotation angle κ is the angle between the projection of the Y-axis of the geographic coordinate system on the photo plane and the y-axis of the photo plane coordinate system.
[0017] Further, in step S2, the following formula is used to calculate the plane normal vector n = (ΔX″, ΔY″, ΔZ″):
[0018] ΔX″ = (Y2 - Y1)(Z3 - Z1) - (Z2 - Z1)(Y3 - Y1)
[0019] ΔY″ = (Z2 - Z1)(X3 - X1) - (X2 - X1)(Z3 - Z1)
[0020] ΔZ″ = (X2 - X1)(Y3 - Y1) - (Y2 - Y1)(X3 - X1)
[0021] In the formula, (X i , Y i , Z i ) are the coordinates of the i-th control point in the geographic coordinate system.
[0022] Further, in step S3, the approximate coordinate calculation method of the camera center in the geographic coordinate system is:
[0023]
[0024] In the formula, d is the approximate distance from the camera center to the plane; (X o , Y o , Z o ) are the three-dimensional geographic coordinates of the plane center;
[0025]
[0026] In the formula, (X i , Y i , Z i ) are the coordinates of the i-th control point in the geographic coordinate system, i = 1, 2,..., n, and n = (ΔX″, ΔY″, ΔZ″) is the plane normal vector calculated in step S2.
[0027] Further, in step S4, the following formula is used to calculate the initial value of the photo rotation angle under large rotation angles:
[0028]
[0029] In the formula, (ΔX, ΔY, ΔZ) is the value of the coordinate vector P; (ΔX′, ΔY′, ΔZ′) is the value of the coordinate vector ; n is an integer;
[0030] The calculation method of the value of the coordinate vector P is:
[0031] ΔX = (Y3 - Y2)ΔZ″ - (Z3 - Z2)ΔY″
[0032] ΔY = (Z3 - Z2)ΔX″ - (X3 - X2)ΔZ″
[0033] ΔZ = (X3 - X2)ΔY″ - (Y3 - Y2)ΔX″
[0034] wherein, (X i , Y i , Z i ) are the coordinates of the i-th control point that are coplanar and non-collinear in the geographic coordinate system; (ΔX″, ΔY″, ΔZ″) are the values of the plane normal vector n;
[0035] The calculation method of the coordinate vector is as follows:
[0036]
[0037] wherein, the positive and negative signs are determined by the direction of the coordinate vector P. If the direction of P is the positive direction of the y-axis of the image plane coordinate system, the sign is positive; otherwise, it is negative.
[0038] Furthermore, in step S4, the calculation method for calculating the initial value of the heading tilt angle using the following formula is:
[0039]
[0040] wherein, n = (ΔX″, ΔY″, ΔZ″) is the plane normal vector calculated in step S2.
[0041] Furthermore, in step S4, the calculation method for calculating the initial value of the cross-track tilt angle using the following formula is:
[0042]
[0043] wherein, n = (ΔX″, ΔY″, ΔZ″) is the plane normal vector calculated in step S2.
[0044] Step S5 further includes:
[0045] Linearize the collinearity condition equation based on the geographic three-dimensional coordinate data and pixel coordinate data of the control points, and list the error equation:
[0046] V = AX - l
[0047] V = [v x , v y T
[0048]
[0049] l = [l x l y T
[0050] where
[0051]
[0052] in the formula, (x) and (y) are the approximate values of the function, which are the values obtained by substituting the initial values of the external parameters of the camera X S0 , Y S0 , Z S0 , ω0, κ0 into the collinearity condition equation; (x, y) are the coordinates of the control points in the image plane coordinate system; v x , v y are the correction numbers of the listed error equations;
[0053] Substitute the approximate coordinates of the camera center obtained in step S3 and the initial values of the three angular elements obtained in step S4, and calculate the correction numbers of each external parameter according to the least squares principle:
[0054] X = (A T A) -1 A T L;
[0055] Take the corrected adjusted value of the external parameter as the new initial value, recalculate the correction number of the external parameter, and perform iterative calculation until the correction amounts of all parameters are less than a certain threshold: The calculation method of the adjusted value of the external parameter is:
[0056]
[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0058] First, the method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points of the present invention can be effectively applied to close-range photogrammetry with large rotation angles. A rigorous algorithm is used for linearization of the collinearity equation to estimate the initial value, avoiding the limitations of the small-angle simplified model in the traditional method, thereby improving the measurement accuracy.
[0059] Second, the method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points of the present invention can effectively reduce the number of iterations, significantly shorten the iteration time, and improve the overall calculation efficiency.
[0060] Third, the method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points of the present invention can stably output accurate calculation results, avoiding the situation where the solution results are sometimes correct and sometimes wrong in the conventional method, effectively reducing errors and uncertainties, and ensuring that reliable results can be obtained for each calculation.
[0061] Fourth, the method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles where the applicable control points are coplanar according to the present invention only requires a small number of control points to accurately complete the calculation, greatly reducing the fieldwork workload and improving the convenience and efficiency of the measurement work. Description of the Drawings
[0062] Figure 1 It is a flowchart of the method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles where the applicable control points are coplanar according to the present invention. Detailed Embodiment
[0063] The following further describes the embodiments of the present invention in detail with reference to the drawings.
[0064] In this embodiment, the data takes a certain smartphone as an example to quickly and accurately calculate the external parameters of the camera. The calibration result of the camera internal parameters is: (u0, v0) = (2019.8, 1482.4), f x = f y = 3040.9, in pixels. In this implementation scenario, the approximate distance from the camera center to the plane is 5 m. Four coplanar control points are set on the wall, and the geodetic three-dimensional coordinate values of the four control points on the wall measured by a total station are shown in Table 1, in m.
[0065] Table 1 Geodetic three-dimensional coordinates of four control points
[0066]
[0067] The mobile phone is mounted 5 m away from the center of the plane containing the coplanar control points using a tripod. During the shooting process, the mobile phone faces the wall to take pictures, and the image pixel coordinates of the four control points are shown in Table 2, in pixels.
[0068] Table 2 Pixel coordinates of four control points
[0069]
[0070] The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles where the applicable control points are coplanar in this embodiment includes the following steps:
[0071] Step S1: Establish the collinearity condition equation;
[0072] Step S2: Given the geodetic three-dimensional coordinates of three coplanar and non-collinear control points among n points on the plane, calculate the plane normal vector:
[0073] ΔX″ = (Y2 - Y1)(Z3 - Z1) - (Z2 - Z1)(Y3 - Y1) = 0.9979
[0074] ΔY″ = (Z2 - Z1)(X3 - X1) - (X2 - X1)(Z3 - Z1) = 0.0645
[0075] ΔZ″ = (X2 - X1)(Y3 - Y1) - (Y2 - Y1)(X3 - X1) = 0.0027
[0076] Step S3: Given that the approximate distance from the camera center to the plane is 5m, calculate the approximate coordinates of the camera center in the geographic coordinate system using the plane normal vector and the geographic three - dimensional coordinates of the plane center:
[0077] Coordinates of the plane center point:
[0078]
[0079] Initial value of the camera center coordinates:
[0080]
[0081] Step S4: Calculate the initial values of the photo rotation angle, heading tilt angle, and cross - track tilt angle under large rotation angles based on the plane normal vector:
[0082] Select the geographic three - dimensional coordinates of points 1, 2, and 3 to calculate the coordinate vector P:
[0083] ΔX = (Y3 - Y2)ΔZ″ - (Z3 - Z2)ΔY″ = 0.001
[0084] ΔY = (Z3 - Z2)ΔX″ - (X3 - X2)ΔZ″ = 0.0001
[0085] ΔZ = (X3 - X2)ΔY″ - (Y3 - Y2)ΔX″ = -0.419
[0086] Calculate the coordinate vector
[0087]
[0088] Calculate the initial value of the photo rotation angle:
[0089]
[0090] Calculate the initial value of the heading tilt angle:
[0091]
[0092] Calculate the initial value of the cross - track tilt angle:
[0093]
[0094] Step S5: Linearize the collinearity condition equation based on the geographic three-dimensional coordinate data of the control points and the pixel coordinate data, list the error equation, substitute the obtained approximate coordinates of the camera center and the initial values of the three angular elements, calculate each external parameter correction according to the least squares principle, and use the corrected external parameter adjusted value as the new initial value to recalculate the external parameter correction. Iteratively calculate until the correction amounts of all parameters are less than a certain threshold. The calculated external parameter adjusted value is:
[0095]
[0096] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can 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. The solutions in the embodiments of the present application can be implemented in various computer languages. For example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript, etc.
[0097] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions run by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0098] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0099] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, so that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process Figure 1 one process or a plurality of processes and / or boxes Figure 1 or steps for implementing the functions specified in a box or a plurality of boxes.
[0100] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made by those skilled in the art once they learn the basic inventive concept. Therefore, the appended claims are intended to be construed to cover the preferred embodiments as well as all changes and modifications falling within the scope of the present application.
[0101] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points, characterized in that The method includes the following steps: S1: Establish the collinearity condition equation; S2: Calculate the plane normal vector according to the geographical three-dimensional coordinates of 3 non-collinear control points among n known points on the plane; S3: Calculate the approximate coordinates of the camera center in the geographical coordinate system according to the approximate distance from the known camera center to the plane, the plane normal vector obtained in step S2, and the geographical three-dimensional coordinates of the plane center; S4: Calculate the initial values of the photo rotation angle, course tilt angle, and lateral tilt angle under large rotation angles based on the plane normal vector obtained in step S2; S5: Linearize the collinearity condition equation based on the geographical three-dimensional coordinate data and pixel coordinate data of the control points, list the error equation, substitute the approximate coordinates of the camera center obtained in step S3 and the initial values of the three angular elements obtained in step S4, calculate each external parameter correction according to the least squares principle, and use the corrected external parameter adjusted value as the new initial value to recalculate the external parameter correction, and perform iterative calculation until the correction amounts of all parameters are less than a certain threshold.
2. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, wherein The collinearity condition equation in step S1 is: where f is the focal length; (x i , y i ) are the coordinates of the i-th control point in the image plane coordinate system, x i = u i - u0, y i = v0 - v i , (u0, v0) are the pixel coordinates of the principal point of the image, (u i , v i ) are the coordinates of the i-th control point in the pixel coordinate system; (X i , Y i , Z i ) are the coordinates of the i-th control point in the geographic coordinate system; (X S , Y S , Z S ) are the coordinates of the camera center in the geographic coordinate system; a1, a2, a3, b1, b2, b3, c1, c2, c3 are direction cosine parameters; In the formula, the heading tilt angle is the projection So of the optical axis So on the S-XZ plane of the geographic coordinate system x and the included angle with the Z axis; the cross-tilt angle ω is the included angle between the optical axis So and the projection So x ; the image rotation angle k is the included angle between the projection of the Y axis of the geographic coordinate system in the image plane and the y axis of the image plane coordinate system.
3. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, characterized in that, In step S2, the following formula is used to calculate the plane normal vector n=(ΔX″,ΔY″,ΔZ″): ΔX″=(Y2 - Y1)(Z3 - Z1)-(Z2 - Z1)(Y3 - Y1) ΔY″=(Z2 - Z1)(X3 - X1)-(X2 - X1)(Z3 - Z1) ΔZ″=(X2 - X1)(Y3 - Y1)-(Y2 - Y1)(X3 - X1) where (X i , Y i , Z i ) are the coordinates of the i-th control point in the geographic coordinate system.
4. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, wherein In step S3, the calculation method of the approximate coordinates of the camera center in the geographical coordinate system is: where d is the approximate distance from the camera center to the plane; (X o , Y o , Z o ) are the three-dimensional geographical coordinates of the plane center; where (X i , Y i , Z i ) is the coordinate of the i-th control point in the geographic coordinate system, i = 1, 2,..., n, and n = (ΔX″, ΔY″, ΔZ") is the plane normal vector calculated in step S2.
5. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, wherein In step S4, the following formula is used to calculate the initial value of the photo rotation angle under large rotation angles: Where (ΔX, ΔY, ΔZ) is the value of the coordinate vector P; (ΔX', ΔY′, ΔZ′) is the value of the coordinate vector ; n is an integer; The calculation method of the coordinate vector P value is: ΔX=(Y3 - Y2)ΔZ″-(Z3 - Z2)ΔY″ ΔY=(Z3 - Z2)ΔX″-(X3 - X2)ΔZ" ΔZ=(X3 - X2)ΔY"-(Y3 - Y2)ΔX″ Wherein, (X i , Y i , Z i ) are the coordinates of the i-th control point that is coplanar but non-collinear in the geographic coordinate system; (ΔX", ΔY", ΔZ″) are the values of the plane normal vector n; Coordinate vector is calculated as follows: In the formula, the positive and negative signs are determined by the direction of the coordinate vector P. If the direction of P is the positive direction of the y-axis of the image plane coordinate system, the sign is positive, otherwise it is negative.
6. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, wherein In step S4, the following formula is used to calculate the calculation method of the initial value of the course tilt angle: In the formula, n=(ΔX″,ΔY″,ΔZ″) is the plane normal vector calculated in step S2.
7. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 1, characterized in that, In step S4, the following formula is used to calculate the calculation method of the initial value of the lateral tilt angle: In the formula, n=(ΔX″,ΔY″,ΔZ″) is the plane normal vector calculated in step S2.
8. The method for determining the initial value of the external parameters of a photogrammetric camera under large rotation angles applicable to coplanar control points according to claim 2, characterized in that, Step S5 further includes: Linearize the collinearity condition equation based on the geographical three-dimensional coordinate data and pixel coordinate data of the control points, and list the error equation: V = AX - l V = [v x , v y T l=[l x l y ] T where Where, (x) and (y) are the approximate values of the function, which are the values obtained by substituting the initial values of the external camera parameters ω0, κ0 into the collinearity condition equation; (x, y) are the coordinates of the control point in the image plane coordinate system; v x , v y are the correction numbers of the listed error equations; Substitute the approximate coordinates of the camera center obtained in step S3 and the initial values of the three angular elements obtained in step S4, and calculate each external parameter correction according to the least squares principle: X = (A T A) -1 A T L; Use the corrected external parameter adjusted value as the new initial value to recalculate the external parameter correction, and perform iterative calculation until the correction amounts of all parameters are less than a certain threshold: The calculation method of the external parameter adjusted value is: