Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 10, No. 3, 2024 115 Research on Object Defect Detection of Automated Pipeline Based on Cognex Camera Jie Luo, Jufeng Ye College of Mechanical and Electrical Engineering, Zhejiang Tongji Vocational College of Science and Technology, Hangzhou Zhejiang, 311231, China Abstract: With the continuous improvement of people's living standards, higher requirements have been put forward for the efficiency of the manufacturing industry, so the application of automated pipeline in enterprises is becoming increasingly widespread. Due to various factors such as environment, labor, and technology that affect the manufacturing process of goods, some products have defects. It is necessary to screen out defective products in automated pipeline. This paper investigates the application of Cognex cameras in object defect detection on automated pipeline. The camera obtains material images under backlight conditions to determine the type, defect, color, and position parameters of the material. By analyzing these parameters, it determines whether the material is a qualified part. The results show that the camera can effectively complete the task of object defect detection. Keywords: Defect Detection; Automated Pipeline; Cognex. 1. Introduction With the continuous improvement of the intelligence level of industrial robots, they are able to perceive their environment through machine vision and have a certain degree of interaction ability with surrounding objects. Machine vision has powerful functions and is a key technology in fields such as object detection, workpiece localization, and object tracking. This paper mainly studies the field of object detection in machine vision. Currently, many object detection methods use template matching algorithms such as SIFT [1] and HOG [2] to complete object recognition work. Meanwhile, in recent years, a large number of excellent object detection algorithms have emerged, among which the Faster R-CNN algorithm based on region selection [3] and the Yolo algorithm based on End to End [4] have made significant progress in speed and accuracy, and have been able to achieve real-time image processing capabilities. However, currently in automation enterprises, industrial cameras are generally used to complete object detection tasks. Industrial cameras have the advantages of high accuracy, safety and reliability, and good environmental adaptability. Therefore, this paper applies Cognex camera to automation assembly lines to complete object defect detection tasks. 2. System Construction 2.1. Introduction to Automated Pipeline Currently, due to the high efficiency advantage of automated assembly lines, their application in manufacturing is becoming increasingly widespread. The automated pipeline in this paper mainly consists of PLC, industrial robots, recognition systems, conveying devices, and palletizing warehouses, as shown in Figure 1. Among them, PLC completes the overall control of the system, industrial robots complete the screening, handling, and assembly of materials, the recognition system completes the object defect detection, the conveying device completes the transportation of materials, and the palletizing warehouse is used to store materials. When materials are taken out of the palletizing warehouse and transported to the backlight device directly below the camera through the conveyor, the conveyor stops moving, and the materials also stop moving. At this time, the PLC controls the camera to complete the object defect detection and feeds back the detection results to the PLC. The PLC judges whether the materials have defects based on the received information. Materials with defects are marked as defective parts, and materials without defects are marked as qualified parts. Both qualified and defective parts are uniformly transported to the industrial robot workstation to complete the screening work. Fig 1. Automated pipeline 2.2. Camera The automated pipeline in this paper uses the Cognex In- Sight 2000 camera, as shown in Figure 2. Several scholars have conducted research on the application of Cognex cameras in different fields, such as surface inspection in the aluminum processing industry [5] and assembly lines for automotive engine cylinder heads [6]. This camera can communicate in real-time with the PLC, and its photo recognition actions can be triggered either by the PLC or manually through the Trig button on the camera, achieving 116 dual control of automatic and manual triggering. The control methods are convenient and rich. When the external light is dim, the camera has a flash fill function to ensure the stability of the captured images, which is conducive to identifying material defects and reducing the probability of misidentification. Fig 2. Cognex In-Sight 2000 Camera 2.3. Material Identification Task The automated pipeline in this paper needs to complete material identification and assembly tasks, where the material identification task is completed by cameras. The camera needs to recognize 8 types of materials, as shown in Figure 3, from left to right are base-1, motor-1, reducer-1, and flange- 1, which can be assembled into finished product-1. As shown in Figure 4, from left to right are the base-2, motor-2, reducer- 2, and flange-2, which can be assembled into finished product-2. Finished product-1 and finished product-2 each have four different colors, namely black, red, yellow, and blue. At the same time, there are also defective parts mixed in the material, and the characteristics of the defective parts are very similar to those of the qualified parts. Finally, the camera needs to identify the type, defect, color, and location of the material. When the material is transported to the recognition station by the conveyor belt, the conveyor belt sends a signal to the PLC. After receiving the signal, the PLC considers that the material has reached the recognition position. Therefore, the PLC sends a photo signal to the camera. After receiving the photo signal, the camera performs a photo recognition action. After completing the photo, the recognized material information is sent to the PLC for use in subsequent processes. Fig 3. The four materials of finished product-1 Fig 4. The four materials of finished product-2 3. Test Results Fig 5. The reducer-1 image Fig 6. Three defective parts of the reducer This article presents the detection images of some materials captured by the camera. Taking the reducer material as an example, as shown in Figure 5, the outline and features of reducer-1 can be clearly seen in the image. There are two types of qualified components for reducers, namely reducer- 1 and reducer-2. There are three types of defective parts in the reducer, as shown in Figure 6. The main difference between them and the qualified parts is the number of characteristic holes. The qualified parts have three characteristic holes, with the middle characteristic hole having a larger diameter and the two side characteristic holes having smaller diameters and symmetrically arranged. However, the number of characteristic holes in defective parts varies. Defective part-1 has two characteristic holes and is missing a small left characteristic hole. The number of feature holes for defective parts-2 and parts-3 is one, with defective part-2 lacking small feature holes on both sides, and defective part-3 lacking a middle feature hole and a left small feature hole. Therefore, based on the number of feature holes, it can be determined whether the material is a defective part. The test results show that the camera can accurately identify the three types of defective parts mentioned above. When the material is identified as a defective part, it will be labeled, and the camera will send the parameter package containing the label to the PLC. The PLC will control the subsequent processes to complete the screening of defective parts based on the information in the parameter package. 4. Summary This paper investigates the widely used object defect detection task in automated pipeline. This paper uses Cognex cameras to identify the type, defect, color, and location of materials. Determine whether the material is a qualified or defective part based on the above information. Finally, after testing, it was found that the camera can effectively complete object defect detection tasks, identifying defective parts for subsequent screening processes. Therefore, it can be considered to extend it to other occasions that require object defect detection. 117 Acknowledgments This work was financially supported by the General Scientific Research Project of Zhejiang Provincial Department of Education (No. Y202250472). References [1] D.G. Lowe. Distinctive Image Features from Scale-Invariant Keypoints. International Journal of Computer Vision. 2004, Vol. 60 (No. 2), p. 91-110. [2] N. Dalal, B. Triggs. Histograms of Oriented Gradients for Human Detection. IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2005, p. 231-236. [3] S. Ren, K. He, J. Sun. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. Proceedings of the Advances in Neural Information Processing Systems. 2015, p. 91-99. [4] J. Redmon, S. Divvala, R. Girshick, et al. You Only Look Once: Unified, Real-Time Object Detection. IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2016, p. 779-788. [5] J. Ge. Application of Cognex Surface Inspection System in Aluminum Processing Industry. China Metal Bulletin. 2020, (No. 8), p. 227-229. [6] W.B. Luo. Application of Cognex Visual System in Maintenance Technology of Cylinder Head Oil Seal Machine. Mechanical & Electrical Engineering Technology. 2019, Vol. 48 (No. 7), p. 246-248.