Method for inverting attitude angle error based on homography matrix and misalignment calibration method

CN122920979APending Publication Date: 2026-10-16CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611417089.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

该方案不涉及对此类误差的建模,其通用的相机运动模型与“自感知”逻辑,无法满足对“测量基准”进行在线标定的需求

Benefits of technology

在干涉检测的元件对准过程中,采用视觉辅助获取工件几何失调量时,需要严格约束标定板位姿,但在标定板装调过程中,不可避免地会存在标定板安装姿态偏差,现有技术需要通过复杂机械调校或外部姿态传感器尽可能抑制安装姿态偏差,但该过程不仅操作复杂耗时,并且还存在装调残差,无法完全消除安装姿态偏差,导致最终对准结果仍受标定板安装姿态偏差影响。为抑制标定板安装姿态偏差对于失调量和对准结果的影响,本发明将定板安装姿态偏差分解为标定板绕平面法线的旋转角和绕横轴的倾斜角,基于旋转角和倾斜角的综合效应建立姿态偏差模型;并在线实时分解单应性矩阵,解算标定板绕平面法线的旋转角和绕横轴的倾斜角,基于所建立的姿态偏差模型,利用解算出的旋转角和倾斜角对原始的图像测量值进行实时几何校正,从而补偿因安装姿态偏差引入的投影畸变,最终获得高保真的真实几何失调量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122920979A_ABST
    Figure CN122920979A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of interference detection, and specifically provides a method for inverting attitude angle error based on a homography matrix and a misalignment calibration method. First, attitude deviation of a calibration plate relative to a reference measurement plane is decomposed into in-plane rotation deviation and out-of-plane tilt deviation, and an attitude deviation model is constructed. A homography matrix is obtained based on pixel coordinates and physical coordinates, a rotation matrix is estimated based on the homography matrix, noise in the rotation matrix is removed through singular value decomposition, a rotation angle and a tilt angle of each axis position calibration plate are calculated based on matrix elements of the optimal rotation matrix, and misalignment compensation is performed based on the rotation angle, the tilt angle and the attitude deviation model. The present application does not require external attitude sensors such as gyroscopes and inclinometers, and can compensate for installation attitude deviation of the calibration plate frame by frame online only by relying on images collected by a visual camera, so as to compensate for projection distortion caused by installation attitude deviation, and finally obtain a real geometric misalignment with high fidelity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of interferometric detection technology, and particularly relates to a method for inverting attitude angle error based on homography matrix and a method for calibrating misalignment. Background Technology

[0002] In the field of high-precision optical interferometry, the inspection of large-aperture optical components (aperture > 1m) requires precise adjustment of the component under test to an ideal position conjugate with the test wavefront of the interferometer. The key to achieving this alignment lies in the sub-micron level or even higher precision measurement and feedback of minute geometric misalignments (such as yaw, pitch, defocus, and eccentricity) in the six degrees of freedom of the component. Traditional alignment methods typically rely on complex and precise mechanical adjustment mechanisms, complex laser collimation tools, and tedious manual iterations by operators. Alignment is achieved through repeated "measurement-adjustment" iterations, a process that is cumbersome, inefficient, and lacks repeatability. The accuracy is easily affected by human factors, making it difficult to meet the stringent requirements of efficiency and consistency in modern high-performance optical manufacturing.

[0003] To overcome the aforementioned limitations, quantitative and automated pose detection technology based on visual images has become an important development direction. Its core idea is to calculate pose deviations using camera imaging geometry by observing high-precision reference marks (such as coded marker points or checkerboard calibration plates) fixed to the workpiece or adjustment mechanism. However, the theoretical accuracy of this method relies on two fundamental assumptions: "precisely known imaging model parameters" and "strictly determined relationship between the observation reference and the workpiece pose." In practical engineering, especially for large-diameter components, the mechanical structures (supports, fixtures) used to install visual observation references (such as calibration plates) are limited by size, rigidity, and accessibility, making it difficult to guarantee an absolutely ideal pose relationship between them and the workpiece's theoretical reference surface. This introduces minute installation pose deviations that are difficult to completely eliminate (such as rotation around the normal and tilt around the horizontal axis), systematically contaminating the calculation results from image coordinates to pose parameters. Furthermore, this error cannot be suppressed by improving image feature extraction accuracy or optimizing the calibration algorithm.

[0004] Chinese invention patent application CN117934624A, published on April 26, 2024, entitled "A Camera Pose Correction Method and System Based on Planar Homography Matrix," discloses a method for correcting camera pose drift using homography matrix decomposition. Its core technology lies in achieving "self-sensing" and "self-correction" of the measuring tool (camera). This solution aims to address the pose instability of the camera caused by environmental disturbances (such as vibration and temperature drift), and its output is the corrected camera extrinsic parameters. However, this technology has a fundamental limitation: it only compensates for variations in the observation system (camera) itself and cannot identify and compensate for the inherent installation posture deviations of the observation target (calibration plate). In vision-assisted high-precision measurement, the calibration plate serves as the spatial reference benchmark for measurement, and its fixed installation deviations (rotation angle and tilt angle) relative to the ideal position of the workpiece are another independent and critical source of systematic error. This solution does not involve modeling such errors, and its general camera motion model and "self-sensing" logic cannot meet the requirements for online calibration of the "measurement benchmark."

[0005] In summary, a core problem facing existing vision-assisted alignment technologies in practical applications is that the installation posture of the calibration plate, which serves as the measurement reference, is difficult to strictly guarantee through mechanical means. This results in rotation of the calibration plate around its planar normal and tilting around its horizontal axis, and existing methods cannot directly eliminate these two posture deviations, leading to a non-negligible systematic error in the final pose measurement results. Summary of the Invention

[0006] In view of this, the present invention aims to provide a method for inverting attitude angle error based on homography matrix and a method for misalignment calibration. This method utilizes the pixel coordinates in the calibration plate image and the corresponding physical coordinates in actual space to calculate the homography matrix, and then solves for the rotation angle of the calibration plate based on the homography matrix. and tilt angle This allows for the quantitative acquisition of the current installation attitude deviation. Based on this deviation, the raw misalignment data output by the vision measurement system is geometrically corrected in real time, effectively suppressing system errors introduced by imperfect installation and improving the final accuracy of vision-assisted alignment.

[0007] To achieve the above objectives, the technical solution created by this invention is implemented as follows: This invention provides a method for retrieving attitude angle errors based on homography matrix inversion. Calibration plates are arranged at the four orthogonal axes of the workpiece under test, and four image acquisition devices are correspondingly set up. The method includes: S1: Constrain the optical axis of each image acquisition device to be perpendicular to the reference measurement plane of the workpiece to be measured; The attitude deviation of the calibration plate relative to the reference measurement plane is decomposed into in-plane rotational deviation and out-of-plane tilt deviation. The in-plane rotational deviation is formed by the rotation of the calibration plate about its plane normal direction, i.e., the rotation angle. The out-of-plane tilt deviation is the angle between the actual pose plane and the ideal pose plane of the calibration plate, i.e., the tilt angle. And construct by rotation angle and tilt angle The attitude deviation model introduced by coupling is as follows: ; in, This represents the actual geometric misalignment of the workpiece in the workpiece's reference coordinate system. This represents the geometric misalignment of the workpiece under test, calculated based on images acquired by the image acquisition device, in the calibration plate coordinate system. S2: Acquire images of the calibration board using an image acquisition device, extract the pixel coordinates of the marker points on the calibration board image, and solve for the homography matrix representing the mapping relationship between the pixel coordinates and the physical coordinates of the marker points in the image plane coordinate system and the calibration board coordinate system based on the pixel coordinates of the marker points in the image plane coordinate system and the physical coordinates of the physical coordinates. ; S3: Based on the intrinsic parameter matrix of the image acquisition device and homography matrix Calculate the extrinsic parameter matrix, obtain the first and second column vectors of the noisy rotation matrix estimate based on the first two column vectors of the extrinsic parameter matrix, and calculate the third column vector of the rotation matrix estimate based on the orthogonality of the first and second column vectors of the rotation matrix estimate; Singular value decomposition is performed on the noisy rotation matrix estimate to obtain the optimal rotation matrix that satisfies the orthogonality constraint; S4: Based on the matrix elements of the optimal rotation matrix, inversely calculate the rotation angle γ and tilt angle θ of each axis calibration plate.

[0008] Preferably, the image acquisition device is a camera.

[0009] Preferably, the marker points are the corner points of the checkerboard on the calibration board. The pixel coordinates of the marker points in the image plane coordinate system are extracted by an image recognition algorithm, and the physical coordinates of the marker points in the calibration board coordinate system are determined based on the known dimensions of the checkerboard on the calibration board.

[0010] Preferably, the mapping relationship between pixel coordinates and physical coordinates is as follows: ; in, Indicates a non-zero scaling factor. Represents the pixel coordinates of the marker point. Represents the physical coordinates of the marker point. and Let these represent the first and second column vectors of the rotation matrix, respectively. This represents the translation vector.

[0011] Preferably, based on the pixel coordinates of the marker points in the image plane coordinate system and their physical coordinates in the calibration board coordinate system, the homography matrix is ​​calculated by minimizing the reprojection error through a direct linear transformation algorithm combined with nonlinear optimization. .

[0012] Preferably, for noisy rotation matrix estimation Perform singular value decomposition: ; The optimal rotation matrix R that satisfies the orthogonality constraint is: ; in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix. Each term in the matrix represents an element of the optimal rotation matrix R.

[0013] Preferably, in the camera coordinate system, the attitude deviation is based on the camera coordinate system according to the previous orbit. Rotate the axis by θ, then around Euler angle decomposition of axis rotation γ is used to solve for the rotation angle. and tilt angle They are respectively: ; .

[0014] Another aspect of this invention provides a method for calibrating misalignment, comprising: The rotation angle γ and tilt angle θ of each axis calibration plate are calculated in real time using a method based on homography matrix inversion of attitude angle error. Substitute into the formula The geometric misalignment of the workpiece under test, calculated based on images acquired by the image acquisition device in the calibration plate coordinate system, is compensated to obtain the true geometric misalignment of the workpiece under test.

[0015] Compared with the prior art, the present invention can achieve the following beneficial effects: In the component alignment process of interferometric testing, when using vision assistance to obtain the geometric misalignment of the workpiece, it is necessary to strictly constrain the orientation of the calibration plate. However, during the calibration plate assembly and adjustment process, there will inevitably be a deviation in the calibration plate's installation orientation. Existing technologies require complex mechanical adjustments or external attitude sensors to suppress the installation orientation deviation as much as possible. However, this process is not only complex and time-consuming, but also has assembly and adjustment residuals, making it impossible to completely eliminate the installation orientation deviation. As a result, the final alignment result is still affected by the calibration plate's installation orientation deviation. To suppress the impact of the calibration plate's installation orientation deviation on the misalignment and alignment result, this invention decomposes the calibration plate's installation orientation deviation into the rotation angle of the calibration plate about the plane normal and the tilt angle about the horizontal axis. An orientation deviation model is established based on the combined effect of the rotation angle and the tilt angle. The homography matrix is ​​decomposed online in real time to calculate the rotation angle of the calibration plate about the plane normal and the tilt angle about the horizontal axis. Based on the established orientation deviation model, the calculated rotation angle and tilt angle are used to perform real-time geometric correction on the original image measurement values, thereby compensating for the projection distortion introduced by the installation orientation deviation and finally obtaining a high-fidelity true geometric misalignment.

[0016] This invention eliminates the need for external attitude sensors such as gyroscopes and tiltmeters. It relies solely on images captured by a vision camera to compensate for calibration board installation attitude deviations frame-by-frame online. Even when the calibration board's attitude drifts due to creep caused by temperature or vibration in the mechanical structure, the accuracy and consistency of the measurement output remain constant. Experimental verification, using a high-precision (sub-micron level measurement accuracy) laser displacement sensor as a benchmark, demonstrates that the method of this invention yields the true geometric misalignment through error compensation. The accuracy of optical path alignment using this true geometric misalignment is better than 5μm, and the error repeatability is better than ±3μm. Compared to traditional vision alignment methods, this invention significantly improves the accuracy of misalignment calibration and optical path alignment, providing an efficient and low-cost solution for high-precision optical interferometry. Attached Figure Description

[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a method for retrieving attitude angle error based on homography matrix inversion according to an embodiment of the present invention; Figure 2 This is a schematic diagram of tilt pose error provided according to an embodiment of the present invention; Figure 3 This is a schematic diagram of rotational pose error provided according to an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and do not constitute a limitation thereof. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; the relevant operations can be fully understood based on the description in the specification and general technical knowledge in the art.

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined to form various implementations. Furthermore, the order of the steps or actions in the method description can be changed or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various orders in the specification and drawings are merely for the clear description of a particular embodiment and do not imply a mandatory order, unless otherwise stated that a particular order must be followed.

[0020] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0021] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0022] The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] Please see Figure 1 In one embodiment of the present invention, a method for attitude angle error inversion based on homography matrix is ​​provided, mainly to solve the problem of systematic measurement error introduced by deviations in the installation attitude of calibration plates during visual measurement in high-precision interferometric testing. During interferometric testing, the workpiece under test needs to be adjusted to a position strictly conjugate to the test light wavefront emitted by the interferometer. For quantitative measurement and guidance adjustment, a calibration plate with a precise pattern (such as a checkerboard) is typically arranged at each of the four orthogonal axes of the workpiece under test, and an image of the calibration plate is captured using a high-resolution image acquisition device. By analyzing the calibration plate image, the translational amounts in the X and Y directions and the minute positional deviations of the workpiece rotation around the Z axis can be calculated, thereby obtaining the geometric misalignment of the workpiece under test, which guides the adjustment mechanism to guide the workpiece to the ideal pose. Ideally, the calibration plate should be strictly parallel to the reference measurement plane of the interferometer, and the coordinate axes of its pattern should be perfectly aligned with the coordinate axes of the measurement system. At this point, the image captured by the image acquisition device satisfies an ideal orthogonal projection relationship with the actual physical space. The length of any pixel on the image can directly and accurately reflect the actual physical space distance. By acquiring the pixel distance between the projection points of the interferometer crosshairs and the scribe lines on the side of the workpiece on the calibration plate using the image acquisition device, this distance can be directly converted into the actual spatial distance. Combined with the actual spatial distance obtained from observations at each axis position, further calculations can be performed. The geometric misalignment of the workpiece under test. However, in actual engineering installations, the calibration plate is fixed to the edge of a large-diameter workpiece using a mechanical support. Due to the large size of the workpiece and limited adjustment space, it is difficult to ensure the absolutely ideal posture of the calibration plate through purely mechanical means. Therefore, this invention proposes the following technical solution that allows for direct online self-calibration and real-time compensation of the calibration plate's posture deviation without the need for complex mechanical adjustments or external posture sensors. The method includes: S1: Constrain the optical axis of each image acquisition device to be perpendicular to the reference measurement plane of the workpiece to be measured; The attitude deviation of the calibration plate relative to the reference measurement plane is decomposed into in-plane rotational deviation and out-of-plane tilt deviation. The in-plane rotational deviation is formed by the rotation of the calibration plate about its plane normal direction, i.e., the rotation angle. The out-of-plane tilt deviation is the angle between the actual pose plane and the ideal pose plane of the calibration plate, i.e., the tilt angle. And construct by rotation angle and tilt angle The attitude deviation model introduced by coupling is as follows: ; in, This represents the actual geometric misalignment of the workpiece in the workpiece's reference coordinate system. This represents the geometric misalignment of the workpiece under test, calculated based on images acquired by the image acquisition device, in the calibration plate coordinate system. S2: Acquire images of the calibration board using an image acquisition device, extract the pixel coordinates of the marker points on the calibration board image, and solve for the homography matrix representing the mapping relationship between the pixel coordinates and the physical coordinates of the marker points in the image plane coordinate system and the calibration board coordinate system based on the pixel coordinates of the marker points in the image plane coordinate system and the physical coordinates of the physical coordinates. ; S3: Based on the intrinsic parameter matrix of the image acquisition device and homography matrix Calculate the extrinsic parameter matrix, obtain the first and second column vectors of the noisy rotation matrix estimate based on the first two column vectors of the extrinsic parameter matrix, and calculate the third column vector of the rotation matrix estimate based on the orthogonality of the first and second column vectors of the rotation matrix estimate; Singular value decomposition is performed on the noisy rotation matrix estimate to obtain the optimal rotation matrix that satisfies the orthogonality constraint; S4: Based on the matrix elements of the optimal rotation matrix, inversely calculate the rotation angle γ and tilt angle θ of each axis calibration plate.

[0024] In step S1, in this embodiment of the invention, the image acquisition device uses a camera, and a camera is set above the calibration plate of each axis. Under ideal constraint, the optical axis of the camera is perpendicular to the reference measurement plane of the workpiece to be measured.

[0025] Before mathematically modeling the measurement error introduced by the calibration plate mounting posture deviation, the workpiece reference coordinate system is set as follows: Workpiece reference coordinate system The origin is at the centroid of the workpiece to be measured, and the workpiece reference coordinate system is... of The plane is the reference measurement plane, and the workpiece reference coordinate system. of The axis refers to the optical axis direction of the workpiece under test; the coordinate system of the calibration plate is... Calibration plate coordinate system The origin is at the center of the plane of the calibration plate, and the coordinate system of the calibration plate is... of The plane is the calibration plate plane, and the calibration plate coordinate system is... of The axis refers to the normal direction of the ideal plane of the calibration plate, and each axis position of the calibration plate has its own corresponding calibration plate coordinate system; the image plane coordinate system is... Image plane coordinate system The origin is at the center of the image plane, and the image plane coordinate system... of The plane refers to the image plane of the camera, and the image plane coordinate system. of The axis is the direction of the normal to the image plane.

[0026] Assuming the camera is constrained to an ideal orientation (optical axis perpendicular to the reference measurement plane), the installation orientation deviation of the calibration plate at each axis can be decomposed into two independent Euler angles: the rotation angle about the normal direction of the calibration plate plane. The rotation about the measurement direction axis causes an angle of inclination between the ideal calibration plate plane and the actual calibration plate plane. , used to characterize two different geometric distortions respectively.

[0027] like Figure 2 As shown, under ideal installation conditions, the calibration plate is located in the predetermined ideal pose plane of the calibration plate. Due to installation errors, the actual pose plane of the calibration plate after actual installation may be tilted out of plane relative to the ideal pose plane. The angle between the actual pose plane of the calibration plate and the ideal pose plane of the calibration plate is defined as the tilt angle. Equivalent land, tilt angle It can be expressed as the angle between the normal vector of the actual pose plane of the calibration plate and the normal vector of the ideal pose plane of the calibration plate.

[0028] At this point, the projection of the actual physical distance on the calibration board onto the tilted actual pose plane of the calibration board will exhibit a scaling deviation, causing an error in the distance calculated by the vision system based on the number of image pixels and the known grid size of the calibration board. This error stems from the mapping distortion caused by the non-parallelism between the calibration board plane and the reference measurement plane, and is a perspective scaling deviation introduced by perspective projection.

[0029] When the actual pose plane of the calibration board is tilted relative to the ideal pose plane of the calibration board. At that time, the actual distance in physical space The true geometric misalignment of the workpiece under test is projected onto the inclined calibration plate plane, and the measurement distance is obtained along the actual inclined calibration plate plane (the geometric misalignment of the workpiece under test is calculated based on the image acquired by the image acquisition device). Ideal real distance With measuring distance The following relationship must be satisfied: .

[0030] Therefore, it can be based on the tilt angle Compensation is provided for the geometric projection scale error introduced by the outward tilt of the calibration plate.

[0031] like Figure 3 As shown, rotation angle Defined as calibration plate surface based on camera coordinate system Rotational deviation of the axis. This rotational error causes a deviation in the calibration plate coordinate system. The direction axis to be measured and the workpiece reference coordinate system There is an angle between the axes of the direction to be measured. This means that the coordinate axes of the two coordinate systems are no longer aligned. When the workpiece to be measured moves along the workpiece's reference coordinate system... When a certain axis undergoes actual displacement, the vision system reads the displacement component along the corresponding axis in the calibration plate coordinate system. This is because there is a fixed deflection angle between the two coordinate systems. The projected components read from the map differ from the actual magnitude of the true displacement vector in that direction. This error is essentially the difference in the projected components of the same physical vector in different coordinate systems, which is a mapping deviation caused by coordinate transformation mismatch.

[0032] When only in-plane rotational deviation is considered At that time, the distance component is directly measured in the calibration plate coordinate system. (The geometric misalignment of the workpiece under test, calculated based on images acquired by the image acquisition device) and its true components in the workpiece's reference coordinate system. (i.e., the actual geometric misalignment of the workpiece under test) satisfies the following relationship: .

[0033] Taking rotation angle into account and tilt angle The coupling effect distorts the ideal orthogonal mapping relationship throughout the entire projection geometry chain from "physical space" to "camera image plane," resulting in geometric misalignment measured directly from the image. With respect to the true geometric misalignment The resulting composite distortion leads to the following attitude deviation model: ; in, This is the compensation factor.

[0034] In step S2, the rotation angle in the current state is calculated online. and tilt angle In this embodiment of the invention, the pixel coordinates in the camera-acquired image are first established when there is a calibration plate attitude deviation. The mapping relationship to the physical coordinates on the calibration board plane is achieved by using image recognition algorithms to identify the marker points on the calibration board in the images captured by the camera. These marker points are typically selected as corner points of the checkerboard pattern on the calibration board, and the pixel coordinates of the marker points in the image plane coordinate system are obtained. Then, locate the corresponding marker point on the calibration board. Since the size of the checkerboard grid on the calibration board is known, the physical coordinates of the marker point in the calibration board coordinate system can be directly obtained. This allows us to establish the pixel coordinates of a marker point. and physical coordinates The mapping relationship, i.e., the homography matrix The following conditions must be met: ; in, Indicates a non-zero scaling factor. Represents the pixel coordinates of the marker point. Represents the physical coordinates of the marker point. and Let these represent the first and second column vectors of the rotation matrix, respectively. Let K represent the translation vector, and K be the camera intrinsic parameter matrix.

[0035] Using image recognition algorithms, the pixel coordinates of all corner points of the calibration board in the image are extracted to form a pixel set. Then, based on the known dimensions of the chessboard, the physical coordinates of each corner point in the calibration board coordinate system are obtained synchronously, forming a pixel set. Based on these two sets of corresponding points, the optimal homography matrix can be obtained by using the Direct Linear Transform (DLT) algorithm combined with nonlinear optimization to minimize the reprojection error. .

[0036] In step S3, after obtaining the homography matrix... Further analysis of the homography matrix is ​​needed. The rotation matrix of the calibration plate relative to the image plane coordinate system is decomposed from the middle. This allows for the calculation of the attitude deviation of the calibration plate. and Specifically, due to the homography matrix With the camera's intrinsic parameter matrix The following relationship must be satisfied: .

[0037] Because the points on the calibration plate plane satisfy Therefore, the third column of the rotation matrix is ​​eliminated in the projection equation, thus the homography matrix... Only contains , and Three column vectors. To solve for the corresponding rotation matrix, the above equation needs to be transformed into: ; Where M is the homography matrix and intrinsic parameter matrix The calculated extrinsic parameter matrix.

[0038] Due to image noise, corner detection errors, and numerical calculation errors, the first two column vectors in the directly calculated extrinsic parameter matrix M are not strictly equal to the rotation matrix. and The directly calculated extrinsic parameter matrix M is represented as... .

[0039] In an ideal situation, where there is no image noise, corner detection error, or numerical calculation error... and The rotation matrix column vectors must strictly satisfy the identity orthogonality property, i.e. and .

[0040] Considering the noise in the calibration process data, the data was directly calculated. and Since it does not strictly satisfy the unity orthogonality, the noisy M must be further processed to obtain a mathematically noise-free rotation matrix. Specifically: First of all, and After normalization, the modulus of both matrices is forcibly stretched to 1, resulting in the initial estimates of the first two columns of the rotation matrix: ; ; in, and This is the initial estimate of the first two columns of the rotation matrix.

[0041] As for the initial estimate of the third column of the rotation matrix, it can be obtained based on the orthogonality of the first two columns: ; in, This is the initial estimate for the third column of the rotation matrix.

[0042] This constitutes an initial rotation matrix estimate. : .

[0043] It should be pointed out that, although by The definition of orthogonality guarantees that it is similar to... , The orthogonality, but due to and The direction itself is deviated due to the influence of the original noise. As a whole, it still does not strictly satisfy the orthogonality constraint of the rotation matrix, that is... and That's not true.

[0044] To obtain a rotation matrix that approximates the true rotation matrix in the Frobenius norm sense, this invention performs singular value decomposition on the noisy rotation matrix estimate and corrects it based on the determinant sign of the singular vector matrix to obtain a matrix that satisfies the orthogonality constraint. The optimal rotation matrix, rotation matrix estimation The process of performing singular value decomposition is as follows: ; The optimal rotation matrix R that satisfies the orthogonality constraint is then obtained as: ; in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix. Each term in the matrix represents an element of the optimal rotation matrix R.

[0045] Singular value decomposition enforces the orthogonality of the optimal rotation matrix R and the property that its determinant is 1.

[0046] In step S4, after obtaining the optimal rotation matrix R that satisfies the rotation matrix constraints, the optimal rotation matrix can be solved based on its matrix elements to determine the calibration board coordinate system relative to the camera coordinate system. The rotation relationship. It should be noted that since the rotation matrix R is obtained directly from the homography matrix H and the camera intrinsic parameter matrix K, the rotation matrix R represents the calibration board coordinate system relative to the camera coordinate system. The rotational relationship.

[0047] Based on the above axial correspondence, the calibration plate rotates in the camera coordinate system. The attitude deflection generated by the axis is the rotational deviation in the calibration plate plane; the calibration plate rotates around the camera coordinate system. The attitude deflection generated by the axis is the out-of-plane tilt deviation of the calibration plate. Therefore, the rotation obtained in the camera coordinate system can be used to calculate the rotation. The attitude angle of the axis is defined as the tilt angle. , will go around The attitude angle of the axis is defined as the rotation angle. .

[0048] Among them, the camera coordinate system coordinate system with calibration plate Both use a left-handed Cartesian coordinate system to ensure that the attitude transformation between them can be represented by an orthogonal rotation matrix. Camera coordinate system As a fixed reference coordinate system, the positive directions of the rotation angles about its fixed coordinate axes are determined according to the left-hand rule. Inclination angle The angle used to characterize the out-of-plane tilt of the actual pose plane of the calibration board relative to the ideal pose plane of the calibration board is defined as the angle between the normal vector of the actual pose plane of the calibration board and the normal vector of the ideal pose plane of the calibration board; rotation angle. Used to characterize the rotational deviation of the calibration plate relative to a predetermined reference direction within its plane. In the camera coordinate system, first, around the camera coordinate system... Axis rotation Then, around the camera coordinate system Axis rotation The pose decomposition method, the rotation matrix satisfies: ; ; ; .

[0049] The rotation angle can be calculated from the matrix elements of the rotation matrix R. and tilt angle They are respectively: ; .

[0050] This completes the calibration of the current attitude deviation of the calibration board. and High-precision, non-contact online calibration was also achieved, and compensation factors were obtained. The entire process requires no external attitude sensors and can be completed solely by real-time images of the calibration board captured by a vision measurement camera.

[0051] Based on the above method, this invention also proposes a misalignment calibration method. First, the geometric misalignment of the local axis of the workpiece under test, calculated from images acquired by an image acquisition device, is obtained in the calibration plate coordinate system using existing visual calibration methods. Then, using the method proposed in this invention for inverting attitude angle errors based on homography matrix, the rotation angle γ and tilt angle θ of each axis calibration plate are calculated in real time, and then substituted into the formula. The axis position is obtained directly through visual methods. Compensation is performed to achieve real-time correction of visual measurement results.

[0052] Furthermore, after obtaining the corrected true geometric misalignment... Then, it can be adjusted according to the workpiece to be tested or the interference detection optical path to achieve alignment between the workpiece to be tested and the detection optical path.

[0053] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0054] The systems, apparatuses, modules, or units described in one or more of the above embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, a computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0055] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0056] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A method for retrieving attitude angle error based on homography matrix inversion, characterized in that, include: S1: Constrain the optical axis of each image acquisition device to be perpendicular to the reference measurement plane of the workpiece to be measured; The attitude deviation of the calibration plate relative to the reference measurement plane is decomposed into in-plane rotational deviation and out-of-plane tilt deviation. The in-plane rotational deviation is formed by the calibration plate rotating about its plane normal, i.e., the rotation angle. ; Out-of-plane tilt deviation is the angle between the actual pose plane of the calibration plate and the ideal pose plane, i.e., the tilt angle. Constructing a system based on rotation angles and tilt angle The attitude deviation model introduced by coupling is as follows: ; in, This represents the true geometric misalignment of the workpiece under test. This represents the geometric misalignment of the workpiece under test obtained from the image acquisition device in the calibration plate coordinate system. S2: Acquire images of the calibration board using an image acquisition device, extract the pixel coordinates of the marker points on the calibration board image, and solve for the homography matrix representing the mapping relationship between the pixel coordinates and the physical coordinates of the marker points in the image plane coordinate system and the calibration board coordinate system based on the pixel coordinates of the marker points in the image plane coordinate system and the physical coordinates of the physical coordinates. ; S3: Based on the intrinsic parameter matrix of the image acquisition device and homography matrix Calculate the extrinsic parameter matrix, obtain the first and second column vectors of the noisy rotation matrix estimate based on the first two column vectors of the extrinsic parameter matrix, and calculate the third column vector of the rotation matrix estimate based on the first and second column vectors of the rotation matrix estimate; Singular value decomposition is performed on the noisy rotation matrix estimate to obtain the optimal rotation matrix that satisfies the orthogonality constraint; S4: Calculate the rotation angle γ and tilt angle θ of each axis calibration plate by inversion based on the optimal rotation matrix.

2. The method for retrieving attitude angle error based on homography matrix inversion according to claim 1, characterized in that, The image acquisition device is a camera.

3. The method for retrieving attitude angle error based on homography matrix inversion according to claim 1, characterized in that, The marker points are the corner points of the checkerboard on the calibration board. The pixel coordinates of the marker points in the image plane coordinate system are extracted by an image recognition algorithm, and the physical coordinates of the marker points in the calibration board coordinate system are determined based on the known dimensions of the checkerboard on the calibration board.

4. The method for retrieving attitude angle error based on homography matrix inversion according to claim 1, characterized in that, The mapping relationship between pixel coordinates and physical coordinates is as follows: ; in, Indicates a non-zero scaling factor. Represents the pixel coordinates of the marker point. Represents the physical coordinates of the marker point. and Let these represent the first and second column vectors of the rotation matrix, respectively. This represents the translation vector.

5. The method for retrieving attitude angle error based on homography matrix inversion according to claim 1, characterized in that, Based on the pixel coordinates of the marker points in the image plane coordinate system and their physical coordinates in the calibration board coordinate system, the homography matrix is ​​calculated by minimizing the reprojection error through a direct linear transformation algorithm combined with nonlinear optimization. .

6. The method for retrieving attitude angle error based on homography matrix inversion according to claim 1, characterized in that, Estimation of noisy rotation matrices Perform singular value decomposition: ; The optimal rotation matrix R that satisfies the orthogonality constraint is: ; in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix. Each term in the matrix represents an element of the optimal rotation matrix R.

7. The method for retrieving attitude angle error based on homography matrix inversion according to claim 6, characterized in that, Attitude deviation based on camera coordinate system according to the previous rotation Rotate the axis by θ, then around Euler angle decomposition of axis rotation γ is used to solve for the rotation angle. and tilt angle They are respectively: ; 。 8. A method for calibrating imbalance, characterized in that, include: The rotation angle γ and tilt angle θ of each axis calibration plate are calculated in real time using the method based on homography matrix inversion of attitude angle error as described in any one of claims 1 to 7. Substitute into the formula The geometric misalignment of the workpiece under test, calculated based on images acquired by the image acquisition device in the calibration plate coordinate system, is compensated to obtain the true geometric misalignment of the workpiece under test.

Citation Information

Patent Citations

  • Camera pose correction method and system based on plane homography matrix

    CN117934624A