Visual positioning and guiding method for long cantilever rotary measuring head facing deep cavity small hole measurement
By using a stereo vision-guided calibration and positioning test platform, combined with depth camera and CAD model point cloud data, and employing FPFH features and SAC-IA algorithm for point cloud registration, the problem of insufficient internal structural information of deep cavity small holes was solved, and high-precision automated positioning and measurement were achieved.
Patent Information
- Application Number
- CN202511234316.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-01
AI Technical Summary
Existing visual positioning guidance methods rely on scene point cloud acquisition, which is easily affected by environmental or workpiece occlusion, resulting in insufficient information on the internal structure of deep cavities and small holes, and poor positioning accuracy.
A stereo vision-guided calibration and positioning test platform is adopted. The point cloud data of the workpiece scene is collected by a depth camera. Through point cloud preprocessing, FPFH feature extraction and SAC-IA coarse registration algorithm, coarse registration is performed in combination with CAD model point cloud. The optimal transformation matrix is iteratively calculated to achieve fine registration, fit the attitude of the hole centerline, and control the attitude of the probe end.
It enables precise measurement of internal parameters of deep cavity orifices, avoids the influence of environmental obstruction, improves positioning accuracy and automation level, and meets the measurement needs of complex structural components.
Smart Images

Figure CN120740445B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metrology, and specifically to a visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes. Background Technology
[0002] Small holes with high aspect ratios are widely used in core components in aerospace, nuclear power, and automotive industries. These parts typically contain critical structural parameters that significantly impact key functions such as assembly positioning, heat flow control, and mechanical support. For example, the engine brake of a new energy vehicle, as a crucial braking and energy recovery device, ensures vehicle safety and improves energy efficiency, playing a vital role in overall vehicle performance.
[0003] Brake components contain numerous cavities and holes. These complex internal structures are not only key to achieving lightweight design, but also serve multiple functions such as heat dissipation, structural weight reduction, and mechanical performance optimization. The geometry and shape of these cavities and holes directly affect the brake's stiffness, heat transfer efficiency, and overall durability. Therefore, precise measurement and control of these cavities and holes are fundamental to ensuring stable and reliable brake performance.
[0004] Due to the elongated and narrow geometric characteristics of these cavities and holes, traditional visual measurement methods such as structured light and line lasers struggle to acquire complete three-dimensional information about their interiors without damaging the structure, severely impacting the quality inspection and service performance evaluation of structural components. Currently, the primary method for measuring the critical geometry inside such elongated and narrow cavities and holes is probe-based rotary scanning measurement. To avoid collisions between the probe and the cavity or hole walls during movement, which could damage the measuring instrument or workpiece, manual guidance is often employed. This method relies on the operator visually observing and manually controlling the probe to gradually approach the target measurement position and adjust its posture to penetrate the confined space and complete the measurement task.
[0005] In recent years, with the continuous improvement of industrial automation, more and more industries have placed higher demands on efficient and automated positioning technologies. To replace the human eye in positioning operations, stereo vision cameras are currently used to collect 3D point cloud data of the object under test for point cloud registration. Visual guidance is then used to assist the measuring equipment in completing the positioning task, providing support for subsequent operations. However, traditional visual positioning guidance methods rely on scene-based point cloud acquisition, which is easily affected by environmental or workpiece-specific occlusion, resulting in the inability to provide internal structural information of deep cavities and small holes, leading to poor positioning accuracy.
[0006] Therefore, there is a need for a visual positioning and guidance method for measuring deep cavity small holes using a long cantilever rotating probe that has high positioning accuracy and is not easily affected by environmental or workpiece-related obstructions. Summary of the Invention
[0007] The main objective of this invention is to provide a visual positioning and guidance method for measuring deep cavity small holes using a long cantilever rotating probe, in order to solve the problem that existing visual positioning and guidance methods rely on scene point cloud acquisition, which is easily affected by environmental or workpiece occlusion, resulting in the inability to provide internal structural information of deep cavity small holes and poor positioning accuracy.
[0008] To achieve the above objectives, the present invention provides a visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes, specifically including the following steps:
[0009] S1. Based on the actual size of the workpiece to be tested and the measurement requirements, a stereo vision-guided calibration and positioning test platform is built.
[0010] S2 utilizes the depth camera of the stereo vision-guided calibration and positioning test platform to collect point cloud data of the workpiece scene.
[0011] S3 performs preprocessing on scene point cloud data.
[0012] S4 preprocesses the CAD model point cloud data of the workpiece under test at the same scale as the scene point cloud.
[0013] S5 extracts local FPFH features from the point cloud surface and performs coarse registration of the point cloud using the SAC-IA coarse registration algorithm.
[0014] S6. The point cloud transformation matrix obtained from coarse registration is used as the initial input for fine registration. The transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, resulting in the preliminary point cloud transformation estimation matrix I0. The registration result is evaluated based on the overlap rate. If the result meets the threshold requirement, it is output as the final result, the pose transformation matrix. Otherwise, proceed to step S1 to recalculate.
[0015] S7, Calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism. .
[0016] Furthermore, step S3 specifically includes the following steps:
[0017] S3.1 Read the workpiece scene point cloud data acquired by the depth camera in step S2 and remove the invalid point cloud that cannot be identified.
[0018] S3.2 employs a voxel filtering algorithm to downsample the scene point cloud data.
[0019] S3.3 uses Euclidean clustering algorithm to cluster the point cloud of the workpiece scene, segments out redundant environmental point cloud and noise points, extracts the clustering variables of the workpiece point cloud and saves them to the variable cloud_target.
[0020] Furthermore, step S4 specifically includes the following steps:
[0021] S4.1 calls the CAD model point cloud for downsampling and saves the downsampled point cloud data in the variable cloud_source.
[0022] S4.2 Extract the surface holes from the point cloud data of the CAD model, and use a cylinder fitting algorithm to fit the holes, obtaining the coordinates of the center of the surface holes and the orientation of the cylinder axis, in order to determine the pose transformation matrix of the test points on the workpiece. .
[0023] Furthermore, step S5 specifically includes the following steps:
[0024] S5.1 Calculate the surface normal vectors of the CAD model point cloud and the workpiece scene point cloud respectively.
[0025] S5.2 Calculate the FPFH point features on the surface of the CAD model point cloud and the workpiece scene point cloud based on the normal vector information.
[0026] S5.3, using the extracted FPFH features as reference values, and combining them with the SAC-IA point cloud coarse registration algorithm, the initial transformation matrix for point cloud registration is estimated. .
[0027] Furthermore, step S5.2 specifically includes the following steps:
[0028] S5.2.1 Select a point in the point cloud of the CAD model. ,as well as a point within the neighborhood , and The corresponding normal vectors are respectively and The distance between the two points is Construct a coordinate system based on the relationship between two points and the normal vector. :
[0029] ;
[0030] in, It is a 2-norm.
[0031] S5.2.2, in the coordinate system Constructing ternary features , recorded as feature:
[0032] .
[0033] S5.2.3, each query point is considered in relation to its neighbors. Features are divided into two categories: one is the feature composed of the query point and its neighbors, denoted as... Another type is the feature formed by the neighboring points, denoted as... The final features are obtained by combining them. :
[0034] ;
[0035] in, The number of neighboring points;
[0036] Will They are stored in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh, respectively.
[0037] Furthermore, step S5.3 specifically includes the following steps:
[0038] In step S5.3.1, the variables cloud_source, cloud_target, cloud_source_fpfh, and cloud_target_fpfh are called respectively to perform local registration using the SAC-IA algorithm, selecting n sampling points s in the CAD model point cloud cloud_source. n Let n = 1, 2, 3, ..., and let d be the shortest distance between two points. s Find the sampling point s in the target point cloud cloud_target. n One or more points with similar FPFH features, and a point t is randomly selected from the similar points. n n=1,2,3…, as sampling points s n Calculate the rigid body transformation matrix between the corresponding points.
[0039] S5.3.2, the registration accuracy of the current rigid body transformation matrix is determined by solving the distance error sum function after the corresponding point transformation. The distance error sum function is represented by the Huber penalty function:
[0040] ;
[0041] in, For a pre-defined value, For the first The distance difference between corresponding points after transformation.
[0042] S5.3.3, find the optimal transformation among all transformations that minimizes the error function; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix. .
[0043] Furthermore, step S6 specifically includes the following steps:
[0044] S6.1, respectively call the variables cloud_source, cloud_target, ,Will As the initial transformation for fine registration of point clouds, for each point in cloud_source, the point with the closest Euclidean distance in cloud_target is found to form a corresponding point pair.
[0045] S6.2, using corresponding point pairs, calculate the pose transformation matrix I0 that minimizes the mean square error, calculate the first I0 and apply the mean square error of the transformed CAD model point cloud, iteratively calculate the next I0 based on the first transformation and calculate the mean square error of the transformed CAD model point cloud, until the mean square error is less than the given threshold or the number of iterations reaches the set maximum number of iterations, and then I0 is used as the final output.
[0046] S6.3, applying the final output I0, save the transformed CAD model point cloud to the variable cloud_result, and call the variables cloud_result and cloud_target respectively to read the number of points in the CAD model point cloud. Select points s from the point cloud of the CAD model in sequence. i Let i = 1, 2, 3…, and use a kd-tree structure to search for s. i The nearest point t in the scene point cloud i Given i=1,2,3…, output the corresponding distance d. i Set a distance threshold; if d i If the value is less than the threshold, it is considered an overlapping point and output to the point cloud set. In the end, the registration overlap rate Calculated using the following formula:
[0047] .
[0048] When the overlap rate exceeds the threshold requirement, the final point cloud fine registration 4×4 pose transformation matrix is output. Otherwise, proceed to step S1 to recalculate.
[0049] Further, step S7 specifically involves: reading the pose transformation matrix G of the current rotating scanning probe end relative to the depth camera, and calculating the final displacement matrix of the multi-degree-of-freedom motion mechanism. :
[0050] .
[0051] Furthermore, the stereo vision-guided calibration and positioning test platform consists of: a multi-degree-of-freedom motion mechanism, a depth camera, a 3D optical rotation scanner, the workpiece to be tested, and a PC.
[0052] Further, step S2 specifically involves: acquiring point cloud data of the workpiece scene using a multiple exposure imaging method.
[0053] The present invention has the following beneficial effects:
[0054] This invention, after acquiring point clouds of the scene to be measured by a depth camera, combines them with the CAD model of the object under test. A coarse registration algorithm based on feature matching of model surface points provides good initial values for fine registration, avoiding the algorithm getting trapped in local optima and improving its running speed. An overlap rate calculation module further assists in selecting the optimal registration matrix to achieve accurate probe positioning in the subsequent process.
[0055] This invention can perform the measurement of internal parameters of deep cavities and holes, which is quite difficult. By constraining the point cloud of the CAD model, this invention obtains the three-dimensional information of the deep cavity and hole to be measured, which has been occluded, accurately locates the center position, and fits the attitude of the hole's central axis as the attitude of the end of the rotating scanning probe, thus meeting the measurement requirements of important internal parameters of deep cavities and holes. Attached Figure Description
[0056] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0057] Figure 1 The flowchart illustrates a visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavity orifices according to the present invention.
[0058] Figure 2 A diagram of a stereo vision-guided calibration and positioning test platform is shown.
[0059] Figure 3 The comparison chart of point cloud registration results is shown. Detailed Implementation
[0060] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] likeFigure 1 The method for visual positioning and guidance of a long cantilever rotating probe for measuring deep cavities and small holes, as shown, specifically includes the following steps:
[0062] S1. Based on the actual dimensions and measurement requirements of the workpiece to be tested, a stereo vision-guided calibration and positioning test platform is constructed. The multi-degree-of-freedom motion mechanism of the stereo vision-guided calibration and positioning test platform is controlled to move to the optimal scanning angle, acquiring as many test points as possible from the workpiece. By controlling the scanning depth of the depth camera, while ensuring complete scanning of the surface features of the workpiece, noise data from the surrounding environment is avoided from affecting point cloud processing and registration results.
[0063] S2 utilizes a depth camera on a stereo vision-guided calibration and positioning test platform to acquire point cloud data of the workpiece scene. A binocular camera and projector structure is employed, and a depth map is generated using the principle of structured light imaging. Point cloud data is then generated from the depth map.
[0064] S3 performs preprocessing on scene point cloud data.
[0065] S4 preprocesses the CAD model point cloud data of the workpiece under test at the same scale as the scene point cloud.
[0066] S5 extracts local FPFH features from the point cloud surface and performs coarse registration of the point cloud using the SAC-IA coarse registration algorithm.
[0067] S6. The point cloud transformation matrix obtained from coarse registration is used as the initial input for fine registration. The transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, resulting in the preliminary point cloud transformation estimation matrix I0. The registration result is evaluated based on the overlap rate. If the result meets the threshold requirement, it is output as the final result, the pose transformation matrix. Otherwise, proceed to step S1 to recalculate.
[0068] S7, Calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism. The control system enables precise positioning of the probe tip.
[0069] To facilitate subsequent precise point cloud registration algorithms, reduce computation time, and eliminate noise interference, the collected point cloud data of the workpiece scene needs to undergo invalid point removal, downsampling, and denoising sequentially to obtain processed scene point cloud data. Furthermore, to ensure that the point cloud density of the workpiece scene and the CAD model point cloud are essentially consistent, the CAD model point cloud needs to be downsampled at the same scale. Uniform downsampling using a 3D voxel mesh ensures the uniformity of point cloud density, highlights local point cloud features, and facilitates subsequent processing and matching. A Euclidean clustering algorithm is introduced to segment independent point cloud clusters, and other noisy and redundant point clouds are filtered out based on the actual workpiece point cloud size.
[0070] Specifically, step S3 includes the following steps:
[0071] S3.1 Read the workpiece scene point cloud data collected by the depth camera in step S2, store it in the variable cloud_scan, traverse all data points, remove invalid point clouds that cannot be identified, and save them in the variable cloud_clean.
[0072] In step S3.2, the variable `cloud_clean` is called, and a voxel filtering algorithm is used. The voxel grid size is set to 1.5mm × 1.5mm × 1.5mm to downsample the scene point cloud data. The downsampled point cloud data is then stored in the variable `cloud_voxel`. By using the voxel filtering algorithm to reduce the number of scene point clouds, the computational load and runtime of subsequent algorithms are significantly reduced, enabling fast matching.
[0073] The voxel filtering algorithm removes all points within each voxel square of a specified scale and redefines the center point of the square as the set point to replace the original points, thereby reducing the number of points in the point cloud without affecting the data structure and local features.
[0074] S3.3, Euclidean clustering algorithm is used to cluster the point cloud of the workpiece scene under test, segmenting away redundant environmental point cloud and noise points, extracting the clustering variables of the workpiece point cloud under test and saving them to the variable cloud_target. The variable cloud_voxel is called, using the Euclidean clustering algorithm, setting the clustering distance threshold to 2mm, and adjusting the minimum and maximum number of clustered points according to the actual point cloud size. The clustering results are sequentially saved to the variable cloud_cluster_i, i=1, 2, 3…, and the clustering variables of the workpiece point cloud under test are extracted and saved to the variable cloud_target.
[0075] Euclidean clustering is used to cluster the workpiece scene point cloud, segmenting away redundant environmental point clouds and noise points to avoid the influence of unnecessary environmental noise point clouds on subsequent registration algorithms. Euclidean clustering, by defining a clustering distance threshold, groups two points less than the threshold into a single point cloud. From all the clustered point clouds, the necessary portion is selected, and the remaining portions are segmented and deleted to achieve an efficient and accurate point cloud registration algorithm.
[0076] The CAD model point cloud is processed to significantly reduce the data volume and algorithm runtime, and the test points are fitted. The CAD model point cloud is downsampled at the same scale as the workpiece scene point cloud to maintain consistency in density between the two point clouds and avoid feature matching errors caused by density inconsistencies. The internal data of holes in the CAD model point cloud are segmented to provide 3D information for areas prone to occlusion, and the center portion of the surface hole is fitted to calculate the position and orientation of the probe positioning point. Specifically, step S4 includes the following steps:
[0077] In step S4.1, the point cloud variable `cloud_model` of the CAD model is called, and downsampling is performed in the same way as in step S3.2. The downsampled point cloud data is then stored in the variable `cloud_source`. This voxel downsampling algorithm reduces the number of point clouds in the model, significantly reducing the computational load and runtime of subsequent algorithms, thus enabling rapid matching.
[0078] S4.2 Extract the surface holes from the point cloud data of the CAD model, and use a cylinder fitting algorithm to fit the holes, obtaining the coordinates of the center of the surface holes and the orientation of the cylinder axis, in order to determine the pose transformation matrix of the test points on the workpiece. The variable `cloud_source` is called, and a cylindrical fitting algorithm is used to extract the cavity structure of the workpiece under test by setting a radius threshold. The coordinates of the center of the circular hole on the surface and the orientation of the cylinder axis are calculated and combined into a 4×4 pose transformation matrix, which represents the position and orientation of the test point relative to the model coordinate system. This matrix is then stored. middle.
[0079] The point cloud coarse registration method provides a good initial value for the subsequent point cloud fine registration algorithm, accelerating algorithm convergence and optimizing registration accuracy. Local FPFH features are extracted from the point cloud surface and then matched using the SAC-IA coarse registration algorithm.
[0080] Specifically, step S5 includes the following steps:
[0081] S5.1 Calculate the surface normal vectors of the CAD model point cloud and the workpiece scene point cloud respectively. Call the variables cloud_source and cloud_target respectively, use the kd-tree point cloud data structure, set the number of neighboring points searched K=20, calculate the point cloud normal vectors, and set multi-threading to improve the running speed. Store the calculated point cloud normal vectors in the variables cloud_source_normal and cloud_target_normal respectively.
[0082] S5.2 Calculate the FPFH point features on the surface of the CAD model point cloud and the workpiece scene point cloud based on the normal vector information.
[0083] S5.3, using the extracted FPFH features as reference values, and combining them with the SAC-IA point cloud coarse registration algorithm, the initial transformation matrix for point cloud registration is estimated. .
[0084] Specifically, step S5.2 includes the following steps:
[0085] In S5.2.1, the variables cloud_source, cloud_target, cloud_source_normal, and cloud_target_normal are called respectively. Using a kd-tree point cloud data structure, the neighbor search count K=20 is set to calculate the FPFH feature, and multi-threading is configured to improve execution speed. The specific calculation process is as follows: Select a point from the CAD model point cloud. ,as well as a point within the neighborhood , and The corresponding normal vectors are respectively and The distance between the two points is Construct a coordinate system based on the relationship between two points and the normal vector. :
[0086] ;
[0087] in, It is a 2-norm.
[0088] S5.2.2, in the coordinate system Constructing ternary features , recorded as feature:
[0089] .
[0090] S5.2.3, each query point is considered in relation to its neighbors. Features are divided into two categories: one is the feature composed of the query point and its neighbors, denoted as... Another type is the feature formed by the neighboring points, denoted as... The final features are obtained by combining them. :
[0091] ;
[0092] in, The number of neighboring points;
[0093] Will They are stored in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh, respectively.
[0094] Specifically, step S5.3 includes the following steps:
[0095] In step S5.3.1, the variables cloud_source, cloud_target, cloud_source_fpfh, and cloud_target_fpfh are called respectively to perform local registration using the SAC-IA algorithm, selecting n sampling points s in the CAD model point cloud cloud_source. n Let n = 1, 2, 3, ..., and let d be the shortest distance between two points. s Find the sampling point s in the target point cloud cloud_target. n One or more points with similar FPFH features, and a point t is randomly selected from the similar points. n n=1,2,3…, as sampling points s n Calculate the rigid body transformation matrix between the corresponding points.
[0096] S5.3.2, the registration accuracy of the current rigid body transformation matrix is determined by solving the distance error sum function after the corresponding point transformation. The distance error sum function is represented by the Huber penalty function:
[0097] ;
[0098] in, For a pre-defined value, For the first The distance difference between corresponding points after transformation.
[0099] S5.3.3, find the optimal transformation among all transformations that minimizes the error function; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix. That is, a 4×4 pose transformation matrix .
[0100] Specifically, step S6 includes the following steps:
[0101] S6.1, respectively call the variables cloud_source, cloud_target, ,Will As the initial transformation for fine registration of point clouds, for each point in cloud_source, the point with the closest Euclidean distance in cloud_target is found to form a corresponding point pair.
[0102] S6.2 Calculate the pose transformation matrix I0 that minimizes the mean square error using corresponding point pairs. Calculate the first I0 and apply it to the mean square error of the transformed CAD model point cloud. Iterate through the calculation of the next I0 based on the first transformation and calculate the mean square error of the transformed CAD model point cloud until the mean square error is less than a given threshold or the number of iterations reaches the set maximum number of iterations. The I0 at this point is the final output.
[0103] S6.3, applying the final output I0, save the transformed CAD model point cloud to the variable cloud_result, and call the variables cloud_result and cloud_target respectively to read the number of points in the CAD model point cloud. Select points s from the point cloud of the CAD model in sequence. i Let i = 1, 2, 3…, and use a kd-tree structure to search for s. i The nearest point t in the scene point cloud i Given i=1,2,3…, output the corresponding distance d. i Set the distance threshold to 1mm. If d i If the value is less than the threshold, it is considered an overlapping point and output to the point cloud set. In the end, the registration overlap rate Calculated using the following formula:
[0104] ;
[0105] When the overlap rate exceeds the threshold requirement, the final point cloud fine registration 4×4 pose transformation matrix is output. Otherwise, proceed to step S1 for recalculation. Specifically, step S7 involves: reading the pose transformation matrix G of the current rotating scanning probe end relative to the depth camera, and calculating the final displacement matrix of the multi-degree-of-freedom motion mechanism. :
[0106] .
[0107] By inputting displacement commands to the multi-degree-of-freedom motion mechanism IP, the positioning function of the hole center can be completed.
[0108] Specifically, such as Figure 2 As shown, the stereo vision-guided calibration and positioning test platform consists of a multi-degree-of-freedom motion mechanism, a structured light camera, a rotating scanning probe, a workpiece to be tested (a model of a new energy vehicle engine brake), and a PC. The structured light camera is connected to the PC via a camera network cable, and the multi-degree-of-freedom motion mechanism is connected to the PC via a robot network cable.
[0109] Specifically, step S2 involves acquiring point cloud data of the workpiece scene using a multi-exposure imaging method. To avoid data loss due to workpiece material and structural issues, the acquired workpiece point cloud data is saved in .ply file format.
[0110] like Figure 3 As shown, compared with traditional denoising methods, the Euclidean clustering denoising method of the present invention can remove environmental noise over a large area, thereby selectively retaining the point cloud portion required for registration; compared with the traditional ICP registration method, the registration method of the present invention can avoid the problem of the algorithm getting trapped in local optima due to initial value dependence, achieve more accurate registration results, and ensure a high registration success rate.
[0111] This invention integrates visual guidance and structural modeling to realize a precise positioning algorithm for long cantilever stereo vision, so as to accurately locate small holes in deep cavities on the surface of workpieces, and improve the measurement capability and automation level of internal geometric parameters of complex structural parts.
[0112] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes, characterized in that, Specifically, the steps include the following: S1. Based on the actual size of the workpiece to be tested and the measurement requirements, a stereo vision-guided calibration and positioning test platform is built. The stereo vision-guided calibration and positioning test platform consists of: a multi-degree-of-freedom motion mechanism, a depth camera, a 3D optical rotation scanner, the workpiece to be tested, and a PC. S2, using the depth camera of the stereo vision-guided calibration and positioning test platform to collect point cloud data of the workpiece scene; S3, preprocesses scene point cloud data; S4, preprocess the CAD model point cloud data of the workpiece under test at the same scale as the scene point cloud; S5. Extract local FPFH features from the point cloud surface and perform coarse registration of the point cloud using the SAC-IA coarse registration algorithm. S6. The point cloud transformation matrix obtained from coarse registration is used as the initial input for fine registration. The transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, resulting in the preliminary point cloud transformation estimation matrix I0. The registration result is evaluated based on the overlap rate. If the result meets the threshold requirement, it is output as the final result, the pose transformation matrix. Otherwise, proceed to step S1 and recalculate; S7, Calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism. ; Step S5 specifically includes the following steps: S5.1 Calculate the surface normal vectors of the CAD model point cloud and the workpiece scene point cloud respectively; S5.2 Calculate the FPFH point features on the surface of the CAD model point cloud and the workpiece scene point cloud based on the normal vector information; S5.3, using the extracted FPFH features as reference values, and combining them with the SAC-IA point cloud coarse registration algorithm, the initial transformation matrix for point cloud registration is estimated. ; Step S5.2 specifically includes the following steps: S5.2.1 Select a point in the point cloud of the CAD model. ,as well as a point within the neighborhood , and The corresponding normal vectors are respectively and The distance between the two points is Construct a coordinate system based on the relationship between two points and the normal vector. : ; in, It is a 2-norm; S5.2.2, in the coordinate system Constructing ternary features , recorded as feature: ; S5.2.3, each query point is considered in relation to its neighbors. Features are divided into two categories: one is the feature composed of the query point and its neighbors, denoted as... Another type is the feature formed by the neighboring points, denoted as... The final features are obtained by combining them. : ; in, The number of neighboring points; Will These are stored respectively in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh; Step S5.3 specifically includes the following steps: In step S5.3.1, the variables cloud_source, cloud_target, cloud_source_fpfh, and cloud_target_fpfh are called respectively to perform local registration using the SAC-IA algorithm, selecting n sampling points s in the CAD model point cloud cloud_source. n Let n = 1, 2, 3, ..., and let d be the shortest distance between two points. s Find the sampling point s in the target point cloud cloud_target. n One or more points with similar FPFH features, and a point t is randomly selected from the similar points. n n=1,2,3…, as sampling points s n Calculate the rigid body transformation matrix between the corresponding points; S5.3.2, the registration accuracy of the current rigid body transformation matrix is determined by solving the distance error sum function after the corresponding point transformation. The distance error sum function is represented by the Huber penalty function: ; in, For a pre-defined value, For the first The distance difference between corresponding points after transformation; S5.3.3, find the optimal transformation among all transformations that minimizes the distance error and the function value; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix. ; Step S7 specifically involves: reading the pose transformation matrix G of the current 3D optical rotating scanner end relative to the depth camera, and calculating the final displacement matrix of the multi-degree-of-freedom motion mechanism. : ; in, This is the pose transformation matrix of the test points on the workpiece to be tested.
2. The visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes according to claim 1, characterized in that, Step S3 specifically includes the following steps: S3.1 Read the workpiece scene point cloud data acquired by the depth camera in step S2 and remove the invalid point cloud that cannot be identified; S3.2, a voxel filtering algorithm is used to downsample the scene point cloud data; S3.3 uses Euclidean clustering algorithm to cluster the point cloud of the workpiece scene, segments out redundant environmental point cloud and noise points, extracts the clustering variables of the workpiece point cloud and saves them to the variable cloud_target.
3. The visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes according to claim 1, characterized in that, Step S4 specifically includes the following steps: S4.1, call the CAD model point cloud for downsampling, and save the downsampled point cloud data in the variable cloud_source; S4.2 Extract the surface holes from the point cloud data of the CAD model, and use a cylinder fitting algorithm to fit the holes, obtaining the coordinates of the center of the surface holes and the orientation of the cylinder axis, in order to determine the pose transformation matrix of the test points on the workpiece. .
4. The visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes according to claim 1, characterized in that, Step S6 specifically includes the following steps: S6.1, respectively call the variables cloud_source, cloud_target, ,Will As the initial transformation for fine registration of point clouds, for each point in cloud_source, find the point in cloud_target with the closest Euclidean distance to form a corresponding point pair; S6.2, using corresponding point pairs, calculate the pose transformation matrix I0 that minimizes the mean square error, calculate the first I0 and apply the mean square error of the transformed CAD model point cloud, iteratively calculate the next I0 based on the first transformation and calculate the mean square error of the transformed CAD model point cloud, until the mean square error is less than the given threshold or the number of iterations reaches the set maximum number of iterations, and then I0 is used as the final output. S6.3, applying the final output I0, save the transformed CAD model point cloud to the variable cloud_result, and call the variables cloud_result and cloud_target respectively to read the number of points in the CAD model point cloud. Select points s from the point cloud of the CAD model in sequence. i Let i = 1, 2, 3…, and use a kd-tree structure to search for s. i The nearest point t in the scene point cloud i Given i=1,2,3…, output the corresponding distance d. i Set a distance threshold; if d i If the value is less than the threshold, it is considered an overlapping point and output to the point cloud set. In the end, the registration overlap rate Calculated using the following formula: ; When the overlap rate exceeds the threshold requirement, the final point cloud fine registration 4×4 pose transformation matrix is output. Otherwise, proceed to step S1 to recalculate.
5. The visual positioning and guidance method for a long cantilever rotating probe for measuring deep cavities and small holes according to claim 1, characterized in that, Step S2 specifically involves: acquiring point cloud data of the workpiece scene using a multiple exposure imaging method.
Citation Information
Patent Citations
Point cloud registration method based on improved FPFH-ICP
CN115861397A
Stereoscopic vision accurate positioning method based on CAD model constraint of to-be-tested part
CN118397106A