Keywords

1 Introduction

Stress wave tomography technique has been widely used in non-destructive testing of wood. Ross et al. [8] are the earliest researchers who used stress wave detection technology on red oak decayed area for testing. The image observed by the stress wave imaging software can be obtained the rotten woods interior location, size and extent of decay [3]. Sun and Wang [10] combined the diagnostic method of stress waves with the two dimensional X-ray/CT image to determine the internal decay region of logs efficiently and accurately. Qi [6] used the X-ray pattern to filter and sharpen which made the detailed wood internal defects more obvious.

These studies are seldom focusing on the stress wave imaging algorithm but application of existing commercial imaging software for two dimensional imaging research. Feng [2] presented an image reconstruction algorithm which used the speed around the points to estimate the value of unknown grid points. The test results demonstrated the feasibility of this method. Du [1] used spatial interpolation for trees and timber-based approach to plot the internal defect analysis and the timber internal defect image. However, there are few researches in three dimensional stress wave imaging algorithm of defect detecting in wood.

The basic idea of Kriging is to predict the unknown samples by introduced the weight of each sample and computed a weighted average, base on the differences of the correlation and the spatial location between the each samples [7]. Kriging algorithm designed simulation study was first used in mine exploration and soil mapping. The method makes use of geostatistical methods. Asumptions a smooth mathematical function can not be simulated because of space attribute is irregular changing continuously, but can be read by random surface representation [11].

The algorithm existed the following problems when applied to the timber stress wave three dimensional imaging of internal defects: first, increase the complexity of the algorithm because of the predicted results are related to all known points in the neighborhood; second, neglect the spatial structure of interpolation points because of the results of the prediction points are related to the distance between all known points in the neighborhood. Therefore, we propose a TKriging (Top-k Kriging) algorithm which can be extended to estimate the relationship between the neighborhoods of three dimensional space. We increase the Top-k query within the search radius to find the point with the greatest impact on the estimated k known points, which calculated the value of the estimated point and stress wave three dimensional imaging. We use four samples to do the experimental comparison of TKriging algorithm and Kriging algorithm for three dimensional stress wave imaging.

2 Proposed Method

Regionalized variable, the variable spatial distribution, can reflect the specific spatial distribution of various special properties. For example, those exist in space, meteorological factors, soil information, eco-hydrology, geological environment, maritime climate, and so on. They not only have a specific spatial attributes but also have a dual nature of the variable region. Then we can assume a random field Z(x) to represent the numerical of regionalized variables observed before, after the observation, it is a value of a function that determines the spatial points [5]. There are two major characteristics in regionalized variables:

  1. (1)

    Z(x), a random uncertain function, represents the amount of change in the region that main feature is random, localized and abnormal function.

  2. (2)

    To some extent, the self-correlation should be: when x is a variable, the attribute at point Z(x) and spatial distance deviation of the point x + h property at Z(x + h) have some relationship, and its relationship has correlation with the characteristics of variable and the distance between two points.

In this paper, we propose a stress wave imaging algorithm using TKriging. We optimize the spatial structural about estimating points and known points in their neighborhoods, and increase the Top-k query technology to improve the calculation accuracy about estimating points.

2.1 TKriging Interpolation Algorithm

It is supposed that samples is any point at the region of study, which satisfies the second-order stationary assumptions or intrinsic hypothesis. Thereinto, is the point that have been measured as , and \(\lambda _i\) is the weighted coefficient, for an arbitrary predicted value of the estimating point are as follows:

$$\begin{aligned} Z*({p_i}') = \sum \limits _{i = 1}^m {{\lambda _i}Z({q_i}')} \end{aligned}$$
(1)

In the equations above, \(\lambda _i\), the weighted coefficient of the known point, is not singly decided by the distance, which is calculated based on variogram at minimum variance unbiased condition. is good or bad by how to choose the weight coefficient \(\lambda _i\).

In order to ensure the is calculated based on the unbiased estimate of , which means the deviation of the mathematical expectation is zero; if the sum, square of the difference between the estimated value and the actual value , is the minimum, the sum should satisfies the conditions:

$$\begin{aligned} E[Z*({p_1}') - Z({p_1}')] = 0 \end{aligned}$$
(2)

In order to obtain the minimum variance of the estimated under the above constraints, \(\lambda _i\) needs to be constructed by the function of the Lagrange multiplier method, and is the Lagrange multiplier:

$$\begin{aligned} F = E\left\{ {{{[Z*({p_1}') - Z({p_1}')]}^2} - 2\mu (\sum \limits _{i = 1}^m {{\lambda _i} - 1} )} \right\} \end{aligned}$$
(3)

If there is a set of values \(\lambda _i\) to meet the requirements, the equations can be:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {\sum \limits _{i = 1}^m {{\lambda _i} = 1} }\\ {\sum \limits _{i,j = 1}^m {{\lambda _i}Cov({q_i}^\prime ,{q_j}^\prime ) - \mu = Cov({p_1}^\prime ,{q_j}^\prime )} } \end{array}} \right. \end{aligned}$$
(4)

The m + 1 equations group is ordinary Kriging equations. According to the above formula, the matrix equations can be obtained:

$$\begin{aligned}{}[K][\lambda ] = [M] \end{aligned}$$
(5)

The K, M, are respectively expressed as:

$$\begin{aligned}{}[K] = \left[ {\begin{array}{*{20}{c}} {{C_{11}}}&{}{{C_{12}}}&{}{\ldots }&{}{{C_{1n}}}&{}1\\ {{C_{21}}}&{}{C{}_{22}}&{}{\ldots }&{}{{C_{2n}}}&{}1\\ {\ldots }&{}{\ldots }&{}{\ldots }&{}{\ldots }&{}{\ldots }\\ {C{}_{n1}}&{}{{C_{n2}}}&{}{\ldots }&{}{{C_{nn}}}&{}1\\ 1&{}1&{}1&{}1&{}0 \end{array}} \right] [\lambda ] = \left[ {\begin{array}{*{20}{c}} {{\lambda _1}}\\ {{\lambda _2}}\\ {\ldots }\\ {{\lambda _n}}\\ { - \mu } \end{array}} \right] [M] = \left[ {\begin{array}{*{20}{c}} {{C_{01}}}\\ {{C_{02}}}\\ {...}\\ {{C_{0n}}}\\ 1 \end{array}} \right] \end{aligned}$$
(6)

The result of estimated variance is minimum by ordinary Kriging method, which is expressed as follows:

$$\begin{aligned} {\sigma ^2} = Var{[Z*({p_1}') - Z({p_1}')]^2} = Cov({p_1}',{p_1}') - \sum \limits _{i = 1}^m {{\lambda _i}Cov({p_1}',{q_i}') + \mu } \end{aligned}$$
(7)

Wherein variogram function \(\gamma \) (q \(_i\) ’, q \(_j\) ’) as follows:

$$\begin{aligned} \gamma ({q_i}',{q_j}') = \gamma ({q_i}' - q{}_j') = \frac{1}{2}E{[Z({q_i}') - Z({q_j}')]^2} \end{aligned}$$
(8)

Wherein, the variation function \(\gamma \) (q \(_i\) ’, q \(_j\) ’) substitutes for the covariance Cov(q \(_i\) ’, q \(_j\) ’), and brings into the equation to obtain the equation as follows:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {\sum \limits _{i = 1}^m {{\lambda _i} = 1} }\\ {\sum \limits _{i,j = 1}^m {{\lambda _i}\gamma ({q_i}^\prime ,{q_j}^\prime ) - \mu = \gamma ({p_1}^\prime ,{q_j}^\prime )} } \end{array}} \right. \end{aligned}$$
(9)

And the corresponding ordinary Kriging variance can be expressed as follows:

$$\begin{aligned} \sigma 2 = \sum \limits _{i = 1}^m {{\lambda _i}\gamma ({p_1}',{q_j}') + \mu - \gamma ({p_1}',{p_1}')} \end{aligned}$$
(10)

2.2 Top-k Query-based Method

Top-k discover technology is used mainly to search the most relevant k results from a large amounts of data [4, 12], Kriging algorithm uses the Top-k query technology to find out the most influential k known points in the neighborhood range of estimated points and their properties. Top-k query is defined as follows: given M tuples as a collection T, each tuple has its own attribute. Then store the collection T as a column files collection, each column file is a binary array, wherein representing the object identifier and object property values at the property. The storage way of each column file is a monotonous decreasing sequence of each tuples property value. That is defined as the scoring function F. The formula is as follows [9]

$$\begin{aligned} F(a) = \sum \limits _{i = 1}^m {({\lambda _i} \times a.u{}_i)} \end{aligned}$$
(11)

\(\lambda _i\) is a weight which is defined on the attribute values, \(u_i\) by the scoring function. Usually, F is a monotonic function. The k subset of each tuples in the set T can be queried by Top-k query technology. Subsets each element in a group, by reading the m column which is a collection of files in descending order of columns S, read the sequence in order. When tuples appear, get the corresponding attribute value in another column file by random reading mode, and then calculate their score value. If the value of k is the largest one ever seen, put the tuple and its relevant information to the optimal queue. For each column sequence, set its current reading position, and set threshold. When the value of meta component k in priority queue is not less than the minimum, the query is finished. Equation (1) follows the deformation below

$$\begin{aligned} {Z_{{p_i}}} = \sum \limits _{i = 1}^\delta {{\lambda _{pi}}{Z_{qi}}} \end{aligned}$$
(12)

\(Z_{qi}\) is the property values about known points. \(\lambda _{pi}\) is the weight defined on the property value. \(Z_{pi}\) is the final attribute value. So \(F_{pi}\) is the scoring function as follows:

$$\begin{aligned} F({P_i}) = \sum \limits _{i = 1}^\delta {{\lambda _{pi}}{Z_{qi}}} \end{aligned}$$
(13)

2.3 The Steps of TKriging Imaging Algorithm

Finally, the steps of three dimensional stress wave imaging using TKriging method are as follows:

  • Step 1: Enter the velocity data of stress wave collected from the sensor.

  • Step 2: Enter the sensor coordinate X(z,y,z). Calculate out the line velocity matrix Vm*n by the time matrix Tm*n of collected.

  • Step 3: Set estimating point X to 2000. Calculate the known set of points in the neighborhood M and the variation function.

  • Step 4: Match the variation function and select the spherical model.

  • Step 5: Ordinary Kriging equation calculation, count the Weight of interpolation point.

  • Step 6: Take the weight counted into the Eq. (1).

  • Step 7: When the search is complete, compare score.

  • Step 8: According to the property value \(\textit{F(p}_{i}\) ) in formula (13), the estimating points could be assigned different color and make the three dimensional visualization.

3 Experimental Results

This study uses the team self-developed portable timber tomographic imaging apparatus. When the timber is detected, the sensors are needed to install randomly at different heights to measure wood. Each time we collect data by knocking 12 sensors on the same sample twice, so the data are collected about 24 groups. The collection of experimental data is shown in Fig. 1(a).

3.1 Materials and Methods

We select four samples as subjects. The types of sample are pecan trees, paulownia trees and phoenix trees. As it shown in Fig. 1, that b and f are pecan tree samples, a is paulownia tree sample, c is the sample of firmiana tree. Samples a and d are the artificial dig holes to simulate natural decay situation. Samples b and c are the natural decay defect. We used a tape to measure the circumference of each sample. Sample a’s circumference is 100 cm, sample b’s circumference is 116 cm, sample c’s circumference is 139 cm, and sample d’s circumference is 93 cm. The maximum height difference between the sensor and the surrounding wood in the measured samples is 20 cm, 30 cm, 15 cm, 20 cm.

KT-R heavy hammer Wood Moisture Meter, Production of Italy Klortner company, is used to measure the moisture content in the experiment. Through testing, the water content of sample a is 36.5\(\%\), the water content of sample b is 23.5\(\%\), the water content of sample c is 33.5\(\%\), and the water content of sample d is 20.3\(\%\). Volume of measured samples: the sample volume equals to the measured height multiplied by the sample cross-sectional area. Wherein the measured volume of sample a is 15923.57 cm\(^3\), the measured volume of sample b is 32140.13 cm\(^3\), the measured volume of sample c is 23074.44 cm\(^3\), and the measured volume of sample d is 13772.29 cm\(^3\). The measured defect volume of sample a is 4019.2 cm\(^3\), the measured defect volume of sample b is 2601.12 cm\(^3\), the measured defect volume of sample c is 2418.39 cm\(^3\), and the measured defect volume of sample d is 1538.6 cm\(^3\).

Fig. 1.
figure 1

Imaging equipment and four test samples

The time matrix of stress wave propagation in wood is obtained by self-made portable timber tomographic imaging instrument. 12 sensors of the instrument are used to get enough input data for the proposed method. The arrangement of sensors fixation and data acquisition is shown in Fig. 2, the 12 sensors are fixed at different heights and rounded the test sample, six sensors are fixed on one side and other six sensors are fixed on another side. There are two data acquisitions, and the positions of the sensors in second data acquisition are different from that in first data acquisition. After merging the two data, 24 groups of stress wave propagation time matrix as the original experimental data can be can collected. We archive the input data and opened it in text mode and organize the data to get the stress wave propagation time matrix. Each value in the matrix is the feedback value of the stress wave propagation time which received by a certain pair of sensors. The main role of propagation time matrix is to calculate the velocity matrix of stress wave by the time matrix and the corresponding distance matrix.

Fig. 2.
figure 2

Sensors fixation and data acquisition

3.2 Comparison

Compare the imaging experiments of different defect type samples from the two algorithms, the test results are shown in Figs. 3, 4, 5 and 6. The area of red dots is used to simulate the decadent area in the samples, but green and yellow spots are used to simulate the health area in the samples.

Fig. 3.
figure 3

The test results of 2D regular defect samples. (a) Sample a, (b) Kriging result, (c) TKriging result, (d) sample b, (e) Kriging result, (f) TKriging result. (Color figure online)

Figure 3 is the two dimensional imaging results of regular defect samples. The test result shows that TKriging algorithm is better in imaging. It reflects the approximate location and the cases of defects.

Fig. 4.
figure 4

3D regular defect samples test results. (a) Sample a, (b) Kriging result, (c) TKriging result, (d) sample b, (e) Kriging result, (f) TKriging result. (Color figure online)

Figure 4 shows the three dimensional imaging results. The volume of sample a is 15923.57 cm\(^3\), and the defective part is 4019.2 cm\(^3\). The volume of sample b is 32140.13 cm\(^3\), and the defective part is 2601.12 cm\(^3\). The TKriging algorithm is better in the three dimensional imaging that can reflect the degree of decay.

Fig. 5.
figure 5

Irregular defect sample test results. (a) Sample c, (b) 2D Kriging result, (c) 2D TKriging result, (d) sample c, (e) 3D Kriging result, (f) 3D TKriging result. (Color figure online)

Figure 5 is the test results for the sample c. By the test results, we can see that TKriging algorithm is better in imaging. It reflects the approximate location and the cases of defects. The volume of sample c is 23074.44 cm\(^3\), and the defective part is 2418.39 cm\(^3\). The experimental results show that the TKriging algorithm is better than Kriging algorithm in three dimensional imaging.

Fig. 6.
figure 6

Test results of the sample with two holes. (a) Sample d, (b) 2D Kriging result, (c) 2D TKriging result, (d) sample d, (e) 3D Kriging result, (f) 3D TKriging result. (Color figure online)

Figure 6 is the test results for the sample d. The sample volume is 13772.29 cm\(^3\), and the defect portion is 1538.6 cm\(^3\). In such sample tests, both algorithms can not detect the second hole.

3.3 Imaging Analysis

The defect volume of the actual measurement and the defect volume calculated by two algorithms are show in Table 1, which can be used to verify the correctness of the test results. The data in column 3 is the volume calculated by Kriging algorithm. The data in column 4 is the volume calculated by TKriging algorithm. The data in column 5 is the relative error of Kriging algorithm. The data in column 6 is the relative error of TKriging algorithm. The formula is as follows:

$$\begin{aligned} \varDelta {t_i} = |{V_i} - V|/Vi = 1,2 \end{aligned}$$
(14)
Table 1. Sample defect detection results

Table 1 reveales the results of defect detection among different samples, which include measured defect volume, calculated defect volume and relative error. Based upon the data of the table, the relative error range of Kriging algorithm is between 8.70\(\%\) and 195.08\(\%\), the relative error range of TKriging algorithm is between 6.86\(\%\) and 96.46\(\%\) and the relative error of TKriging for sample a–c is all less than that of Kriging. It has been proved that TKriging algorithm has a higher imaging precision. Relative error of Sample d is 12.28\(\%\), the reason may be the two artificial holes in the sample. As indicated in Fig. 6, the accuracies of the two algorithms are not high in this case, and only one hole in the sample is calculated by both methods. Therefore, lower relative error can not reflect that Kriging performs better in this case. According to the results of the experiment, the average relative error rate of Kriging algorithm is 99.53\(\%\), while the average relative error rate of TKriging algorithm is 33.02\(\%\).

4 Conclusion

In this paper, an imaging method is proposed which is based on the TKriging of the three dimensional stress wave in the internal defects of wood. In addition, the three dimensional imaging of wood defects is studied. Compared with the results of Kriging algorithm, the algorithm not only can better reflect the internal decay of wood in qualitative and quantitative, but also has a high imaging accuracy. To verify the algorithms feasibility of the three dimensional imaging of internal defects in the wood, sensors are used to collect the stress wave propagation velocity around wood, through the different samples of defect experiments. The average relative error rate of the algorithm, detection of single empty defect samples, is only 33.02\(\%\), while the accuracy of the sample test for the porous hole is not high. It can basically reflect the position of the sample defect, but the second hole can not be detected, we still need further study.