1. Introduction
Microstructure images of metallic materials play a significant role in industrial applications, such as metallography detection, surface topography measurement (STM), and micro-electro mechanical manufacturing (MEMM) [
1,
2,
3], etc. However, the raw microstructure images are easily contaminated on their acquisition, storage, and transmission, which degrade the fidelity of the microstructure image. Further, in most cases, images re-acquisition is not possible in practice, as such damaged images are not suitable for subsequent processing [
4,
5].
Image restoration is an effective technique for recovering incomplete or damaged images approximate to the ideal images. Up to now, various image restoration strategies have been proposed, which can be classified into several categories: (i) Time domain analysis methods, such as adaptive filter denoising (AFD) [
6,
7]; (ii) Frequency domain analysis methods, such as wavelet–wavelet packet denoising (W-WPD) technique [
8,
9]; (iii) Data-driven approaches, such as partial differential equation (PDE) [
10,
11,
12,
13], and wavelet hidden Markov random field (WHMRF) [
14]; (iv) Sparse representation (SR) techniques, such as redundant dictionary and non-convex penalty regularization [
15,
16,
17,
18], etc. Although the damaged images can be restored more precisely by the above methods, the drawbacks are also obvious. For example, the adaptive filter denoising method can achieve a good denoising effect under low noise level, but the denoising effect will be greatly reduced with the noise increases. The W-WPD can improve the quality of image, but some artifacts (e.g., ambiguity points) might be generated along with the reconstruction process. The main shortcomings, including optimal parameter selection and high computation cost, still remain unsolved in data-driven approaches. For the WHMRF method, it is difficult to flexibly integrate the spatial quantitative relation (between the damaged pixel point and its neighbor points) into the restoration model [
19].
Today, SR techniques are based on the principle that an image can be sparsely represented in a time domain or frequency transform domain, where each image block could be reconstructed by sparse reconstructing algorithms. The core idea behind SR is how to represent the images more sparsely in the time/frequency transform domains, usually, the most common methods focus on the establishment of redundant multiscale transform and redundant dictionary. For example, in ref. [
20], the curvelet transform is proposed to denoise the white noise, which exhibits higher perceptual quality than wavelet-based reconstructions. In ref. [
21], the edge detection and fuzzy clustering algorithm are combined to preserve the edges of synthetic aperture radar (SAR) despeckling in translation-invariant second-generation band-wavelet transform (TIBT) domain. In ref. [
22], to address the image denoising problem, the over-complete discrete cosine transform (DCT) dictionary, global trained dictionary, and K-means singular value decomposition (KSVD) dictionary, were proposed.
Another core point of the SR is reconstruction algorithm. Generally, image restoration is an inverse problem, in which the ideal images could be approximatively estimated from the noisy images. The difficulty knot of image restoration is that the inverse problems are often ill-posed (or non-deterministic polynomial-time hard, NP-hard). In traditional sparse representations, most of the methods are applied based on regularization-based technique, for example, matching pursuit (MP) [
23], orthogonal matching pursuit (OMP) [
24], and compressive sampling matching pursuit (CoSaMP) [
25], some regularization models, such as total variation regularization function (TVRF) [
26], sparse non-local regularization (SNLR) [
27,
28], etc. However, the traditional sparse representation methods may cause instability and obvious artifacts in the reconstructed images, especially for the restoration of microstructure image that include some smooth regions and multi-boundary and fine-textures, or when the noise level is strong.
To address the above issues in SR and exploit the spatial information of microstructure images, in this paper, a novel image restoration method based upon smoothing penalty sparse representation (SPSR) and adaptive over-complete KSVD dictionary is proposed for microstructure image of metallic materials, taking aluminum alloy 7075 (AA7075) material as an example. The nonconvex penalty regularization is introduced to address the image inverse problem mentioned above, and the success rate will be improved greatly in image reconstruction. Moreover, unlike the common procedure used in refs. [
29,
30], in which the sparse transform basis was used for measuring the image sparsity, this paper utilizes over-complete dictionary (e.g., trained KSVD dictionary) to promote the image sparsity under the given redundant system. The simulation and experimental results show the superiority of the proposed method compared with some state-of-the-art methods, such as wavelet packet method, the discrete cosine transformation (DCT) combined with OMP method, and the KSVD dictionary combined with OMP method, respectively. Meanwhile, the comparison results of grain parameters, such as grain diameter (mean), grain area (polygon), grain perimeter (ratio), etc., are also discussed in detail before and after processing based on the proposed method.
For the applicability of the proposed method, generally, a microstructure image is used that exhibits a lamellar (plate-like) structure or a structure that exhibits twinning, which can be divided into two kinds of regions: one is the image blocks containing lamellar (plate-like) structure and boundaries in structure regions, etc., and the other is the image blocks that distributed in smooth regions. Correspondingly, the optimization expression of the sparse representation method usually includes a likelihood part and prior knowledge part, furthermore, the external noise will play a critical role in smooth regions during image restoration, and its effect is relatively weak in structured regions, where there is a strong similarity between the two blocks, due to the pixel values being similar in smooth regions, and if the noise level is strong, the information characteristics of external noise in smooth regions might be regarded as structural information in sparse coefficients, wherein the classical optimization approach might remove the inveracious structure information that failed, leading to instability and obvious artifacts on the reconstructed image. For the proposed method, on the one hand, before the reconstruction algorithm is implemented, the information of lamellar (plate-like) structure and boundaries could be represented in over-complete KSVD trained dictionary, on the other hand, the prior knowledge part is improved by introducing a smoothing parameter, and the likelihood part is also improved via a regularization weight, therefore, the noise distributed in structure regions and smooth regions could be denoised adaptively, especially for the noise points hidden in the smooth regions.
The main contributions of this paper are summarized as follows:
- (1)
The dictionary training algorithm, namely KSVD, is introduced, while the detailed structure information, such as lamellar (plate-like) structure and boundaries, could be represented accurately.
- (2)
The smoothing parameter and regularization weight are designed based upon the traditional sparse representation method, and the noise distributed in structure regions and smooth regions could be denoised adaptively.
- (3)
The grain parameters, such as grain diameter (mean), grain area (polygon), grain perimeter (ratio), etc., are discussed before and after they are processed by the proposed method, and the structural information that used for industrial applications, such as metallography detection, micro-electro mechanical manufacturing (MEMM) could be clearly isolated, which may open up a new field of application of material microstructure to industry.
The layout of this paper is organized as follows.
Section 2 describes the algorithms of sparse representation and KSVD.
Section 3 introduces smoothing penalty sparse representation (SPSR) algorithm, and its derivation and parameter selection, etc. In
Section 4, the simulation and experimental results of the proposed method are presented with other approaches. Conclusions are shown in
Section 5.
3. Smoothing Penalty Sparse Representation (SPSR)
It should be noted that
belongs to a highly underdetermined equation (HUE) [
38,
39], there are infinite set of solutions. The problem of image reconstruction by sparse representation under residual error constraint can be calculated by
where
c is a threshold of the residual error. Moreover, the prior knowledge of the original image is usually utilized to regularize the solution under residual error constraint is expressed as
where
is regularization weight and
regularization term. From the perspective of Bayesian estimation, the
and
can be viewed as the likelihood part and prior knowledge part, respectively. Therefore, the
prior knowledge plays a significant role in image restoration based on sparse representation. For a microstructure image, it can also be divided into two types: the first is the image blocks containing details, boundaries, and singular points, and the second is the image blocks located in smooth regions. For the former, the details, boundaries, and singular points that determine the similarity between two blocks, and the influence of external noise, is relatively weak. However, in smooth regions, there is a strong similarity between the two blocks due to the pixel values being similar; here the influence of external noise will play a critical role in image restoration. If the noise level is strong, the information of noise in smooth regions is regarded as structural information in sparse coefficients. Meanwhile, the classical optimization approaches and regularization approaches cannot remove the false structural information contained in the sparse coefficients, and the traditional methods may cause instability and obvious artifacts in the reconstructed images.
To overcome the above issue, inspired by the ideas of the unconstrained low-rank matrix recovery in refs. [
40,
41,
42] that have been implemented in the compressed sensing field [
31,
32,
33], a novel smoothing penalty sparse representation (SPSR) method is introduced, which is different from the ones studied in [
40,
41,
42] where a uniform random matrix (i.e., the entries of the matrix are random variables with uniform distribution) was used. In this work, the matrix is obtained via the mutual coherence technique [
37] and over-complete KSVD dictionary that satisfies the RIP criterion. The objective function is as follows,
where
q is regular operator,
is smoothing parameter,
is penalty parameter, and
b is measurement vector. It should be mentioned that the smoothing parameter
plays a critical role in image restoration in terms of smooth regions. The detailed updated procedures of the proposed Algorithm 1 are as follows:
Algorithm 1. The smoothing penalty sparse representation algorithm. |
SPSR (0 < q ≤ 1) algorithm: |
Input: Matrix A, measurement vector b, estimated sparsity level s. |
Output: Recovery vector ; |
(1) Choose appropriate parameters , q (0 < q ≤ 1); |
(2) Initialize , such that , and set and ; |
(3) For k = 0; |
(4) Solve the following linear system for , |
|
Or |
|
(5) When meet the reconstruction accuracy, as the output value assigned to , meanwhile end to this algorithm, otherwise execute next steps. |
(6) Let is a constant, where , update , where represents the rearrangement of absolute values of in the decreasing order, and is the (s + 1)th component value of . Note that, if , choose to be an approximation of sparse solution and stop this iteration. |
(7) Let k = k + 1, and return to Step (4) to continue. |
End |
For the SPSR method, the following theorem summarizes the results for 0 < q ≤ 1, thus, we have the following theorem which can prove the above proposed algorithm.
Theorem 1. Error estimation theorem [43]. Suppose that x0 is s-sparse signal which satisfies Ax0 = b. The smooth parameter with . Matrix A satisfies the RIP of order 2s with , when , the sequence {x(k)} has at least one convergent subsequence. Suppose that the limit is a local optimal solution for Equation (12), we have,where is the approximate error of , which satisfies . For the special case, when , there must exist a convergent subsequence converging to point x0, it satisfies,where C1, C2 are C3 are independent positive constants. To prove the theorem 1, the following two lemmas (i.e., lemma1 and lemma 2) [40,41] are required..
Lemma 1 [
40,
41]
. For all and 0 < q ≤ 1, if , it satisfies, Proof [
40,
41]
. According to arithmetic-geometric mean inequality [
44], i.e.,
This completes the proof of Lemma 1. ☐
Lemma 2 [
40,
41]
. Let , if be the solution of for k = 0, 1, 2, … N, then, Furthermore,
where
C4 is an independent positive constant.
Proof [
40,
41]
. We first compute the following formula,
According to
, we have
Using Lemma 1 and substituting Equation (20) to Equation (19), we have
From the result of Equation (21), the Equation (17) can be calculated.
It should be noted from Equation (17) that the
is monotonically decreasing sequence, hence,
for all
k ≥ 1 and 1 ≤
i ≤
n, there exists a positive number
which satisfies
, hence
Let
, and the Lemma 2 is proved conclusively. ☐
Herein, combining the above inequalities in Lemma 1 and Lemma 2, the Theorem 1 can be proved ultimately, for simplicity, the detailed proof process was omitted. In the next section, the choice of regular operator q will be discussed in detail via a simulation experiment.
For the choice of regular operator
q (0 <
q ≤ 1), let
q varying among {0.1, 0.5, 0.7, 1}. Firstly, the matrix
A is designed by rand-function rand(64, 256) in MATLAB, and the initialization signal
has
t non-zero narrow impulses that subject to the standard Gaussian distribution (SGD), the locations of non-zeros are uniformly and randomly generated, and
t, varying among {8, 10, 12, …, 32}. The penalty parameter
is small enough to approximately enforce
and
, which is measured over 100 times in terms the perfect reconstruction. Taking the SPSR algorithm iterative 1000 times, if the recovery error satisfies
, the iteration is stopped, where
stands for a recovered vector. The recovery algorithm is SPSR method (
q ∈ {0.1, 0.5, 0.7, 1}), the recovery success rate curve of different.
q with sparsity is shown in
Figure 1. From
Figure 1, it can be seen that
q = 0.1,
q = 0.5 performed better than
q = 0.7 and much better than
q = 1. Moreover,
q = 0.5 gives a higher success than
q = 0.1 slightly. We emphasize that our results do not counter the intuition that a smaller
q should recover more sparse vectors. Generally, a smaller
q value makes the minimizing functional more non-convex, but more difficult to solve. In addition, in this algorithm, it has been discovered that if smoothing parameter
decreased slowly, the performance of
q = 0.1 reach further improved. However, the running time with
q = 0.1 also became much longer. For example, in this simulation, the execution time of parameter
q = 0.5 is 4.4550 s, and execution time of
q = 0.7 and
q = 1 are 5.7359 s and 8.6348 s, respectively, but the execution time of
q = 0.1 is 9.4643 s, it should be noted that the execution time becoming longer when parameter q is selected smaller.
5. Conclusions
To address the image restoration problem, a new image reconstruction technique for microstructure image based on KSVD and smoothing penalty sparse representation (SPSR) algorithm is proposed in this paper. In image sparse representation, traditional orthogonal basis functions are replaced by trained KSVD dictionary, and the trained KSVD dictionary represents the sparse characterization of block sub-image probably due to the traditional sparse representation methods that may cause instability and obvious artifacts in the reconstructed image, especially for the restoration of microstructure images, including some smooth regions, or when the noise level is strong. The proposed algorithm can overcome the above issues, which improves the reconstruction accuracy significantly. Moreover, the damaged microstructure image usually brings statistics missing in the analysis of microstructure grain parameters, and the proposed method can effectively address this drawback, which has a high engineering application value in metal materials, manufacturing, and microstructure fields.
Although the proposed method improves the reconstruction quality significantly, it still needs future improvements, where the complexity level and computational time of the proposed approach is rather high, due to dictionary training and its iteration operations. It is suggested that faster calculation methods will be explored in future studies.