Surface defect detection for anodized aluminum tube based on automatic optical inspection

This paper proposed using the automated optical inspection (AOI) technology to develop a system which can automatically detect and classify defects for the shock absorber tube (SAT) made with steel. It is a high economic product which requires high-quality even under mass production. Nevertheless, the current manual quality-inspection is not only error-prone but also very manpower demanding. Due to the strong reflective property of the surface, as well as its various sizes and subtle flaws, it is very difficult to take good quality image for automatic inspection. However, based on the surface properties and shape of the SAT, lighting and proper structure combined with line scan camera have been designed to acquire image with good quality. Methods were proposed to detect various kinds of defects, and experimental results show that all the defects can be detected in real time. We believe the proposed system can greatly increase the efficiency and accuracy of defect detection and decrease the cost of manual labor.


Introduction
In recent years, due to the ups and downs of oil prices, the idea of energy saving and carbon reduction prevails and the concept of healthy living gradually rises.Therefore, it becomes more common for people to ride bicycles.Furthermore, the bike lane planning and design is also gaining more attention, which makes the bike become not only a tool for travel but also an instrument for recreation.The shock absorber is the key component for the comfort of riding a bike, where the shock absorber tube (SAT) is the main body and is the most important part inside the absorber.When the surface of the SAT is defective, it can cause air leakage, oil leakage and loss of the suspension function.Thus, the finished SAT products must be inspected to detect any defects that might exist in it before shipping.This is currently done by human visual inspection which is error-prone, inefficient and costly.AOI technology has been successfully applied in various fields for product inspection.For examples, several methods have proposed using AOI for the inspection of cylindrical objects . 1,2It is also used in some of the traditional industrial line for inspecting the defects for the bearing column 3 and iron bars. 4,5For the inspection of metal surface, a variety of different methods of defect identification have been used. 6,7In Ref. 8, iterative approximation threshold method was used to detect defective areas on metal surfaces.These literatures show that for different material of metal surface, one can utilize various method to detect the defects.However, the other approach is to properly design the lighting and select correct camera 9,10 to let the defects emerge from the background and simplify the process of defect detection.In this paper, lighting, camera and imaging structure have been properly designed to generate good P -59 quality image which makes the detection process become very easy.

Hardware for AOI System
To inspect a cylindrical object like SAT (200mm of length), as shown in Fig. 1, we need equipment with an axis to rotate it in order to inspect the whole surface.Given its round shape, a line scan camera and a line light for illumination is the suitable to acquire the image.The overall system setup is illustrated in Fig. 2 and in the following subsections, we will describe these system components respectively.

Line scan camera
Line-scan camera accumulates many lines to form the length of the image and has the advantage of fast speed and wide FOV (field of view).The camera we used is SUFi74 (7.4k pixels/line) with F-mount lens (F1.8 and 50mm focal length).

Illumination
The lighting for the line-scan camera are mostly based on line light source, which is very bright and provides very narrow stripe of illumination.Not like the golf club [10], the body of SAT is straight enough to provide stable rotation while it is rotated for image taking.The lighting we used is IDBB-LSR300W (300mm of length) manufactured by KKIMAC.The angle of illumination must be carefully setup in order to obtain useful images for inspection, and this needs experiments and experience.

Rotatory mechanism
The line scan camera demands a very stable rotation which depends on the stability of the rotary mechanism and the straightness of the SAT itself.This is because the line-scan camera only focuses on one thin line area of the object, and slight deviation of the rotation could miss or degrade image acquisition of the line.The rotatory mechanism we built is shown in bottom of Fig. 2, where A is the servo motor and encoder for controlling the position and speed of rotation (180rpm), B is the coupling for connecting axes of two different rotating objects to achieve concentric rotation, C is the measuring fixture to hold the SAT for rotation, and D is a slide bushing structure which can be adjusted to fit different length of the SAT.P -60

Methods of Defect Detection
When the SAT is placed on the rotating mechanism to rotate with proper side lighting, the bright field is the area to be acquired for image.After the camera and motor parameters are set, the camera is controlled via the trigger signal and synchronized to the speed of the rotary mechanism to capture the full-circle image.After the whole SAT surface is acquired, the image is ready for defect detection process.Two simple methods are used to verify the suitability of the proposed approach.

Filtering method
Because texture of the tube can cause obvious horizontal stripes in the image, it will interfere with the judgment of the defect.It can be eliminated by ROI filtering to remove the high-frequency periodic pattern.The filtered image is first binarized to find the darker gray-scale region, and then expanded by morphological close operation to piece up the broken defect.Finally, each candidate region is discriminated as defect if its size is larger than a predefined threshold.Some of the detection results are shown in Fig. 3.The disadvantage of this approach is that when the defect appears as horizontal line, it will be filtered out with the background texture, which is shown as missed detection SAT-3 in Fig. 3.

Image difference method
This method is to put the original image through both Gaussian filtering and mean filtering first.The two output images are then subtracted each other to obtain an image with much less texture and noise, which can greatly simplify the follow-up treatment of thresholding, morphological operation and classification.The flaw detection results are shown in Fig. 4. As we can see from the figure (SAT-3), this method can detect long-thin flaws with much less broken defect feature.

Experimental Results and Discussion
Some of the flaws on the SATs under test can be recognized by the naked eye, but some cannot.These subtle defect needs to be inspected visually using magnifying glasses or to be imaged by the proposed system.The acquired image by the system has very high resolution such that the defects can then be visually identified on the computer screen or automatically detected by machine vision method.In this evaluation phase, we put our proposed system and detection method for an on-line test to automatically identify the defects using 13 SATs provided by the manufacturer.The software is developed under C#/emgu environment, and the results are shown in Table 1.The smaller size image (1000×1000) was used for verifying detection method which only processed the region around defects.The larger size image (7392×2500) covers the actual FOV of the camera and acquired the region inside the FOV.One example is illustrated in Fig. 5 to show the detection results.Note that the darker regions on the left and right boundaries of the image might be caused by the light source or rotatory mechanism, but it does not interfere the detection.Given processing time of 550~600ms by using multithread (image difference method), it can achieve real-time to inspect the whole tube on line.

P -61
Table 1.The evaluation results conducted for 13 SATs.

Conclusions
In this study, we used the oblique light with a proper angle to highlight the defects, so as to simplify the defect detection process and improve the detection rate.One detection method can successfully detect most of the defects on the tube surface and the other method can detect all the defective tubes with 100% detection rate.
Because the manufacturer-defined defect-free SAT tubes also have been identified as defective (false alarm), there is still room for discussion between human and machine inspection.Manually visual inspection of SAT defects is not only less efficient but also less stable, we anticipate the AOI technology will soon replace the manual inspection to improve the efficiency and stability and reduce the cost.P -62

Fig. 1 .
Fig. 1.Left: The shock absorber tubes under inspection by AOI.Right: SAT inside the absorber chamber.

Fig. 2 .
Fig. 2. Top: Sketch of the AOI system setup.Bottom: the implementation of the rotary mechanism.

Fig. 3 .
Fig. 3.The defect detection results based on filtering method.Top: acquired image, Bottom: defect detection (defect in red).

Fig. 4 .
Fig. 4. The defect detection results based on image difference method.Horizontal defect (in SAT-3) can now be detected.

Fig. 5 .
Fig. 5.The defect detection results based on image difference method with image size 7392×2500.