The height measurement of small workpieces and the detection of surface defects are the focus of research in industrial production.Traditional contact inspection methods can cause wear and tear on the workpiece surface,so with the current popularity of non-contact methods,workpiece measurement and defect detection techniques based on point cloud algorithms have become one of the main focuses of research and have broad application prospects.This paper focuses on the precision measurement of workpiece height information and the detection of defects on workpiece surfaces based on point cloud data processing,with the following research:(1)A measurement method combining multiple filtering of the point cloud with plane fitting is proposed for many small industrial parts where micron-level measurements are required.The workpiece point cloud data is collected,and the upper and lower surfaces of the workpiece point cloud are separated by statistical filtering,voxel filtering and direct-pass filtering;then the upper and lower planes are fitted by the Random Sample Consensus(RANSAC)algorithm respectively;finally the distance between the upper and lower planes is calculated as the height information of the workpiece under measurement.The measurement method is 72.33%more accurate than the traditional laser triangulation method;when the side length of the voxel cube in the downsampling is 15 cm(when the number of point clouds is reduced by 98.3%),the measurement error is minimised to 5.1μm.(2)Point cloud alignment is a key step in workpiece surface defect detection.The paper proposes to combine the Sample Consensus Initial Alignment(SAC)algorithm with the Normal Distribution Transformation(NDT)algorithm as the initial point cloud alignment method,and then use the KD-Tree(K-Dimensional Tree)accelerated Iterative Closest Point(ICP)method to complete the point cloud matching.This method significantly improves the alignment accuracy,reducing the root mean square error of the alignment by an order of magnitude to 10-8 m.(3)For the detection of bulging and pit defects on the workpiece surface,this paper proposes a method that first identifies defects and then classifies the defective parts.The defect identification is done by aligning the standard point cloud with the point cloud to be measured using the proposed high-precision point cloud alignment method based on SAC-NDT and ICP,and then completing the defect identification based on the distance from the point on the point cloud to be measured to the standard point cloud;the defect classification is done by comparing the size of the mean Z-value of the standard point cloud and the defect part of the point cloud,and classifying the defects into bulging,ordinary dents and scratches.The feasibility and effectiveness of the method was demonstrated through experiments. |