| Under the background of the strategy of “Made in China 2025” and “Industry 4.0”,CNC machine tools are developing toward intelligent integration.In order to strengthen control of the surface quality of the workpiece in manufacturing,a visual inspection technology is applied in the machining process of the CNC machine tool to realize the identification of the defect type of the workpiece surface on line.Identification of the surface defect type of the workpiece.Following here are the main research content of this paper:1.Reducing the area need to be detected and obtain higher efficiency of feature extraction.the pixel values of the tool marks and defects on the surface of the shaft workpiece is hard to be identified.From the perspective of bionics,taking this problem into consideration,the visual significance mode is used to detect defect area.Compared with the classical visual significance mode,the spectral residual visual saliency algorithm works better.But the spectural residual cisual saliency algorithm still causes tool marks after detecting workpiece.This algorithm need to improved and used to eliminate the impact of tool marks,leaving the result more accurate than before.The edges of the results obtained using visual saliency detection are ambiguous,so the superpixel segmentation algorithm is combined to further determine the defect regions.Morphological operations are used to eliminate some of the voids and burrs produced from image processing.2.Improving the correct rate of defect recognition,a method combining non-subsampled Contourlet transform and Hu invariant moment is proposed to extract features aim at some pseudo-defect problems that may occur when using visual saliency algorithm.The non-subsampled Contourlet transform can provide different numbers and more flexible directions,capture the intrinsic geometry of the image,and repsent the image effectively,so the non-subsampled Contourlet transform is used to extract the defect information in the original image and the Hu invariant moment is used to extract the visually significant the characteristics of the sexual image,using the two features to obtain the final feature vector.It is experimentally verified that the recognition accuracy of the feature values obtained in this way is higher than any of the single feature extraction method.In order to improve the recognition efficiency,the PCA is used to reduce the features for the problem of large feature value dimension.3.The effectiveness of above algorithm is verified by image experiments and the result meets the requirements of real-time.The online identification solution for surface defects of CNC axes is proposed.The software and hardware system based on FPGA+DSP are used.The functions of automatic image acquisition,image preprocessing,visual feature extraction and defect recognition in the processing cycle are realized.The engineering application for CNC machining of key automotive parts shows that the recognition rate for two typical defects reaches 100%. |