Hyperspectral Near-Infrared Image Assessment of Surface-Acetylated Solid Wood

: Visualization of acetic anhydride ﬂ ow and its heterogeneity within the wood block necessitates the development of a reliable and robust analytical method. Hyperspectral imaging has the potential to acquire a continuous spectrum of chemical analytes at di ﬀ erent spectral channels in terms of pixels. The large set of chemical data (3-dimensional) can be expanded into relevant information in a multivariate fashion. We quanti ﬁ ed gradients in acetylation degree over cross sections of Scots pine sapwood caused by a one-sided ﬂ ow of acetic anhydride into wood blocks using near-infrared hyperspectral imaging. A principal component analysis (PCA) model was used to decompose the high-dimensional data into orthogonal components. Moreover, a partial least-squares (PLS) hyperspectral image regression model was developed to quantify heterogeneity in acetylation degree that was a ﬀ ected by the ﬂ ow of acetic anhydride through wood blocks and into the tracheid cell walls. The model was validated and optimized with an external test data set and a prediction map using the root-mean-squared error of an individual predicted pixel. The model performance parameters are well suited, and prediction of the acetylation degree at the image level was complemented with confocal Raman imaging of selected areas on the microlevel. NIR image regression showed that the acetylation degree was determined not only by the time-dependent ﬂ ow of the acetic anhydride through the wood macropores but also by the di ﬀ usion of the anhydride into the wood cell walls. Thereby, thin-walled earlywood sections were acetylated faster than the thick-walled latewood sections. Our results demonstrate the suitability of near-infrared imaging as a tool for quality control and process optimization at the industrial scale.


INTRODUCTION
Hyperspectral imaging is a fast, nondestructive, and leadingedge analytical technology, which couples the traditional digital imaging and spectroscopic methods in a single system. The system generates images in a three-dimensional (3D) structure referred to as a hypercube, which comprises a set of pixels in a plane and corresponding spectral chemical information in the third dimension. 1 Each pixel is a unique piece of information but spatially correlated with other pixels in a way that respective information depends on the information on the surrounding pixels. Spatial resolution is the information on the physical area of a surface captured by all the pixels in the form of a data hypercube. 2,3 The accurate analysis of hypercube information, which contains a 3D data structure, can be used to estimate reliable physical and chemical characteristics of the objects. 3,4 Out of many practical applications of hyperspectral imaging coupled with near-infrared spectroscopy in the fields of food, petrochemicals, agriculture, polymers, and textiles, it has been encompassed in wood sciences to practically predict the wooden anatomical features, chemical composition, mechanical properties, wood modification, moisture content, and degradation. 5−8 The major reason for the expansion of hyperspectral imaging is its integration with data mining to extract the useful information from the hypercube in a multivariate way. Combining data mining with chemometrics can decompose high dimensional big data and reduce the heavy computational load. Chemometrics are a set of mathematical, statistical, and data analysis methods which segregate the important useful chemical information objects from the unrelated collection of information. 9 Models based on supervised and unsupervised approaches can be developed to calculate the precise concentration of several wood compounds and transform into images. The careful implementation of chemometric methods can enhance the real-time applications of in-line or online visual inspection and monitoring in the wood industry. 10 Natural wood is a complex and hierarchical structured biomaterial comprised of an interconnected network of cellulose, hemicellulose, and lignin as well as traces of extractives and inorganics. Softwoods mainly consist of axial tracheids that function as a water conductive and support tissue in living trees. Within one annual growth period, softwoods form earlywood in the spring, which consists of wide and thin-walled tracheids, and thicker latewood tracheids with smaller cell diameters later in the season. Besides anatomical differences, there are small differences in the chemical composition between early-and latewood. In particular, a higher lignin content has been reported for earlywood. 11−13 This natural variation may affect the treatability of wood with chemical agents such as preservatives or modification agents, which requires the flow of the chemicals through course macropores of wood (i.e., cell lumen) and their diffusion into the cell walls. However, studies on differences in treatability of early-and latewood are scarce and have contradicting results. 14−17 Besides differences in the treatment solutions and conditions applied, this may be due to a lack of suitable analytical tools that combine spatial and chemical information.
Acetylation of wood using acetic acid anhydride requires the flow of the anhydride from the wood board surfaces into the core through the macroscopic pores of wood but also its diffusion into the cell walls. Inside the cell walls, it reacts with the hydroxyl groups of wood while forming acetic acid as a byproduct. There is a close correlation between the acetylation degree, typically determined as weight percent gain (WPG) of the wood, and the improvement in water-related properties 18,19 and decay resistance 20 of the wood. Variations in acetic acid anhydride penetration across the wood may result in regions with lower acetylation degree and, hence, insufficient protection against water and fungal decay. The conventional gravimetric measurements only provide the information on bulk modification and fail to address the heterogeneity of chemical analytes within the sample. However, there are spectroscopic techniques capable of detecting and quantifying the acetylation of wood. Inagaki et al. 21 have investigated the degree of acetylation in cross-and radial-sectional faces of beech wood with the aid of near-infrared hyperspectral imaging. The near-infrared second derivative amplitude at 1727 nm was linearly correlated with the concentration of acetyl groups in the cell wall. A univariate approach was used to estimate the hindrance to the diffusion reagent of acetylation at a specific depth. Schwanninger et al. 7 studied qualitative assessment of acetylation in wood with Fourier transform infrared spectroscopy (FT-IR) and Fourier transform near-infrared spectroscopy (FT-NIR). It was found that as the weight percentage gain increased, the aromatic esters were formed, which FT-IR could distinguish from alkyl ester. A multivariate approach was used to predict the acetylation in poplar wood using near-infrared spectroscopy. 22 The acetylated wood flour was characterized, and a partial least-squares model was developed. Linear correlation was found between the spectra and the acetylation degree. Moreover, UV microscopy was used to analyze the acetylation of spruce and birch cell walls by Hansmann. 23 Only the early wood was acetylated, and a relation between WPG and spectral shifts was established to estimate acetylation at the cellular level. Adebawo et al. 24 interrogated acetylation selectivity of hardwood biopolymers with P NMR and established the order of reactivity for hydroxyl groups of lignin, hemicellulose, and whole wood.
The aforementioned studies measured the acetylation spectroscopically at a macro and cellular level. However, neither of the studies have considered developing a unique model to visualize the acetylation degree in different parts of the wood cross-section. In this study, we intentionally created gradients in acetylation by a one-sided flow of acetic anhydride into the wood samples in the radial direction and analyzed how this affected the acetylation degree in the different parts of the wood cross-sections. A novel NIR hyperspectral image regression model was developed for predicting the quantitative distribution of weight percentage gain within the individual wood samples. The predicted weight percentage gain not only differed as a consequence of the anhydride flow from the exposed surface through the macropores of wood but also  differences were observed between the early-and latewood regions of the samples. These differences were further investigated using confocal Raman spectroscopy imaging with spatial resolution on a micron level.

METHODS
Sample Preparation. Conventionally kiln-dried boards of Scots pine (Pinus sylvestris L.) wood with dimensions of 100 × 22 mm were used in this study. Samples with dimensions of 12 × 12 × 70 mm (radial × tangential × longitudinal) were cut from the sapwood regions of the boards. Care was taken that the samples had a homogeneous distribution of early-and latewood across the cross sections and that the annual rings were oriented parallel to the tangential surface. Three replicates per sample group (treatment time) were used and stored at 20°C and 65% RH until the treatments.
Surface Modification. The samples were vacuum impregnated with acetone at 0.04 MPa and room temperature for 2 h, followed by soaking in fresh acetone at room conditions in a closed container for 72 h. The samples were air-dried for 24 h in a fume hood followed by oven-drying at 105°C for 24 h to determine the initial wood dry weight. All surfaces except one tangential surface were sealed with the aluminum tape, and the dry sample weight was determined again. The unsealed, tangential surface of the samples was exposed to neat acetic anhydride for different time intervals: 0.5 h, 1 h, 2 h, 3 h, 6 h, 12 h, 24 h, 48 h, 72 h, 144 h, 216 h, or 288 h. This was followed by hot pressing at a temperature of 120°C and a pressure of 2 × 10 −4 MPa for 3 h. Unreacted acetic acid anhydride and formed acetic acid were removed by vacuum impregnation and soaking in acetone as described above. Finally, air drying under a fume hood and oven drying at 105°C for 24 h was repeated to determine the final dry sample weight. The weight percentage gain (WPG, in %) was calculated as follows where W b and W a are the dry sample weights (in g) including aluminum sealing before and after the acetylation, respectively, and W o represents the initial dry sample weight (in g) without the aluminum sealing. The scheme for the experimental procedure is shown in Figure 1. Hyperspectral Imaging. Hyperspectral images were collected with a commercial Specim SWIR camera (Specim, Spectral Imaging, Ltd.) with a spectral range of 950−2550 nm. It was equipped with an OLESMacro lens with a focal length of 73.3 mm and field of view of 10 mm. Three images were captured considering one for each size fraction. Two quartz halogen light laps in a row order were the polychromatic light source. The reflected wavelengths were segregated with a grating prism monochromator followed by the HgCdTe detector array. The cross-sections of samples with the height of 35 mm were placed on an examination substrate. The line-scanning mode was selected to record the 430 × 384 pixels with respective 288 wavelengths. The scanning table was moving in a perpendicular direction to generate the images. The size of the image was dependent on the number of lines and the samples area. The acquisition time was 10 ms per line and results in approximately 14 s per image. The absorbance in each pixel was calculated based on the measured Spectralon white reference and dark current intensities.
NIR Image Segmentation and Data Preprocessing. The region of interest was segmented with intensity band differences to remove the background and related unwanted pixels from aluminum tape. The segmentation with pixel coordinates was carefully applied to extract the region of 400 × 376 pixels. 25 The potential dead and extreme pixels were filtered from individual images using principal component analysis (PCA). 26 An image mosaic of 39 samples including 3 replicates at 13 different times was created to estimate the chemical changes caused by anhydride modification (Supporting Information Figure S1). The potential trend of acetylation can be noticed on a relatively larger interval. Therefore, a small mosaic of 7 best-fit samples was generated to reduce the computational time, memory, and simulation cost. The spectral preprocessing was performed in an order of image despike with median filter, 27 standard normal variate (SNV), 28 transformation, and mean centering. Image despike filters the spatial artifacts with a moving window in the horizontal and vertical directions. The algorithm of the median was applied with the window of 1−3 bands length. The filtered spectra were scaled using a standard normal variate which uses mean zero and unit standard deviation transformation in a row-wise operation to balance the spectra. Principal component analysis was performed on a preprocessed image mosaic using the singular value decomposition 29 economy algorithm to determine the uncorrelated variables. The economy size decomposition computes only n columns of the left singular matrix of the m × n input data matrix compared to full decomposition where the left singular matrix is m × m, which enhances the computational load and cost. The economy version of SVD improves the computational time without compromising the accuracy of decomposition. The generic equation of singular value decomposition of X data is where U is a left singular vector of the m × n matrix and columns are orthogonal, satisfying U H U = I n . S represents a diagonal matrix of singular values in decreasing order. V is the right singular vector of size m × n which in the case of economy decomposition computes only m columns and satisfies V H V = I n . The matrix of scores was computed as T = US, and V T is the loading matrix. The optimum number of principal components was calculated from explained variation (Supporting Information Figure S2). The score columns were transformed into image dimensions, and chemical changes were interpreted from respective loading. Hyperspectral Image Regression. The hyperspectral images of 3 replicates at 13 time intervals were measured. Two replicates of individual time series were split into a calibration set comprised of 26 images in total with 288 corresponding wavelengths. The validation set consisted of the third replicate from each time series. All images were filtered with a spectral median 27 and standard normal variate. 28 The individual image was reshaped where the pixels were in rows and the corresponding spectra in columns. The preprocessed average spectrum per image was calculated and stored in calibration (26 objects) and validation sets (13 objects). The calibration set was again processed through a standard normal variate and centered mean. PCA 26 was applied on the calibration set to identify potential outliers, and object 19 was removed which caused a higher bias and calibration error (Supporting Information Figure S3). The final data set modified consists of 25 calibration objects. Spectral preprocessing was further performed through the standard normal variate and mean centering on screened data sets. The corresponding Y variables (WPGs) were also mean centered. A calibration model was developed based on the partial least-squares regression 30 using the SIMPLS algorithm. 31 This calculates the PLS factors which are linear combinations of the original variables and determined by maximizing the covariance of corresponding Y variables. The validation set has been used to select the optimum number of latent variables as well as to evaluate the performance of the calibration model. The root-mean-square error of prediction based on the validation set was calculated as ŷi are the measured WPGs, and y i represents the predicted values. n represents the number of predictions.
Additionally, a test image set was prepared based on the previously defined principal component results which clearly identify the pixels belong to acetylation. The model was further validated with rootmean-square error prediction of individual pixels. A prediction map 32 was generated by applying the regression vector obtained at a different number of latent variables to an individual pixel spectrum in each hypercube of the sample. The residual prediction image (RPI) was obtained by subtracting the measured WPGs of the respective sample from each pixel in the prediction map.

ACS Applied Bio Materials
where y img represents the measured WPG value of the sample, yî are predicted values of individual pixels; and n p are the total number of pixels.
Confocal Raman Spectroscopy and Image Analysis. The heterogeneous surface acetylation and quantitative analysis using PLS regression were further complimented at a cellular level with confocal Raman spectroscopy and imaging. The sample that was soaked in acetic acid anhydride for 216 h was selected from the PCA image mosaic because it showed a clear gradient in acetylation degree from the top surface to the bottom. Cross sections of thickness 25−35 μm were prepared with a rotary microtome from small blocks that were cut from either the top part of the sample that was exposed to acetic acid anhydride or the opposite part. The cross sections were placed on objective slides and covered with glass coverslips (thickness of 0.17 mm). A light weight was applied to the coverslip while sealing the edges with ethyl acetate solution. Raman images were acquired with a WITec alpha 300 RA confocal Raman microscope equipped with a 532 nm frequency-doubled Nd:YAG laser (used at 30 mW) and a 20× air objective (NA = 0.4, coverslip correction = 0.17 mm) and a DU970-BV EMCCD camera behind a 600 lines mm −1 grating. The captured images had dimensions of 70 μm × 70 μm with 185 lines per image and 185 points per line, and each point was measured at an integration time of 0.3 s. The scan areas were selected at the annual ring border to equal proportions of early-and latewood in each image. The images were exported in hypercube form using WITec Project Plus software.
An image mosaic was prepared based on the two scanned images. Cosmic rays were removed with median filter using a movable window of 1−3 bands. Data were preprocessed in an order of polynomial baseline correction, normalization, and mean centering. A polynomial of degree 3 was subtracted from the spectra. The algorithm was slow but induced less artifacts. Baseline-corrected data were latter normalized using a summed square value. The spectra were mean-centered, and PCA was applied to analyze the chemical changes. Pixels belonging to lumen water were removed from the PCA scores. The indices of negative score were carefully selected with a specific threshold value, and a data set excluding lumen water pixels was generated. The spectra were again mean centered through the mean of selected pixels. PCA was computed again, and the scores  were refolded into images. The respective loading vectors were interpreted, and percentage variance was calculated.

RESULTS AND DISCUSSION
Reaction Kinetics and Weight Percentage Gain. The reaction kinetics of acetylation were initially measured based on the weight percentage gain (WPG) of each sample. A reaction temperature of 120°C was used to initiate a rapid reaction of the acetic acid anhydride with accessible OH groups in wood. Figure 2(a) shows the gravimetric measure of weight percentage gain against time. An increase in WPG of 4% was already achieved after soaking the wooden blocks in acetic acid anhydride for less than 3 h. Longer soaking time further increased the WPG, but at a lower rate. Thus, the WPG did not exceed 12% even after soaking in acetic anhydride for 288 h. An exponential curve fit explained the course of the WPG over time reasonably well, except for an outlier at 72 h. However, the gravimetrically determined WPG is an average of the acetylation degree across the entire sample and is insensitive to the heterogeneity within the samples that was intentionally created by the one-sided soaking in acetic acid anhydride.
Hyperspectral Imaging and PCA. PCA was used to remove background and unnecessary pixels from the image mosaic. Wavelengths outside the range of 1000−2500 nm were discarded as they contained noise. The two principal components which explained 81% of the variation were chosen from the cleaned-up image. The third principal component explained about 2% of the variation and mainly consisted of noise and unnecessary information (Supporting Information   Figure S4). Based on the score image, the first principal component preliminary described the early-and latewood differences (Figure 2d). It also included chemical information on other wood cell wall polymeric constituents. The wavelength range 1000−1486 nm in the PC1 loading vector has rarely been used for qualitative purposes 33 (Figure 2b). Bands at 1212−1225 nm and 1477−1484 nm can be tentatively assigned to cellulose (C−H stretching) and absorbed water. 33,34 The acetyl group corresponding to O− H and C−O stretching can be tentatively identify at 2255− 2260 nm with all wood components. 33 The band at 2490− 2493 nm belongs to cellulose (C−H and C−C stretching). 33 The second principal component mainly distinguished the acetyl group bonded with OH hydroxyl sites (Figure 2d). Hemicellulose in wood contains an acetyl ester group and can be assigned at the band 1160−1164 nm (C−H stretching) 35 ( Figure 2c). Similarly, the band 1370−1373 nm was also delegated to the CH 3 group in acetyl ester groups in hemicellulose and all other wood components. 33 A first overtone stretching of CH from methyl groups present in hemicellulose at 1724 nm and the band at 1720 nm is due to acetylation. At 1726 nm, the band was assigned to lignin from hardwoods and softwoods. 33 The positive 2251−2255 nm band is assigned to an acetyl group in acetylated wood. 33 NIR Hyperspectral Image Regression. The SNV processed spectra of calibration and validation sets showed the discrepancies in the spectral features and split up at different absorbance levels (Figure 3a). The spectra were discretely colored with weight percentage gain values. The mean centered spectra separate the lower WPGs in positive and higher WPG in negative at the 1150−1450 nm band range (Figure 3b). The opposite behavior can be noticed at the latter 2251−2255 nm bands. The RMS prediction image error was calculated up to 10 latent variables, showing a lower error of 2.93% at two latent variables (Figure 3c). The final PLS regression model was developed with two latent variables. The The regression vector with two latent variables separates the anhydride modification peaks from unmodified wood ( Figure  4a). At 1165 nm, CH stretching indicates the CH 3 group in acetyl ester groups in hemicellulose. 33 The combination of CH stretching and CH deformation corresponds to the CH 3 group of acetyl groups in hemicellulose and other all-wood components. The band at 1449−1452 nm can be assigned to the phenolic group of lignin. 36 All components of wood with bonded CH 3 groups can be assigned at 1721 nm. 36 Hemicellulose with CO stretching is at 1906 nm, and 2057 nm can be tentatively assigned to crystalline or semicrystalline regions of cellulose. The dominant peak at 2253 nm belongs to the acetyl group in acetylated wood.
A test image mosaic was processed through despike and a standard normal variate and mean centered with a calibration mean. The regression vector was applied for the prediction image (Figure 4b). Heterogeneity of acetylation within the sample was quantitatively estimated in terms of WPG (%) at different times. Histograms of predicted pixel distribution of individual samples are presented in Figure 4c.
The NIR hyperspectral regression model estimates the WPG (%) distribution at an individual pixel level and shows a strong variation in acetylation degree from left to right as time increases. It also highlights the fact that pixels close to the exposed surface show higher value of WPG (%) which confirms the flow of the acetic anhydride through the exposed surface toward the core of the wood blocks via lumen of tracheid and ray cells in radial direction. However, the predicted WPG was larger in the earlywood compared to the latewood sections, irrespective of the distance to the exposed surface, which indicates the cell wall diffusion pathways for acetylation. Presumably, the thin cell walls of earlywood tracheids provided shorter diffusion pathways for the acetic acid anhydride and, hence, were acetylated first. In contrast, the thicker cell walls of latewood tracheids required longer diffusion time and were acetylated later.
Raman Mapping and Principal Component Analysis. Confocal Raman spectroscopy imaging was performed to compliment the heterogeneity observed by NIR imaging using spatial resolution in the micron/submicron range. The sample that was soaked in acetic acid anhydride for 216 h was selected for Raman imaging because the gradient in acetylation degree was very noticeable based on NIR image regression. Cross sections were taken near the exposed surface and near the opposite surface, and Raman images were collected on the annual ring border to contain equal amounts of early-and latewood. Raman mapping is based on collecting a large number of spectra with higher spatial resolution at a predefined position, which enables the cellular level analysis, compared to the NIR imaging where one pixel contains several cells. Hyperspectral data can be transformed into an image with a  univariate method of intensity integration 37−39 at a specific area of the scan. Potential chemical changes caused by multiple variables and their correlation can be evaluated with multivariate data analysis. It determines a reliable and optimal method to extract maximum useful information. The Raman images were subjected to PCA, which differentiates wavelengths into a few uncorrelated variables and separates the artifacts, noise, and outliers from the spectra. PCA was utilized to validate the potential acetylation gradient and the differences between early and latewood sections suggested by NIR hyperspectral imaging. The images of the top and bottom sections were fused together and preprocessed as described earlier. Spectra outside the range of 300−3600 rel·cm −1 were discarded. The scores of PC1 were used to remove the cell wall and the lumen pixels (Supporting Information Figure S5). The pixel removal made the chemical changes and its interpretation simplified and straightforward. The first five principal components explained the 58% variation of data (Supporting Information Figure S6). The score images and respective loading vectors of the first four PCs are presented in Figure 5, which explains in total 57% of the variation. PC5 explained a 1% variance and consists of noise and small chemical information (Supporting Information Figure S7). The PC1 loading vector has two opposite dominant extremes at 1597 cm −1 and 3393 cm −1 and a region of peak shifts at 2887−2933 cm −1 (Figure 5b). At 1597cm −1 , the negative intense band can be designated to lignin's aromatic ring stretch in wood. 40,41 The broad positive dominant region of 3200−3600 cm −1 corresponded to OH stretching of water. 42,43 The effect of acetylation can be detected from the band at the start disappearing, leading to strong enhancement of the 2933 cm −1 band that contributes to CH stretching in the acetoxy group in an acetylated lignin. 40 The PC1 image indicates a higher acetylation degree in the section near the exposed surface. However, it does not show differences between early-and latewood. This is possibly because it is also sensitive to lignin-rich regions in the middle lamella and cell corners at the 1597 cm −1 band and to residual water near the cell wall−lumen interface. The dominated negative band in PC2 is at 1592 cm −1 , which tentatively indicates aromatic ring stretch, i.e., lignin in wood. 40 The positive extreme can be allocated to carbohydrates. The PC2 score image differentiates lignin-rich compounds in the middle lamella and residual water from carbohydrate associated with cellulose. The higher score values for PC2 in the upper image, particularly for deposits in the cell lumens, may be related to extractives. PC3 potentially has two positive dominant bands and negative noise and baseline shift. The positive bands at 1599 cm −1 and 2889 cm −1 were allocated to lignin as per the aromatic ring stretch. 40 The peaks at 434, 451, and 457 cm −1 can be ascribed to skeleton deformation modes and related to carbohydrate components in wood. 40,41,44 The region 1705− 2800 cm −1 cannot be assigned and is explained as artifacts of baseline correction and noisiness of Raman data, which biased the PC3 scores toward positive extremes. PC4 has a significant importance and relevance to acetylation and its distribution in early-and latewood. It shows the same band shift due to acetylation at 2887 cm −1 and 2933 cm −1 as described earlier in the PC1 loading vector. This band was used for the quantitative monitoring of acetylation reaction in lignin and lignocellulose. 40 The sharp shift of bands predominately indicates acetylation reaction in wood. The positive bands at 1601 cm −1 and 918 cm −1 were ascribed to lignin. Cellulose is associated with the band at 1144 cm −1 . The section near the tangential surface which was exposed to the acetic anhydride did not show differences between early-and latewood in the PC4 score image. Presumably, the acetic anhydride had sufficient time to diffuse not only into the earlywood cell walls but also to fully diffuse into the thick-walled latewood tracheids. However, the acetic anhydride first had to flow from cell to cell and through the rays before reaching areas in some distance from the exposed surface. This resulted in a shorter time for cell wall diffusion. During these short diffusion times, the differences in cell wall thickness between early-and latewood had a stronger effect. Thereby, the earlywood tracheids were acetylated to a higher degree than latewood tracheids, which can be seen by the higher PC4 scores for the cell walls in earlywood. This corresponds well to the NIR hyperspectral images in 0Figure 4b.

CONCLUSION
Wood is a biological material comprised of interconnected networks of complex structures. Reliable determination of the impregnation of the modifying agent across the cell walls, rays, and other channels was always a challenging task. With the advancement of chemical imaging such as near-infrared hyperspectral and Raman imaging coupled with chemometric methods, we can investigate the penetration behavior of chemical reagents in term of images. In this article, hyperspectral NIR imaging was used to analyze the quantitative distribution of acetic anhydride flow from the exposed surface to the core against the discrete time intervals. Heterogeneity was intentionally created to visualize the anhydride flux through cell to cell, rays, and other diffusion pathways. The diffusion of modifying agent through the earlywood and latewood can also be distinguished and validated with confocal Raman spectroscopy imaging.
To better understand, it was the first practice to visualize the chemical variation across the woodblock in a combination of imaging techniques and chemometrics. With this approach, the heterogeneous distribution of chemical analytes was precisely predicted in image context at the macro and micron level. The designed method was applied on a small scale but has relevance to implement in view of larger board dimensions used during industrial-scale acetylation. The imaging can be applied to core material for the rapid identification of acetylation. These techniques may also be applied to other wood treatments where the location of the chemical agents in the hierarchical structure of wood is decisive for wood properties and performance. In the future, the developed model can be used for the predicted visual inspection of wood samples for quality control or process optimization. Moreover, the overall quality of the pixels can be enhanced. Modern machine learning prediction models can be implemented to predict the reaction kinetics in the dynamic state. The significant variable selection method can also improve the model for more industrial applications.  Figure S2), the potential outlier effecting the bias of the PLS model was removed using Q residuals and the Hotelling T 2 plot ( Figure S3), the third principal component and corresponding loading of NIR image data ( Figure S4), the removal of unwanted lumen and water pixels in Raman images using a threshold value based on PC1 ( Figure S5), scree plot of explained variation of Raman data and selection of optimal number of PCs ( Figure S6), and the PC5 score image of Raman data which shows noise and a little chemical information ( Figure S7) (PDF)