Complex structure workpiece drilling parameter measurement method based on shrinking neighborhood circle boundary point clustering algorithm
By using a clustering algorithm based on the boundary points of shrinking neighborhood circles and an iterative circle fitting method, the efficiency and accuracy problems in drilling measurement of complex workpieces were solved, and low-cost, high-efficiency automatic measurement of drilling parameters was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEAST FORESTRY UNIV
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-09
AI Technical Summary
Existing non-contact drilling measurement methods suffer from low measurement efficiency, high cost, and insufficient accuracy on complex workpieces, especially in boundary point detection and circle fitting processes, where they are significantly affected by noise and parameter settings.
An algorithm based on shrinking neighborhood circle boundary point clustering is adopted. By identifying boundary points in the workpiece point cloud data, neighborhood circle clustering and iterative circle fitting method with good fit are used, combined with feature line tracking technology, to realize the automatic measurement of drilling parameters.
It enables low-cost, portable, and high-precision borehole parameter measurement, improves measurement efficiency, reduces noise impact, and meets engineering accuracy requirements.
Smart Images

Figure CN122176031A_ABST
Abstract
Description
Technical Field
[0001] This invention applies computer vision and machine learning technologies to propose a method for measuring drilling parameters of complex structure workpieces based on a shrinking neighborhood circle boundary point clustering algorithm. The goal is to improve measurement efficiency and to develop a low-cost, non-contact method for automatic measurement of drilling parameters of complex structures. Background Technology
[0002] Drilling plays a crucial role in workpiece manufacturing, serving various purposes such as positioning, assembly, connection, ventilation, drainage, cooling, and noise reduction to achieve different functions. Incorrect hole size and location can affect subsequent workpiece manufacturing and product assembly. Therefore, hole inspection is essential. Contact measurement methods primarily involve using instruments such as gauges, micrometers, and coordinate measuring machines (CMMs). These methods require inspection of each hole individually, are time-consuming and labor-intensive, and may potentially damage the workpiece.
[0003] Currently, non-contact measurement mainly relies on machine vision, which can be divided into two-dimensional image-based measurement methods and three-dimensional point cloud-based measurement methods. Two-dimensional image methods utilize image processing technology to achieve automatic, efficient, and non-destructive measurement, but they have requirements on the camera's shooting angle and can only obtain two-dimensional information. Three-dimensional reconstruction methods for generating point clouds can be divided into active vision-based and passive vision-based methods, depending on whether the acquisition device actively generates a monitoring signal. There are many active vision-based methods, with Time-of-Flight (ToF) and structured light methods being the most widely used. ToF technology has significant advantages in real-time performance and accuracy, but its application is limited by resolution, power consumption, and environmental factors. Structured light technology features high precision and high resolution, but it places high demands on projection equipment, high-resolution cameras, and computing hardware. Passive vision-based methods recover depth information from information such as image texture distribution to achieve three-dimensional reconstruction, mainly including multi-view stereo vision and SFM. Multi-view stereo vision uses two or more cameras to photograph an object from different angles and calculates depth information by matching feature points in the images, but it often has certain requirements regarding the size of the object being measured. SFM utilizes multiple overlapping 2D images to generate 3D point clouds through image feature point matching and triangulation. It only requires a camera and a computer for measurement, offering high flexibility and ease of operation on-site.
[0004] A key aspect of drilling measurement methods based on 3D point clouds lies in the detection and clustering of boundary points on the workpiece. Boundary point detection methods primarily include Boundary Point Detection (BPD) and the alpha shape method. BPD has the advantage of requiring no preset parameters, but its accuracy drops significantly when local density differences are large. The alpha shape method reduces the influence of point cloud density but requires a preset value for the parameter "alpha". Boundary point clustering mainly uses density-based clustering methods, which require appropriate preset parameters. Its clustering ability is significantly limited when boundary distances are close or when there is noise near the boundary points, and the clustering results cannot accurately reflect the true clustering situation. Furthermore, for boundary points identified by the alpha shape method, the preset parameter "alpha" can be changed to distinguish between inner and outer boundaries and effectively reduce the impact of noise on the clustering effect. This invention proposes a boundary point clustering algorithm based on shrinking neighborhood circles. This algorithm utilizes the characteristic that neighborhood circles tend to cluster towards areas with low point cloud density to extract boundary points of individual holes, enabling the boundary point clustering results to better reflect the true clustering situation, greatly reducing the impact of noise, and eliminating the need for preset parameters.
[0005] Another key aspect of borehole measurement methods based on 3D point clouds lies in borehole circle fitting. Circle fitting algorithms mainly include two types: geometric fitting and algebraic fitting. However, both geometric and algebraic fitting utilize all data points, including noise points. When there is a large amount of noise or significant noise deviation, their accuracy is greatly affected. To reduce this impact, algebraic fitting and iterative methods are combined, including RANSAC, Repeated Minimum Trimmed Squares (RLTS), and iterative circle fitting methods. However, these methods require manual parameter setting, and inappropriate parameters can significantly reduce accuracy. The point cloud data used in this invention has uneven noise and an unpredictable number of noise points, making it impossible to manually set appropriate parameters. Therefore, these methods are not applicable. This invention proposes an iterative circle fitting method based on the degree of fit for circle fitting.
[0006] In summary, while there are relevant technical means and a certain research foundation for non-contact workpiece drilling measurement, a portable, low-cost measurement method that meets engineering accuracy requirements has yet to be found.
[0007] The relevant concepts and algorithms involved in this invention patent are as follows:
[0008] Neighborhood: In mathematics and computer science, it refers to the set of elements that are "nearby" an element (or point), emphasizing the range of "nearby" and not strictly limiting the number.
[0009] k-neighborhood: Based on the neighborhood, the "k" explicitly defines the "distance" or "steps", representing the set of all elements that are k away from the target element.
[0010] Euclidean distance: the most commonly used distance metric, used to calculate the straight-line distance between two points in space, named after the ancient Greek mathematician Euclid.
[0011] Grayscale value: A numerical value used to represent the brightness of pixels in a black-and-white or grayscale image, and a fundamental concept in image processing. In a grayscale image, the color of each pixel does not contain color information; brightness is described only by a single numerical value: The value range is typically from 0 to 255 (8-bit image), where 0 represents pure black and 255 represents pure white; intermediate values (such as 128) represent different shades of gray, and the larger the value, the brighter the pixel.
[0012] The Hyperfit algorithm is primarily used for fitting hyperplanes to multidimensional data with errors. It is available in R and Python. This algorithm can handle data with multivariate Gaussian uncertainty, fitting one-dimensional lines to two-dimensional data, fitting two-dimensional planes to three-dimensional data, and is also suitable for fitting higher-dimensional data to corresponding hyperplanes. The Hyperfit algorithm typically uses downhill search (such as the optim function), Laplace approximation, or Markov chain Monte Carlo methods (MCMC, such as the La Places Demon algorithm) to find the best-fit parameters for the hyperplane, while incorporating intrinsic scattering as part of the fitting process.
[0013] Feature line tracking methods: Feature line tracking algorithms are techniques used in computer vision and image processing to track the motion trajectory of specific feature lines (such as edges, contours, texture lines, etc.) in an image sequence. The core of these methods is to achieve stable tracking of feature lines through correlation analysis between consecutive frames. The specific steps are as follows: A straight line parameter is fitted within the optimized neighborhood of each point using the RANSAC method. The direction parameter of the fitted line represents the principal direction of the corresponding point. Connections are made based on the similarity of the principal directions, and connections are broken when abrupt changes in direction are encountered. This process is repeated for each untracked point until all points are processed. Summary of the Invention
[0014] This invention provides a method for extracting drilling parameters from complex workpiece structures based on a shrinking neighborhood circle boundary point clustering algorithm. The method involves acquiring workpiece point cloud data through video recording using photographic equipment, preprocessing it to form a 3D point cloud model of the workpiece, identifying boundary points using a neighborhood circle-based boundary point detection algorithm, segmenting the boundary points into individual voids using a shrinking neighborhood circle-based boundary point clustering algorithm, and then fitting the boundaries of the voids with a circle using an iterative circle fitting method based on the fitting degree to determine whether the void is a drill hole. If it is a drill hole, the center and diameter parameters of the drill hole are calculated based on a scaling factor. The specific steps are as follows:
[0015] Step 1: Acquire and preprocess workpiece point cloud data:
[0016] The workpiece is placed on a rotating platform, and a video recording containing a panoramic view of the workpiece is obtained using a photography device. The sampling interval is set to 30 frames to obtain the workpiece image. The image is then input into the 3D modeling software Agisoft Metashape Professional to obtain the workpiece point cloud data. The point cloud data is downsampled using a voxel mesh, and then the downsampled point cloud data is filtered to remove ground points and noise points.
[0017] Among them, voxel downsampling divides the three-dimensional space of point cloud data into a cubic voxel grid with a side length of 0.01 (unit: pixels). All points in the voxel grid are replaced by a single point whose coordinates are the average of the coordinates of all points in the voxel grid.
[0018] The filtering method involves setting the coordinates of the point cloud data. and grayscale value The value range is to retain the workpiece point cloud data, and the specific value range is as follows:
[0019] (1)
[0020] Step 2: Identify boundary points using a boundary point detection algorithm based on neighborhood circles:
[0021] Select any point in the workpiece point cloud A fitting plane is constructed using the k-neighbor points and their k-local points, where the set of k-neighbor points is denoted as... ,Will And all points in the k-neighborhood are projected onto the fitting plane, and the projected points are represented as: and ,in, The coordinates are The coordinates of all points in the k-neighborhood set projected onto the fitting plane are: Calculate arrive The Euclidean distance of all points is Its calculation formula is
[0022] (2)
[0023] Definition point The local resolution is
[0024] (3)
[0025] in for The average value, for The standard deviation of the workpiece is such that points that simultaneously satisfy the following two criteria are considered workpiece boundary points:
[0026] Judgment condition 1: Point The k-neighborhood contains two points. , This makes the point pass , , The radius of the circle is greater than This circle is called the neighborhood circle, and its center is... Furthermore, the circle does not contain any other neighboring points.
[0027] Judgment condition 2: Connection and All points in the equation, the angle between adjacent line segments. ,satisfy .
[0028] The boundary point is represented by the two decision conditions. The corresponding neighborhood center is , radius is n is the number of boundary points; in three-dimensional space, from the center of the circle... and radius The constructed neighborhood circle is a sphere, and the neighborhood circle and the boundary point satisfy a one-to-one correspondence.
[0029] Step 3: Based on the shrinking neighborhood circle boundary point clustering algorithm, the boundary points are segmented into individual holes;
[0030] The boundary points are segmented into different holes and noise points. First, excessively large neighborhood circles are shrunk; the boundary points are obtained after the shrinkage process. Corresponding shrinking neighborhood circle The original neighborhood circle is replaced by a shrunken neighborhood circle as the boundary point. The corresponding neighborhood circle; by clustering the boundary points based on the shrinking neighborhood circle, the boundary points are finally divided into different holes and noise points, the noise points are removed, and a single hole is formed.
[0031] First, shrink any excessively large neighborhood circles; the criterion for determining whether a neighborhood circle is too large is its center. To other boundary points Is the Euclidean distance between them greater than the radius of the neighborhood circle? ,in, , That is, when The neighboring circle is shrunk at that time.
[0032] Assuming boundary points The corresponding neighborhood circle contains m boundary points. When the neighboring circle is shrunk, The corresponding shrinkage neighborhood circle has no other boundary points. The specific shrinkage steps are as follows:
[0033] Step 1: Connect boundary points to the center of the corresponding neighborhood circle , forming vectors , The unit vector is represented as .
[0034] Step 2: Reduce the radius of the neighborhood circle to ( ), the center of the contracted circle Coordinates are represented as .
[0035] Step 3: Confirm The value of
[0036] (13)
[0037] in, .
[0038] Boundary points are obtained after shrinkage processing. Corresponding shrinking neighborhood circle The original neighborhood circle is replaced by a shrunken neighborhood circle as the boundary point. The corresponding neighborhood circle.
[0039] Finally, the boundary points are clustered based on the shrinking neighborhood circles. The specific clustering process is as follows: the number of intersecting neighborhood circles is no less than the minimum number of intersecting circles. (Since a neighborhood circle can intersect with at most three boundary points, therefore) Based on experience The neighborhood circles of a circle are called core circles, and intersecting core circles are called similar core circles. If a non-intersecting neighborhood circle intersects with a similar core circle, the non-intersecting neighborhood circle is also grouped into the same category. Similarly, if a non-intersecting neighborhood circle intersects with the same core circle, the non-intersecting neighborhood circle is also grouped into the same category. Non-core circles that intersect with core circles are called boundary circles. When a neighborhood circle does not intersect with a core circle, it is called a noise circle. Boundary points corresponding to similar neighborhood circles are considered similar boundary points. Boundary points corresponding to noise circles are considered noise points. Ultimately, the boundary points are divided into different holes and noise points, and the noise points are removed to form a single hole.
[0040] Step 4: Fitting the circle to the hole:
[0041] (1) Project the boundary points of similar cavities onto a two-dimensional plane
[0042] For a containing A void at a boundary point is represented as: , Projected onto a plane The coordinates of the projected points are represented in two dimensions as follows: .
[0043] For a containing A void at a boundary point is represented as: , A plane fitting is performed on these boundary points to obtain the fitted plane. : By rotating the plane Make it parallel to the coordinate plane The parallel, rotated plane is called : Rotation transformation matrix ,in The calculation formula is as follows
[0044] (14)
[0045] The calculation formula is as follows
[0046] (15)
[0047] 3D boundary points Coordinate transformation, coordinates of boundary points after coordinate transformation Then the coordinate transformation relationship is:
[0048] (16)
[0049] Boundary points after coordinate transformation Projected onto a plane The coordinates of the projected point are Two-dimensional representation is .
[0050] (2) Iterative circle fitting method based on fit degree
[0051] Calculate the number of valid boundary points The calculation formula is:
[0052] (4)
[0053] in, It is the number of boundary points; Boundary point Its Euclidean distance to the nearest boundary point and They are respectively The standard deviation and mean.
[0054] by Using boundary points as input data, the Hyperfit method is used to fit a circle, and the center of the fitted circle is obtained. and radius .
[0055] First iteration: The input is the center of the fitted circle. and radius First, calculate the boundary points. Distance between the fitted circle center
[0056] (5)
[0057] in, ;
[0058] Next, calculate the goodness of fit.
[0059] (6)
[0060] Will Arranged from smallest to largest Determine if the median is less than the threshold. threshold The calculation formula is
[0061] (7)
[0062] Take before 1 corresponding boundary point By fitting a circle using the Hyperfit method, a new fitted circle is obtained, whose center and radius are still represented as... and .
[0063] Next iteration: Find the center of the circle fitted in the previous iteration. and radius As input, repeat the calculation process of the first iteration.
[0064] If the fit The median is less than the threshold or reaching the maximum number of iterations. (Based on experience) If the iteration ends, the center of the fitted circle for this iteration is output. and radius Otherwise, continue iterating.
[0065] Step 5: Drill hole identification
[0066] Holes are categorized into drilled holes and non-drilled holes. A hole is classified as a drilled hole if all three conditions are met:
[0067] Judgment condition 1: Goodness-of-fit condition, calculating the goodness-of-fit of the boundary points when the iteration is complete. Average value, if the average value is less than the threshold If the fit condition is met, then the fit condition is satisfied.
[0068] Judgment Condition 2: Completeness Condition. Calculate the line segment starting from the center of the fitted circle and ending at the boundary point. If the adjacent central angles are... All are less than the specified angle When, the completeness condition is satisfied, where the limiting angle is... The calculation formula is
[0069] (8)
[0070] Judgment condition 3: Inner boundary condition, calculate the center of the neighborhood circle corresponding to the boundary point on the fitted circle. to the center of the fitted circle The distance is The average radius of the neighborhood circle is Then the inner boundary conditions are
[0071] (9)
[0072] Finally, a hole is determined to be drilled if all three conditions are met simultaneously, and its parameter is denoted as the center point. and radius .
[0073] Step 6: Calculate the proportionality coefficient λ:
[0074] The preprocessed workpiece point cloud is horizontally sliced by taking the z-coordinate of the point cloud, which satisfies the following relationship.
[0075] (10)
[0076] The slices are projected onto a two-dimensional plane, and the two long sides of the rectangle are tracked and fitted with straight lines using a feature line tracing method. The width of the workpiece model is then calculated using point cloud data. (Unit: pixels), scaling factor Width measured from workpiece (Unit: mm), divided by the model width We obtain λ.
[0077] (11)
[0078] Step 7: Obtaining the center and diameter parameters of the drill hole:
[0079] According to the proportionality coefficient Adjust the center of the drill hole obtained in step 5 and radius Calculate the center of the borehole. and diameter parameter:
[0080] (12)
[0081] The calculated center of the borehole and diameter The parameters are output as measurement results.
[0082] The photography equipment is a smartphone or an electronic device with a camera function. Attached Figure Description
[0083] Figure 1 This is a flowchart illustrating the steps of a method for measuring drilling parameters in complex workpieces based on a shrinking neighborhood circle boundary point clustering algorithm.
[0084] Figure 2 These are the top view of the workpiece and the actual drilled holes, where (a) is the top view of the workpiece and the actual measured drilled holes are numbered and labeled; Figure 2 (b) shows the boreholes actually detected and identified by the algorithm. Detailed Implementation
[0085] The specific implementation of the present invention is illustrated using a set of data from a workpiece drilling measurement experiment as an example.
[0086] The point cloud data of the workpiece under test was generated from the workpiece image. Agisoft Metashape Professional (Version 2.0.1) software was used to generate a dense point cloud from the image. The images were acquired by extracting images from video at 30-frame intervals. The video acquisition device used a stand to fix a smartphone, which, together with a rotating platform, recorded video of the workpiece under test. There were no special requirements for the smartphone model. In this experiment, the smartphone model used was a Redmi K70 Pro, and the video recording resolution was [resolution missing]. The frame rate is 60fps.
[0087] In this experiment, 18 of the 48 non-threaded drill holes on the workpiece were randomly selected and measured using plug gauges and a coordinate measuring machine. Their positions and numbers in the top view of the workpiece are as follows: Figure 2 As shown in (a), the measured dimensions (i.e., diameter) and position (represented by xoy coordinates, with the origin at the center of hole 1, and the x and y axes directions as shown) are as follows. Figure 2 (b) is shown.
[0088] After generating and preprocessing the workpiece point cloud model, boundary point detection is performed first, followed by clustering of the boundary points to separate boundary points belonging to different holes. Finally, hole identification and measurement are performed to obtain the boundary points of the circular holes and their circle fitting parameters. The results are as follows: Figure 2 (b) shows (a total of 50 holes were detected, of which 2 were false detections).
[0089] The position and dimensions of the circular holes were calculated to evaluate the accuracy of the proposed method. The results were compared with manual measurements, including the absolute measurement errors of individual circular holes, such as absolute diameter error, x-axis absolute error, and y-axis absolute error. In the validation experiment, the proposed method was used to measure the boreholes. The absolute diameter error ranged from 0.0054 mm to 0.0653 mm, with a median of 0.0280 mm and a mean of 0.0331 mm; the x-axis absolute error ranged from 0.0001 mm to 0.1931 mm, with a median of 0.0255 mm and a mean of 0.0479 mm; and the y-axis absolute error ranged from 0.0007 mm to 0.0868 mm, with a median of 0.0351 mm and a mean of 0.0365 mm. These results meet the allowable measurement error.
[0090] This invention proposes a method for measuring drilling parameters of complex workpieces based on a shrinking neighborhood circle boundary point clustering algorithm. This method enables simultaneous measurement of multiple holes, effectively improving measurement efficiency; the measurement error is small, meeting engineering needs.
Claims
1. A method for extracting drilling parameters from complex workpiece structures based on a shrinking neighborhood circle boundary point clustering algorithm, characterized in that: Workpiece point cloud data is acquired by recording video using photographic equipment, preprocessed, and used to form a 3D point cloud model of the workpiece. Boundary points are identified using a boundary point detection algorithm based on neighborhood circles. The boundary points are then segmented into individual holes using a boundary point clustering algorithm based on shrinking neighborhood circles. The boundaries of the holes are then fitted with circles using an iterative circle fitting method based on the fitting degree to determine whether the holes are drill holes. If they are drill holes, the center and diameter parameters of the drill holes are calculated based on the scaling factor. The specific steps are as follows: Step 1: Acquire and preprocess workpiece point cloud data: The workpiece is placed on a rotating platform, and a video recording containing the panoramic view of the workpiece is obtained using a photography device. The sampling interval is set to 30 frames to obtain the workpiece image. The workpiece point cloud data is then obtained by inputting it into the 3D modeling software Agisoft Metashape Professional. The point cloud data is downsampled using a voxel mesh, and then the downsampled point cloud data is filtered to remove ground points and noise points. Among them, voxel mesh downsampling divides the three-dimensional space of point cloud data into a cubic voxel mesh with a side length of 0.01 (unit: pixels). All points in the voxel mesh are replaced by a single point whose coordinates are the average of the coordinates of all points in the voxel mesh. The filtering method involves setting the coordinates of the point cloud data. and grayscale value The value range is to retain the workpiece point cloud data, and the specific value range is as follows: (1) Step 2: Identify boundary points using a boundary point detection algorithm based on neighborhood circles: Select any point in the workpiece point cloud A fitting plane is constructed using the k-neighbor points and their k-local points, where the set of k-neighbor points is denoted as... ,Will And all points in the k-neighborhood are projected onto the fitting plane, and the projected points are represented as: and ,in, The coordinates are The coordinates of all points in the k-neighborhood set projected onto the fitting plane are: Calculate arrive The Euclidean distance of all points is Its calculation formula is (2) Definition point The local resolution is (3) in for The average value, for The standard deviation of the workpiece is such that points that simultaneously satisfy the following two criteria are considered workpiece boundary points: Judgment condition 1: Point The k-neighborhood contains two points. , This makes the point pass , , The radius of the circle is greater than This circle is called the neighborhood circle, and its center is... Furthermore, the circle does not contain any other neighboring points; Judgment condition 2: Connection and All points in the equation, the angle between adjacent line segments. ,satisfy ; The boundary point is represented by the two decision conditions. The corresponding neighborhood center is , radius is n is the number of boundary points; in three-dimensional space, from the center of the circle... and radius The constructed neighborhood circle is a sphere, and the neighborhood circle and the boundary point satisfy a one-to-one correspondence. Step 3: Based on the shrinking neighborhood circle boundary point clustering algorithm, the boundary points are segmented into individual holes; The boundary points are segmented into different holes and noise points. First, excessively large neighborhood circles are shrunk; the boundary points are obtained after the shrinkage process. The corresponding shrinking neighborhood circle The original neighborhood circle is replaced by a shrunken neighborhood circle as the boundary point. The corresponding neighborhood circle; by clustering the boundary points based on the shrinking neighborhood circle, the boundary points are finally divided into different holes and noise points, the noise points are removed, and a single hole is formed. Step 4: Fitting the circle to the hole: (1) Project the boundary points of similar cavities onto a two-dimensional plane For a containing A void at a boundary point is represented as: , Projected onto a plane The coordinates of the projected points are represented in two dimensions as follows: ; (2) Iterative circle fitting method based on fit degree Calculate the number of valid boundary points The calculation formula is: (4) in, It is the number of boundary points; Boundary point Its Euclidean distance to the nearest boundary point and They are respectively The standard deviation and mean of; by Using boundary points as input data, the Hyperfit method is used to fit a circle, and the center of the fitted circle is obtained. and radius ; First iteration: The input is the center of the fitted circle. and radius First, calculate the boundary points. Distance between the fitted circle center ; (5) in, ; Next, calculate the goodness of fit. ; (6) Will Arranged from smallest to largest Determine if the median is less than the threshold. threshold The calculation formula is (7) Take before 1 corresponding boundary point By fitting a circle using the Hyperfit method, a new fitted circle is obtained, whose center and radius are still represented as... and ; Next iteration: Find the center of the circle fitted in the previous iteration. and radius As input, repeat the calculation process of the first iteration; If the fit The median is less than the threshold or reaching the maximum number of iterations. (Based on experience) If the iteration ends, the center of the fitted circle for this iteration is output. and radius Otherwise, continue iterating; Step 5: Drill hole identification Holes are categorized into drilled holes and non-drilled holes. A hole is classified as a drilled hole if all three conditions are met: Judgment condition 1: Goodness-of-fit condition, calculating the goodness-of-fit of the boundary points when the iteration is complete. Average value, if the average value is less than the threshold If so, then the goodness-of-fit condition is satisfied; Judgment Condition 2: Completeness Condition. Calculate the line segment starting from the center of the fitted circle and ending at the boundary point. If the adjacent central angles are... All are less than the specified angle When, the completeness condition is satisfied, where the limiting angle is... The calculation formula is (8) Judgment condition 3: Inner boundary condition, calculate the center of the neighborhood circle corresponding to the boundary point on the fitted circle. to the center of the fitted circle The distance is The average radius of the neighborhood circle is Then the inner boundary conditions are (9) Finally, a hole is determined to be drilled if all three conditions are met simultaneously, and its parameter is denoted as the center point. and radius ; Step 6: Calculate the proportionality coefficient λ: The preprocessed workpiece point cloud is horizontally sliced by taking the z-coordinate of the point cloud, which satisfies the following relationship. (10) The slices are projected onto a two-dimensional plane, and the two long sides of the rectangle are tracked and fitted with straight lines using a feature line tracing method. The width of the workpiece model is then calculated using point cloud data. (Unit: pixels), scaling factor Width measured from workpiece (Unit: mm), divided by the model width We obtain λ. (11) Step 7: Obtaining the center and diameter parameters of the drill hole: According to the proportionality coefficient Adjust the center of the drill hole obtained in step 5 and radius Calculate the center of the borehole and diameter parameter: (12) The calculated center of the borehole and diameter The parameters are output as measurement results.
2. The method for measuring drilling parameters of complex structure workpieces based on the shrinking neighborhood circle boundary point clustering algorithm as described in claim 1, characterized in that: Step 3: Based on the shrinking neighborhood circle boundary point clustering algorithm, the boundary points are segmented into individual holes. First, shrink any excessively large neighborhood circles; the criterion for determining whether a neighborhood circle is too large is its center. To other boundary points Is the Euclidean distance between them greater than the radius of the neighborhood circle? ,in, , That is, when Shrink the neighboring circle at that time; Assuming boundary points The corresponding neighborhood circle contains m boundary points. When the neighboring circle is shrunk, The corresponding shrinkage neighborhood circle has no other boundary points. The specific shrinkage steps are as follows: Step 1: Connect boundary points to the center of the corresponding neighborhood circle , forming vectors , The unit vector is represented as ; Step 2: Reduce the radius of the neighborhood circle to ( ), the center after contraction Coordinates are represented as ; Step 3: Confirm The value of (13) in, ; Boundary points are obtained after shrinkage processing. The corresponding shrinking neighborhood circle The original neighborhood circle is replaced by a shrunken neighborhood circle as the boundary point. The corresponding neighborhood circle; Finally, the boundary points are clustered based on the shrinking neighborhood circles. The specific clustering process is as follows: the number of intersecting neighborhood circles is no less than the minimum number of intersecting circles. (Since a neighborhood circle can intersect with at most three boundary points, therefore) Based on experience The neighborhood circles of a circle are called core circles, and intersecting core circles are called similar core circles. If a non-intersecting neighborhood circle intersects with a similar core circle, the non-intersecting neighborhood circle is also grouped into the same category. Similarly, if a non-intersecting neighborhood circle intersects with the same core circle, the non-intersecting neighborhood circle is also grouped into the same category. Non-core circles that intersect with core circles are called boundary circles. When a neighborhood circle does not intersect with a core circle, it is called a noise circle. Boundary points corresponding to similar neighborhood circles are considered similar boundary points. Boundary points corresponding to noise circles are considered noise points. Ultimately, the boundary points are divided into different holes and noise points, and the noise points are removed to form a single hole.
3. The method for extracting drilling parameters of complex structure workpieces based on the shrinking neighborhood circle boundary point clustering algorithm as described in claim 1, characterized in that: Step 4: Fitting the circle to the hole: (1) Project the boundary points of similar cavities onto a two-dimensional plane For a containing A void at a boundary point is represented as: , A plane fitting is performed on these boundary points to obtain the fitted plane. : By rotating the plane Make it parallel to the coordinate plane The parallel, rotated plane is called : Rotation transformation matrix ,in The calculation formula is as follows (14) The calculation formula is as follows (15) 3D boundary points Coordinate transformation, coordinates of boundary points after coordinate transformation Then the coordinate transformation relationship is: (16) Boundary points after coordinate transformation Projected onto a plane The coordinates of the projected point are Two-dimensional representation is .
4. The method for extracting drilling parameters of complex structure workpieces based on the shrinking neighborhood circle boundary point clustering algorithm as described in claim 1, characterized in that: The photography equipment used is a smartphone or an electronic device with a camera function.