Automatic Optical Apparatus for Inspecting Bearing Assembly Defects

In this study, an inspection apparatus including offline and online inspection systems that are highly efficient is developed for the unidirectional bearing of automobiles. To avoid the influence of outside factors and ambient light, the proposed system, which includes a lighting source, an image capture device, and a sensor, is placed in a dark room as a controlled environment for offline inspection. Furthermore, rule-based algorithms for local mask sensors are developed to overcome the highly reflective characteristic of metallic materials and thus assist online inspection. The inspection process of the system is mainly divided into three parts: central positioning of the device under test (DUT), blob analysis, and identification units of needles. After testing, the correct inspection rates for offline and online inspection systems of the proposed system are 100 and 99.94%, respectively.


Introduction
With the advance of technology and ever-changing marketing demand, product quality, production capacity, and yield rate have been improved markedly.The quality control of products has gradually changed from visual inspection to automatic inspection.Automatic optical inspection systems are the most common in automatic inspection.Such systems can be widely used in various industries and their high detection stability can significantly improve the inspection yield rate.
Aribowo et al. proposed an adaptive algorithm for a soccer robot to identify the arena, as well as for detecting the position and direction of the robot. (1)This method was proven to be able to detect and distinguish the arena and robots in a dynamic environment.The experimental results show that the adaptive edge detection method can detect the site regardless of 100% changes in the camera or light source. (1)ian et al. proposed a new and fast calibration method based on the dot theory. (2)The method captures target images from different locations, and obtains internal and external parameters by applying the Laguerre theory.
Zhong et al. proposed that bearing outer diameter inspection is an important part of bearing inspection. (3)In their study, the outer diameter of the bearing is inspected by the Hough transfer method.
Traditional metal defect detection is based on human inspection.However, traditional detection methods have a high rate of false positives.Therefore, Martínez et al. proposed a unique lighting device and combined it with a neural network architecture to detect metal defects. (4)he results show that this method can effectively reduce the false positive rate.
Ghidoni et al. proposed an autonomous system for inspecting small cracks of metal parts. (5)After testing, they found that microcracks can lead to dangerous failures when metal components are under strong mechanical stress.
Surface porosity is a common problem in machining castings.Menzies and Koshy presented a novel noncontact technique with a pneumatic sensor for inspecting the surface porosity. (6)he results showed that the inspection system can be successfully used on production lines.
In order to monitor the integrity of bridges, Kim et al. tested a vehicle system equipped with accelerometers to verify the practical feasibility of three drive-by methods: bridge-frequency extraction using the Fourier spectrum of a vehicle's dynamic response, damage detection using the change in a vehicle's spectral distribution pattern, and roadway surface profile identification. (7)earings are widely used in many industries; hence, the quality of bearings is very important.To inspect bearings, several methods have been proposed.0)(11) Sugumaran and Ramachandran solved the problem of detecting vibration signals by applying machine learning. (12)In their study, the support vector machine (SVM) and proximal support vector machine (PSVM) classifiers were used to clarify statistical and histogram features of time domain signals.The histogram results showed that PSVM exhibits better performance than SVM.
Unidirectional bearings for automobiles are one of the important components in automobiles.Each unidirectional bearing must be equipped with 20 needles.However, the current inspection method is visual inspection.This method may cause false negative situations owing to visual fatigue of inspection personnel.In this study, a unidirectional bearing for automobiles is used as the research object or device under test (DUT).It is difficult to inspect the quality of the DUT because metallic materials are highly reflective.The proposed system was developed to solve the problem of reflection.

Description of inspected object
Each unidirectional bearing has five brackets and twenty needles placed inside as shown in Fig. 1.The purpose of the inspection is to judge whether the needles are completely assembled or not.

System architecture for offline and online inspection system
The system uses a backlighting source and a forward lighting source for offline and online inspection, respectively.The major components are as follows.

Traditional backlighting source
Figure 2 shows that an image obtained by using a traditional backlighting source.To obtain clear contours, the double global thresholds and erosion operation with a minimum particle size of 2 are used, as shown in Fig. 3.With the above traditional backlighting, binary thresholding, and image processing methods, it is difficult to separate needles from other background objects.

Proposed new backlighting source
It is difficult to get good image quality in the traditional backlighting module.In this study, the unique backlighting module was developed for bearing inspection, as shown in Fig. 4. The developed backlighting module with the black mask above the light source can generate a horizontal radial light environment to depict more bright blobs at needle positions, as shown in Fig. 5. Therefore, it is more convenient to detect needles from the above image rather than by the traditional backlighting method.

Procedure for inspecting needles of unidirectional bearing
In this study, the standard operating procedure was developed for offline and online inspection.The inspection flowchart is shown in Fig. 6.
The offline inspection procedure is as follows.First, the DUT is placed on the fixture for inspection.Second, the DUT is placed on the fixture at the same time the metal sensor is triggered.The image is captured after 5 s, which ensures that the conditions of the inspection environment are stable.Third, the captured image is imported into the computer for blob analysis in image processing and to recognize the number of needles.Finally, the inspection result is shown on the monitor in real time.
The online inspection procedure is as follows.First, the DUT is placed on the conveyor for inspection.Second, the conveyor will transfer the DUT to the inspection area.When the optical sensor is triggered by the DUT, it will stop the conveyor and trigger the camera to capture the image.Third, the captured image is imported into the computer for blob analysis in image processing and to recognize the number of needles.Finally, the inspection result is shown on the monitor in real time.

Central positioning of the DUT
Some errors occur during the production process, such as manufacturing and assembly errors.To decrease the central deviation problem caused by manufacturing and assembly errors and to provide a flexible inspection system, the automatic alignment function is proposed.To establish the center of the DUT, we created two reference circles (green and yellow circles) for circular regression analysis by using five reference points, as shown in Fig. 7.

Find reference objects (five brackets) to predict needle position
After obtaining the center of the DUT, some reference objects should be detected before inspecting needles.For the current product, the five brackets can be used as the reference objects because the angle between the bracket and the needle, represented as angle 1, and the angle between two neighbor needles, represented as angle 2 in Fig. 8, are fixed.Angle 1 is about 9.66 degrees and angle 2 is 14.40 degrees.When the five brackets are obtained by the proposed system, the positions for twenty needles can be predicted.
The relative angles between brackets and needles are controlled dimensions in the manufacturing process.The inspection system can obtain the relative angles between the brackets and the needles.Moreover, the inspection system can also be applied to measuring the relative angle between the bracket and each needle.

Blob analysis
In this step, the blob analysis is mainly performed to identify needles of the bearing.All areas that are inside 100 and 350 pixels will be reserved.On the other hand, all areas that are outside 100 and 350 pixels will be excluded.

Inspecting the number of needles
When the blobs of the specified area are separated, then the identification of the needle is based on the needle position of the original design, since the errors will occur during the manufacturing and assembly processes.The system gives a 2 degree angle tolerance to the needle angle.If the corresponding blob cannot be found within the angle tolerance, it is regarded as the lacking part.Figure 9 shows the result of identifying the angle position of the needle.

Design of backlighting source
The system with the horizontal radial backlighting source detects the needles of the unidirectional bearing of automobiles.Figure 10 shows the lacking needle images under the proposed backlighting source, which can effectively concentrate the light on the inspection area of the DUT.The needles have high reflection characteristics and can be quickly obtained when blob analysis is performed.A fixture to hold the DUT firmly was designed in this study to favor static detection; therefore, the stability of the inspection system can be greatly improved.

Measurement results of angle of qualified parts by offline inspection system
The angles among the needles also belong to the controlled dimensions in the manufacturing process.Each DUT has 25 measurement positions.In order to investigate the stability of the inspection system, the measurement of the qualified parts was performed for five different angles.The results of angle measurement show that the stability and repeatability of the system are high, as shown in Fig. 11 and Table 1.

Inspection of lacking parts using offline inspection system
In this section, we take the lack of one needle, two needles, and three needles at different orientations as examples to test the inspection accuracy.The results show that the inspection system can effectively and correctly identify the positions of lacking needles, as shown in Fig. 12.After testing, the correct inspection rate for the proposed offline inspection system was 100%.

Online Inspection System
The offline inspection system belongs to an independent inspection station.The system is more suitable for quality control.In order to obtain the quality status of the DUT in real time on the production line, it is necessary to develop an online inspection system within the production line.The online inspection system mainly uses the forward light source as the lighting method.However, it is difficult to inspect the quality of the DUT because its material is metal and it has a high reflective characteristic.

Establish local sensor mask for each needle
To solve the reflective characteristics of the DUT, a local sensor mask was established for each needle at the predicted positions, as shown in Fig. 13.In the local sensor mask, there are nine lines distributed in the radial and tangential directions.There are a total of 81 pixels in the local sensor mask, as shown in Fig. 14.The maximum values of grayscale, average, standard deviation, and ratio can be determined using the 81 pixels.The ratio is defined as the maximum value minus the average value divided by the standard deviation.The nine pixels of the middle area in the local sensor mask are divided into the left, middle, and right groups, as shown in Fig. 15.The mean values of the left, middle, and right groups, the radial standard deviation, and the tangential standard deviation can be determined using these 9 pixels.

Rules for eliminating false positive cases
In order to find the needles that were not found by blob analysis in the previous stage, the following nine conditions and one exclusion condition are developed.Condition A: The standard deviation of the gray scale for pixels within the local sensor mask is smaller than the threshold value A.  Four rules and one exclusion rule are used to eliminate false positive cases due to reflective characteristics of the DUT under the forward light source.These rules are as follows.Rule 1: Both conditions A and B are met; it is judged that there is a needle.Rule 2: Either condition A or B is met, and both conditions C and D are met; it is judged that there is a needle.Rule 3: Either condition E or F is met, and both conditions C and G are met; it is judged that there is a needle.Rule 4: Five conditions, H, I, C, D, and G, are all met; it is judged that there is a needle.Exclusion rule 5: When exclusion condition J is met, no matter what kind of the above four criteria is met; it is judged that there is no needle.

Rules for eliminating false negative cases
In order to conduct an advanced check that the needle has been found by blob analysis in the previous stage, the following six conditions and one exclusion condition are developed.Condition K: The values of both the left and right groups of the gray scale for pixels within the local sensor mask are larger than the threshold value K. Condition L: The standard deviation of the gray scale for pixels within the local sensor mask is larger than the threshold value L. Condition M: The ratio of the gray scale for pixels within the local sensor mask is larger than the threshold value M. Condition N: The maximum value of the gray scale for pixels within the local sensor mask is larger than threshold value N. Condition O: The ratio of the gray scale for pixels within the local sensor mask is larger than the threshold value O. Condition P: Both the ratio of the gray scale for pixels within the local sensor mask is larger than the threshold value M and the mean value of the right group is larger than the mean value of the middle group for pixels within the local sensor mask.Exclusion condition Q: The middle group of the gray scale is larger than the left and right groups of the gray scale for pixels within the local sensor mask.The definitions for values K, L, M, N, O, and P are as follows.Value K: the threshold value of the middle group of the gray scale Value L: the high threshold value of the standard deviation of the gray scale Value M: the low threshold value of the ratio of the gray scale Value N: the high threshold value of the maximum value of the gray scale Value O: the high threshold value of the ratio of the gray scale There are four rules and one exclusion rule used to eliminate false negative cases due to reflective characteristics of the DUT under forward light source.These rules are as follows.Rule 6: When three conditions, K, L, and M, are all met; it is judged that there is no needle.Rule 7: When condition N is met; it is judged that there is no needle.Rule 8: When condition O is met; it is judged that there is no needle.Rule 9: When condition P is met; it is judged that there is no needle, but in actuality, the needle is blocked by the spring plate.
Exclusion rule 10: When exclusion condition Q is met, no matter what kind of the above four criteria is met, it is judged that there is a needle.

4.4
Results and discussion on online inspection system

Inspection of lacking parts using online inspection system
In this section, we take qualified parts and defective parts lacking one needle, two needles, and three needles at different orientations as examples to test the performance of the online inspection system.The results show that the online inspection system can effectively and correctly identify the qualified and defective parts, as shown in Fig. 16.

Inspection using online inspection system on the production line
Among the 10543 inspection samples on the production line, there are 10235 qualified and 308 defective parts.Among the 308 defective parts, 302 parts are true positive and only 6 parts are false positive, which was over-inspected by the system.After analyzing the inspected images of the true positive parts, they can be divided into five groups: needles lacking; DUT blocked by the product card; DUT occluded by the mask; needles covered by the spring plate; needles incorrectly assembled (Fig. 17).Among all the unqualified parts, there are 252 with lacking needles, 4 with DUT blocked by the product card, 37 with DUT occluded by the mask, 7 with needles covered by the spring plate, and 2 with needles incorrectly assembled, and their proportions are 83.44,1.33, 12.25, 2.32, and 0.66%, respectively.
The condition that the image of the DUT is blocked by the mask accounts for 12.25% of all unqualified parts.The main reason may be that the outer contour of the unidirectional bearing is complicated because the optical sensor is triggered too late and the operator collides with the previous DUT when placing the new DUT, which causes an excessive position deviation of the DUT.The inspection system does not yield any false negatives during the whole inspection process, and only a small number of DUTs are false positives.After testing, the correct inspection rate of the online inspection system is 99.94% and the over-inspection rate is 0.06%.

Conclusions
In this study, an effective inspection system for automobile bearings was developed.The conclusions are as follows.1.The inspection system uses a dark room to avoid the influence of outside factors and ambient light.2. The offline inspection system is used for static inspection, and it uses the positioning fixture to ensure the stability of the test.3. Sensors are used to trigger the camera to reduce the influence of human factors.4. The offline inspection system has been used on the production line and the results showed that the correct inspection rate is 100%.5. 10543 samples were tested using the online inspection system.The inspection accuracy was 99.94%, and the over-inspection rate was 0.06%.6.This system can not only identify whether the DUT has needles or not, but also inspect four other cases of defects such as the DUT blocked by the product card, the DUT occluded by the mask, the needle covered by the spring plate, and the needle incorrectly assembled.
(a) Lighting device: In this study, the backlighting source is used for offline inspection and the forward ring lighting source is used for online inspection.(b) Camera: The Logitech C615 and IDS CMOS cameras are used as image acquisition devices for offline and online inspection, respectively.(c) Sensors and microcontroller: To reduce the influence of human factors and maintain the stability of the inspection system, the metal sensor is used to trigger the camera in offline inspection and the optical sensor is used to trigger the camera and stop the conveyor in online inspection.(d) Computer: After capturing the images, the images are imported into the computer for image processing and inspection.

Fig. 7 .
Fig. 7. (Color online) Identifying the center of DUT by regression analysis.

Fig. 8 .
Fig. 8. (Color online) Angle between bracket and needle and angle between two neighbor needles.

Fig. 9 .
Fig. 9. (Color online) Result of identifying angle position of the needle.

Fig. 14 .
Fig. 14. (Color on li ne) Schemat ic d iag r a m of distributed pixel in local sensor mask.

Fig. 13 .
Fig. 13.(Color online) Establish the local sensor mask for each needle.

Fig. 16
Fig. 16.(Color online) Online inspection results of qualified and defective parts.

Quang-
Cherng Hsu received his B.S., M.S., and Ph.D. degrees from National Cheng Kung University, Taiwan, in 1985, 1987, and 1991, respectively.From 1993 to 1995, he was an engineer at Metal Industries Research & Development Centre, Taiwan.From 1995 to 2005, he was an associate professor at National Kaohsiung University of Applied Sciences, Taiwan.Since 2005, he has been a professor at National Kaohsiung University of Science and Technology, Taiwan.His research interests are in metal forming, machine vision, and nanoengineering.(hsuqc@nkust.edu.tw)

Table 1
Results of angle measurement and statistics of the qualified parts.