欢迎访问林业科学,今天是

林业科学 ›› 2018, Vol. 54 ›› Issue (11): 121-126.doi: 10.11707/j.1001-7488.20181117

• 论文与研究报告 • 上一篇    下一篇

基于随机森林算法的纤维板表面缺陷识别

刘传泽1, 王霄2, 陈龙现1, 郭慧2, 罗瑞1, 周玉成1   

  1. 1. 山东建筑大学信息与电气工程学院 济南 250101;
    2. 中国林业科学研究院木材工业研究所 北京 100091
  • 收稿日期:2018-04-02 修回日期:2018-08-30 出版日期:2018-11-25 发布日期:2018-12-04
  • 基金资助:
    中国林业科学研究院中央级公益性科研院所基本科研业务费专项资金(CAFYBB2018MB002);泰山学者优势特色学科人才团队(2015162)。

Surface Defect Recognition of Fibreboard Based on Random Forest

Liu Chuanze1, Wang Xiao2, Chen Longxian1, Guo Hui2, Luo Rui1, Zhou Yucheng1   

  1. 1. College of Information and Electrical Engineering, Shandong Jianzhu University Jinan 250101;
    2. Research Institute of Wood Industry, CAF Beijing 100091
  • Received:2018-04-02 Revised:2018-08-30 Online:2018-11-25 Published:2018-12-04

摘要: [目的]提出一种基于随机森林(RF)算法的分类模型,以实现纤维板表面大刨花、胶斑、杂物、油污的快速、准确识别。[方法]获取100张规格为4 800 mm×2 400 mm的纤维板表面图像,利用Otsu阈值分割算法对图像进行分割,提取缺陷区域的面积(S)、周长(L)、长宽比(OR)、紧凑性(J)、矩形度(P)、圆形性(O)、灰度均值(u)及灰度的标准差(σD)、平滑度(σP)、偏度(σS)、峰度(σK)和均方根值(σR)12个特征属性的特征值作为试验数据。使用100份试验数据构建RF分类器,采用Bootstrap方法随机抽取2/3数据和8个特征作为输入构建k株决策树,组成RF,以每株决策树袋外数据(OOB)误差率均值作为RF分类器的评估指标确定决策树数量k。采用100张纤维板厂家提供的带有大刨花、胶斑、杂物和油污的纤维板对分类模型进行测试。[结果]当k=600时,RF分类器的OOB误差率均值最低为0.004,利用构建的RF分类器对纤维板厂家提供的100张纤维板进行缺陷识别,正确率为99%,每张纤维板的识别时间为525 ms,在识别时间和正确率上明显优于神经网络(NN)和支持向量机(SVM)。[结论]基于随机森林算法的分类器用于纤维板表面缺陷在线识别具有可行性,能够实现纤维板表面缺陷的快速、准确识别,满足纤维板缺陷在线检测系统的的准确性和实时性要求。

关键词: 纤维板, 缺陷识别, 分类模型, 特征提取, 随机森林

Abstract: [Objective] In order to satisfy the surface defect recognition quickly with high accuracy, a classification model based on random forest(RF) algorithm is proposed in this study, which can be used for identifying the big shavings, glue spots, debris, oil pollution quickly and accurately on the surface of fibreboard.[Method] Obtaining 100 surface defect images of 4 800 mm×2 400 mm fibreboard, using the Otsu algorithm to realize image segmentation, features including area(S), length(L), the length-width tatio(OR), compactness(J), rectanglarity(P), circularity(O), mean value(u), standard deviation(σD), smoothness(σP),skewness(σS), kurtosis(σK) and root mean square value(σR) of defect area were extracted, these were used as the experimental data. The experimental data were used for constructing RF classifier, choosing 2/3 data and eight features randomly by bootstrap method to construct k decision trees, the RF classifier were consist of these trees. The number of k is determined by calculating the outside data of the bag(OOB) error rate. 100 fibreboards with the wood shavings, glue spots, debris, and oil pollution were used to test by RF classifier.[Result] While k=600, the lowest average OOB error rate of the RF classifier is 0.004, the recognition accuracy of test is 99%, and the recognition time of one fibreboard is 525 ms. Therefore, the RF classifier is superior to NN and SVM on recognition time and accuracy.[Conclusion] The study proves the classifier based on RF algorithm is more feasibility and superiority on defect identification of fibreboard surface, it can achieve surface defect recognition quickly with high accuracy, satisfy the needs of on-line defect detection system of fibreboard.

Key words: fibreboard, defect recognition, classification model, feature extraction, random forest (RF)

中图分类号: