1 Introduction

Near-infrared spectroscopy (NIRS) is an effective method for predicting many properties of wood such as density, not only in the laboratory but also in the field (Li et al. 2012). Multivariate statistical methods such as principal component analysis (PCA), principal component regression (PCR), and partial least squares regression (PLSR) are generally used to obtain prediction models (Tsuchikawa 2007). Neural networks are used to a lesser extent to obtain these models (Li et al. 2012). The NIR/PLSR combination is the most widely used to estimate wood density quickly, simply, and at low cost. To improve the prediction models, diverse data processing techniques are used, including derivatives, multiplicative scatter correction (MSC), and standard normal variate (SNV). The most common quality criteria for measuring prediction models are high coefficients of determination (R 2) and minimum values of root-mean-square error of prediction (RMSEP) in a validation group consisting of an independent sample group.

Most of the time, diffuse reflectance spectra are recorded in samples that have been pulverized beforehand; few wood density studies have been conducted at high spatial resolution or at the intra-ring level (microdensity). In density estimations of pulverized samples or wood chips, coefficients of determination of 0.80 have been achieved in the validation group for Eucalyptus globulus Labill (Schimleck et al. 1999), 0.91 for Eucalyptus delegatensis R.T. Baker (Schimleck et al. 2001), 0.84 for Pinus taeda L. (Mora et al. 2008), 0.85 for Pseudotsuga menziesii (Mirb.) Franco (Acuna and Murphy 2007), and 0.84 for Eucalyptus spp. (Downes et al. (2011). In non-pulverized samples of Eucalyptus grandis W. Hill ex Maiden, Rosso et al. (2013) obtained a coefficient of determination of 0.74 with radial scanning of samples. Haddadi et al. (2015) scanned a total of 107 cubic samples of 4 cm size in Abies lasiocarpa Hook in a spectral range from 947 to 1637 nm (spectral resolution of 3.3 nm). The relationship with gravimetric density showed a R 2 and RMSEP of 0.81 and 39.5 × 10−3 g cm−3, respectively. Calibration of NIR to build microdensity profiles was first carried out by Schimleck and Evans (2003), who studied two increment cores to calibrate an NIR/PLS model with a spatial resolution of 10 mm, using as reference data those provided by the SilviScan-2. The NIR range used was between 1100 and 2500 nm and they recorded the diffuse reflectance spectra with a separation of 2 mm between consecutive points, in a moving window of 5 × 10 mm. The authors obtained R 2 values of 0.95 and 0.92 and RMSEP values of 34.8 × 10−3 and 62.3 × 10−3 g cm−3 for each increment core. Jones et al. (2007) studied 15 radial wooden strips cut from increment cores with five NIR devices from different manufacturers. The spectral range varied from 350 to 2500 nm, depending on the equipment model. They studied two different spatial resolutions: 2 and 5 mm. The best results were obtained for a spatial resolution of 5 mm with R 2 values from 0.76 to 0.53 and RMSEP values from 61.5 × 10−3 to 97.1 × 10−3 g cm−3. In E. globulus, Wentzel-Vietheer et al. (2013) studied 175 pit-to-bark cores at 1 mm interval in a wave number range from 10,000 cm−1 (1000 nm) to 4000 cm−1 (2500 nm). Using data from the SilviScan-3 as reference, the R 2 and RMSECV obtained were 0.64 and 96.3 × 10−3 g cm−3, respectively. Downes et al. (2014) remade the previous study using 266 pith-to-bark radial strips at 1 mm interval and averaged at 5 mm in the radial direction. Similarly, and using SilviScan-3 as reference, the R 2 and RMSEE obtained were 0.78 and 47.6 × 10−3 g cm−3, respectively. Likewise, Rodrigues et al. (2013) used an FT-NIR analyzer to measure a single pith-to-bark density, in a range between 12,500 and 4000 cm−1 (800 to 2500 nm), with a spatial resolution close to 1 mm. The authors obtained a coefficient of determination value between the NIR/PLS method and the X-ray method of 0.98 with a root-mean-squared error of 22.7 × 10−3 g cm−3. However, they had to remove 31 of the 83 points contained in the validation group. On the other hand, detailed measurement of the intra-ring density profile using the NIR/PLS method can be performed with hyper spectral imaging system technology. Fernandes et al. (2013a) used this technology at a spatial resolution of 0.6 mm in a spectral range from 380 to 1028 nm and obtained a coefficient of determination value between the NIR/PLS method and the X-ray method of 0.810 (for close to 17,000 points) with an RMSEP value of 65.4 × 10−3 g cm−3. Using neural networks, these values improved to 0.821 and 62.5 × 10−3 g cm−3 for R 2 and RMSEP, respectively (Fernandes et al. 2013b). Kitamura and Tsuchikawa (2015) proposed measuring density profiles using attenuation in transmission of an infrared laser at 830 nm, using an avalanche diode as a detector. The best results were achieved with a sample thickness of 0.5 mm and an RMSEP of 46.0 × 10−3 g cm−3 (R 2 = 0.921) for a validation group composed of 30 measurement points.

The purpose of this study was to investigate whether the results published for NIR/PLS intra-ring density predictions in wood can be improved when calibrated with X-ray microdensitometry. The study considered 31 digital X-ray images with their respective wood samples, which had been in storage for 14 years and were recently scanned using a latest generation fiber optic NIR device.

2 Material and methods

2.1 The experimental setup

The experimental setup for NIRS was comprised of a near-infrared spectrometer, a source of light, a bifurcated fiber optic probe, and a Spectralon® reference. The work was performed with 31 tangential/radial samples from pith to cambial zone with a thickness of 2 mm, collected from 28 Pinus radiata D. Don trees. The wood samples were in storage from 2001, when X-ray densitometry was performed, to 2015 when they were measured with NIRS. The wood strips remained stored in a cabinet within airtight plastic bags. The possibility of loss of wood density in these storage conditions can be considered void. The equilibrium moisture content of the wood during NIRS measurement was around 10%. The spectrometer model used was the Ocean Optics NIR Quest with 512 pixels ranging from 900 to 2500 nm (resolution: 3.18 nm). An Instron 3369 mechanical testing machine was used to perform the precise linear movements of the wood samples. NIRS measurements were taken every 5.2 s using a velocity of displacement of 5.862 mm min−1, resulting in a distance of 0.508 mm between points, equivalent to 50 dots per inch (dpi). In a separate experiment, it was estimated that each reading with the fiber optic probe covered a circular area with a spot diameter of approximately 1.4 mm on the transverse plane (tangential/radial surface) of the wood sample. For typical Chilean P. radiata growth conditions, each tree ring is represented by an average of 14 measurement points, allowing for a detailed analysis within each tree ring. Full spectrum was composed of 346 points, exploiting the range between 1200 and 2200 nm at a resolution of 3.18 nm. Five scans were collected for a single spectrum with 100 ms of integration time. The only preprocessing method implemented was SNV, in which the spectrum average is subtracted from each data point and the result is divided by the standard deviation.

2.2 X-ray densitometry

The reference values were X-ray images digitized using an Agfa Duos can scanner with 8-bit gray resolution and spatial resolution of 300 dpi equivalent to 0.0847 mm (Zamudio et al. 2002; Zamudio et al. 2005). Prior to radiation, resins in the wood samples were extracted with alcohol. The density was obtained from the correlation of the gray scale in a polyoxymethylene-copolymer (Kemetal®) sample with a known thickness scale to the grayscale in each X-ray image. The predicted mean density for each sample was matched to its density measured using gravimetry, at a moisture content of 10%. To address the different NIR and X-ray resolutions, one of every six pixels in the digital image was used as a reference value, ranging from 300 to 50 dpi. The positions for the measurement of NIR spectra and X-ray microdensity were matched as closely as possible. Curvature of the the tree rings in the pathway measured by X-ray and NIR is assumed negligible. A moving average was applied to the X-ray densitometry data with intervals of 1.4 mm. This smoothing could be slightly more intense than the weighting effect produced by the use of a circular fiber optic probe.

2.3 Partial least squares regression

A total of 4520 density points from 31 wood samples were used to create partial least squares training and validation groups. The training group was made up of 20 randomly selected samples and the validation contained the remaining 11 samples. Twenty PLSR calibrations were executed randomly with the 31 samples, resulting in 20 samples in the training group and 11 in the validation group. Averaging the results of the 20 calibrations generated a reliable characterization of the quality of the PLSR calibrations (Fernandes et al. 2013a). The data were processed using the PLS package of R (Mevik and Werens 2007). The number of PLSR components was varied from 1 to 20 using the SIMPLS algorithm and leave-one-out (LOO) cross-validation. No outlier detection was used. Method performance was measured using four indicators: the coefficient of determination (R 2), the root-mean-squared error of prediction (RMSEP), the ratio between the RMSEP value of the validation group and the RMSEP value of the training group, and the range error ratio (RER) which is the ratio of the range in validation reference data to the RMSEP. The ratio between the RMSEP obtained from the validation and training groups and the RER calculated from the validation group were used to compare the quality of PLSR results (Alves et al. 2012).

3 Results

3.1 Results varying the number of latent variables

Figures 1, 2, and 3 plot the mean RMSEP, R 2, and RER as a function of the number of latent variables. The error bar shows one standard deviation around the mean of the 20 PLSR calibrations generated. This variability around the mean value is limited for the 20 models created. The curves show that using five latent variables produces an RMSEP value below 60 × 10−3 g cm−3 (R 2 > 0.8) while using 12 latent variables produces an RMSEP value under 50 × 10−3 g cm−3 (R 2 > 0.86). Beyond 14 latent variables, the improvement in calibration performance is practically imperceptible; with convergence to an RMSEP value around 42 × 10−3 g cm−3 and RER value of approximately 13.7. For 20 latent variables, the RER mean and standard deviation were 13.7 ± 0.5, with raw data ranging from 12.7 to 14.5.

Fig. 1
figure 1

Mean and standard deviation of RMSEP calculated by 20 PLSR calibrations and as a function of the number of latent variables included

Fig. 2
figure 2

Mean and standard deviation of R 2 calculated by 20 PLSR calibrations and as a function of the number of latent variables included

Fig. 3
figure 3

Mean and standard deviation of RER calculated by 20 PLSR calibrations and as a function of the number of latent variables included

3.2 A typical run scatter plots

Figures 4 and 5 are scatter plots of the reference and predicted values for one “typical run” from 20 PLSR calibrations generated. It should be noted that possible outlier points were not eliminated from any of the 20 PLSR calibrations. These scatter plots indicate that there is systematic underestimation bias of the highest density values (latewood). Figure 6 plots the root-mean-squared error as a percentage (RMSEP%) for the same data in Figs. 4 and 5. For low-density values (earlywood), the RMSEP% value is between 20 and 30%, whereas for high-density values (latewood), the RMSEP% is less than 10%. Although the RMSEP% is lower in the density predictions for latewood, it is important to take into account the systematic underestimation bias in these predictions.

Fig. 4
figure 4

Scatter plot for the training group for a typical run (20 latent variables included)

Fig. 5
figure 5

Scatter plot for the validation group for a typical run (20 latent variables included)

Fig. 6
figure 6

RMSEP% as a function of the reference density for a typical run (20 latent variables included)

3.3 Intra-ring density profiles

Figure 7 plots good (a) and poor (b) results for the comparison between X-ray and NIR-predicted microdensity profiles for six wood samples selected from validation groups for two quality extremes of 20 PLSR calibrations. The R 2 and RMSEP values presented in Fig. 7 are calculated at the individual sample level. Good results are R 2 values between 0.91 and 0.93 and RMSEP values around 37 × 10−3 g cm−3. The worst samples achieve an R 2 value of 0.797 and an RMSEP value of 62.2 × 10−3 g cm−3. Other poor results are R 2 values between 0.87 and 0.89 and RMSEP values around 45 × 10−3 g cm−3. Figure 8 plots the residuals from the predictions for the same six pith-to-bark strips from Fig. 7. The best result was a mean residual value of −1.8 × 10−3 g cm−3 and a mean residual (relative to the reference value) of −0.5%. The worst result showed a mean residual value of −90.1 × 10−3 g cm−3 and a mean residual% of −22.7%.

Fig. 7
figure 7

Good (a) and poor (b) comparisons between X-ray and NIR-predicted microdensity profiles for six different pith-to-bark strips

Fig. 8
figure 8

Residual and residual% for the same six pith-to-bark strips from previous figure. Good (a) and poor (b) comparisons

4 Discussion

For typical Chilean Pinus radiata growth conditions, 0.508 mm of distance between measurement points mean each tree ring was represented by an average of 14 points, which allows for detailed analysis within each tree ring. The intra-ring density profiles for Pinus radiata growing in Chile are often very complex due to alterations in the profile shape (false tree rings). The NIR/PLSR method implemented pursues precisely these anomalies in the predicted profiles of tree rings. However, in “poor cases” shown, the high extremes of tree ring density (latewood) are overestimated, while the low extremes (earlywood) may be over- or underestimated.

The mean R 2 and RMSEP values for NIR/PLSR models relative to X-ray densitometry values are 0.873 and 43.1 × 10−3 g cm−3 for the training group. For the validation group, the values are 0.895 and 47.1 × 10−3 g cm−3, respectively. The RMSEP obtained are better than those found in studies using hyperspectral imaging (Fernandes et al. 2013a; Fernandes et al. 2013b).

According to Alves et al. (2012) the RER should be ≥4 for screening calibration, ≥10 to be acceptable for calibration for quality control, and ≥15 for calibration for quantification. The curve here shows that four or more latent variables generate an RER value greater than 10, which is acceptable for calibration for quality control. This means that the RER values obtained using more of 14 latent variables are closer to the frontier between calibration used for quality control and calibration used for quantification. These results are superior to those found in the literature summarized by Alves et al. (2012) for different wood density studies, with a range from 4.1 to 13.7. The ratio between the RMSEP values obtained from the validation and training groups ranges from 1.03 with 5 latent variables to 1.09 with 20 latent variables (calculated from Fig. 1). These results are also better than those presented by Alves et al. (2012).

Analysis of the residuals showed that a minimal displacement error between X-ray and NIRS measures can change considerably the density values obtained. The method robustness should be assessed considering the objective of the densitometry analysis. Future studies may address robustness analysis at ring level considering variables such as widths, mean densities, and earlywood/latewood proportions.

5 Conclusion

We demonstrate that a fiber optic NIR spectrometer with a high-precision displacement system is capable of producing accurate measurements of intra-ring P. radiata density values with a spatial resolution of 0.5 mm approximately. Typical intra-ring density profiles for P. radiata growing in Chile show alterations in the profile shape such as false tree rings. Nevertheless, the NIR/PLSR method implemented addresses these anomalies in predicting tree ring profiles. It might be possible to apply this methodology successfully in other softwoods and hardwoods species.

The mean R 2 and RMSEP values for NIR/PLSR models relative to X-ray densitometry values are 0.873 and 43.1 × 10−3 g cm−3 for the training group. For the validation group, the values are 0.895 and 47.1 × 10−3 g cm−3, respectively. The RMSEP obtained are better than those found in studies using hyperspectral imaging.

The ratio between the RMSEP values obtained from the validation and training groups was 1.09, which is better than that reported in the literature. The ratio of the range (RER) value of 13.7 in this study is closer to the frontier between calibration used for quality control and calibration used for quantification. These results are even higher than some studies of wood density that do not employ spatial resolution.