# Detection of Pest Feeding Traces on Industrial Wood Surfaces with 3D Imaging
## 2 Materials and Methods  
Based on an analysis of the imaging methods performed according to the assumptions, a decision was made to use three-dimensional imaging. This type of imaging makes it possible to describe a surface using measuring points described by three coordinates. The coordinates (x, y) described the point position, and the coordinate (z) defined the point height, which formed at the surface of the wood. It was assumed that the control system would operate in high-performance industrial conditions, which require the imaging of semi-finished wood products being transported at speeds of 1 m/s or more. The product should not be stopped at the inspection station, as this would reduce productivity. As a result of this approach, the LTM was chosen to image the wood surface. This method uses a laser line light to illuminate the wood surface. Using lasers operating in the 600-900 nm range allows constant surface illumination and registers a reproducible surface image regardless of the surface colour [54]. The conveyor systems of the machine moved the inspected boards in relation to the stationary vision system (Figure 2). A rotary encoder installed in the machine transmission system was responsible for synchronising the triggering of the acquisition of the 3D image of the wood surface. The method of illuminating the wood surface with the laser line is shown in Figure 2. The laser emits electromagnetic radiation with a wavelength of 658 nm and a power of P = 20 mW. The image of the laser line was recorded at a frequency depending on the acquired imaging resolution in the Y-axis direction. It was assumed that a circular image of the wormhole could have a diameter of not less than 1 mm. This research used a sensor with a resolution of 1536 \(\times\) 512 pixels. The field of view for the  
Figure 2 describes the method of recording the 3D images using laser triangulation. Figure 2b illustrates the working geometry of the laser and the camera that captures the images. The angular position between the laser plane and the camera's optical axis is also shown. This angle has a direct effect on the image resolution in the Z-axis. During the operation of the conveyor belt, consecutive laser images were recorded on the surface of the wood. The laser image was acquired after the object movement by 0.125 mm was related to the resolution in the Y-axis (\(\Delta\)Y). For each image, a height profile was determined by describing the cross-section of the assessed material in a location illuminated by the laser line. The position and shape of the laser line in the image defined the heights of the points that made up the imaged surface (Figure 2c). The position of the centre of the laser line was determined to establish the z-coordinate of the points. It was calculated for each point along the laser line (X-axis). The 3D image was built by assembling a series of height profiles determined in the laser plane (XZ plane) for successive positions of the laser lines on the material. The image built using this method was composed of a cloud of points spread over the surface of the wood with \(\Delta\)X and \(\Delta\)Y resolution. The height of each of these points was determined with a resolution of \(\Delta\)Z. During the analysis of the laser line image and the determination of the height profile points, an analysis of the intensity distribution in the cross-section of the laser line was used. This was the first image analysis operation to filter out noise on the wood surface. Figure 2: The 3D imaging method involved the following steps: (**a**) camera and laser alignment in relation to the surface imaged on the inspection station; (**b**) description of the geometry of the laser and camera setting for imaging in the LTM system; (**c**) view of the laser line projected on the wood surface’ (**d**) three-dimensional image of the wood surface; and (**e**) distribution of measurement points (imaging with resolution 0.125 mm/pixel).