A method for determining the attitude and positioning of surveying and mapping cameras based on infield calibration model calculation
By attaching marking points outside the camera and measuring the camera's three-dimensional coordinates in the indoor inspection and calibration field, combined with the coordinates of the field marking points, the problem of determining the position and posture of the camera in the in-field inspection and calibration is solved, and the accurate positioning of the camera in the outer field and the acquisition of the three-dimensional model of the stereo camera is realized.
Patent Information
- Application Number
- CN202411594865.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The prior art cannot effectively obtain the camera's live position and attitude in in-field inspection, especially the relative position and attitude of the stereo camera, and cannot determine the camera's installation position and attitude in the outdoor field in the indoor inspection field.
Attach marking points outside the camera, place the camera in the indoor inspection field, use the total station to measure the three-dimensional coordinates of the marking points, combine the coordinates of the external field marking points, establish a mathematical model of the camera position and posture, and check it through the rear intersection algorithm of the single-chip space to determine the position and posture of the camera in the external field.
It realizes accurate positioning and attitude determination of the camera in the outer field, can quickly obtain the three-dimensional model of the object, solves the relative position and attitude problem of the stereo camera in actual engineering, and improves the application efficiency of the camera in engineering.
Smart Images

Figure CN119618260B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method for determining the attitude and positioning of a surveying and mapping camera, and in particular to a method for determining the attitude and positioning of a surveying and mapping camera using an infield calibration model calculation, and belongs to the technical field of unmanned aerial vehicle photogrammetry. Background Art
[0002] With the widespread use of photographic cameras, a growing number of camera calibration methods are being developed. For example, a drone-based high-voltage power line inspection project has established a calibration field to test the reliability of drone flight inspection systems. Considering factors such as the drone's small size and the impact of its onboard GPS positioning system on flight performance, drone operators will establish an off-site calibration field to obtain the drone's true flight trajectory and verify the reliability of the flight system. The calibration field is equipped with two east and west measuring piers, and within the field, eighteen cameras are positioned at predetermined angles, facing the sky. These cameras will be installed at designated locations within the field according to project requirements. Before intersecting the drone's position with images captured by these cameras, the camera's internal orientation elements, camera distortion factors, and the exterior orientation elements of each image in the off-site object-space coordinate system are required. The camera's internal orientation elements and distortion factors can be obtained through calibration in an indoor calibration field. However, since several cameras are widely distributed, the camera's external orientation elements after installation are not suitable for establishing a large-scale control field in the outdoor field and then calculating its external orientation elements. Therefore, how to obtain the camera's on-site position and posture through the results of the indoor calibration is an urgent problem that needs to be solved.
[0003] As the application of cameras in engineering deepens, stereo cameras are also widely used in the fields of cultural relics protection, industrial measurement, traffic conditions, and robot navigation. Before putting a stereo camera into use, it is necessary to calibrate the stereo camera. By calibrating the stereo camera, based on the knowledge of the stereo camera correlation factors, the forward intersection of the stereo image pair is achieved, thereby obtaining the three-dimensional model of the object more conveniently and quickly. How to achieve the calibration of the stereo camera is an urgent problem to be solved in this application.
[0004] The problems that need to be solved in the existing in-field calibration of camera positioning and the key technical difficulties of this application include:
[0005] (1) Among the current camera calibration methods, there is a method of establishing an outdoor calibration field with several cameras facing the sky at a certain inclination angle. These cameras will be installed at the set positions in the calibration field according to the project requirements. Before using the images taken by these cameras to intersect the position of the drone, it is necessary to know the camera's internal orientation elements, camera distortion factors, and the external orientation elements of each picture in the outdoor object coordinate system. The camera's internal orientation elements and distortion factors can be obtained by calibration in an indoor calibration field. Because several cameras are widely distributed, the camera's external orientation elements after installation are not suitable for the method of establishing a large-scale control field in the outdoor field and then calculating its external orientation elements. Therefore, how to obtain the camera's on-site position and posture through the results of the indoor calibration is a problem that needs to be solved urgently. As the application of cameras in engineering projects deepens, stereo cameras need to be calibrated before they are put into use. By calibrating the stereo cameras, the forward intersection of stereo images can be achieved based on the knowledge of the stereo camera correlation factors, thereby obtaining the three-dimensional model of the object more conveniently and quickly. How to achieve the calibration of stereo cameras is an urgent problem to be solved in this application.
[0006] (2) After the camera is calibrated, when it is directly used in actual engineering, the determination of its position and posture is also an issue that cannot be ignored. The existing technology can use the control points in the engineering coordinate system to determine the position and posture of the camera based on the principle of rear intersection. However, this method is limited by the actual engineering conditions and is not suitable for use. Other methods need to be used to obtain its position and posture. How to determine the position and posture of the camera after installation in actual engineering applications based on the calibration results of the camera in the indoor field is also an urgent problem to be solved in this application. There is an urgent need for a method to establish a conversion model between multiple coordinate systems based on the camera calibration results to solve the problems of determining the position and posture of the camera encountered in specific projects, as well as the problem of how to determine the relative position and posture between multiple cameras in a stereo camera.
[0007] (3) Regarding the problem of determining the external orientation elements after the camera is installed in the field in actual projects, the existing technology lacks a method to install the camera in a protective shell with artificial marking points and calibrate it in an indoor calibration field, and it is impossible to obtain the position and posture of the outdoor camera. It is impossible to calibrate the internal orientation elements of the camera, camera distortion factors, etc. based on the single-piece space resection algorithm in the indoor calibration field. It is impossible to use the total station to measure the internal field three-dimensional coordinates of the camera shell marking points based on the indoor calibration results and the camera during the indoor calibration. There is a lack of a relationship model between several shell marking points and the camera image space coordinate system. The camera is not installed in the outdoor calibration field, and it is impossible to measure the three-dimensional coordinates of the shell marking points in the outdoor calibration field, and it is impossible to calculate the position and posture of the camera in the outdoor field to complete the camera outdoor positioning. The existing technology lacks a method to use the indoor object space coordinate system as a transition coordinate system based on the calibration of a single camera in the indoor calibration field, and it is impossible to calculate the relative position and posture relationship between the image space coordinate systems of multiple cameras, and it is impossible to calibrate the stereo camera to obtain the object space three-dimensional model. Summary of the Invention
[0008] This application addresses the urgent problem of determining the camera's on-site position and attitude based on the results of an indoor calibration. Before a stereo camera is put into use, it is calibrated. Through this calibration, the stereo image pairs are intersected forward based on the known correlation factors, allowing for a more convenient and efficient acquisition of a three-dimensional model of an object. This solves the urgent problem of how to achieve stereo camera calibration. This application addresses the problem of determining the indoor calibration results. By attaching artificial markers to the camera housing and placing the camera in an indoor calibration field, a total station is used to measure the indoor object-space 3D coordinates of the camera housing markers. This determines the fixed positional relationship between the housing markers and the camera image space coordinate system. Combined with the outdoor object-space 3D coordinates of the housing markers after installation, the relationship and connection between the camera's exterior orientation elements at the outdoor construction site and those in the indoor calibration field are determined. Furthermore, for stereo cameras, the relative positions and attitudes of multiple cameras are determined in the indoor calibration field, and the correlation factors are obtained, facilitating their eventual use in practical engineering projects. This application uses the camera calibration results to establish a conversion model between multiple coordinate systems, solving the problems of determining the camera position and posture encountered in specific projects, as well as the problem of how to determine the relative position and posture between multiple cameras in a stereo camera.
[0009] To achieve the above technical effects, the technical solutions adopted in this application are as follows:
[0010] The method for determining the pose and positioning of a surveying camera using an indoor calibration model is as follows: first, determine the outdoor position and pose of a single camera: attach markers to the outside of the camera, place several artificial markers and the camera as a rigid body in the calibration field for calibration; during camera calibration, measure the coordinates of the markers in the indoor object space coordinate system to obtain the relative position relationship between the markers and the camera; based on this fixed relative relationship, and in combination with the coordinates of the markers in the outdoor object space three-dimensional coordinate system when installed in the outdoor field, establish a mathematical model for solving the outdoor camera position and pose; second, calibrate a stereo camera: place the stereo camera in an indoor calibration field for calibration, and use the relationship between the indoor object space three-dimensional coordinate system and the image space coordinate systems of multiple cameras in the stereo camera to obtain the relative positions and poses between the multiple image space coordinate systems; finally, establish the local coordinates of the stereo camera to complete the calibration of the stereo camera;
[0011] S1-Indoor calibration of a single camera: The camera is calibrated in an indoor calibration field using the camera calibration method based on single-image spatial resection. The indoor control field contains a large number of evenly distributed control points. The coordinates of these control points in the indoor object space 3D coordinate system of the calibration field are obtained using high-precision measurement methods.
[0012] S2-Determination of the outdoor position and posture of a single camera, including: obtaining the indoor coordinates of the camera housing markers, obtaining the outdoor coordinates of the camera housing markers, calculating the outdoor position and posture model of a single camera, obtaining the coordinates of the indoor camera housing markers in the indoor object space 3D coordinate system during the indoor camera calibration, and obtaining the coordinates of the camera housing markers in the outdoor object space 3D coordinate system after the camera is installed in the outdoor field, and determining the outdoor camera's posture based on the indoor camera calibration results;
[0013] S3-In-field calibration of stereo cameras: A mathematical model is established using the exterior orientation elements of several cameras at the time of calibration, obtained using the single-camera calibration method. Finally, the relative positions and postures of multiple cameras in the stereo camera are obtained. Based on the relative positional relationships between the multiple cameras, the relative three-dimensional coordinates of the object are obtained using the stereo photos of the stereo cameras.
[0014] Preferably, for in-field calibration of a single camera: coordinate system DX 内场 Y 内场 Z 内场 It is the three-dimensional coordinate system of the object space in the indoor calibration field. The camera is placed in the indoor calibration field facing the control field area, and the control field is photographed to obtain the photographed image. Point S is the photographic center of the camera, and the coordinate system S-xyz is the image space coordinate system of the camera.
[0015] After placing the camera at a certain position in the inner field control field, let the camera shoot the control points on the control field, and use the model to calculate the camera's internal orientation elements, the camera's external orientation elements when calibrated in the calibration field, and the optical distortion factors including radial distortion factor and eccentric distortion factor.
[0016] Preferably, the camera is placed in an indoor calibration field for calibration, and the camera is allowed to capture a control field composed of several evenly distributed control points, and the image-space coordinates of the image points corresponding to the control points in the captured image are obtained. Subsequently, the image-space coordinates of the image points corresponding to the control points in the image and the known three-dimensional coordinates of the control points in the object-space three-dimensional coordinate system of the indoor calibration field are substituted into the collinearity condition equation to solve the camera correlation factors, including the camera's internal orientation elements, the camera distortion factors, and the camera's external orientation elements at the time of calibration.
[0017] The camera is placed in a protective housing and artificial marking points are attached to the camera housing. The camera is then set up somewhere in front of the control field and photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points on the camera housing can be in line of sight with the total station on the forced centering stake on the left side of the control field. While the camera photographs the control field, the coordinates of the camera housing marking points in the inner field object space three-dimensional coordinate system are measured. After photographing the control field to obtain a picture of the control field, the image space coordinates of the image control points corresponding to the image points, together with the three-dimensional coordinates of the control points corresponding to the image points in the inner field object space three-dimensional coordinate system, are substituted into the collinearity condition equation. The camera is calibrated based on single-piece spatial resection to solve the camera's interior orientation elements, camera distortion factors, and the camera's exterior orientation elements at the time of photographing.
[0018] When calculating the camera factor using single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average value of the coordinates of the measured camera housing marker points, while the initial value of the exterior orientation element angle element, camera interior orientation element, and camera distortion factor is considered to be 0, and iterative calculation is performed to calculate the final results of each factor.
[0019] Preferably, the infield coordinates of the camera housing markers are obtained: in the infield object space three-dimensional coordinate system DX 内场 Y 内场 Z 内场 Based on this, an infield measurement coordinate system DX is established 测量 Y 测量 Z 测量 , the origin of the coordinate system is the same as DX 内场 Y 内场 Z 内场 Origin coincides, X 测量 Axis and internal field coordinate system Z 内场 The inner axes are in a straight line but in opposite directions, Y 测量 The axis is the X axis of the internal field object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the object coordinate system. 内场Axis, where point N and point S are the left and right measuring piers in the calibration field, point A is one of the marking points on the camera housing, point a is the projection point of the marking point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the marking point on the camera housing, the value of the angle 90°∠SNa is the zenith distance between the measuring station and the marking point on the camera housing, and the distance S between points N and A is NA The slant distance between the measuring station and the marking point on the camera housing is calculated. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object space are known. According to the relationship between the coordinate axes, the coordinates of the measuring station N and the orientation point S in the infield measurement coordinate system DX are calculated. 内场 Y 内场 Z 内场 The three-dimensional coordinates are calculated as follows:
[0020] X 测量 =-Z 内场 , Y 测量 =X 内场 , Z 测量 = 内场 Formula 1
[0021] The calculated measuring station N and orientation point S are in the infield measurement coordinate system DX 测量 Y 测量 Z 测量 The azimuth angle α of the straight line NS is calculated from the coordinates NS :
[0022]
[0023] The azimuth angle of the straight line NA is calculated as follows:
[0024] α NA =α NS +∠SNa Formula 3
[0025] Assume that the three-dimensional coordinates of one of the marking points A on the camera housing in the infield measurement coordinate system are (X A , Y A , Z A ), the three-dimensional coordinates of point A are calculated as follows:
[0026] X A =X N +S NA *cosα NA
[0027] Y A =Y N +S NA *sinα NA
[0028] Z A =Z N +SNA *tan∠ANa Formula 4
[0029] At this time, the three-dimensional coordinates of the marker points obtained by measurement calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object space three-dimensional coordinate system. Formula 1 is used to convert the coordinates of the measured marker points in the measurement coordinate system to the infield object space coordinate system.
[0030] Preferably, obtain the off-site coordinates of the camera housing mark point: the east and west measuring piers are two measuring piers built in the off-site calibration field, and the relative position between the two measuring piers is known, the coordinate system PX 外场 Y 外场 Z 外场 From the object space three-dimensional coordinate system of the outdoor field, after the camera is installed in the outdoor field, it is necessary to measure the coordinates of the camera housing mark point in the outdoor field object space coordinate system, establish a west station as the origin, which is convenient for measurement and calculation using the total station, and the direction from the west station to the east station is Y 测量 Positive direction of axis, perpendicular to Y 测量 Axis and facing north is X 测量 Axis positive direction, Z 测量 The axis is perpendicular to the X 测量 PY 测量 The coordinate system of the measuring plane is vertically upward, and this coordinate system is a left-handed coordinate system. The coordinates of the support point in the measurement coordinate system are measured by the east and west measuring piers. Then, a total station is set up at the support point. The east or west measuring station is selected as the orientation point according to the position of each camera. The coordinates of the marked point in the external field measurement coordinate system are measured in the same way as the coordinates of the marked point are measured in the internal field.
[0031] Finally, the coordinates of the measured marker points in the external field measurement coordinate system are converted to the coordinates in the external field object space three-dimensional coordinate system:
[0032] X 外场 =Y 测量 , Y 外场 =Z 测量 , Z 外场 =-X 测量 Formula 5
[0033] Formula 5 is the conversion formula.
[0034] Preferably, a single camera external field position and posture calculation model is as follows: by using the camera to shoot the internal field control field, the camera is calibrated to obtain the camera's external orientation elements and the camera's internal orientation elements when the camera is in the indoor calibration field, and the three angle elements and three line elements of the camera's external orientation elements in the indoor calibration field are used to respectively obtain the rotation matrix and the translation matrix between the camera's image space coordinate system in the indoor calibration field and the internal field object space three-dimensional coordinate system;
[0035] DX内场 Y 内场 Z 内场 is the three-dimensional coordinate system of the object space in the interior, S is the photographic center of the camera, the cuboid is a schematic diagram of the camera housing, Sx 内 y 内 z 内 It is the image space coordinate system of the camera. A local coordinate system Sx is established inside the camera with the photography center as the origin and each coordinate axis parallel to the corresponding coordinate axis of the internal object coordinate system. 局部 y 局部 z 局部 .
[0036] Preferably, when calibrating a camera in an indoor calibration field, the camera placement should meet the following rules:
[0037] 1) The control field in the calibration field is photographed, which consists of several control points that are evenly distributed and not on the same plane;
[0038] 2) The total station placed on the measuring pier in the calibration field has line of sight with the marking points attached to the housing of the camera being calibrated in the calibration field.
[0039] Preferably, after the camera is calibrated in an indoor calibration field, the camera's exterior orientation elements, camera interior orientation elements, and camera distortion factors at the time of calibration are obtained. Based on the derivation of the collinearity condition equation and the camera's indoor calibration results, the indoor object space three-dimensional coordinate system DX in the calibration field is listed. 内场 Y 内场 Z 内场 and the image space coordinate system Sx of the infield camera 内 y 内 z 内 The relative transformation relationship:
[0040]
[0041] [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing marker in the object space three-dimensional coordinate system, [x 内 y 内 z 内 ] T is the coordinate of the camera housing mark point in the camera image space coordinate in the indoor calibration field, where R 内场 , [ΔX 内场 ΔY 内场 ΔZ 内场 ] TThey are respectively the rotation matrix composed of the angular elements in the exterior orientation elements of the camera at the calibration moment and the translation matrix composed of the line elements in the exterior orientation elements obtained after the camera is calibrated in the indoor calibration field;
[0042] From the known rotation matrix R 内场 And the translation matrix [ΔX 内场 ΔY 内场 ΔZ 内场 ] T , combined with the coordinates of the camera housing mark point in the infield object space three-dimensional coordinate system measured by the total station in the infield, the three-dimensional coordinates of the camera housing mark in the infield camera image space coordinate system [x 内 y 内 z 内 ] T ,get:
[0043]
[0044] After the camera calibrated in the indoor calibration field is installed in the outdoor calibration field, the camera and outdoor coordinate systems satisfy the following requirements:
[0045]
[0046] [X 外场 Y 外场 Z 外场 ] T Represents the three-dimensional coordinates of the camera housing mark point in the three-dimensional coordinate system of the object space in the field calibration field, [x 外 y 外 z 外 ] T is the coordinate of the camera housing mark point in the camera image space coordinate in the field test field; R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T They are the rotation matrix composed of the angular elements in the camera's exterior orientation elements and the translation matrix composed of the line elements in the exterior orientation elements after the camera is fixedly installed in the outdoor calibration field. They are obtained from formula 7:
[0047]
[0048] Based on the invariance, we solve the external orientation elements of the camera in the external field calibration field and get the equation:
[0049]
[0050] Combining Equation 6, Equation 8, and Equation 9, we can obtain:
[0051]
[0052] Multiply both sides of the above equation by R on the left 外场 have to:
[0053]
[0054] After moving the items:
[0055]
[0056] In formula 12, [X 外场 Y 外场 Z 外场 ] T is the coordinate of the mark point on the camera housing in the external object space three-dimensional coordinate system, R 内场 and [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth elements and the translation matrix composed of the external azimuth line elements in the infield calibration results of the camera, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed. 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T is the coordinate of the camera housing marker in the local coordinate system of a single camera when the camera is in the indoor calibration field. When the camera is moved from the indoor calibration field to the outdoor calibration field, the coordinate of the marker in the camera local coordinate system does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the camera local coordinate system and the outdoor object space 3D coordinate system:
[0057]
[0058] Based on the two sets of coordinates of the marker point in the external object coordinate system and the camera local coordinate system, the coordinate transformation is used to solve the rotation matrix R and translation matrix [ΔX ΔY ΔZ] between the two coordinate systems. T , comparing the structures of Equation 13 and Equation 12, we can get:
[0059] R 内场 、R 内场 -1 =R Formula 14
[0060] [ΔX 外场 ΔY 外场 ΔZ外场 ] T =[ΔX ΔY ΔZ] T Formula 15
[0061] The rotation matrix and translation matrix of the external orientation elements of the fixed camera external field are obtained from Equations 14 and 15:
[0062] R 内场 =RR 外场 Formula 16
[0063] [ΔX 外场 ΔY 外场 ΔZ 外场 ] T =[ΔX ΔY ΔZ] T Formula 17
[0064] Based on the rotation matrix and translation matrix composed of the exterior orientation elements of the field camera, the exterior orientation elements of the camera are calculated, which are obtained by rotating three angles in sequence from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, rotate the two coordinate systems in steps, that is, rotate three different angles around the coordinate axis, and the coordinates of the image point a in the coordinate system S-XYZ are (X, Y, Z);
[0065]
[0066]
[0067] b1=cosωsinκ
[0068] b2=cosωcosκ
[0069] b3=-sinω
[0070]
[0071] Dividing the equation b1 = cosωsinκ by the equation b2 = cosωcosκ yields:
[0072]
[0073] get:
[0074]
[0075] The equation and equation Dividing the left and right sides gives:
[0076]
[0077] get:
[0078]
[0079] From the equation b3 = -sinω we get:
[0080] ω=sin -1 -b3 Formula 25
[0081] The angular elements of the exterior orientation elements are solved by Equations 23, 24, and 25. The three elements of the translation matrix in Equation 13 correspond to the exterior orientation line elements of the exterior field camera.
[0082] Preferably, the in-field calibration of the stereo camera is as follows: a mathematical model is established using the external orientation elements of several cameras at the time of camera calibration obtained by the single-camera calibration method, and finally the relative position and posture of multiple cameras in the stereo camera are obtained. Based on the relative position relationship between the multiple cameras, the relative three-dimensional coordinates of the object are obtained using the stereo photos of the stereo camera.
[0083] Preferably, a stereo camera consisting of two cameras is first placed in an indoor calibration field, and the position and orientation of the stereo camera are adjusted so that the two cameras in the stereo camera can capture the control field area of the indoor calibration field and obtain two photos;
[0084] DX 内场 Y 内场 Z 内场 is the object space three-dimensional coordinate system in the indoor calibration field, point S 左 、Point S 右 They are the photographic centers of the left and right cameras in the stereo camera, respectively. The image space coordinate system of the left camera in the stereo camera is S 左 -x 左 y 左 z 左 , the image space coordinate system of the right camera in the stereo camera is S 右 -x 右 y 右 z 右 , establish a local coordinate system SX on the stereo camera 立休 Y 立休 Z 立休 , and take the local object space three-dimensional coordinate system of the stereo camera as the left camera image space coordinate system in the stereo camera;
[0085] The transformation relationship between the camera image space coordinate system in the left camera and the object space 3D coordinate system in the indoor calibration field is calculated from the left camera exterior orientation angle elements and exterior orientation line elements in the left camera calibration results of the stereo camera:
[0086]
[0087] In formula 26, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 左 y 左 z 左 ] T The object point is at S 左 -x 左 y 左 z 左 Coordinates in the coordinate system, R 左 It is the rotation matrix between the image space coordinate system of the left camera and the three-dimensional coordinate system of the object space in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns;
[0088] The transformation relationship between the camera image space coordinate system in the right camera and the object space three-dimensional coordinate system in the indoor calibration field is calculated from the right camera exterior orientation angle elements and exterior orientation line elements in the right camera calibration results in the stereo camera:
[0089]
[0090] In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 右 y 右 z 右 ] T The object point is at S 右 -x 右 y 右 z 右 Coordinates in the coordinate system, R 右 It is the rotation matrix between the image space coordinate system of the right camera and the object space three-dimensional coordinate system in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns;
[0091] The transformation relationship between the image space coordinate systems of the left and right cameras in a stereo camera is derived from Equations 26 and 27:
[0092]
[0093] Simplifying the above formula, we get:
[0094]
[0095] Equation 29 is the transformation relationship between the image space coordinate system of the left camera and the image space coordinate system of the right camera in the stereo camera. The transformation relationship between the image space coordinate system of the left camera and the local object space 3D coordinate system of the stereo camera is:
[0096]
[0097] Combining Equations 29 and 30, the transformation relationship between the image space coordinate system of the right camera in the stereo camera and the local object space three-dimensional coordinate system of the stereo camera is:
[0098]
[0099] In the stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object space three-dimensional coordinate system, Equations 30 and 31 represent the translation and rotation relationship between the left camera image space coordinate system and the object space coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object space coordinate system, respectively. Based on the obtained translation and rotation matrices and combined with the collinearity condition equation, the exterior orientation elements of the left and right cameras in the local coordinate system of the stereo camera are calculated, the calibration of the stereo camera is completed, the forward intersection of the stereo image pair is achieved, and the object space coordinates of the object point in the local coordinate system of the stereo camera are calculated.
[0100] Compared with the existing technology, the innovation and advantages of this application are:
[0101] (1) In order to solve the problem of determining the external orientation elements after the camera is installed outdoors in actual projects, this application proposes to install the camera in a protective shell with artificial marking points, and calibrate it in an indoor calibration field to obtain the position and attitude of the outdoor camera. In the indoor calibration field, the camera's internal orientation elements, camera distortion factors, etc. are calibrated based on the single-chip spatial resection algorithm. Based on the indoor calibration results, combined with the indoor three-dimensional coordinates of the camera shell marking points measured by the total station during the indoor calibration, a relationship model between several shell marking points and the camera image space coordinate system is established. Using the invariance of this model, the camera is installed in the outdoor calibration field, and the three-dimensional coordinates of the shell marking points in the outdoor calibration field are measured. Finally, the position and attitude of the camera in the outdoor field are calculated, completing the camera outdoor attitude positioning. At the same time, before a stereo camera is actually put into use, it must be calibrated to obtain the relative position and posture relationships between multiple cameras, making it easier to obtain a three-dimensional model of an object in actual production. This is done by calibrating a single camera in an indoor calibration field, using the indoor object space coordinate system as the transition coordinate system, and calculating the relative position and posture relationships between multiple camera image space coordinate systems to complete the calibration of the stereo camera and obtain the object space three-dimensional model. This application, based on the artificial marking points placed on the camera housing, effectively solves the problem of determining the position and posture of cameras without control points in outdoor engineering sites. Based on the calibration method of a single indoor camera, a stereo camera calibration model is constructed, and its effectiveness is verified through experiments.
[0102] (2) This application proposes a method for determining the outdoor position and posture of a single camera: attaching markers to the outside of the camera, and placing several artificial markers and the camera as a rigid body in a calibration field for calibration. During camera calibration, the coordinates of the markers in the indoor object space coordinate system are measured to obtain the relative position relationship between the markers and the camera. Based on this fixed relative relationship, combined with the coordinates of the markers in the outdoor object space three-dimensional coordinate system when installed in the outdoor field, a mathematical model for solving the outdoor camera position and posture is established, and finally the feasibility of the model is verified in an indoor calibration field. This application proposes a method for calibrating stereo cameras: placing the stereo camera in an indoor calibration field for calibration, using the relationship between the indoor object space three-dimensional coordinate system and the image space coordinate systems of multiple cameras in the stereo camera, the relative positions and postures between the multiple image space coordinate systems are obtained, and finally the local coordinates of the stereo camera are established to complete the calibration of the stereo camera and verify the calibration results.
[0103] (3) This application solves the problem of how to obtain the position and posture of the camera on site through the results of the indoor calibration, which is a problem that needs to be solved urgently. Before the stereo camera is put into use, the stereo camera is calibrated. Through the calibration of the stereo camera, the stereo image pair is intersected in front based on the correlation factors of the stereo camera, so that the three-dimensional model of the object can be obtained more conveniently and quickly. This solves the problem of how to realize the calibration of the stereo camera, which is a problem that needs to be solved urgently in this application. It solves the problem of how to determine the position and posture of the camera after installation in actual engineering applications through the calibration results of the camera in the indoor field. By attaching artificial marking points on the camera housing, the camera is placed in the indoor calibration field for calibration, and the indoor object space three-dimensional coordinates of the camera housing marking points are measured using a total station to obtain the fixed position relationship between the housing marking points and the camera image space coordinate system. Using this invariance, combined with the outdoor object space three-dimensional coordinates of the housing marking points after installation in the outdoor field, the relationship and connection between the external orientation elements of the camera installed at the outdoor engineering construction site and the external orientation elements in the indoor calibration field are obtained. Meanwhile, for stereo cameras, the relative positions and attitudes of multiple cameras must be determined in an indoor calibration field to obtain the stereo camera correlation factors, facilitating their eventual use in practical engineering projects. This application, using the camera calibration results, establishes a transformation model between multiple coordinate systems, resolving the issues of determining camera position and attitude in specific projects, as well as the problem of determining the relative positions and attitudes of multiple cameras in a stereo camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] Figure 1 This is a schematic diagram of camera calibration in an indoor calibration field.
[0105] Figure 2 This is a schematic diagram of measuring the coordinates of the marker points on the inner field camera housing.
[0106] Figure 3 This is a schematic diagram of the coordinate system of the indoor calibration field for a camera installed in a physical device.
[0107] Figure 4 It is a schematic diagram of the camera in the external field three-dimensional coordinate system.
[0108] Figure 5 This is a schematic diagram of the calibration of a stereo camera in an indoor calibration field.
[0109] Figure 6 This is a comparison chart of the calibrated exterior orientation elements and the calculated exterior orientation elements of the left and right cameras.
[0110] Figure 7 It is a schematic diagram of the comparison results between the control point coordinates and the intersection point coordinates.
[0111] Figure 8 This is a diagram of the correlation factors of 5 of the 18 cameras after field installation.
[0112] Figure 9 It is a comparison chart of the control coordinates and calculated coordinates of two points in the external field.
[0113] Figure 10 It is a schematic diagram of the difference in relative distance between the detection point coordinates and the intersection point coordinate calculation point. DETAILED DESCRIPTION
[0114] The following, in conjunction with the accompanying drawings, further describes the technical solution of the surveying camera attitude determination and positioning method for infield calibration model calculation provided by this application, so that those skilled in the art can better understand this application and implement it.
[0115] The method for determining the pose and positioning of a surveying camera using an indoor calibration model is as follows: first, determine the outdoor position and pose of a single camera: attach markers to the outside of the camera, place several artificial markers and the camera as a rigid body in the calibration field for calibration; during camera calibration, measure the coordinates of the markers in the indoor object space coordinate system to obtain the relative position relationship between the markers and the camera; based on this fixed relative relationship, and in combination with the coordinates of the markers in the outdoor object space three-dimensional coordinate system when installed in the outdoor field, establish a mathematical model for solving the outdoor camera position and pose; second, calibrate a stereo camera: place the stereo camera in an indoor calibration field for calibration, and use the relationship between the indoor object space three-dimensional coordinate system and the image space coordinate systems of multiple cameras in the stereo camera to obtain the relative positions and poses between the multiple image space coordinate systems; finally, establish the local coordinates of the stereo camera to complete the calibration of the stereo camera;
[0116] 1. In-field calibration of a single camera
[0117] The camera calibration used in this application is to calibrate the camera in an indoor calibration field based on the camera calibration method of single image space resection. The indoor control field contains a large number of evenly distributed control points. The coordinates of these control points in the three-dimensional coordinate system of the object space in the calibration field are obtained by high-precision measurement. The schematic diagram of the control field in the indoor calibration field is as follows: Figure 1 shown.
[0118] Figure 1 Center coordinate system DX 内场 Y 内场 Z 内场 It is the three-dimensional coordinate system of the object space in the indoor calibration field. The camera is placed in the indoor calibration field facing the control field area, and the control field is photographed to obtain the photographed image. Point S is the photographic center of the camera, and the coordinate system S-xyz is the image space coordinate system of the camera.
[0119] After placing the camera at a certain position in the inner field control field, let the camera shoot the control points on the control field, and use the model to calculate the camera's internal orientation elements, the camera's external orientation elements when calibrated in the calibration field, and the optical distortion factors including radial distortion factor and eccentric distortion factor.
[0120] The camera is placed in an indoor calibration field for calibration. The camera is allowed to capture a control field consisting of several evenly distributed control points. The image-space coordinates of the corresponding image points in the captured control field are obtained. The image-space coordinates of the corresponding image points in the control field and the known three-dimensional coordinates of the control points in the object-space three-dimensional coordinate system of the indoor calibration field are then substituted into the collinearity condition equation to solve the camera correlation factors, including the camera's internal orientation elements, camera distortion factors, and the camera's external orientation elements at the time of calibration.
[0121] The camera is placed in a protective shell and artificial marking points are attached to the camera shell. The camera is then set up somewhere in front of the control field and photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points on the camera shell can be in line of sight with the total station on the forced centering pile on the left side of the control field. While the camera photographs the control field, the coordinates of the camera shell marking points in the inner field object space three-dimensional coordinate system are measured. After photographing the control field to obtain a picture of the control field, the image space coordinates of the image control points corresponding to the image points, together with the three-dimensional coordinates of the control points corresponding to the image points in the inner field object space three-dimensional coordinate system, are substituted into the collinearity condition equation. The camera is calibrated based on single-piece spatial resection to solve the camera's interior orientation elements, camera distortion factors, and the camera's exterior orientation elements at the time of photographing.
[0122] When calculating the camera factor using single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average value of the coordinates of the measured camera housing marker points, while the initial value of the exterior orientation element angle element, camera interior orientation element, and camera distortion factor is considered to be 0, and iterative calculation is performed to calculate the final results of each factor.
[0123] 2. Determination of the field pose of a single camera
[0124] Obtain the coordinates of the marking points on the inner-field camera housing in the inner-field object space three-dimensional coordinate system during the inner-field calibration of the camera, as well as the coordinates of the marking points on the outer-field camera housing in the outer-field object space three-dimensional coordinate system after the camera is installed in the outer-field. Position the outer-field camera based on the inner-field camera calibration results.
[0125] (1) Get the infield coordinates of the camera housing markers
[0126] While the camera is being calibrated in the indoor calibration field, a total station is used to measure the coordinates of the camera housing mark points in the indoor field object space coordinate system. When calibrating the camera, the camera is allowed to photograph the indoor control field, and a total station and an orienteering pole are respectively set up on two measuring piers in the indoor calibration field. After setting up the total station in one of the measurement fields, the total station is aimed at the orienteering pole of the other measuring pier for orientation. Subsequently, the horizontal angle between the measuring station and each mark point on the camera housing, the zenith distance between the measuring station and each mark point, and the slant distance between the measuring station and each mark point on the camera housing are measured. Finally, the measured horizontal angle, zenith distance, and slant distance are combined with the coordinates of the measuring station on the left measuring pier to calculate the three-dimensional coordinates of the mark points on the camera housing of each camera in the indoor field object space coordinate system in the indoor calibration field when the camera was calibrated in the indoor calibration field.
[0127] like Figure 2 As shown, in the interior object three-dimensional coordinate system DX 内场 Y 内场 Z 内场 Based on this, an infield measurement coordinate system DX is established 测量 Y 测量 Z 测量 , the origin of the coordinate system is the same as DX 内场 Y 内场 Z 内场 Origin coincides, X 测量 Axis and internal field coordinate system Z 内场 The inner axes are in a straight line but in opposite directions, Y 测量 The axis is the X axis of the internal field object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the object coordinate system. 内场 Axis, where point N and point S are the left and right measuring piers in the calibration field, point A is one of the marking points on the camera housing, point a is the projection point of the marking point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the marking point on the camera housing, the value of the angle 90°∠SNa is the zenith distance between the measuring station and the marking point on the camera housing, and the distance S between points N and A is NA The slant distance between the measuring station and the marking point on the camera housing is calculated. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object space are known. According to the relationship between the coordinate axes, the coordinates of the measuring station N and the orientation point S in the infield measurement coordinate system DX are calculated. 内场 Y 内场 Z 内场 The three-dimensional coordinates are calculated as follows:
[0128] X 测量 =-Z 内场 , Y 测量 =X 内场 'Z 测量 =Y 内场 Formula 1
[0129] The calculated measuring station N and orientation point S are in the infield measurement coordinate system DX 测量 Y 测量 Z 测量 The azimuth angle α of the straight line NS is calculated from the coordinates NS :
[0130]
[0131] The azimuth angle of the straight line NA is calculated as follows:
[0132] α NA =α NS +∠SNa Formula 3
[0133] Assume that the three-dimensional coordinates of one of the marking points A on the camera housing in the infield measurement coordinate system are (X A , Y A , Z A ), the three-dimensional coordinates of point A are calculated as follows:
[0134] X A =X N +S NA *cosα NA
[0135] Y A =Y N +S NA *sinα NA
[0136] Z A =Z N +S NA *tan∠ANa Formula 4
[0137] At this time, the three-dimensional coordinates of the marker points obtained by measurement calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object space three-dimensional coordinate system. Formula 1 is used to convert the coordinates of the measured marker points in the measurement coordinate system to the infield object space coordinate system.
[0138] (2) Obtaining the external field coordinates of the camera housing markers
[0139] After calibration at the indoor calibration site, the camera was installed in the outdoor calibration site based on actual project requirements. Similar to the indoor calibration site, the outdoor calibration site also had two measuring piers. The coordinates of the camera housing markers were measured indoors to obtain the coordinates of the camera housing markers in the outdoor calibration site's three-dimensional coordinate system. Because the outdoor calibration site is large, the distance between the camera and the two east-west measuring piers is considerable. Simply setting up east-west measuring stations to measure the camera housing marker coordinates would result in significant errors. Therefore, the actual measurement process differs from that in the indoor site.
[0140] When measuring the mark points in the indoor calibration field, the distance between the total station on the left measuring pier and the camera mark point is closer. When measuring the mark points on the installed camera housing on the measuring pier in the outdoor calibration field, the average distance is about 80 meters, which is farther. Therefore, when measuring the coordinates of the mark points in the outdoor calibration field, the total station on the measuring pier is not directly used to observe and read the mark points. Instead, a fulcrum is set up between the measuring pier and the camera. After measuring the coordinates of the fulcrum, the coordinates of the mark points are measured. The distance between the fulcrum and the camera housing mark point is close to the distance between the center of the total station on the left measuring pier in the indoor calibration field and the camera housing mark point. On the premise of ensuring that the total station can have line of sight with several mark points measured indoors, the relative position between the total station and the camera is similar to the relative position between the total station and the camera in the indoor calibration field.
[0141] The east and west measuring piers are two measuring piers built in the external field calibration field, and the relative position between the two measuring piers is known. The coordinate system PX 外场 Y 外场 Z 外场 From the object space three-dimensional coordinate system of the outdoor field, after the camera is installed in the outdoor field, it is necessary to measure the coordinates of the camera housing mark point in the outdoor field object space coordinate system, establish a west station as the origin, which is convenient for measurement and calculation using the total station, and the direction from the west station to the east station is Y 测量 Positive direction of axis, perpendicular to Y 测量 Axis and facing north is X 测量 Axis positive direction, Z 测量 The axis is perpendicular to the X 测量 PY 测量 The coordinate system of the measuring plane is vertically upward, and the coordinate system is a left-hand coordinate system. The coordinates of the fulcrum in the measuring coordinate system are measured by the east and west measuring piers. Then the total station is set up at the fulcrum. The east or west measuring station is selected as the orientation point according to the position of each camera. The coordinates of the marked point in the outer field measuring coordinate system are measured according to the method of measuring the coordinates of the marked point in the inner field.
[0142] Finally, the coordinates of the measured marker points in the external field measurement coordinate system are converted to the coordinates in the external field object space three-dimensional coordinate system:
[0143] X 外场 =Y 测量 , Y 外场 =Z 测量 , Z 外场 =-X 测量 Formula 5
[0144] Formula 5 is the conversion formula.
[0145] (3) Single camera field position and posture calculation model
[0146] After the calibrated camera is installed in the outdoor calibration field according to actual engineering requirements, the results of the camera's indoor calibration, including the camera's internal orientation elements and the camera's exterior orientation elements in the indoor object space three-dimensional coordinate system at the time of calibration, as well as two sets of three-dimensional coordinates of several camera housing marking points in the indoor object space three-dimensional coordinate system and the outdoor object space three-dimensional coordinate system in the outdoor calibration field, are combined based on multiple coordinate system rotation transformations to establish a model for solving the camera's exterior orientation elements when the camera is installed in the outdoor calibration field.
[0147] When calibrating a camera in an indoor calibration area, the camera placement must meet the following requirements:
[0148] 1) The control field in the calibration field is photographed, which consists of several control points that are evenly distributed and not on the same plane;
[0149] 2) The total station placed on the measuring pier in the calibration field has line of sight with the marked points attached to the housing of the camera being calibrated in the calibration field;
[0150] By using the camera to shoot the indoor control field, the camera is calibrated to obtain the camera's exterior orientation elements and interior orientation elements when the camera is in the indoor calibration field. The three angular elements and three line elements of the camera's exterior orientation elements in the indoor calibration field are used to obtain the rotation matrix and translation matrix between the camera's image space coordinate system in the indoor calibration field and the indoor object space three-dimensional coordinate system. Figure 3 This is a schematic diagram of the camera being calibrated in an indoor calibration field.
[0151] Figure 3 Medium DX 内场 Y 内场 Z 内场 is the three-dimensional coordinate system of the object space in the interior, S is the photographic center of the camera, the cuboid is a schematic diagram of the camera housing, Sx 内 y 内 z 内 It is the image space coordinate system of the camera. A local coordinate system Sx is established inside the camera with the photography center as the origin and each coordinate axis parallel to the corresponding coordinate axis of the internal object coordinate system. 局部 y 局部 z 局部 ;
[0152] After the camera is calibrated in the indoor calibration field, the camera's exterior orientation elements, interior orientation elements, and camera distortion factors at the time of calibration are obtained. Based on the derivation of the collinearity condition equation and the camera's indoor calibration results, the indoor object space three-dimensional coordinate system DX in the calibration field is listed. 内场 Y 内场 Z 内场 and the image space coordinate system Sx of the infield camera 内 y 内 z内 The relative transformation relationship:
[0153]
[0154] [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing marker in the object space three-dimensional coordinate system, [x 内 y 内 z 内 ] T is the coordinate of the camera housing mark point in the camera image space coordinate in the indoor calibration field, where R 内场 , [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the angular elements in the exterior orientation elements of the camera at the calibration moment and the translation matrix composed of the line elements in the exterior orientation elements obtained after the camera is calibrated in the indoor calibration field;
[0155] From the known rotation matrix R 内场 And the translation matrix [ΔX 内场 ΔY 内场 ΔZ 内场 ] T , combined with the coordinates of the camera housing mark point in the infield object space three-dimensional coordinate system measured by the total station in the infield, the three-dimensional coordinates of the camera housing mark in the infield camera image space coordinate system [x 内 y 内 z 内 ] T ,get:
[0156]
[0157] After the camera calibrated in the indoor calibration field is installed in the specified position and posture in the outdoor calibration field according to the requirements, the transformation relationship between the camera's image space coordinate system in the outdoor calibration field and the external object space three-dimensional coordinate system in the outdoor calibration field is listed. It consists of two parts: the rotation matrix between the image space coordinate system and the external object space three-dimensional coordinate system in the outdoor calibration field, and the translation matrix between the image space coordinate system and the external object space three-dimensional coordinate system in the outdoor calibration field. After the camera calibrated in the indoor calibration field is installed in the outdoor calibration field, the camera and the external field coordinate system satisfy the following:
[0158]
[0159] The schematic diagram of the camera and external field coordinate system is as follows Figure 4 As shown. In formula 7, [X外场 Y 外场 Z 外场 ] T Represents the three-dimensional coordinates of the camera housing mark point in the three-dimensional coordinate system of the object space in the field calibration field, [x 外 y 外 z 外 ] T R is the coordinate of the camera housing mark point in the camera image space coordinate in the field test field. 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T They are the rotation matrix composed of the angular elements in the camera's exterior orientation elements and the translation matrix composed of the line elements in the exterior orientation elements after the camera is fixedly installed in the outdoor calibration field. They are obtained from formula 7:
[0160]
[0161] Through the indoor calibration of the camera, the relationship between the camera image space coordinate system in the indoor calibration field and the indoor object space three-dimensional coordinate system in the indoor calibration field is obtained as shown in Equation 6. The indoor object space three-dimensional coordinates of the camera housing marker points in the indoor object space three-dimensional coordinate system measured by the total station in the indoor calibration field are used to calculate the coordinates of the camera housing marker points in the indoor camera image space coordinate system as shown in Equation 7. The relative position between the camera image space coordinate system and the camera housing frame remains unchanged and does not change with the position change of the camera (referring to the rigid body composed of the protective housing and the camera installed in the physical housing). After the camera is installed in the outdoor calibration field, the relationship between the camera image space coordinate system and the protective housing is the same as in the indoor calibration field. In the outdoor calibration field, the coordinates of the camera housing marker points in the outdoor camera image space coordinate system are consistent with the coordinates of the camera housing marker points in the indoor calibration field. Based on the invariance, the exterior orientation elements of the camera in the outdoor calibration field are solved, and the equation is obtained:
[0162]
[0163] Combining Equation 6, Equation 8, and Equation 9, we can obtain:
[0164]
[0165] Multiply both sides of the above equation by R on the left 外场 have to:
[0166]
[0167] After moving the items:
[0168]
[0169] In formula 12, [X 外场 Y 外场 Z 外场 ] T is the coordinate of the mark point on the camera housing in the external object space three-dimensional coordinate system, R 内场 and [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth elements and the translation matrix composed of the external azimuth line elements in the infield calibration results of the camera, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed. 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T is the coordinate of the camera housing marker in the local coordinate system of a single camera when the camera is in the indoor calibration field. When the camera is moved from the indoor calibration field to the outdoor calibration field, the coordinate of the marker in the camera local coordinate system does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the camera local coordinate system and the outdoor object space 3D coordinate system:
[0170]
[0171] Based on the two sets of coordinates of the marker point in the external object coordinate system and the camera local coordinate system, the coordinate transformation is used to solve the rotation matrix R and translation matrix [ΔX ΔY ΔZ] between the two coordinate systems. T , comparing the structures of Equation 13 and Equation 12, we can get:
[0172] R 内场 、R 内场 -1 =R Formula 14
[0173] [ΔX 外场 ΔY 外场 ΔZ 外场 ] T =[ΔX ΔY ΔZ] T Formula 15
[0174] The rotation matrix and translation matrix of the external orientation elements of the fixed camera installation field are obtained from Equations 14 and 15:
[0175] R 内场 =RR 外场 Formula 16
[0176] [ΔX 外场 ΔY 外场 ΔZ 外场 ] T =[ΔX ΔY ΔZ] T Formula 17
[0177] Based on the rotation matrix and translation matrix composed of the exterior orientation elements of the field camera, the exterior orientation elements of the camera are calculated, which are obtained by rotating three angles in sequence from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, rotate the two coordinate systems in steps, that is, rotate three different angles around the coordinate axis, and the coordinates of the image point a in the coordinate system S-XYZ are (X, Y, Z);
[0178]
[0179] b1=cosωsinκ
[0180] b2=cosωcosκ
[0181] b3=-sinω
[0182]
[0183] Dividing the equation b1 = cosωsinκ by the equation b2 = cosωcosκ yields:
[0184]
[0185] get:
[0186]
[0187] The equation and equation Dividing the left and right sides gives:
[0188]
[0189] get:
[0190]
[0191] From the equation b3 = -sinω we get:
[0192] ω=sin -1 -b3 Formula 25
[0193] The angular elements of the exterior orientation elements are solved by Equations 23, 24, and 25. The three elements of the translation matrix in Equation 13 correspond to the exterior orientation line elements of the exterior field camera.
[0194] 3. In-field calibration of stereo cameras
[0195] The mathematical model is established by using the exterior orientation elements of several cameras at the time of camera calibration using the single-camera calibration method. Finally, the relative positions and postures of multiple cameras in the stereo camera are obtained. Based on the relative position relationship between the multiple cameras, the relative three-dimensional coordinates of the object are obtained using the stereo photos of the stereo cameras.
[0196] A stereo camera consisting of two cameras is first placed in an indoor calibration field. The position and orientation of the stereo camera are adjusted so that the two cameras in the stereo camera can capture the control field area of the indoor calibration field and obtain two photos.
[0197] The schematic diagram of the stereo camera calibration in the indoor calibration field is as follows Figure 5 As shown. 内场 Y 内场 Z 内场 is the object space three-dimensional coordinate system in the indoor calibration field, point S 左 、Point S 右 They are the photographic centers of the left and right cameras in the stereo camera, respectively. The image space coordinate system of the left camera in the stereo camera is S 左 -x 左 y 左 z 左 , the image space coordinate system of the right camera in the stereo camera is S 右 -x 右 y 右 z 右 , establish a local coordinate system SX on the stereo camera 立休 Y 立休 Z 立休 , and take the local object space three-dimensional coordinate system of the stereo camera as the left camera image space coordinate system in the stereo camera;
[0198] The transformation relationship between the camera image space coordinate system in the left camera and the object space 3D coordinate system in the indoor calibration field is calculated from the left camera exterior orientation angle elements and exterior orientation line elements in the left camera calibration results of the stereo camera:
[0199]
[0200] In formula 26, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 左 y左 z 左 ] T The object point is at S 左 -x 左 y 左 z 左 Coordinates in the coordinate system, R 左 It is the rotation matrix between the image space coordinate system of the left camera and the three-dimensional coordinate system of the object space in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns;
[0201] The transformation relationship between the camera image space coordinate system in the right camera and the object space three-dimensional coordinate system in the indoor calibration field is calculated from the right camera exterior orientation angle elements and exterior orientation line elements in the right camera calibration results in the stereo camera:
[0202]
[0203] In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 右 y 右 z 右 ] T The object point is at S 右 -x 右 y 右 z 右 Coordinates in the coordinate system, R 右 It is the rotation matrix between the image space coordinate system of the right camera and the object space three-dimensional coordinate system in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns;
[0204] The transformation relationship between the image space coordinate systems of the left and right cameras in a stereo camera is derived from Equations 26 and 27:
[0205]
[0206] Simplifying the above formula, we get:
[0207]
[0208] Equation 29 is the transformation relationship between the image space coordinate system of the left camera and the image space coordinate system of the right camera in the stereo camera. The local object space 3D coordinate system in the stereo camera coincides with the image space coordinate system of the left camera in the stereo camera. The transformation relationship between the image space coordinate system of the left camera and the local object space 3D coordinate system of the stereo camera is:
[0209]
[0210] Combining Equations 29 and 30, the transformation relationship between the image space coordinate system of the right camera in the stereo camera and the local object space three-dimensional coordinate system of the stereo camera is:
[0211]
[0212] In the stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object space three-dimensional coordinate system, Equations 30 and 31 represent the translation and rotation relationship between the left camera image space coordinate system and the object space coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object space coordinate system, respectively. Based on the obtained translation and rotation matrices and combined with the collinearity condition equation, the exterior orientation elements of the left and right cameras in the local coordinate system of the stereo camera are calculated, the calibration of the stereo camera is completed, the forward intersection of the stereo image pair is achieved, and the object space coordinates of the object point in the local coordinate system of the stereo camera are calculated.
[0213] IV. Experiment and Analysis
[0214] (1) Feasibility verification of single camera outdoor attitude positioning
[0215] In actual engineering applications, cameras are installed in an outdoor calibration field. Due to the lack of control points, it is difficult to verify the accuracy of the calculated camera exterior orientation elements. In an indoor calibration field, the same camera is set up at three different locations: left, center, and right. The three-dimensional coordinates of the camera housing markers at each location are measured within the indoor calibration field. The camera in the center position is then instructed to capture images of the indoor control field. The camera is then calibrated using the single-slice spatial resection method to obtain the camera interior orientation elements, camera distortion factors, and exterior orientation elements at the center position.
[0216] Combine the coordinates of the camera housing mark point in the middle position in the interior coordinate system with the interior coordinates of the camera housing mark points on the left and right sides, and use the attitude positioning method to solve the camera exterior orientation elements at the left and right sides. Then compare the calculated exterior orientation elements with the exterior orientation elements calibrated using the left and right position images, as shown in the following example: Figure 6 shown.
[0217] Figure 6 In the example, source left and source right refer to the camera exterior orientation elements obtained by calibrating the left and right images, and turn left and turn right refer to the camera exterior orientation elements calculated using the calculation model. Then, the image points with the same name in the left and right camera images and the calculated left and right exterior orientation elements are intersected with the stereo image pair to calculate the coordinates of the corresponding control points in the in-field object coordinate system. The calculated coordinates are compared with the coordinates provided by the control points. The results are as follows: Figure 7shown.
[0218] exist Figure 7 In the figure, the control point coordinates are the three-dimensional coordinates of the control point in the known control field in the inner field object space three-dimensional coordinate system. The intersection point coordinates are the coordinates of the object space points corresponding to the same-name image points in the inner field object space three-dimensional coordinate system obtained by using the stereo image pair forward intersection method based on the exterior orientation elements of the left and right cameras calculated using the fixed-position positioning method.
[0219] The mean error between the control coordinates and intersection coordinates of each of the 20 selected points is 4.7861 mm. When validating this method in an indoor calibration field, the distance between the camera and the marker was approximately five meters. In an outdoor calibration field, the distance between the camera and the drone was approximately eighty meters. Using linear scaling, we estimated the accuracy under these same conditions to be 80 mm, meeting the 1-meter accuracy requirement for field camera intersection. Therefore, this method is feasible for determining the position and attitude of field cameras.
[0220] (2) Determine the position and posture of multiple cameras in the field
[0221] After measuring the three-dimensional coordinates of the camera housing marking points at the time of indoor calibration and the three-dimensional coordinates of the outdoor object space after outdoor installation, combined with the results of the camera calibration in the indoor field, the external orientation elements of multiple cameras in the outdoor object space three-dimensional coordinate system are calculated through the single camera outdoor attitude positioning method. Figure 8 shown.
[0222] Figure 8 The correlation factors of five of the eighteen cameras after field installation are listed in Figure 2, where the exterior orientation line elements are in meters, the exterior orientation angle elements are in radians, and the interior orientation elements are in pixels.
[0223] After calculating the exterior orientation elements of the field camera, influenced by the actual project situation, two cameras out of 18 cameras were selected to form a stereo pair. The forward intersection of the two control points in the calibration field was performed to calculate the object space coordinates of the two points. The accuracy of the results was evaluated. The coordinates of the control points were calculated using the exterior orientation elements of the cameras installed in the field. Figure 9 shown.
[0224] like Figure 9 As shown in the figure, the coordinates calculated based on the solved field camera exterior orientation elements and its control coordinates have positional differences of 0.48 and 0.28 meters, respectively, meeting the 1-meter accuracy requirement of the engineering project. Therefore, the single-camera field attitude determination method is feasible and the results meet the required accuracy.
[0225] (3) In-field calibration of stereo cameras
[0226] First, the left and right cameras in the stereo camera system are calibrated using the single-camera, single-slice spatial resection algorithm. This yields their intrinsic orientation elements, camera distortion factors, and exterior orientation elements at the time of calibration. Unlike single-camera calibration, after obtaining the factors for each camera, the relative transformation between the image space coordinate systems of the left and right cameras, comprising the stereo camera, is determined by linking the image space coordinate systems of the multiple cameras with the object space coordinate system of the indoor calibration site.
[0227] 1. Calibration results of the stereo camera
[0228] First, the stereo camera is placed in the calibration field and photographs the control field within the field, obtaining images from the left and right cameras. Considering the need to verify the experimental results, after the left and right cameras photograph the control field within the calibration field, several points are manually removed. These removed control points serve as checkpoints for the stereo camera calibration results and do not participate in the stereo camera calibration.
[0229] 2. Verification of stereo camera calibration results
[0230] Through the calibration of the stereo camera, the relationship between the two camera image space coordinate systems is determined. Then, using the control points in the control field that are not involved in the calibration of the left and right cameras, that is, the image point coordinates of the detection points at the same points in the left and right images, the coordinates of the control points corresponding to the same image points in the local coordinate system of the stereo camera are intersected in front. The calculated coordinates are compared with the coordinates of the provided control points to analyze their accuracy. The coordinates of the selected 8 detection points in the object space three-dimensional coordinate system in the calibration field and the coordinates in the local coordinate system of the stereo camera intersected according to the stereo camera calibration results are obtained. Because the relative position relationship between the eight points is certain, the distance between the points is compared to analyze the calibration accuracy. The distance between the points is calculated using the coordinates provided by the eight detection points and the intersected coordinates, in millimeters, such as Figure 10 shown.
[0231] The mean square error of the difference between the pairwise distances of the 8 marker points in the three-dimensional coordinate system of the infield object space and the local coordinate system of the stereo camera is 0.4862 mm, which meets the accuracy requirements of the stereo camera calibration.
Claims
1. A method for determining the attitude and positioning of a surveying camera based on an infield calibration model, characterized in that: The first is to determine the outdoor position and posture of a single camera: attach marker points to the outside of the camera, and place several artificial marker points and the camera as a rigid body in the calibration field for calibration. When calibrating the camera, measure the coordinates of the marker points in the indoor object space coordinate system to obtain the relative position relationship between the marker points and the camera. On the basis of this fixed relative relationship, combined with the coordinates of the marker points in the outdoor object space three-dimensional coordinate system when installed in the outdoor field, establish a mathematical model for solving the outdoor camera position and posture; the second is to calibrate the stereo camera: place the stereo camera in an indoor calibration field for calibration, and use the relationship between the indoor object space three-dimensional coordinate system and the image space coordinate systems of multiple cameras in the stereo camera to obtain the relative position and posture between multiple image space coordinate systems. Finally, establish the local coordinates of the stereo camera to complete the calibration of the stereo camera. S1-Indoor calibration of a single camera: The camera is calibrated in an indoor calibration field using the camera calibration method based on single-image spatial resection. The indoor control field contains a large number of evenly distributed control points. The coordinates of these control points in the indoor object space 3D coordinate system of the calibration field are obtained using high-precision measurement methods. S2-Determination of the outdoor position and posture of a single camera, including: obtaining the indoor coordinates of the camera housing markers, obtaining the outdoor coordinates of the camera housing markers, calculating the outdoor position and posture model of a single camera, obtaining the coordinates of the indoor camera housing markers in the indoor object space 3D coordinate system during the indoor camera calibration, and obtaining the coordinates of the camera housing markers in the outdoor object space 3D coordinate system after the camera is installed in the outdoor field, and determining the outdoor camera's posture based on the indoor camera calibration results; S3 - In-field calibration of stereo cameras: A mathematical model is constructed using the exterior orientation elements of several cameras at the time of calibration, obtained using the single-camera calibration method. The relative positions and postures of the multiple cameras in the stereo camera are then determined. Based on the relative positional relationships between the multiple cameras, the relative 3D coordinates of the object space are obtained using the stereo photos of the stereo cameras. In-field calibration of a single camera: Coordinate system DX 内场 Y 内场 Z 内场 It is the three-dimensional coordinate system of the object space in the indoor calibration field. The camera is placed in the indoor calibration field facing the control field area, and the control field is photographed to obtain the photographed image. Point S is the photographic center of the camera, and the coordinate system S-xyz is the image space coordinate system of the camera. After placing the camera at a certain position in the inner field control field, let the camera shoot the control points on the control field, and use the model to calculate the camera's internal orientation elements, the camera's external orientation elements when calibrated in the calibration field, and the optical distortion factors including radial distortion factor and eccentric distortion factor.
2. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 1, characterized in that: The camera is placed in an indoor calibration field for calibration. The camera is allowed to capture a control field consisting of several evenly distributed control points. The image-space coordinates of the corresponding image points in the captured control field are obtained. The image-space coordinates of the corresponding image points in the control field and the known three-dimensional coordinates of the control points in the object-space three-dimensional coordinate system of the indoor calibration field are then substituted into the collinearity condition equation to solve the camera correlation factors, including the camera's internal orientation elements, camera distortion factors, and the camera's external orientation elements at the time of calibration. The camera is placed in a protective housing and artificial marking points are attached to the camera housing. The camera is then set up somewhere in front of the control field and photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points on the camera housing can be in line of sight with the total station on the forced centering stake on the left side of the control field. While the camera photographs the control field, the coordinates of the camera housing marking points in the inner field object space three-dimensional coordinate system are measured. After photographing the control field to obtain a picture of the control field, the image space coordinates of the image control points corresponding to the image points, together with the three-dimensional coordinates of the control points corresponding to the image points in the inner field object space three-dimensional coordinate system, are substituted into the collinearity condition equation. The camera is calibrated based on single-piece spatial resection to solve the camera's interior orientation elements, camera distortion factors, and the camera's exterior orientation elements at the time of photographing. When calculating the camera factor using single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average value of the coordinates of the measured camera housing marker points, while the initial value of the exterior orientation element angle element, camera interior orientation element, and camera distortion factor is considered to be 0, and iterative calculation is performed to calculate the final results of each factor.
3. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 1, characterized in that: Get the infield coordinates of the camera housing marker point: in the infield object space 3D coordinate system DX 内场 Y 内场 Z 内场 Based on this, an infield measurement coordinate system DX is established 测量 Y 测量 Z 测量 , the origin of the coordinate system is the same as DX 内场 Y 内场 Z 内场 Origin coincides, X 测量 Axis and internal field coordinate system Z 内场 The inner axes are in a straight line but in opposite directions, Y 测量 The axis is the X axis of the internal field object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the object coordinate system. 内场 Axis, where point N and point S are the left and right measuring piers in the calibration field, point A is one of the marking points on the camera housing, point a is the projection point of the marking point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the marking point on the camera housing, the value of the angle 90°-∠ANa is the zenith distance between the measuring station and the marking point on the camera housing, and the distance S between points N and A is NA The slant distance between the measuring station and the marking point on the camera housing is calculated. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object space are known. According to the relationship between the coordinate axes, the coordinates of the measuring station N and the orientation point S in the infield measurement coordinate system DX are calculated. 内场 Y 内场 Z 内场 The three-dimensional coordinates are calculated as follows: X 测量 = -Z 内场 , Y 测量 = X 内场 , Z 测量 = Y 内场 Equation 1 The calculated measuring station N and orientation point S are in the infield measurement coordinate system DX 测量 Y 测量 Z 测量 The azimuth angle α of the straight line NS is calculated from the coordinates NS : The azimuth angle of the straight line NA is calculated as follows: α NA = α NS + ∠SNa Equation 3 Assume that the three-dimensional coordinates of one of the marking points A on the camera housing in the infield measurement coordinate system are (X A , Y A , Z A ), the three-dimensional coordinates of point A are calculated as follows: X A =X N +S NA *cosα NA AND A =And N +S NA *sinα NA Z A = Z N + S NA * tan ∠ANa Equation 4 At this time, the three-dimensional coordinates of the marker points obtained by measurement calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object space three-dimensional coordinate system. Formula 1 is used to convert the coordinates of the measured marker points in the measurement coordinate system to the infield object space coordinate system.
4. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 1, characterized in that: Get the field coordinates of the camera housing mark point: The east and west measuring piers are two measuring piers built in the field calibration field, and the relative position between the two measuring piers is known, the coordinate system PX 外场 Y 外场 Z 外场 From the object space three-dimensional coordinate system of the outdoor field, after the camera is installed in the outdoor field, it is necessary to measure the coordinates of the camera housing mark point in the outdoor field object space coordinate system, establish a west station as the origin, which is convenient for measurement and calculation using the total station, and the direction from the west station to the east station is Y 测量 Positive direction of axis, perpendicular to Y 测量 Axis and facing north is X 测量 Axis positive direction, Z 测量 The axis is perpendicular to the X 测量 PY 测量 The coordinate system of the measuring plane is vertically upward, and this coordinate system is a left-handed coordinate system. The coordinates of the support point in the measurement coordinate system are measured by the east and west measuring piers. Then, a total station is set up at the support point. The east or west measuring station is selected as the orientation point according to the position of each camera. The coordinates of the marked point in the external field measurement coordinate system are measured in the same way as the coordinates of the marked point are measured in the internal field. Finally, the coordinates of the measured marker points in the external field measurement coordinate system are converted to the coordinates in the external field object space three-dimensional coordinate system: X 外场 = Y 测量 , Y 外场 = Z 测量 , Z 外场 = -X 测量 Equation 5 Formula 5 is the conversion formula.
5. The method for determining the attitude and positioning of a surveying and mapping camera using an infield calibration model according to claim 1, characterized in that: Single camera exterior position and attitude calculation model: By using the camera to shoot the interior control field, the camera is calibrated to obtain the camera's exterior orientation elements and interior orientation elements when in the indoor calibration field. The three angle elements and three line elements of the camera's exterior orientation elements in the indoor calibration field are used to obtain the rotation matrix and translation matrix between the camera's image space coordinate system in the indoor calibration field and the interior object space three-dimensional coordinate system. DX 内场 Y 内场 Z 内场 is the three-dimensional coordinate system of the object space in the interior, S is the photographic center of the camera, the cuboid is a schematic diagram of the camera housing, Sx 内 y 内 z 内 It is the image space coordinate system of the camera. A local coordinate system Sx is established inside the camera with the photography center as the origin and each coordinate axis parallel to the corresponding coordinate axis of the internal object coordinate system. 局部 y 局部 z 局部 .
6. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 5, characterized in that: When calibrating a camera in an indoor calibration area, the camera placement must meet the following requirements: 1) The control field in the calibration field is photographed, which consists of several control points that are evenly distributed and not on the same plane; 2) The total station placed on the measuring pier in the calibration field has line of sight with the marking points attached to the housing of the camera being calibrated in the calibration field.
7. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 5, characterized in that: After the camera is calibrated in the indoor calibration field, the camera's exterior orientation elements, interior orientation elements, and camera distortion factors at the time of calibration are obtained. Based on the derivation of the collinearity condition equation and the camera's indoor calibration results, the indoor object space three-dimensional coordinate system DX in the calibration field is listed. 内场 Y 内场 Z 内场 and the image space coordinate system Sx of the infield camera 内 y 内 z 内 The relative transformation relationship: [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing marker in the object space three-dimensional coordinate system, [x 内 y 内 z 内 ] T is the coordinate of the camera housing mark point in the camera image space coordinate in the indoor calibration field, where R 内场 , [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the angular elements in the exterior orientation elements of the camera at the calibration moment and the translation matrix composed of the line elements in the exterior orientation elements obtained after the camera is calibrated in the indoor calibration field; From the known rotation matrix R 内场 And the translation matrix [ΔX 内场 ΔY 内场 ΔZ 内场 ] T , combined with the coordinates of the camera housing mark point in the infield object space three-dimensional coordinate system measured by the total station in the infield, the three-dimensional coordinates of the camera housing mark in the infield camera image space coordinate system [x 内 y 内 z 内 ] T ,get: After the camera calibrated in the indoor calibration field is installed in the outdoor calibration field, the camera and outdoor coordinate systems satisfy the following requirements: [X 外场 Y 外场 Z 外场 ] T Represents the three-dimensional coordinates of the camera housing mark point in the three-dimensional coordinate system of the external object space in the external field calibration field, [X 外 Y 外 Z 外 ] T is the coordinate of the camera housing mark point in the camera image space coordinate in the field test field; R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T They are the rotation matrix composed of the angular elements in the camera's exterior orientation elements and the translation matrix composed of the line elements in the exterior orientation elements after the camera is fixedly installed in the outdoor calibration field. They are obtained from formula 7: Based on the invariance, we solve the external orientation elements of the camera in the external field calibration field and get the equation: Combining Equation 6, Equation 8, and Equation 9, we can obtain: Multiply both sides of the above equation by R on the left 外场 have to: After moving the items: In formula 12, [X 外场 Y 外场 Z 外场 ] T is the coordinate of the mark point on the camera housing in the external object space three-dimensional coordinate system, R 内场 and [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth elements and the translation matrix composed of the external azimuth line elements in the infield calibration results of the camera, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed. 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T is the coordinate of the camera housing marker in the local coordinate system of a single camera when the camera is in the indoor calibration field. When the camera is moved from the indoor calibration field to the outdoor calibration field, the coordinate of the marker in the camera local coordinate system does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the camera local coordinate system and the outdoor object space 3D coordinate system: Based on the two sets of coordinates of the marker point in the external object coordinate system and the camera local coordinate system, the coordinate transformation is used to solve the rotation matrix R and translation matrix [ΔX ΔY ΔZ] between the two coordinate systems. T , comparing the structures of Equation 13 and Equation 12, we can get: R 内场 、R 内场 -1 =R Formula 14 [ΔX 外场 ΔY 外场 △Z 外场 T =[ΔX ΔY ΔZ] T Equation 15 The rotation matrix and translation matrix of the external orientation elements of the fixed camera installation field are obtained from Equations 14 and 15: R 内场 =RR 外场 Formula 16 [ΔX 外场 ΔY 外场 ΔZ 外场 T =[ΔX ΔY ΔZ] T Equation 17 Based on the rotation matrix and translation matrix composed of the exterior orientation elements of the field camera, the exterior orientation elements of the camera are calculated, which are obtained by rotating three angles in sequence from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, rotate the two coordinate systems in steps, that is, rotate three different angles around the coordinate axis, and the coordinates of the image point a in the coordinate system S-XYZ are (X, Y, Z); b1=cosωsinκ b2=cosωcosκ b3=-sinω Dividing the equation b1 = cosωsinκ by the equation b2 = cosωcosκ yields: get: The equation and equation Dividing the left and right sides gives: get: From the equation b3 = -sinω we get: ω = sin -1 -b3 Equation 25 The angular elements of the exterior orientation elements are solved by Equations 23, 24, and 25. The three elements of the translation matrix in Equation 13 correspond to the exterior orientation line elements of the exterior field camera.
8. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 1, characterized in that: In-field calibration of stereo cameras: A mathematical model is established using the exterior orientation elements of several cameras at the time of calibration, obtained using the single-camera calibration method. Finally, the relative positions and postures of multiple cameras in the stereo camera are obtained. Based on the relative positional relationships between the multiple cameras, the relative three-dimensional coordinates of the object are obtained using the stereo photos of the stereo cameras.
9. The method for determining the attitude and positioning of a surveying camera using an infield calibration model according to claim 8, characterized in that: A two-camera stereo camera is first placed in an indoor calibration field. The position and orientation of the stereo camera are adjusted so that both cameras can capture the control field area of the indoor calibration field and obtain two photos. DX 内场 Y 内场 Z 内场 is the object space three-dimensional coordinate system in the indoor calibration field, point S 左 、Point S 右 They are the photographic centers of the left and right cameras in the stereo camera, respectively. The image space coordinate system of the left camera in the stereo camera is S 左 -x 左 y 左 z 左 , the image space coordinate system of the right camera in the stereo camera is S 右 -x 右 y 右 z 右 , establish a local coordinate system SX on the stereo camera 立休 Y 立休 Z 立休 , and take the local object space three-dimensional coordinate system of the stereo camera as the left camera image space coordinate system in the stereo camera; The transformation relationship between the camera image space coordinate system in the left camera and the object space 3D coordinate system in the indoor calibration field is calculated from the left camera exterior orientation angle elements and exterior orientation line elements in the left camera calibration results of the stereo camera: In formula 26, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 左 y 左 z 左 ] T The object point is at S 左 -x 左 y 左 z 左 Coordinates in the coordinate system, R 左 It is the rotation matrix between the image space coordinate system of the left camera and the three-dimensional coordinate system of the object space in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns; The transformation relationship between the camera image space coordinate system in the right camera and the object space three-dimensional coordinate system in the indoor calibration field is calculated from the right camera exterior orientation angle elements and exterior orientation line elements in the right camera calibration results in the stereo camera: In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 Coordinates in the coordinate system, [x 右 y 右 z 右 ] T The object point is at S 右 -x 右 y 右 z 右 Coordinates in the coordinate system, R 右 It is the rotation matrix between the image space coordinate system of the right camera and the object space three-dimensional coordinate system in the indoor calibration field, and the matrix is a matrix with 3 rows and 3 columns; The transformation relationship between the image space coordinate systems of the left and right cameras in a stereo camera is derived from Equations 26 and 27: Simplifying the above formula, we get: Equation 29 is the transformation relationship between the image space coordinate system of the left camera and the image space coordinate system of the right camera in the stereo camera. The transformation relationship between the image space coordinate system of the left camera and the local object space 3D coordinate system of the stereo camera is: Combining Equations 29 and 30, the transformation relationship between the image space coordinate system of the right camera in the stereo camera and the local object space three-dimensional coordinate system of the stereo camera is: In the stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object space three-dimensional coordinate system, Equations 30 and 31 represent the translation and rotation relationship between the left camera image space coordinate system and the object space coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object space coordinate system, respectively. Based on the obtained translation and rotation matrices and combined with the collinearity condition equation, the exterior orientation elements of the left and right cameras in the local coordinate system of the stereo camera are calculated, the calibration of the stereo camera is completed, the forward intersection of the stereo image pair is achieved, and the object space coordinates of the object point in the local coordinate system of the stereo camera are calculated.
Citation Information
Patent Citations
Method for carrying out uncalibrated camera indoor positioning by utilizing Aruco code
CN115953470A
Indoor positioning method suitable for multi-scale continuous zooming condition
CN116026340A