Keywords

2.1 Introduction

Wood is a highly variable natural material that requires an individual decision for each wood piece to identify the most advantageous processing method. In this way the most appropriate and highest value products can be produced from the available raw material. At present, log inspection is based on visual observation of surface defects and optical measurement of external features [1]. The logs are then cut according to their observed characteristics. However, many quality-controlling features are not visible on the surface, causing the resulting cutting to be far from optimal. Studies indicate that only half of inspected logs are classified correctly by a human inspector [2]. Consequently, many logs are placed at the wrong breakdown position, dramatically reducing the amount of high-value products obtained [3, 4]. It is estimated that the value of sawn timber could increase by 7–15 % if the internal defects in logs were accurately known [5, 6]. This is a massive value increase and urgently points to the need for an effective log scanning tool.

Computed Tomography (CT) is powerful technique to create 2-dimensional cross-sectional views of an object from multiple 1-dimensional X-ray measurements called “projections”. These 2-D views reveal the internal features within the object. Traditionally, CT has mainly been used as a medical diagnostic tool, but now is increasingly applied in industry. There is a growing interest in using the CT technique to assess log quality in sawmills, both on the measurement side [6, 7] and on the data analysis side [811]. CT is a powerful tool to identify quality-defining features such as knots, heartwood/sapwood extent, rot and splits, and it provides rich information to guide subsequent manufacturing of high-value products.

CT scanning systems applied to log-scanning applications are modeled on medical designs and have very high spatial and density resolution. Consequently, the equipment is complex, requires high-precision motions of sensors and specimen, and is very costly. In addition, the associated CT reconstruction is very computationally intensive. It requires massive data collection, processing and data analysis to identify features of interest within the CT images. These requirements do not fit well within a sawmill environment where the needs are for straightforward operation, tolerance of inaccurate motions, and moderate affordability. The logs must be scanned, analyzed and have sawing decisions made in real-time, often just 5–10 s per log. To address the challenges in applying CT technology to log scanning, a novel coarse-resolution cone-beam CT system has been designed and prototyped here. The proposed system uses straightforward and modest cost equipment, and uses advance (“a-priori”) knowledge of the specific geometry of saw logs to reduce dramatically the quantity and quality of data required, the required precision of the relative motion of the X-ray sensors and measured logs, and the scale of the CT image reconstruction computation. To accommodate the relative motion challenge, an Eulerian approach is taken whereby the CT reconstruction is based on the moving log rather than on the fixed space traversed by it. This paper is the first of a two-part series. It introduces the proposed cone-beam log scanning concept, the geometric log models, the associated algorithms and computation procedures.

2.2 Conventional CT Versus Cone-Beam Coarse-Resolution CT

Conventional CT scanning functions by making X-ray measurements from multiple directions and mathematically combining them to generate a 3-dimensional model of the scanned object [12]. Figure 2.1a, b respectively show a typical medical-style third generation fan-beam CT scanner and a typical cone-beam CT scanner. For both scanning geometries, the object of the measurement, commonly a patient in a hospital but here a log, stays at the center and an X-ray source and a line or area detector rotates around the outside to gather the multi-directional series of radiographs required for the CT reconstruction. These designs both require that the X-ray source and detector accurately rotate around the measured object so as to maintain accurate spatial registration among the radiographs measured from the various directions. The single-slice CT arrangement using a line-detector shown in Fig. 2.1a has to scan each cross-section individually and thus operates relatively slowly. It also uses only a small area-fraction of the emitted X-rays, and so forces the use of a much higher X-ray flux than required solely for the detectors. Use of an area detector such as in Fig. 2.1b with a cone-beam X-ray source allows a large volume of an object to be measured simultaneously while gaining data from a much greater fraction of the available X-rays. However, such systems are complex both in construction and in mathematical processing of the X-ray measurement. In addition, commercial cone-beam detectors rarely are larger than 12″ (30 cm) across [12], and thus are not sufficient in size for saw-log scanning. The low end of the range for saw-logs is 10–18″ (25–45 cm), so allowing for the cone angle and some free space at the edges, a minimum detector size of 24″ (60 cm) across is required.

Fig. 2.1
figure 00021

CT scanning geometry: (a) third generation single-slice CT, (b) cone-beam CT

2.3 Cone-Beam Log Scanning Concept

Log CT scanning can be a much more tolerant process than medical CT scanning. Logs are inanimate, so they can be moved and maneuvered conveniently. The features of interest (knots, heartwood/sapwood boundary, rot and holes) are fairly large, mostly in the centimeter range, so that they can be identified using measurements with relatively coarse spatial resolution. Very significantly, logs have specific geometry, which is known in advance (“a-priori”). If used effectively, knowledge of that geometry can greatly simplify and stabilize the CT reconstruction. In addition, the circular symmetry of logs allows easy compensations for lateral rigid-body motions of the logs as they pass through the scanner. This is a very important feature because the handling of the rough logs in sawmills cannot be done with the high precision that is required when doing conventional medical style CT scanning. The practical saw-log CT scanning system described here incorporates these features.

Figure 2.2 shows a schematic of the proposed log CT scanner. The scanner uses a cone-beam collimated X-ray source, a lab-made large area X-ray detector and a log transport and rotation mechanism. The log to be inspected is rotated within the cone-shape illumination space between the X-ray source and detector. During log rotation, X-ray images are taken at a series of incremental angles, from which the log cross-sections within the illumination cone are reconstructed. The arrangement in Fig. 2.2 has two key features: the log rotation mechanism and the large area detector. The log rotation mechanism allows the use of a stationary source and detector, which avoids the difficulty of generating high speed, complex and meticulously controlled rotation of X-ray source and detector needed in medical style equipment. This greatly simplifies the required scanner hardware and makes the design much more practical and robust. The large-area detector dramatically increases the scanned volume, and so makes possible the reconstruction of many slices simultaneously, thereby enabling a much higher scanning speed. Mechanical details of the proposed log CT scanner hardware design and construction will be described in Part II of this paper.

Fig. 2.2
figure 00022

Proposed cone-beam log CT scanning

2.4 Geometry-Based Log Models

The a-priori information provided by knowledge of the specific geometry of logs allows substantial computation economy through the use of geometry-based CT models. For most medical and industrial CT scanners, the typical CT geometry is the square-grid pattern shown in Fig. 2.3d, which divides each cross-section into fine-meshed squares. The material density at each square, called a “voxel”, is determined (“reconstructed”) from the X-ray measurements. This generalized geometry is chosen because it accommodates internal structures of any geometry and maximizes the resolution to identify fine features of interest.

Fig. 2.3
figure 00023

Log geometric CT models: (a) annular model, (b) sector model, (c) combined model, (d) conventional model

In contrast, log scanning doesn’t require very high spatial and density resolution. In particular, logs have specific geometrical shapes: in areas away from knots, they are generally circular with axi-symmetric cross-sectional features and, where present, the knots start from the center and grow approximately in a sector shape through the perimeter. This a-priori information makes possible the use of much simpler feature-specific log cross-section models instead of the commonly used fine-meshed square pattern. Three coarse-resolution, geometry-based CT log models are proposed here. These three geometric models target different internal features. The first model shown in Fig. 2.3a comprises annular regions. This arrangement is suited for the clear wood regions between knots, where heartwood/sapwood, rings and rot tend to be axi-symmetric. The second model shown in Fig. 2.3b comprises sector-shaped regions. This arrangement is suited to the knot regions where the features are sector-shaped. Figure 2.3c shows a combined model, which is suitable when multiple features are present simultaneously. All three log models divide the cross-section into feature-specific regions and tend to guide the resulting cross-sectional reconstructions towards physically realistic solutions. The smaller number of unknown voxels compared with the generic square grid shown in Fig. 2.3d dramatically reduces the quantity of X-ray measurements and the size of the computation.

Two very important features of the geometry-based CT models Fig. 2.3a, b, c are their circular symmetry and their containment of all the voxels within the log boundary. These features enable some pragmatic approximations to be made when processing the measured data to compensate for the lateral rigid-body motions that occur when rough saw-logs are moved within sawmills. This compensation is done by reversing the conventional arrangement where the voxels in Fig. 2.3d are fixed in space and the specimen moves within that space. This arrangement requires very accurate motion of the scanner and specimen. In contrast, the voxels in Fig. 2.3a, b, c are fixed to the log. In the subsequent discussions, it will be shown how this arrangement substantially compensates for lateral rigid-body motions and log non-circularity.

2.5 General CT Computation Description

In each proposed CT model, X-rays fan out from the source, pass through the log and reach the large-area detector. The part of the log within a given X-ray path attenuates the radiation according to the line integral of the density along that path [8]. The relationship between X-ray attenuation and log densities can be expressed using Beer’s Law as Eq. 2.1, where I is the attenuated X-ray intensity, I0 is the unattenuated intensity, ρ(x) is the log density along the path length at position x, and β is the basis weight coefficient [13, 14].

$$ \frac{I}{{{I_0}}} = \exp \left( {-\int {\frac{{\rho (x)dx}}{\beta }} } \right) $$
(2.1)

Equation 2.1 can be linearized by taking logarithms on both sides:

$$ \int {\rho (x)dx=-\beta \ln \left( {\frac{I}{{{I_0}}}} \right)} $$
(2.2)

where the left side of Eq. 2.2 represents the line integral of the material density along the X-ray path. This quantity corresponds to the local basis weight (= density per unit area). After discretization, Eq. 2.2 can be written for the given ray as:

$$ \sum {{g_j}{\rho_j}={d_j}} $$
(2.3)

where gj is a set of discrete lengths corresponding to material densities ρj within a sequence of voxels along the overall ray path. The quantity dj is the basis weight observed for the given ray according to the measured X-ray attenuation. For the combination of all the rays within the X-ray cone, Eq. 2.3 can be generalized as:

$$ \sum {{G_{ij }}{\rho_j}={d_j}} $$
(2.4)

where Gij is a matrix whose entries represent the path length within ray “i” as it passes through voxel “j”. This equation can be expressed in vector–matrix format as:

$$ [G]\{\rho \}=\{d\} $$
(2.5)

where brackets and braces respectively indicate matrix and vector quantities.

2.6 Basis Weight Data Alignment

The cone-beam reconstruction in Eq. 2.5 requires the assembly of data vector {d} from the measured basis weight data. If done with some care, this assembly can mostly eliminate the effects of any lateral rigid-body motions of the log within the X-ray beam. Such motions are very damaging in conventional CT scanning and require very accurate control of the scanner or specimen motion. The use of the geometrical CT models in Fig. 2.3a, b, c allow the effects of lateral rigid-body motions to be accommodated mathematically by adjusting the arrangement of the data vector {d}. The following paragraphs describe the proposed procedure.

2.6.1 Cylindrical Adjustment

For ease of manufacture, the large-area detector used here has a flat detection surface. However, mathematically, it would be more convenient instead to use a curved detection surface in the form of a cylinder whose axis passes through the X-ray source parallel to the longitudinal motion of the log. The measurement points (“pixels”) on the detection surface would then be equally spaced in an angular sense. This gives the detector panel a circular symmetry to complement the circular symmetry of the log model. The log and the detection cylinder have different centers.

Measurements Xi, which are linearly spaced on a flat panel detector, can be mathematically adjusted so that they appear to be angularly spaced θi on an equivalent cylindrical detector. This is a fixed geometrical relationship:

$$ {X_i}=\frac{{{D_{SD }}\tan \left({\theta_i}-\displaystyle\frac{\psi }{2}\right)}}{{\displaystyle\frac{{{W_D}}}{n}}}+\frac{n}{2} $$
(2.6)

where DSD is the distance between source and detector, WD is the detector width, n is the number of detectors within the detector width, and ψ is the X-ray cone illumination angle subtended by the detector width. The corresponding basis weight ba[i] at angular pixel “i” is evaluated from the integral of the linear basis weights b(x) bounded by the given angular pixel

$$ {b_a}[i]=\frac{{\int\nolimits_{{{X_{i-1}}}}^{{{X_i}}} {b(x)dx} }}{{{X_i}-{X_{i-1 }}}} $$
(2.7)

This arrangement is applied column-by-column to all pixels to create the arrangement shown in Fig. 2.4b.

Fig. 2.4
figure 00024

Flat and cylindrical X-ray detectors: (a) axial view, (b) side view

2.6.2 Rigid-Body Motion and Log Ellipticity Correction

The circular symmetry of the cylindrical panel detector shown in Fig. 2.4, together with the log-based CT models in Fig. 2.3, can be exploited to enable corrections of rigid-body motions and non-circular log geometry. For example, consider a small circumferential rigid-body motion of a log relative to the center of the X-ray fan shown in Fig. 2.5a. The effect is to shift the measured radiograph along the arc of the X-ray detector from A-B to A′-B′. The radiograph image seen between A′-B′ is the same as would have been seen between A-B had the rigid-body motion not occurred. Thus, a circumferential rigid-body motion can simply be corrected by shifting the radiograph image between pixels A′-B′ back to the pixels A-B, which for convenience is assumed to be in the center of the cylindrical panel detector.

Fig. 2.5
figure 00025

Measurement re-centering and uniform scaling: (a) circumferential motion, (b) radial motion, (c) ellipticity effect

Similarly, for radial rigid-body motions such as in Fig. 2.5b, the effect of the motion is to expand the radiograph image A-B to A′-B′ (or contract it for an outward radial motion). Thus, a radial rigid-body motion can be corrected by scaling the radiograph image circumferentially between pixels A′-B′ to the pixels A-B, and reciprocally scaling the basis weight data so that the same amount of mass is represented within the resulting scaled radiograph image. This scaling concept can be taken a step further to accommodate logs that are slightly elliptical. The arc length A′-B′ of the radiograph image in Fig. 2.5c caused by a non-constant log diameter can similarly be scaled to fit the arc length A-B. Thus, this shifting and scaling of the radiograph data around the cylindrical measurement surface can substantially eliminate the effects of rigid-body motions and log non-circularity. The adjustment is not perfect because of small angle changes within the X-ray fan, but for modest rigid-body motions and log diameter variations, the process is quite effective.

2.6.3 Geometry Normalization

The data shifting and scaling shown in Fig. 2.5 opens the opportunity to pursue to concept of arranging Eq. 2.5 in a standardized form, where matrix [G] is the same for all sizes and positions of logs. The idea is to shift the radiograph data so that the log appears as if it were in the center of the field, and to scale the data so that the log appears as if it had a “standard” diameter. The actual diameter of the log ultimately needs to be used to scale the material densities computed for the “standard” log to those of the actual log. Examination of the path lengths shown in Fig. 2.3 shows that the diameter of the log relative to the X-ray source to detector distance does have some influence on relative path lengths, beyond just a simple multiplier based on log diameter. However, for the small ray angles that occur when the X-ray source to detector distance is much greater than the log diameter, this effect is modest.

2.6.4 Log Center and Radius Estimation

The ability to do the rigid-body motion and log ellipticity corrections shown in Fig. 2.5 depends on an ability to identify the log position and diameter within the measured radiograph image. Doing this through image edge detection is unreliable because the image edge information depends on just a small number of local pixels. These may be subject to noise, especially if some local irregularity exists at that point on the log, say due to a branch. A more robust approach is to estimate the log diameter from the entire radiograph image. This can be done by assuming that the log is circular and of uniform density (physically not exactly true, but appears to be good computational approximation). The radiograph profile then has a semi-elliptical shape. Its area is proportional to radius × axial height, while its centroidal height is proportional to axial height only. Dividing the area by the centroidal height gives a remarkably robust estimate of the log radius:

$$ r\ =\ {{\mathrm{ D}}_{\mathrm{ SL}}} \sin \left( {\frac{{16\kern0.5em \mathrm{ d}\psi }}{{3{\pi^2}}}\kern0.5em \frac{{{{{\left( {\sum b } \right)}}^2}}}{{\sum {\left( {{b^2}} \right)} }}} \right) $$
(2.8)

where r is the estimated log radius, DS is the distance between X-ray source to log center, b are the basis weight data, dψ is the angular spacing between detectors after cylindrical correction, and i is the angular pixel index. The circumferential position of the centroid of the radiograph gives the log center position:

$$ c=\frac{{\sum {ib} }}{{\sum b }} $$
(2.9)

2.7 Path Length Computation in Cone-Beam CT

Alignment of the data vector {d} provides the right side of Eq. 2.5. The next step towards completing the CT reconstruction is to assemble the path length matrix [G].

2.7.1 Single-Slice Path Length Computation

Figure 2.6 illustrates the single-slice path length computation for the three geometry-based CT models in Fig. 2.3. The sequence of annulus radii in Fig. 2.6a, c is in equal increments of the square root of radius. In this way, the areas of the annuli are equal, thereby approximately equalizing the subsequent computational accuracy of the material densities within the annuli. The matrix [G] in Eq. 2.5 has elements Gij, which represent the path length of ray i as it passes through voxel j. Matrix [G] is sparse, with much fewer than half of the elements having non-zero values. The path lengths within the voxels for the annular and sector models in Fig. 2.6a, b can be computed geometrically. The path lengths in the combined model Fig. 2.7c can be computed by evaluating the path lengths using the sector model in Fig. 2.6b with an “log radius” equal to each of the annulus radii in Fig. 2.6c. The path lengths in Fig. 2.6c are equal to the difference of the path lengths of the inner and outer radius sector model path lengths corresponding to each annulus.

Fig. 2.6
figure 00026

Voxel X-ray path computation: (a) annular model (b) sector model (c) combined model

Fig. 2.7
figure 00027

X-ray paths through the log specimen: (a) perspective view, (b) side view

2.7.2 Multiple-Slice Path Length Computation

The geometry shown in Fig. 2.6 is appropriate for CT measurements within single cross-sectional slices. This single-slice approach is used where X-ray measurements are made use line detectors such as in Fig. 2.1a, and is quite common in medical applications. Here, to make fuller use of the X-ray data, the cone-beam arrangement shown in Fig. 2.1b is used. This arrangement creates no conceptual change to the measurement, and the CT reconstruction Eq. 2.5 still applies. However, the path length matrix becomes considerably larger and more computationally intensive to evaluate.

Figure 2.7 illustrates the geometry of the cone-beam scanning configuration. This cone-beam arrangement is very challenging compared with the single-slice arrangement in Fig. 2.6 because the paths of the inclined rays in Fig. 2.7b pass through multiple adjacent slices. This circumstance couples the calculations between adjacent slices so that they no longer can be reconstructed separately; the voxel densities in all slices must be computed simultaneously. This feature greatly multiplies the size of the matrix Eq. 2.5, but fortunately, with the coarse-resolution models used here, the resulting size is still tractable. The resulting path length matrix is very sparse, and if care is taken to accommodate this feature, significant computational economy can be achieved.

Path length computation for cone-beam model in Fig. 2.7 follows the same concept as the computation for the combined model in Fig. 2.6c. First, the inclination of each ray on the cylindrical detector surface is determined geometrically. Then, the radii at which the ray passes through each slice are determined. The path lengths for combined models of the type in Fig. 2.6 are computed, with the path lengths within each slice evaluated by subtraction of the path lengths in adjacent slices.

Computation of the path length matrix [G] is a computationally intensive process, taking some minutes to complete. However, the process is much simplified by the data alignment process described above because the aligned data are placed symmetrically within the scanner geometry, so only one quarter of the path lengths need be computed, and the others assigned by reflections across the two symmetry axes. In addition, for a practical scanner arrangement where the cone-beam angles are small, the data normalization previously described to form a “standard” log geometry means that the path length matrix need be computed only once, stored, and recalled for use with all subsequent logs. Thus, the computation time of matrix [G] is not an issue for real-time use.

2.8 Density Inverse Computation

The path length computations and X-ray data normalization described above provide [G] and {d} in Eq. 2.5 for a single X-ray measurement, a “projection”. In general, [G] is not square. For a single projection using the single slice arrangement in Fig. 2.6, the number of rows equals the number of pixel measurements within the cylindrical detector, and the number of columns equals the number of voxels within the geometrical model used. For multiple projections, the number of rows is correspondingly multiplied, but the number of columns remains the same. Substantial computational economy can be achieved by arranging the number of projections to correspond to the number of sectors used in Fig. 2.6b, c. That way the path alignments relative to the sector pattern are the same for each projection, just rotated by an integer number of sectors. Thus, the new rows required for the path length matrix [G] can be simply added by rotating the columns from the path lengths computed for the first projection.

For the multiple-slice arrangement shown in Fig. 2.7, path length matrix [G] expands greatly to have a number of columns equal to the total number of voxels in all slices within the log. The number of rows is much larger, equalling the number of pixels within each panel detector image times the number of images used for the measurement. In conventional CT practice, the resulting massive size of [G] requires the use of inverse solution methods such as filtered back-projection. Here, the number of voxels is much smaller because of their feature-specific shapes, and so a direct solution of Eq. 2.5 is feasible. The resulting highly over-determined Eq. 2.5 can be solved in a least-squares sense as:

$$ {[G]^T}[G]\{\rho \}={[G]^T}\{d\} $$
(2.10)

where matrix [G]T[G] is square with row/column size equal to the number of voxels, which is a moderate size number compared with the number of pixels used in all the projections. If care is taken with the sequence of doing the operations [G]T[G], it is possible to form the result without explicitly storing the very large matrix [G]. Actually, it is necessary only to store the part of the matrix for a single projection and then to rotate the columns as required to correspond to the alignment of the subsequent projections. Matrix [G]T[G] is symmetric positive-definite and can be solved efficiently using a Cholesky solver [15].

2.9 Discussion

The use of the feature-specific geometrical models in Fig. 2.3 for CT reconstructions substantially and fundamentally influences the associated CT inversion. On one level, the geometric resemblance of the models to the physical features of the logs being scanned has the effect of guiding the inversion towards physically realistic results. This important feature will be seen in the experimental results shown in Part II of this paper. On a further and deeper level, the proposed approach is very unusual in that the CT inversion is referenced to the log and not to a fixed volume in space, as is done in conventional practice. By analogy to finite element modeling, the proposed approach may be described as “Eulerian”, while the conventional practice is “Lagrangian”. One consequence is that the thrust of the CT calculation is focused entirely on the volume of the scanned log; the three feature-specific models in Fig. 3a, b, c do not contain any of the external voxels seen in Fig. 2.3d. A further consequence is that the CT inversion becomes fairly tolerant to small rigid-body motions of the log relative to the X-ray source and detector. The measured data from the X-ray detector can be shifted and scaled to transform the data to a “standardized” configuration, for which the path length matrix [G] is predetermined. This scaling is not perfect because change in log diameter changes the angles within the scanned volume in a slightly non-linear way. However, for the small angles used here (16° X-ray cone angle), the non-linearities are modest. This feature will have to be tested in practice. At worst, predetermined path length matrices [G] will be needed for a compact sequence of different log diameters to accommodate large changes in log size.

The shifting and scaling of the X-ray data to a standardized format enable the CT inversion to be done in a normalized form. This is a great mathematical convenience. However, the results ultimately need to be referenced to the actual log diameter to identify true physical dimensions. The X-ray measurements do provide an indication of the physical dimensions, but the presence of radial rigid-body motions within a cone-beam geometry change the size of the scanned log image and therefore impedes precise identification of dimensions. Multiple X-ray systems from different angles could be used to resolve the ambiguity, but this would be a rather complex and expensive solution. A more practical approach is to use an added optical scanner to identify log size and position. Such optical scanners are widely used in the wood industry and are rugged and relatively inexpensive. Ultimately, the tolerance of small rigid-body motions is significant because it greatly simplifies the required mechanical arrangement for the needed X-ray scanner. In conventional CT practice, the measured object stays stationary while the X-ray scanner system rotates around it. For medical applications, this approach is essential because the objective of the measurement is a human patient, which cannot be conveniently rotated! But even in non-medical applications, the same approach is used because the X-ray system can be rotated with much higher precision than then measured object. This is certainly the case with logs in a sawmill. The logs are large and rough and cannot be moved with great precision. The tolerance of rigid-body motions by the proposed CT arrangement makes acceptable the imprecision of the log motions available in a sawmill and very greatly reduces the complexity, fragility and cost of the required X-ray scanner.

2.10 Conclusion

This paper, the first of a two-part series, introduces the novel cone-beam log scanning concept, the coarse-resolution, geometry-based log models, the associated algorithms and computation procedures. This proposed Eulerian approach has several advantages over conventional medical style CT scanning:

  1. 1.

    It reduces scanner mechanical complexity by using a stationary X-ray source and detector while rotating the measured object.

  2. 2.

    It uses feature-specific voxel geometries to guide and stabilize the CT reconstruction.

  3. 3.

    It is tolerant of rigid-body-motions and log ellipticity.

  4. 4.

    It reduces the number of features that need to be determined, thus reducing the scale of computation and effort for data processing.

  5. 5.

    It used all data available within the X-ray cone beam, thus increasing the data content and stability of the CT inversion.

The practical demonstration of proposed log CT system will be introduced as the second part of this serial paper.