Simultaneous Wood Defect and Species Detection with 3D Laser Scanning Scheme

Wood grading and wood price are mainly connected with the wood defect and wood species. In this paper, a wood defect quantitative detection scheme and a wood species qualitative identification scheme are proposed simultaneously based on 3D laser scanning point cloud. First, an Artec 3D scanner is used to scan the wood surface to get the 3D point cloud. Each 3D point contains itsX, Y, and Z coordinate and its RGB color information. After preprocessing, the Z coordinate value of current point is compared with the set threshold to judge whether it is a defect point (i.e., cavity, worm tunnel, and crack). Second, a deep preferred search algorithm is used to segment the retained defect points marked with different colors. The integration algorithm is used to calculate the surface area and volume of every defect. Finally, wood species identification is performed with the wood surface’s color information.The color moments of scanned points are used for classification, but the defect points are not used. Experiments indicate that our scheme can accurately measure the surface areas and volumes of cavity, worm tunnel, and crack on wood surface with measurement error less than 5% and it can also reach a wood species recognition accuracy of 95%.


Introduction
Wood species and wood defects are two key issues in the wood quality assessment so as to judge the physical property and commercial value of different wood products (e.g., wood veneer, lumber, or board) correctly [1].Some visual image characteristics have been used in the wood species recognition and can be divided into two general categories: wood surface's texture analysis [2,3] and its color analysis [4,5].Recently, the wood spectral reflectance characteristics are also exploited for the species classification.The more common schemes in the literature consider the vibration spectroscopy [6,7] and the Raman spectroscopy [8].For example, Piuri and Scotti present a scheme for the wood species classification based on the analysis of fluorescence spectra [9].
As for the wood surface's defect detection, the spectral analysis and laser scanning schemes are usually used to fulfill the qualitative detection on the wood external defects (e.g., cavity, worm tunnel, knots, or erosion) [10][11][12].Researchers also have proposed some schemes for detecting wood internal defects by using X-rays, gamma rays, microwaves, and longitudinal stress waves [13][14][15].For example, Wang et al. combine the wavelet transform and neural networks to analyze and recognize different types and sizes of wood internal defects using an ultrasonic device [16].
However, simultaneous investigations on wood species and wood defect detections are scarcely performed to make an objective wood quality assessment.In fact, wood species detection and wood defect detection are usually performed with different instruments or technologies.Even if the same instrument or technology such as spectral analysis may be used for wood species and defect detection, the mutual disturbance exists so that the detection accuracy is low.For example, the wood species recognition accuracy is not good for wood veneer if there are many defects on wood surface by using spectral reflectance features.To solve this hard issue, we use a 3D laser scanning instrument to make a qualitative wood species recognition and a quantitative wood defect measurement (i.e., the precise measurement of surface area and volume of every external defect such as cavity, worm tunnel, and crack on the wood product's surface) simultaneously.Therefore, the wood detection efficacy is improved by using our scheme and it can provide a better basis for the subsequent wood quality assessment.

Materials and Methods
2.1.3D Scan.The 3D scan is a nondestructive detection technology based on laser processing with a fast scan speed and a high scan accuracy.Therefore, it is usually used in the object's 3D reconstruction.In our scheme, a portable Artec 3D laser scanner is used to get the wood surface's 3D point cloud, as illustrated in Figure 1.This scanner is small and portable with an adjustable flash lamp and with a 3D scan resolution of 0.5 mm.It is used conveniently with a number of data storage formats.This scanner is equipped with software system Artec Studio 9 to read the scanner data and then display the scanned object's surface.The object's surface is calibrated with the instrument's XOY plane automatically by this software and then the object's surface is stored as a file with OBJ format.For example, Figure 2 illustrates the scanned wood surface in the Artec Studio 9.Each scanned point contains its , , and  coordinate and its RGB color information.The point's , , and  coordinates are used in the defect detection, while its RGB information is used in the species recognition.

Defect Segmentation.
In this section, two steps need to be executed to segment different defects.First, every point's  coordinate is compared with the set threshold to determine whether this point is a depressed defect (i.e., cavity, worm tunnel, and crack) point.Second, the retained defect points are processed with a deep preferred search algorithm to segment different defects.The defect points which belong to the same defect will be marked with the same number and displayed with the same color.A detailed flow graph is illustrated in Figure 3, and different defects are displayed with different colors, as illustrated in Figure 4.

Defect Measurement.
For every defect such as every cavity or worm tunnel, we propose an integration scheme to calculate its surface area and volume.To achieve this goal, we need to extend each defect point into a small surface.As illustrated in Figure 5, every three adjacent defect points form a triangle plane, while each defect point is the vertex of six triangle planes.Therefore, we should extend each defect point into a regular hexagon surface model, as illustrated in Figure 6.In Figure 6, the point  is the current processed defect point with six adjacent points ∼.We draw six midnormals on , , . . ., , and these six midnormals intersect each other at the six vertices , , , , , and .These six cross-points form a small purple regular hexagon.In fact, we finally extend each defect point into this small purple regular hexagon .
As for the surface area computation of every defect, we should firstly calculate the area of the small purple regular hexagon .Define  as the mean distance value of parallel opposing sides such as  and  in , and this distance  can be approximated as the mean length value of six sides , , , . . ., .After we calculate every defect point's surface area (i.e., the area of PQRSNT), then we can summarize all defect point's areas of one defect to get one defect's total surface area, as illustrated in As for the volume computation of every defect, we should also similarly extend a defect point  into regular hexagon PQRSNT.In this way, we can summarize all defect point's volumes of one defect to get one defect's total volume, as illustrated in In ( 2), the corresponding volume for every defect point  is approximated as the volume of the regular hexagonal prism, as illustrated in Figure 7.The height ℎ is approximated as   , which is the absolute value of  coordinate of the th defect point.

Species Identification.
Wood species identification is performed with wood surface's color information.Each scanned point contains its , , and  coordinate and its RGB color information.The point's RGB color information is used here to calculate the color moment features for subsequent species identification.Obviously the wood surface's defect points will disturb the precise calculations of color moment features and these defect points should be deleted.Fortunately, in Section 2.2, we have successfully extracted these defect points and therefore the disturbance from defect points can be overcome effectively.
The following three color moments are used for RGB three channels, and we can get 9 classification features.As for the classifier design, the BP neural network is used. . (3)

Results and Discussions
3.1.Defect Detection.We select many wood products which have cavity, worm tunnel, or crack for experiments (one example is illustrated in Figure 8).The Artec 3D scanner is used to get the wood surface's point cloud data, and subsequent defect segmentation and measurement are performed by use of C language programming.One detailed defect detection result is illustrated in Figure 9.
In order to evaluate our defect detection scheme's measurement accuracy objectively, a simulation experiment is designed here.We select some standard wood boards without any defects on their smooth surfaces and then we use electric drills to drill some pores with different sizes on board surfaces.These drilled pores are the standard cylinder pores    with diameter 4 mm∼20 mm and height 1 mm∼5 mm.We use our scheme to calculate the surface areas and volumes of these cylinder pores and the standard surface areas and volumes are calculated with cylinder's area and volume formulas.By this way, we can objectively determine our scheme's measurement errors and detailed errors are illustrated in Tables 1 and 2. By comparisons, we can see that our measurement accuracy decreases gradually when the cylinder's height increases.
The main measurement error is from the scanning error of Artec scanner, which performs the surface scanning and its scanning error will increase when the depressed defect's height increases.But within the cylinder defect's height 3 mm, our scheme's measurement is good with the relative errors less than 5%. in Tables 3 and 4, where we can see that the recognition accuracy of our scheme with defect points deleted is better than that of ordinary color moment-based scheme.

Conclusions
In this paper, we have proposed a simultaneous wood defect and wood species detection scheme based on 3D scanning and signal processing.It can measure the wood surface's depressed defects quantitatively in terms of area and volume.Moreover, we also find that wood defects usually disturb the wood species identification.Therefore, based on the wood defect's detection results, an improved wood species identification based on color moments is also proposed by deleting those defect points.For example, the measurement errors for wood defect's areas and volumes can be approximately less than 5% if the defect's height is less than 3.0 mm.Moreover, the improved wood species recognition scheme can achieve a recognition accuracy of 95% approximately for 5 wood species.Therefore, our wood quality detection scheme is portable and efficient which can be applied in the practical wood processing factory.In fact, our scheme may be further used in other detection fields such as the surface detections of online industrial products.

Figure 2 :
Figure 2: Scanned wood surface in the Artec Studio 9.

Figure 3 :
Figure 3: The flow graph on wood defect segmentation.

Figure 4 :
Figure 4: The segmented defects displayed with different colors.

Figure 5 :Figure 6 :Figure 7 :
Figure 5: Wood surface's grid graph in the Artec Studio 9 without color information.

Figure 9 :
Figure 9: The detailed wood defect's measurement results.

Table 1 :
Volume measurement error for cylinder cavity.

Table 2 :
Surface area measurement error for cylinder cavity.

Table 3 :
Pattern recognition accuracy comparisons for our scheme and ordinary color moment-based scheme (RS).

Table 4 :
Pattern recognition accuracy comparisons for our scheme and ordinary color moment-based scheme (TS).