Laboratory Validation of a Low-Cost Embedded Computer Vision System for Automated Defect Detection in Beech Sawn Timber
Abstract
The digital transformation of the wood-processing industry increasingly relies on computer vision, artificial intelligence (AI), and embedded sensing technologies to automate timber quality assessment. This study presents the laboratory validation (TRL4) of a low-cost embedded computer-vision demonstrator for automated surface-defect detection in beech (Fagus sylvatica) sawn timber, developed as the first operational module of the SMARTWOOD-AI technology-transfer platform. The system integrates a Raspberry Pi 4 single-board computer with a Sony IMX500 intelligent camera and employs an interpretable computer-vision pipeline based on 21 handcrafted colour (HSV), texture (Gray-Level Co-occurrence Matrix and Local Binary Patterns), and edge-density (Canny) features classified using a Random Forest algorithm. A dataset comprising 24 beech boards (192 labelled image regions) was evaluated using a board-level train/validation partitioning strategy to prevent data leakage. The classifier achieved an average accuracy of 88.2% (±7.1%) during five-fold cross-validation and 82.5% accuracy on an independent validation set, with high sensitivity for defect detection (recall = 0.93, F1-score = 0.88). The results demonstrate the technical feasibility of the proposed embedded inspection architecture and establish a reproducible experimental baseline for future integration of deep-learning models, digital twins, and intelligent cutting optimisation within the SMARTWOOD-AI platform.
Keywords
Download Options
Introduction
The digital transformation of the wood-processing industry is reshaping the way timber quality is assessed and production decisions are made. Within the Industry 4.0 and Industry 5.0 paradigms, computer vision, artificial intelligence (AI), edge computing and digital-twin technologies are increasingly integrated to automate inspection processes, improve production efficiency and maximise raw-material utilisation. Recent bibliometric evidence based on more than one thousand scientific publications demonstrates a rapid acceleration of research on AI-assisted wood inspection, with surface quality assessment representing one of the most active application domains [1]. As a consequence, automated defect detection has become a key enabling technology for intelligent sawmills, where reliable visual information can directly support optimisation of cutting strategies and resource utilisation.
Despite these advances, quality grading in many small and medium-sized wood-processing enterprises still relies predominantly on manual visual inspection. Although experienced operators can identify most visible defects, the process remains subjective, operator-dependent and sensitive to fatigue, illumination conditions and the inherent variability of natural wood. These limitations often result in inconsistent grading decisions and inefficient material utilisation [2, 3]. Since natural defects may reduce industrial timber utilisation to only 50–70% [4], the development of reliable automated inspection systems remains both an industrial and an economic priority.
Conclusion
This paper presented the laboratory validation of a low-cost embedded computer-vision demonstrator for the automated detection of defects in beech sawn timber, developed as the first functional module of the SMARTWOOD-AI platform. The study demonstrated that an integrated inspection chain combining embedded image acquisition, image preprocessing, hand-crafted feature extraction and Random Forest classification can successfully operate under controlled laboratory conditions, thereby fulfilling the requirements associated with Technology Readiness Level 4 (TRL4 – Technology validated in laboratory).
The experimental evaluation confirmed the technical feasibility of the proposed approach. The demonstrator achieved 82.5% accuracy on an independent validation set, while maintaining high sensitivity for defect detection (precision = 0.84, recall = 0.93 for the defect class). Although the experimental dataset was intentionally limited and highly imbalanced, the adopted methodology—including board-level data partitioning, feature-importance analysis and critical error evaluation—provided a realistic assessment of the system performance and established a robust experimental baseline for future developments. Beyond the reported classification performance, the principal contribution of this work lies in the validation of an embedded inspection architecture rather than in the optimisation of a single machine-learning algorithm. The proposed system demonstrates that interpretable classical computer-vision techniques remain a practical solution during the early stages of technology maturation, particularly when limited datasets, low computational requirements and transparent decision-making are important design constraints. Furthermore, the integration of a Raspberry Pi 4 with a Sony IMX500 intelligent vision sensor represents a promising embedded architecture for future industrial deployment of AI-assisted timber inspection systems.
The findings also identify the main challenges that must be addressed before industrial implementation. These include increasing the diversity and size of the experimental dataset, improving robustness against machining artefacts and natural texture variability, and extending the methodology from binary classification towards multiclass defect detection and localisation using deep-learning models.
Finally, this work establishes the technological foundation for the subsequent development of the SMARTWOOD-AI platform. The validated computer-vision module will provide objective defect information to future digital-twin models, multi-objective cutting optimisation algorithms and closed-loop decision-support mechanisms. The present work therefore provides not only a validated embedded computer-vision demonstrator but also a reproducible experimental framework that can support the progressive maturation of AI-assisted timber inspection systems from laboratory validation (TRL4) towards industrial deployment (TRL9).
References
[1] An, H., Liang, Z., Qin, M., Huang, Y., Xiong, F., & Zeng, G. (2024). Wood defect detection based on the CWB-YOLOv8 algorithm. Journal of Wood Science, *70*(1), Article 26. https://doi.org/10.1186/s10086-024-02139-z
[2] Capogrosso, L., Bonazzi, P., Hoxhaj, L., & Magno, M. (2026). Exploiting in-sensor computing for energy-efficient earth observation.
[3] Casas, G. G., Ismail, Z. H., & Leite, H. G. (2026). Computer vision, machine learning, and deep learning for wood and timber products: A Scopus-based bibliometric and systematic mapping review (1983–2026, early access). Forests, *17*(1), Article 112. https://www.mdpi.com/1999-4907/17/1/112
[4] Chabanet, S., Bril El-Haouzi, H., Morin, M., Gaudreault, J., & Thomas, P. (2023). Toward digital twins for sawmill production planning and control: Benefits, opportunities, and challenges. International Journal of Production Research, *61*(7), 2190-2213. https://doi.org/10.1080/00207543.2022.2068086
[5] Chabanet, S., El Haouzi, H., & Thomas, P. (2023). Toward a sawmill digital shadow based on coupled simulation and supervised learning models. In Proceedings (pp. 59-70).
[6] Deniz, M., Bogrekci, I., & Demircioglu, P. (2025). Real-time detection of hole-type defects on industrial components using Raspberry Pi 5. Applied System Innovation, *8*(4), Article 89. https://www.mdpi.com/2571-5577/8/4/89
[7] Fan, C., Zhuang, Z., Liu, Y., Yang, Y., Zhou, H., & Wang, X. (2024). Bilateral defect cutting strategy for sawn timber based on artificial intelligence defect detection model. Sensors, *24*(20), Article 6697. https://www.mdpi.com/1424-8220/24/20/6697
[8] Fredriksson, M. (2015). Optimizing sawing of boards for furniture production using CT log scanning. Journal of Wood Science, *61*(5), 474-480. https://doi.org/10.1007/s10086-015-1500-0
[9] Gao, M., Qi, D., Mu, H., & Chen, J. (2021). A transfer residual neural network based on ResNet-34 for detection of wood knot defects. Forests, *12*(2), Article 212. https://www.mdpi.com/1999-4907/12/2/212
[10] Han, S., Jiang, X., & Wu, Z. (2023). An improved YOLOv5 algorithm for wood defect detection based on attention. IEEE Access, *11*, 71800-71810. https://doi.org/10.1109/ACCESS.2023.3293864
[11] He, T., Liu, Y., Xu, C., Zhou, X., Hu, Z., & Fan, J. (2019). A fully convolutional neural network for wood defect location and identification. IEEE Access, *7*, 123453-123462. https://doi.org/10.1109/ACCESS.2019.2937461
[12] He, T., Liu, Y., Yu, Y., Zhao, Q., & Hu, Z. (2020). Application of deep convolutional neural network on feature extraction and detection of wood defects. Measurement, *152*, Article 107357. https://doi.org/10.1016/j.measurement.2019.107357
[13] Hittawe, M. M., Sidibé, D., & Mériaudeau, F. (2015). A machine vision based approach for timber knots detection. In The International Conference on Quality Control by Artificial Vision 2015. SPIE.
[14] Hu, C., Min, X., Yun, H., Wang, T., & Zhang, S. (2011). Automatic detection of sound knots and loose knots on sugi using gray level co-occurrence matrix parameters. Annals of Forest Science, *68*(6), 1077. https://doi.org/10.1007/s13595-011-0123-x
[15] Hu, J., Song, W., Zhang, W., Zhao, Y., & Yilmaz, A. (2019). Deep learning for use in lumber classification tasks. Wood Science and Technology, *53*(2), 505-517. https://doi.org/10.1007/s00226-019-01086-z
[16] Hwang, S.-W., Lee, T., Kim, H., Chung, H., Choi, J. G., & Yeo, H. (2021). Classification of wood knots using artificial neural networks with texture and local feature-based image descriptors. Holzforschung, *76*(1), 1-13. https://doi.org/10.1515/hf-2021-0051
[17] Ji, M., Zhang, W., Diao, X., Wang, G., & Miao, H. (2023). Intelligent automation manufacturing for Betula solid timber based on machine vision detection and optimization grading system applied to building materials. Forests, *14*(7), Article 1510. https://www.mdpi.com/1999-4907/14/7/1510
[18] Ji, M., Zhang, W., Han, J.-k., Miao, H., Diao, X.-l., & Wang, G.-f. (2024). A deep learning-based algorithm for online detection of small target defects in large-size sawn timber. Industrial Crops and Products, *222*, Article 119671. https://doi.org/10.1016/j.indcrop.2024.119671
[19] Kamal, K., Qayyum, R., Mathavan, S., & Zafar, T. (2017). Wood defects classification using laws texture energy measures and supervised learning approach. Advanced Engineering Informatics, *34*, 125-135. https://doi.org/10.1016/j.aei.2017.09.007
[20] Kılıç, K., Kılıç, K., Doğru, İ., & Özcan, U. (2025). WD Detector: Deep learning-based hybrid sensor design for wood defect detection. European Journal of Wood and Wood Products, *83*. https://doi.org/10.1007/s00107-025-02211-5
[21] Li, R., Zhong, S., & Yang, X. (2025). Wood panel defect detection based on improved YOLOv8n. BioResources, *20*, 2556-2573. https://doi.org/10.15376/biores.20.2.2556-2573
[22] Lin, X., et al. (2025). WDNET-YOLO: Enhanced deep learning for structural timber defect detection to improve building safety and reliability. Buildings, *15*(13), Article 2281. https://www.mdpi.com/2075-5309/15/13/2281
[23] Lukovic, M., et al. (2024). Probing the complexity of wood with computer vision: From pixels to properties. Journal of The Royal Society Interface, *21*(213). https://doi.org/10.1098/rsif.2023.0492
[24] Nasir, V., Rahimi, S., Mohammadpanah, A., Hansen, E., & Sassani, F. (2024). Intelligent lumber production (Sawmill 4.0): Opportunities, challenges, and pathways to adoption. In M.-R. Alam & M. Fathi (Eds.), Integrated systems: Data driven engineering (pp. 213-231). Springer Nature Switzerland.
[25] Okano, M. T., Lopes, W. A. C., Ruggero, S. M., Vendrametto, O., & Fernandes, J. C. L. (2025). Edge AI for industrial visual inspection: YOLOv8-based visual conformity detection using Raspberry Pi. Algorithms, *18*(8), Article 510. https://www.mdpi.com/1999-4893/18/8/510
[26] Ozkan, M., Ozcan, C., & Gökmen, S. (2025). Deep learning based defect detection and quality classification on lamella pieces used in solid wood panel production. Operations Research Forum, *6*. https://doi.org/10.1007/s43069-025-00534-w
[27] Popa, S. E., Puiu, P. G., Andrioaia, D. A., Grigore, R. M., & Avădanei, R. L. (2026). Indirect estimation of absorbed infrared LED radiant power using contactless thermal sensing. Sensors, *26*(13), Article 4055. https://www.mdpi.com/1424-8220/26/13/4055
[28] Urbonas, A., Raudonis, V., Maskeliūnas, R., & Damaševičius, R. (2019). Automated identification of wood veneer surface defects using faster region-based convolutional neural network with data augmentation and transfer learning. Applied Sciences, *9*(22), Article 4898. https://www.mdpi.com/2076-3417/9/22/4898
[29] Wang, B., Wang, R., Chen, Y., Yang, C., Teng, X., & Sun, P. (2025). FDD-YOLO: A novel detection model for detecting surface defects in wood. Forests, *16*(2), Article 308. https://www.mdpi.com/1999-4907/16/2/308
[30] Wang, R., Chen, Y., Liang, F., Wang, B., Mou, X., & Zhang, G. (2024). BPN-YOLO: A novel method for wood defect detection based on YOLOv7. Forests, *15*(7), Article 1096. https://www.mdpi.com/1999-4907/15/7/1096
[31] Wang, R., Liang, F., Wang, B., Zhang, G., Chen, Y., & Mou, X. (2024). An efficient and accurate surface defect detection method for wood based on improved YOLOv8. Forests, *15*(7), Article 1176. https://www.mdpi.com/1999-4907/15/7/1176
[32] Wu, L., et al. (2026). A lumber surface defect detection network integrating deformable convolution and multi-scale attention. Forests, *17*(7), Article 839. https://www.mdpi.com/1999-4907/17/7/839
[33] Xi, H., Wang, R., Liang, F., Chen, Y., Zhang, G., & Wang, B. (2024). SiM-YOLO: A wood surface defect detection method based on the improved YOLOv8. Coatings, *14*(8), Article 1001. https://www.mdpi.com/2079-6412/14/8/1001.