Image denoising based on BCOLTA: Dataset and study

Robot deburring is an effective method for improving the surface quality of the high-voltage copper contact. The ﬁrst step of robot deburring is to acquire the burr images. We propose a new burr mathematical model and build a real burr image dataset for burr image denoising. In order to improve burr image denoising effects of the high-voltage copper contact, this study proposes an online burr image denoising algorithm, that is, block cosparsity overcomplete learning transform algorithm (BCOLTA). The penalty term and the condition number are affected by the burr parameter. The clustering and transform alternate minimisation algorithms are adopted to achieve lower computational cost and better denoising effect. In addition, BCOLTA also has a good adaptibility to inherent noise images, especially in Gaussian noise. Compared with other traditional and deep learning algorithms by no reference and full reference image quality assessment methods, BCOLTA has state-of-the-art denoising effects and computational complexity on dealing with burr images. This research will play an important role in the intelligent manufacturing ﬁeld.


INTRODUCTION
Burr is an excessive part of the workpiece in the process of mechanical processing (such as edge, flash, sharp corner, splash etc.) [1]. The appearance of the burr will have a bad influence on the precision, appearance quality, service life, assembly precision, service requirements, reprocessing positioning, and operation safety of the parts and greatly reduce the performance, reliability and stability of the whole mechanical system. Highvoltage circuit breaker plays a control and protection role in the high-voltage circuit. The high-voltage copper contact is the key contact element of the high-voltage circuit breaker. Copper contacts and fingers of the high-voltage circuit breakers produce lots of burrs in the process of machining. Burr is easy to cause the phenomenon of point discharge, increase copper contact arc ablation, greatly shorten the service life of copper contact, produce poisonous metallic steam and powder, reduce dielectric insulation strength, impact breaker breaking capacity and cause immeasurable potential safety hazard. Therefore, it is necessary to remove the burrs. In this study, one of the representative copper contacts with small size and complex structure is used as a research object, without changing the physical and chemical properties of copper contact, how to improve the quality This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. © 2021 The Authors. IET Image Processing published by John Wiley & Sons Ltd on behalf of The Institution of Engineering and Technology of the contact and reduce the cost in high-voltage copper contact deburring is important. Based on the machine vision, robot deburring is the most feasible scheme at present. The first step of robot deburring is to obtain images of high-voltage copper contact [2]. Image denoising is a key step in image preprocessing [3][4][5].
At present, there are many image denoising algorithms [6][7][8][9][10][11][12][13][14]. Kostadin gives a block-matching 3D algorithm (BM3D) algorithm [15] to implement image denoising. This algorithm is currently one of the best denoising methods, especially in preserving the image details and improving the image denoising performance. However, the shortcoming of BM3D is not capable of distinguishing the spatio-temporal similarity. The basic ideas of Michal et al. show a K-means clustering singular value decomposition (K-SVD) method [16] for image denoising. This method not only effectively suppresses the additive white Gaussian noise but also preserves the important information such as edges and textures of the images, especially for texture image processing. Because of the use of orthogonal matching pursuit (OMP) [17] and SVD [18] in K-SVD algorithm, when the image size is large, the matrix pseudo-inverse operation efficiency in the OMP algorithm is very low, and SVD is not only timeconsuming but also occupies large memory, which often leads to 'out of memory' problem. Vladimir [19] presents an image denoising algorithm based on a pointwise varying scale that is spatially adaptive to unknown smoothness and anisotropy of the function. Moreover, the time complexity of this method is good. However, this method is local and spatial. Daniel [20] and Vardan [21] also propose a denoising algorithm based on expected patch log likelihood (EPLL), this algorithm achieves improvement in the performance both visually and qualitatively. Nevertheless, the computational complexity of this variance stabilising transformations (VST) for iterative poisson Gaussian denoising filters (iterVST poisson) algorithm [22] has better time complexity, but the denoising effect of this method is bad. Zhang et al. [23] propose a denoising convolutional neural networks (DnCNN) model for Gaussian denoising, super resolution (SR) and joint photographic experts group (JPEG) image blocking.
In the process of intelligent manufacturing, different factory producing different environment greatly impacts the quality of image acquisition. The existing denoising algorithms are mostly based on a public image dataset and specific noise, and this study creates the real high-voltage copper contact burr image dataset for denoising. In terms of image size and content, the different classification of burr image is created. The inherent and Gaussian noise images are used for denoising. A block cosparsity overcomplete learning transform algorithm (BCOLTA) is proposed. Burr parameter is used for influencing the penalty term and the condition number of the algorithm. The optimal values are obtained by alternating between the sparse clustering and the transform term. Compared with other traditional algorithms and DnCNN model by no reference (NR) and full reference (FR) image quality assessment (IQA) algorithms [24][25][26][27], BCOLTA has obvious advantages in image denoising effects and computational complexity.

METHODS
In this study, high-voltage copper contact burr image dataset of a real factory environment is built. Compared with public dataset, our dataset has its own characteristics. The machining environment and detection objects are diverse. Different real images are acquired in different factory environments. Compared with ordinary images, such kind of images have obvious characteristics of their own. The model of the burr is built and the parameter of the burr has an important impact on the penalty term and the condition number.

Burr mathematical model
The definition of a burr is a rough remainder of material outside the ideal geometrical shape of an external edge, residue of machining or a forming process in ISO 13715 [28]. The value of the burr is expressed as follows: Combined with other burr models [28,29], one new model of the burr is proposed [30,31]: where h b expresses the height of the burr, r f describes the burr root radius, burr thickness is b g , b r represents the root thickness of the burr, r d is the relative deviation, the shape exponent of the burr is n s , the effective exit surface angle is u and v f represents feed direction of the workpiece ( Figure 1).

BCOLTA
The set of the transforms contains the image data i ∈ R n . The sparsifying square transforms are {T k } K k=1 T k ∈ R n×n ∀k, and there is a particular T k , T k i = s + e, and s ∈ R n is sparse, e is the error that is small. This sparse problem is defined as follows: where q k is a sparse representation of i in the transform T k , with the maximum allowable sparsity m. First, we find the optimalq k for each k. Then we calculate the sparsification error for each k. The best transformT k provides the smallest sparse error about all T k . We assume the sparse code isqk, and acquire a least squares estimate of the signal asî = T −1 kqk . We explain the set of transforms model as a BCOLTA and stack the collection of square transforms as T = where T ∈ R m×n , with m > n, T i = s + e, e is a small deviation and s ∈ R m is the block cosparsity that is defined as ‖s‖ 0,m = ∑ K k=1 I (‖s k ‖ 0 ≤ m). The transform matrix W is tall. The indicator function I(S) = 1 when the statement S is true otherwise I(S) = 0. In BCOLTA model, the sparse model is formulated as follows: The optimal sparse problem in (Equation 3) is equal to the optimal blocks in (Equation 4) satisfyingŝ k = H m (T k i ) and ‖ŝ k ‖ 0 ≤ m. The function H (⋅) is defined whenk = k 0 , and we find the optimalŝ satisfiesŝ k = H m (T k i ), others satisfyŝ k = T k i.
Since the image data I ∈ R n×N , BCOLTA learning problem is changed as follows.
controls the condition numbers. The weights k in (Equation 5) is chosen as k = 0 ‖T D k ‖ 2 F . G contains all possible sets of {D k } and is defined as follows: When the condition number tends to 1, the spectral norm tends to 1∕ √ 2. In the process of solving (Equation 5), the sparse clustering and the transform terms are solved in turn.

Sparse clustering
First, {T k } is assumed as a constant and the question is how to determine {D k } and {S j }: Thus, the model is equivalent to For each I j ,k provides the smallest clustering value. The optimal value isŜ j =H m (TkI j ).

2.2.2
Transform update step Then, {D k } and {S j } are assumed as constants. The optimisation problem is changed into how to solve {T k }. The model is expressed as follows: Here, k = 0 ‖I D k ‖ 2 F represents the weight, and the optimisation transformT k is as follows: According to the mathematical model of the burrs, various kinds of high-voltage copper contact burrs have different burr parameters. These parameters are the factors on infection of the peak signal to noise ratio (PSNR) of BCOLTA algorithm such as the weights k and k .

Burr image denoising
Because of the technical limitations of the machining, it is easy to form the burrs on the edge of the workpieces. Our research focuses on the intelligent deburring problem. Image denoising is an important application of image processing. The purpose of burr image denoising is to acquire an estimate of the burr image vector s ∈ R G . The measurement of s is expressed as i = s+h, where h is the noise. The block cosparsity denoising method is explained as follows: where P j ∈ R n×G is block extraction factor, P j i ∈ R n denotes jth block of the burr image i. The vector s j ∈ R n denotes a denoised result of P j i. is the inversely proportional coefficient of the noise level σ. The vector j ∈ R n denotes the sparse representation of s j in a specific cluster transform T k with a priori unknown sparse level m j . The weight ′ j is set as 0 ‖P j i‖ 2 2 . W (T k ) is the regularisation term that is used to control condition number.
On account of ∝ 1∕ and → 0, the optimal value s j → P j i. The denoised image x is obtained by averaging the known x i at their respective locations in the burr image. Equation (11) is substituted by another version in which the penalty term ∑ N j =1 ‖P j i − s j ‖ 2 2 is replaced by the constraints ‖P j i − s j ‖ 2 2 ≤ nB 2 2 ∀ j where B is a constant. The inversely proportional coefficient of the noise level σ (i.e. ) and the weight ′ j are influenced by different burr parameters. Therefore, the penalty term and the condition number are affected by the burr parameters.
The model eliminates the issues of unknown sparse level m j ; however, it brings many unknown parameters. For the sake of simplicity, the simple data accuracy penalty and the sparse constraints are used. Additionally, the method estimates the minimum sparse levels for satisfying the condition ‖P j i − s j ‖ 2 2 ≤ nB 2 2 ∀ j . m j is assumed as a constant such as one-fifth of the patch size. Each iteration of the algorithm contains three main sections (such as the internal clustering transformation learning, the sparse update and the clustering). The denoised patch s j is updated in the last iteration. Moreover, when the iterations are completed, the denoised image is reconstructed.
Initially, the internal clustering transformation learning step. Given {s j }, {m j } and D k , cluster transform {T k } and the corresponding sparse codes { j } are solved. K different single transform learning problems are separated. The k th problem is described as follows: This problem is solved by alternating between the sparse clustering term and the transform term. Each step involves a closedform solution.
Furthermore, the internal clustering sparsity update step. Given a fixed transform update T k and the sparse code j , j ∈ D k , the sparse level m j for all j can be updated. s j is solved as follows: The matrices are computed once for each cluster. I is an n×n matrix. In this step s j satisfies the condition ‖P j i − s j ‖ 2 2 ≤ nB 2 2 except in the final iteration. The sparse code is also further updated for each j ∈ B k as j = H m j (T k P j i ), using the optimal value of m j .
Additionally, the clustering step.
In the last iteration of the method, the clustering step is not performed. {m k }{T k }{s j }are fixed. We calculatẽ k j = H m j (T k P j i ) ∀k and choose the cluster Dk j . We can conclude that where l = 0 W (T l ), the optimal value is j = k j j . Finally, calculating the expected image estimate step. The image resolution limits the denoised image patches.{s j } is obtained from the iterative method. The final denoising image is obtained by averaging the denoised blocks, and a simple algorithm chart is shown in Figure 2.
Here, i is corrupted by the noises, m is the initial determinate value of the sparsity, 0 is a constant, K is the cluster number, L is the iteration number, and 2 is the variance estimation of the noise. The output result of S is an estimation of the denoised image.
For a = 1: L repeat For k = 1, … , K , T k and j are updated alternatingly, the cluster D k is fixed, s j = P j i. Update m j for all j =1, 2, … , N , when m j increases, j =H m j (T k P j i ). Where j ∈ D k , until the error condition ‖P j i − s j ‖ 2 2 ≤ nD 2 2 is reached. For each j ∈ {1, … , N } and s j − P j i, calculatēk j =H m j (T k s j ), ∀k and assign j to the cluster D k ifk is the smallest integer in {1, … , K } such that ‖Tks j −̄k j ‖ 2 2 +k‖s j ‖ 2 2 ≤ ‖T l s j −̄l j ‖ 2 2 + l ‖s j ‖ 2 2 , ∀l ≠ k holds with 0 W (T l ), ∀l . The optimal code is j =̄k j .
End Update s, obtain the denoised patch {s j } that satisfies the error condition of step 2, and the results are averaged.
In order to increase the computational efficiency of the method, the internal clustering transformation learning is performed by using part of the patches that are selected stochastically.
The model learns a set of transforms with the noisy patches, updates the sparse levels of m j adaptively during the iterations and uses the final m j of the algorithm with the fixed m j by alternating between the internal clustering transformation learning.m j is updated by the least squares and the clustering. In fact, when the iteration number is increased, less improvement in denoising performance is produced.

Datasets
High-voltage copper contact image dataset is created in the study, which consists of 823 burr images. According to the content of images, images are divided into two categories: Global and local images. On the basis of different size of images, images are divided into three kinds: 240 × 320, 256 × 256, 512 × 512. Different burr parameter is set in the experiment by different content and size. The configurations of the computer are as follows. The processor is Intel i5 6500 and the SSD is 120G. The experiments are made in the same period of time, which can reduce the error of the experiments to a great extent.

Numerical experiments
In the experiments, natural burr images with inherent noise and additive Gaussian noise are processed. The noise level (sigma) is 5, 10, 20, 25, 30, 50, respectively. Different sizes of the images are 240 × 320, 256 × 256, 512 × 512. The PSNR of local-burr In Figure 3, the image size is 240 × 320, denoising effect of BCOLTA possesses more advantages than other algorithms. K-SVD algorithm gets the best results in some cases, however, the computational complexity of K-SVD is high, and cannot be used for online image denoising. IterVST poisson algorithm has the lowest computational complexity, but denoising result is the worst in experimental results. Denoising effects of EPLL algorithm are worst at the noise level 50. Figure 4 shows that BCOLTA achieves the best denoising result under different noise levels. EPLL and iterVST poisson algorithms are relatively ill-behaved. In Figure 5, experiments are based on 512 × 512 images. Experimental results show that when the image size is increased, PSNR of BCOLTA shows distinct advantages than smaller scale images. Experimental results demonstrate that BCOLTA exhibits some good performances than K-SVD and BM3D methods. The PSNR of the local burr image is higher than the global burr image. A significant amount of experimental data shows that BCOLTA obtains the best overall denoising effect. IterVST poisson algorithm has low computational complexity, but the denoising effect is the worst when the noise level is less than 50, and EPLL algorithm has the worst noise removal effect when noise level sigma is 50. Figures 6 and 7 show comparison of denoising effects of different algorithms on local and global burr image under the condition of noise level sigma 50 and the size of images is 512 × 512. Figure 8 shows the comparison of different denoising results on natural burr images with inherent noise. BCOLTA shows state-of-the-art (SOTA) results. The details of the number in the image is clearly conserved. BM3D and local polynomial approximation-intersection of confidence intervals (LPA-ICI) algorithms have better performance. In addition, denoising result of DnCNN is relatively ill behaved. Table 1 summarises the average increment of BCOLTA model. The experimental result shows that when the image size is increased, the PSNR of BCOLTA algorithm also increases. Moreover, when the noise level is high, BCOLTA has better performance. The black bold data are the optimal data of total results. Table 2 shows the comparison of execution time when noise level sigma is different and the image size is 240 × 320. Through a large number of numerical experiments, LPA-ICI, iterVST poisson and BCOLTA algorithms have better time complexity, which can be used for robot online deburring operation. As shown in Table 2, iterVST poisson algorithm has the lowest time complexity, but the algorithm has the worst denoising effect, which does not meet the requirements of industrial

CONCLUSIONS
In this study, a block cosparsity overcomplete learning transform burr image denoising algorithm is proposed. The dataset of high-voltage copper contact and the model of burr are built. The parameter of the burr influences the penalty term and condition number of the algorithm. NR and FR IQA methods are used to evaluate the results of denoising images. Compared with other traditional algorithms and DnCNN algorithm on inherent and Gaussian noise by NR and FR IQA algorithms, experimental results of BCOLTA show SOTA in time complexity and image denoising results, and it is suitable for large and online image denoising.  ADD-SSIM, analysis of distortion distribution-based structural similarity metric; PSIM, perceptual similarity index; SIQE, screen image quality evaluator; ASIQE, accelerated screen image quality evaluator; NFERM, no reference free energy-ased robust metric.