X-ray computed tomography (CT) scanning of sawmill logs is associated with costly and complex machines. An alternative scanning solution was developed, but its data have not been evaluated regarding detection of internal features. In this exploratory study, a knot detection algorithm was applied to images of four logs to evaluate its performance in terms of knot position and size. The results were a detection rate of 67 percent, accurate position, and inaccurate size. Although the sample size was small, it was concluded that automatic knot detection in coarse resolution CT images of softwoods is feasible, albeit for knots of sufficient size.Abstract
X-ray computed tomography (CT) scanning is becoming a reality in sawmills. The scanner presented by Giudiceandrea et al. (2011) is based on medical applications, and produces images of high resolution at a high cost. However, alternatives are being developed, such as the cone-beam scanner described by An and Schajer (2014a, 2014b). They utilized a priori knowledge of log geometry to simplify both the scanning and subsequent reconstruction process.
To utilize such a scanner in a sawmill application, it is necessary to find internal features of logs in the CT data. One of the most important features influencing both visual appearance as well as strength and stiffness is knots. Since their frequency, size, and position have a large impact on board quality, these need to be evaluated if detected knots are to be used for process control in sawmills.
The objective was to apply the knot detection algorithm from Johansson et al. (2013) to reconstructed CT data from the coarse-resolution cone-beam scanner developed by An and Schajer (2014a, 2014b), and to compare the results of knot detection to manual reference measurements. It was thus possible to assess whether or not the resolution of these X-ray images was sufficient to find knots.
Materials and Methods
Sampling of logs
Four logs were used in this study, one western redcedar (Thuja plicata Donn ex D. Don), one white spruce (Picea glauca (Moench) Voss), and two Douglas-fir (Pseudotsuga menziesii (Mirb.) Franco) logs (Table 1). They were sampled from a log yard in British Columbia, Canada. No information is available regarding their origin.
Scanning
The logs were scanned using the lab-built scanner described in An and Schajer (2014b), where an object is illuminated by a cone-beam X-ray source and the X-rays are detected by a matrix of detectors. During sampling, the object is rotated to make measurements from different angles. The distance from the X-ray source to the detector was 1.1 m, with the center of the field of view located 0.52 m from the source. The detector matrix size was 0.41 by 0.41 m. The scans were done using a voltage of 140 kVp and a 5-mA current.
Reconstruction
The X-ray data were used for reconstruction of log density images using the method described by An and Schajer (2014a). This resulted in stacks of CT images. The data were separated in two sets, each with a slightly different resolution (Table 1). A bit depth of eight was used for all images, and the image size was 146 by 146 pixels in each cross-section. Figure 1 shows a cross-section image for each log.
Knot detection algorithm
A knot detection algorithm developed by Johansson et al. (2013) was applied to the CT stacks. Prerequisites were a detected pith position, an outer shape border, and a sapwood–heartwood border. Pith detection was done using Hough transforms as described by Longuetaud et al. (2004). Sapwood–heartwood and outer shape borders were found using the algorithm described by Longuetaud et al. (2007) and included modifications from Baumgartner et al. (2010).
The parameters used in this study were originally set to achieve a high detection rate and low amount of false detections in Scots pine (Pinus sylvestris L.) and Norway spruce (Picea abies L. Karst) logs (Johansson et al. 2013). Only the proportional shrinkage of knots, to account for diameter overestimation, was reduced from 20 to 10 percent because it resulted in a better-predicted knot diameter.
Reference measurements of knots
Reference measurements were made manually in the CT images to enable validation of knot geometry. These were done in the same manner as in Johansson et al. (2013) for both occluded and nonoccluded knots. Overall, 57 knots were measured, 23 in white spruce, 12 in Douglas-fir 1, 11 in western redcedar, and 11 in Douglas-fir 2. All visible knots were measured apart for small high-density objects that could not be identified as knots due to the low resolution. These objects were not measured, to avoid the risk of falsely measuring an object as a knot. For comparison, the manual measurements were parameterized using the same model as the automatically measured knots.
Results and Discussion
Overall, 67 percent of the manually marked knots were found by the algorithm. The lowest detection rate was 33 percent (Douglas-fir 1) and the highest, 100 percent (western redcedar and Douglas-fir 2); white spruce had a detection rate of 52 percent. The low detection rate in the white spruce log was mainly due to small internodal knots, which are difficult to detect due to their small size and the low resolution of the X-ray images (Fig. 2). The Douglas-fir 1 log also had small knots compared to the western redcedar and Douglas-fir 2 logs, indicating that knot size could influence detection rate. The data included only four logs, which means this study was exploratory. The knot detection rates differed between species nonetheless. The low specific gravity of western redcedar (0.34) compared to that of white spruce (0.40) and Douglas-fir (0.51) could explain why the knot detection rate of the former wood species was higher (Williams et al. 1998). Moreover, the white spruce and western redcedar logs were partially dried, something known to affect the sapwood–heartwood border detection in white spruce (Fredriksson et al. 2017).
The detection accuracy of knot diameter, position, and endpoint is presented in Table 2. A negative mean error means that the algorithm underestimates the knot feature, and vice versa. Diameter detection accuracy was slightly worse than in Johansson et al. (2013), especially in terms of the mean error. This measure was negative overall, indicating the diameter was underestimated. The standard deviation and the root mean square error of the diameter measurements were worse than in Johansson et al. (2013). This could be due to the different species, but this material is much too limited to conclude anything in that direction. If more data were available, separate parameter setups for different species could be used.
The height position detection accuracy was slightly better than that of Johansson et al. (2013). The improved performance could be due to the higher longitudinal resolution of the current data (4 vs. 10 mm per slice). For rotational position, the results were slightly worse than in Johansson et al. (2013). This could be due to the coarser cross-section resolution of the current data.
For the knot end, the algorithm performed better in this study than in Johansson et al. (2013). In addition, our logs were of a rather small diameter, which means that the knot end error in millimeters will be smaller even if the relative error is the same. In Johansson et al. (2013), the log top diameter ranged up to 332 mm compared to our maximum of 150 mm.
Conclusions
For this limited data from a coarse-resolution CT scanner, it was possible to find the knots' positions in the logs; however, the knot size was not well detected compared to the results obtained by Johansson et al. (2013). Small knots were difficult to find due to the coarse image resolution. Future work involves scanning more logs to get more data. If images of varying resolution could be tested, it could be possible to find the resolution needed for accurate knot detection in terms of both position and size.