Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 5, No. 3, 2023 198 Design of Laser Clear Machine with Visual System Xinfeng Chen1, *, Ning Wang1, Jianhao Tang1, Yicheng Li1 1Wenzhou Polytechnic, Wenzhou 325000, China * Corresponding author: cxf9203@126.com Abstract: With the continuous transformation and upgrading of China's industry, higher requirements have been put forward for the quality and efficiency of the industry, and the service of the industrial cleaning. The traditional cleaning method has been unable to meet the application needs in the industrial field due to its high pollution and high energy consumption. Laser cleaning, as a green, environmental protection, non-destructive new cleaning method, has quickly become a hot technology in the field of industrial cleaning. This paper will focus on this argument for laser rust removal. Keywords: Motion Control, Autonomous Control Technology, Pulsed Laser Cleaning Technology. 1. Introduction Laser cleaning is an innovative solutions for metal surface cleaning because its non-contact, flexible, high-efficiency, no pollution to environment[1-2]. In this paper, it will introduce the principle of the laser clearing machine(LCM), including motion control, visual algorithm, so it will have a more comprehensive understanding of the LCM. In practical application, a complete and reliable laser cleaning equipment is needed, namely the LCM. It is the product of laser technology and other related technologies and is the ultimate physical carrier of laser cleaning technology. At present, commercial LCM have appeared. This paper integrate vision system with basic laser system, which can use PC to control laser or using vision guidance to control laser.. 2. Principle of the Laser Cleaner (1) Structure of the laser washer The LCM is mainly composed of three modules: laser module, vision module and motion control module; the laser module is mainly responsible for generating red light and laser; the vision module is mainly responsible for scanning the rust of metal objects and image processing to transfer the location of the metal artifacts to be processed to the motion control module, and the motion control module is mainly responsible for transporting the metal artifacts to the designated position and control vibration-mirror motor, the systematic structure is presented in figure 1. Figure 1. Systematic structure of laser clearing machine In terms of workflow of the LCM, as shown in figure 2 below, the work piece is fixed into a base and captured picture by camera. An image process is implemented for raw image. The result will be delivered to control system, which will control XY axis for planner moving, and also can control the vibration-mirror motor to control the laser path. 199 Figure 2. Laser cleaning process (2) Laser rust removal principle The laser is transmitted through an optical fiber and focused by a lens into a laser spot and the position of the laser beam on the sample surface is controlled by a high-speed galvanometer scanning method to complete the laser cleaning[3]. Using this high frequency, high-energy pulse laser irradiation workpiece surface, coating layer can instantly absorb focused laser energy, make the surface of oil, rust or coating instantaneous evaporation or stripping, high speed effectively remove surface attachments or surface coating cleaning way, and action time is short laser pulse, under the appropriate parameters will not harm the metal substrate, which is shown in figure 3. Figure 3. Principle of laser rust removal. (3) Motion control function and structure This project will use ZMC controller which is short for the ZMotion motion controller. ZMotion controller can be applied to various situations that require offline or online operation. ZMC motion controller supports Ethernet, USB, CAN, 485,232 and other communication interfaces, through the CAN bus can be connected to each expansion module. ZMC controllers, shown in figure 4, can be debugged through the ZDevelop development environment, and ZDevelop is a convenient programming, compilation and debugging environment. ZDevelop Connect can be established with the controller through a serial port, 485, USB, or Ethernet. The program can be developed using VC, VB, VS, C + + Builder, C #, and so on. During debugging, the ZDevelop software can be connected to the controller at the same time. In this project, a dynamic link library is used in python 3 environment which can also process image and transfer data to ZMC. Figure 4. ZMC Motion controller (4) Image processing In the process of workpiece transmission, in order to detect whether the workpiece reaches the cleaning area, the upper machine needs to treat the each frame of the image taken and transmitted back by the machine is detected to determine whether there are artifacts in the image. The image acquisition equipment to be used in this paper is Hikon's MV-CA013-21UC CMOS industrial camera. In order to better control the industrial camera, Hikon provides the industrial camera SDK, which is available for python programming and OpenCV image process. (5) Transformation of the image data The data type format of the raw image acquired by the industrial camera is RGB type, while the data of the image data type required for image processing for the image processing OpenCV library is BGR type exists in Mat format. Therefore, the image data transformation is required. After getting raw image data, find a specific rusty area through findcontour function and transfer location to motion controller in real world coordinates. Simultaneously, motion controller sends galvanometer signal to control mirror vibration, includes motor speed, acceleration, amplitude of vibration. 3. Implementation Because the shape and size of the workpiece vary, in order to achieve simplicity, this paper takes the length, width and height. The rusty iron plate of 100mm * 100mm * 1mm is tested for the workpiece. In order to accurately detect the position of the rusty iron plate and prepare for the subsequent laser focus and laser cleaning, this paper mainly obtains the rusty iron plate area accurately by finding the peripheral outline and finding the minimum surrounding rectangle. The whole device and structure are shown in figure 5. 200 Figure 5. Prototype machine (1) Threshold of image segmentation The image segmentation method based on the threshold value divides the gray value of the image into two groups by setting the threshold value, so as to convert the image into a binary graph, so as to realize the purpose of image segmentation. This method is not only intuitive, but also easy to realize and fast computing speed, so it is very suitable for the application scenarios of detection when needed. Where the formula is shown in below: dst ๐‘ฅ, ๐‘ฆ ๐‘š๐‘Ž๐‘ฅ ๐‘ฃ ๐‘Ž๐‘™, ๐‘ ๐‘Ÿ๐‘ ๐‘ฅ, ๐‘ฆ ๐‘กโ„Ž๐‘Ÿ๐‘’๐‘ โ„Ž 0,Other situations Where: thresh is the selected specific threshold. Of the 8- bit images, the maximum value is 255. Therefore, when binarizing the 8-bit grayscale image, if the threshold value is set to 127, the pixels larger than 127 are processed to 255. The remaining values will be treated as 0. As shown in figure 6. Figure 6. Thresholding process (2) Median filter Image preprocessing is very important, especially to perform the filtering processing. Because industrial camera in the process of image acquisition because of the environment or itself because of the environment or the cause of the sensor noise, some real pixel value, the noise will cause great interference to the subsequent image processing, when cleaning metal components may appear the phenomenon of reflective parts at this time the median filter is a very good method. Morphological manipulation is a simple manipulation performed according to the image shape. Generally, the binary image is manipulated. Two parameters also need to be input, one is the original image, and the second is called a structured element or a kernel, which is used to determine the nature of the operation. Two basic morphological operations are corrosion and expansion. They form the open operations, the closed operations, and so on. Morphology processing is also an important part of the application of convolution kernel, which is also called structural elements. Structural elements can be rectangular, elliptical, line-shape, and function of cv2.getStruchturingElement() can be used to generate elements with different structures as shown in figure 7. Figure 7. The convolution kernel parameters And some other useful kernel to extract valuable features from images [4,5]. (3) Positioning and scanning of the object contour In order to accurately detect the position of the rusty iron plate, in preparation for the subsequent laser focus and laser cleaning, this project mainly obtains the rusty iron plate area accurately by finding the peripheral outline and the minimum surrounding rectangle. (4) Seek external contours To find the vision of the metal contour laser washer, use the findcontours function in the OpenCV function library, box the rusty part of the image, and transmit it to the motion control system and the laser system for cleaning. The effects are shown in figure 8. Figure 8. Contour finding (5) Look for the surround rectangle 201 The findcontours function in the OpenCV function library only provides the general outline of the rusty iron plate. In order to select the rusty iron plate area, this paper uses the getRect function to select the rectangular area that can contain the rusty iron plate area. The return value of this function returns the position of rectangular area. The effects are shown in figure 9. Figure 9. Rectangle diagram By sketching the rusty part of the metal, laying the foundation for the positioning of the rusty part between pixels and path generation, so as to provide accurate coordinates for motion control and laser. The clearing process and results are shown in figure 10. Figure 10. Laser process and results comparing 4. Conclusion The vision of laser cleaner is mainly processed by OpenCV algorithm to identify and scan objects. Nevertheless, the vision system can inspect the result of clearing process. Vision system will generate basic path for motion controller to move station to clear objects which is mount in the base. Simultaneously, computer will send information to controller to start vibrating in the vibration mirror. Acknowledgment This research was funded by Department of Education of Zhejiang Province, Wenzhou Polytechnic under grant number Y202250639. Wenzhou Polytechnic under grant number WZY2020025. References [1] F.D. Zhang, H. Liu, C. Suebka, Y.X. Liu, Z. Liu, W. Guo, Y.M. Cheng, S.L. Zhang, L. Li, Corrosion behaviour of laser-cleaned AA7024 aluminium alloy, Applied Surface Science, Volume 435, 2018, Pages 452-461, ISSN 0169-4332. [2] Wanfang Zou, Feng Song, Ying Luo, Characteristics of audible acoustic signal in the process of laser cleaning of paint on metal surface, Optics & Laser Technology, Volume 144, 2021, 107388, ISSN 0030-3992. [3] Qi Sun, Jianzhong Zhou, Xiankai Meng, Pengfei Li, Mechanical properties and microstructure characteristics of 2024-T351 aluminum alloy specimen subjected to paint removal by laser cleaning, Vacuum, Volume 211, 2023, 111927, ISSN 0042-207X. [4] Mebatsion, H.K., J. Paliwal, and D.S. Jayas, Automatic classification of non-touching cereal grains in digital images using limited morphological and color features. Computers and Electronics in Agriculture, 2013. 90: p. 99-105. [5] Wang, T., L. Xu, and J. Li, SDCRKL-GP: Scalable deep convolutional random kernel learning in gaussian process for image recognition. Neurocomputing, 2021. 456: p. 288-298.