Current Issue

Journal of Korea Technical Association of the Pulp and Paper Industry - Vol. 52 , No. 3

[ Original ]
Journal of Korea Technical Association of the Pulp and Paper Industry - Vol. 52, No. 2, pp.43-51
Abbreviation: J. Korea TAPPI
ISSN: 0253-3200 (Print)
Print publication date 30 Apr 2020
Received 05 Dec 2019 Revised 05 Apr 2020 Accepted 10 Apr 2020
DOI: https://doi.org/10.7584/JKTAPPI.2020.04.52.2.43

Web Inspection Algorithm for Low Contrast Paper Defects Based on Artificial Bee Colony Optimization
Yun-hui Qu1, 2, ; Wei Tang1 ; Bo Feng3
1Department of Electric and Control Engineering, Shaanxi University of Science & Technology, Xi’an, Shaanxi, 710021, People’s Republic of China, Professor
2Computer Teaching and Research Section, Xi’an Medical University, Xi’an, Shaanxi, 710021, People’s Republic of China, Professor
3Department of Electric and Control Engineering, Shaanxi University of Science & Technology, Xi’an, Shaanxi, 710021, People’s Republic of China, Lecturer

Correspondence to : E-mail: nan-nan_1951@163.com (Address: Department of Electric and Control Engineering, Shaanxi University of Science & Technology, Xi’an, Shaanxi, 710021, People’s Republic of China)

Funding Information ▼

Abstract

Traditional paper defect detection algorithms have the problems of low detection rate and poor anti-interference ability for low contrast paper defects such as cracks and folds. Considering these problems, an algorithm of low contrast paper defects based on artificial bee colony optimization was presented. Firstly, the Gabor filter was used to eliminate the texture elements and enhance the contrast. Then, the optimal segmentation threshold of 2-D OSTU was obtained by taking the trace of the dispersion matrix of the filtered paper disease image as the objective function of the artificial swarm optimization. Finally, according to the best segmentation threshold, the paper image was detected by 2-D OSTU method. The simulation results indicated that this algorithm has the advantages of high detection rate, accurate positioning and good anti-disturbance performance for low contrast paper defects.


Keywords: Low contrast paper defects, Gabor, artificial bee colony optimization, 2-D OSTU, image segmentation

1. Introduction

The modern paper industry is a technology, capital, resource and energy intensive industry, which is developing towards large scale, automation, high efficiency and low energy consumption. Improving paper quality is one of the important directions of independent research and development of paper industry. In the paper industry, the paper defect is that does not meet the quality and technical requirements of paper.1) Some paper defects are caused by poor technical operation or poor technical quality during the process of paper making, while others are caused by poor environmental sanitation in the factory. Some of the paper defects are relatively continuous. If not take measures, the quality of the paper will be more impacted. So, it is necessary to detect, mark or sound an alarm in time.2) Due to the high speed of the modern paper machine, the traditional human visual inspection has been unable to meet the demand. With the development of machine vision technology, the automatic detection with the combination of computer image processing technology and the paper industry has become the focus of research.3,4)

At present, the commonly used methods for detecting paper defects include threshold-based, region-based, edge detection based and specific theory-based segmentation method. Among these methods, the threshold-based segmentation method is favored by many scholars because of its simple calculation, high efficiency and fast speed.5,6)

But for the low contrast paper defects such as folds, cracks and so on, especially when the background texture is disturbed, the threshold is hard to decide, the detection accuracy will be low, which will lead to low detection accuracy, and the phenomenon of missing and false detection will occur. In this paper, a detection method for low contrast paper defects based on artificial bee colony optimization was proposed. And the Visual Studio 2010+Open CV were used to program. The experimental results showed that the method can detect the low contrast paper defects correctly and effectively.


2. The Filtering of Paper Defects Image

Gabor transform was proposed in 1946 by Dennis Gabor. The basic flow of Gabor transform is as follows: Dividing the signal into many small-time intervals, and then Fourier transform is used to analyze each time interval to determine the frequency of signal at each time interval.7) The Gabor filter has the characteristics of local optimum in both spatial and frequency domain, so it can describe the local structure information such as spatial frequency (scale), spatial position and orientation selectivity.8) Frequency and orientation representations of Gabor filters are similar to those of the human visual system, and they have been found to be particularly appropriate for texture representation and discrimination.9)

In the spatial domain, 2-D Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave. In image processing, a Gabor filter is a linear filter used for edge detection. 2-D Gabor transform is a good tool for multi-scale representation and analysis of images. Typical 2-D Gabor filter function φ(x,y) is defined as Eq. 1.

φx,y=12πσxσyexp-12x2σx2+y2σy2·exp2πjωx[1] 

Where, σx and σy are the standard deviation of X axis and Y axis, respectively, which determine the size of the filter area. ωx is the frequency of complex sine function on transverse axis.

Gabor filtering of image is making the image I(x,y) convolving with the Gabor function φ(x,y), which can be computed as Eq. 2.

gx,y=φx,y*Ix,y[2] 

Where * is convolution operation, g(x,y) is the image after Gabor filtering.

In this paper, we used the Gabor filter to filter the low contrast paper defect image to remove the interference of the light and the paper texture, and enhance the contrast of the image. The resultant output was the image where the majority of noise was removed.


3. 2-D OSTU Algorithm Based on ABC Optimization
3.1 2-D OSTU

The OSTU algorithm, also known as the maximum inter class difference method, was proposed by Nobuyuki Otsu in 1979. It is an adaptive threshold determination method. It can automatically select the global threshold value by counting the histogram characteristics of the whole image. This method is widely used in image processing because of its advantages of simple calculation and not affected by image brightness and contrast under certain conditions.10) However, due to the fact that the OSTU algorithm only considers the gray value of the current pixel, when the image is affected by noise interference, the gray histogram is easy to form peak and valley, which leads to the error of threshold calculation and low segmentation accuracy.

Based on the OSTU algorithm, Liu11) proposed a 2-D OSTU algorithm, which is described as follows:

  • 1. Let I(x,y) is the image with gray level of L, f(x,y) is the gray value of(x,y) point, and g(x,y) is the gray value of K×K pixel set with pixel (x,y) as the center.
  • 2. Let f(x,y)=ig(x,y)=j, a binary (i,j) is formed.
  • 3. Let the occurrence number of binary (i,j) is fij; The probability density of the binary is Pij, Pij=fij/N, i=1,2,…,L; Where, N is the total pixel number of the image.
  • 4. The threshold vector (s,t) divides the two-dimensional histogram of the image into four regions,as shown in Fig. 1. Where A and B are target and background;C and D are noise and edge points.

Fig. 1. 
2-D histogram.

The probability corresponding to the target and background is Po and Pb . When the threshold is (s,t), Po and Pb can be calculated by Eqs. 3-4.

Po=i=0sj=0tpij[3] 
Pb=i=s+1L-1j=t+1L-1pij[4] 

Let Co and Cb are mean vectors of target and background areas,which can be calculated by Eqs. 5-6.

Co=Coi,CojT=i=0sj=0tipijPo, i=0sj=0tjpijPoT[5] 
Cb=Cbi,CbjT=i=s+1L-1j=t+1L-1ipijPb, i=s+1L-1j=t+1L-1jpijPbT[6] 

The total gray value CT of the image is shown in Eq. 7:

CT=CTi,CTjT=i=0L-1j=0L-1ipij, i=0L-1j=0L-1jpijT[7] 

The dispersion matrix is defined as Eq. 8:

St,s=PoCo-CTCo-CTT+PbCb-CTCb-CTT[8] 

The trace of the dispersion matrix is defined as Eq. 9:

trSs,t=Po×Coi-CTi2+Coj-CTj2+Pb×Cbi-CTi2+Cbj-CTj2[9] 

The (s,t) of the maximum trace is the best segmentation threshold.

3.2 Artificial bee colony

The artificial bee colony (ABC) is an optimization algorithm model proposed by Karaboga12) in 2005 to simulate the intelligent search behavior of bee swarm. In ABC, there are three groups of bees: leader bees, onlooker bees and scout bees. Where, leader bees and onlooker bees explore honey source, scout bees avoid too few kinds of honey sources and observe whether the algorithm falls into local optimum.13)

When ABC algorithm is used to solve the optimization problem, the location of honey source represents the feasible solution of the optimization problem. First, generating a set of initial solutions randomly from the feasible region all leader bees search the neighborhood of the initial solution; Then, according to the honey source information provided by the leader bees, onlooks choose the superior individuals to follow and creates new positions. If a honey source is not updated through a predetermined iteration, the honey source is discarded and the corresponding leader bee is transformed into a scout bee.

The algorithm flow of ABC is as follows:

1) Initialization

In the solution space, the initial position of honey source is randomly generated according to Eq. 10,

xi,j=xjmin+rand0,1xjmax-xjmin[10] 

Where, i =1,2,…,NP; j =1,2,…,D; NP is the number of honey sources; D donates the number of variables, i.e. problem dimension; xjmin,xjmax represent the lower and upper bounds of the jth variable. rand(0,1) represents a random number between 0 and 1.

2) Updating new honey source

Leader bees search for a new honey source near the honey source i according to Eq. 11:

vi,j=xi,j+rand-1,1xi,j-xk,j[11] 

Where, k=1,2,…,NP, k is a randomly selected honey source different from i (ki) rand(0,1) represents a random number between 0 and 1.

3) Onlooker bees choose leader bee to follow

After the leader bees complete the search, the honey source information is shared to onlooker bees, and the onlooker bees select the leader bees to follow according to the selection probability Pi, which can be defined in Eq. 12.

Pi=fitnessij=1Dfitnessj[12] 

Where, fitnessi donates the fitness value of the jth solution, fitness can be defined in Eq. 13.

fitness=11+fxi,fxi01+fxi,fxi<0[13] 

Where, f(xi) is the value of the objective function f of the problem to be optimized corresponding to the honey source i.

According to the selection probability, the onlooker bees adopt roulette strategy to choose the leader bee to follow, and update the corresponding new honey source. If the fitness of the new honey source is better than the previous one, the new honey source is saved.

4) Sending scout bees

During the search process, once a honey source cannot be ameliorated further during a predetermined cycle (defined as “limit”), the honey source should be replaced with a new one, while the leader bee associated with it subsequently becomes a scout bee. The new honey source is generated randomly according to Eq. 10.

The artificial bee colony algorithm (ABC) has the characteristics of simple operation, less control parameters, high search accuracy and strong robustness. Compared with the classical optimization method, ABC has little requirements for objective functions and constraints, which has few requirements for objective functions and constraints. In the process of search, ABC doesn’t use external information. ABC only takes fitness function as the basis of evolution, which can effectively solve a variety of optimization problems.14-16)

3.3 2-D OSTU algorithm based on ABC optimization

In this paper, ABC is used to optimize the 2-D OSTU algorithm, so as to speed up the search of the best threshold in and improve the accuracy of image segmentation.

The algorithm flow chart of 2-D OSTU based on ABC optimization is shown in Fig. 2.


Fig. 2. 
Flow Diagram of 2-D OSTU based on ABC optimization.

The steps of 2-D OSTU algorithm based on ABC optimization are as follows:

  • Step 1 Initialize the population number. Input the image to be segmented. Take the trace of the discreteness matrix of the image to be segmented as the objective function, and obtain the fitness.
  • Step 2 The leader bees randomly generate the initial solution according to Eq. 10 and search for the new solution according to Eq. 11.
  • Step 3 Lookers follow by according to the selection probability Pi and using roulette method.
  • Step 4 In the search process, if the solution i cannot be ameliorated further during a predetermined cycle (defined as “limit” in ABC), the solution i is discarded while the leader bee associated with it subsequently becomes a scout bee. In the solution space, the scout bee randomly generates a new solution to replace the original solution i. If the fitness of the new solution is better than the previous one, the new solution will be saved.
  • Step 5 Repeat Step 2 to Step 4 until the end condition is reached.
  • Step 6 The output optimal solution is the optimal segmentation threshold (s,t) of 2-D OSTU.
  • Step 7 According to the best threshold (s,t), the image is segmented by 2-D OSTU, and the segmented image is obtained.

4. Web Inspection Algorithm for Low Contrast Paper Defects Based on ABC Optimization

A web inspection algorithm for low contrast paper defects based on ABC optimization was proposed in this paper. The proposed algorithm flow is shown in Fig. 3.


Fig. 3. 
Flow diagram of proposed method.

The web inspection algorithm for low contrast paper disease based on artificial bee colony optimization mainly includes the following steps:

  • 1) Capturing the original paper images by the industrial CCD camera and transferring them to host computer. Then translating the original images into gray scale images;
  • 2) Gabor filter as show in Eq. 2 is used for image filtering to eliminate texture elements in the original images.
  • 3) For the filtered image, the algorithm proposed in Section 3.3 is used to segment the paper defect area.

5. Results and Discussion

In productive processing of paper, the common paper detects include dirty spots, holes, cracks and folds. Among them, the dirty spots and holes belong to relatively high contrast paper defects, cracks and folds belong to low contrast paper defects. The four kinds of paper defects are used as the test objects in the paper. The paper defected images were collected from the laboratory testing equipment and the paper obtained from the paper production line is used to, which is showed in the following Fig. 4. Programs are compiled by Visual Studio 2010+Open CV to compare the proposed method with OSTU and 2-D OSTU algorithms. The original image with the four types of paper defects respectively and the detected results using the proposed method were show in Table 1.


Fig. 4. 
Laboratory paper defect detection device.

Table 1. 
The original images and detect results
Dirty spot Hole Crack Fold
Original
image
Detect
result

The proposed method is compared with several methods traditional, such as OSTU and 2-D OSTU algorithms. In the experiment, 11 cases of dirty sports and holes, 25 cases of cracks and folds and totally 72 cases of paper defects of various shapes and size were detected and compared. The contrast results are shown in Table 2.

Table 2. 
Comparison of the detection Accuracy (%) for different algorithm
Paper defected types
(total image)
OSTU 2-D OSTU Proposed
Correct % Correct % Correct %
Dirty Spots (11) 10 90.91 11 100 11 100
Holes (11) 9 81.82 10 90.91 10 90.91
Cracks (25) 19 76 21 84 23 92
Folds (25) 20 80 22 88 23 92

From the Table 2 results, it can be seen that for the dirty spots, due to the high contrast, the accuracy of the three algorithms is higher, reaching more than 90%. For the holes, when the holes are small, the threshold value of OSTU and 2-D OSTU algorithm depends on the artificial experience completely, so it may be missed when the threshold value is not appropriate. However, the detection accuracy can also reach 80%, which basically meet the needs of industrial processes. But for cracks and folds, the accuracy of OSTU algorithm is low, which is less than 80%. The correct rate of 2-D OSTU algorithm is higher than OSTU, can reach about 85%. The accuracy of proposed method compared with the traditional algorithms has been greatly improved, can reach about 92%, which satisfy the need of industrial production process.

Further analysis of the experimental results can be drawn that for the dirty spots and holes which with higher contrast, the correct rate of the three algorithms is very high, and only when the dirty spots or holes are too small, the OSTU and 2-D OSTU algorithm will miss detection. As for folds and cracks, when the folds and cracks are obvious and the areas are large, the three algorithms can be accurately detected. When the folds or cracks are mild, the correct rate of OSTU is obviously decreased. When the contrast of paper defects is low and disturbed, as shown in Fig. 5(a), OSTU and 2-D OSTU algorithm will detect false edges (shown in Fig. 5(b)-(c)) because of that it is susceptible to be disturbed by the noise, which will lead to a decrease in the accuracy of the test results. The algorithm proposed in this paper can effectively remove the interference of paper texture and guarantee the accuracy of detection, which is shown in Fig. 5(d).


Fig. 5. 
Paper defects image subject to uneven illumination and detection results of three algorithms.


6. Conclusions

In this study, a new method for low contrast paper defects detection is proposed. Firstly, the Gabor filter was used to eliminate the texture elements and enhance the contrast. Then, the optimal segmentation threshold of 2-D OSTU is obtained by taking the trace of the dispersion matrix of the filtered paper disease image as the objective function of the artificial swarm optimization. Finally, according to the best segmentation threshold, the paper image is detected by 2-D OSTU method. It is proved that for the low contrast paper defects, the method proposed can effectively resist the disturbance of paper texture, and the detection accuracy is high. At the same time, for the high contrast paper defects, it still maintains high detection accuracy.

At present, the method is only tested in laboratory equipment. If the speed of the production line is further improved, whether it can be detected in real time needs further verification. On the other hand, the algorithm is only used in the paper defect detection system of white board at present. The detection of brown paper and other paper defects is the next step to be improved.


Acknowledgments

This work was partially supported by Scientific Research Project of Shaanxi Provincial Education Department (17JK0645). We sincerely thank for the funding of the project.


Literature Cited
1. Wen, J. S. and Wei, T., Multivariable dimension-reduction and synergic control strategy for cross-directional basis weight of papermaking process, Journal of Korea TAPPI 51(2):76-87 (2019).
2. Li, Q., Wen, H., and Qu, Y. H., Application of edge tracking algorithm to multiple paper defects segmentation, China Pulp & Paper 36(8):41-45 (2017).
3. Qu, Y. H., Tang, W., and Wen, H., Paper defects de-noising algorithm based on homomorphic filtering and discrete cosine transform, China Pulp & Paper 37(5):45-49 (2018).
4. Zhou, Q., Zhang, H., and Yang, Y. Y., Study on the on-line detection of paper defects using twice 2D daubechies wavelet transformation, Transactions of China Pulp and Paper 29(3):47-53 (2014).
5. Zhou, Q., Chen, Y., and Shen, T. Y., Review of paper defect detection system based on machine vision technology, China Pulp & Paper 35(5):72 (2016).
6. Wang, B., Tang, W., Dong, J. X., and Wang, F., Study on the drive parameters of a high precision basis weight control valve, Journal of Korea TAPPI 49(3):41-56 (2017).
7. Liu, Y. and Wu, X. J., Image recognition algorithm based on Log-Gabor wavelet and Riemannian manifold learn, PR & AI 28(10): 946-952 (2015).
8. Sivabalan, K. N., Efficient defect detection algorithm for gray level digital images using Gabor wavelet filter and Gaussian filter, International Journal of Engineering Science and Technology (IJEST) 4(3):3195-3202 (2011).
9. Qu, Y. H., Tang, W., and Wen, H., An algorithm for low contrast paper defects inspection based on Gabor filter, Transactions of China Pulp and Paper 34(2):42-46 (2019).
10. Han, Z. B., Lin, T., and Yang, K., Research on the SAR image segmentation method based on improved two-dimension ostu arithmetic, Journal of Naval Aeronautical and Astronautical University 25(2):153-157 (2010).
11. Liu, Q. and Zhuang, J. J., A generalized thresholding algorithm of pedestrian segmentation for far-infrared images, Proceedings of IEEE International Conference on Imaging Systems and Techniques (IST), IEEE, Manchester, UK, pp. 338-343 (2012).
12. Karaboga, D. An idea based on honey bee swarm for numerical optimization, Technical Report, Erciyes University, Keyseri, Turkey, pp. 29-38 (2005).
13. Xie, M., Image thresholding segmentation based on multi-objective artificial bee colony optimization, DIGITAL VIDEO 42(3):6-14 (2018).
14. Wei, P. Y., Pan, F. C., and Li, S., Study on classification of improved artificial bee colony algorithm to optimization of BP neural network, Computer Engineering and Applications 54(10):158-163 (2018).
15. Li, H. Y. and He, H. Z., Improved artificial bee colony and K-means clustering for image segmentation, Intelligent Computer and Applications 8(3):45-49 (2018).
16. Gao, Y., Li, X., and Dong, M., An enhanced artificial bee colony optimizer and its application to multi-level threshold image segmentation, Journal of Central South University 25(1):107-120 (2018).