Surveying and mapping camera attitude determination and positioning method for infield calibration model calculation
By attaching marking points on the camera housing, and using the total station measurement and in-field calibration results to establish a camera position relationship model, the problem of difficulty in obtaining the camera's field position and posture in the prior art is solved, and the precise positioning of the camera in the outer field and the effective calibration of the stereo camera is realized.
Patent Information
- Application Number
- CN202411594865.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-11
AI Technical Summary
It is difficult for the prior art to obtain the position and attitude of the camera on the scene through in-field calibration results, especially in stereo camera applications. How to realize the calibration of stereo cameras and the determination of relative position and attitude between multiple cameras is a challenge.
By attaching manual marking points on the camera shell, placing the camera indoor inspection and field inspection, using a total station to measure the inner field three-dimensional coordinates of the camera shell marking points, establishing a relationship model between several marking points in the shell and the camera image space coordinate system, and combining the three-dimensional coordinates of the outer field marking points after the field is installed, the position and attitude of the camera in the outer field are calculated. For stereo cameras, the relative positions and relative postures between multiple cameras are determined in the indoor inspection and calibration field, and the local coordinate system of the stereo camera is established to complete the inspection and calibration of the stereo camera.
The camera's position and attitude in the outer field are determined through the internal field calibration results, and the problem of stereo camera calibration and relative position and attitude determination between multiple cameras is solved, and the application accuracy and efficiency of the camera in actual engineering is improved.
Smart Images

Figure CN119618260A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method for determining the attitude and positioning of a mapping camera, and in particular to a method for determining the attitude and positioning of a 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, there are more and more methods for camera calibration. For example, based on the UAV power high-voltage line inspection project, a calibration field was established to detect the reliability of the UAV flight inspection system. For UAV users, considering the small size of the UAV itself and the GPS positioning system carried by the UAV will affect its flight performance and other related factors, an outdoor calibration field will be established to obtain the true flight trajectory of the UAV to detect the reliability of the UAV flight system. The calibration field is also equipped with two east and west measuring piers, and within the scope of the calibration field, there are 18 cameras facing the sky at a certain inclination angle. These cameras will be installed at the set positions in the calibration field according to project requirements. Before using the images taken by these cameras to intersect the position of the UAV in front, it is necessary to know the internal orientation elements of the camera, the camera distortion factor, and the external orientation elements of each photo in the outdoor object coordinate system. The camera's internal orientation elements and distortion factors can be obtained through 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 field calibration is an issue that needs to be solved urgently.
[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 the stereo camera is put into use, it is necessary to calibrate the stereo camera. By calibrating the stereo camera, the forward intersection of the stereo image pair is achieved on the basis of knowing the correlation factors of the stereo camera, so as to obtain the three-dimensional model of the object more conveniently and quickly. How to realize the calibration of the stereo camera is a problem that needs to be solved urgently in this application.
[0004] The problems that need to be solved in the camera positioning of the in-field calibration in the prior art and the key technical difficulties of this application include:
[0005] (1) Among the current methods for calibrating photographic cameras, 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 image 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 an urgent problem that needs to be solved. As the application of cameras in engineering projects deepens, the stereo cameras need to be calibrated before they are put into use. By calibrating the stereo cameras, the forward intersection of the 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 calibrate the 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 through 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 through the camera calibration results to solve 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.
[0007] (3) In order to determine 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-chip spatial resection algorithm in the indoor calibration field. It is impossible to use the total station to measure the internal three-dimensional coordinates of the camera shell marking points when the camera is calibrated in the indoor field based on the indoor calibration results. 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 attitude positioning. The existing technology lacks a method to use the indoor object space coordinate system as the 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 multiple camera image space coordinate systems, and it is impossible to calibrate the stereo camera to obtain the object space three-dimensional model. Summary of the invention
[0008] This application solves the problem of how to obtain the position and posture of the camera scene through the results of the indoor calibration, which is an urgent problem to be solved at present. Before the stereo camera is put into use, the stereo camera is calibrated. Through the calibration of the stereo camera, on the basis of knowing the correlation factor of the stereo camera, the front intersection of the stereo image pair is realized, so as to obtain the three-dimensional model of the object more conveniently and quickly, and how to realize the calibration of the stereo camera is a problem that this application urgently needs to solve. It solves how to use the calibration results of the camera in the indoor field, by attaching artificial marking points on the camera shell, placing the camera in the indoor calibration field for calibration, and using the total station to measure the object space three-dimensional coordinates of the camera shell marking points in the indoor field, so as to obtain the fixed position relationship between the shell marking points and the camera image space coordinate system, and combine the object space three-dimensional coordinates of the shell marking points in the outdoor field after the outdoor installation, to obtain 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. At the same time, for the stereo camera, the relative position and relative posture between multiple cameras are determined in the indoor calibration field, and the correlation factor of the stereo camera is obtained, which is convenient for its final use in actual engineering. This application establishes a conversion model between multiple coordinate systems through camera calibration results, solves the problem of determining the camera position and posture encountered in specific projects, and solves the problem of how to determine the relative position and posture between multiple cameras in a stereo camera.
[0009] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:
[0010] The method of positioning the surveying camera posture by the indoor calibration model calculation is as follows: first, determine the outdoor position and posture 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; when calibrating the camera, measure the coordinates of the markers in the indoor object coordinate system to obtain the relative position relationship between the markers and the camera; on the basis of this fixed relative relationship, combine the coordinates of the markers in the outdoor object three-dimensional coordinate system when installed in the outdoor field, and establish a mathematical model for solving the outdoor camera position and posture; second, calibrate the stereo camera: place the stereo camera in an indoor calibration field for calibration, use the relationship between the indoor object three-dimensional coordinate system and the image space coordinate system of multiple cameras in the stereo camera, obtain the relative position and posture between multiple image space coordinate systems, and 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 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 indoor object space three-dimensional coordinate system in the calibration field are obtained by high-precision measurement.
[0012] S2-Determination of the outdoor position and posture of a single camera, including: obtaining the indoor coordinates of the camera housing mark points, obtaining the outdoor coordinates of the camera housing mark points, and the outdoor position and posture calculation model of a single camera, obtaining the coordinates of the indoor camera housing mark points in the indoor object space three-dimensional coordinate system during the indoor camera calibration, and the coordinates of the camera housing mark points in the outdoor object space three-dimensional coordinate system after the camera is installed in the outdoor field, and positioning the outdoor camera based on the indoor camera calibration results;
[0013] S3-In-field calibration of stereo cameras: A mathematical model is established by 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.
[0014] Preferably, the 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 solve 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 factors and eccentric distortion factors.
[0016] Preferably, the camera is placed in an indoor calibration field for calibration, and the camera is allowed to shoot a control field composed of a number of evenly distributed control points, and the image-side coordinates of the image points corresponding to the control points in the photographed control field are obtained. Subsequently, the image-side coordinates of the image points corresponding to the control points in the photograph and the three-dimensional coordinates of the known control points in the indoor calibration field in the object-side three-dimensional coordinate system are substituted into the collinearity condition equation to solve the camera correlation factors, including the camera internal orientation elements, the camera distortion factors, and the camera external orientation elements of the camera at the calibration time.
[0017] The camera is placed in a protective shell, and artificial marking points are attached to the camera shell. Then the camera is set up somewhere in front of the control field, and the control field is photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points attached to the camera shell can be in line of sight with the total station on the left forced centering pile in 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 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, and the camera is calibrated based on the single-piece space back intersection, and the camera's internal orientation elements, camera distortion factors, and the camera's external orientation elements of the picture at the time of shooting are solved;
[0018] When calculating the camera factor using a single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average of the coordinates of the camera housing marker points measured, while the initial values of the exterior orientation element angle element, the camera interior orientation element, and the camera distortion factor are considered to be 0, and iterative calculations are performed to calculate the final results of each factor.
[0019] Preferably, the infield coordinates of the camera housing marking point 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 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 object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the internal 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 camera housing mark points, point a is the projection point of the mark point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the camera housing mark point, the value of the angle 90°∠SNa is the zenith distance between the measuring station and the camera housing mark point, and the distance S between points N and A is NA is the slant distance between the measuring station and the camera housing mark point. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object 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 calculation formula of the straight line NA is:
[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 marking points obtained by measurement and calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object three-dimensional coordinate system. Formula 1 is used to convert the coordinates of the measured marking points in the measurement coordinate system to the infield object coordinate system.
[0030] Preferably, the external field coordinates of the camera housing mark point are obtained: the east and west measuring piers are two measuring piers established in the external field calibration field, and the relative position between the two measuring piers is known, and 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 object space coordinate system of the outdoor field, 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 the north direction is X 测量 Positive axis 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-handed coordinate system. The coordinates of the fulcrum in the measuring coordinate system are measured through the east and west measuring piers. Then, a 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.
[0031] Finally, the coordinates of the measured marking points in the field measurement coordinate system are converted into coordinates in the field object 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: by using the camera to shoot the internal field control field, the camera is calibrated to obtain the external orientation elements of the camera when the camera is in the indoor calibration field and the internal orientation elements of the camera, and the three angle elements and three line elements of the external orientation elements of the camera in the indoor calibration field are used to obtain the rotation matrix and translation matrix between the image space coordinate system of the camera in the indoor calibration field and the three-dimensional coordinate system of the internal field object space;
[0035] DX内场 Y 内场 Z 内场 is the three-dimensional coordinate system of the interior object space, 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 the camera in an indoor calibration field, the camera placement position needs to meet the following rules:
[0037] 1) Photograph the control field in the calibration field, which is composed 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 内场 The image space coordinate system Sx of the infield camera 内 y 内 z 内 The relative transformation relationship:
[0040]
[0041] In formula 6, [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing mark point in the three-dimensional coordinate system of the interior object space, [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 time 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 inner field camera housing mark points in the inner field object space three-dimensional coordinate system measured by the total station in the inner field, the three-dimensional coordinates of the camera housing mark in the inner field 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:
[0045]
[0046] 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 external field object 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:
[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 get:
[0051]
[0052] Multiply both sides of the above equation by R 外场 have to:
[0053]
[0054] After moving the item:
[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 内场 With [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth angle elements and the translation matrix composed of the external azimuth line elements in the camera's infield calibration results, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed, [X 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T It is the coordinate of the camera housing mark point 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 mark point in the local coordinate system of the camera does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the local coordinate system of the camera and the three-dimensional coordinate system of the outdoor object space:
[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 rotation matrix R and translation matrix [ΔX ΔY ΔZ] between the two coordinate systems are solved by coordinate transformation. T , comparing the structures of formula 13 and formula 12, we get:
[0059] R 内场 , R 内场 -1 =R Formula 14
[0060] [ΔX 外场 ΔY 外场 ΔZ外场 ] T =[ΔX ΔY ΔZ] T Formula 15
[0061] From equations 14 and 15, we can get the rotation matrix and translation matrix composed of the external orientation elements of the external field where the camera is fixed:
[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 external orientation elements of the field camera, the external orientation elements of the camera are calculated, which are obtained by sequentially rotating three angles from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, the rotation of the two coordinate systems is completed in steps, that is, rotating around the coordinate axis by three different angles, and the coordinates of the image point a in the coordinate system S-XYZ are (X, Y, Z);
[0065]
[0066]
[0067] b 1 =cosωsinκ
[0068] b 2 =cosωcosκ
[0069] b 3 = -sinω
[0070]
[0071] Substituting equation b 1 = cosωsinκ and equation b 2 =cosωcosκ Dividing the left and right sides, we get:
[0072]
[0073] get:
[0074]
[0075] The equation And the equation Dividing the left and right sides gives:
[0076]
[0077] get:
[0078]
[0079] From equation b 3 = -sinω to obtain:
[0080] ω=sin -1 -b 3 Formula 25
[0081] The angular elements in 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 infield calibration of the stereo camera is as follows: a mathematical model is established using the external orientation elements of several cameras at the moment of camera calibration obtained by a 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 左 , click S 右 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 three-dimensional coordinate system in the indoor calibration field is calculated from the left camera exterior azimuth angle element and exterior azimuth line element in the left camera calibration result 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 is the object point 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 azimuth angle element and exterior azimuth line element in the right camera calibration result of the stereo camera:
[0089]
[0090] In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 The coordinates in the coordinate system, [x 右 y 右 z 右 ] T is the object point 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 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;
[0091] The transformation relationship between the image space coordinate systems of the left and right cameras in the stereo camera is derived from Equation 26 and Equation 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 three-dimensional 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 obtained as follows:
[0098]
[0099] In a stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object three-dimensional coordinate system, Equation 30 and Equation 31 respectively represent the translation and rotation relationship between the left camera image space coordinate system and the object coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object coordinate system. Based on the obtained translation and rotation matrix 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 to complete the calibration of the stereo camera, realize the forward intersection of the stereo image pair, and calculate the object coordinates of the object point in the local coordinate system of the stereo camera.
[0100] Compared with the prior art, the innovations 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 attached, 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, and the camera outdoor attitude positioning is completed. At the same time, before the stereo camera is actually put into use, it must be calibrated to obtain the relative position and posture relationship between multiple cameras, so as to facilitate the acquisition of the three-dimensional model of the object in actual production. In the indoor calibration field, based on the calibration of a single camera, the relative position and posture relationship between the image space coordinate systems of multiple cameras is calculated using the object space coordinate system of the indoor calibration field as the transition coordinate system, and the calibration of the stereo camera is completed to obtain the object space three-dimensional model. This application is based on the artificial marking points arranged on the camera housing, which effectively solves the problem of determining the position and posture of the camera without control points in the outdoor engineering site. Based on the calibration method of a single camera in the indoor field, a stereo camera calibration model is constructed, and its effectiveness is verified by experiments.
[0102] (2) This application proposes a method for determining the outdoor position and posture of a single camera: attaching marking points to the outside of the camera, and placing several artificial marking points and the camera as a rigid body in a calibration field for calibration. When calibrating the camera, measure the coordinates of the marking points in the indoor object space coordinate system to obtain the relative position relationship between the marking points and the camera. On the basis of this fixed relative relationship, combined with the coordinates of the marking 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, and finally verify the feasibility of the model in an indoor calibration field. This application proposes a method for calibrating a stereo camera: place a stereo camera in an indoor calibration field for calibration, 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, obtain the relative position and posture between multiple image space coordinate systems, and finally establish the local coordinates of the stereo camera 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 an urgent problem to be solved. 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 on the basis of knowing the correlation factors of the stereo camera, so as to obtain the three-dimensional model of the object more conveniently and quickly. How to realize the calibration of the stereo camera is an urgent problem to be solved in this application. It solves 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 shell, the camera is placed in the indoor calibration field for calibration, and the three-dimensional coordinates of the inner field of the camera shell marking points are measured by the total station to obtain the fixed position relationship between the shell marking points and the camera image space coordinate system. Using this invariance, combined with the three-dimensional coordinates of the outer field of the outer field 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. At the same time, for stereo cameras, it is necessary to determine the relative positions and relative postures of multiple cameras in an indoor calibration field to obtain the correlation factors of the stereo cameras, which is convenient for their final use in actual engineering. This application establishes a conversion model between multiple coordinate systems through the camera calibration results, solves the problem of determining the camera position and posture encountered in specific projects, and solves the problem of how to determine the relative position and posture 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 It is a schematic diagram of measuring the coordinates of the marking points on the inner field camera housing.
[0106] Figure 3 It 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 It 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 schematic diagram of the correlation factors of 5 of the 18 cameras after being installed in the field.
[0112] Fig. 9 It is a comparison chart of the control coordinates and calculated coordinates of two points in the external field.
[0113] Fig.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 method for determining the attitude and positioning of a surveying camera using an infield calibration model provided in the present application, so that those skilled in the art can better understand the present application and implement it.
[0115] The method of positioning the surveying camera posture by the indoor calibration model calculation is as follows: first, determine the outdoor position and posture 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; when calibrating the camera, measure the coordinates of the markers in the indoor object coordinate system to obtain the relative position relationship between the markers and the camera; on the basis of this fixed relative relationship, combine the coordinates of the markers in the outdoor object three-dimensional coordinate system when installed in the outdoor field, and establish a mathematical model for solving the outdoor camera position and posture; second, calibrate the stereo camera: place the stereo camera in an indoor calibration field for calibration, use the relationship between the indoor object three-dimensional coordinate system and the image space coordinate system of multiple cameras in the stereo camera, obtain the relative position and posture between multiple image space coordinate systems, and 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 based on the camera calibration method of single image space resection in an indoor calibration field. 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 inner field 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 Medium 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 solve 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 factors and eccentric distortion factors.
[0120] The camera is placed in an indoor calibration field for calibration, and the camera is allowed to shoot a control field composed of several evenly distributed control points, and the image-side coordinates of the image points corresponding to the control points in the photographed control field are obtained. Then, the image-side coordinates of the image points corresponding to the control points in the photograph and the known three-dimensional coordinates of the control points in the indoor calibration field in the object-side three-dimensional coordinate system are substituted into the collinearity condition equation to solve the camera correlation factors, including the camera internal orientation elements, the camera distortion factors, and the camera 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. Then the camera is set up somewhere in front of the control field, and the control field is photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points attached to 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 the control field, the image coordinates of the image control points corresponding to the image points and 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 the single-piece space rear intersection, and the camera's internal orientation elements, camera distortion factors, and the camera's external orientation elements of the film at the time of shooting are solved.
[0122] When calculating the camera factor using a single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average of the coordinates of the camera housing marker points measured, while the initial values of the exterior orientation element angle element, the camera interior orientation element, and the camera distortion factor are considered to be 0, and iterative calculations are 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 of the inner field camera shell in the inner field object space three-dimensional coordinate system during the inner field calibration of the camera, and the coordinates of the marking points of the camera shell in the outer field object space three-dimensional coordinate system after the camera is installed in the outer field, and position the outer field camera based on the inner field camera calibration results.
[0125] (I) Get the infield coordinates of the camera housing marker points
[0126] While the camera is being calibrated in the indoor calibration field, the total station is used to measure the coordinates of the camera housing mark point in the indoor field object coordinate system; when the camera is calibrated, the camera is allowed to shoot the control field of the indoor field, and the total station and the orientation pole are respectively set up on the two measuring piers in the indoor calibration field. After the total station is set up in one of the measurement fields, the total station is aimed at the orientation pole of the other measuring pier for orientation; then the horizontal angle between the measuring station point and each mark point on the camera housing, the zenith distance between the measuring station point and each mark point, and the slant distance between the measuring station point and each camera housing mark point are measured; finally, the measured horizontal angle, zenith distance, and slant distance are combined with the coordinates of the measuring station point on the left measuring pier to calculate the three-dimensional coordinates of the camera housing mark point in the indoor field object coordinate system in the indoor calibration field when each camera is calibrated in the indoor calibration field;
[0127] like Figure 2 As shown, in the 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 object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the internal 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 camera housing mark points, point a is the projection point of the mark point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the camera housing mark point, the value of the angle 90°∠SNa is the zenith distance between the measuring station and the camera housing mark point, and the distance S between points N and A is NA is the slant distance between the measuring station and the camera housing mark point. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object 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 calculation formula of the straight line NA is:
[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 marking points obtained by measurement and calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object three-dimensional coordinate system. Formula 1 is used to convert the coordinates of the measured marking points in the measurement coordinate system to the infield object coordinate system.
[0138] (II) Obtaining the external field coordinates of the camera housing marker points
[0139] After calibration in the indoor calibration field, the camera is installed in the outdoor calibration field according to the actual project requirements. Similar to the indoor calibration field, there are also two measuring piers in the outdoor calibration field. The coordinates of the camera housing marking points in the outdoor calibration field are obtained by measuring the coordinates of the camera housing marking points in the outdoor calibration field in the outdoor three-dimensional coordinate system. Because the area of the outdoor calibration field is large, the distance between the camera and the two measuring piers in the east and west directions is large. If the east-west measuring stations are directly set up to measure the coordinates of the camera housing marking points, the error will be large. Therefore, in actual measurement, the specific implementation process is different from that in the indoor field.
[0140] When measuring the marking points in the indoor calibration field, the distance between the total station on the left measuring pier and the camera marking points is relatively close. When measuring the marking points on the installed camera housing on the measuring pier in the outdoor calibration field, the average distance is about eighty meters, which is relatively far. Therefore, when measuring the coordinates of the marking points in the outdoor calibration field, the total station on the measuring pier is not directly used to observe and read the marking 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 marking points are measured. The distance between the fulcrum and the camera housing marking point is similar to the distance between the center of the total station on the left measuring pier in the indoor calibration field and the camera housing marking point. On the premise of ensuring that the total station can see through several marking points measured in the indoor field, 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 outfield inspection and 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 object space coordinate system of the outdoor field, 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 the north direction is X 测量 Positive axis 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 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 marking points in the field measurement coordinate system are converted into coordinates in the field object three-dimensional coordinate system:
[0143] X 外场 =Y 测量 , Y 外场 =Z 测量 , Z 外场 =-X 测量 Formula 5
[0144] Formula 5 is the conversion formula.
[0145] (III) Single camera field position and posture calculation model
[0146] After the calibrated camera is installed in the outdoor calibration field according to the actual engineering requirements, the results of the camera's indoor calibration, including the camera's internal orientation elements and the camera's external 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 in the indoor calibration field and the outdoor object space three-dimensional coordinate system in the outdoor calibration field, are combined. Based on the rotation transformation of multiple coordinate systems, a model for solving the camera's external orientation elements when the camera is installed in the outdoor calibration field is established.
[0147] When calibrating a camera in an indoor calibration field, the camera placement must meet the following rules:
[0148] 1) Photograph the control field in the calibration field, which is composed 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 marking point 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 in 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 interior object space, 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 内场 The image space coordinate system Sx of the infield camera 内 y 内 z内 The relative transformation relationship:
[0153]
[0154] In formula 6, [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing mark point in the three-dimensional coordinate system of the interior object space, [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 time 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 inner field camera housing mark points in the inner field object space three-dimensional coordinate system measured by the total station in the inner field, the three-dimensional coordinates of the camera housing mark in the inner field camera image space coordinate system [x 内 y 内 z 内 ] T ,get:
[0156]
[0157] After the camera that has been 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 image space coordinate system of the camera in the outdoor calibration field and the external object space three-dimensional coordinate system in the outdoor calibration field is listed, which 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 meet the following conditions:
[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 external object in the external field calibration field, [x 外 y 外 z 外 ] T is the coordinate of the camera housing mark point in the camera image space coordinates 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 Formula 6, and the coordinates of the camera shell marker points in the indoor camera image space coordinate system are calculated as shown in Formula 7 by using the indoor object space three-dimensional coordinates of the camera shell marker points in the indoor object space three-dimensional coordinate system measured by the total station in the indoor calibration field. The relative position between the camera image space coordinate system and the camera shell frame does not change, and does not change with the position change of the camera (referring to the rigid body composed of the protective shell and the camera installed in the physical shell). After the camera is installed in the outdoor calibration field, the relationship between the camera image space coordinate system and the protective shell is the same as that in the indoor calibration field. In the outdoor calibration field, the coordinates of the camera shell marker points in the outdoor camera image space coordinate system are consistent with the coordinates of the camera shell marker points in the indoor calibration field. Based on the invariance, the external orientation elements of the camera in the outdoor calibration field are solved to obtain the equation:
[0162]
[0163] Combining equation 6, equation 8, and equation 9, we get:
[0164]
[0165] Multiply both sides of the above equation by R 外场 have to:
[0166]
[0167] After moving the item:
[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 内场 With [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth angle elements and the translation matrix composed of the external azimuth line elements in the camera's infield calibration results, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed, [X 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T It is the coordinate of the camera housing mark point 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 mark point in the local coordinate system of the camera does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the local coordinate system of the camera and the three-dimensional coordinate system of the outdoor object space:
[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 rotation matrix R and translation matrix [ΔX ΔY ΔZ] between the two coordinate systems are solved by coordinate transformation. T , comparing the structures of formula 13 and formula 12, we get:
[0172] R 内场 , R 内场 -1 =R Formula 14
[0173] [ΔX 外场 ΔY 外场 ΔZ 外场 ] T =[ΔX ΔY ΔZ] T Formula 15
[0174] From equations 14 and 15, we can get the rotation matrix and translation matrix composed of the external orientation elements of the external field where the camera is fixed:
[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 external orientation elements of the field camera, the external orientation elements of the camera are calculated, which are obtained by sequentially rotating three angles from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, the rotation of the two coordinate systems is completed in steps, that is, rotating around the coordinate axis by three different angles, and the coordinates of the image point a in the coordinate system S-XYZ are (X, Y, Z);
[0178]
[0179] b 1 =cosωsinκ
[0180] b 2 =cosωcosκ
[0181] b 3 = -sinω
[0182]
[0183] Substituting equation b 1 = cosωsinκ and equation b 2 =cosωcosκ Dividing the left and right sides, we get:
[0184]
[0185] get:
[0186]
[0187] The equation And the equation Dividing the left and right sides gives:
[0188]
[0189] get:
[0190]
[0191] From equation b 3 = -sinω to obtain:
[0192] ω=sin -1 -b 3 Formula 25
[0193] The angular elements in 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 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;
[0196] A stereo camera consisting of two cameras is first placed in the 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.
[0197] The schematic diagram of the calibration of the stereo camera 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 左 , click S 右 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 three-dimensional coordinate system in the indoor calibration field is calculated from the left camera exterior azimuth angle element and exterior azimuth line element in the left camera calibration result of the stereo camera:
[0199]
[0200] In formula 26, [X 内场 Y 内场 Z 内场 ] TThe object point is in DX 内场 Y 内场 Z 内场 The coordinates in the coordinate system, [x 左 y 左 z 左 ] T is the object point 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 azimuth angle element and exterior azimuth line element in the right camera calibration result of the stereo camera:
[0202]
[0203] In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 The coordinates in the coordinate system, [x 右 y 右 z 右 ] T is the object point 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 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;
[0204] The transformation relationship between the image space coordinate systems of the left and right cameras in the stereo camera is derived from Equation 26 and Equation 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 three-dimensional 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 three-dimensional 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 obtained as follows:
[0211]
[0212] In a stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object three-dimensional coordinate system, Equation 30 and Equation 31 respectively represent the translation and rotation relationship between the left camera image space coordinate system and the object coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object coordinate system. Based on the obtained translation and rotation matrix 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 to complete the calibration of the stereo camera, realize the forward intersection of the stereo image pair, and calculate the object coordinates of the object point in the local coordinate system of the stereo camera.
[0213] IV. Experiment and Analysis
[0214] (I) Feasibility verification of single camera outdoor attitude positioning
[0215] In actual engineering applications, the camera is installed in the outdoor calibration field. Due to the lack of control points, it is inconvenient to verify the accuracy of the calculated camera exterior orientation elements. The same camera is set up at three different positions in the indoor calibration field. The camera is set up at the left, middle, and right positions, and the three-dimensional coordinates of the camera housing mark points at each position in the indoor calibration field are measured. For the camera in the middle position, let it shoot the indoor control field to obtain the picture, and then use the single-chip space back intersection method to calibrate the camera to obtain the camera interior orientation elements, camera distortion factors, and the exterior orientation elements of the camera in the middle position.
[0216] The coordinates of the camera housing mark point in the middle position in the internal field coordinate system are combined with the internal field coordinates of the camera housing mark points on the left and right sides, and the camera exterior orientation elements at the left and right sides are solved using the attitude positioning method. Then the calculated exterior orientation elements are compared with the exterior orientation elements calibrated using the left and right position images, such as Figure 6 shown.
[0217] Figure 6In the figure, 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 used to calculate the coordinates of the control points corresponding to the same name image points in the in-field object coordinate system by using the forward intersection of the stereo image pair. The calculated coordinates are compared with the coordinates provided by the control points. The results are as follows: Figure 7 as shown.
[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 three-dimensional coordinate system of the inner field object space, and the intersection point coordinates are the coordinates of the object space points corresponding to the same image points in the three-dimensional coordinate system of the inner field object space calculated by the attitude positioning method based on the exterior orientation elements of the left and right cameras.
[0219] The error in the position error between the control point coordinates and intersection coordinates of each of the 20 selected points is 4.7861mm. When verifying this method in an indoor calibration field, the distance between the camera and the marker point is about five meters, while the distance is about eighty meters when setting up a camera to shoot the drone in the outdoor calibration field. According to the linear ratio, the accuracy under the same conditions is estimated to be 80mm, which meets the 1m accuracy requirement required for the outdoor camera intersection. Therefore, it is feasible to determine the position and posture of the outdoor camera by this method.
[0220] (II) 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 the indoor calibration and the three-dimensional coordinates of the outdoor object space after the 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 , 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, two cameras out of 18 cameras were selected to form a stereo pair due to the actual engineering situation. The object coordinates of the two control points in the calibration field were calculated by forward intersection, and 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. Fig. 9 shown.
[0224] like Fig. 9 As shown in the figure, the position difference between the coordinates calculated based on the external orientation elements of the field camera and its control coordinates is 0.48 and 0.28m respectively, which meets the 1m accuracy requirement in the engineering project. Therefore, the single camera field attitude positioning method is feasible, and the result meets the required accuracy.
[0225] (III) In-field calibration of stereo cameras
[0226] First, the left and right cameras in the stereo camera are calibrated according to the single camera based on the single-chip space resection algorithm to obtain the internal orientation elements, camera distortion factors and camera external orientation elements of the left and right cameras at the time of calibration. Different from the calibration of a single camera, after obtaining the factors of each camera, it is necessary to determine the relative transformation relationship between the image space coordinate systems of the left and right cameras that make up the stereo camera through the connection between the image space coordinate systems of multiple cameras of the stereo camera and the object space coordinate system of the indoor calibration field.
[0227] 1. Calibration results of stereo camera
[0228] First, place the stereo camera in the calibration field and shoot the control field in the calibration field to obtain the images of the left and right cameras of the stereo camera. Considering the need to verify the experimental results, after the left and right cameras shoot the control field inside the calibration field, some points are artificially removed. These removed control points are used as check points for the calibration results of the stereo camera and do not participate in the calibration of the stereo camera.
[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, and 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 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. And 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 Fig.10 shown.
[0231] The mean error of the difference between the pairwise distances of the 8 marking points in the three-dimensional coordinate system of the infield object space and the local coordinate system of the stereo camera is 0.4862mm, which meets the accuracy requirements of the stereo camera calibration.
Claims
1. A method for determining the attitude and positioning of a surveying and mapping camera based on an infield calibration model calculation, characterized in that: The first is to determine the field position and posture 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, and measure the coordinates of the markers in the indoor object coordinate system during camera calibration to obtain the relative position relationship between the markers and the camera. On the basis of this fixed relative relationship, combined with the coordinates of the markers in the outdoor object three-dimensional coordinate system when installed in the outdoor field, a mathematical model for solving the field camera position and posture is established; 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 three-dimensional coordinate system and the image space coordinate system of multiple cameras in the stereo camera to obtain the relative position and posture between multiple image space coordinate systems. Finally, the local coordinates of the stereo camera are established to complete the calibration of the stereo camera. S1-Indoor calibration of a single camera: The camera is calibrated 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 indoor object space three-dimensional coordinate system in the calibration field are obtained by high-precision measurement. S2-Determination of the outdoor position and posture of a single camera, including: obtaining the indoor coordinates of the camera housing mark points, obtaining the outdoor coordinates of the camera housing mark points, and the outdoor position and posture calculation model of a single camera, obtaining the coordinates of the indoor camera housing mark points in the indoor object space three-dimensional coordinate system during the indoor camera calibration, and the coordinates of the camera housing mark points in the outdoor object space three-dimensional coordinate system after the camera is installed in the outdoor field, and positioning the outdoor camera based on the indoor camera calibration results; S3-In-field calibration of stereo cameras: A mathematical model is established by 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.
2. 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: 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 solve 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 factors and eccentric distortion factors.
3. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 2, characterized in that: The camera is placed in an indoor calibration field for calibration, and the camera is allowed to shoot a control field composed of a number of evenly distributed control points, and the image-side coordinates of the image points corresponding to the control points in the photographed control field are obtained. Subsequently, the image-side coordinates of the image points corresponding to the control points in the photograph and the known three-dimensional coordinates of the control points in the indoor calibration field in the object-side three-dimensional coordinate system are substituted into the collinearity condition equation to solve the camera correlation factors, including the camera internal orientation elements, the camera distortion factors, and the camera external orientation elements at the time of calibration. The camera is placed in a protective shell, and artificial marking points are attached to the camera shell. Then the camera is set up somewhere in front of the control field, and the control field is photographed upward at a certain tilt angle. The camera is calibrated to ensure that seven of the artificial marking points attached to the camera shell can be in line of sight with the total station on the left forced centering pile in 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 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, and the camera is calibrated based on the single-piece space back intersection, and the camera's internal orientation elements, camera distortion factors, and the camera's external orientation elements of the picture at the time of shooting are solved. When calculating the camera factor using a single-chip forward intersection, the initial value of the line element in the camera exterior orientation element is obtained by taking the average of the coordinates of the camera housing marker points measured, while the initial values of the exterior orientation element angle element, the camera interior orientation element, and the camera distortion factor are considered to be 0, and iterative calculations are performed to calculate the final results of each factor.
4. 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: Get the infield coordinates of the camera housing marker point: 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 object coordinate system. 内场 Axis, Z 测量 The axis is the Y axis of the internal 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 camera housing mark points, point a is the projection point of the mark point to the horizontal plane, ∠SNa is the horizontal angle between the measuring station and the camera housing mark point, the value of the angle 90°∠SNa is the zenith distance between the measuring station and the camera housing mark point, and the distance S between points N and A is NA is the slant distance between the measuring station and the camera housing mark point. The coordinates of the measuring station N and the orientation point S in the three-dimensional coordinate system of the infield object 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 calculation formula of the straight line NA is: α 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 and calculation are in the infield measurement coordinate system. When using the outfield camera attitude positioning method, they are converted to the infield object 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 coordinate system.
5. The method for determining the attitude and positioning of a surveying and mapping camera by calculating 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 object space coordinate system of the outdoor field, 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 the north direction is X 测量 Positive axis 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-handed coordinate system. The coordinates of the fulcrum in the measuring coordinate system are measured through the east and west measuring piers. Then, a 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. Finally, the coordinates of the measured marking points in the field measurement coordinate system are converted into coordinates in the field object three-dimensional coordinate system: X 外场 = Y 测量 , Y 外场 = Z 测量 , Z 外场 = -X 测量 Equation 5 Formula 5 is the conversion formula.
6. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 1, characterized in that: Single camera external field position and posture calculation model: 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. The three angle elements and three line elements of the camera's external 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 internal field object space three-dimensional coordinate system. DX 内场 Y 内场 Z 内场 is the three-dimensional coordinate system of the interior object space, 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 局部 .
7. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 6, characterized in that: When calibrating a camera in an indoor calibration field, the camera placement must meet the following rules: 1) Photograph the control field in the calibration field, which is composed 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.
8. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 6, 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 内场 The image space coordinate system Sx of the infield camera 内 y 内 z 内 The relative transformation relationship: In formula 6, [X 内场 Y 内场 Z 内场 ] T Represents the three-dimensional coordinates of the camera housing marker point in the three-dimensional coordinate system of the interior object space, [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 time 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 inner field camera housing mark points in the inner field object space three-dimensional coordinate system measured by the total station in the inner field, the three-dimensional coordinates of the camera housing mark in the inner field 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: 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 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 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: 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 get: Multiply both sides of the above equation by R 外场 have to: After moving the item: 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 内场 With [ΔX 内场 ΔY 内场 ΔZ 内场 ] T They are respectively the rotation matrix composed of the external azimuth angle elements and the translation matrix composed of the external azimuth line elements in the camera's infield calibration results, R 外场 , [ΔX 外场 ΔY 外场 ΔZ 外场 ] T It is the external orientation element after the field camera is fixedly installed, [X 内场 -ΔX 内场 Y 内场 -ΔY 内场 Z 内场 -ΔZ 内场 ] T is the coordinate of the camera housing mark point 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 mark point in the local coordinate system of the camera does not change. Therefore, Equation 12 is regarded as the rotation transformation relationship between the local coordinate system of the camera and the three-dimensional coordinate system of the outdoor object space: Based on the two sets of coordinates of the marker point in the external object coordinate system and the camera local coordinate system, the rotation matrix R and translation matrix [ΔXΔYΔZ] between the two coordinate systems are solved by coordinate transformation. T , comparing the structures of formula 13 and formula 12, we get: R 内场 , R 内场 -1 = R formula 14 [ΔX 外场 ΔY 外场 ΔZ 外场 T =[ΔX ΔY ΔZ] T Equation 15 From equations 14 and 15, we can get the rotation matrix and translation matrix composed of the external orientation elements of the external field where the camera is fixed: 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 external orientation elements of the field camera, the external orientation elements of the camera are calculated, which are obtained by sequentially rotating three angles from the image space coordinate system S-xyz to the object space coordinate system S-XYZ. The three angles are ω, κ, the rotation of the two coordinate systems is completed in steps, that is, three different angles are rotated 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 the equation Dividing the left and right sides gives: get: From the equation b3 = -sinω we get: ω = sin -1 -b3 Equation 25 The angular elements in 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.
9. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 1, characterized in that: In-field calibration of stereo cameras: A mathematical model is established using the external orientation elements of several cameras at the time of camera calibration obtained using a single-camera calibration method. 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.
10. The method for determining the attitude and positioning of a surveying and mapping camera by calculating an infield calibration model according to claim 9, characterized in that: 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; DX 内场 Y 内场 Z 内场 is the object space three-dimensional coordinate system in the indoor calibration field, point S 左 , click S 右 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 three-dimensional coordinate system in the indoor calibration field is calculated from the left camera exterior azimuth angle element and exterior azimuth line element in the left camera calibration result of the stereo camera: In formula 26, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 The coordinates in the coordinate system, [x 左 y 左 z 左 ] T is the object point 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 azimuth angle element and exterior azimuth line element in the right camera calibration result in the stereo camera: In formula 27, [X 内场 Y 内场 Z 内场 ] T The object point is in DX 内场 Y 内场 Z 内场 The coordinates in the coordinate system, [x 右 y 右 z 右 ] T is the object point 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 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 image space coordinate systems of the left and right cameras in the stereo camera is derived from Equation 26 and Equation 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 three-dimensional 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 obtained as follows: In a stereo camera, the local coordinate system SX 立体 Y 立体 Z 立体 As the object three-dimensional coordinate system, Equation 30 and Equation 31 respectively represent the translation and rotation relationship between the left camera image space coordinate system and the object coordinate system, and the translation and rotation relationship between the right camera image space coordinate system and the object coordinate system. Based on the obtained translation and rotation matrix 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 to complete the calibration of the stereo camera, realize the forward intersection of the stereo image pair, and calculate the object coordinates of the object point in the local coordinate system of the stereo camera.
Citation Information
Patent Citations
Monocular camera indoor coordinate positioning method based on machine vision
CN115493568A
Method for carrying out uncalibrated camera indoor positioning by utilizing Aruco code
CN115953470A
Indoor positioning method suitable for multi-scale continuous zooming condition
CN116026340A