Pose parameter measurement method and device, equipment and storage medium

By combining the EDCA ellipse detection algorithm with the SQPnP algorithm, the L-M algorithm is used to optimize the pose parameters, which solves the problem of positioning error of the center point of the circular feature, and significantly improves the accuracy of pose measurement.

CN119048595APending Publication Date: 2024-11-29BEIJING INST OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411143356.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The prior art measures the center point positioning of the circular feature and spatial pose solution when the spatial pose center is positioned and spatial pose solving, resulting in a relative spatial pose error between the target and the camera, affecting the accuracy of the measurement results.

Method used

The EDCA ellipse detection algorithm and SQPnP algorithm are used to solve the initial value of the pose parameter, and the model function is established based on the spatial circle imaging model, and the objective function is minimized through the L-M algorithm, the pose parameter is optimized, the system error is reduced, and the accuracy of the pose solution is improved. .

Benefits of technology

By minimizing the projected ellipse center residual, the accuracy of pose solution is improved, the position error is reduced by 49.87%, and the normal vector and roll angle errors are reduced by 82.93% and 89.68%, respectively, which significantly improves the accuracy of the measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_2
    Figure SMS_2
  • Figure SMS_3
    Figure SMS_3
Patent Text Reader

Abstract

The invention discloses a pose parameter measurement method, device and equipment and a storage medium, and the method comprises the steps: obtaining a mark image, and solving a pose parameter initial value based on an EDCA ellipse detection algorithm and an SQPnP algorithm; establishing a model function based on a space circle imaging model; constructing a target function according to the model function and the pose parameter initial value; and minimizing the objective function based on an L-M algorithm to obtain an optimized pose parameter. According to the method provided by the invention, when the pose of the mark is measured, the problem of low measurement accuracy caused by deviation between the projection ellipse center of the space circle and the projection point of the center of the space circle can be reduced. And the accuracy of pose calculation is obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and more specifically, to a method, device, equipment and storage medium for measuring posture parameters. Background Art

[0002] According to the linear camera imaging model, in general, the projection of a spatial circle on the camera imaging plane is an ellipse, and after the center of the spatial circle is transformed onto the imaging plane through perspective projection, its position does not directly correspond to the center of mass of the ellipse.

[0003] In the current general circular feature center point positioning and spatial pose solution algorithms, the centroid of the spatial circle projection ellipse is often used as the projection of the spatial circle center for spatial pose solution, which introduces errors in the relative spatial pose between the target and the camera.

[0004] Therefore, when performing posture measurement based on marking features, how to reduce errors and improve the accuracy of measurement results is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0005] The embodiments of the present application provide a posture parameter measurement method, device, equipment and storage medium to at least solve the technical problem of low accuracy of posture measurement results in the related art.

[0006] According to one aspect of an embodiment of the present application, a posture parameter measurement method is provided, including:

[0007] Obtain the marker image and solve the initial values ​​of the pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm;

[0008] Establish model functions based on the space circle imaging model;

[0009] Constructing an objective function according to the model function and the initial values ​​of the posture parameters;

[0010] The objective function is minimized based on the LM algorithm to obtain the optimized posture parameters.

[0011] In an optional embodiment, solving the initial values ​​of the pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm includes:

[0012] Based on the EDCA ellipse detection algorithm, the projected ellipse feature of the mark is detected and the ellipse centroid is extracted to obtain the pixel coordinates of the detected projected ellipse centroid;

[0013] Obtain the target coordinates of the center of the plane feature circle of the marked image;

[0014] The pixel coordinates of the centroid of the projected ellipse and the target coordinates of the center of the plane feature circle are combined into a 3D-2D point pair;

[0015] Based on the SQPnP algorithm, the relative spatial pose of the 3D-2D point pair is solved to obtain the initial values ​​of the pose parameters.

[0016] In an optional embodiment, a model function is established based on a spatial circle imaging model, including:

[0017] Based on the spatial circle imaging model, the equation set containing the pixel coordinates of the centroid of the reprojected ellipse and the pose parameters is analytically obtained;

[0018] The set of equations including the pixel coordinates of the centroid of the reprojected ellipse and the pose parameters is used as the model function.

[0019] In an optional embodiment, constructing an objective function according to the model function and the initial values ​​of the pose parameters includes:

[0020] According to the model function and the initial values ​​of the pose parameters, the pixel coordinates of the centroid of the reprojected ellipse are obtained;

[0021] The residual sum of squares between the reprojected ellipse centroid pixel coordinates and the detected projected ellipse centroid pixel coordinates is used as the objective function.

[0022] In an optional embodiment, minimizing the objective function based on the LM algorithm to obtain optimized posture parameters includes:

[0023] Iteratively optimizing the posture parameters using the LM algorithm;

[0024] When the number of iterations exceeds the upper limit of the number of iterations; or the objective function value is less than the preset first threshold; or the parameter increment is less than the preset second threshold; or the gradient descent is less than the preset third threshold; the iteration is terminated to obtain the optimized posture parameters.

[0025] In an optional embodiment, the LM algorithm is used to iteratively optimize the posture parameters, including:

[0026] forming a residual vector according to the pixel coordinates of the centroid of the reprojected ellipse and the pixel coordinates of the centroid of the detected projected ellipse;

[0027] Calculate the Jacobian matrix of the current residual vector;

[0028] Obtaining an increment of a posture parameter based on the Jacobian matrix;

[0029] Calculate the ratio of the actual drop value and the predicted drop value of the objective function;

[0030] When the ratio is greater than 0, the posture parameters are updated according to the increment of the posture parameters. When the ratio is less than or equal to 0, the posture parameters are not updated.

[0031] According to another aspect of an embodiment of the present application, a posture parameter measurement device is also provided, including:

[0032] The initial pose solving module is used to obtain the marker image and solve the initial values ​​of pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm;

[0033] A model function building module, used for building a model function based on a space circle imaging model;

[0034] An objective function construction module, used to construct an objective function according to the model function and the initial values ​​of the posture parameters;

[0035] The parameter optimization module is used to minimize the objective function based on the LM algorithm to obtain optimized posture parameters.

[0036] In an optional embodiment, the initial pose solving module is used to detect the projected ellipse features of the mark based on the EDCA ellipse detection algorithm and extract the center of mass of the ellipse to obtain the pixel coordinates of the detected center of mass of the projected ellipse; obtain the target coordinates of the center of mass of the plane feature circle of the marked image; combine the pixel coordinates of the detected center of mass of the projected ellipse and the target coordinates of the center of the plane feature circle to form a 3D-2D point pair; perform relative spatial pose solving on the 3D-2D point pair based on the SQPnP algorithm to obtain the initial value of the pose parameters.

[0037] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the posture parameter measurement method through the computer program.

[0038] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned posture parameter measurement method when running.

[0039] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0040] The technical solution provided in the embodiment of the present application first uses the EDCA ellipse detection algorithm and the SQPnP algorithm to solve the initial values ​​of the pose parameters, then constructs a model function and an optimization objective function, performs iterative optimization based on the LM algorithm, and obtains the optimized pose parameters. After solving the pose parameters by the SQPnP algorithm, the present application also includes further optimization of the parameters to reduce the system error and improve the accuracy of the pose solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0042] Figure 1 is a flowchart of an optional posture parameter measurement method according to an embodiment of the present application;

[0043] Figure 2 is a flow chart of a posture parameter measurement method according to an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of an EDCA ellipse detection method according to an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of a posture parameter measurement device according to an embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0049] In actual visual measurement scenarios, the projection coordinates of the center of the space circle cannot be obtained by detection, and the center of mass of the projected ellipse can only be located by the ellipse detection algorithm. In the process of using the PnP algorithm to solve the pose parameters, the positioning result of the center of mass of the projected ellipse is used as the projection of the center of the space circle. Therefore, there is a deviation between the positioning result of the center of mass of the ellipse and the center of mass of the reprojected ellipse according to the pose parameter solution. By minimizing the Euclidean distance between the two, the pose solution can be made more consistent with the imaging model, thereby improving the accuracy of the solution. Therefore, by studying the perspective projection model of the space circle, a residual model of the center pixel coordinates of the reprojected ellipse of the space circle and the actual detection value is constructed, and the residual sum of squares is used as the objective function. The embodiment of the present application proposes a pose parameter optimization algorithm based on minimizing the residual of the center of the projected ellipse.

[0050] The coordinate system used in the embodiment of the present application is explained below:

[0051] (1) World coordinate system (O w -X w Y w Z w ): The world coordinate system is usually fixed and is used as a global coordinate system to describe the position and posture of objects in the scene.

[0052] (2) Camera coordinate system (O c -X c Y c Z c ): The origin Oc of the camera coordinate system is located at the optical center of the camera. The Z axis is usually defined as the camera optical axis and points to the shooting direction of the camera. The Xc axis and Yc axis are usually defined as the horizontal and vertical directions of the camera image plane.

[0053] (3) Target coordinate system (O-XYZ): The target coordinate system is a coordinate system established based on a specific object. Usually, its origin is located at the center of the object or a special marking point.

[0054] (4) Image coordinate system (o-xy): The origin of the image coordinate system is located at the intersection of the optical axis and the sensor plane, that is, the principal point. The x-axis is parallel to the horizontal direction of the sensor, and the y-axis is parallel to the vertical direction of the sensor.

[0055] (5) Pixel coordinate system (o'-uv): The pixel coordinate system is similar to the image coordinate system, but its coordinate values ​​are scaled and expressed in pixels to match the actual pixel size of the image. Usually, its origin is set at the first pixel in the upper left corner of the image, the u axis is parallel to the horizontal direction of the image, and the v axis is parallel to the vertical direction of the image.

[0056] The following is combined with Figure 1 The posture parameter measurement method of the embodiment of the present application is described in detail. Figure 1 As shown, the method mainly includes the following steps:

[0057] S101 obtains the marker image and solves the initial values ​​of the pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm.

[0058] In an exemplary scenario of the present application, pose measurement is performed based on the generated markers. The features of the marker image are circular features. For example, the marker layout is in the shape of nested square frames, and each nested layer contains multiple feature circles, and the multiple feature circles are arranged in a square array.

[0059] The projection coordinates of the center of a space circle cannot be obtained by detection. The projection of a space circle is an ellipse, and the center of mass of the projected ellipse can only be located by an ellipse detection algorithm.

[0060] Furthermore, the initial values ​​of the pose parameters are solved based on the EDCA ellipse detection algorithm and the SQPnP algorithm.

[0061] Specifically, based on the EDCA ellipse detection algorithm, the projected ellipse feature of the mark is detected and the ellipse centroid is extracted to obtain the pixel coordinates of the detected projected ellipse centroid.

[0062] like Figure 3 As shown, the steps of the EDCA ellipse detection algorithm include:

[0063] 1. Arc segment extraction, including edge detection, corner point detection and arc segment screening. The eight-neighborhood algorithm is used to extract continuous edge contours from the binary edge image, and then the corner point detection algorithm is used to detect corner points along each contour line, and the contour line is segmented according to the corner points to obtain a set of contour lines with smooth curvature. Based on curvature analysis, contours similar to elliptical arc segments are detected to obtain the screened elliptical arc segments.

[0064] 2. Generate arc segment combinations, including arc segment matching and arc segment combination. Match all possible ellipse arc segments to determine whether these arc segment combinations are different parts of the same ellipse, and calculate the matching matrix.

[0065] 3. Generation and verification of candidate ellipse sets. This includes candidate ellipse set generation, candidate set significance scoring, screening and verification. Through the matching matrix, all possible ellipse arc segment combinations are generated and ellipse fitting is performed to obtain candidate ellipses. Next, the candidate ellipses are screened based on a special screening strategy to obtain the final ellipse detection result. The screening strategy is set according to the actual situation and will not be described in detail in the embodiments of this application.

[0066] The projected ellipse feature of the marker is detected and the centroid is extracted by the EDCA algorithm to obtain the pixel coordinates of the centroid of the projected ellipse.

[0067] Furthermore, the target coordinates of the center of the plane feature circle of the marked image are obtained. The target coordinates of the plane feature circle in the target coordinate system are known. The pixel coordinates of the detected center of mass of the projected ellipse and the target coordinates of the center of the plane feature circle are combined into a 3D-2D point pair. According to the previous conclusion, the target coordinates of the known spatial center do not correspond to the pixel coordinates of the center of mass of the projected ellipse, and the pixel coordinates of the projection of the center of the spatial circle cannot be obtained by detection. Therefore, the coordinates of the center of mass of the ellipse are approximated as the coordinates of the projection of the center of the spatial circle and form a 3D-2D point pair. The relative spatial pose of the 3D-2D point pair is solved based on the SQPnP algorithm to obtain the initial values ​​of the pose parameters.

[0068] Specifically, the approximated 3D-2D point pairs are solved for relative spatial pose by the SQPnP algorithm to obtain the rotation matrix R and translation vector T between the camera coordinate system and the target coordinate system, which are further decomposed to obtain the 6-DOF pose parameter T X 、T Y 、T Z ,θ X ,θ Y and θ Z .

[0069] Specifically, it can be solved according to the following formula:

[0070] The target coordinates are converted to the camera coordinates in the camera coordinate system. This step can be described by a rotation transformation matrix R and a translation vector T.

[0071]

[0072] Where R is a 3×3 orthogonal unit matrix and T is a three-dimensional translation vector, which is in the form of:

[0073]

[0074] The rotation matrix R can be described in the form of Euler angles. Let the three Euler angles be θ X ,θ Y and θ Z . They represent the angles of the target's external rotation around the X, Y, and Z axes of the camera coordinate system according to the right-hand screw rule. The order of the target's rotation around the camera coordinate axis is specified as XYZ, then this form of rotation is equivalent to the target's internal rotation around the Z, Y, and X axes of the target coordinate system according to the right-hand screw rule. The rotation matrix R is used to describe the relative posture between the target coordinate system and the camera coordinate system after such a rotation, as well as the transformation relationship between the coordinate values ​​of the same spatial point in the two coordinate systems. After the above provisions, R can be expressed as follows:

[0075]

[0076] According to the above formula, we can solve the 6-DOF posture parameter T X 、T Y 、T Z ,θ X ,θ Y and θ Z .

[0077] S102 establishes a model function based on the space circle imaging model.

[0078] In an optional embodiment, a model function is established based on a spatial circular imaging model, including: based on the spatial circular imaging model, analyzing and obtaining a set of equations containing the pixel coordinates of the center of mass of the reprojected ellipse and the posture parameters; and using the set of equations containing the pixel coordinates of the center of mass of the reprojected ellipse and the posture parameters as the model function.

[0079] For the optimization of the relative pose parameters between the target coordinate system and the camera coordinate system, let the parameter vector p p for

[0080]

[0081] According to the ellipse detection algorithm, the center of mass of the projected ellipse is known. However, in the process of solving the initial value of the pose parameters using the PnP algorithm, the positioning result of the center of mass of the projected ellipse is approximated as the projection coordinates of the center of the space circle. Therefore, there is a deviation between the positioning result of the center of mass of the ellipse and the center of mass of the reprojected ellipse. The equation group for solving the pixel coordinates of the center of mass of the reprojected ellipse is used as the model function, the target coordinates of the known space circle are used as the independent variable, and the pixel coordinates of the center of mass of the detected ellipse are used as the known data points.

[0082] In order to establish the model function p e,i According to the previous linear camera imaging model and the space circle projection model, for the space point P in the target coordinate system and its projection point p on the image plane, we can get:

[0083]

[0084] Where s represents the scale factor, M in represents the camera internal parameter matrix, the rotation matrix R is represented by three column vectors, and T represents the translation vector. According to the definition of the target coordinate system, the Z coordinate of any spatial point on the marker plane is 0, which can be further expressed as:

[0085]

[0086] Assume the homography matrix H is:

[0087] H=M in [r X rY T]

[0088] Where, the homography matrix H is a 3×3 projection matrix containing the camera's internal and external parameters, which describes the general linear transformation relationship between two planes. Then, the coordinate relationship between the spatial point P in the target coordinate system and its projection point p on the image plane can be simply described as

[0089]

[0090] Consider the parametric equation of the space circle on the marking plane in the target coordinate system. Since the Z coordinates of all space points on the marking plane are 0, let the center of the space circle P c The target coordinates of (α, β, 0) T , then the target coordinates of any point Q on the space circle are (X, Y, 0) T satisfy:

[0091] (X-α) 2 +(Y-β) 2 =γ 2

[0092] Where γ is the radius of the space circle. The center of the space circle P c The homogeneous coordinates of any point Q on the sum circle in the target coordinate system can be expressed as:

[0093]

[0094] and

[0095]

[0096] Let the parameter matrix of the space circle be M c , which is expressed as follows:

[0097]

[0098] Then, the center P c The matrix of any point Q on the circle is described as:

[0099]

[0100] and

[0101]

[0102] Let the center of the circle be P c The projection point on the image plane is p c , its homogeneous coordinates can be expressed as follows:

[0103]

[0104] According to the linear camera imaging model,

[0105] It can be deduced that p c The pixel coordinates are:

[0106]

[0107] Space Circle M c The projection on the image plane is an ellipse. Let the parametric equation of the projected ellipse in the pixel coordinate system be:

[0108] Au 2 +Bv 2 +Cuv+Du+Ev+1=0

[0109] Among them, (u,v) T is the pixel coordinate of the projection point q of the spatial point Q on the pixel plane, and its homogeneous coordinates are expressed as follows:

[0110]

[0111] Let the parameter matrix of the projection ellipse be M e , which is expressed as follows:

[0112]

[0113] Then, the matrix description of the projection point q on the projection ellipse can be described by the following formula:

[0114]

[0115] Let the centroid of the projected ellipse p e The pixel coordinates are (u e ,v e ) T , then its homogeneous coordinates are expressed as follows:

[0116]

[0117] According to the geometric properties of the ellipse, the relationship between the centroid coordinates of the ellipse and the ellipse parameters is as follows:

[0118]

[0119] According to the linear camera imaging model and the spatial circular perspective projection model, it can be deduced that:

[0120]

[0121] Among them, since we only consider the case where the spatial circle is projected into an ellipse, and do not consider the special case where the projection of the marker plane on the image plane degenerates into a straight line, the homography matrix H must be full rank, so there must be an inverse matrix H -1 , so that:

[0122] H -1 H=I

[0123] To sum up, the model function p e,i It can be expressed in the form of f(p,x):

[0124]

[0125] Among them, (u e,i ,v e,i ) T It represents the pixel coordinates of the ellipse centroid obtained by reprojecting the initial value of the spatial circle imaging model and the homography matrix H, and is calculated according to the following formula.

[0126]

[0127] x i represents the i-th group of independent variables, that is, the target coordinates of the center of the i-th space circle, and its specific form is as follows:

[0128]

[0129] Data point p d,i Represents the pixel coordinates of the detected projected ellipse centroid, and its specific form is as follows:

[0130]

[0131] S103 constructs an objective function based on the model function and the initial values ​​of the posture parameters.

[0132] In an optional embodiment, an objective function is constructed according to the model function and the initial values ​​of the pose parameters, including: solving the pixel coordinates of the center of mass of the reprojected ellipse according to the model function and the initial values ​​of the pose parameters; and taking the residual sum of squares of the pixel coordinates of the center of mass of the reprojected ellipse and the detected pixel coordinates of the center of mass of the projected ellipse as the objective function.

[0133] According to the ellipse detection algorithm, the center of mass of the projected ellipse is known. However, in the process of solving the initial value of the pose parameters using the PnP algorithm, the positioning result of the center of mass of the projected ellipse is approximated as the projection coordinates of the center of the space circle. Therefore, there is a deviation between the positioning result of the center of mass of the ellipse and the center of mass of the reprojected ellipse. By using the equations for solving the pixel coordinates of the center of mass of the reprojected ellipse as the model function, the target coordinates of the known space circle as the independent variable, and the pixel coordinates of the detected center of mass of the ellipse as the known data point, the parameter vector p is optimized by minimizing the Euclidean distance between the pixel coordinates of the center of mass of the reprojected ellipse and the pixel coordinates of the detected center of mass of the ellipse. p , then the objective function is established as:

[0134]

[0135] Where N is the number of space circles detected in the marker; p e,i represents the pixel coordinates of the centroid of the i-th reprojected ellipse; p d,i Represents the pixel coordinates of the centroid of the i-th detected ellipse.

[0136] S104 minimizes the objective function based on the LM algorithm to obtain optimized posture parameters.

[0137] The LM algorithm is a commonly used algorithm for least squares estimation of regression parameters in nonlinear regression. It combines the advantages of the gradient descent method and the Gauss-Newton method and has good stability and convergence speed when facing nonlinear problems. Therefore, the LM algorithm is used to optimize the posture parameters.

[0138] Specifically, the LM algorithm is used to iteratively optimize the pose parameters.

[0139] A residual vector is formed based on the pixel coordinates of the reprojected ellipse centroid and the detected pixel coordinates of the projected ellipse centroid; the Jacobian matrix of the current residual vector is calculated; the increment of the pose parameters is obtained based on the Jacobian matrix; the ratio of the actual descent value of the objective function to the predicted descent value is calculated; when the ratio is greater than 0, the pose parameters are updated according to the increment of the pose parameters, and when the ratio is less than or equal to 0, the pose parameters are not updated.

[0140] Specifically, for the kth iteration, according to the spatial circle imaging model, the kth iteration value of the known spatial circle center target coordinates and the 6-DOF pose parameters (the first iteration uses the initial value) is used to calculate the centroid pixel coordinates of the reprojected ellipse [u e,i,k ,v e,i,k ] T , and at the same time obtain the residual vector [u e,i,k -u d,i ,v e,i,k -v d,i ] T.

[0141] For the kth iteration, calculate the Jacobian matrix J of the current residual vector:

[0142]

[0143] Among them, r u,i and r v,i is the residual vector r i The two elements of , their specific forms are as follows:

[0144]

[0145] Calculate the increment of pose parameters:

[0146] (J T J+λI)Δp=-J T r

[0147] Among them, I represents the unit matrix; △p represents the update amount of the parameter vector p; r represents the vector composed of the current residuals; λ is a non-negative algorithm adjustment parameter, which represents the damping factor, which is used to adjust the balance of the algorithm between the Gauss-Newton method and the gradient descent method.

[0148] Furthermore, in the process of iterative optimization of the parameter vector p, whether to add an increment △p to p is determined by the trust region algorithm. Let the ratio of the actual decrease value of the objective function to the predicted decrease value be ρ, which is specifically expressed as follows:

[0149]

[0150] The strategy for adding an increment △p to the parameter vector p is: when ρ>0, add an increment △p to p; when ρ≤0, p remains unchanged.

[0151] Repeat the above steps. When the number of iterations k exceeds the upper limit k of the number of iterations max , or when one of the objective function, parameter increment, and gradient descent is less than a certain threshold, the iteration is terminated. Suppose the four thresholds that control the termination of the LM algorithm are k max , ε 1 , ε 2 and ε 3 , then its four termination conditions can be expressed by the formula as follows.

[0152] Condition 1. The number of iterations k exceeds kmax:

[0153] k>k max

[0154] Condition 2. At the kth iteration, the objective function is less than ε 1 :

[0155]

[0156] Condition 3. At the kth iteration, the parameter increment is less than ε 2 :

[0157] ||Δp k ||<ε 2

[0158] Condition 4. At the kth iteration, the gradient descent value is less than ε 3 :

[0159] ||J T r k ||<ε 3

[0160] When the LM algorithm terminates the iteration according to the given conditions, the optimal value p of the parameter vector is finally obtained. p,opt :

[0161]

[0162] According to this method, optimized posture parameters can be obtained.

[0163] In order to facilitate understanding of the method provided in the embodiment of the present application, Figure 2 Further description:

[0164] First, obtain the target coordinates of the center of the marked circle feature [α i ,β i ] T , get the pixel coordinate detection value of the ellipse center [u d,i ,v d,i ] T .

[0165] Furthermore, 3D-2D point pairs are formed, and the initial values ​​of the 6-DOF pose parameters are obtained through PnP solution [T X ,T Y ,T Z ,θ X ,θ Y ,θ Z ] T .

[0166] Further, calculate the pixel coordinates of the center of the reprojected ellipse [u e,i,k ,v e,i,k ] T . And calculate the residual vector [u e,i,k -u d,i ,v e,i,k -v d,i ] T .

[0167] Further, the Jacobian matrix J is calculated, and the parameter increment △p p,k and the ratio ρ.

[0168] Further, determine whether the ratio ρ is greater than 0. If it is greater than 0, execute p p,k+1 =p p,k +△p p,k , if it is less than or equal to 0, execute p p,k+1 =p p,k .

[0169] Furthermore, it is determined whether the termination condition is met. If so, the iteration is stopped to obtain the final optimized value of the pose parameters. If not, the calculation of the center pixel coordinates of the reprojected ellipse [u e,i,k ,v e,i,k ] T . And calculate the residual vector [u e,i,k -u d,i ,v e,i,k -v d,i ] T steps.

[0170] This application clarifies the difference between the projection of the center of a space circle and the center of mass of an ellipse projected by a space circle. The EDCA ellipse detection algorithm and the SQPnP algorithm are used to obtain the 6-degree-of-freedom relative pose parameters between the marker and the camera as the initial result. Next, based on the analysis of the perspective projection model of the space circle, the parameter equation of the space circle is transformed into the image plane through the linear camera imaging model, and the mapping relationship between the space circle and the projected ellipse is constructed, and then the residual model of the center of mass of the reprojected ellipse of the space circle and the center of mass of the ellipse obtained by the actual detection is constructed, and the Euclidean norm of the minimized residual is used as the objective function. The final 6-degree-of-freedom pose parameters are obtained by minimizing the objective function using the LM algorithm. Simulation experiments have proved that the proposed algorithm reduces the position error by 49.87%, the normal vector and roll angle errors by 82.93% and 89.68% respectively, significantly improving the accuracy of pose solution.

[0171] According to another aspect of the embodiment of the present application, a posture parameter measurement device for implementing the above posture parameter measurement method is also provided. Figure 4 As shown, the device comprises:

[0172] An initial pose solving module 401 is used to obtain a marker image and solve initial pose parameters based on an EDCA ellipse detection algorithm and an SQPnP algorithm;

[0173] A model function building module 402 is used to build a model function based on a space circle imaging model;

[0174] An objective function construction module 403 is used to construct an objective function according to the model function and the initial values ​​of the posture parameters;

[0175] The parameter optimization module 404 is used to minimize the objective function based on the LM algorithm to obtain optimized posture parameters.

[0176] In an optional embodiment, an initial pose solving module is used to detect the projected ellipse features of the mark and extract the ellipse center of mass based on the EDCA ellipse detection algorithm to obtain the pixel coordinates of the detected projected ellipse center of mass; obtain the target coordinates of the center of mass of the plane feature circle of the marked image; combine the pixel coordinates of the detected projected ellipse center of mass and the target coordinates of the center of the plane feature circle to form a 3D-2D point pair; perform relative spatial pose solving on the 3D-2D point pair based on the SQPnP algorithm to obtain the initial values ​​of the pose parameters.

[0177] It should be noted that the posture parameter measurement device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when executing the posture parameter measurement method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the posture parameter measurement device provided in the above embodiment belongs to the same concept as the posture parameter measurement method embodiment. The implementation process is detailed in the method embodiment, which will not be repeated here.

[0178] According to another aspect of an embodiment of the present application, an electronic device corresponding to the posture parameter measurement method provided in the aforementioned embodiment is also provided to execute the above-mentioned posture parameter measurement method.

[0179] Please refer to Figure 5 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 5 As shown, the electronic device includes: a processor 500, a memory 501, a bus 502 and a communication interface 503, and the processor 500, the communication interface 503 and the memory 501 are connected via the bus 502; the memory 501 stores a computer program that can be run on the processor 500, and when the processor 500 runs the computer program, it executes the posture parameter measurement method provided in any of the aforementioned embodiments of the present application.

[0180] The memory 501 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0181] The bus 502 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 501 is used to store programs, and the processor 500 executes the program after receiving the execution instruction. The posture parameter measurement method disclosed in any implementation of the above-mentioned embodiment of the present application can be applied to the processor 500, or implemented by the processor 500.

[0182] The processor 500 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 500. The above processor 500 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and completes the steps of the above method in combination with its hardware.

[0183] The electronic device provided in the embodiment of the present application and the posture parameter measurement method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0184] According to another aspect of the embodiments of the present application, a computer-readable storage medium corresponding to the posture parameter measurement method provided in the aforementioned embodiments is also provided, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the posture parameter measurement method provided in any of the aforementioned embodiments.

[0185] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0186] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the posture parameter measurement method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0187] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0188] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.

Claims

1. A method for measuring posture parameters, characterized in that: include: Obtain the marker image and solve the initial values ​​of the pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm; Establish model functions based on the space circle imaging model; Constructing an objective function according to the model function and the initial values ​​of the posture parameters; The objective function is minimized based on the LM algorithm to obtain the optimized posture parameters.

2. The method according to claim 1, characterized in that The initial values ​​of the pose parameters are solved based on the EDCA ellipse detection algorithm and the SQPnP algorithm, including: Based on the EDCA ellipse detection algorithm, the projected ellipse feature of the mark is detected and the ellipse centroid is extracted to obtain the pixel coordinates of the detected projected ellipse centroid; Obtain the target coordinates of the center of the plane feature circle of the marked image; The pixel coordinates of the centroid of the projected ellipse and the target coordinates of the center of the plane feature circle are combined into a 3D-2D point pair; Based on the SQPnP algorithm, the relative spatial pose of the 3D-2D point pair is solved to obtain the initial values ​​of the pose parameters.

3. The method according to claim 1, characterized in that The model function is established based on the space circle imaging model, including: Based on the spatial circle imaging model, the equation set containing the pixel coordinates of the centroid of the reprojected ellipse and the pose parameters is analytically obtained; The set of equations including the pixel coordinates of the centroid of the reprojected ellipse and the pose parameters is used as the model function.

4. The method according to claim 1, characterized in that: According to the model function and the initial values ​​of the pose parameters, an objective function is constructed, including: According to the model function and the initial values ​​of the pose parameters, the pixel coordinates of the centroid of the reprojected ellipse are obtained; The residual sum of squares between the reprojected ellipse centroid pixel coordinates and the detected projected ellipse centroid pixel coordinates is used as the objective function.

5. The method according to claim 4, characterized in that Based on the LM algorithm, the objective function is minimized to obtain the optimized posture parameters, including: Iteratively optimizing the posture parameters using the LM algorithm; When the number of iterations exceeds the upper limit of the number of iterations; or the objective function value is less than the preset first threshold; or the parameter increment is less than the preset second threshold; or the gradient descent is less than the preset third threshold; the iteration is terminated to obtain the optimized posture parameters.

6. The method according to claim 5, characterized in that The LM algorithm is used to iteratively optimize the posture parameters, including: forming a residual vector according to the pixel coordinates of the centroid of the reprojected ellipse and the pixel coordinates of the centroid of the detected projected ellipse; Calculate the Jacobian matrix of the current residual vector; Obtaining an increment of a posture parameter based on the Jacobian matrix; Calculate the ratio of the actual drop value and the predicted drop value of the objective function; When the ratio is greater than 0, the posture parameters are updated according to the increment of the posture parameters. When the ratio is less than or equal to 0, the posture parameters are not updated.

7. A posture parameter measurement device, characterized in that: include: The initial pose solving module is used to obtain the marker image and solve the initial values ​​of pose parameters based on the EDCA ellipse detection algorithm and the SQPnP algorithm; A model function building module, used for building a model function based on a space circle imaging model; An objective function construction module, used to construct an objective function according to the model function and the initial values ​​of the posture parameters; The parameter optimization module is used to minimize the objective function based on the LM algorithm to obtain optimized posture parameters.

8. The device according to claim 7, characterized in that The initial pose solving module is used to detect the projected ellipse features of the mark based on the EDCA ellipse detection algorithm and extract the ellipse center of mass to obtain the pixel coordinates of the detected projected ellipse center of mass; obtain the target coordinates of the center of the plane feature circle of the marked image; form a 3D-2D point pair with the pixel coordinates of the detected projected ellipse center of mass and the target coordinates of the center of the plane feature circle; perform relative spatial pose solving on the 3D-2D point pair based on the SQPnP algorithm to obtain the initial value of the pose parameter.

9. An electronic device, characterized in that: It comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the posture parameter measurement method as described in any one of claims 1 to 6 when executing the program instructions.

10. A computer-readable medium, characterized in that Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by a processor to implement a posture parameter measurement method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Aircraft pose measurement method and device based on multi-feature fusion, medium and product

    CN122289390A

  • An aircraft pose measurement method, device, medium and product based on multi-feature fusion

    CN122289390B