Cracks in softwood are an important defect that reduces the quality of sawn timber for construction purposes. As with all other quality reducing features in wood, it is of significant interest to know about their number and position in a log before sawing. On one hand, cracks are relatively easy to distinguish from wood by means of computer tomographic (CT) scanning owing to the large differences in density. The fact that they tend to be irregular and very thin, however, complicates detection. This study describes a method for automated crack detection in single CT slices and evaluates its precision in terms of both detection rate and length measurement. Twenty tree discs were sampled from spruce (Picea abies) and silver fir (Abies alba) logs and scanned with a computer tomograph. The results of the automated detection are compared with data from manual reference measurements on the physical discs and with data from visual inspection of the CT images. Under optimal conditions, the detection rate is 84 percent. The average underestimation of crack length is 18 mm for heart checks and 15 mm for radial checks. There is no sharp threshold of crack width that limits the detection. The overall precision of this crack detection method can be seen as sufficient for practical purposes, when the standard errors in length measurement are considered.Abstract
Cracks, splits, and checks are important internal features of roundwood because they are considered to be defects that seriously affect raw wood quality (Glos et al. 2003, Anonymous 2008, Wehrhausen et al. 2012). Because splits and checks affect both visual appearance and mechanical strength, the consequences for sawn timber production are a reduction in yield and limitation in potential use. Thus, nondestructive evaluation of the roundwood to identify internal features prior to primary breakdown in a saw line would be beneficial. There are several nondestructive testing technologies available to internally evaluate wood based on acoustics (Bucur 2006, Wang et al. 2007), stress waves (Wang et al. 2004), microwave, radar, nuclear magnetic resonance (Bucur 2003), and X-ray (Grundberg et al. 1990; Andreu and Rinnhofer 2003; Oja et al. 2003, 2004). X-ray–based computer tomography (CT) applied to roundwood is a technology that allows high-resolution three-dimensional assessment of a log's internal features (Grundberg et al. 1990, Lindgren et al. 1992, Andreu and Rinnhofer 2003, Wei et al. 2011). Given the density contrasts between wood structures, the internal features of a log, such as sapwood and heartwood content, knots, ring structure, or rot, can be analyzed. The same physical basis of density contrast can be applied to detect and measure internal cracks by CT imagery. Owing to the density contrast between wood and air in internal cavities such as cracks, the cracks will be visible depending on the spatial resolution of a CT reconstruction.
For an industrial application, however, the detection and measurement of position and size have to be automated and on-line. There are a few approaches for detecting radially oriented cracks in the center of logs by means of CT scanning technology. Bhandarkar et al. (2005) developed a method for detecting cracks by exploiting the ring structure in the cross section of a tree. They used a set of directional Sobel-like filters to find annual rings and diagonal lines (e.g., cracks). The detection is based on the fact that cracks are orthogonal to the ring structure. The intersection pixels of these lines are identified and fitted with lines. In hardwoods, detection rates of above 90 percent (compared with what was visible in the slice image) are achieved with this method. Andreu and Rinnhofer (2003) used 12 different directional filters, which depend on previous pith detection. This way, all nonradial wood defects are suppressed. The segmentation is done by adaptive thresholding. Andreu and Rinnhofer (2003) used the information for crack modeling with Delaunay triangulations and were able to create a three-dimensional model of cracks inside a log. The approach used by Sarigul et al. (2000) describes the postprocessing of images that are already segmented into binary information. The binary images are the output of processing with an artificial neural network that uses local neighborhoods of CT density values to assign labels to each pixel in the image. Split regions are postprocessed, principally through the use of morphological operations, to reduce crack pixels to a continuous line. Brdicko (2009) describes a method for the detection and measurement of radial checks on the outer surface of pine logs that were killed by the mountain pine beetle. He concludes that with a six-view X-ray scanner it is possible to detect and characterize larger checks and to use the information for a value-based optimization of lumber recovery.
The approach presented here also uses directional filtering methods and multiple thresholding for the segmentation of cracks. The main focus is on a method for crack detection that is evaluated by using manually measured reference points.
Because cracks are air-filled space surrounded by solid wood, they generally appear in CT images with high contrast. With the scanner that was used for this study, the spatial image resolution in a slice of the cross section was 1.1 by 1.1 mm. Cracks with a large opening width are characterized by pixels with very low gray values and appear bold and clear in the images. Cracks smaller than 1.1 mm still appear in the images because the neighboring pixels in the environment of a crack are still influenced by its presence. As the opening width of a crack approaches zero, the influence on the gray value of neighboring pixels becomes so small that there is only a weak contrast to the surrounding area.
As a result, there are differences between the length and width of the cracks visible in the CT image and the physical cracks on the wood that was scanned. If an automated algorithm for crack detection is used, there will be an additional difference between what was detected and what is visible on the image (i.e., what is detectable by the human eye).
The purpose of this study was to evaluate the precision of crack detection by CT image processing. The idea was to sample objects where the detection could be evaluated by comparison with manual reference measurements. Tree discs scanned in the radial-tangential plane are ideal for this purpose. Although cracks are a three-dimensional feature in wood, this study only took into account their two-dimensional extension in the radial-tangential plane. The direct comparison of data from both CT scan and manual measurements requires a predefined slice, which is crosscut prior to measurement. An evaluation of the precision in all three dimensions would require sawing the sample after scanning. But sawing the stem in a longitudinal direction would release tensions and thus change the feature to be measured.
Methods
Description of sampled tree discs
For this study, 20 tree discs from five spruce (Picea abies (L.) Karst.) and five silver fir (Abies alba Mill.) logs were sampled. The 10 logs had a middle diameter of 47 (minimum), 52 (mean), and 58 (maximum) cm (under bark) and a length of 5 m. The trees originated from the Central Black Forest and were selected from the incoming stock at the log yard of a local sawmill. This offered the possibility of selecting specimens with predefined crack features from a large number of procured logs. The sample was selected so that all typical shapes of heart checks (I-, Y- and X-shaped cracks) and also ring shakes were included. The logs were debarked at the sawmill before their transport to the CT site at Forstliche Versuchs- und Forschungsanstalt (FVA) Baden-Württemberg.
The angle of the end surface relative to the stem axis was corrected to exactly 90 degrees by cutting off a thin slice from each end using a chainsaw. Discs with a thickness of 10 cm were then cut from both ends of each log. The inner surfaces of the discs, those closer to the midpoint of the log, were used for the measurements. To allow for precise measurements on a clean and smooth surface, the surfaces were sanded with 100 grade sandpaper.
We used discs rather than whole stems for two reasons: manual reference measurements are easier to perform and more precise when carried out on a disc that can be fixed on a measuring table. Longitudinal tensions along the sapwood of a tree trunk are responsible for the widening of cracks when the trunk is crosscut. By cutting discs with a short length, longitudinal tensions were minimized. Drastic changes in temperature or moisture content of the ambient air can cause further opening of cracks. To avoid any changes to the measured features, the discs were kept in a constant climate, and both measurements were carried out in immediate succession. Extreme care was also taken during the handling of the discs to avoid unnecessary shocks.
CT measurement
The discs were scanned using a Microtec CT.log computer tomograph. The scans were run with a voltage of 180 kV, a current of 14 mA, and numbered 900 views per rotation at a feed rate of 1.3 mm/s. The reconstructed pictures have a resolution of 768 by 768 pixels, while one pixel represents a volume element with a square cross section of 1.1 by 1.1 mm in the slice plane. The discs were held in place in an upright position with a wooden support during the scan.
For analysis we used the first complete slice image closest to the plane where the reference measurements were made. This slice does not always hit exactly the same plane that was measured manually, because the thickness of each slice is about 5 mm. In some cases, this might result in a systematic error: the radially oriented cracks follow the grain angle of the wood as they expand along the z-direction. Some of the automatically measured cracks have an offset of some degrees of rotation around the pith compared with the manually measured cracks. There are cases where such a crack was detected and measured, but the two outlines shown in the result image do not match. In this case, the crack is counted as correctly detected. For very small cracks, where they are closing in the longitudinal direction, this offset could result in some missed cracks, false detections, and length errors.
Reference measurements
The manually measured reference data are compared with the information generated by the algorithm in order to estimate the precision of both the CT measurement and the image processing. First, the detection rate of cracks is evaluated. Of further interest is the precision to which the length of a crack can be determined and to which minimum width a crack can be detected. Crack length is defined for radial cracks (those that do not start from the pith) as the distance between both tips. For heart checks (which do originate from the pith), it is the distance between the tip and the pith. The width is defined as the open space between two separated wood faces in the tangential direction. These values were measured at premarked control points on the disc for a later comparison with the algorithm-derived values. The points are needed on both ends of a crack to measure the length and along the crack for measuring the width. Their point positions are recorded using a method that allows for a later relocation in the CT images. Because cracks mostly initiate from the pith and extend in a radial direction or, in the case of ring shakes, follow a circle around the pith, a polar coordinate system is ideal for defining the positions of control points. The pith was used as the origin of the coordinate system. The direction of the polar axis was set using a check mark on the edge of the disc (a small saw kerf), which was also visible in the CT image. With the identification of these two orientation points in the CT image, the pith and the check mark, it was possible to define the orientation of the disc in the image relative to the polar coordinate system used for the manual measurements. The coordinates of the control points were afterward transformed into the Cartesian system of the image, which uses the width of a pixel as the unit for length.
The measurements were carried out immediately after the CT scan since cracks can change over time. The manual measurements were carried out using a digital caliper for the width and a navigation ruler for the angle and the radius of the points. For the points along the radial cracks, fixed distances were used in steps of 18.52-mm radius (which was set to this value owing to the scale of the navigation ruler). For the ring shakes, points were set to discrete angles in steps of 20 degrees. The grids for measuring the control points are shown in Figure 1.
In this study, three different types of cracks were distinguished. Radial checks are, as the name implies, oriented radially in the cross section. In this case, radial cracks are defined as all cracks that follow this direction, but do not have a connection to the pith. Radial cracks have two tips. Those cracks that have a connection to the pith are defined as heart cracks; they have a root at the pith and a tip. The third category is ring shakes. They are oriented tangential to and follow the structure of the annual rings. They can have either two tips or none in the case of a full circle.
Algorithm used for check detection
Checks were identified on each reference CT slice using the following image processing algorithm:
-
The XY pith location was manually entered for each slice of interest.
-
Using the pith location as the center, directional blurring filters were applied to smooth out growth rings and other angular features.
-
A threshold with a localized background was performed to ensure comparison of foreground pixels to a background of similar age and year ring location.
-
A small morphology kernel was passed over the image to join fragmented checks, and the binary images were labeled through connected component analysis.
-
For each reference measurement point on the disc, the Euclidian distance to the closest automatically detected check region was calculated.
Results and Discussion
Image quality
The quality of the reconstructed image from a CT scan plays an important role in the detection of quality features in the image. Factors that can limit the image resolution and increase the noise present in an image are the dimension of the log and the water content. In the case of silver fir, both factors can become quite problematic. A known phenomenon that exists in silver fir is the development of wetwood (Schütt 1981). This is a phenomenon well known to the Abies genus. Wetwood is characterized by an accumulation of free water in the heartwood of the stem that can be found mainly in trees with larger diameters. Because both water and a large diameter affect the signal intensity at the sensor when scanning the tree in a CT, the image quality is drastically reduced (see example in Fig. 2). In turn, the reduced image quality complicates automatic image processing algorithms for crack detection. The large diameter logs that are affected are often precisely those logs that also contain large cracks, and are therefore important candidates for automatic crack detection prior to sawing. In the case of this study, the images of two discs are of such low quality that it was not possible to reliably detect cracks or any other quality features automatically. Rather than a limitation of the software algorithm, this problem lies in the CT scanning hardware and could possibly be solved by using different scanner settings or a more powerful X-ray source.
Detection rate for cracks
The detection rate of the automatic check detection algorithm can be measured in two different ways: either by counting whole cracks as recognized or not, or by checking the detection at each of the control points. The first approach gives a good overview about which cracks are likely to be detected (Fig. 3). The second approach allows for a more detailed view on the detection rate and also takes into account the size of each single crack (the longer the crack, the more reference points were set in a constant interval).
Ring shakes are not detected with this algorithm. One reason is that the algorithm is using only directional filters in radial directions and none in tangential directions. Even if filters with a tangential direction were used, it would be extremely difficult to separate ring shakes from the structure of annual rings. With the exception of one ring shake with an extremely large width, they are very difficult to visually find in the images.
In addition to the clearly recognized cracks, other features in the images were spuriously identified as cracks. There are three discs with a high number of false positives. Two of them have a very low image quality, and in the third image quality is reduced (e.g., the quality is good enough for detection of cracks, but with noticeably coarser resolution). The amount of false detects is acceptable in the 17 other images. Most of the spurious elements are small and short in length, so they could be separated from cracks by referring to their length.
Table 1 shows the number of crack features found on each tree disc by visual inspection of the physical surface, by visual inspection of the image, and by automated detection. For three silver fir discs, the CT scanning resulted in a considerably lower image quality than for all other discs. The sums of the number of cracks for silver fir and for the overall total are also calculated excluding these three discs. To include them would be misleading in the evaluation of the detection algorithm performance because the source of error is located at an earlier point. Table 2 shows the number of detected features for three types of cracks. It is necessary to distinguish between these three types when the automated detection is evaluated. Radial checks as defined here do have two tips, where the crack width approaches zero. Heart checks originate from the pith and have only one tip. In the typical case, when there are multiple heart checks in a slice, they each share a common point at the pith. These points are not detected by the algorithm for each individual heart check because it is unclear to which check the measurements would belong. The pith can be detected using known methods (Andreu and Rinnhofer 2003, Longuetaud et al. 2004) and by definition is known to be the starting point of all heart checks.
There were more heart checks detected than radial checks. Of the 46 heart checks, 32 were detected, of which 2 had gaps. Seven of the 14 undetected cracks could not be found as a result of low image quality, so only four cracks count as not detected in terms of the algorithm performance. Of the 38 radial checks, only 19 could be detected; also, 10 of the 19 cracks not detected were in images of very low quality and not visible by eye. Of the 95 total cracks, 30 had an angle error.
In this case, only the crack regions were classified as such and not the surrounding regions in the images. As a result we cannot calculate a value for the accuracy of a detection of noncrack areas in the images.
Table 3 gives the detection rates in percentages for both CT imaging and image processing in a row as well as for image processing only. If the number of correct detects for both tree species is compared with the total number of detected features in all images, the rate only amounts to 34 percent. If those discs that did not have a sufficient resolution for an analysis by the automated algorithm are taken out of the sample, it amounts to 63 percent. When only evaluating the image analysis, the corresponding figures increase to 38 and 76 percent. When the false detects are known to the person using the data and images with low quality are excluded, the detection rate is 84 percent for the algorithm and 69 percent for the entire chain including scanning.
The accuracy of feature detection in images can also be described, as is common in classification in maps (Congalton and Green 1999). The “producer's accuracy” describes how many items of a feature in the reference data were correctly identified in the CT image. It ignores the false-positive detects because these are known as incorrect to the producer. In our case, this reflects on the knowledge of the features in the reference discs. The producer's accuracy is calculated by dividing the number of correctly detected features by the number of present features. The user of a processed image does not have any information about false-positive detects, so the user's accuracy needs to describe how many items were correctly classified as cracks in comparison with the total number of identified items in the classified image. The user's accuracy is calculated by dividing the number of correctly detected features by the total number of detected features.
Precision in crack length detection
The precision in crack length detection was evaluated for the tips of radial checks and heart checks. Because there were not any ring shakes detected, they are not considered. The number of cracks used for this analysis is 43.
The algorithm calculates a distance to the closest detect for every reference point on the disc. Normally this closest detect belongs to the same crack as the reference point. Because there are false-positive detections in some of the images, it is possible that a closest detect is a false positive. There is also the possibility that the closest detect is situated on a neighboring crack. These sources of error were excluded by a visual control of all 47 points in the images.
On average, heart checks were measured 18.1 mm short with the algorithm (Table 4). The minimum deviation is 1.6 mm and the maximum 54.2 mm. For radial checks, the average underestimation is only 14.8 mm. In relation to the total length of the cracks, heart checks are underestimated by 18 percent and radial checks by 13 percent.
All of the measured cracks are systematically underestimated in length. When aiming at practical applications of the crack length measurement, it is appropriate to look for a value that can be added to the measured length in order to approximate the true length. If the standard deviation of the absolute values is added, it would result in a simple right shift of the crack length distribution. When the standard deviation of the relative underestimation is added to each crack, the result is as shown in Figure 4. Thirteen cracks are overestimated by 5 mm, and six cracks are overestimated by more than 5 mm, while the number of cracks with an underestimation larger than 5 mm is reduced.
When combining the results of crack length measurement and the manual measurements of the crack width at the reference points, it is possible to calculate the width below which the end of a crack cannot be detected. The above-mentioned distance to closest detect gives the distance between the manually measured tip and the algorithm measured tip. Also, the distance between the last two manually measured points is known. With this knowledge, the width can be interpolated between the last midpoint and the tip (where the width is 0) with a simple linear model. Figure 5 shows a crack with the detected crack area, the reference crack area, and the last reference point on the detected crack where the crack was measured manually.
For the CT scan settings of 1,200 views and the reconstruction settings given, the width of a crack to which detection was possible is between 0.05 and 0.81 mm for fresh large diameter discs with a diameter ranging from 44 to 64 cm. The average for 40 cracks is 0.32 mm. Brdicko (2009) used a six-view, fixed-head X-ray scanner and found a minimum width to which the cracks were visible in the image of 0.5 inch (1.27 cm) for completely dry logs with a diameter of 18 inches (46 cm). This value is for manual inspection, however, and not an automated algorithm. As the data above show, there can be a significant difference between what is visible in an image and what can be found using automated methods. The histogram in Figure 6 shows that it is not possible to identify a sharp threshold below which detection is not possible any more. It seems that, besides the minimum width of a crack, other factors are also important. The variation of gray values in the direct surroundings of a crack and the presence of other features strongly influence the result of detection.
Conclusions
The developed algorithm works well with all radially oriented checks if the image quality is good enough and there are not too many other radially oriented structure elements in the slice. It is not possible to detect ring shakes with this algorithm. However, there is not much chance of detecting ring shakes automatically because their structure is similar to that of annual rings. There is a need for further research into the possibility of detecting ring shakes beyond the applied procedures used in the algorithms presented.
The rate of error for radial checks is low when the logs have a medium diameter and moderate water content. In this case, the algorithm delivers a clear classification with a low rate of false detections. On images of discs with large dimensions, or discs of fir with wet core, the rate of errors increases or detection becomes impossible. This method faces problems, especially in those cases where it could deliver the highest benefits in terms of information retrieval before sawing operations. In order to reduce the number of false positives in the images, further processing should be developed.
The crack length can be determined with a precision that appears to be sufficient for sawing. The standard deviation of the difference between electronically measured and true length should be considered and added to the estimated length of a crack.
There is no sharp threshold of crack width below which detection is not possible. This was one of the assumptions this study was based on. Even though most of the cracks are narrower than the pixel resolution of the reconstruction, the pixel neighborhood is influenced by the presence of a crack. Further investigations into how the output in a CT image generally behaves with a varying air gap in wooden material will be carried out.
Contributor Notes
The authors are, respectively, Scientist, Scientist, Senior Scientist, and Head of Department, Forstliche Versuchs- und Forschungsanstalt Baden-Württemberg (FVA), Abteilung Waldnutzung, Freiburg, Germany (martin.wehrhausen@gmx.de, norvin.laudon@forst.bwl.de, franka.bruechert@forst.bwl.de [corresponding author], udo.sauter@forst.bwl.de). This paper was received for publication in July 2012. Article no. 12‐00079.