A circular hole measuring method based on oblique mounting of double-line structured light sensor

CN122835232APending Publication Date: 2026-09-29NANJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610635158.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-09
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0007]针对现有单侧线结构光圆孔测量存在孔壁背向面不可见、圆孔平面点与圆孔孔壁点难以有效分离、双视角数据统一困难以及常规标定板在大倾角条件下标定稳定性不足等问题,本发明提出一种基于对置倾斜双线结构光传感器的圆孔测量方法

Benefits of technology

[0075](1)本发明针对现有线结构光圆孔测量方案大多采用单个传感器从单侧对孔口区域进行扫描,设计了倾斜对置安装双线结构光传感器的圆孔测量系统,测量系统中倾斜对置安装的双线结构光传感器形成重叠测量区域,能够降低单侧扫描时的遮挡盲区,提高孔壁点云完整性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122835232A_ABST
    Figure CN122835232A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on oblique opposite installation double line structure light sensor's round hole measurement method, including over constructing opposite oblique installation double line structure light sensor round hole measurement system, improve the integrity of hole wall point cloud acquisition;By setting with right tetrapods, groove features and auxiliary small features Special calibration object, enhance the calibration object geometric constraint ability and calibration stability under the condition of line structure light sensor large inclination;Through the method that round hole wall and round hole plane are separated, hole wall point purification and robust cylinder fitting are combined, realize the stable solution of round hole center, round hole diameter and hole axis direction vector, improve the accuracy and applicability of workpiece round hole measurement.This measurement method can stably output round hole diameter, round hole center and round hole axis direction vector, and is suitable for the round hole detection scene of multiple workpieces such as plate piece, shell piece and complex casting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine vision measurement, line structured light 3D detection, and industrial hole feature size detection, specifically to a method for measuring circular holes based on a tilted, oppositely mounted dual-line structured light sensor. Background Technology

[0002] In the machining and quality inspection of plate, shell, casting, and stamped parts, the diameter, center position, and axial direction of circular holes are common and critical inspection parameters. While traditional contact gauges or coordinate measuring machines (CMMs) can achieve high accuracy, their inspection efficiency is low, significantly impacting on-site cycle time and hindering online or near-line automated inspection. Therefore, utilizing line structured light sensors for non-contact measurement of hole features has become an important technological approach in industrial vision inspection.

[0003] Most existing line structured light circular aperture measurement solutions employ a single sensor to scan the aperture area from one side, and then directly perform circular or cylindrical fitting on the reconstructed point cloud. This type of solution is prone to problems such as incomplete aperture wall point clouds, mixing of aperture plane points and aperture wall points, and unstable fitting results when faced with aperture occlusion, invisible aperture wall back surfaces, metal surface reflections, localized missing stripes, and changes in clamping posture. It is particularly unsuitable for tilted scanning scenarios with deep holes, flanged holes, or limited installation space.

[0004] Furthermore, when the line structured light sensor is installed at a large tilt angle, the three-dimensional geometric features provided by conventional planar calibration plates or simple symmetrical calibration components are insufficient, which can easily lead to weak pose solution constraints, large ambiguities in feature correspondence, and instability in the unified coordinate transformation between the two sensors. Even when using a general point cloud registration method to merge data from different viewpoints, registration errors can easily accumulate due to partial overlap of point clouds, noise, and local occlusion, further reducing the accuracy of circular hole measurement.

[0005] Therefore, it is necessary to propose a method for measuring circular holes of dual-line structured light sensors with opposing tilt installation. By using a dedicated calibration material and point cloud segmentation, purification, and cylindrical fitting algorithms tailored to hole features, the calibration accuracy of the dual sensors, the integrity of the hole wall point cloud, and the stability of circular hole size measurement can be improved. Summary of the Invention

[0006] 1. The technical problem to be solved:

[0007] To address the problems of existing single-sided structured light circular aperture measurement methods, such as the invisibility of the aperture wall's back surface, difficulty in effectively separating the circular aperture's planar points from its wall points, challenges in unifying dual-view data, and insufficient calibration stability of conventional calibration boards under large tilt angles, this invention proposes a circular aperture measurement method based on a counter-tilted dual-line structured light sensor.

[0008] 2. Technical Solution:

[0009] A method for measuring circular holes based on a tilted, oppositely mounted dual-line structured light sensor, characterized by comprising:

[0010] Step 1: Set up the circular hole measurement system, calibration object, and unified measurement coordinate system; the circular hole measurement system includes two line structured light sensors capable of synchronous linear movement and acquiring the contour of the workpiece to be measured from an inclined opposing position; the calibration object is a long strip substrate with multiple pyramidal and slotted structures; the unified measurement coordinate system is constructed based on the location of the calibration object and is used to uniformly transform the point cloud data acquired by the two line structured light sensors to a coordinate system under the same reference coordinate frame;

[0011] Step 2: Collect point cloud data of the calibration object contour and construct a feature point set; use the dual-line structured light sensor of the circular hole measurement system to collect the complete contour point cloud data of the calibration object placed at the preset position and extract the feature contour point set;

[0012] Step 3: Based on the triangulation model of the feature contour point set and calibration object theory, establish corner matching constraints and feature surface constraints, and construct a robust optimization objective function; iteratively solve the pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system, thereby obtaining the transformation matrix from the coordinate system of each line structured light sensor to the unified measurement coordinate system;

[0013] Step 4: Collect the complete contour point cloud data of the workpiece to be measured and convert it into a complete point cloud of the workpiece under a unified measurement coordinate system;

[0014] Step 5: Extract the neighborhood point cloud of the circular hole from the complete point cloud of the workpiece to be tested. Separate the hole wall from the plane and clean the hole wall point cloud. Perform cylindrical fitting on the cleaned hole wall point cloud. Combine the spatial relationship between the separated hole opening plane point cloud and the fitted cylinder to obtain the center coordinates, diameter, and axial direction vector of the circular hole to be tested, thereby completing the measurement of the circular hole parameters in the workpiece to be tested.

[0015] Further, in step one, the circular hole measurement system specifically includes a first-line structured light sensor, a second-line structured light sensor, a fixed mounting plate, a lead screw module, and a support base; the first-line structured light sensor and the second-line structured light sensor are mounted on the fixed mounting plate in an opposing inclined manner, so that their fields of view overlap in the measurement area to obtain the plane of the circular hole opening and the point cloud of the hole wall in the workpiece to be measured; the lead screw module is used to drive the fixed mounting plate and the first-line structured light sensor and the second-line structured light sensor to move relative to the workpiece to be measured along the linear trajectory of the lead screw module; the... The support base is used to fix the lead screw module and support the workpiece to be measured. A groove for placing the calibration object is set in the test area of ​​the base as the calibration object placement area. The long strip base plate of the calibration object is provided with multiple different feature units along the length direction. Each feature unit includes a regular square truncated pyramid, a groove structure located on the top of the regular square truncated pyramid, and auxiliary small structural features arranged on the side surface of the regular square truncated pyramid. The origin of the unified measurement coordinate system is the midpoint of the bottom edge of one side of the calibration object corresponding to the calibration object placement area. The X-axis direction is the width direction of the corresponding calibration object, the Y-axis is the length direction, and the Z-axis is the height direction.

[0016] Furthermore, step two specifically includes:

[0017] S21: The calibration object in the calibration object placement area is linearly scanned once using a dual-line structured light sensor to obtain two continuous contour point cloud data of the calibration object corresponding to the first line structured light sensor and the second line structured light sensor respectively; each continuous contour point cloud data is composed of multiple frames of contour cross-section point cloud data acquired frame by frame in the scanning order.

[0018] S22: Synchronously record the cumulative displacement information of the lead screw module encoder and establish a mapping relationship between the point cloud data of each frame's contour section and the corresponding cumulative displacement; specifically:

[0019] The coordinates of the i-th contour point acquired by the j-th line structured light sensor in the k-th frame contour cross-section point cloud data in the sensor's local coordinate system are expressed as follows: ,in Indicates the lateral coordinates of the contour points. Represents the height coordinates of the contour points; the scan direction coordinates s are obtained from the cumulative displacement of the encoder. k, The coordinate mapping model from the contour points of the line structured light sensor to the unified measurement coordinate system. As shown in the following formula:

[0020] (1);

[0021] In the above formula, Represents the coordinates in the corresponding sensor's local coordinate system. Transform the point coordinates to a unified measurement coordinate system; Let be the rotation matrix from the j-th line structured light sensor to the unified measurement coordinate system; Let be the translation vector from the j-th line structured light sensor to the unified measurement coordinate system; according to the above formula, the transformation between the local coordinates of the line structured light sensor and the unified measurement coordinate system needs to be determined. and where j = 1 or 2;

[0022] S23: After removing outliers and invalid points from the continuous contour point cloud, extract the corner points, edge points, and feature contour points corresponding to the feature units of the calibration object, specifically including:

[0023] Let the j-th line structured light sensor acquire the contour point cloud in the contour section of the k-th frame. Represented as: (2);

[0024] In the above formula, This represents the total number of contour points acquired by the j-th line structured light sensor in the contour section of the k-th frame;

[0025] All contour points contained in the contour section are obtained and numbered according to their location; a threshold for the change in local direction angle of adjacent contour point vectors is preset, and the local direction vector formed by adjacent numbered contour points is calculated. If the change in direction angle of adjacent local direction vectors is greater than the threshold, the contour points located between adjacent contour point vectors are taken as corner candidate points; all corner candidate points are obtained and the line segments between adjacent corner candidate points are fitted with straight lines to obtain local contour segments.

[0026] A preset threshold is set for the distance from a contour point to the fitted line. If the distance from a contour point in the point cloud of a frame to a local contour segment is less than or equal to the threshold, the point is determined to be an interior point of the local contour segment, and then the interior point set of each local contour segment is constructed. The contour section point cloud data of each frame is traversed and merged to obtain the interior point set of each local contour segment. The interior point set of each local contour segment constitutes the corresponding valid line segment.

[0027] Based on the obtained valid line segments, obtain the set of corner points formed by the intersection points of adjacent valid line segments. The set of edge points formed by the interior points of an effective straight line segment The feature contour point set is composed of the corner point set and the edge point set. The corner point set is used to establish corner matching constraints, and the feature contour point set is used to establish feature surface constraints.

[0028] Furthermore, step three specifically includes:

[0029] S31: Convert the known geometric model of the calibration object into a triangulated theoretical model; this triangulated theoretical model consists of a set of triangular facets as follows. and model corner point set express:

[0030] (3);

[0031] in, These represent the first and second parts of the theoretical model, respectively. The three vertices of a triangular facet; U represents the total number of triangular facets; This represents the l-th model corner point; L is the total number of corner points;

[0032] S32: Establish corner point matching constraints; use nearest neighbor search to match the corner point set obtained in S23. As shown in the following formula for the model corner point set Search for its corresponding corner point:

[0033] (4);

[0034] in, Represents the set of corner points A measured corner point corresponds to a matched theoretical model corner point; The matching index between the measured corner point and the model corner point is used; the matching results are updated iteratively using corner point ICP. When the Euclidean distance between a corner point in the theoretical model and the measured corner point reaches its minimum in the current iteration and meets the preset matching distance threshold, the theoretical model corner point and the measured corner point are determined to be the corresponding matching points.

[0035] S33: Establish feature surface constraints; let the first... The unit normal vector of the plane containing each triangular facet is The plane intercept is Then the reconstructed points under the unified measurement coordinate system The residual to the plane containing the triangular facet for:

[0036] (5);

[0037] The feature surface constraint is used to reflect the degree of fit between the reconstructed point and the local geometric surface of the theoretical model; the smaller the absolute value of the residual, the higher the degree of fit between the reconstructed point and the local feature surface where the corresponding triangular facet is located.

[0038] S34: Construct a robust optimization objective function to characterize the overall matching degree between the reconstructed points and the triangulated theoretical model; this objective function consists of two parts: a corner matching error term and a feature surface error term; wherein, the corner matching error term characterizes the positional deviation between the measured corner point and the corresponding theoretical model corner point, and the feature surface error term characterizes the fitting deviation between the feature contour point and the plane containing the corresponding theoretical triangular facet. The two are weighted by weighting coefficients to jointly constitute the objective to be optimized. The robust optimization objective function is as follows:

[0039] (6);

[0040] in, For robust loss function; The weighting coefficients between the preset corner matching constraints and feature surface constraints; Represents the set of parameters to be determined The overall optimization objective function is given by the set of parameters to be solved. ; Residual represents the positional deviation between the measured corner point and the corresponding theoretical model corner point. This indicates the fitting deviation between the feature contour points and the plane containing the corresponding theoretical triangular facets;

[0041] Solve for the pose parameters of the first and second line structured light sensors relative to a unified measurement coordinate system; Substituting the objective function, the optimal pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system are obtained through iterative optimization of the robust optimization objective function. The optimization process employs weighted SVD, point-to-surface Gauss-Newton iteration, or simplex search to iteratively update the parameters. Based on the optimization results, the transformation matrix from the dual-line structured light sensor to the unified measurement coordinate system is obtained as follows:

[0042] (7).

[0043] Further, step four specifically involves placing the workpiece to be measured within the measurement area of ​​the circular hole measurement system. The lead screw module drives the first and second line structured light sensors to perform a linear scan of the workpiece along a preset scanning path, acquiring the point cloud of the workpiece in the local coordinate system of the sensors. The transformation matrix obtained in step three is used to transform the point cloud of the workpiece to the point set of the workpiece in a unified measurement coordinate system. .

[0044] Furthermore, step five specifically includes:

[0045] S51: Based on the point cloud and point set of the workpiece under test Extract the point cloud of the neighborhood of the circular hole. The point cloud of the neighborhood of the circular hole Includes point cloud of the borehole opening plane and point cloud of the borehole wall;

[0046] S52: Separate the hole wall from the hole opening plane in the neighborhood point cloud of the circular hole; reconstruct the neighborhood point cloud of the circular hole based on the approximate normal vector of the hole opening plane. Perform directional RANSAC plane fitting to obtain the initial orifice plane normal. The approximate normal vector of the orifice plane is the positive Z-axis direction of the unified measurement coordinate system; for the point cloud of the neighborhood of the circular hole. any point in Define the signed distance d from it to the orifice plane. i for:

[0047] (8);

[0048] in, The center point of the point set in the orifice plane after directional RANSAC plane fitting is used as the initial point on the orifice plane after RANSAC plane fitting.

[0049] According to the point Signed distance d to the orifice plane i Calculate the robust scale parameters from all points in the flat neighborhood point cloud of a circular hole to the hole opening plane. :

[0050] (9);

[0051] In the above formula, This represents the signed distance from each point in the neighborhood point cloud to the aperture plane. The median absolute deviation; n represents the number of points in the neighborhood point cloud;

[0052] Construct a threshold for determining points within the plane of the orifice. Threshold for determining candidate points on the hole wall As shown in the following formula:

[0053] (10);

[0054] in, The in-plane distance threshold used for directional RANSAC plane fitting; and These are the preset plane threshold multiple and hole wall threshold multiple, respectively; in this formula, Used to create a safety belt between the orifice plane point and the orifice wall point; This is the preset seat belt width coefficient;

[0055] If point satisfy If the point is determined to be a point within the plane of the orifice, it is then included in the set of points within the plane of the orifice. If point satisfy Then, the point is determined to be a candidate point for the borehole wall and is added to the candidate point set for the borehole wall. ;

[0056] Set of points in the plane of the orifice The least squares algorithm is used for plane fitting refinement. The plane normal obtained after fine fitting is the true normal of the orifice plane. And find the plane intercept. Establish a coordinate system on the fitted and refined orifice plane. ;

[0057] S53: Perform annular purification on candidate points on the orifice wall, including removing abnormal points, mixed non-orifice wall points, and interference points affected by the orifice edge; specifically:

[0058] Set of candidate points on the hole wall All points are projected onto the circular hole plane coordinate system. Then, RANSAC is used to perform two-dimensional circle fitting on the projection points of the borehole wall. For any projection point of the borehole wall... The distance from the center of the fitted circle is ρ i If the candidate point on the hole wall satisfies Then, this point will be retained in the pore wall point set after the annular zone is purified. , where band w The annular band width is determined based on the radial residual statistics from all hole wall projection points to the center of the fitted circle.

[0059] S54: Set of points on the hole wall Perform an initial cylinder fitting once to obtain the axial direction of the initial cylinder axis. A point on the axis and initial radius Then, interior point cleanup and final robust fitting are performed based on the radial residuals; specifically:

[0060] Purified pore wall point set any point in the middle radial distance to the axis of the cylinder for:

[0061] (11);

[0062] in Given a three-dimensional identity matrix; the radial distance from each purified hole wall point cloud to the cylinder axis is related to the initial radius. radial residual for:

[0063] (12);

[0064] Obtain the radial residuals of all purified hole wall point clouds and merge them into a radial residual set; calculate the noise scale of the radial residual set based on equation (9). and with As a rejection threshold, when the purified pore wall points The radial residual satisfies When this happens, the point is identified as an outlier and removed from the inner points of the cylinder fitting.

[0065] A final robust fitting is performed on the point cloud of the hole wall; the nonlinear optimization process for solving the point on the cylinder axis and the radius in the final robust fitting adopts the derivative-free simplex method, and its optimization variables include a point on the cylinder axis. and radius The objective function is optimized as follows:

[0066] (13);

[0067] In the above formula, N is the total number of point clouds on the hole wall; the optimization process, while keeping the axial direction fixed, iteratively updates the variables and reduces the function value to make it converge, so as to obtain the optimal fitting cylinder for the hole wall geometry.

[0068] S55: Based on the optimal fitting cylinder, output the hole parameters of the hole to be tested; the hole parameters include the center coordinates of the hole, the diameter of the hole, and the direction vector of the hole axis;

[0069] Based on the orifice plane parameters obtained in step S52, the equation of the circular orifice plane is obtained as follows: Based on the optimal fitted cylinder parameters obtained in step S54, the cylinder axis passes through the point... The axis direction vector is Then the equation of the cylinder axis is expressed as:

[0070] (14);

[0071] in, The axis parameter is given; substituting the equation of the cylinder axis into the equation of the circular hole opening plane, the intersection point parameter of the cylinder axis and the circular hole opening plane is obtained.

[0072] (15);

[0073] Then Substituting into the equation of the cylinder axis (14), we obtain the coordinates of the center of the circular hole. This leads to the conclusion that the center of the circular hole is included. Circular hole diameter The parameters of the circular hole and the direction vector a of the circular hole axis.

[0074] 3. Beneficial effects:

[0075] (1) In view of the fact that most existing line structured light circular hole measurement schemes use a single sensor to scan the hole area from one side, the present invention designs a circular hole measurement system with tilted and opposite dual line structured light sensors. The tilted and opposite dual line structured light sensors in the measurement system form an overlapping measurement area, which can reduce the blind zone of occlusion when scanning from one side and improve the integrity of the hole wall point cloud.

[0076] (2) In situations where installation space is limited and sensors need to be arranged at an angle, this invention designs a dedicated calibration object with strong observability and richer features, and establishes a unified calibration method for dual-line structured light sensors. By setting up a dedicated calibration object with multiple inclined surfaces, groove-shaped features and auxiliary small features, this invention enhances the geometric constraints and feature uniqueness under large tilt angle conditions, and improves the stability of dual-sensor pose solving and laser plane calibration.

[0077] (3) The circular hole measurement method based on the opposing tilted dual-line structured light sensor provided by the present invention can more effectively separate the hole opening plane point and the hole wall point by combining directional RANSAC, MAD-based safety belt threshold and ring cleaning in the process of fitting the circular hole parameters, and reduce the influence of near-plane noise on the cylinder fitting.

[0078] (4) The present invention provides a circular hole measurement method based on a counter-tilted dual-line structured light sensor. By performing robust cylindrical fitting on the cleaned hole wall points and taking the intersection of the cylinder axis and the hole opening plane as the center of the circular hole, it can stably output the diameter of the circular hole, the center of the circular hole and the direction vector of the circular hole axis. It is suitable for circular hole detection scenarios of various workpieces such as plates, shell parts and complex castings. Attached Figure Description

[0079] Figure 1 This is a flowchart illustrating the construction, calibration, and measurement process of the circular hole measurement system in this invention.

[0080] Figure 2 This is a schematic diagram of the circular hole measurement system of the opposed tilted dual-line structured optical sensor in this invention;

[0081] Figure 3 This is a schematic diagram of using the dual-line structured light sensor in this invention to obliquely scan the circular hole of the workpiece under test;

[0082] Figure 4 This is a schematic diagram of a specific embodiment of the special calibration object designed in this invention;

[0083] Figure 5 This is a schematic diagram of the calibration object placement area and the measurement area on the base of the circular hole measuring system in this invention;

[0084] Figure 6 Color plot of the three-dimensional deviation between the calibration object reconstruction results and the theoretical model in the verification example.

[0085] Figure 7 To verify the actual object and its effect in the example of circular hole calibration. Detailed Implementation

[0086] The present invention will now be described in detail with reference to the accompanying drawings.

[0087] As attached Figure 1 As shown, a method for measuring a circular hole based on a tilted, oppositely mounted dual-line structured light sensor is characterized by comprising:

[0088] Step 1: Set up the circular hole measurement system, calibration object, and unified measurement coordinate system; the circular hole measurement system includes two line structured light sensors capable of synchronous linear movement and acquiring the contour of the workpiece to be measured from an inclined opposing position; the calibration object is a long strip substrate with multiple pyramidal and slotted structures; the unified measurement coordinate system is constructed based on the location of the calibration object and is used to uniformly transform the point cloud data acquired by the two line structured light sensors to a coordinate system under the same reference coordinate frame;

[0089] Step 2: Collect point cloud data of the calibration object contour and construct a feature point set; use the dual-line structured light sensor of the circular hole measurement system to collect the complete contour point cloud data of the calibration object placed at the preset position and extract the feature contour point set;

[0090] Step 3: Based on the triangulation model of the feature contour point set and calibration object theory, establish corner matching constraints and feature surface constraints, and construct a robust optimization objective function; iteratively solve the pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system, thereby obtaining the transformation matrix from the coordinate system of each line structured light sensor to the unified measurement coordinate system;

[0091] Step 4: Collect the complete contour point cloud data of the workpiece to be measured and convert it into a complete point cloud of the workpiece under a unified measurement coordinate system;

[0092] Step 5: Extract the neighborhood point cloud of the circular hole from the complete point cloud of the workpiece to be tested. Separate the hole wall from the plane and clean the hole wall point cloud. Perform cylindrical fitting on the cleaned hole wall point cloud. Combine the spatial relationship between the separated hole opening plane point cloud and the fitted cylinder to obtain the center coordinates, diameter, and axial direction vector of the circular hole to be tested, thereby completing the measurement of the circular hole parameters in the workpiece to be tested.

[0093] Further, in step one, the circular hole measurement system specifically includes a first-line structured light sensor, a second-line structured light sensor, a fixed mounting plate, a lead screw module, and a support base; the first-line structured light sensor and the second-line structured light sensor are mounted on the fixed mounting plate in an opposing inclined manner, so that their fields of view overlap in the measurement area to obtain the plane of the circular hole opening and the point cloud of the hole wall in the workpiece to be measured; the lead screw module is used to drive the fixed mounting plate and the first-line structured light sensor and the second-line structured light sensor to move relative to the workpiece to be measured along the linear trajectory of the lead screw module; the... The support base is used to fix the lead screw module and support the workpiece to be measured. A groove for placing the calibration object is set in the test area of ​​the base as the calibration object placement area. The long strip base plate of the calibration object is provided with multiple different feature units along the length direction. Each feature unit includes a regular square truncated pyramid, a groove structure located on the top of the regular square truncated pyramid, and auxiliary small structural features arranged on the side surface of the regular square truncated pyramid. The origin of the unified measurement coordinate system is the midpoint of the bottom edge of one side of the calibration object corresponding to the calibration object placement area. The X-axis direction is the width direction of the corresponding calibration object, the Y-axis is the length direction, and the Z-axis is the height direction.

[0094] Furthermore, step two specifically includes:

[0095] S21: The calibration object in the calibration object placement area is linearly scanned once using a dual-line structured light sensor to obtain two continuous contour point cloud data of the calibration object corresponding to the first line structured light sensor and the second line structured light sensor respectively; each continuous contour point cloud data is composed of multiple frames of contour cross-section point cloud data acquired frame by frame in the scanning order.

[0096] S22: Synchronously record the cumulative displacement information of the lead screw module encoder and establish a mapping relationship between the point cloud data of each frame's contour section and the corresponding cumulative displacement; specifically:

[0097] The coordinates of the i-th contour point acquired by the j-th line structured light sensor in the k-th frame contour cross-section point cloud data in the sensor's local coordinate system are expressed as follows: ,in Indicates the lateral coordinates of the contour points. Represents the height coordinates of the contour points; the scan direction coordinates s are obtained from the cumulative displacement of the encoder. k, The coordinate mapping model from the contour points of the line structured light sensor to the unified measurement coordinate system. As shown in the following formula:

[0098] (1);

[0099] In the above formula, Represents the coordinates in the corresponding sensor's local coordinate system. Transform the point coordinates to a unified measurement coordinate system; Let be the rotation matrix from the j-th line structured light sensor to the unified measurement coordinate system; Let be the translation vector from the j-th line structured light sensor to the unified measurement coordinate system; according to the above formula, the transformation between the local coordinates of the line structured light sensor and the unified measurement coordinate system needs to be determined. and where j = 1 or 2;

[0100] S23: After removing outliers and invalid points from the continuous contour point cloud, extract the corner points, edge points, and feature contour points corresponding to the feature units of the calibration object, specifically including:

[0101] Let the j-th line structured light sensor acquire the contour point cloud in the contour section of the k-th frame. Represented as: (2);

[0102] In the above formula, This represents the total number of contour points acquired by the j-th line structured light sensor in the contour section of the k-th frame;

[0103] All contour points contained in the contour section are obtained and numbered according to their location; a threshold for the change in local direction angle of adjacent contour point vectors is preset, and the local direction vector formed by adjacent numbered contour points is calculated. If the change in direction angle of adjacent local direction vectors is greater than the threshold, the contour points located between adjacent contour point vectors are taken as corner candidate points; all corner candidate points are obtained and the line segments between adjacent corner candidate points are fitted with straight lines to obtain local contour segments.

[0104] A preset threshold is set for the distance from a contour point to the fitted line. If the distance from a contour point in the point cloud of a frame to a local contour segment is less than or equal to the threshold, the point is determined to be an interior point of the local contour segment, and then the interior point set of each local contour segment is constructed. The contour section point cloud data of each frame is traversed and merged to obtain the interior point set of each local contour segment. The interior point set of each local contour segment constitutes the corresponding valid line segment.

[0105] Based on the obtained valid line segments, obtain the set of corner points formed by the intersection points of adjacent valid line segments. The set of edge points formed by the interior points of an effective straight line segment The feature contour point set is composed of the corner point set and the edge point set. The corner point set is used to establish corner matching constraints, and the feature contour point set is used to establish feature surface constraints.

[0106] Furthermore, step three specifically includes:

[0107] S31: Convert the known geometric model of the calibration object into a triangulated theoretical model; this triangulated theoretical model consists of a set of triangular facets as follows. and model corner point set express:

[0108] (3);

[0109] in, These represent the first and second parts of the theoretical model, respectively. The three vertices of a triangular facet; U represents the total number of triangular facets; This represents the l-th model corner point; L is the total number of corner points;

[0110] S32: Establish corner point matching constraints; use nearest neighbor search to match the corner point set obtained in S23. As shown in the following formula for the model corner point set Search for its corresponding corner point:

[0111] (4);

[0112] in, Represents the set of corner points A measured corner point corresponds to a matched theoretical model corner point; The matching index between the measured corner point and the model corner point is used; the matching results are updated iteratively using corner point ICP. When the Euclidean distance between a corner point in the theoretical model and the measured corner point reaches its minimum in the current iteration and meets the preset matching distance threshold, the theoretical model corner point and the measured corner point are determined to be the corresponding matching points.

[0113] S33: Establish feature surface constraints; let the first... The unit normal vector of the plane containing each triangular facet is The plane intercept is Then the reconstructed points under the unified measurement coordinate system The residual to the plane containing the triangular facet for:

[0114] (5);

[0115] The feature surface constraint is used to reflect the degree of fit between the reconstructed point and the local geometric surface of the theoretical model; the smaller the absolute value of the residual, the higher the degree of fit between the reconstructed point and the local feature surface where the corresponding triangular facet is located.

[0116] S34: Construct a robust optimization objective function to characterize the overall matching degree between the reconstructed points and the triangulated theoretical model; this objective function consists of two parts: a corner matching error term and a feature surface error term; wherein, the corner matching error term characterizes the positional deviation between the measured corner point and the corresponding theoretical model corner point, and the feature surface error term characterizes the fitting deviation between the feature contour point and the plane containing the corresponding theoretical triangular facet. The two are weighted by weighting coefficients to jointly constitute the objective to be optimized. The robust optimization objective function is as follows:

[0117] (6);

[0118] in, For robust loss function; The weighting coefficients between the preset corner matching constraints and feature surface constraints; Represents the set of parameters to be determined The overall optimization objective function is given by the set of parameters to be solved. ; Residual represents the positional deviation between the measured corner point and the corresponding theoretical model corner point. This indicates the fitting deviation between the feature contour points and the plane containing the corresponding theoretical triangular facets;

[0119] Solve for the pose parameters of the first and second line structured light sensors relative to a unified measurement coordinate system; Substituting the objective function, the optimal pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system are obtained through iterative optimization of the robust optimization objective function. The optimization process employs weighted SVD, point-to-surface Gauss-Newton iteration, or simplex search to iteratively update the parameters. Based on the optimization results, the transformation matrix from the dual-line structured light sensor to the unified measurement coordinate system is obtained as follows:

[0120] (7).

[0121] Further, step four specifically involves placing the workpiece to be measured within the measurement area of ​​the circular hole measurement system. The lead screw module drives the first and second line structured light sensors to perform a linear scan of the workpiece along a preset scanning path, acquiring the point cloud of the workpiece in the local coordinate system of the sensors. The transformation matrix obtained in step three is used to transform the point cloud of the workpiece to the point set of the workpiece in a unified measurement coordinate system. .

[0122] Furthermore, step five specifically includes:

[0123] S51: Based on the point cloud and point set of the workpiece under test Extract the point cloud of the neighborhood of the circular hole. The point cloud of the neighborhood of the circular hole Includes point cloud of the borehole opening plane and point cloud of the borehole wall;

[0124] S52: Separate the hole wall from the hole opening plane in the neighborhood point cloud of the circular hole; reconstruct the neighborhood point cloud of the circular hole based on the approximate normal vector of the hole opening plane. Perform directional RANSAC plane fitting to obtain the initial orifice plane normal. The approximate normal vector of the orifice plane is the positive Z-axis direction of the unified measurement coordinate system; for the point cloud of the neighborhood of the circular hole. any point in Define the signed distance d from it to the orifice plane. i for:

[0125] (8);

[0126] in, The center point of the point set in the orifice plane after directional RANSAC plane fitting is used as the initial point on the orifice plane after RANSAC plane fitting.

[0127] According to the point Signed distance d to the orifice plane i Calculate the robust scale parameters from all points in the flat neighborhood point cloud of a circular hole to the hole opening plane. :

[0128] (9);

[0129] In the above formula, This represents the signed distance from each point in the neighborhood point cloud to the aperture plane. The median absolute deviation; n represents the number of points in the neighborhood point cloud;

[0130] Construct a threshold for determining points within the plane of the orifice. Threshold for determining candidate points on the hole wall As shown in the following formula:

[0131] (10);

[0132] in, The in-plane distance threshold used for directional RANSAC plane fitting; and These are the preset plane threshold multiple and hole wall threshold multiple, respectively; in this formula, Used to create a safety belt between the orifice plane point and the orifice wall point; This is the preset seat belt width coefficient;

[0133] If point satisfy If the point is determined to be a point within the plane of the orifice, it is then included in the set of points within the plane of the orifice. If point satisfy Then, the point is determined to be a candidate point for the borehole wall and is added to the candidate point set for the borehole wall. ;

[0134] Set of points in the plane of the orifice The least squares algorithm is used for plane fitting refinement. The plane normal obtained after fine fitting is the true normal of the orifice plane. And find the plane intercept. Establish a coordinate system on the fitted and refined orifice plane. ;

[0135] S53: Perform annular purification on candidate points on the orifice wall, including removing abnormal points, mixed non-orifice wall points, and interference points affected by the orifice edge; specifically:

[0136] Set of candidate points on the hole wall All points are projected onto the circular hole plane coordinate system. Then, RANSAC is used to perform two-dimensional circle fitting on the projection points of the borehole wall. For any projection point of the borehole wall... The distance from the center of the fitted circle is ρ i If the candidate point on the hole wall satisfies Then, this point will be retained in the pore wall point set after the annular zone is purified. , where band w The annular band width is determined based on the radial residual statistics from all hole wall projection points to the center of the fitted circle.

[0137] S54: Set of points on the hole wall Perform an initial cylinder fitting once to obtain the axial direction of the initial cylinder axis. A point on the axis and initial radius Then, interior point cleanup and final robust fitting are performed based on the radial residuals; specifically:

[0138] Purified pore wall point set any point in the middle radial distance to the axis of the cylinder for:

[0139] (11);

[0140] in Given a three-dimensional identity matrix; the radial distance from each purified hole wall point cloud to the cylinder axis is related to the initial radius. radial residual for:

[0141] (12);

[0142] Obtain the radial residuals of all purified hole wall point clouds and merge them into a radial residual set; calculate the noise scale of the radial residual set based on equation (9). and with As a rejection threshold, when the purified pore wall points The radial residual satisfies When this happens, the point is identified as an outlier and removed from the inner points of the cylinder fitting.

[0143] A final robust fitting is performed on the point cloud of the hole wall; the nonlinear optimization process for solving the point on the cylinder axis and the radius in the final robust fitting adopts the derivative-free simplex method, and its optimization variables include a point on the cylinder axis. and radius The objective function is optimized as follows:

[0144] (13);

[0145] In the above formula, N is the total number of point clouds on the hole wall; the optimization process, while keeping the axial direction fixed, iteratively updates the variables and reduces the function value to make it converge, so as to obtain the optimal fitting cylinder for the hole wall geometry.

[0146] S55: Based on the optimal fitting cylinder, output the hole parameters of the hole to be tested; the hole parameters include the center coordinates of the hole, the diameter of the hole, and the direction vector of the hole axis;

[0147] Based on the orifice plane parameters obtained in step S52, the equation of the circular orifice plane is obtained as follows: Based on the optimal fitted cylinder parameters obtained in step S54, the cylinder axis passes through the point... The axis direction vector is Then the equation of the cylinder axis is expressed as:

[0148] (14);

[0149] in, The axis parameter is given; substituting the equation of the cylinder axis into the equation of the circular hole opening plane, the intersection point parameter of the cylinder axis and the circular hole opening plane is obtained.

[0150] (15);

[0151] Then Substituting into the equation of the cylinder axis (14), we obtain the coordinates of the center of the circular hole. This leads to the conclusion that the center of the circular hole is included. Circular hole diameter The parameters of the circular hole and the direction vector a of the circular hole axis.

[0152] Example:

[0153] This embodiment illustrates the circular hole measurement system of this method, as shown in the attached diagram. Figure 2 As shown, the circular hole measurement system includes a first-line structured light sensor 1, a second-line structured light sensor 2, a fixed mounting plate 3, a lead screw module 6, and a bearing base 5. In actual working conditions, 6 can be a lead screw module, a linear motor platform, or a robot linear slide; 4 is the workpiece to be measured. The first-line structured light sensor and the second-line structured light sensor are mounted on the fixed mounting plate and installed in an opposing tilted manner. The angle between the light source planes of the two structured light sensors in the figure is about 100°, so that the fields of view of the two form an overlapping measurement area in the area to be measured, so as to obtain the plane of the circular hole opening and the point cloud of the hole wall in the workpiece to be measured.

[0154] like Figure 3 As shown, the line structured light sensor can only acquire the height and lateral coordinates of the contour point cloud, and cannot effectively obtain the scanning direction coordinates of the contour point cloud. Therefore, the coordinates of the i-th contour point acquired by the j-th line structured light sensor in the k-th frame within the sensor's local coordinate system are: To obtain accurate coordinates of the contour point cloud scanning direction, it is necessary to combine the encoder information fed back by the lead screw module, record the cumulative displacement information of the lead screw module encoder, and obtain the contour point cloud scanning direction coordinates for each frame. Define the midpoint of the bottom edge of the right side of the base in the support base as the origin, and establish a world coordinate system with the width direction as the X-axis, the length direction as the Y-axis, and the height direction as the Z-axis. For any line structured light sensor light source plane, define the X-axis... C1 -O C1 -Z C1、 X C2 -O C2 -Z C2 With world coordinate system X W -O W -Z W The angle between the planes is approximately 50°.

[0155] The calibration objects used in this embodiment are specifically as follows: Figure 4 As shown, Figure 4 (a) The selected object adopts a long strip substrate structure, with four feature units 1-4 spaced at different distances along the length of the substrate; each feature unit includes a regular square truncated pyramid, a slotted feature located on the top of the square truncated pyramid, and auxiliary small features arranged on the side surface of the square truncated pyramid; such as Figure 4As shown in (b), the lateral faces of the regular square truncated pyramid are used to provide main feature surfaces with different normals. The grooved feature is used to enhance the top contour variation and depth variation. Four feature units with different distances and auxiliary small features are used to improve the feature uniqueness and feature matching stability during calibration. The origin is set as the midpoint of the bottom edge of one side of feature unit 1 of the theoretical model of the long strip substrate of the calibration object, and a unified measurement coordinate system is set with the length direction of the calibration object as the Y-axis, the height direction as the Z-axis, and the width direction as the X-axis. The calibration object placement area and the area to be measured on the base are as follows: Figure 5 As shown, a long, narrow groove with the same length and width as the calibration plate of the calibration object is set on the base, which is the calibration object placement area. The depth is only half the thickness of the calibration plate of the calibration object. During calibration, the calibration object will be placed in this groove so that the length direction of the calibration object is consistent with the scanning direction. The dotted area is the test area where the workpiece to be tested is placed.

[0156] Verification Example 1:

[0157] This verification example uses the method shown in the appendix. Figure 4 The accuracy and effectiveness of this calibration method are verified using the actual calibration object shown. First, a six-axis absolute arm measuring machine is used to collect point cloud data of the calibration object and reverse engineer it into a triangulated model. This reverse model is then used as the theoretical model for triangulation during calibration. The actual calibration object is placed within the calibration object placement area of ​​the circular hole measuring system. The circular hole measuring system collects the contour point cloud data of the calibration object and performs calibration using this scheme (steps two and three). The calibration results are obtained, and the contour point cloud of the calibration object acquired by the dual-line structured light is converted to a unified measurement coordinate system. A color deviation diagram is created between the converted point cloud and the theoretical model. The specific deviation effect is shown in the figure. Figure 6 As shown, the statistical data of the deviation color chart are as follows:

[0158] Points 118,856 average deviation 0.001mm Standard deviation 0.018mm The point is within ±(1*standard deviation). 94,449 (79.465%) The point is within ±(2*standard deviation). 115,683 (97.330%) The point is within ±(3*standard deviation). 117,491 (98.852%)

[0159] from Figure 6 As can be seen from the table above, the point cloud reconstruction accuracy deviation of the circular hole measurement system after calibration is ±0.04mm. This result shows that the calibration method proposed in this invention has high reconstruction accuracy, can meet the calibration requirements in close-range high-precision line structured light measurement scenarios, and provides support for the accurate solution of subsequent circular hole parameters.

[0160] Verification Example 2:

[0161] This verification example is used to verify the ability of the circular hole measurement method of the present invention to measure small-sized, high-precision circular holes. A circular bushing with a nominal inner diameter of 16 mm is selected as a standard part. This bushing has high machining accuracy, and the inner diameter error is controlled within ±0.005 mm, which can be used as a reference object for the circular hole size measurement experiment. In the experiment, the circular bushing is fixedly placed in the area to be measured by the circular hole measurement system. The tilted opposing dual-line structured light sensor described in the present invention performs a linear scan to obtain complete point cloud data of the circular hole area. Then, according to the dual-sensor unified coordinate transformation method proposed in the present invention (steps two and three), the point cloud obtained from the double-sided scan is reconstructed to a unified measurement coordinate system to obtain the complete point cloud of the bushing's inner hole. Based on this, the circular hole fitting calculation method proposed in the present invention (steps four and five) is used to complete the inner diameter calculation of the circular bushing with a standard inner diameter of 16 mm. Ten independent repeated calculations and measurements were performed on the same circular bushing. The measurement effect of the inner wall of the circular sleeve is as follows. Figure 7 As shown, Figure 7 (a) is the actual object used in this verification example, which is a circular bushing with an inner diameter of 16mm; Figure 7 (b) is a complete point cloud of a circular bushing with an inner diameter of 16 mm, obtained by scanning using a circular hole measurement system; Figure 7 (c) A diagram showing the fitting effect of this method on the inner hole of the circular bushing. The 10 measurements in this verification example yielded a maximum hole diameter of 16.019 mm, a minimum of 16.009 mm, and an average of 16.014 mm. The circular hole measurement method of this invention achieved a repeatability range of 0.010 mm in this verification example, with a repeatability accuracy of approximately ±0.005 mm, reaching a stable measurement level on the order of 0.01 mm, and demonstrating good measurement stability and repeatability.

[0162] Although the present invention has been disclosed above with reference to preferred embodiments, these are not intended to limit the invention. Any person skilled in the art can make various changes or modifications without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be defined by the scope of the claims of this application.

Claims

1. A method for measuring a circular hole based on a tilted, oppositely mounted dual-line structured light sensor, characterized in that: include: Step 1: Set up the circular hole measurement system, calibration object, and unified measurement coordinate system; the circular hole measurement system includes two line structured light sensors capable of synchronous linear movement and acquiring the contour of the workpiece to be measured from an inclined opposing position; the calibration object is a long strip substrate with multiple pyramidal and slotted structures; the unified measurement coordinate system is constructed based on the location of the calibration object and is used to uniformly transform the point cloud data acquired by the two line structured light sensors to a coordinate system under the same reference coordinate frame; Step 2: Collect point cloud data of the calibration object contour and construct a feature point set; The dual-line structured light sensor of the circular aperture measurement system is used to collect the complete contour point cloud data of the calibration object placed at a preset position and extract the feature contour point set. Step 3: Based on the triangulation model of the feature contour point set and calibration object theory, establish corner matching constraints and feature surface constraints, and construct a robust optimization objective function; iteratively solve the pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system, thereby obtaining the transformation matrix from the coordinate system of each line structured light sensor to the unified measurement coordinate system; Step 4: Collect the complete contour point cloud data of the workpiece to be measured and convert it into a complete point cloud of the workpiece under a unified measurement coordinate system; Step 5: Extract the neighborhood point cloud of the circular hole from the complete point cloud of the workpiece to be tested. Separate the hole wall from the plane and clean the hole wall point cloud. Perform cylindrical fitting on the cleaned hole wall point cloud. Combine the spatial relationship between the separated hole opening plane point cloud and the fitted cylinder to obtain the center coordinates, diameter, and axial direction vector of the circular hole to be tested, thereby completing the measurement of the circular hole parameters in the workpiece to be tested.

2. The circular hole measurement method based on a tilted, oppositely mounted dual-line structured light sensor according to claim 1, characterized in that: In step one, the circular hole measurement system specifically includes a first line structured light sensor, a second line structured light sensor, a fixed mounting plate, a lead screw module, and a support base. The first line structured light sensor and the second line structured light sensor are mounted on the fixed mounting plate in an opposing tilt manner, so that their fields of view overlap in the measurement area to obtain the plane of the circular hole opening and the point cloud of the hole wall in the workpiece to be measured. The lead screw module is used to drive the fixed mounting plate and the first and second line structured light sensors to move in opposite directions along the linear trajectory of the lead screw module to the workpiece to be measured. The support base is used to fix the lead screw module and support the workpiece to be measured, and a groove for placing a calibration object is provided in the measurement area of ​​its base as a calibration object placement area. The long strip substrate surface of the calibration object is provided with multiple different feature units along the length direction. Each feature unit includes a regular square frustum, a groove structure located on the top of the regular square frustum, and auxiliary small structural features arranged on the side surface of the regular square frustum. The origin of the unified measurement coordinate system is the midpoint of the bottom edge of one side of the calibration object in the calibration object placement area. The X-axis is the width direction of the corresponding calibration object, the Y-axis is the length direction, and the Z-axis is the height direction.

3. The method for measuring a circular hole based on an inclined, oppositely mounted dual-line structured light sensor according to claim 2, characterized in that: Step two specifically includes: S21: The calibration object in the calibration object placement area is linearly scanned once using a dual-line structured light sensor to obtain two continuous contour point cloud data of the calibration object corresponding to the first line structured light sensor and the second line structured light sensor respectively; each continuous contour point cloud data is composed of multiple frames of contour cross-section point cloud data acquired frame by frame in the scanning order. S22: Synchronously record the cumulative displacement information of the lead screw module encoder and establish a mapping relationship between the point cloud data of each frame's contour section and the corresponding cumulative displacement; specifically: The coordinates of the i-th contour point acquired by the j-th line structured light sensor in the k-th frame contour cross-section point cloud data in the sensor's local coordinate system are expressed as follows: ,in Indicates the horizontal coordinates of the contour points. Represents the height coordinates of the contour points; the scan direction coordinates s are obtained from the cumulative displacement of the encoder. k, The coordinate mapping model from the contour points of the line structured light sensor to the unified measurement coordinate system. As shown in the following formula: (1); In the above formula, Represents the coordinates in the corresponding sensor's local coordinate system. Transform the point coordinates to a unified measurement coordinate system; Let be the rotation matrix from the j-th line structured light sensor to the unified measurement coordinate system; Let be the translation vector from the j-th line structured light sensor to the unified measurement coordinate system; according to the above formula, the transformation between the local coordinates of the line structured light sensor and the unified measurement coordinate system needs to be determined. and where j = 1 or 2; S23: After removing outliers and invalid points from the continuous contour point cloud, extract the corner points, edge points, and feature contour points corresponding to the feature units of the calibration object, specifically including: Let the j-th line structured light sensor acquire the contour point cloud in the contour section of the k-th frame. Represented as: (2); In the above formula, This represents the total number of contour points acquired by the j-th line structured light sensor in the contour section of the k-th frame; All contour points contained in the contour section are obtained and numbered according to their location; a threshold for the change in local direction angle of adjacent contour point vectors is preset, and the local direction vector formed by adjacent numbered contour points is calculated. If the change in direction angle of adjacent local direction vectors is greater than the threshold, the contour points located between adjacent contour point vectors are taken as corner candidate points; all corner candidate points are obtained and the line segments between adjacent corner candidate points are fitted with straight lines to obtain local contour segments. A preset threshold is set for the distance from a contour point to the fitted line. If the distance from a contour point in the point cloud of a frame to a local contour segment is less than or equal to the threshold, the point is determined to be an interior point of the local contour segment, and then the interior point set of each local contour segment is constructed. The contour section point cloud data of each frame is traversed and merged to obtain the interior point set of each local contour segment. The interior point set of each local contour segment constitutes the corresponding valid line segment. Based on the obtained valid line segments, obtain the set of corner points formed by the intersection points of adjacent valid line segments. The set of edge points formed by the interior points of an effective straight line segment The feature contour point set is composed of the corner point set and the edge point set. The corner point set is used to establish corner matching constraints, and the feature contour point set is used to establish feature surface constraints.

4. The method for measuring a circular hole based on an inclined, oppositely mounted dual-line structured light sensor according to claim 3, characterized in that: Step three specifically includes: S31: Convert the known geometric model of the calibration object into a triangulated theoretical model; this triangulated theoretical model consists of a set of triangular facets as follows. and model corner point set express: (3); in, These represent the first and second parts of the theoretical model, respectively. The three vertices of a triangular facet; U represents the total number of triangular facets; This represents the l-th model corner point; L is the total number of corner points; S32: Establish corner point matching constraints; use nearest neighbor search to match the corner point set obtained in S23. As shown in the following formula for the model corner point set Search for its corresponding corner point: (4); in, Represents the set of corner points A measured corner point corresponds to a matched theoretical model corner point; The matching index between the measured corner point and the model corner point is used; the matching results are updated iteratively using corner point ICP. When the Euclidean distance between a corner point in the theoretical model and the measured corner point reaches its minimum in the current iteration and meets the preset matching distance threshold, the theoretical model corner point and the measured corner point are determined to be the corresponding matching points. S33: Establish feature surface constraints; let the first... The unit normal vector of the plane containing the triangular facets is The plane intercept is Then the reconstructed points under the unified measurement coordinate system The residual to the plane containing the triangular facet for: (5); The feature surface constraint is used to reflect the degree of fit between the reconstructed point and the local geometric surface of the theoretical model; the smaller the absolute value of the residual, the higher the degree of fit between the reconstructed point and the local feature surface where the corresponding triangular facet is located. S34: Construct a robust optimization objective function to characterize the overall matching degree between the reconstructed points and the triangulated theoretical model; this objective function consists of two parts: a corner matching error term and a feature surface error term; wherein, the corner matching error term characterizes the positional deviation between the measured corner point and the corresponding theoretical model corner point, and the feature surface error term characterizes the fitting deviation between the feature contour point and the plane containing the corresponding theoretical triangular facet. The two are weighted by weighting coefficients to jointly constitute the objective to be optimized. The robust optimization objective function is as follows: (6); in, For robust loss function; The weighting coefficients between the preset corner matching constraints and feature surface constraints; Represents the set of parameters to be determined The overall optimization objective function is given by the set of parameters to be solved. ; Residual represents the positional deviation between the measured corner point and the corresponding theoretical model corner point. This indicates the fitting deviation between the feature contour points and the plane containing the corresponding theoretical triangular facets; Solve for the pose parameters of the first and second line structured light sensors relative to a unified measurement coordinate system; Substituting the objective function, the optimal pose parameters of the dual-line structured light sensor relative to the unified measurement coordinate system are obtained through iterative optimization of the robust optimization objective function. The optimization process employs weighted SVD, point-to-surface Gauss-Newton iteration, or simplex search to iteratively update the parameters. Based on the optimization results, the transformation matrix from the dual-line structured light sensor to the unified measurement coordinate system is obtained as follows: : (7)。 5. A method for measuring a circular hole based on an inclined, oppositely mounted dual-line structured light sensor, as described in claim 4, characterized in that: Step four involves placing the workpiece to be measured within the measurement area of ​​the circular hole measurement system. The lead screw module drives the first and second line structured light sensors to perform a linear scan of the workpiece along a preset scanning path, acquiring the point cloud of the workpiece in the local coordinate system of the sensors. The transformation matrix obtained in step three is then used to transform the point cloud of the workpiece to a point set of the workpiece in a unified measurement coordinate system. .

6. The method for measuring a circular hole based on an inclined, oppositely mounted dual-line structured light sensor according to claim 5, characterized in that: Step five specifically includes: S51: Based on the point cloud and point set of the workpiece under test Extracting the point cloud of the neighborhood of the circular hole The point cloud of the neighborhood of the circular hole Includes point cloud of the borehole opening plane and point cloud of the borehole wall; S52: Separate the hole wall from the hole opening plane in the neighborhood point cloud of the circular hole; reconstruct the neighborhood point cloud of the circular hole based on the approximate normal vector of the hole opening plane. Perform directional RANSAC plane fitting to obtain the initial orifice plane normal. The approximate normal vector of the orifice plane is the positive Z-axis direction of the unified measurement coordinate system; for the point cloud of the neighborhood of the circular hole. any point in Define the signed distance d from it to the orifice plane. i for: (8); in, The center point of the point set in the orifice plane after directional RANSAC plane fitting is used as the initial point on the orifice plane after RANSAC plane fitting. According to the point Signed distance d to the orifice plane i Calculate the robust scale parameters from all points in the flat neighborhood point cloud of a circular hole to the hole opening plane. : (9); In the above formula, This represents the signed distance from each point in the neighborhood point cloud to the aperture plane. The median absolute deviation; n represents the number of points in the neighborhood point cloud; Construct a threshold for determining points within the plane of the orifice. Threshold for determining candidate points on the hole wall As shown in the following formula: (10); in, The in-plane distance threshold used for directional RANSAC plane fitting; and These are the preset plane threshold multiple and hole wall threshold multiple, respectively; in this formula, Used to create a safety belt between the orifice plane point and the orifice wall point; This is the preset seat belt width coefficient; If point satisfy If the point is determined to be a point within the plane of the orifice, it is then included in the set of points within the plane of the orifice. If point satisfy Then, the point is determined to be a candidate point for the borehole wall and is added to the candidate point set for the borehole wall. ; Set of points in the plane of the orifice The least squares algorithm is used for plane fitting refinement. The plane normal obtained after fine fitting is the true normal of the orifice plane. And find the plane intercept. Establish a coordinate system on the fitted and refined orifice plane. ; S53: Perform annular purification on candidate points on the orifice wall, including removing abnormal points, mixed non-orifice wall points, and interference points affected by the orifice edge; specifically: Set of candidate points on the hole wall All points are projected onto the circular hole plane coordinate system. Then, RANSAC is used to perform two-dimensional circle fitting on the projection points of the borehole wall. For any projection point of the borehole wall... The distance from the center of the fitted circle is ρ i If the candidate point on the hole wall satisfies Then, this point will be retained in the pore wall point set after the annular zone is purified. , where band w The annular band width is determined based on the radial residual statistics from all hole wall projection points to the center of the fitted circle. S54: Set of points on the hole wall Perform an initial cylinder fitting once to obtain the axial direction of the initial cylinder axis. A point on the axis and initial radius Then, interior point cleanup and final robust fitting are performed based on the radial residuals; specifically: Purified pore wall point set any point in the middle radial distance to the axis of the cylinder for: (11); in Given a three-dimensional identity matrix; the radial distance from each purified hole wall point cloud to the cylinder axis is related to the initial radius. radial residual for: (12); Obtain the radial residuals of all purified hole wall point clouds and merge them into a radial residual set; calculate the noise scale of the radial residual set based on equation (9). and with As a rejection threshold, when the purified pore wall points The radial residual satisfies When this happens, the point is identified as an outlier and removed from the inner points of the cylinder fitting. A final robust fitting is performed on the point cloud of the hole wall; the nonlinear optimization process for solving the point on the cylinder axis and the radius in the final robust fitting adopts the derivative-free simplex method, and its optimization variables include a point on the cylinder axis. and radius The objective function is optimized as follows: (13); In the above formula, N is the total number of point clouds on the hole wall; the optimization process, while keeping the axial direction fixed, iteratively updates the variables and reduces the function value to make it converge, so as to obtain the optimal fitting cylinder for the hole wall geometry. S55: Based on the optimal fitting cylinder, output the hole parameters of the hole to be tested; the hole parameters include the center coordinates of the hole, the diameter of the hole, and the direction vector of the hole axis; Based on the orifice plane parameters obtained in step S52, the equation of the circular orifice plane is obtained as follows: Based on the optimal fitted cylinder parameters obtained in step S54, the cylinder axis passes through the point... The axis direction vector is Then the equation of the cylinder axis is expressed as: (14); in, The axis parameter is given; substituting the equation of the cylinder axis into the equation of the circular hole opening plane, the intersection point parameter of the cylinder axis and the circular hole opening plane is obtained. : (15); Then Substituting into the equation of the cylinder axis (14), we obtain the coordinates of the center of the circular hole. This leads to the conclusion that the center of the circular hole is included. Circular hole diameter The parameters of the circular hole and the direction vector a of the circular hole axis.