Part surface defect detection method and device
By processing 3D point cloud data and calculating differential contours, the accuracy and efficiency issues of surface defect detection for small thin sheet parts have been solved, achieving automated and high-precision defect identification, reducing labor costs and the risk of secondary damage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN ZHONGKE PHOTOELECTRIC PRECISION ENG CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-05
AI Technical Summary
Current methods for detecting surface defects in small, thin sheet parts rely on manual observation, which suffers from low accuracy, high cost, low efficiency, and a tendency to cause secondary damage.
Using 3D point cloud data processing technology, the surface data of the part is obtained by layered scanning through a confocal sensor. The point cloud is segmented by combining the RANSAC algorithm, the defect depth is calculated by using the difference contour, and large and small defects are located by using surface fitting and radius filtering. The defect depth is quantified by fifth-order polynomial fitting, so as to achieve automated and high-precision identification.
It achieves high-precision identification of micro-deformations and small defects at the micrometer level, avoiding subjective errors and visual fatigue caused by human eye observation, improving detection accuracy and efficiency, and reducing labor costs.
Smart Images

Figure CN122156095A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of parts inspection and relates to a method and apparatus for detecting surface defects in parts. Background Technology
[0002] Existing surface defect detection solutions for small, thin sheet parts involve inspectors placing the parts on a testing table and visually observing them from different angles. Defects such as cracks, blemishes, and scratches are then marked on the surface. However, manual inspection has certain shortcomings, including low accuracy, high labor costs, low production efficiency, and the possibility of secondary damage to the workpieces during manual picking, which affects surface quality. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and device for detecting surface defects of parts. This method not only achieves automation but also accurately quantifies the depth of defects, thereby enabling high-precision identification of micro-deformations and small defects at the micrometer level, avoiding subjective errors and visual fatigue-induced missed detections caused by human observation.
[0004] To achieve the above objectives, the present invention employs the following technical solution: A method for detecting surface defects in a part includes the following steps: Acquire 3D point cloud data of the part surface; The 3D point cloud data is preprocessed to segment it into spherical point cloud and planar point cloud; the defect area is located based on the segmented point cloud data to obtain coarse defect location information; Based on the coarse location information of the defect, the defect area is sliced to generate multiple two-dimensional point sets; curve fitting is performed on the two-dimensional point sets to generate a fitted contour. Calculate the difference between the original contour and the fitted contour of the two-dimensional point set to obtain the difference contour; select the maximum difference in the difference contour as the defect depth value. The defect depth value is compared with a preset threshold to determine whether the part is qualified.
[0005] Optionally, the specific process of layered scanning is as follows: A confocal sensor is used to perform layered scanning of the part. The number of scanning layers is calculated based on the total height of the part and the measurement range of the confocal sensor. The number of scanning layers is equal to the total height of the part divided by the measurement range and then rounded up. Plan the overlapping data collection areas between two adjacent layers and between adjacent columns on the same layer; The part is moved along a planned path in the horizontal plane while the confocal sensor is controlled to collect data.
[0006] Optionally, the specific process for preprocessing 3D point cloud data is as follows: The random sampling consensus algorithm is used to segment the 3D point cloud data and separate the spherical point cloud. Based on the connection structure between the spherical point cloud and the planar point cloud, calculate the planar point cloud that is closest to the spherical point cloud; By combining 3D point clouds and 2D images, the gradually varying structure point cloud of the region connecting the plane and the sphere is segmented.
[0007] Optionally, the specific process for locating the defect area is as follows: For large defects, a surface fitting method is used to fit the surface parameters and calculate the theoretical deviation value of each point in the point cloud, and then cluster the connected regions. For small defects, radius filtering detection is performed on the global point cloud to identify locations of curvature abrupt changes and to delineate the connected regions and internal point clouds. Output the minimum bounding rectangle of the connected region and the coordinates of the defect center.
[0008] Optionally, the specific process for generating multiple two-dimensional point sets is as follows: Based on the coarse location information of the defect, the point cloud around the defect is cut using a pass-through filter to obtain the point cloud to be traversed; Construct a pass-through filter perpendicular to the horizontal plane, sequentially cut the point cloud to be traversed, remove one horizontal component of each point in the point set, and generate multiple two-dimensional point sets.
[0009] Optionally, the specific process for generating the fitted contour is as follows: Perform circle fitting on a two-dimensional point set and calculate the center and radius parameters; A fifth-order polynomial is used to fit the two-dimensional point set to generate a polynomial fitting profile.
[0010] Optionally, the process of measuring the arch height is also included: Obtain the point cloud of the arched membrane, and segment the arched region and the planar region based on model registration; Calculate the normal vector and center of the circle in the planar region; Draw a straight line through the center of the circle with the normal vector as the direction, and calculate the average distance from the point on the arched area to the plane area, which is used as the measured value of the arch height.
[0011] A part surface defect detection device includes a device housing, a frame, a platform, a displacement platform, a tray rack, a column, a confocal sensor, an industrial control computer, and a motion controller; The device housing contains a frame; a platform is supported on top of the frame; a displacement platform and a column are mounted on the platform; a material tray is fixed on the displacement platform to support the parts to be tested; a confocal sensor is mounted on the column, with the lens of the confocal sensor vertically aligned with the material tray; an industrial control computer is electrically connected to the confocal sensor and a motion controller respectively; the motion controller is electrically connected to the displacement platform.
[0012] Optionally, the industrial control computer sends acquisition signals to the confocal sensor and receives point cloud data, and sends instructions to the motion controller; the motion controller drives the displacement platform to move according to the instructions.
[0013] Optionally, a tri-color light is also provided on the top of the device housing, which is connected to the industrial control computer.
[0014] Compared with the prior art, the present invention has the following beneficial effects: This invention employs the differential contour principle, which involves acquiring the real surface through 3D scanning, then fitting an ideal surface using an algorithm. The difference between the two is the defect depth. This method effectively exposes the part's inherent geometry (such as spherical curvature), making tiny pits or protrusions (defects) hidden on complex surfaces significantly more prominent. Compared to traditional methods, it not only automates the process but also precisely quantifies the defect depth (Z-axis information), enabling high-precision identification of micro-deformations and small defects at the micrometer level, avoiding subjective errors and missed detections due to visual fatigue.
[0015] Furthermore, utilizing the principles of layered slicing and path planning, the scanning task is decomposed into several vertical layers based on the total height of the part, and overlapping areas are set to ensure the integrity of data stitching. This is equivalent to ensuring that the sensor always operates within the optimal focal length range, solving the problem of data loss or out-of-focus blurring that easily occurs in traditional methods when scanning parts with large curvature or high drop, thus guaranteeing the integrity and clarity of the 3D point cloud data.
[0016] Furthermore, utilizing the RANSAC (Random Sample Consensus) algorithm, the part surface is segmented into spherical and planar data based on a mathematical model. By segmenting before processing, the algorithm can eliminate interference from gradually changing structures in transitional regions on defect identification. Compared to traditional, crude overall filtering, this segmentation process targeting geometric features significantly reduces the false detection rate at edges, ensuring high-precision defect analysis only for effective functional areas.
[0017] Furthermore, a hierarchical positioning principle is adopted: for large defects (surface deformation), the deviation of surface fitting parameters is used to locate them, while for small defects (abrupt curvature), radius filtering is used to capture them. This dual positioning strategy, which focuses on surface shape for large defects and curvature for small defects, can adapt to the characteristics of defects with different physical forms. Compared with traditional single algorithms, it greatly improves the detection rate and positioning accuracy of multiple types of composite defects (such as those with both overall pressure damage and local pinholes).
[0018] Furthermore, employing the principle of dimensionality reduction, a pass-through filter is used to segment the 3D defect region into multiple 2D point sets (section lines). This transforms complex 3D surface analysis into simple 2D curve analysis, significantly reducing data processing volume and computational complexity. Compared to traditional full 3D processing methods, this approach significantly improves the algorithm's running speed while maintaining detection accuracy, enabling high-precision 3D detection to meet industrial cycle time requirements.
[0019] Furthermore, employing the fifth-order polynomial adaptive fitting principle, a baseline curve that closely matches the actual trend of the part is fitted using the part's own point cloud data. By calculating the difference between the original contour and this fitted baseline, a floating baseline that dynamically adjusts with individual differences in the part is established. Compared to traditional rigid template matching, this method can automatically offset the influence of normal manufacturing tolerances of the part, only sensitively capturing local anomalies (defects), achieving true relative measurement, and greatly reducing the misjudgment rate.
[0020] Furthermore, based on the model registration principle of the full-field point cloud, the reference plane is determined by calculating the normal vector of the entire planar region, and then the average distance from the arched region to this reference plane is calculated. This method utilizes hundreds or thousands of data points for statistical calculations, eliminating the random errors of single-point measurements and the cosine errors caused by the part's placement posture. Compared with traditional methods, it not only achieves non-contact, non-destructive measurement but also ensures the stability and repeatability of highly evaluated data. Attached Figure Description
[0021] Figure 1 This is a structural diagram of the part surface defect detection device of the present invention; Figure 2 This is an internal structural diagram of the part surface defect detection device of the present invention; Figure 3 This is a flowchart of the defect detection method of the part surface defect detection device of the present invention; Figure 4 This is a schematic diagram of the layered scanning of the present invention; Figure 5 This is the underlying planar movement path planning diagram of the present invention; Figure 6 This is a schematic diagram of the scanning path when the material tray of the present invention is full; Figure 7 This is a schematic diagram of the scanning path when there is a shortage of material on the material tray of the present invention; Figure 8 This is a schematic diagram of the three types of scanning data of the present invention; Figure 9 This is a schematic diagram of the defect contour calculation method of the part surface defect detection device of the present invention.
[0022] The components are: 1-device housing, 2-confocal sensor, 3-column, 4-material tray rack, 5-displacement platform, 6-control console, 7-three-color light, 8-marble platform, 9-frame, 10-industrial computer, 11-motion controller. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] like Figure 1 and Figure 2 As shown, the part surface defect detection device described in this embodiment includes a device housing 1, a detection platform and a detection system are provided inside the device housing 1, and a three-color light 7 is provided on the top of the device housing 1.
[0026] The detection platform includes a platform 8, a column 3 supported on the platform 8, a confocal sensor 2 above the column 3, a displacement platform 5 and a tray frame 4 mounted on the platform 8 to support the tray. The platform 8 is located on a frame 9, and the motion mechanism is the displacement platform 5. The confocal sensor 2 is mounted on the column 3, and the lens of the confocal sensor 2 is perpendicular to the tray surface of the displacement platform 5.
[0027] The detection system includes a point cloud data acquisition module, a motion control module, and an industrial computer 10. The point cloud data acquisition module is a confocal sensor 2, which acquires point cloud data of the surface of the part to be tested within a tray mounted on a displacement platform 5. After scanning, the point cloud data is transmitted to the industrial computer 10 for data processing. The motion control module includes a motion controller 11. Upon receiving instructions from the industrial computer 10, the motion controller 11 sends motion commands to the displacement platform 5. The industrial computer 10 sends pulse signals to the confocal sensor 2 for signal acquisition. A control console 6 is connected to the industrial computer 10, which is used to determine surface defects on the part.
[0028] The tri-color lamp 7 is electrically connected to the industrial control computer 10.
[0029] This device uses a high-precision confocal sensor 2 and an electric displacement platform 5 to collect point cloud data of the part surface and then compare and analyze the data. This device can quickly identify the micro-deformation and small defects of the parts, with high detection accuracy, high degree of automation, convenient operation, simple structure, reduced labor costs, and avoid secondary damage caused by manual placement. It can detect the surface of parts of different specifications with higher detection accuracy and better quality of the screened products.
[0030] like Figure 3 As shown, this embodiment provides a method for detecting surface defects in a part, which specifically includes the following process: Step 1: Raw point cloud acquisition.
[0031] Select a material tray according to the workpiece specifications, place it on the displacement platform 5, and fasten it with quick-change parts; the industrial control computer 10 plans the scanning path according to the workpiece specifications and workpiece position on the material tray, and transmits it to the motion controller 11. The motion controller 11 controls the electric displacement table 5 to move, and the electric displacement table 5 drives the material tray to move.
[0032] The scanning path planning for a single product needs to be designed in conjunction with the product's dimensions, the measurement area, and the sensor's field of view. The product is layered according to its total height within the measurement area, with the number of scanning layers N = H / Δ, rounded up. Here, H is the total height of the product, and Δ is the sensor's measurement range. Simultaneously, to ensure the continuity of the point cloud stitching, a certain amount of overlapping acquisition areas needs to be set between adjacent layers and between adjacent columns within the same layer. The layering effect is as follows: Figure 4 As shown.
[0033] When performing a single-layer scan, the XY displacement stage moves the product under test in steps, while confocal sensor 2 collects point cloud data in real time at a certain frequency, ultimately obtaining the point cloud data for a single layer. Then, driven by the Z-axis vertical displacement stage, the entire product's layered scanning is completed. The XY displacement stage movement plan within the bottom plane is as follows: Figure 5 As shown.
[0034] The material trays corresponding to the products under test are fixed. Once the specifications and model of the products under test are determined, the number and location of the corresponding workstations are also determined. Each workstation is numbered according to certain rules, such as 1#, 2#, 3#, etc. When there is a shortage of material on the material tray, it is filled with shims. The operator can manually select and remove the workstation point on the software interface. During path planning, the invalid point can be skipped. The scanning path when the material tray is full is as follows: Figure 6 As shown, the scanning path when there is a shortage of material on the tray is as follows: Figure 7 As shown.
[0035] The confocal sensor 2 begins to collect point cloud data on the workpiece surface and transmits the point cloud data to the industrial control computer 10 for subsequent analysis.
[0036] Step 2: Point cloud data analysis; The data acquired by the confocal sensor 2 is affected by the scanning width and effective working distance, and multiple scans are performed in layers. The scanned data can be divided into three categories: 1) combined data of the plane and a small part of the spherical surface; 2) spherical surface data with a central cavity; 3) complete spherical surface data of a relatively small area; such as Figure 8 As shown.
[0037] For the first type of data, defect detection requires separating planar and spherical information and using different polynomial fitting methods to calculate the contour.
[0038] For Class II and Class III data, polynomial fitting can be used directly to calculate the circular profile.
[0039] Step 3: Point cloud preprocessing.
[0040] Point cloud preprocessing mainly targets a type of data that appears in the first layer scan. This type of data is a combination of spheres and planes. The junction of the sphere and the plane will affect the calculation of defects. Therefore, the planar point cloud and the spherical point cloud are preprocessed first.
[0041] (1) Spherical point cloud segmentation.
[0042] RANSAC-based segmentation of spherical point clouds: Random Sample Consensus (RANSAC) segmentation is a model-based segmentation method. It assumes that the preprocessed point cloud is a set of sample data containing noise and outliers. The parameters of the mathematical model are estimated iteratively, and the mathematical model parameters of the data are calculated to obtain the effective sample data (inliers).
[0043] The principle of RANSAC is described as follows: Set the threshold for the intra-point distance model .
[0044] Assume the sample set is ,from Randomly select a size of The sample set (with the probability of "at least one time there is no outside point" set as) (Automatic calculation or manual setting of algorithm iterations) Calculate model parameters .
[0045] Statistical distance model Set of data points within the threshold If the number of points in this game Greater than the number of in-game points in the previous game If the current model is the best, then it is considered the optimal model at present.
[0046] Repeat steps 2-3 until the iteration ends and the optimal parameters are obtained.
[0047] Multiple practical applications have demonstrated that directly using the model parameters calculated iteratively using the RANSAC algorithm in point cloud-based measurements results in significant errors and insufficient stability. Therefore, here we only use the RANSAC algorithm to roughly segment the sphere.
[0048] (2) Planar point cloud segmentation.
[0049] The RANSAC algorithm is used to roughly calculate the planar structure in the point cloud, and the planar point cloud closest to the spherical point cloud set is calculated based on the connection structure between the sphere and the plane.
[0050] (3) Other point cloud segmentation.
[0051] Other regional point clouds and the area connecting the plane and the sphere are segmented by combining 3D point clouds and 2D images. This is a gradually changing structure that cannot be directly sampled by RANSAC.
[0052] Step 4: Defect area location.
[0053] (1) Locating major defects.
[0054] Definition of major defect: The surface shape is deformed, but the deformed part does not have a sudden change in curvature.
[0055] The detection is performed by surface fitting. The planar and spherical regions generated in step 3 can be detected using the large defect localization method. The corresponding surface parameters are fitted, the theoretical deviation value of each point is calculated, and the regions are clustered and connected.
[0056] (2) Small defect location.
[0057] Defect definition: Point cloud deformation and missing parts caused by sudden changes in curvature in a local area.
[0058] Radius filtering is performed on the global point cloud to detect abrupt changes in curvature. Based on the filtering results, the connected regions and their internal point clouds are divided.
[0059] Output the minimum bounding rectangle (AABB) parallel to the coordinate system for each connected region, as well as the coordinates of the defect center.
[0060] Step 5: Defect depth calculation.
[0061] (1) Traversal of point cloud in defective region.
[0062] Using the information from the coarse localization of the defect, a pass-through filter is used to cut the point cloud, and the point cloud around the defect is obtained for traversal. A pass-through filter with a size of 4 times the defect size is used for cutting.
[0063] A pass-through filter with a width of 0.002mm perpendicular to the XOY plane is used to sequentially cut the defect point cloud region. After cutting, a horizontal component of each point in the point set is removed to generate multiple two-dimensional point sets.
[0064] (2) Circle fitting.
[0065] The standard equation of a circle is:
[0066] Measurement points and the center of the theory There is an error between the radius r. :
[0067] Based on the above formula, the least squares optimization objective function is constructed, and the final parameter calculation formula is:
[0068] and It is the mean of the coordinates. and It is the square mean. It is the mean of the cross terms. , , and It is a higher-order moment.
[0069] center Substituting into the following formula, the radius can be calculated.
[0070]
[0071] All parameters of the 2D planar circle have now been calculated.
[0072] (3) Polynomial fitting.
[0073] A fifth-order polynomial is used for fitting operations to calculate the defect depth. The general equation is:
[0074] a , b , c , d , e and f These are the coefficients of the polynomial to be determined.
[0075] (4) Calculation of difference profile
[0076] It is the slope; It is the intercept; N It represents the total number of data points.
[0077] Each two-dimensional point set is processed by circle fitting and polynomial fitting to generate a polynomial fitted contour. The difference contour is solved by subtracting the original contour points from the polynomial contour, and the maximum difference in each difference contour is taken as the maximum depth of the defect. A schematic diagram of the contour calculation is shown below. Figure 9 As shown.
[0078] Step 6: Pass / Fail Judgment.
[0079] After obtaining the maximum depth data of the defect location, it is compared with the judgment threshold of 0.005mm. If it is greater than or equal to the threshold, it is judged as a defective product; if it is less than the threshold, it is judged as a qualified product.
[0080] Step 7: Measure the arch height.
[0081] Obtain the point cloud of the arched membrane, confirm that the arched membrane is defect-free, segment the arched region and the planar region based on model registration, calculate the normal vector and center of the circular plane, draw a straight line through the center with the normal vector as the direction, and calculate the average distance from the point on the arched surface to the plane as the measured value of the arch height.
[0082] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0083] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0085] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0086] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
[0087] It should be understood that the above description is for illustrative purposes and not for limitation. Many embodiments and applications beyond the provided examples will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of this patent should not be determined by reference to the above description, but rather by reference to the foregoing claims and the full scope of their equivalents. For purposes of completeness, all articles and references, including patent applications and publications, are incorporated herein by reference. The omission of any aspect of the subject matter disclosed herein in the foregoing claims is not intended as a waiver of that subject matter, nor should it be construed as an indication that the applicant has not considered that subject matter as part of the disclosed inventive subject matter.
Claims
1. A method for detecting surface defects in a part, characterized in that, The process includes the following: Acquire 3D point cloud data of the part surface; The 3D point cloud data is preprocessed to segment it into spherical point cloud and planar point cloud; the defect area is located based on the segmented point cloud data to obtain coarse defect location information; Based on the coarse location information of the defect, the defect area is sliced to generate multiple two-dimensional point sets; curve fitting is performed on the two-dimensional point sets to generate a fitted contour. Calculate the difference between the original contour and the fitted contour of the two-dimensional point set to obtain the difference contour; select the maximum difference in the difference contour as the defect depth value. The defect depth value is compared with a preset threshold to determine whether the part is qualified.
2. The method for detecting surface defects in parts according to claim 1, characterized in that, The specific process of layered scanning is as follows: A confocal sensor is used to perform layered scanning of the part. The number of scanning layers is calculated based on the total height of the part and the measurement range of the confocal sensor. The number of scanning layers is equal to the total height of the part divided by the measurement range and then rounded up. Plan the overlapping data collection areas between two adjacent layers and between adjacent columns on the same layer; The part is moved along a planned path in the horizontal plane while the confocal sensor is controlled to collect data.
3. The method for detecting surface defects in parts according to claim 1, characterized in that, The specific process of preprocessing 3D point cloud data is as follows: The random sampling consensus algorithm is used to segment the 3D point cloud data and separate the spherical point cloud. Based on the connection structure between the spherical point cloud and the planar point cloud, calculate the planar point cloud that is closest to the spherical point cloud; By combining 3D point clouds and 2D images, the gradually varying structure point cloud of the region connecting the plane and the sphere is segmented.
4. The method for detecting surface defects in parts according to claim 1, characterized in that, The specific process for locating the defect area is as follows: For large defects, a surface fitting method is used to fit the surface parameters and calculate the theoretical deviation value of each point in the point cloud, and then cluster the connected regions. For small defects, radius filtering detection is performed on the global point cloud to identify locations of curvature abrupt changes and to delineate the connected regions and internal point clouds. Output the minimum bounding rectangle of the connected region and the coordinates of the defect center.
5. The method for detecting surface defects in parts according to claim 1, characterized in that, The specific process of generating multiple two-dimensional point sets is as follows: Based on the coarse location information of the defect, the point cloud around the defect is cut using a pass-through filter to obtain the point cloud to be traversed; Construct a pass-through filter perpendicular to the horizontal plane, sequentially cut the point cloud to be traversed, remove one horizontal component of each point in the point set, and generate multiple two-dimensional point sets.
6. The method for detecting surface defects in parts according to claim 1, characterized in that, The specific process of generating the fitted contour is as follows: Perform circle fitting on a two-dimensional point set and calculate the center and radius parameters; A fifth-order polynomial is used to fit the two-dimensional point set to generate a polynomial fitting profile.
7. The method for detecting surface defects in parts according to claim 1, characterized in that, It also includes the process of measuring the arch height: Obtain the point cloud of the arched membrane, and segment the arched region and the planar region based on model registration; Calculate the normal vector and center of the circle in the planar region; Draw a straight line through the center of the circle with the normal vector as the direction, and calculate the average distance from the point on the arched area to the plane area, which is used as the measured value of the arch height.
8. A device for detecting surface defects in parts, characterized in that, It includes a device housing (1), a frame (9), a platform (8), a displacement platform (5), a tray rack (4), a column (3), a confocal sensor (2), an industrial computer (10), and a motion controller (11). The device housing (1) has a frame (9) inside; a platform (8) is supported above the frame (9); a displacement platform (5) and a column (3) are installed on the platform (8); a tray rack (4) is fixed on the displacement platform (5), and the tray rack (4) is used to carry the parts to be tested; a confocal sensor (2) is installed on the column (3), and the lens of the confocal sensor (2) is vertically aligned with the tray rack (4); an industrial computer (10) is electrically connected to the confocal sensor (2) and the motion controller (11) respectively; the motion controller (11) is electrically connected to the displacement platform (5).
9. The part surface defect detection device according to claim 8, characterized in that, The industrial computer (10) sends acquisition signals to the confocal sensor (2) and receives point cloud data. The industrial computer (10) sends instructions to the motion controller (11). The motion controller (11) drives the displacement platform (5) to move according to the instructions.
10. The part surface defect detection device according to claim 8, characterized in that, The top of the device housing (1) is also equipped with a three-color light (7), which is electrically connected to the industrial control computer (10).