ensemble-learning-and-optical-scanning-predict-wood-density-and-moisture-accurately
Ensemble Learning and Optical Scanning Predict Wood Density and Moisture Accurately

Ensemble Learning and Optical Scanning Predict Wood Density and Moisture Accurately

Researchers in Japan have demonstrated that integrating two-dimensional optical surface imaging with ensemble machine learning models can accurately predict oven-dry wood density and estimate moisture content in timber specimens. Developing non-destructive, non-contact evaluation tools is increasingly important for timber processing and structural grading, where traditional visual checks and destructive testing frequently cause material waste and inconsistent grading. By combining standard flatbed line scanners and single-shot camera systems with ensemble algorithms that unite linear white-box models and non-linear black-box estimators, the researchers established an analytical framework capable of rapidly extracting color and macroscopic morphological characteristics from planed wood surfaces to infer critical internal physical attributes.

The study focused on two commercially and culturally dominant Japanese timber species, namely Japanese cedar (Cryptomeria japonica, known locally as Sugi) and Japanese cypress (Chamaecyparis obtusa, known as Hinoki). These two species represent approximately 44 percent and 25 percent of Japan’s plantation forest area, respectively, and possess deep historical significance dating back to the ancient Jomon and Yayoi periods. Ensuring the structural integrity and precise processing of these timbers aligns with the Japanese Agricultural Standard (JAS) grading protocols, which seek objective, reproducible measures of physical properties. Accurate evaluation of moisture content is especially critical, as moisture fluctuations directly alter mechanical properties, stiffness, and dimensional stability in finished lumber products.

To build a robust and representative dataset, the experimental design incorporated 555 wood specimens collected across ten distinct geographic regions in Japan, encompassing locations such as Tenryu, Himi, Akita, Yoshino, Hita, Obi, Mikawa, Fuji, and Kishu. The cedar samples were divided into six regional groups and the cypress samples into four regional groups, exhibiting baseline mean oven-dry densities ranging from 0.364 to 0.456 grams per cubic centimeter. The specimens were prepared with standardized dimensions of 15 centimeters longitudinally, 9 centimeters tangentially, and 3 centimeters radially, featuring both plain-sawn (tangential) and quarter-sawn (radial) cross-sections. Each sample was planed to minimize surface irregularities, ensuring that optical sensors could clearly capture structural variations across both adjacent orthogonal surfaces.

Moisture conditioning was systematically administered across three environmental stages to evaluate the models across a realistic operational spectrum. The timber specimens were acclimatized under ambient air-dry conditions maintained between 40 and 60 percent relative humidity at 20 degrees Celsius for two months, followed by stabilization periods at 60 percent relative humidity and subsequently at 95 percent relative humidity. To establish absolute dry baselines, specimens were ultimately oven-dried at 105 degrees Celsius until reaching a constant mass. True moisture content was derived gravimetrically from these mass measurements, yielding a working experimental moisture content range spanning from 3.453 percent to 19.646 percent across the primary sample sets, alongside reference measurements collected with a commercial handheld capacitance moisture meter.

Digital surface acquisition relied on two distinct, cost-effective commercial imaging devices: an Epson GT-S650 flatbed line scanner and a CZUR Shine 1300A3 Pro overhead camera scanner. The line scanner acquired sequential line-by-line image data conforming to A4 flatbed specifications with anisotropic pixels measuring 0.0712 millimeters horizontally by 0.0256 millimeters vertically, requiring 7.72 seconds per sheet (roughly 7.77 sheets per minute). In contrast, the camera scanner captured entire A3 frames in a single overhead shot with near-isometric pixels measuring approximately 0.0737 millimeters by 0.0731 millimeters, achieving a rapid capture rate of one sheet per second (approximately 60 sheets per minute). Because of differences in optical geometry and illumination, datasets from the two devices were evaluated independently, while the complete computer vision and predictive pipeline required roughly 0.56 seconds of computation per specimen.

Image processing routines developed using OpenCV and NumPy in Python extracted 34 total visual features per specimen across both scanners. These variables comprised 27 statistical color features drawn from RGB, HSV, and Lab color spaces, including means, standard deviations, and skewness metrics, along with seven macroscopic morphological features. Morphological segmentation isolated latewood, heartwood, sapwood, and knot distributions through thresholding, masking, and contour detection. Heartwood was sub-categorized into regions including latewood, excluding latewood, and containing knots, while sapwood was divided into regions with and without knots. Applying LightGBM feature importance rankings based on gain metrics isolated the ten most critical predictors for model training, confirming that subtle chromatic shifts and anatomical area ratios correlate meaningfully with wood density.

To evaluate wood surface defects in accordance with standard timber rules, the team implemented an automated knot classification protocol aligned with JAS 1083 specifications for sawn lumber. Using bounding-box contour detection without heavy model training, the computer vision algorithm tallied knot counts and measured maximum diameters to classify surfaces into knot-free, small knot, medium knot, and large knot categories. Across all 555 specimens, 43.9 percent of samples were categorized as knot-free, 26.3 percent as large knot, 17.5 percent as mid knot, and 12.3 percent as small knot. Notable regional variations emerged during classification: specimens from Akita dominated the knot-free tier at 80.9 percent, Hita cypress samples led the small knot group at 26 percent, Obi cedar showed the highest mid-knot frequency at 26 percent, and Himi cedar exhibited the largest proportion of large knots at 93.6 percent.

For predictive density modeling, the dataset of 555 specimens was divided into 1,160 training subsets and 505 testing subsets using stratified group splitting across geographic origins and conditioning treatments. The ensemble learning architecture paired interpretable white-box models, specifically Partial Least Squares (PLS) and Principal Component Analysis combined with Generalized Additive Models (PCA + LinearGAM), with powerful non-linear black-box learners, including Light Gradient Boosting Machine (LightGBM), Random Forest (RF), and Multilayer Perceptron Neural Networks (MLP-NN). The base estimators were integrated through a linear regression meta-learner evaluated via 10-fold cross-validation. The line scanner ensemble achieved a test coefficient of determination (R-squared) of 0.94 and a root mean square error (RMSE) of 0.01 grams per cubic centimeter, while the camera scanner model achieved an R-squared of 0.91 with an identical RMSE of 0.01 grams per cubic centimeter.

Building on these predicted oven-dry density values, the authors formulated and compared three distinct strategies to estimate wood moisture content across 100 randomly selected specimens representing ten samples from each harvest location. Initial testing with standalone capacitance moisture meter readings under fixed factory settings yielded poor accuracy, producing an R-squared of 0.45 and an RMSE of 15.75 percent. Model 1, which adjusted capacitance readings using derived linear equations factoring in thickness and ensemble-predicted oven-dry density, raised predictive performance to an R-squared of approximately 0.60 with an RMSE of 13.37 percent. Model 2 applied a simplified unified calibration approach, further improving performance to an R-squared of 0.68 and an RMSE of 11.98 percent.

The highest moisture prediction accuracy was achieved by Model 3, which combined ensemble-predicted oven-dry density with gravimetric mass tracking across dynamic water-saturation and drying cycles. When specimens were submerged until full saturation and monitored as moisture evaporated over 24-hour schedules, Model 3 attained an overall R-squared of 0.85 (0.8462) and reduced the prediction RMSE to 8.33 percent. While individual sample trajectories revealed subtle specimen-specific deviations stemming from anatomical density gradients and hygroscopic swelling, the authors emphasized that the method remains preliminary. The researchers noted that environmental lighting variations, sensor disparities, and sample size constraints necessitate broader validation across additional timber species before deployment in automated industrial sawmills.

Subject of Research: Non-destructive wood density and moisture content prediction using optical scanning and ensemble learning

Article Title: Integrating image analysis and ensemble learning for predictive modeling of wood density and MC using line scanner and camera systems

Article References: Hartanto, B. R., Ma, T., Kurata, Y., Kobori, H., Tsuchikawa, S., & Inagaki, T. (2026). Integrating image analysis and ensemble learning for predictive modeling of wood density and MC using line scanner and camera systems. Information Processing in Agriculture, 13(3), 358-372. https://doi.org/10.1016/j.inpa.2025.11.008

Image Credits: AI Generated

DOI: 10.1016/j.inpa.2025.11.008

Keywords: ensemble learning, wood density, moisture content, Japanese cedar, Japanese cypress, non-destructive testing, line scanner, camera scanner, image analysis, OpenCV, LightGBM, JAS 1083, capacitance moisture meter, gravimetric method, timber grading, wood science