A method for acquiring a model position and pose by a single camera

By installing coding points on the model and using a single camera to capture images, the rotation matrix and translation vector are calculated. This solves the problem of difficulty in obtaining model displacement and posture in existing technologies, and achieves high-precision, non-contact model position and posture measurement.

CN120627966BActive Publication Date: 2025-10-17LOW SPEED AERODYNAMIC INST OF CHINESE AERODYNAMIC RES & DEV CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511135076.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-10-17
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

Existing technologies make it difficult to obtain the displacement information of the model in the wind tunnel, its relative position and yaw attitude angle in real time, and the installation of the tilt sensor is difficult and has power supply and communication line limitations.

Method used

By installing multiple code points to be tested on the model, using a single camera to shoot the model image, combining the three-dimensional coordinates and two-dimensional pixel coordinates, calculating the rotation matrix and translation vector, the model's posture information is obtained in real time.

Benefits of technology

It realizes non-contact measurement with high precision and high operating efficiency, and is not limited by the model size and the size of the internal space of the wind tunnel. The model image is directly captured by the camera with simple steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 43F3E1C5-DC35-4EEE-B172-CC81074BC366
    Figure 43F3E1C5-DC35-4EEE-B172-CC81074BC366
  • Figure 0JMFBDAUMPFKWP2UGBNCCQ6KIXSEAHJ5UP9DMJKE
    Figure 0JMFBDAUMPFKWP2UGBNCCQ6KIXSEAHJ5UP9DMJKE
Patent Text Reader

Abstract

The application provides a method for acquiring model position and posture by a single camera, and belongs to the technical field of wind tunnel measurement. The specific steps comprise the following steps: S1: installing a plurality of to-be-measured coding points on the model; S2: adjusting the model to an initial posture, so that the angle of attack, the roll angle and the sideslip angle of the model are all zero; S3: acquiring three-dimensional coordinates of the to-be-measured coding points in a wind tunnel coordinate system, using a main camera to shoot an image of the model, and acquiring two-dimensional pixel coordinates of the to-be-measured coding points in the image; S4: calculating a rotation matrix and a translation vector from the two-dimensional pixel coordinates to the three-dimensional coordinates; S5: moving the model, repeating step S3, and calculating the rotation matrix and the translation vector from the two-dimensional pixel coordinates to the three-dimensional coordinates; S6: based on the data in step S4 and step S5, calculating and outputting the posture information of the model; and S7: repeating step S5 and step S6, and acquiring and outputting the posture information of the model in real time. The method provided in the application has high data precision and is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of wind tunnel measurement, and in particular relates to a method for obtaining the position and posture of a model using a single camera. Background Art

[0002] Real-time acquisition of a model's position and attitude in a wind tunnel is crucial for establishing flow field information about the model's flow. Existing techniques typically obtain the model's angle of attack or roll by installing a tilt sensor inside the model. However, this approach struggles with obtaining the model's displacement and relative position within the wind tunnel, nor does it capture the model's yaw attitude angle. Furthermore, this method requires the installation of a tilt sensor, which is powered and transmitted via a circuit. This makes installation difficult for smaller models, and the power and communication circuits significantly restrict or constrain certain test conditions, presenting significant challenges to the development of model flow visualization technology. Summary of the Invention

[0003] The purpose of this application is to provide a method for obtaining the position and posture of a model with a single camera to solve the above-mentioned technical problems existing in the prior art.

[0004] This application is implemented as follows:

[0005] The embodiment of the present application provides a method for obtaining the position and posture of a model with a single camera, including S1: installing multiple code points to be measured on the model; S2: adjusting the model to an initial posture so that the model's angle of attack, roll angle, and sideslip angle are all zero; S3: obtaining the three-dimensional coordinates of the code points to be measured in the wind tunnel coordinate system, using a main camera to capture an image of the model, obtaining the two-dimensional pixel coordinates of the code points to be measured in the image, comparing the IDs of the code points to be measured corresponding to the three-dimensional coordinates and the two-dimensional pixel coordinates, and retaining the three-dimensional coordinates and two-dimensional pixel coordinates of the code points to be measured with the same ID; S4: calculating the rotation matrix from the two-dimensional pixel coordinates to the three-dimensional coordinates and translation vectors ; S5: Move the model, repeat step S3, and calculate the rotation matrix from two-dimensional pixel coordinates to three-dimensional coordinates and translation vectors , ,in, Indicates the Secondary mobile model; S6: Based on step S4 and and in step S5 and ,calculate 、 and 、 The relative rotation matrix between and the relative translation vector ,based on and S7: repeating steps S5 and S6 to obtain the pose information of the model in real time and output.

[0006] The technical scheme adopted by the present application can achieve the following beneficial effects:

[0007] In the present application, the model is photographed by using the main camera, and the image information obtained by photographing is combined with the coordinate data of the to-be-measured encoding points on the model in the wind tunnel coordinate system to calculate the pose information of the model after the position change. The entire process is non-contact measurement, which is not restricted by the size of the model, the size of the internal space of the wind tunnel, and the internal wiring of the wind tunnel. The obtained data is high in precision and more accurate. Moreover, the model image is directly photographed by using the main camera, the steps are simple, and the operation efficiency is high. DETAILED DESCRIPTION

[0008] To make the objectives, technical schemes, and advantages of the present application clearer, the technical scheme of the present application will be described in detail below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0009] The present application provides a method for obtaining the position and attitude of a model by using a single camera, and the specific steps include:

[0010] S1: installing a plurality of to-be-measured encoding points on the model. After the position of the model changes, the positions of the to-be-measured encoding points will also change. The position information of the model is fed back by using the to-be-measured encoding points, which facilitates the detection of the position of the model and the subsequent calculation of the change data of the position and attitude of the model.

[0011] The to-be-measured encoding points are generally arranged at the wing positions on the left and right sides of the model, the nose position, the tail position, and the like. The fixing mode can be selected as bonding to avoid affecting the airflow flowing on the surface of the model.

[0012] S2: adjusting the model to an initial attitude so that the angle of attack, the roll angle, and the sideslip angle of the model are all zero. The model is first adjusted to the initial attitude, which facilitates the comparison and obtaining of the position change information of the model after the position of the model changes.

[0013] S3: obtaining the three-dimensional coordinates of the to-be-measured encoding points in the wind tunnel coordinate system. The image of the model is photographed by using the main camera to obtain the two-dimensional pixel coordinates of the to-be-measured encoding points in the image. The IDs of the to-be-measured encoding points corresponding to the three-dimensional coordinates and the two-dimensional pixel coordinates are compared, and the three-dimensional coordinates and the two-dimensional pixel coordinates of the to-be-measured encoding points with the same ID are retained.

[0014] Since the main camera can only take pictures in one direction of the model, some of the to-be-tested coded points may be blocked by the model and not appear in the image, so the corresponding two-dimensional pixel coordinates cannot be obtained. The same is true for the acquisition of the three-dimensional coordinates of the to-be-tested coded points. Due to the blocking of the model, the detection may fail, so the IDs of the to-be-tested coded points corresponding to the three-dimensional coordinates and the two-dimensional pixel coordinates need to be compared. Only when the to-be-tested coded points have both three-dimensional coordinate data and two-dimensional pixel coordinate data, the two coordinate data are retained. For the to-be-tested coded points with only three-dimensional coordinates or only two-dimensional pixel coordinates, the corresponding coordinate data is discarded.

[0015] When the to-be-tested coded points are pasted in step S1, attention needs to be paid to the positions of the to-be-tested coded points, so that the main camera can take pictures of three non-collinear coded points at any time, so that the to-be-tested coded points corresponding to the three-dimensional coordinates or the two-dimensional pixel coordinates include at least three non-collinear to-be-tested coded points.

[0016] S4: After obtaining the two coordinate data, the rotation matrix of the two-dimensional pixel coordinates to the three-dimensional coordinates and the translation vector .

[0017] S5: Move the model and repeat step S3 to calculate the rotation matrix of the two-dimensional pixel coordinates to the three-dimensional coordinates and the translation vector , wherein, represents the time the model is moved. After the model is moved, step S3 is repeated to obtain the three-dimensional coordinates and the two-dimensional pixel coordinates of the to-be-tested coded points, and then the calculation is performed. When the model is moved for the first time, is 1, when the model is moved for the second time, is 2, and so on.

[0018] The calculation steps of the rotation matrix and the translation vector are the same as the calculation steps in step S4, and the steps are similar. After the model is moved each time, the rotation matrix and the translation vector of the model at this position and attitude need to be calculated for comparison and calculation with the rotation matrix and the translation vector obtained in step S4.

[0019] S6: Based on and in step S4 and and in step S5, the relative rotation matrix , and the relative translation vector , between and are calculated, based on and , the pose information of the model is obtained.

[0020] The data obtained after the model is moved in step S5 is compared with the basic data, so as to obtain the pose information of the model. and The data obtained after the model is moved in step S5 is compared with the basic data, so as to obtain the pose information of the model.

[0021] S7: Steps S5 and S6 are repeated to obtain the pose information of the model in real time and output the pose information of the model in real time, so as to facilitate researchers to conduct research.

[0022] During the entire measurement process, the model is photographed by using the main camera, and the photographed image information is combined with the coordinate data of the to-be-measured encoding points on the model in the wind tunnel coordinate system for calculation. After the corresponding rotation matrix and translation vector of the model in the initial state are obtained, the model is photographed and the corresponding rotation matrix and translation vector are calculated after each movement of the model. The data after the movement of the model is compared and calculated with the data in the initial state, so as to obtain the pose information of the model. The entire measurement process is a non-contact measurement, which is not restricted by the size of the model, the size of the internal space of the wind tunnel and the internal wiring of the wind tunnel. The obtained data is high in precision and more accurate. Moreover, the model image is directly photographed by using the main camera, the steps are simple, and the operation efficiency is high.

[0023] In step S4, the specific calculation steps of the rotation matrix and the translation vector include:

[0024] S401: First, according to the three-dimensional coordinate data and the two-dimensional pixel coordinate data reserved in step S3, the two-dimensional pixel coordinate point set and the three-dimensional coordinate point set are obtained. At the same time, and the ID of the to-be-measured encoding point is the same, indicates the total number of three-dimensional coordinates or the total number of two-dimensional pixel coordinates reserved in step S3. The total number of three-dimensional coordinates reserved in step S3 is the same as the total number of two-dimensional pixel coordinates.

[0025] The two-dimensional pixel coordinate point set and the corresponding three-dimensional coordinate point set are substituted into the PnP algorithm for solving, which is equivalent to taking as a three-dimensional coordinate point under the wind tunnel coordinate system, taking the two-dimensional pixel coordinate point as a three-dimensional coordinate point projected onto the pixel coordinate point of the image coordinate system by an imaginary camera, and then using the PnP algorithm to solve the external parameter and of the imaginary camera.

[0026] In order to solve the external parameter and of the imaginary camera.The internal parameters of the main camera used when shooting the model image are substituted into the PnP algorithm as internal parameters of the imaginary camera to participate in the calculation and solution and The calculation process and related principles of the PnP algorithm are as follows:

[0027] The PnP algorithm estimates the external parameters of the camera, i.e., the posture of the camera coordinate system of the imaginary camera relative to the wind tunnel coordinate system, by using a plurality of pairs of three-dimensional world coordinate points and their projection points in a two-dimensional image and so that the pixel points obtained by projecting the three-dimensional world coordinate points to the two-dimensional image plane can be as close as possible to the projection points in the two-dimensional image directly corresponding to the three-dimensional points, i.e., as close as possible to the observed two-dimensional pixel points, that is, the optimal and values are solved by making the re-projection error as small as possible. The actual calculation steps are as follows:

[0028] S402: The two-dimensional pixel points in the two-dimensional pixel coordinate point set are expressed as column vectors , and the three-dimensional points in the three-dimensional coordinate point set are expressed as column vectors . To distinguish from the translation vector , t represents the transpose of the matrix.

[0029] S403: Based on the pinhole imaging model, the three-dimensional point is expressed in the camera coordinate system of the imaginary camera as: where the rotation matrix and the translation vector are the external parameters of the imaginary camera.

[0030] S404: Project to the two-dimensional image plane to obtain .

[0031] S405: Convert to pixel coordinates using the internal parameter matrix of the main camera:

[0032] .

[0033] where the internal parameter matrix is a known parameter, , is the focal length of the camera in the x direction, is the focal length of the camera in the y direction, ,​​ represents the principal point coordinate, i.e. the center of the image plane, which is usually close to the image center, and the unit is pixel.

[0034] S406: Reprojection error value of all points :

[0035] , wherein, is the actual observed two-dimensional pixel point , is the extrinsic parameter of the virtual camera and pixel coordinate point obtained by projecting the point in the wind tunnel coordinate system to the two-dimensional image plane ;

[0036] S407: Preset , , the values of and are corrected by repeatedly iterating and optimizing the reprojection error value, until the reprojection error value reaches the minimum, and the rotation matrix and the translation vector at this time are obtained.

[0037] In the calculation, first, preset a , , then the values of and are corrected by repeatedly iterating and optimizing the reprojection error value, until the reprojection error value reaches the minimum, and , at this time are the values to be solved, i.e. the rotation matrix and the translation vector of the virtual camera, and the rotation matrix and the translation vector solved at this time are the rotation matrix and the translation vector from the two-dimensional pixel coordinate to the three-dimensional coordinate to be solved in step S4.

[0038] In step S5, after repeating step S3, it further includes repeating steps S401 to S406, presetting , , the values of and are corrected by repeatedly iterating and optimizing the reprojection error value, until the reprojection error value reaches the minimum, and the rotation matrix and the translation vector at this time are obtained.

[0039] The rotation matrix and the translation vector The calculation steps are the same as the principle in step S4, and the steps are almost similar, except that the position of the to-be-measured encoding point has changed at this time, and the corresponding two-dimensional pixel coordinate data and three-dimensional coordinate data have changed. Finally, the rotation matrix and the translation vector obtained are respectively and .

[0040] After obtaining the rotation matrix and the translation vector corresponding to the model in the initial state and after the position change, the pose information of the model needs to be solved. In step S6, the specific steps include:

[0041] S601: Calculate and , wherein:

[0042] , .

[0043] S602: Decompose the relative rotation matrix , and extract the Euler angle, that is, the yaw angle (Yaw), the pitch angle (Pitch), and the roll angle (Roll). The values of the yaw angle, the pitch angle, and the roll angle correspond to the yaw angle, the pitch angle, and the roll angle of the model after the first time movement of the model. The principle of decomposing the Euler angle from the rotation matrix is prior art, and will not be described here.

[0044] S603: After the first time movement of the model, the three-dimensional coordinate information of the model is , , , which is the three-dimensional coordinate of the model in step S2, , which is the three-dimensional coordinate of the model after the first time movement of the model. When establishing the wind tunnel coordinate system, the origin of the coordinate system is corresponding to the model position, which is more convenient for observing the three-dimensional coordinate change trend of the model after the movement of the model.

[0045] S604: Output the pose information of the model, which includes the yaw angle, the pitch angle, the roll angle of the model, and the three-dimensional coordinate information of the model .

[0046] In some preferred embodiments, the order of the solved Euler angle can be adjusted to output the angle data in the order of the pitch angle, the yaw angle, and the roll angle, and at the same time, output the three-dimensional coordinate information of the model.

[0047] Before step S1 starts, it is also necessary to establish a connection between the main camera and the wind tunnel coordinate system, so as to obtain the three-dimensional coordinates of the to-be-measured encoding point in the wind tunnel coordinate system through the main camera. The specific steps include:

[0048] S01: Establish a wind tunnel coordinate system based on a cross-coded calibration board, and obtain the three-dimensional coordinates of each code point on the cross-coded calibration board in the wind tunnel coordinate system. The wind tunnel coordinate system needs to be established based on the cross-coded calibration board.

[0049] S02: Establish a camera coordinate system based on the main camera and the auxiliary camera, and obtain the three-dimensional coordinates of each code point on the cross-coded calibration board in the camera coordinate system. The main camera and the auxiliary camera are fixed in the wind tunnel, and the camera coordinate system can be established through the main camera and the auxiliary camera. The three-dimensional coordinates of each code point on the cross-coded calibration board in the camera coordinate system can be obtained through the camera. At the same time, it should be noted that the two-dimensional pixel coordinates of the to-be-measured code point are obtained through the image captured by the main camera in the subsequent process. Therefore, when establishing the camera coordinate system, the main camera needs to be taken as the reference.

[0050] S03: Convert the camera coordinate system to the wind tunnel coordinate system. After the camera coordinate system and the wind tunnel coordinate system are established, the cross-coded calibration board is used to establish a connection between the two coordinates, and the camera coordinate system is converted to the wind tunnel coordinate system.

[0051] In step S01, the specific establishment process of the wind tunnel coordinate system includes:

[0052] S011: Take the center of a code point on the cross-coded calibration board as the origin O of the wind tunnel coordinate system, and take one side of the cross-coded calibration board placed horizontally as the X-axis of the wind tunnel coordinate system. The Y-axis is corrected based on the X-axis to ensure that the X-axis and the Y-axis are orthogonal.

[0053] The position of the cross-coded calibration board is adjusted to ensure that one side of the cross-coded calibration board is placed horizontally, and the center of a code point ID_0 on the cross-coded calibration board is taken as the origin O of the wind tunnel coordinate system.

[0054] Secondly, the X-axis is determined. Two code points ID_X0 and ID_X1 are selected on the side of the cross-coded calibration board placed horizontally. The direction from the code point ID_X0 to the code point ID_X1 is the positive direction of the X-axis.

[0055] Then, the Y-axis is determined. Two code points ID_Y0 and ID_Y1 are selected on one side of the calibration board vertically. The direction from the code point ID_Y0 to the code point ID_Y1 is the positive direction of the Y-axis. However, since the horizontal and vertical sides of the cross-coded calibration board are not strictly orthogonal, the direction of the Y-axis can only be determined approximately at this time.

[0056] Finally, the direction perpendicular to the XOY plane and starting at the origin O is the Z-axis. The coordinate system established in this way is defined as the wind tunnel coordinate system.

[0057] The Y-axis is corrected. The correction steps include:

[0058] Get the unit vectors of X-axis and Y-axis. First, find the three-dimensional coordinates of the encoding points ID_X0 and ID_X1 from the global point coordinate system of the cross-encoding calibration board, define Vec_X as the vector from ID_X0 to ID_X1, and Vec_X represents the X-axis. Secondly, find the three-dimensional coordinates of the encoding points ID_Y0 and ID_Y1, define Vec_Y as the vector from ID_Y0 to ID_Y1, and Vec_Y represents the Y-axis. Finally, calculate the Euclidean norm of the vectors Vec_X and Vec_Y respectively, and normalize the two vectors to unit vectors Vec_X_norm and Vec_Y_norm.

[0059] Determine the Z-axis. After obtaining the unit vectors Vec_X_norm and Vec_Y_norm, the vector Vec_Z perpendicular to the plane on which the vectors Vec_X_norm and Vec_Y_norm lie is obtained by calculating the cross product of the vectors Vec_X_norm and Vec_Y_norm, and the vector Vec_Z solved at this time represents the Z-axis of the wind tunnel coordinate system, as shown in the following formula:

[0060] .

[0061] Correct the Y-axis. After normalizing Vec_Z to unit vector Vec_Z_norm, calculate the cross product of the vectors Vec_X_norm and Vec_Z_norm to get the vector perpendicular to the plane on which Vec_X_norm and Vec_Z_norm lie, and denote it as Vec_Y_new, as shown in the following formula:

[0062] .

[0063] After normalizing Vec_Y_new to unit vector Vec_Y_norm_new, replace the previous Vec_Y_norm value with Vec_Y_norm_new to get the new Vec_Y_norm vector, which is the corrected new Y-axis. At this time, the three unit vectors Vec_X_norm, Vec_Y_norm and Vec_Z_norm are strictly orthogonal, and the wind tunnel coordinate system correction is completed.

[0064] S012: Calculate the rotation matrix of the global point three-dimensional coordinate system of the cross-encoding calibration board to the wind tunnel coordinate system , translation vector .

[0065] To convert the global point coordinate system of the calibration board to the wind tunnel coordinate system, it is necessary to first solve the rotation matrix and translation vector .

[0066] Since the unit vectors Vec_X_norm, Vec_Y_norm and Vec_Z_norm of the three axes X, Y and Z of the wind tunnel coordinate system have been obtained, the three unit vectors Vec_X_norm, Vec_Y_norm and Vec_Z_norm are taken as column vectors to form a 3x3 matrix A, and the matrix A represents the newly established wind tunnel coordinate system. The global point coordinate system of the calibration plate is the reference coordinate system, that is, the unit matrix B, and the matrix A and the matrix B are represented as follows:

[0067]

[0068]

[0069] According to the matrix A and the matrix B, the rotation matrix R between the two coordinate systems can be obtained. wherein, is the inverse matrix of the matrix A.

[0070] In order to continue to solve the translation vector T, the coordinates of the origin O of the wind tunnel coordinate system in the global point coordinate system of the calibration plate are set as and the coordinates of the origin O in the wind tunnel coordinate system are , then the relationship between Since the origin O itself is located at the origin of the coordinate system, the coordinates of are (0, 0, 0), and the translation vector T is solved. The rotation matrix R has been obtained, and the three-dimensional coordinates of the encoding point ID_0 set when the wind tunnel coordinate system is established can be found in the global point coordinate system of the cross calibration plate, so that the translation vector T can be obtained. S013: Convert the three-dimensional coordinates of the encoding points of the cross encoding calibration plate to the wind tunnel coordinate system:

[0071] wherein, is the coordinates of the encoding point in the wind tunnel coordinate system, is the coordinates of the encoding point in the global point three-dimensional coordinate system.

[0072] Step S02 further comprises:

[0073] ​​​​​​​​S021: Place the cross-coded calibration board at the model in the wind tunnel, use the fixed main camera and auxiliary camera to double-target the cross-coded calibration board, establish a reference coordinate system in the lens imaging plane of the main camera, and use the established reference coordinate system as the camera coordinate system in the double-targeting and subsequent binocular reconstruction. After the double-targeting is completed, the internal parameters of the main camera and the internal parameters of the auxiliary camera, and the external parameters of the auxiliary camera relative to the main camera can be obtained respectively.

[0074] S022: Set the cross-coded calibration board in step S011 to be aligned with the incoming flow direction of the wind tunnel on one side of the X-axis of the wind tunnel coordinate system. Preferably, the cross-coded calibration board is placed at the middle position of the model, so that the X-axis of the wind tunnel coordinate system is parallelly aligned with the incoming flow direction of the wind tunnel, and the origin O of the wind tunnel coordinate system is at the middle position of the wind tunnel.

[0075] S023: Use the fixed main camera and auxiliary camera to collect images of the cross-coded calibration board, and then perform binocular reconstruction based on the internal parameters of the main camera and the internal parameters of the auxiliary camera, and the external parameters of the auxiliary camera relative to the main camera, to reconstruct the three-dimensional coordinates of each coded point on the cross-coded calibration board in the camera coordinate system.

[0076] Step S03 includes:

[0077] S031: Calculate the rotation matrix and the translation vector between the coded point cloud in the camera coordinate system and the coded point cloud in the wind tunnel coordinate system, and the coded point cloud includes a plurality of coded points.

[0078] In the double-targeting and binocular reconstruction, the main camera is used as the reference camera, so the coordinate system in which the three-dimensional coordinates of each coded point on the cross calibration board reconstructed in step S023 are located is a coordinate system established with the main camera as the reference.

[0079] Since the global three-dimensional coordinates of each coded point on the cross-coded calibration board in the wind tunnel coordinate system are known, the problem of solving the rotation matrix and the translation vector of the camera coordinate system to the wind tunnel coordinate system can be converted into solving the rotation matrix and the translation vector between the coded point cloud in the camera coordinate system and the coded point cloud in the wind tunnel coordinate system, based on the known three-dimensional coordinates of the coded points in the camera coordinate system and the three-dimensional coordinates of the coded points in the wind tunnel coordinate system.

[0080] The specific solving steps of the rotation matrix and the translation vector are as follows:

[0081] The camera coordinate system is corresponded to the coded point cloud in the wind tunnel coordinate system. To accurately calculate the rotation matrix and translation vector between the two point clouds, the coded points with the same ID in the two point clouds are retained, and the coded points with different IDs are removed, so that the ID values of the coded points in the two point clouds can be corresponded one by one, which is similar to the processing of the ID of the coded point to be measured in step S3.

[0082] Since the rotation matrix to be solved contains three position parameters, and the translation vector also contains three position parameters, in order to accurately calculate the rotation matrix and the translation vector, at least three non-collinear coded points with the same ID in the two point clouds are included, so as to solve the six unknown parameters in the rotation matrix and the translation vector.

[0083] The centroids of the two point clouds are calculated.

[0084] Suppose that there are N coded points in the two point clouds, the coded point cloud in the camera coordinate system is represented as , and the centroid of the point cloud is set as The three-dimensional coordinates of the coded point cloud in the wind tunnel coordinate system are represented as , and the centroid of the point cloud is set as The centroids of the two point clouds are calculated as shown in the following formula:

[0085]

[0086]

[0087] The centroids of the two point clouds are removed. The point cloud centroid removal refers to translating all points in the point cloud so that the centroid, i.e., the center point, of the point cloud is located at the origin of the coordinate system, i.e., the centroid of the coded point cloud in the camera coordinate system is translated to the origin of the camera coordinate system, and the centroid of the coded point cloud in the wind tunnel coordinate system is translated to the origin of the wind tunnel coordinate system.

[0088] The point cloud centroid removal can concentrate the coordinate values of each point in the point cloud around the origin of the coordinate system, i.e., the point cloud is distributed around the origin of the coordinate system. This processing can reduce the numerical error and calculation instability caused by the coordinate values of each point in the point cloud, and ensure that the covariance matrix between the two point clouds can be more accurately calculated in the next step, and the rotation matrix between the point clouds can be solved. The principle of the centroid removal is shown in the following formula:

[0089]

[0090] wherein is the three-dimensional coordinate point of the coded point cloud in the camera coordinate system after the centroid removal, ​​​​It is the three-dimensional coordinate point after removing the centroid in the coded point cloud in the wind tunnel coordinate system.

[0091] Compute the covariance matrix of two point clouds after removing the centroid.

[0092] After removing the centroid of all points in the two point clouds, the covariance matrix between the two point clouds is calculated using the following formula ,in, To solve the point The transpose of .

[0093] Based on the SVD singular value decomposition method, the covariance matrix is ​​decomposed to solve the orthogonal matrices U and V. The SVD decomposition formula is: .

[0094] Calculate the rotation matrix between two point clouds According to the matrices U and V obtained by the singular value decomposition in the previous step, the rotation matrix between the two point clouds can be calculated , By this formula, we can ensure that we find a , in order to minimize the mean square distance error between the two point clouds, that is, to minimize the difference between the two point clouds after alignment, so that the optimal rotation matrix can be solved .

[0095] Check the rotation matrix Since a valid rotation matrix must be a positive definite matrix, that is, the rotation matrix The determinant is 1, the matrix The following formula should be satisfied: ,and Depend on OK, and the following formula: , but since U and V are both orthogonal matrices, and 、 ,but .

[0096] like , indicating the obtained is the reflection matrix, which needs to be corrected according to the formula Adjust the sign of the last column of matrix V to ensure that the formula is satisfied .

[0097] Calculate the translation vector between two point clouds . When solving the rotation matrix After that, the two point cloud centroids calculated previously can be 、 Continue to solve the translation vector , the calculation principle is shown as follows:

[0098] ,

[0099] After the above steps, the rotation matrix of the camera coordinate system to the wind tunnel coordinate system is solved and the translation vector .

[0100] S032: Convert the three-dimensional coordinates of the coded points in the camera coordinate system to the wind tunnel coordinate system: wherein, is the coordinate of the coded point in the camera coordinate system.

[0101] In the dual target determination and reconstruction, the camera coordinate system used is the reference coordinate system established with the imaging plane of the main camera lens. After the rotation matrix and the translation vector of the camera coordinate system to the wind tunnel coordinate system are solved, the solved rotation matrix and translation vector are used to replace the original rotation matrix and translation vector of the reference coordinate system. Thereafter, the three-dimensional coordinates of the reconstructed coded points can be automatically converted from the camera coordinate system to the wind tunnel coordinate system.

[0102] After the conversion of the camera coordinate system and the wind tunnel coordinate system is completed, when the coordinate parameters of the coded points to be measured on the model are obtained, the main camera and the auxiliary camera in the binocular camera are used to respectively shoot the model and perform three-dimensional reconstruction. Since the camera coordinate system has been converted to the wind tunnel coordinate system, the three-dimensional coordinates of the coded points to be measured on the surface of the reconstructed model are also in the wind tunnel coordinate system, and thus no further processing is required.

[0103] It should be noted that the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements not only include those elements, but also include other elements not expressly listed or inherent to such processes, methods, articles, or apparatuses. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0104] In addition, it should be noted that the scope of the method in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted, or combined. In addition, the features described with reference to certain examples can be combined in other examples.

[0105] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.

Claims

1. A method for obtaining the position and posture of a model using a single camera, characterized in that: include: S1: Install multiple code points to be tested on the model; S2: Adjust the model to its initial posture so that the angle of attack, roll angle, and sideslip angle of the model are all zero; S3: Obtain the 3D coordinates of the code point to be measured in the wind tunnel coordinate system, use the main camera to capture an image of the model, obtain the 2D pixel coordinates of the code point to be measured in the image, compare the IDs of the code point to be measured corresponding to the 3D coordinates and the 2D pixel coordinates, and retain the 3D coordinates and 2D pixel coordinates of the code point to be measured with the same ID; S4: Calculate the rotation matrix from two-dimensional pixel coordinates to three-dimensional coordinates and translation vectors ; S401: Obtaining a two-dimensional pixel coordinate point set , 3D coordinate point set , At the same time, and The ID of the corresponding code point to be tested is the same, represents the total number of three-dimensional coordinates or two-dimensional pixel coordinates retained in step S3; S402: The two-dimensional pixel coordinate point set The two-dimensional pixel points in are represented as column vectors , the three-dimensional coordinate point set The three-dimensional points in are represented as column vectors ; S403: Based on the pinhole imaging model, 3D points In the camera coordinate system of the imaginary camera, it is expressed as: , where the rotation matrix and translation vectors is the external parameter of the imaginary camera; S404: Projected onto the two-dimensional image plane, we get ; S405: Use the main camera intrinsic parameter matrix Will Convert to pixel coordinates : ; S406: Reprojection error value of all points : ,in, is the actual observed two-dimensional pixel point , is the external parameter of the imaginary camera and The pixel coordinates obtained by projecting the points in the wind tunnel coordinate system onto the two-dimensional image plane ; S407: Preset 、 , by repeatedly iteratively optimizing the reprojection error value to correct and Until the reprojection error reaches a minimum, the rotation matrix at this time is obtained and translation vectors ; S5: Move the model and repeat step S3 to calculate the rotation matrix from 2D pixel coordinates to 3D coordinates and translation vectors , ,in, Indicates the Secondary mobile model; S6: Based on step S4 and and in step S5 and ,calculate 、 and 、 The relative rotation matrix between and the relative translation vector ,based on and , obtain the model's pose information and output it; S601: Calculation and ,in: , ; S602: Decomposition of relative rotation matrix , extract the Euler angles, namely the sideslip angle, angle of attack and roll angle, the values ​​of the sideslip angle, angle of attack and roll angle correspond to the first After the model is moved for the first time, the sideslip angle, angle of attack, and roll angle of the model at that location; S603: After moving the model, the three-dimensional coordinate information of the model is , , is the three-dimensional coordinate of the model in step S2 S604: Output the model's posture information, which includes the model's sideslip angle, angle of attack, and roll angle, as well as the model's three-dimensional coordinate information. ; S7: Repeat steps S5 and S6 to obtain and output the pose information of the model in real time.

2. The method for obtaining the position and posture of a model using a single camera according to claim 1, wherein: In the step S5, after repeating step S3, the following steps are further included: Repeat steps S401 to S406, and set 、 , by repeatedly iteratively optimizing the reprojection error value to correct and Until the reprojection error reaches a minimum, the rotation matrix at this time is obtained and translation vectors .

3. The method for obtaining the position and posture of a model using a single camera according to claim 1, wherein: Before step S1, the following steps are also included: S01: Establish a wind tunnel coordinate system based on the cross-coding calibration plate, and obtain the three-dimensional coordinates of each coding point on the cross-coding calibration plate in the wind tunnel coordinate system; S02: Establish a camera coordinate system based on the main camera and the auxiliary camera, and obtain the three-dimensional coordinates of each coding point on the cross coding calibration plate in the camera coordinate system; S03: Convert the camera coordinate system to the wind tunnel coordinate system.

4. The method for obtaining the position and posture of a model using a single camera according to claim 3, wherein: The step S01 further includes: S011: Take the center of a certain coding point on the cross-coding calibration plate as the origin O of the wind tunnel coordinate system, take the horizontal side of the cross-coding calibration plate as the X-axis of the wind tunnel coordinate system, and calibrate the Y-axis with the X-axis as the reference to ensure that the X-axis and Y-axis are set orthogonally; S012: Calculate the rotation matrix from the global point 3D coordinate system of the cross-encoded calibration plate to the wind tunnel coordinate system , translation vector ; S013: Convert the three-dimensional coordinates of the coding points on the cross coding calibration plate to the wind tunnel coordinate system: ,in, is the coordinate of the coding point in the wind tunnel coordinate system, is the coordinate of the encoding point in the global three-dimensional coordinate system.

5. The method for obtaining the position and posture of a model using a single camera according to claim 4, wherein: The step S02 further includes: S021: Place a cross-coded calibration plate on the model in the wind tunnel. Use a fixed main camera and auxiliary camera to perform dual-target calibration on the cross-coded calibration plate. Establish a reference coordinate system on the main camera's lens imaging plane. Obtain the main camera's intrinsic parameters, the auxiliary camera's intrinsic parameters, and the auxiliary camera's extrinsic parameters relative to the main camera. S022: setting the cross-coded calibration plate in step S011 so that one side of the X-axis of the wind tunnel coordinate system is aligned with the incoming flow direction of the wind tunnel; S023: Use a fixed main camera and auxiliary camera to capture images of the cross-coded calibration plate, and then perform binocular reconstruction based on the intrinsic parameters of the main camera, the intrinsic parameters of the auxiliary camera, and the extrinsic parameters of the auxiliary camera relative to the main camera to reconstruct the three-dimensional coordinates of each coding point on the cross-coded calibration plate in the camera coordinate system.

6. The method for obtaining the position and posture of a model using a single camera according to claim 5, wherein: The step S03 includes: S031: Calculate the rotation matrix between the coded point cloud in the camera coordinate system and the coded point cloud in the wind tunnel coordinate system and translation vectors ,The coded point cloud includes multiple coded points; S032: Convert the 3D coordinates of the coded points in the camera coordinate system to the wind tunnel coordinate system: ,in, The coordinates of the encoding point in the camera coordinate system.

7. The method for obtaining the position and posture of a model using a single camera according to claim 5, wherein: In step S022, the cross coding calibration plate is placed in the middle of the model.

8. The method for obtaining the position and posture of a model using a single camera according to claim 1, wherein: In step S3, the code points to be tested corresponding to the three-dimensional coordinates or the two-dimensional pixel coordinates include at least three non-collinear code points to be tested.

Citation Information

Patent Citations

  • Video measuring system and measuring method for model gestures in high-speed wind tunnel

    CN103364171A

  • Aircraft three-dimensional surface flow distribution wind tunnel measurement method

    CN108398229A