Next Article in Journal
Object Tracking in RGB-T Videos Using Modal-Aware Attention Network and Competitive Learning
Next Article in Special Issue
Crosstalk Reduction Using a Dual Energy Window Scatter Correction in Compton Imaging
Previous Article in Journal
Multi-GPU, Multi-Node Algorithms for Acceleration of Image Reconstruction in 3D Electrical Capacitance Tomography in Heterogeneous Distributed System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Magnetic Ring Multi-Defect Stereo Detection System Based on Multi-Camera Vision Technology †

1
School of Electronics and Information Engineering MOE Key Lab for Intelligent Networks and Network Security, Xi’an Jiaotong University, Xi’an 710049, China
2
Guangdong Xi’an Jiaotong University Academy, Foshan 528000, China
*
Author to whom correspondence should be addressed.
This paper is an extension version of the conference paper: Zhang, X.; Gong, W.; Feng, H.; Xu, X. Magnetic Ring Detection System Based on Multi-Camera Vision Technology. In Proceedings of the 2018 IEEE 4th International Conference on Computer and Communications (ICCC), Chengdu, China, 7–10 December 2018.
Sensors 2020, 20(2), 392; https://doi.org/10.3390/s20020392
Submission received: 20 November 2019 / Revised: 27 December 2019 / Accepted: 8 January 2020 / Published: 10 January 2020
(This article belongs to the Special Issue Image Sensors: Systems and Applications)

Abstract

:
Magnetic rings are the most widely used magnetic material product in industry. The existing manual defect detection method for magnetic rings has high cost, low efficiency and low precision. To address this issue, a magnetic ring multi-defect stereo detection system based on multi-camera vision technology is developed to complete the automatic inspection of magnetic rings. The system can detect surface defects and measure ring height simultaneously. Two image processing algorithms are proposed, namely, the image edge removal algorithm (IERA) and magnetic ring location algorithm (MRLA), separately. On the basis of these two algorithms, connected domain filtering methods for crack, fiber and large-area defects are established to complete defect inspection. This system achieves a recognition rate of 100% for defects such as crack, adhesion, hanger adhesion and pitting. Furthermore, the recognition rate for fiber and foreign matter defects attains 92.5% and 91.5%, respectively. The detection speed exceeds 120 magnetic rings per minutes, and the precision is within 0.05 mm. Both precision and speed meet the requirements of real-time quality inspection in actual production.

1. Introduction

Magnetic materials are commonly used in electronic circuits as anti-interference components. As the main product, magnetic rings are widely used in aerospace, military electronics, automobiles, sensors, the petrochemical industry, magnetic drives and other fields [1]. During the production process, due to the production environment and processing procedures, defects, such as crack, adhesion, pitting, foreign matter and fiber defects, will appear on the surface of the magnetic ring. These defects would affect the appearance and performance of industrial products. Therefore, high-efficiency and high-precision surface detection of magnetic rings is crucial for manufacturing enterprises. However, surface defect detection and height measurement of magnetic rings by manual inspection, which is currently widely used, are costly, inefficient, low-speed and low-accuracy. Hence, it is significant to design an automated system to complete real-time defect detection and height measurement for magnetic rings.
In recent years, many excellent technical solutions for defect detection have been proposed by researchers. The ultrasonic testing technique [2,3], eddy current testing technique [4,5,6] and vision inspection technique [7,8,9,10] are widely used. Among them, in practical production, the vision inspection technique has been successfully adopted for surface detection of industrial products because of its convenience, effectiveness and cost performance. Li and Ren [11] developed an intelligent vision detection system for discrete rail surface defects. Tsai and Hsieh [12] proposed a fast image alignment method by using the expectation-maximization (E-M) technique, which accomplished the positioning and defect inspection of printed circuit boards (PCBs). Furthermore, an entropy-rate clustering algorithm combined with prior shape constraint was proposed by Chen [13] to detect defects and deformations across an imaged can-end surface. Ko and Rheem [14] inspected the surface defects of solar wafers by using the local binarization method.
Furthermore, aimed at the inspection of magnetic ring surfaces, researchers have carried out active research. By using the ultrasonic testing technique, Xu [15] designed a programmable filter based on the MAX262 chip, and used the fourth-order Chebyshev bandpass filter to extract weak vibration signals for detecting cracks in the magnetic ring. However, the detection of defects other than cracks was not considered. Using the vision inspection technique, Yu [16] designed an automatic vision-based detection system and used an improved BHPF (butterworth high pass filter) filter for denoising. Nevertheless, the designed system only completed the detection of the magnetic ring end face, which is not comprehensive. Furthermore, Li and Zhang [17] proposed a surface defect extraction method for magnetic rings based on the adaptive Canny algorithm of the edge-detection method and masking technology. However, the detection of the inner torus was not considered.
To measure the multiple dimensions of magnetic rings quickly and to detect and classify the defects precisely, this paper develops a magnetic ring intelligent detection system based on multi-camera vision technology. A wide range of aspects is considered to ensure that no defect or surface is missing, making our system more comprehensive than the systems mentioned above. Trapped by multiple tasks and diverse defects, the traditional single vision system cannot obtain enough information. So, multiple vision machines are used in the system, which guarantees high-speed defect detection on multiple surfaces of three-dimensional magnetic rings. Two image processing algorithms are proposed, namely, the image edge removal algorithm (IERA) and magnetic ring location algorithm (MRLA), respectively, which effectively solve the defect segmentation problem. Finally, by using reasonable thresholds obtained through experiments, connected domain filtering methods are indicated to localize defects quickly and accurately.
The rest of this paper is organized as follows. Section 2 describes the hardware and software components of the multi-vision machine intelligent detection system; Section 3 describes the defect detection algorithm for each surface and the height measurement method; Section 4 demonstrates the detection results of the system. Finally, the conclusions are given in Section 5.

2. System Design

2.1. Hardware Design

As can be seen from Figure 1, the outer diameter and inner diameter of the magnetic ring to be tested are 22 and 20 mm. The height is 3.5 mm, and the color is gray. The structure is complicated and the types of defects are various, so how to realize the real-time online detection of all defects and surfaces is a difficult problem. One approach is using a single vision machine and rotational shooting mode, but this demands a high-precision rotary positioning system and the detect speed is too low to meet the requirements. Considering the fact that defects are distributed on all sides of the magnetic ring, we propose a solution that can complete image acquisition and processing synchronously by using multiple high-speed vision machines.
This system mainly includes three modules, which are the visual inspection module, actuator module and host computer module (as shown in Figure 2). The visual inspection module contains six vision machines and achieves multi-view image collection, image processing and test results sending. The vision machine integrates camera control, card processing and serial communication to solve industrial automation production problems [18]. The host computer takes charge of the judgment results summary of all the vision machines and the control of the executing mechanism. The actuator module, consisting of a feeding device, a transmission device and a sorting device, completes the mechanical operation of the magnetic ring. The feeding device is responsible for feeding magnetic rings into the transmission device at a certain speed. The transmission device is in charge of transmitting magnetic rings from the feeding device to the sorting device. The sorting device finishes final defect classification according to the control signal of the host computer.
Relying on the elaborate design, the actuator could successfully realize non-destructive detection. The vibrating feeding plate is used as the feeding device, whose vibration frequency is adjustable to ensure uniform feeding speed and avoid secondary damage. Meanwhile, since both the upper and lower end faces need to be detected, a glass turntable is employed as the driving device. In this way, by setting cameras and light sources above or below the glass disk, images are taken without flipping the magnetic ring. Furthermore, a solenoid valve is used as the sorting device to ensure the response speed and mechanical force. Ultimately, there will be no secondary damage to the magnetic ring.
Besides, the hardware of the system has high expansibility and can be adjusted according to the actual requirements. Benefitting from multiple vision machines, this system has a high processing speed and a wide range of perspectives, which can deal with three-dimensional part detection problems. Nevertheless, with the use of multiple vision machines, the cost of the system is not that inexpensive. Furthermore, there are many components in the hardware system, so the complexity of the device brings some difficulties to the later management.
Figure 3 shows the prototype of this multi-vision magnetic ring quality inspection system. To further illustrate the hardware system, a simplified diagram of the entire system is drawn, as shown in Figure 4. First, magnetic rings are fed into the system through the vibrating feeding plate. Then, it reaches the camera shooting point after adjusting the position and completing the counting. Subsequently, this system uses two stations to photograph the magnetic ring and detect defects. Station 1 contains a binocular vision machine and two cameras. These two cameras are responsible for measuring the height and detecting the lower end face. Station 2 consists of five vision machines with a total of nine cameras. Due to the inner and outer toruses of the magnetic ring being curved surfaces, the view of a single camera cannot cover all toruses. So, among them, four cameras are responsible for taking pictures of the outer surface, and four cameras are responsible for taking pictures of the inner surface. The last camera with a vertical view is located on the platform to detect the upper end face. After taking the picture, vision machines receive the image and perform defect detection. Then, all detection results are sent to the host computer. Finally, when the magnetic ring reaches the sorting device, the qualified and unqualified magnetic rings are separated.

2.2. Software Design

Based on the system hardware, the software of the proposed system is developed on the MFC and OpenCV platforms. If any defect is found, the software will mark and output the defect’s height measurement results. It includes four modules, which are the camera control module, interactive interface module, magnetic ring defect detection module, and detection result communication and storage module. The camera control module mainly performs tasks such as camera control, camera status feedback, camera parameter setting, camera mode selection, image storage buffering and release. The interactive interface module is in charge of the interaction between the user and the system, including the camera control area, real-time image display area, result display area, threshold selection area and magnetic ring-type selection area. The defect detection module integrates all the methods proposed in the paper and takes charge of real-time detection and marking of images. The detection result communication and storage module adopts the serial communication mode and completes the transmission task of the defect detection result from the vision machine to the upper computer.
The software runs on six visual machines. The interactive interface and defect detection modules of different visual machines are adjusted according to the installation position of the camera, the number of cameras and the characteristics of the magnetic ring image. However, the software framework and operating procedures are the same for each machine. The flow chart of software operation is shown in Figure 5, and the interactive interface can be seen in Figure 6.

3. Methods

This section presents the details of the proposed approach for magnetic ring defect detection. The proposed methods include image preprocessing, IERA, MRLA, connected domain filtering method and the final part to measure the height of magnetic rings. The preprocessing step segments the suspected defect area with IERA and MRLA. Eventually, connected domain filtering identifies defects by analyzing morphological features. The details are as follows.

3.1. Image Preprocessing

The defects to be detected on the surface include cracks, pits, adhesions, foreign matters, fibers, etc. Aimed at simplifying the detection problem, all defects are categorized into three categories, which are crack, fiber and large-area defects. Meanwhile, due to inherent problems with the system hardware, positioning error and uneven illumination will occur in magnetic ring images.
To eliminate the unnecessary information and extract the key features in the image, a series of image preprocessing steps is performed. Figure 7 depicts the process of image processing. It is noticed that the gray-level and gradient defect features should be extracted separately in the preprocessing stage as the basis. Firstly, after extracting the ROI (region of interest) region of the input image, Otsu’s [19] method is used to compute the gray threshold. Then, MRLA is used to calculate the position of the magnetic ring, solving the problem of positioning error. Subsequently, on the one hand, we perform sub-region gray threshold segmentation [20] to solve the uneven illumination problem and use IERA to acquire gray-level defect images. On the other hand, the Sobel operator is used to perform the gradient calculation. Finally, IERA is utilized to obtain the gradient image of defects.
The magnetic ring appears as a curved surface in the image. The middle area of images is dark and the areas at both ends are bright due to the designed lighting system and the location of the camera (Figure 8h). To solve this uneven illumination problem, as mentioned above, sub-region gray threshold segmentation is performed. First, Otsu’s method computes an optimal threshold that minimizes the intra-class variance. Suppose p i is the percentage of pixels with value i . The threshold T is computed according to Equation (1).
min T σ 2 int r a ( T ) = n B ( T ) σ B 2 ( T ) + n A ( T ) σ A 2 ( T )
where
n B ( T ) = i = 1 T 1 p i ,   and   σ B 2 ( T ) = variance   of   pixels   below   T .
n A ( T ) = i = 1 L 1 p i ,   and   σ A 2 ( T ) = variance   of   pixels   above   T .
According to the illumination performance, the target magnetic ring in the image is divided into i regions. The threshold value T i of the i th region is defined by Formula (4).
T i = T D i
The threshold decay term D i is obtained through experiments. Suppose H is a grayscale image and G stands for the image after thresholding. The i th region is binarized using Formula (5). An example is shown in Figure 8d. To prove the stability of the used image preprocessing method in relation to illumination, we change the illumination conditions (see Figure 9a,d) and conduct experiments with all other conditions being equal. The results confirm that the method has good robustness to illumination.
G i ( m , n ) = { 1 , i f   H i ( m , n ) > T i 0 , o t h e r w i s e

3.2. Magnetic Ring Location Algorithm

For the sake of carrying out accurate inspection, the position of the magnetic ring should be determined quickly. On account of the hardware, the position of the magnetic ring is unfixed in the system and the location migration occurs mainly in one direction. To solve the problem, MRLA (see Algorithm 1) is proposed to calculate the position of the magnetic ring in the image. Figure 8b shows examples of torus image location results.
As for end face images, Algorithm 1 is adopted to acquire the top position t o p , and the bottom position b o t . Suppose T l is the positioning threshold. Then, in step 5, the scanning direction is changed to left-to-right. Finally, the left position l e f t and the right position r i g h t are obtained. Let C e n t e r ( x , y ) denote the magnetic ring center position, whereas x = ( l e f t + r i g h t ) , and y = ( t o p + b o t ) / 2 . An example is shown in Figure 10e.
Algorithm 1 Magnetic Ring Location Algorithm
1: Given a grayscale torus image H R M × N .
2:  Use sub-region gray threshold segmentation to obtain a binary image G h .
3:  for I = 0, …, M do
4:     Scan G h from top to bottom.
5:     Count the number δ of black dots.
6:     if δ > T l
7:         Get the up position u p = i .
8:     end
9:  end
10: for I = 0, …, M do
11:   Scan G h from bottom to top.
12:   Count the number δ of black dots.
13:   if δ > T l
14:     Get the down position d o w n = i .
15:   end
16:  end
17: Output the location result u p and d o w n .

3.3. Image Edge Removal Algorithm

In the image preprocessing procedure, it is found that gradient binary images and grayscale images contain the inner edge contour (IEC) of the upper end face, the outer edge contour (OEC) of the upper end face, and the lower edge contour (LEC) of the magnetic ring, as shown in Figure 8a. These edges will interfere with the subsequent defect filtering. To better isolate defects from images, IERA is proposed to eliminate these edges.
The edge of the magnetic ring behaves differently in different kinds of pictures. To extract the defect features of different surfaces, IERA is divided into three parts. Algorithm 2 Part I, Part II and Part III describe IERA for torus grayscale images, torus gradient images and end face binary images, respectively. Figure 8c–g shows the process of IERA. By means of Algorithm 2 Part I, torus gray binary images after removing the upper end face are shown in Figure 8e. To illustrate the algorithm, a sketch is shown in Figure 11.
Sometimes, defects, such as recessive cracks and fibers, are inconspicuous in gray binary images. However, they could be easily observed in gradient binary images. By using Algorithm 2 Part II, the edge-removed torus gradient image can be obtained (see Figure 8g). Besides, according to the imaging characteristics of the end face of magnetic rings, through Algorithm 2 Part III, we can obtain the edge-removed end face image (see Figure 10c). Furthermore, after sub-region gray threshold segmentation, an edge-removed end face binary image with defect features is shown in Figure 10d.
Algorithm 2 Image Edge Removal Algorithm
Part I1:  Given a grayscale image H R M × N .
2:  Process and get gray binary image G d .
3:  for I = 0, …, M do
4:  Set the array of IEC to L e f t [ i ] , set the array of OEC to R i g h t [ i ] .
5:  for j = 0, …, N − 2 do
6:   if G d [ i , j + k ] = = 0 ( k = 0 , 1 , 2 )
7:       Get L e f t [ i ] = j .
8:   end
9:   end
10:     for j = L e f t [ i ] , …, N − 4 do
11:   if G d [ i , j + k ] = = 255 ( k = 0 , , 4 )
12:       Get R i g h t [ i ] = j .
13:   end
14:  end
15:  for j = 0, …, N do
16:     if L e f t [ i ] j R i g h t [ i ]
17:       Set G d [ i , j ] = 255
18:     end
19:   end
20: end
21: Output the edge-removed gray binary image G d .
Part II1:Given a grayscale image H R M × N .
2:Obtain a binary image G d 1 and an image G h with high threshold binarization. Use Sobel operator to obtain gradient binary image G w .
3:for i = 0, …, M do
4:    Set the array of IEC to T o p L [ i ]   , set the array of LEC B ot [ i ] and set the array of OEC to T o p [ i ] .
5:    for j = 0, …, N − 4 do
7:     if G h [ i , j + k ] = = 0   ( k = 0 , , 4 )
8:           Get T o p L [ i ] = j .
9:     end
10:    end
11:    for j = T o p L [ i ]   , …, N − 4 do
13:     if G h [ i , j + k ] = = 255   ( k = 0 , , 4 )
14:           Get B ot [ i ] = j .
15:     if G d 1 [ i , j + k ] = = 255   ( k = 0 , , 4 )
16:           Get T op [ i ] = j .
17:     end
18:    end
19:    for j = 0, …, N do
20:     if 0 j T o p [ i ] + 15 or | j B o t [ i ] | 20
21:           Set G w [ i , j ] = 0 .
22:     end
23:    end
24:end
25:Output the edge-removed torus gradient image G w .
Part III1:Given a grayscale end face image H R M × N .
2:Process and get binary image G h .
3:Create a white circle C 1 with ( C e n t e r ( x , y ) , ( T o p + B o t ) , w 1 ) as its center, radius and line width, respectively.
4:forj = y, y − 1, …,4 do
5:  Scan upward from C e n t e r ( x , y ) .
6:  if G h [ x , j k ] = = 0   ( k = 0 , , 4 )
7:         Get R 2 = y j .
8:  end
9: end
10:Create a white circle C 2 with ( C e n t e r ( x , y ) , R 2 , w 1 ) as its center, radius and line width, respectively.
11:Use C 1 and C 2 to remove edges.
12:Output the edge-removed grayscale end face image.

3.4. Connected Domain Filtering Method

After preprocessing, the remaining connected components represent the potential defect areas. As the size and shape of defect should meet certain conditions to be mechanically significant, the connected components are further filtered by thresholds [21]. In accordance with statistics, the specific characteristics of the three types of defects are as follows:
  • Crack defect: It can be categorized into obvious crack and recessive crack. The obvious crack is shown as a thick line in the image and has a strong contrast with the torus region. The recessive crack is opposite to the obvious crack.
  • Large-area defect: It is characterized by obvious protrusion or depression, a strong contrast with the surrounding area and a large defect area.
  • Fiber defect: It has the characteristics of low gray-level discrimination with the surrounding area, inconspicuous protrusion, irregular shape, and fine lines.
For obvious cracks in contact with the end face of the magnetic ring, detection is performed by scanning the upper edge array T o p [ i ] to detect the curvature transition point [22]. Let T q denote the curvature threshold. If Formula (6) is satisfied, a crack defect is found.
T o p [ i ] [ j ] T o p [ i 8 ] [ j ] > T q ( i = u p + 8 , u p + 9 , , d o w n ; j = 1 , 2 , , 7 )
Large-area defects and the rest of the obvious cracks have common characteristics, such as large contrast with normal torus, obvious morphological features in binary images, and large area of connected domains. So, same method based on connected domain filtering is used to solve the two similar problems (see Algorithm 3 Part I below). Let us define the minimum bounding rectangle T (with length H and width W ) of the connected domain. Let T wh denote the length and width ratio threshold of the connected domains and R wh denote the ratio of the connected domain to the area of its minimum bounding rectangle. T h and T w represent the length threshold and the width threshold of T , respectively. Finally, suppose the threshold of the area of connected domains is denoted by T s .
Algorithm 3 Connected Domain Filtering Method
Part I 1:Give a gray binary image G d or a gradient binary image G w .
2:Process and get G d ’s anti-color image G d c .
3:Get the connected domain set Q and the number k of the connected domain.
4:fori = 1, …, k do
5:  Get the area S i of the connected domain Q i Q , the minimum bounding rectangle T i (with length H i and width W i ).
6:  Set each value of ( T wh , R wh , T h , T w , T s ) .
7:  if c o n d i t i o n is satisfied
8:     Q i is judged to be a defect.
9:  end
10:end
11:Output the results.
Part II1:Given a gradient binary image G w .
2:Get the width W of G w .
3:Set the step length s t e p and a rectangular search box S b o x with a width of w b and a length of h b . Set number of connected domains N i = 0 .
4:fori = 1, … w b + i s t e p , …, W do
5: Use S b o x to traverse G w from top to bottom in steps of s t e p .
6: For the i t h S b o x , get k connected domains.
7:for j = 1, …, k do
8:  Get the area S j of the connected domain Q j Q , the minimum bounding rectangle T j (with length H i and width W j ).
9:  Set each value of ( T wh , R wh , T h , T w , T h s , T s s ) .
10:  if c o n d i t i o n 1 is satisfied.
11:      N i + = 1 and save the coordinate of the connected domain ( x j , y j ) .
12:  end
13:  end
14:  Set T n and T h s .
15:  if c o n d i t i o n 2 is satisfied.
16:  The i t h S b o x contains defects.
17:  end
18:end
19:Output the results.
With regard to obvious cracks, the connected domain is represented as a thick straight line (see Figure 12c). For the connected domain and its minimum bounding rectangle, by extensive experiments, we define that if conditions, such as H > T h , W < T w , H / W > T w h and S / ( W × H ) > R w h , are satisfied, connected domains are identified as obvious cracks. So, the filter criterion c o n d i t i o n can be expressed as (7).
H i / W i > T w h & & S i / ( W i × H i ) > R w h & & H i > T h & & W i < T w
For large-area defects, connected domains are characterized by large, irregular shapes (see Figure 12a). On the basis of statistics, it is defined that if conditions, such as H > T h , W > T w , H / W > T w h and S / ( W × H ) > R w h , are satisfied, connected domains can be defined as large-area cracks. So, the filter criterion c o n d i t i o n can be expressed as (8).
S i > T s & & S i / ( W i × H i ) > R w h & & W i > T w & & H i > T h
Fiber defects and recessive crack defects do not have strong contrast with normal torus. In binary images, they appear as several small connected domains distributed in a certain region. Therefore, these two defects are filtered according to the characteristics of connected domains and the relationship between connected domains. Let T n denote the number threshold of the connected domain in the search box. T h s represents the width sum threshold of the connected domain, and T s s delegates the area sum threshold of the connected domain.
Recessive cracks appear (Figure 12b) as several disconnected lines in the processed binary image. For example, Figure 12b describes a recessive crack and its made up of three line segments. Like the obvious crack, in Algorithm 3 Part II, the filter criterion c o n d i t i o n 1 is expressed as condition (9) to identify whether the segments are part of a crack defect. Furthermore, what really matters is the relationship between the segments. H j , the sum of the minimum bounding rectangle length of adjacent connected domains in a search box S b o x , is selected as the filtering criterion. Through extensive experiments, we define that if conditions N i > = T n and H j T h s are satisfied, S b o x is determined to contain a recessive crack. So, replacing c o n d i t i o n 2 with condition (10), the method can detect the recessive crack correctly.
H j / W j > T w h & & S j / ( W j × H j ) > R w h & & H j > T h & & W j < T w
N i > = T n & & j = 1 N i H j T h s
Fiber defects appear as several irregularly disconnected connected domains in the processed binary image (see Figure 12d). In the first place, condition (11) is introduced to take the place of c o n d i t i o n 1 to identify whether connected domain Q j is part of a fiber. Subsequently, by extensive experiments, it is found that the sum S j of the connected domain area is more useful in defect detection than the sum H j of minimum bounding rectangle length. Thus, the filter criterion c o n d i t i o n 2 is expressed as (12).
S j > T s & & W j > T w & & H j > T h
N i > = T n 2 & & j = 1 N i S j T s s

3.5. Measurement Method of Magnetic Ring Height

In addition to defect detection, height measurement is also an important target of this system. In the magnetic ring height image, the glass wheel’s area is fixed (see Figure 13b) and can be removed by setting the fixed area of the grayscale image to white (see Figure 13c). Then, MRLA is used to calculate the position of the magnetic ring and get the upper position u p and lower position d o w n . Subsequently, the pixel height of the magnetic ring h e i g h t = d o w n u p is obtained.
According to the imaging principle of the camera, the spatial position measurement diagram of the target vertical direction in the image is shown in Figure 13a. Let π denote the imaging plane and O denote the lens center of the camera. V presents the image distance from the light center to the image plane, and Z defines the distance from the object to the image plane. From the triangle similarity principle, we can obtain:
Y = Z V V y
Formula ( Z V ) / V is fitted through experiments, and y = h e i g h t is substituted into Formula (13) to obtain the actual height of the magnetic ring. Through practical verification, ultimately, the precision of height measurement is about 0.02 mm.

4. Experiments

4.1. Examples of Defect Detection

All the proposed algorithms and methods are applied to the magnetic ring detection system. Then, we perform some experiments to check the operation of the system. According to the manufacturing process, we find that crack and fiber defects mainly appear in the inner and outer ring surfaces. Hence, we can detect them from the inner and outer ring surfaces. It is noteworthy that various kinds of large-area defects will appear on the outer ring and the end face, and the large-area defect on the inner ring is an adhesion defect.
The results are shown below, including magnetic ring height (Figure 13d), fiber defects (Figure 14), crack defects (Figure 15) and large-area defects (Figure 16). For different defects located on different surfaces, the system can accurately judge whether it is a defect and mark the position.

4.2. Statistical Results of Defect Detection

In the system, visual machines are equipped with an Intel Core i5-5350U CPU 1.8 GHz processor with 2-GB RAM, and the host computer is equipped with an Intel Core i5-4590 3.3 GHz processor with 4-GB RAM. The experimental results are evaluated by two sub-tasks. One is to evaluate how fast the image processing is (efficiency), and the other is to assess the capability of the algorithm in detecting defect images (accuracy). For the sake of testing the speed of the system, in the experiment, 2400 magnetic rings are continuously detected and the execution time of each vision machine is calculated. As shown in Table 1, for different vision machines, it can be found that the maximum detection time of a single magnetic ring is 510 ms, and the maximum average detection time is 455 ms. In other words, the proposed detection system eventually reaches an average detection speed of about 120 pcs/min.
For the second sub-task, in order to test the system accuracy for various defects’ detection, we select 200 magnetic rings for each type of defect and test them. Table 2 demonstrates the statistical results. By counting the results of various defects’ detection, it can be concluded that the accuracy for crack and large-area defects, such as adhesion, hanger adhesion and pitting, reaches 100%. Meanwhile, the accuracy for foreign matters and fibers achieves 92.5% and 91.5%, respectively. From the results, it is confirmed that the proposed method and system possess good performance. Both the accuracy and the speed are suitable for magnetic ring real-time online inspection in the automated production line.

5. Conclusions

In this paper, we propose a defect detection system for magnetic rings and adopt advanced multi-camera vision technology. The system includes two efficient image processing algorithms, which are IERA and MRLA. By using the detection method for cracks, fibers and large-area defects based on connected domain filtering, it solves the difficult defect detection problem for three-dimensional magnetic rings with high speed and precision. The experiment results demonstrate that machine vision can substitute most of the manual operations in magnetic ring defect detection, greatly improving the production efficiency and the automation degree.
In the developed system, the hardware platform and software system are studied and designed in depth, and the final developed system is experimentally verified. Compared with existing systems, the current system has more comprehensive functions and a good integration degree. The device and method have a high detection precision, can realize real-time online detection of three-dimensional magnetic rings, and can be widely applied in magnetic ring production.

Author Contributions

All authors contributed extensively to the work presented in this paper and wrote the manuscript. X.Z. provided technical guidance and wrote the initial version of the paper. W.G. instructed the software and the whole development. X.X. conducted the investigation and gave guidance. All authors have read and agreed to the published version of the manuscript.

Funding

National Natural Science Foundation of China: No. 61673316; Major Science and Technology Project of Guangdong Province: No. 2015B010104002.

Acknowledgments

This work is supported by the National Natural Science Foundation of China (No. 61673316), and the Major Science and Technology Project of Guangdong Province (No. 2015B010104002).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Liu, L.J.; Wang, Y. Ferrite core appearance inspection using gray histogram and support vector machine. Chin. J. Sci. Instrum. 2006, 27, 840–844. [Google Scholar]
  2. Pei, C.; Fukuchi, T.; Zhu, H. A Study of Internal Defect Testing With the Laser-EMAT Ultrasonic Method. IEEE Trans. Ultrason. Ferroelectr. Freq. Control 2012, 59, 2702–2708. [Google Scholar]
  3. Liu, S.; Dong, S.; Zhang, Y. Defect Detection in Cylindrical Cavity by Electromagnetic Ultrasonic Creeping Wave. IEEE Trans. Magn. 2017, 54, 6200305. [Google Scholar] [CrossRef]
  4. Wataru, Y.; Ryo, T.; Teruyoshi, S.; Keiji, E. Detection of Slit Defects on Backside of Steel Plate Using Low-Frequency Eddy-Current Testing. IEEE Trans. Magn. 2018, 54, 6202505. [Google Scholar]
  5. D’Angelo, G.; Laracca, M.; Rampone, S. Fast Eddy Current Testing Defect Classification Using Lissajous Figs. IEEE Trans. Instrum. Meas. 2018, 67, 821–830. [Google Scholar] [CrossRef]
  6. Cheng, L.; Tian, G.Y. Surface Crack Detection for Carbon Fiber Reinforced Plastic (CFRP) Materials Using Pulsed Eddy Current Thermography. IEEE Sens. J. 2011, 11, 3261–3268. [Google Scholar] [CrossRef]
  7. Tolba, A.S.; Raafat, H.M. Multiscale image quality measures for defect detection in thin films. Int. J. Adv. Manuf. Technol. 2015, 79, 113–122. [Google Scholar] [CrossRef]
  8. Boby, R.A.; Sonakar, P.S. Identification of defects on highly reflective ring components and analysis using machine vision. Int. J. Adv. Manuf. Technol. 2011, 52, 217–233. [Google Scholar] [CrossRef]
  9. Medina, R.; Gayubo, F. Automated visual classification of frequent defects in flat steel coils. Int. J. Adv. Manuf. Technol. 2011, 57, 1087–1097. [Google Scholar] [CrossRef]
  10. Gamage, P.; Xie, S.Q. A real-time vision system for defect inspection in cast extrusion manufacturing process. Int. J. Adv. Manuf. Technol. 2009, 40, 144–156. [Google Scholar] [CrossRef]
  11. Li, Q.; Ren, S. A Visual Detection System for Rail Surface Defects. IEEE Trans. Syst. 2012, 42, 1531–1542. [Google Scholar] [CrossRef]
  12. Tsai, D.M.; Hsieh, Y.C. Machine Vision-Based Positioning and Inspection Using Expectation-Maximization Technique. IEEE Trans. Instrum. Meas. 2017, 66, 2858–2868. [Google Scholar] [CrossRef]
  13. Chen, T.; Wang, Y.; Xiao, C.; Wu, Q.M.J. A Machine Vision Apparatus and Method for Can-End Inspection. IEEE Trans. Instrum. Meas. 2016, 65, 2055–2066. [Google Scholar] [CrossRef]
  14. Ko, J.S.; Rheem, J.Y. Defect detection of polycrystalline solar wafers using local binary mean. Int. J. Adv. Manuf. Technol. 2016, 82, 1753–1764. [Google Scholar] [CrossRef]
  15. Xu, H.; Hou, D.X.; Qiu, J.; Ye, S.L. Extracting crack signal of magnetic ring based on MAX262. In Proceedings of the Eighth International Symposium on Precision Engineering Measurement and Instrumentation, Chengdu, China, 8–11 August 2012. [Google Scholar]
  16. Yu, Z.J.; Li, X.Z.; Yu, H.D.; Xie, D. Research on surface defect inspection for small magnetic rings. In Proceedings of the 2009 International Conference on Mechatronics and Automation, Changchun, China, 9–12 August 2009. [Google Scholar]
  17. Li, J.F.; Zhang, Z.X.; Shen, J.M. Study on surface defect extraction of magnetic ring based on texture suppression. J. Optoelectron. Laser 2017, 28, 978–985. [Google Scholar]
  18. Wang, Y.N.; Chen, T.J.; He, Z.D.; Wu, C.Z. Review on the machine vision measurement and control technology for intelligent manufacturing equipment. Control Theory Appl. 2015, 32, 273–286. [Google Scholar]
  19. Otsu, N. Threshold Selection Method from Gray-Level Histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef] [Green Version]
  20. Qian, K.; Li, F.; Wen, Y.M. Color and Space Distance Based Salient Region Detection Using Fixed Threshold Segmentation. Comput. Sci. 2016, 43, 103–106. [Google Scholar]
  21. Ren, R.; Hung, T.; Tan, K.C. Automatic Microstructure Defect Detection of Ti-6Al-4V Titanium Alloy by Regions-Based Graph. IEEE Trans. Emerg. Top. Comput. Intell. 2017, 1, 87–96. [Google Scholar] [CrossRef]
  22. Jiang, J.D.; Chen, P.Y.; Tong, Y.J.; Hoogmoed, W. Study on the defect inspection algorithm of touch switch pins based on machine vision. J. Zhejiang Univ. Technol. 2015, 43, 30–33. [Google Scholar]
Figure 1. Physical image of the magnetic ring.
Figure 1. Physical image of the magnetic ring.
Sensors 20 00392 g001
Figure 2. Structural diagram of the magnetic ring detection system.
Figure 2. Structural diagram of the magnetic ring detection system.
Sensors 20 00392 g002
Figure 3. The prototype of the magnetic ring detection system: (a) system appearance; (b) feeding device; (c) precision turntable and slide rail limit device; (d) group vision machine and light source; (e) sorting device; (f) host computer and console.
Figure 3. The prototype of the magnetic ring detection system: (a) system appearance; (b) feeding device; (c) precision turntable and slide rail limit device; (d) group vision machine and light source; (e) sorting device; (f) host computer and console.
Sensors 20 00392 g003
Figure 4. Total plan of the magnetic ring defect detection system.
Figure 4. Total plan of the magnetic ring defect detection system.
Sensors 20 00392 g004
Figure 5. Flowchart of the software system.
Figure 5. Flowchart of the software system.
Sensors 20 00392 g005
Figure 6. Magnetic ring detection program interface for No. 1 vision machine and No. 2 vision machine.
Figure 6. Magnetic ring detection program interface for No. 1 vision machine and No. 2 vision machine.
Sensors 20 00392 g006
Figure 7. Flow diagram of the image processing.
Figure 7. Flow diagram of the image processing.
Sensors 20 00392 g007
Figure 8. Torus image processing: (a) annotation of torus images; (b) location result; (c) original defect image of torus (2056 × 600); (d) torus gray binary image; (e) edge-removed torus gray binary image; (f) torus gradient binary image; (g) edge-removed torus gradient binary image; (h) segmentation of torus images.
Figure 8. Torus image processing: (a) annotation of torus images; (b) location result; (c) original defect image of torus (2056 × 600); (d) torus gray binary image; (e) edge-removed torus gray binary image; (f) torus gradient binary image; (g) edge-removed torus gradient binary image; (h) segmentation of torus images.
Sensors 20 00392 g008aSensors 20 00392 g008b
Figure 9. (af) Torus gray binary images.
Figure 9. (af) Torus gray binary images.
Sensors 20 00392 g009
Figure 10. End face image processing: (a) segmentation of end face images; (b) end face image (2452 × 2056); (c) edge-removed end face image; (d) edge-removed end face binary image; (e) location result and annotation.
Figure 10. End face image processing: (a) segmentation of end face images; (b) end face image (2452 × 2056); (c) edge-removed end face image; (d) edge-removed end face binary image; (e) location result and annotation.
Sensors 20 00392 g010
Figure 11. Sketch of the image edge removal algorithm.
Figure 11. Sketch of the image edge removal algorithm.
Sensors 20 00392 g011
Figure 12. Illustratory diagram of connected domain filtering.
Figure 12. Illustratory diagram of connected domain filtering.
Sensors 20 00392 g012
Figure 13. (a) Schematic diagram of spatial position measurement in the vertical direction; (b) a magnetic ring height image; (c) a binary image after removing the glass area; (d) a result of height measurement.
Figure 13. (a) Schematic diagram of spatial position measurement in the vertical direction; (b) a magnetic ring height image; (c) a binary image after removing the glass area; (d) a result of height measurement.
Sensors 20 00392 g013
Figure 14. Detection results of fiber defects.
Figure 14. Detection results of fiber defects.
Sensors 20 00392 g014
Figure 15. Detection results of crack defects.
Figure 15. Detection results of crack defects.
Sensors 20 00392 g015
Figure 16. Detection results of large-area defects.
Figure 16. Detection results of large-area defects.
Sensors 20 00392 g016aSensors 20 00392 g016b
Table 1. Inspection time statistics of the vision machine.
Table 1. Inspection time statistics of the vision machine.
Number of Visual MachinesDetected ContentMaximum Time Consumption (ms)Minimum Time Consumption (ms)Average Time Consumption (ms)
1Outer and inner rings510395436
2Lower end face470412425
3Inner ring260180220
4Outer ring, inner ring495402440
5Outer ring, inner ring490406443
6Outer ring, upper end surface500420455
Table 2. Defect detection statistics.
Table 2. Defect detection statistics.
NumberNameTotal Number of Magnetic RingsNumber of IdentificationsRecognition Rate
1Crack200200100%
2Adhesion200200100%
3Hanger adhesion200200100%
4Pitting200200100%
5Foreign body20018592.5%
6Fiber20018391.5%

Share and Cite

MDPI and ACS Style

Zhang, X.; Gong, W.; Xu, X. Magnetic Ring Multi-Defect Stereo Detection System Based on Multi-Camera Vision Technology. Sensors 2020, 20, 392. https://doi.org/10.3390/s20020392

AMA Style

Zhang X, Gong W, Xu X. Magnetic Ring Multi-Defect Stereo Detection System Based on Multi-Camera Vision Technology. Sensors. 2020; 20(2):392. https://doi.org/10.3390/s20020392

Chicago/Turabian Style

Zhang, Xinman, Weiyong Gong, and Xuebin Xu. 2020. "Magnetic Ring Multi-Defect Stereo Detection System Based on Multi-Camera Vision Technology" Sensors 20, no. 2: 392. https://doi.org/10.3390/s20020392

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop