Aiming to provide economical equipment support for nondestructive wood testing, we developed a wood computed tomography (CT) imaging system to aid wood researchers in accurately understanding wood internal structures and defect characteristics. The wood CT system consists of an X-ray source, an X-ray detector, an electric rotational stage, and a computer. The X-ray source projects a fan-shaped X-ray beam to the wood, and the X-ray detector captures the penetrated X-ray intensity data when the wood is at different angles of rotation. The projection data were preprocessed before they were used for image reconstruction. An improved filtered back-projection (FBP) algorithm specialized for wood cross section CT image reconstruction was proposed. The traditional Ram-Lak (RL) filter and Shepp-Logan (SL) filter were replaced by a Butterworth filter. The Butterworth parameters were determined to achieve a desirable compromise between spatial resolution and image noise. Two pieces of cylindrical log (Thuja sp., Pinus sp.) and a block of laminated timber were scanned. The reconstructed images clearly revealed the internal structures of wood, and the fine features such as pith, annual growth rings, radial cracks, knots, and outer edge were enhanced, while the image noise and blurring effect were suppressed.Abstract
Computed tomography (CT) imaging is one of the most powerful nondestructive techniques that can be used to obtain the internal structure characteristics of many materials (Hsieh 2003). This nondestructive technique provides image “slices” representing cross-sectional density distribution of a scanned object (Kak and Slaney 1999). Because it can provide an internal view of an object, CT is widely used in various industries in addition to medical diagnostics. In the wood industry, CT imaging of wood refers to reconstructing the cross-sectional image of wood from projection data collected by illuminating the wood from many different directions, which is based on the degree of X-ray absorption being different in various wood structures. In a wood CT image, the grayscale value of a pixel is directly proportional to the X-ray absorption degree, which is then correlated with the wood density at the pixel location. By measuring the X-ray attenuation coefficients within wood, solving for the two-dimensional (2D) distribution of coefficients of the wood cross section, and generating a grayscale image, a tomographic image of wood can be produced.
CT offers great potential for nondestructive testing of the internal structure of wood, providing exact information for logs or lumber on characteristics such as density and internal defects (Schmoldt et al. 2000a, 2000b; Fromm et al. 2001; Espinoza et al. 2005; Freyburger et al. 2009; Hou et al. 2009). Many researchers have studied CT image processing and internal defects recognition in recent years (Zhu et al. 1996, Sarigul et al. 2003, Bhandarkar et al. 2005, Longuetaud et al. 2012, Wehrhausen et al. 2012). Based on the image processing results, detailed knowledge of the location, orientation, and size of internal defects in logs is obtained. Three-dimensional (3D) reconstruction of defects from cross-sectional CT images is then possible, which can be used to guide log sawing decisions, arriving at better log sawing strategy and maximization of log value (Schmoldt et al. 1996; Bhandarkar et al. 2002, 2006, 2008; Andreu and Rinnhofer 2003a, 2003b; Chang and Gazo 2009). Studies on lumber or plywood grading using multisensor machine vision including X-ray CT have also been carried out, because grading lumber based solely on external information with little or no information about the internal structure might cause erroneous estimation of lumber price (Pham and Alcock 1998, Kline et al. 2000).
While most of the studies on the use of CT images have focused on sophisticated automatic internal feature detection, very little work has been done on economical CT scanning equipment in the wood industry. Wood nondestructive testing research is mainly based on industrial and medical CT scanners, but medical CT scanners have been shown to be inappropriate for the wood industry (Wei et al. 2009, 2011). An in-depth knowledge of log and board internal features is required, and their determination needs proper scanning systems (Wei et al. 2011). Therefore, CT scanners that are specifically designed for the wood industry were developed. Schmoldt et al. (1999) designed an X-ray tangential CT scanner prototype to allow for time saving in the scanning process, but this tangential scanner lacked an efficient image reconstruction algorithm. Andreu and Rinnhofer tested an airport scanner (Invision CTX 2500) for log scanning, but the scanner provided low spatial resolution images (Andreu and Rinnhofer 2001, 2003a; Rinnhofer et al. 2003). Swedish researchers tested an X-ray linear cone-beam tomography device to directly obtain 3D images of logs; the knots were reconstructed with sufficient accuracy to allow for quantitative optimization, but heartwood was barely distinguished from sapwood due to the missing data (Flood et al. 2003, Seger and Danielsson 2003). In Canada, FPInnovations-Forintek had an industrial CT scanner that was designed by Bio-Imaging Research and tested by Middleton et al. (2003) on white spruce (Picea glauca) logs, but image quality was judged as not being satisfactory enough to be included in a permanent CT stem bank database (Middleton et al. 2003).
Although industrial and medical CT scanners may provide high-resolution images, these scanners are generally very expensive, and the core algorithms are unopened. In 2008, MiCROTEC GmbH announced the commercialization of an industrial CT scanner (CT.LOG) for log scanning (http://www.microtec.eu/), but its technical details appeared to be commercially protected. In addition to the technical aspects, economic feasibility was analyzed because of the high cost of CT scanners (some cost figures were given in Harding et al. 2007). The primary motivations for our work were to aid in solving the problems in the existing wood CT scanning systems and to provide exact internal structure information for logs or lumber at a lower cost than other available systems. We developed a wood CT imaging system to aid wood researchers in accurately understanding wood internal structures and defect characteristics.
Methods
Wood samples
For this study, two pieces of cylindrical log and a block of laminated timber (Fig. 1) were sampled. Log No. 1 (Thuja sp.) had a cross-section diameter of 18.9 cm, and log No. 2 (Pinus sp.) had a cross-section diameter of 9.4 cm. The third sample (No. 3) was a laminated timber made up of four pieces of tangential lumber that was 12.4 by 6.6 cm in cross section.
Wood CT system setup
The wood CT imaging system consists of an X-ray source (IXS160BP200P040, VJ Technologies, USA), an X-ray detector (XDAS-V3; Sens-Tech Ltd., UK), an electric rotational stage, and a computer that controls the CT system as a central processing unit. The X-ray source can generate a fan-shaped beam, the size of the X-ray focal spot is 0.8 mm, and the tungsten target voltage of the X-ray tube is 10 to 160 kV, with continuous maximum output power of 500 W (VJ Technologies 2014). The X-ray detector is a linear scanner for data acquisition in X-ray line-scan application, which has 1,280 detector channels. Each detector channel is 0.4 mm, and all the detector channels can be connected end-to-end forming a continuous scanning array over 512 mm (1,280 by 0.4 mm = 512 mm; Sens-Tech Ltd. 2014). A 1.8-cm-thick aluminum plate is attached in front of the X-ray tube to filter the low energy X-ray photons, which might be absorbed by wood for better imaging. During wood scanning, the X-ray source and the X-ray detector are stationary, while the wood is fixed in the center of the electric rotational stage rotating along with the stage. The diagram of the CT system configuration is shown in Figure 2a, and a photo is shown in Figure 2b. For each axial scanning, the X-ray tube voltage and current were fixed at 120 kVp and 0.7 mA, and the X-ray detector integral time was 5 ms. The wood was scanned by 360 steps × 1°/step rotation scan protocol lasting for 3 min. One frame of projection was acquired after each rotation step, and 360 lines of measured projection data were collected after the whole scanning process.
Data acquisition and preprocessing
The computer sends a data-collecting command to the X-ray detector via USB interface, the penetrated X-ray intensity data are acquired and converted to digital signal, and then they are transmitted to the computer and saved as database files. Owing to dark-field offset, defective channels, and inconsistent channel response, the raw data from the X-ray detector show spatial variation, and therefore it is necessary to perform data preprocessing before image reconstruction that includes the following steps (Kak and Slaney 1999, Hsieh 2003).
Dark current subtraction
The following equation can be used for subtracting dark current data from raw data:
where I and Ic1 represent raw data and subtracted data, respectively. Īd is the average of multiframe dark-field current, which should be collected under the condition of a closed X-ray source. For each CT scan, raw data and dark current should be acquired under the same system settings.
Defective channels interpolation
Substituting two adjacent channels for a defective channel by interpolation, if the xth channel is a defective one, interpolation can be implemented by
where Ic2(x) is the xth channel corrected value, and Ic1(x − 1) and Ic1(x + 1) stand for the (x − 1)th channel and (x + 1)th channel value.
Inconsistent response correction
Solving each channel's correction factor and then multiplying each channel's value by the correction factor, correction factors c(x) can be determined as
where If is the flat-field value, which is corrected under the condition that the X-ray source is open and no object placed in scanning area; Id is the dark-field value; and N is the number of the X-ray detector channels. N = 1,280 in our wood CT system.
Line integral projection calculation
Turning X-ray intensity data into line integral projection used for image reconstruction can be calculated with Equation 4:
where I and I0 stand for the X-ray intensity data with and without wood in the scanning area, respectively, and u() is the X-ray linear attenuation coefficient.
CT reconstruction algorithm and implementation
After data preprocessing, the filtered back-projection (FBP) algorithm is adopted to reconstruct the wood cross section image from the X-ray projections (Hsieh 2003, Gonzalez and Woods 2011). Because the required image resolution depends on wood internal features (e.g., knots, decay, ring width, pith, cracks) and on wood specification (e.g., species, growth rate, log diameter), an improved FBP algorithm specialized for wood cross section CT image reconstruction is proposed.
FBP algorithm description
Based on the well-known Fourier slice theorem, which states that the Fourier transform of a projection [i.e., P(ω,θ)] is a slice of the 2D transform of the region from which the projection is obtained [i.e., f(x,y)]:
where f(x,y) represents the 2D image to be reconstructed and F(u,v) is the 2D Fourier transform of f(x,y). Next, the Fourier slice theorem is used to derive an expression for obtaining f(x,y) in the frequency domain. The image function f(x,y) can be recovered from its Fourier transform, F(u,v), by the inverse Fourier transform:
Let u = ω cos θ and v = ω sin θ, then dudv = ωdωdθ, and the preceding integral Equation 6 in polar coordinates can be expressed as
Then, from the Fourier slice theorem,
In terms of integration with respect to ω, the term x cos θ + y sin θ is a constant, which could be recognized as ρ. Therefore, Equation 8 can be expressed as
The inner expression is in the form of a one-dimensional (1D) inverse Fourier transform, with the added term |ω| as a 1D filter function in the frequency domain. As for the FBP algorithm referred to above, projections are first filtered and then back projected to reconstruct the original image.
Filter design
The filtering component of the FBP algorithm is the foundation for dealing with the image blurring problem when the projected data are noisy, and how to choose a proper filter function is the key point to reconstruct good quality CT images (Farquhar et al. 1998). In Equation 9, the filter function |ω| is a ramp and has the shape of a “V” extending infinitely in both directions, which is not integrable in the continuous case. Mathematically, limiting the width of the ramp implies that it is multiplied by a window function in the frequency domain, as expressed in Equation 10, which tapers the “tails” of the filter, thus reducing its amplitude at high frequencies.
where q(ω) represents a window function, and H(ω) is the transfer function.
In practice, the traditional filters in the FBP algorithm include the Ram-Lak (RL) filter and the Shepp-Logan (SL) filter. But for the two filters, the image quality is not satisfactory when the projections are noisy. The choice of filter for a given image reconstruction task is generally a compromise between the extent of noise reduction and fine detail suppression (and of contrast enhancement in some cases), as well as the spatial frequency pattern of the image data of interest (Maher 2014). In this article, the standard filtering of projections with the window ramp kernel is replaced by the Butterworth filter owing to its wide range of frequency and adjustability of frequency parameters (Erer 2007). The transfer function of the Butterworth filter is defined as follows:
where ωc is the frequency parameter and N is the filter order. The filter curve can be changed by adjusting the two parameters, which should be chosen to correct for the image blurring effect and to enhance or suppress features in the back-projected image. The Butterworth filter in the spatial domain can be recovered from its transfer function H(ω) in the frequency domain by the inverse Fourier transform, which will be used for image reconstruction.
Computer implementation
To implement the FBP algorithm on a computer, the back-projection operation is discretized, and the ramp filter is windowed and sampled, because convolution generally turns out to be more computationally efficient. Note that Equation 9 cannot be implemented directly in its present form: the term inside the brackets is the inverse Fourier transform of the product of two frequency domain functions. Based on the convolution theorem, multiplication of two functions in the Fourier domain is equivalent to the convolution of two corresponding spatial domain functions. Assuming the corresponding function of P(ω, θ) in the spatial domain is the projection p(ρ, θ) and letting the spatial domain function h(ρ) denote the inverse Fourier transform of |ω|, Equation 9 can be rewritten as
where the asterisk denotes convolution. Here, h(n) denotes the inverse Fourier transform of the Butterworth filter H(ω), and p(n) denotes the discrete projection series. In discrete space, the convolution kernel in Equation 12 can be expressed as
where p̃(n) represents an individual back projection at an angle θ, which can be obtained by convolving the corresponding projection and the filter function, and raw is the length of projection series, as well as the number of X-ray detector channels. Because the filter function h(n) in the spatial domain is symmetrical and has infinite length theoretically, for convenience of storage and computation on a computer, 2N + 1 points are extracted from the filter function.
In our system, the number of projections and the sampling distribution are determined by the X-ray detector, and the reconstructed image is discrete. Assuming the sampling angles θ are evenly distributed in the internal [0,2π) and all back-projection images are square with N × N pixels, the complete back-projected image f(x, y) is obtained by integrating all the individual back-projected images over angles θ. Here, Equation 12 can be rewritten in the discrete form:
where the variable x cos θ + y sin θ is simply the distance from each pixel point (x, y) to the X-ray line that goes through the origin of the coordinate system and forms an angle θ with respect to the x axis. Equation 14 states that the reconstruction image f(x, y) at location (x, y) is the summation of all filtered projection samples that pass through that point.
Wood cross section image reconstruction
Sinogram analysis
Figure 3 shows the projection data sinogram and the wood axial cross section reconstructed image (image size is 1,024 by 1,024). The sinogram is a useful tool for analyzing projection data, which presents the data set taken over a 360° range. In the sinogram space, the horizontal axis represents the projection angle and the vertical axis represents the detector channels. Therefore, a single projection is shown in the sinogram as a set of samples located along a vertical line, which is obtained by Equation 4 in this article. The data are collected over all projection angles, forming a 2D image with intensities representing the magnitude of projections. For illustration, the high-intensity curves are bright and located in the middle of the sinogram, corresponding to the projections formed by the wood itself; the other low-intensity (close to zero) area is dark background, which is formed by the projections of air. Comparing a single sinogram and the corresponding reconstructed image, the width of high-intensity curves is almost equal to the size of wood cross section. The results verify that the projection data are effective, and the reconstructed images are reasonable.
Comparison between reconstructed images and photos
As shown in Figure 4, the wood cross section reconstructed images (right) were compared with the photos (left) to illustrate the validity of reconstructed results. On condition that wood samples were not destroyed by cross-sectional sawing, and to make CT images and photos have comparability, the wood cross section below the top section for 1.5 cm was chosen to be scanned, because the two sections might have similar internal structures based on tree growth characteristics.
From the reconstructed image of Log No. 1 shown in Figure 4a, we can see that the outer edge of the log is clear; a radial crack extends from the right edge to pith, which basically matches the photo. The annual growth rings in heartwood are clearly visible and uniformly distributed, while the rings in sapwood are difficult to distinguish because they are dense and too narrow in width. Figure 4b shows that the reconstructed image of Log No. 2 has good resolution, which is smooth and noiseless, and the outer edge and internal structures, such as pith, annual growth rings, radial cracks, and knots, can be identified clearly. The annual growth rings are shown as a series of concentric circles, but the rings are broken and distorted by cracks and knots, respectively. The cracks have the lowest material density because they are composed of air; the left radial crack, which extends along the radial direction from pith to the left boundary, is extremely obvious, and the upper right crack is minor but still can be distinguishable. There is a knot on the bottom right of the reconstructed image, which is the portion of a branch embedded in the log. It appears brighter owing to the higher density of cells within the knot. In Figure 4c, the reconstructed image of No. 3 laminated timber shows that the boundary and texture of each piece of lumber are clear; the outer two pieces have narrow rings, while the middle two pieces have relatively wide rings, which are easy to identify.
To numerically illuminate the accuracy of reconstructed images, Table 1 gives the comparison results between the manually measured value and the estimated value from wood reconstructed images. For Log No. 2, the estimated value of the knot depth is 32 mm, but no measured value can be obtained, because the knot is embedded in the log and invisible from outside. Each fitting degree shows that the reconstructed image is almost equivalent to the wood sample, except that the estimated cross-sectional area is slightly larger than the measured value because of the edge blur caused by reconstruction errors.
Ring structure analysis
Because the reconstructed image of Log No. 2 shows the clearest annual growth rings, it is chosen for analyzing the ring structure. Figure 5 shows the gray-level profile along a line passing through the pith to the edge in the upper left area of the CT image. The x axis stands for the ring radius, and the y axis stands for the gray-level value. The gray-level variation is caused by the ring structure because the density within the log cross section exhibits significant variation. The ring structure is composed of alternating layers of latewood and earlywood, and latewood is composed of smaller size cells, which has a higher density than earlywood. Because higher material density results in higher gray-level pixel values in the CT image and vice versa, the variation is shaped like ridge and valley in the gray-level profile. From the gray-level profile, the number of annual rings can be counted (n = 15), which matches the number of rings on the log, and ring width can be estimated by the difference value of two adjacent ring radii.
Results and Discussion
System performance assessment
In our system as shown in Figure 2a, the X-ray source-to-wood distance (RF) is 566 mm, and the wood-to-detector distance (RD) is 391 mm. The maximum diameter of detected wood can be calculated by the geometric relationship shown in Figure 2a, and the magnification factor of the wood CT system is defined by
The space resolution of the system can be determined by the equivalent X-ray beam width BW physically:
where F is the X-ray focal spot and d is the detector pitch. In our system, the maximum diameter of detected wood is 29.2 cm, the magnification factor is 1.7, and the space resolution is 0.4 mm.
Data preprocessing results
To verify the effectiveness of data preprocessing methods, the cross section of Log No. 1 was scanned, and a frame of raw projection data was taken as an example. Figure 6a shows a frame of raw projection data, Figure 6b shows the corrected data after defective channels interpolation and inconsistent response correction, and Figure 6c gives the line integral projection results. Comparing Figure 6a and Figure 6b, we found that the detector inconsistence was corrected, and the projection data were well distributed. In addition, compensation was made for defective channels data.
Filtering effect
Filtering effect comparison
To further illustrate the impact of different filter functions on the reconstructed image, the cross section of Log No. 1 was reconstructed with RL, SL, and Butterworth filter functions, respectively. Figure 7 shows the characteristic curves of the three filters in frequency domain. Here, the Butterworth filter's frequency parameter is ωc = 0.1, and the filter order is N = 4. The reconstructed image quality has a great relationship with the shape of the Butterworth filter curve, which is determined by the frequency parameter ωc and the filter order N (Seshadri et al. 1990, Maher 2014). The way to determine the two parameters will be described in the “Butterworth parameters' determination” section.
The reconstructed results of the log cross section using the three filters based on the FBP algorithm are shown in Figure 8 (left to right: RL, SL, and Butterworth). The top three pictures are the original reconstructed images (image size is 1,024 by 1,024 pixels), and the middle three pictures (image size is 256 by 256 pixels) are the enlarged crack section of the original reconstructed images, which can help us to compare image quality more clearly. Comparison between the reconstructed images by the SL filter and the RL filter shows that the former one is slightly better and has less noise, but the image by the Butterworth filter has the best quality and shows a significant reduction in noise. Referring to the characteristic curves of the three filters shown in Figure 7, the Butterworth filter suppresses high-frequency contents preferentially. Because most of the quantum noise in the measured projection is high frequency in nature, noise reduction is achieved by the Butterworth filter.
In Figure 8, the bottom three pictures are the gray-value profiles; each picture is the gray-value profile along the middle column of each enlarged reconstructed image. Because the background of each reconstructed image is constant and the gray value should be zero, we see that the Butterworth filtering produces the best results because intensity variations are smooth and the gray values in the background are closer to zero. The maximum gray value in the right profile is above 200 (by Butterworth filter), while the maximum gray value is below 200 in the former two profiles (by RL and SL filters). That is the reason the sapwood in the reconstructed image by Butterworth is much brighter than the former two reconstructed images by RL and SL filters. Additionally, the sapwood has a higher moisture content than the heartwood, so it appears brighter in the right CT image, and the density contrast between sapwood and heartwood is enhanced by means of the Butterworth filter.
Butterworth parameters' determination
The Butterworth filter is adopted because of its wide range of frequency and adjustability of frequency parameters, and the shape of a Butterworth filter curve is determined by its frequency parameter ωc and the filter order N. Several groups of Butterworth filter parameters were chosen, and their effects on reconstructed image quality were evaluated. Here, Log No. 2 was reconstructed by Butterworth filter function under different filter parameters. Figure 9 shows the frequency characteristic curves of the Butterworth filter under various parameters. Figure 10 shows the reconstructed images of the log cross section using the Butterworth filter under various parameters.
Figure 10a refers to the filter curve shown in Figure 9a. Under the condition that ωc = 0.05 and N = 4, the filter frequency curve is too sharp, and the loss of the high-frequency component leads to an image blurring effect (left image). Under the condition that ωc = 0.3 and N = 4, the filter curve is smooth, but the high-frequency section is too high; the reconstructed image has a clear edge, but it is not smooth and too noisy (right image). When ωc = 0.1 and N = 4, the filter curve rises smoothly, and the high frequency approaches zero; the reconstructed image has sharp details such as clear annual rings, outer edge, and cracks, while the high-frequency noise is suppressed (middle image). Figure 10b refers to the filter curve shown in Figure 9b, and the similar analytical method is applied. The Butterworth filter with lower order causes image noise (left image), while higher order causes an image partial blurring effect (right image). Therefore, the Butterworth filter with the fourth filter order and the cutoff frequency ωc = 0.1 is the best, providing clear internal structures with low noise.
In general, we can conclude that the reconstructed image quality is closely related with the shape of the Butterworth filter's characteristic curve, which is determined by the two parameters. In addition, if the proper frequency parameter and filter order are chosen, it is possible to eliminate the high-frequency noise and modify the noise characteristics of reconstructed images, simultaneously achieving a desired compromise between spatial resolution and image noise. For example, the fine details such as wood edge, annual rings, internal cracks, and knots can be enhanced, while the image noise and blurring effect can be suppressed.
Conclusions
In this article, a wood CT imaging system was developed, and an improved FBP algorithm specialized for wood cross section CT image reconstruction was proposed. The system could be used for log scanning as well as lumber or plywood scanning, providing economical equipment support for nondestructive wood testing.
Wood was scanned by an X-ray source, and the penetrated X-ray intensity data were captured by an X-ray detector. The detector's projection data were preprocessed prior to image reconstruction. The preprocessed results showed that detector inconsistence was corrected, scanning data were well distributed, and defective channels data were compensated for.
The FBP algorithm was described, and the Butterworth filter was designed to deal with image blurring problems when projection data were noisy. A piece of the cylindrical log's cross section was reconstructed by FBP algorithm using RL, SL, and Butterworth filters; the results illustrated that the reconstructed image by Butterworth filter had the best quality and achieved a desired compromise between spatial resolution and image noise. The frequency parameter and filter order of the Butterworth filter were determined, and a piece of a small diameter log's cross section was reconstructed by the Butterworth filter under various filter parameters. The results revealed that the Butterworth filter with fourth filter order and cutoff frequency ωc = 0.1 is the best, providing clear internal structures with low noise.
The proposed algorithm was adopted to reconstruct wood cross-sectional images from the X-ray projections. Two pieces of cylindrical log and a block of laminated timber were scanned and reconstructed, and the reconstructed images clearly revealed the wood cross section's outer edge and internal structures such as pith, cracks, knots, and growth rings. In the wood science field, the reconstructed image quality of our system could meet researchers' requirements for detecting wood internal structures. In wood industrial settings, our system can provide exact internal defect information for both logs and lumber, which could help wood producers accurately grade lumber, enabling them to more closely estimate lumber value.
Contributor Notes
The authors are, respectively, Research Assistant, Professor, Research Assistant, and Graduate Student, Research Inst. of Wood Industry, Chinese Academy of Forestry, Beijing, China (qyh@caf.ac.cn [corresponding author], zhouyc@caf.ac.cn, ellipisis@qq.com, 158267486@qq.com). This paper was received for publication in April 2017. Article no. 17‐00029.