Visual positioning and guiding method for long-cantilever rotary measuring head for 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 poor positioning accuracy in deep cavity hole measurement was solved, and accurate measurement of internal parameters of deep cavity holes was achieved.
Patent Information
- Application Number
- CN202511234316.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-10-03
- 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, which combines depth camera to collect point cloud data of workpiece scene. Through point cloud preprocessing, FPFH feature extraction and SAC-IA coarse registration algorithm, fine registration is performed in combination with CAD model point cloud, and displacement matrix of multi-degree-of-freedom motion mechanism is calculated to achieve accurate positioning of probe.
It improves the positioning accuracy of deep cavity small hole measurement, avoids the influence of environmental or workpiece obstruction, and realizes accurate measurement of internal parameters of deep cavity holes.
Smart Images

Figure CN120740445A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of metrology, and in particular to a visual positioning and guiding method for a long cantilever rotary probe for deep cavity and small hole measurement. Background Art
[0002] Small holes with large aspect ratios are widely found in core components in aviation, aerospace, nuclear power, automotive, and other fields. These parts often contain critical structural parameters that significantly impact key functions such as assembly positioning, thermal flow regulation, and mechanical support. For example, the engine brake in new energy vehicles, as a key braking and energy recovery device, ensures vehicle safety and energy efficiency, and plays a vital role in overall vehicle performance.
[0003] Brake components contain numerous cavities and holes. These complex internal structures are not only crucial for lightweight design but also serve multiple functions, including heat dissipation, structural weight reduction, and mechanical performance optimization. The geometric size and shape of these cavities and holes directly impact the brake's stiffness, thermal conductivity, and overall durability. Therefore, precise measurement and control of these cavities and holes are essential for ensuring stable and reliable brake performance.
[0004] Due to the long, narrow geometric features of these cavities and holes, traditional visual measurement methods such as surface structured light and line lasers are unable to obtain complete three-dimensional information of their interior without damaging the structure, which seriously affects the quality inspection and service performance evaluation of structural parts. At present, the means of measuring the key geometry inside such long, narrow cavities and holes are mainly probe-type rotary scanning measurements. In order to prevent the probe from colliding with the cavity or hole wall during movement, thereby damaging the measuring instrument or workpiece, manual guidance is often used. This method relies on the operator to observe with the naked eye and manually control the probe tip to gradually approach the target measurement position and adjust its posture to complete the measurement task in a narrow space.
[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 completing positioning operations, stereo vision cameras are currently often used to collect three-dimensional point cloud data of the object to be measured for point cloud registration. Vision guidance is used to assist measurement equipment in completing positioning tasks and provide support for subsequent operations. However, traditional visual positioning guidance methods rely on scene-based point cloud acquisition and are easily affected by occlusion from the environment or the workpiece itself. This makes it impossible to provide internal structural information of deep cavities and small holes, resulting in poor positioning accuracy.
[0006] Therefore, there is a need for a visual positioning and guidance method for a long cantilever rotary probe for deep cavity and small hole measurement with high positioning accuracy and not easily affected by the environment or the workpiece itself. Summary of the Invention
[0007] The main purpose of the present invention is to provide a visual positioning and guidance method for a long cantilever rotating probe for deep cavity and small hole measurement, so as to solve the problem that the visual positioning and guidance method in the prior art relies on scene acquisition point cloud, is easily affected by the environment or the workpiece itself, resulting in the inability to provide internal structure information of deep cavity and small hole and poor positioning accuracy.
[0008] To achieve the above objectives, the present invention provides a visual positioning and guidance method for a long cantilever rotary probe for deep cavity and small hole measurement, which specifically includes the following steps: S1: Build a stereo vision guided calibration and positioning test platform based on the actual size and measurement requirements of the workpiece to be measured.
[0009] S2 uses the depth camera of the stereo vision-guided calibration and positioning test platform to collect point cloud data of the workpiece scene.
[0010] S3, preprocessing the scene point cloud data.
[0011] S4, pre-processing the CAD model point cloud data of the workpiece to be measured at the same scale as the scene point cloud.
[0012] S5, extract the local FPFH features of the point cloud surface and perform rough registration of the point cloud in combination with the SAC-IA rough registration algorithm.
[0013] S6, the point cloud transformation matrix obtained by coarse registration is used as the initial value input for fine registration, and the transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, and the preliminary point cloud transformation estimation matrix I0 is obtained; the registration result is evaluated according to the overlap rate, and if the result meets the threshold requirement, the pose transformation matrix is output as the final result , otherwise go to step S1 and recalculate.
[0014] S7, calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism .
[0015] Furthermore, step S3 specifically includes the following steps: S3.1, read the workpiece scene point cloud data collected by the depth camera in step S2, and remove invalid point clouds that cannot be recognized.
[0016] S3.2, uses voxel filtering algorithm to downsample the scene point cloud data.
[0017] S3.3, use the Euclidean clustering algorithm to cluster the scene point cloud of the workpiece to be tested, segment the redundant environmental point cloud and noise points, extract the cluster variable of the workpiece point cloud to be tested and save it to the variable cloud_target.
[0018] Furthermore, step S4 specifically includes the following steps: S4.1, call the CAD model point cloud for downsampling, and save the point cloud data obtained after downsampling in the variable cloud_source.
[0019] S4.2, extract the holes on the surface of the CAD model point cloud data, use the cylindrical fitting algorithm to fit the holes, obtain the coordinates of the center of the hole on the surface and the posture of the cylinder axis, and determine the posture transformation matrix of the test point of the workpiece to be tested. .
[0020] Furthermore, 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.
[0021] S5.2, calculate the FPFH point features of the CAD model point cloud and the workpiece scene point cloud surface respectively based on the normal vector information.
[0022] S5.3, using the extracted FPFH features as reference values, combined with the SAC-IA point cloud coarse registration algorithm, estimates the initial transformation matrix of the point cloud registration .
[0023] Furthermore, step S5.2 specifically includes the following steps: S5.2.1, select a point in the CAD model point cloud ,as well as A point in the neighborhood , and The corresponding normal vectors are and , the distance between the two points is , construct a coordinate system based on the relationship between two points and the normal vector : ; in, is the two-norm.
[0024] S5.2.2, in the coordinate system Construct ternary features , recorded as feature: .
[0025] S5.2.3, each query point is represented by the neighboring Features are divided into two categories. One category is the features composed of the query point and its neighboring points, which is recorded as ; The other type is the features composed of neighboring points, recorded as , and combine to get the final features : ; in, is the number of neighboring points; Will They are saved in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh respectively.
[0026] Furthermore, step S5.3 specifically includes the following steps: S5.3.1, call the variables cloud_source, cloud_target, cloud_source_fpfh and cloud_target_fpfh respectively, use the SAC-IA algorithm to perform local registration, and select n sampling points s in the CAD model point cloud cloud_source n , n=1,2,3…, set the shortest distance between two points to d s , find the sampling point s in the target point cloud cloud_target n One or more points with similar FPFH features, randomly select a point t from the similar points n ,n=1,2,3…,as sampling point s n , and calculate the rigid body transformation matrix between the corresponding points.
[0027] 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 points are transformed. The distance error sum function is expressed using the Huber penalty function: ; in, is a predetermined value, For the The distance difference between the corresponding points of a group after transformation.
[0028] S5.3.3, find a set of optimal transformations that minimize the error function among all transformations; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix .
[0029] Furthermore, step S6 specifically includes the following steps: S6.1, respectively call the variables cloud_source, cloud_target, ,Will As the initial transformation for point cloud registration, for each point in cloud_source, find the point with the closest Euclidean distance in cloud_target to form a corresponding point pair.
[0030] S6.2, using the corresponding point pairs, calculate the pose transformation matrix I0 that minimizes the mean square error. Calculate the first I0 and apply the transformed CAD model point cloud to calculate the mean square error. Iteratively calculate the next I0 based on the first transformation and calculate the mean square error of the CAD model point cloud after applying the transformation 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 used as the final output.
[0031] S6.3, apply the final output I0, save the transformed CAD model point cloud to the variable cloud_result, call the variables cloud_result and cloud_target respectively, and read the number of CAD model point cloud points. , select point s in the CAD model point cloud in turn i , i=1,2,3…, use kd tree structure to search s i The point t in the scene point cloud closest to i , i=1,2,3…, output the corresponding distance d i , set the distance threshold, if d i If the value is less than the threshold, it is considered as a coincidence point and output to the point cloud collection. The final registration coincidence rate Calculated by the following formula: .
[0032] When the overlap rate is higher than the threshold requirement, the final point cloud registration 4×4 pose transformation matrix is output , otherwise go to step S1 and recalculate.
[0033] Furthermore, step S7 is specifically as follows: reading the posture 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 : .
[0034] Furthermore, the stereo vision guided calibration and positioning test platform includes: a multi-degree-of-freedom motion mechanism, a depth camera, a three-dimensional optical rotation scanner, a workpiece to be tested and a PC.
[0035] Furthermore, step S2 specifically includes: using a multiple exposure imaging method to collect workpiece scene point cloud data.
[0036] The present invention has the following beneficial effects: After the depth camera captures the scene point cloud of the object to be measured, the present invention combines it with the CAD model of the object to be measured. A coarse registration algorithm based on surface point feature matching of the model provides a good initial value for fine registration, preventing the algorithm from falling into a local optimum and improving its operation speed. In combination with an overlap calculation module, the optimal registration matrix is selected to achieve subsequent precise positioning of the probe.
[0037] The present invention can complete the measurement of internal parameters of deep cavities and holes, which are more difficult. Through the point cloud constraints of the CAD model, the present invention obtains the three-dimensional information of the deep cavity and hole to be measured that has been obscured, accurately locates the center position, and fits the posture of the hole's central axis as the posture of the end of the rotating scanning probe, meeting the measurement requirements of important parameters inside the deep cavity hole. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the specific embodiments or the description of the prior art. 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 work. In the drawings: Figure 1 The flowchart of the visual positioning and guiding method of a long cantilever rotary probe for deep cavity small hole measurement of the present invention is shown.
[0039] Figure 2 A diagram of the stereo vision-guided calibration and positioning test platform is shown.
[0040] Figure 3 A comparison of point cloud registration effects is shown. DETAILED DESCRIPTION
[0041] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0042] like Figure 1 The visual positioning and guidance method of a long cantilever rotary probe for deep cavity and small hole measurement shown in the figure specifically includes the following steps: S1: Build a stereo vision-guided calibration and positioning test platform based on the actual dimensions and measurement requirements of the workpiece. Control the multi-degree-of-freedom motion mechanism of the stereo vision-guided calibration and positioning test platform to the optimal scanning angle to capture as complete a view of all test points on the workpiece as possible. By controlling the depth of the depth camera, the surface features of the workpiece are fully scanned while avoiding noise from the surrounding environment that could affect point cloud processing and registration.
[0043] S2 uses the depth camera of the stereo vision-guided calibration and positioning test platform to collect point cloud data of the workpiece scene. Using a binocular camera plus a projector, it uses the principle of structured light imaging to generate a depth map, which is then used to generate point cloud data.
[0044] S3, preprocessing the scene point cloud data.
[0045] S4, pre-processing the CAD model point cloud data of the workpiece to be measured at the same scale as the scene point cloud.
[0046] S5, extract the local FPFH features of the point cloud surface and perform rough registration of the point cloud in combination with the SAC-IA rough registration algorithm.
[0047] S6, the point cloud transformation matrix obtained by coarse registration is used as the initial value input for fine registration, and the transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, and the preliminary point cloud transformation estimation matrix I0 is obtained; the registration result is evaluated according to the overlap rate, and if the result meets the threshold requirement, the pose transformation matrix is output as the final result , otherwise go to step S1 and recalculate.
[0048] S7, calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism , the control system realizes precise positioning of the probe end.
[0049] To facilitate the subsequent precise point cloud registration algorithm, reduce computing time, and eliminate noise interference, the collected scene point cloud data of the workpiece to be measured needs to be sequentially subjected to invalid point removal, downsampling, and denoising to obtain the processed scene point cloud data. In addition, to ensure that the density of the scene point cloud of the workpiece to be measured and the CAD model point cloud are basically consistent, the CAD model point cloud needs to be downsampled to the same scale. The introduction of uniform downsampling of the three-dimensional voxel grid ensures the uniformity of the point cloud density, highlights the local features of the point cloud, and facilitates subsequent processing and matching. The introduction of the Euclidean clustering algorithm divides independent point cloud clusters and filters out other noisy point clouds and redundant point clouds based on the actual point cloud scale of the workpiece.
[0050] Specifically, step S3 includes the following steps: 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 unrecognizable invalid point clouds, and save it in the variable cloud_clean.
[0051] In step S3.2, call the variable cloud_clean and use a voxel filtering algorithm. Set the voxel grid size to 1.5mm × 1.5mm × 1.5mm to downsample the scene point cloud data and save the resulting point cloud data in the variable cloud_voxel. Using the voxel filtering algorithm to reduce the number of scene point clouds significantly reduces the computational effort and runtime of subsequent algorithms, enabling fast matching.
[0052] The voxel filtering algorithm removes all points within each voxel grid of a specified scale and redefines the center point of the grid as the collection point to replace the original point, thereby reducing the number of point clouds without affecting the point cloud data structure and local features.
[0053] In step S3.3, cluster the scene point cloud of the workpiece under test using the Euclidean clustering algorithm, segmenting redundant environmental point clouds and noise points. Extract the cluster variables of the workpiece point cloud and save them to the variable cloud_target. Invoke the variable cloud_voxel and use the Euclidean clustering algorithm. Set the clustering distance threshold to 2 mm and adjust the minimum and maximum number of cluster points based on the actual point cloud size. Save the clustering results in the variables cloud_cluster_i, where i = 1, 2, 3, etc. Extract the cluster variables of the workpiece point cloud and save them to the variable cloud_target.
[0054] The Euclidean clustering algorithm clusters the workpiece scene point cloud, segmenting out redundant environmental point clouds and noise points to prevent the impact of unnecessary environmental noise on the subsequent registration algorithm. The Euclidean clustering algorithm uses a specified clustering distance threshold to cluster two points within a specified distance into a single point cloud. From all clustered point clouds, the algorithm selects the required points and segmentes and deletes the remaining points, achieving an efficient and accurate point cloud registration algorithm.
[0055] The CAD model point cloud is processed to significantly reduce the data volume, shorten the algorithm runtime, and fit the test points. The CAD model point cloud is downsampled to the same scale as the workpiece scene point cloud to maintain the consistency of the density of the two point clouds and avoid feature matching errors caused by density inconsistency. The internal data of the CAD model point cloud holes is segmented to provide 3D information of areas that are easily obstructed, the center of the surface hole is fitted, and the position and posture of the probe positioning point are calculated. Specifically, step S4 includes the following steps:
[0056] In step S4.1, call the CAD model point cloud variable cloud_model and perform downsampling as in step S3.2. The resulting point cloud data is stored in the variable cloud_source. Using the voxel downsampling algorithm to reduce the number of model point clouds significantly reduces the computational effort and runtime of subsequent algorithms, enabling fast matching.
[0057] S4.2, extract the holes on the surface of the CAD model point cloud data, use the cylindrical fitting algorithm to fit the holes, obtain the coordinates of the center of the hole on the surface and the posture of the cylinder axis, and determine the posture transformation matrix of the test point of the workpiece to be tested. Call the variable cloud_source, use the cylinder fitting algorithm, set the radius threshold to extract the cavity structure of the workpiece to be measured, calculate the coordinates of the center of the surface hole and the posture of the cylinder axis, and combine them into a 4×4 posture transformation matrix, which is the position and posture of the measured point relative to the model coordinate system, and store it in the matrix middle.
[0058] The point cloud coarse registration method provides a good initial value for the subsequent point cloud fine registration algorithm, accelerates algorithm convergence and optimizes registration accuracy. It extracts local FPFH features from the point cloud surface and combines them with the SAC-IA coarse registration algorithm for matching.
[0059] Specifically, step S5 includes the following steps: S5.1 calculates the surface normals for the CAD model point cloud and the workpiece scene point cloud. Call the variables cloud_source and cloud_target, respectively, using the kd-tree point cloud data structure. Set the number of neighboring points to 20 to calculate the point cloud normals. Set multithreading to increase execution speed. Save the calculated point cloud normals in the variables cloud_source_normal and cloud_target_normal, respectively.
[0060] S5.2, calculate the FPFH point features of the CAD model point cloud and the workpiece scene point cloud surface respectively based on the normal vector information.
[0061] S5.3, using the extracted FPFH features as reference values, combined with the SAC-IA point cloud coarse registration algorithm, estimates the initial transformation matrix of the point cloud registration .
[0062] Specifically, step S5.2 includes the following steps: S5.2.1, respectively call the variables cloud_source, cloud_target, cloud_source_normal and cloud_target_normal, use the kd tree point cloud data structure, set the search neighboring points K = 20, calculate the FPFH feature, and set multi-threading to improve the running speed. The specific calculation process is as follows. Select a point in the CAD model point cloud ,as well as A point in the neighborhood , and The corresponding normal vectors are and , the distance between the two points is , construct a coordinate system based on the relationship between two points and the normal vector : ; in, is the two-norm.
[0063] S5.2.2, in the coordinate system Construct ternary features , recorded as feature: .
[0064] S5.2.3, each query point is represented by the neighboring Features are divided into two categories. One category is the features composed of the query point and its neighboring points, which is recorded as ; The other type is the features composed of neighboring points, recorded as , and combine to get the final features : ; in, is the number of neighboring points; Will They are saved in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh respectively.
[0065] Specifically, step S5.3 includes the following steps: S5.3.1, call the variables cloud_source, cloud_target, cloud_source_fpfh and cloud_target_fpfh respectively, use the SAC-IA algorithm to perform local registration, and select n sampling points s in the CAD model point cloud cloud_source n , n=1,2,3…, set the shortest distance between two points to ds , find the sampling point s in the target point cloud cloud_target n One or more points with similar FPFH features, randomly select a point t from the similar points n ,n=1,2,3…,as sampling point s n , and calculate the rigid body transformation matrix between the corresponding points.
[0066] 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 points are transformed. The distance error sum function is expressed using the Huber penalty function: ; in, is a predetermined value, For the The distance difference between the corresponding points of a group after transformation.
[0067] S5.3.3, find a set of optimal transformations that minimize the error function among all transformations; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix , that is, the 4×4 pose transformation matrix .
[0068] Specifically, step S6 includes the following steps: S6.1, respectively call the variables cloud_source, cloud_target, ,Will As the initial transformation for point cloud registration, for each point in cloud_source, find the point with the closest Euclidean distance in cloud_target to form a corresponding point pair.
[0069] S6.2, using the corresponding point pairs, calculate the pose transformation matrix I0 that minimizes the mean square error, calculate the first I0 and apply the transformed CAD model point cloud to calculate the mean square error, iteratively calculate the next I0 based on the application of the first transformation and calculate the mean square error of the CAD model point cloud after applying the transformation, until the mean square error is less than the given threshold or the number of iterations reaches the set maximum number of iterations, and the I0 at this time is used as the final output.
[0070] S6.3, apply the final output I0, save the transformed CAD model point cloud to the variable cloud_result, call the variables cloud_result and cloud_target respectively, and read the number of CAD model point cloud points. , select point s in the CAD model point cloud in turn i , i=1,2,3…, use kd tree structure to search si The point t in the scene point cloud closest to i , i=1,2,3…, output the corresponding distance d i , set the distance threshold = 1mm, if d i If the value is less than the threshold, it is considered as a coincidence point and output to the point cloud collection. The final registration coincidence rate Calculated by the following formula: ; When the overlap rate is higher than the threshold requirement, the final point cloud registration 4×4 pose transformation matrix is output Otherwise, go to step S1 and recalculate. Specifically, step S7 is as follows: read the posture transformation matrix G of the current rotating scanning probe end relative to the depth camera, and calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism : .
[0071] By inputting the displacement command to the multi-degree-of-freedom motion mechanism IP, the positioning function of the hole center can be completed.
[0072] Specifically, if Figure 2 As shown in the figure, the stereo vision-guided calibration and positioning test platform consists of a multi-degree-of-freedom motion mechanism, a structured light camera, a rotary scanning probe, a workpiece to be tested (a new energy vehicle engine brake model), 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.
[0073] Specifically, step S2 is as follows: using a multiple exposure imaging method to collect workpiece scene point cloud data. To avoid scan data loss due to workpiece material and structure issues, the collected workpiece point cloud data is saved in a ply file format.
[0074] like Figure 3 As shown in the figure, compared with the traditional denoising method, the Euclidean clustering denoising method of the present invention can remove large areas of environmental noise, thereby selectively retaining the point cloud part required for registration; compared with the traditional ICP registration method, the registration method of the present invention can avoid the problem of the algorithm falling into local optimality due to dependence on the initial value, can achieve more accurate registration effect, and ensure a higher registration success rate.
[0075] The present invention integrates visual guidance and structural modeling to realize a long cantilever stereo vision precise positioning algorithm to complete the precise positioning of deep cavity holes on the workpiece surface, thereby improving the measurement capability and automation level of the internal geometric parameters of complex structural parts.
[0076] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.
Claims
1. A visual positioning and guidance method for a long cantilever rotary probe for deep cavity and small hole measurement, characterized in that: The specific steps include: S1: Build a stereo vision guided calibration and positioning test platform based on the actual size and measurement requirements of the workpiece to be measured; S2, uses the depth camera of the stereo vision-guided calibration and positioning test platform to collect the workpiece scene point cloud data; S3, preprocessing the scene point cloud data; S4, pre-processing the CAD model point cloud data of the workpiece to be measured at the same scale as the scene point cloud; S5, extract the local FPFH features of the point cloud surface and perform rough registration of the point cloud in combination with the SAC-IA rough registration algorithm; S6, the point cloud transformation matrix obtained by coarse registration is used as the initial value input for fine registration, and the transformation matrix is iteratively calculated to minimize the root mean square error of the distance between the two point clouds, and the preliminary point cloud transformation estimation matrix I0 is obtained; the registration result is evaluated according to the overlap rate, and if the result meets the threshold requirement, the pose transformation matrix is output as the final result , otherwise go to step S1 and recalculate; S7, calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism .
2. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1 is characterized in that: Step S3 specifically includes the following steps: S3.1, read the workpiece scene point cloud data collected by the depth camera in step S2, and remove invalid point clouds that cannot be recognized; S3.2, using voxel filtering algorithm to downsample the scene point cloud data; S3.3, use the Euclidean clustering algorithm to cluster the scene point cloud of the workpiece to be tested, segment the redundant environmental point cloud and noise points, extract the cluster variable of the workpiece point cloud to be tested and save it to the variable cloud_target.
3. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1 is characterized in that: Step S4 specifically includes the following steps: S4.1, call the CAD model point cloud for downsampling, and save the point cloud data obtained after downsampling in the variable cloud_source; S4.2, extract the holes on the surface of the CAD model point cloud data, use the cylindrical fitting algorithm to fit the holes, obtain the coordinates of the center of the hole on the surface and the posture of the cylinder axis, and determine the posture transformation matrix of the test point of the workpiece to be tested. .
4. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1, characterized in that: Step S5 specifically includes the following steps: S5.1, respectively calculating the surface normal vectors of the CAD model point cloud and the workpiece scene point cloud; S5.2, calculate the FPFH point features of the CAD model point cloud and the workpiece scene point cloud surface respectively based on the normal vector information; S5.3, using the extracted FPFH features as reference values, combined with the SAC-IA point cloud coarse registration algorithm, estimates the initial transformation matrix of the point cloud registration .
5. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 4, characterized in that: Step S5.2 specifically includes the following steps: S5.2.1, select a point in the CAD model point cloud ,as well as A point in the neighborhood , and The corresponding normal vectors are and , the distance between the two points is , construct a coordinate system based on the relationship between two points and the normal vector : ; in, is the two-norm; S5.2.2, in the coordinate system Construct ternary features , recorded as feature: ; S5.2.3, each query point is represented by the neighboring Features are divided into two categories. One category is the features composed of the query point and its neighboring points, which is recorded as ; The other type is the features composed of neighboring points, recorded as , and combine to get the final features : ; in, is the number of neighboring points; Will They are saved in the CAD model variable cloud_source_fpfh and the workpiece scene variable cloud_target_fpfh respectively.
6. The method for visual positioning and guiding of a long cantilever rotary probe for deep cavity and small hole measurement according to claim 4, characterized in that: Step S5.3 specifically includes the following steps: S5.3.1, call the variables cloud_source, cloud_target, cloud_source_fpfh and cloud_target_fpfh respectively, use the SAC-IA algorithm to perform local registration, and select n sampling points s in the CAD model point cloud cloud_source n , n=1,2,3…, set the shortest distance between two points to d s , find the sampling point s in the target point cloud cloud_target n One or more points with similar FPFH features, randomly select a point t from the similar points n ,n=1,2,3…,as sampling point s n Corresponding points, 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 points are transformed. The distance error sum function is expressed using the Huber penalty function: ; in, is a predetermined value, For the The distance difference between the corresponding points of the group after transformation; S5.3.3, find a set of optimal transformations that minimize the error function among all transformations; move the CAD model point cloud to the location of the scene point cloud and save the initial transformation matrix .
7. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement 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 point cloud registration, for each point in cloud_source, find the point with the closest Euclidean distance in cloud_target to form a corresponding point pair; S6.2, using the corresponding point pairs, calculate the pose transformation matrix I0 that minimizes the mean square error. Calculate the first I0 and apply the transformed CAD model point cloud to calculate the mean square error. Iteratively calculate the next I0 based on the first transformation and calculate the mean square error of the CAD model point cloud after applying the transformation 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 used as the final output. S6.3, apply the final output I0, save the transformed CAD model point cloud to the variable cloud_result, call the variables cloud_result and cloud_target respectively, and read the number of CAD model point cloud points. , select point s in the CAD model point cloud in turn i , i=1,2,3…, use kd tree structure to search s i The point t in the scene point cloud closest to i , i=1,2,3…, output the corresponding distance d i , set the distance threshold, if d i If the value is less than the threshold, it is considered as a coincidence point and output to the point cloud collection. The final registration coincidence rate Calculated by the following formula: ; When the overlap rate is higher than the threshold requirement, the final point cloud registration 4×4 pose transformation matrix is output , otherwise go to step S1 and recalculate.
8. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1, characterized in that: Step S7 is specifically as follows: read the current rotation scanning probe end relative to the depth camera posture transformation matrix G, calculate the final displacement matrix of the multi-degree-of-freedom motion mechanism : 。 9. The method for visual positioning and guiding a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1, characterized in that: The stereo vision guided calibration and positioning test platform consists of a multi-degree-of-freedom motion mechanism, a depth camera, a three-dimensional optical rotation scanner, a workpiece to be tested, and a PC.
10. The method for visual positioning and guiding of a long cantilever rotary probe for deep cavity and small hole measurement according to claim 1, characterized in that: Step S2 specifically includes: using a multiple exposure imaging method to collect workpiece scene point cloud data.
Citation Information
Patent Citations
A contact network part whole-network 3D reconstruction method based on an NARF and an FPFH
CN107123161A
Aviation complex part-oriented surface structured light automatic three-dimensional detection method
CN115345822A
Complex mechanical part measurement point cloud registration method and system based on improved ICP
CN115797418A
Point cloud registration method based on improved FPFH-ICP
CN115861397A
Improved local point cloud registration method for complex curved surface workpiece
CN117893586A