On-Line Measurement of Wood Surface Smoothness

The latest progress in the field of optics and microelectronics resulted in the development of new generation vision systems capable of scanning surface topography with very high sampling frequencies. The blue color of illuminating light as well as novel systems for controlling ultra-thin laser line thickness allows the measurement of the porous surface of wood with a triangulation method. Three alternative sensors were tested here in order to verify their suitability for the determination of surface topography in the industrial environment. The scanning head was installed at the exit zone of the four-side profiling moulder and was set to scrutinize the wood surface shape line-by-line, immediately after profiling. The sensor was also tested for automatic detection of surface defects appearing on the elements after sanding, wetting and painting with various finishing products. The set of pilot test results is presented, together with an original algorithm for real-time surface defects detection.


UVOD
Surface smoothness of products manufactured from wood is a critical property highly affecting product quality, its value and in-service life performance (Sandak, 2005). In a majority of cases, the surface of wood is an effect of the material allowance removed with a sharp cutting edge. The magnitude of roughness depends on several factors, where material properties, machining process kinematics, cutting tool conditions and machining imperfections are dominant (Škaljić et al., 2009;Sofuoğlu, 2015). The ability for monitoring surface quality at the early stage of the production process was always a desire of process engineers (Nasir and Cool, 2018). Several methods were proposed for that purpose, but none of these were widely accepted by the wood industries. The superior methodology for monitoring surface smoothness should be non-contact, very fast, allowing on-line (preferably in-process) assessment and accurate enough to detect undesired defects (Zhao, 1992;Zhao, 1995; Župerl and Čuš, 2019; Dobrzynski et al., 2019;Lu et al., 2019). The best surface roughness scanner should allow measurement not only of a surface profi le but rather the whole surface area (Kiliç et al., 2018;Lu et al., 2017).
Wood surface measurements can be performed in industrial conditions assuming in-line, on-line or offline strategies (Figure 1). In-line installation of the smoothness sensor allows early detection of machining imperfections as the sensor monitors roughness directly after the cutting tool. In that case, the scanning frequency must be high enough to assure suffi cient representation of the surface, considering very high feed speeds of modern processing systems. The sensor itself has to be very rigid and resistant to harsh environments (dust, vibrations, shocks, etc.). As an alternative to the in-line approach, surface smoothness can be measured on the selected representative samples following an off-line strategy. In that case, the sample is removed from the production line and presented to the measurement system in a specially conditioned place (e.g., laboratory). Off-line measurement allows superior reproduction of surface topography, including whole area evaluation as well as high topography magnifi cation and optimal resolution. An apparent limitation of this solution is manual operation and inability for continuous analysis of a very limited number of samples. In between in-line and off-line is, therefore, on-line strategy, where the roughness sensor is installed separately from the woodworking machines on the main conveyer or for-the-purpose separated by-stream measurement line. On-line installation of the sensor allows measurement of all (or at least a high fraction) of produced surfaces, substantially increasing reliability of the quality assurance system (Lu and Tian, 2006).
The latest advancement in the fi eld of optics and microelectronics resulted in the development of new generation vision systems capable of scanning surface topography. Interferometry, confocal microscopy or image stacking decomposition, are today widely used methods for surface topography mapping in laboratories or off-line applications (de Grot, 2019). On the other hand, triangulation systems allow for scanning surfaces with very high sampling frequencies, while still assuring accurate surface roughness reconstruction (Sandak and Negri, 2007). Problematic red-light scatter on the fi brous surface of wood has been recently minimized by implementing blue lasers as a source of light (Šustek and Siklienka, 2018). In that case, short light wavelengths minimize laser line thickness, di-minishing the unwanted "tracheid effect". Such triangulation systems have been recently introduced on the market but never tested for their suitability in wood industries.
Aesthetical function of the wood surface dominates the highly customer-oriented market, where several alternatives to wood are available in a variety of applications (Manuel et al., 2015). One of the most demanding sectors is window production, where technical requirements for the surface quality of the fi nal product are extremely high. Wood machining is an integral part of the production process for wooden window frames, where the surface generated by planing directly affects the sequence of operations that follow, especially surface fi nishing by coating or painting. In practice, it is very diffi cult to determine the state of cutting tools, where these are required to be re-sharpened or replaced. The excessive presence of surface defects increases production costs and absorbs qualifi ed human resources for reparations. The challenge for this project was, therefore, to investigate the possibility of integrating state-of-the-art optical sensors with running production lines. Such sensors should scan the generated surface topography in-line or on-line, assuring autonomous operation and continuous data acquisition. Use of the sensor-derived data was to both:  alert operators about the presence of surface defects resulting from the wood cutting process, and  determine optimal time for replacement of the cutting tools, assuring compromise between long service life of the tool itself and superior surface quality of products.
This paper presents some of the preliminary results obtained during a pilot industrial test, together with a prototype software solution developed for the analysis of data provided by the surface smoothness sensor.

Triangulation sensors 2.1. Senzori za trianguliranje
Three alternative sensors were identifi ed for testing in order to verify their suitability for the determination of wood surface topography in the industrial environment:  Keyence LJ-7200 (scanned profi le length: 62 mm, spatial resolution: 0.10 mm)  Keyence LJ-7080 (scanned profi le length: 32 mm, spatial resolution: 0.05 mm)  Keyence LJ-7020 (scanned profi le length: 7 mm, spatial resolution: 0.01 mm) Figure 1 Assessment strategies for wood surface smoothness in the production factory Slika 1. Strategije procjene glatkoće površine drva u proizvodnji All sensors were equipped with similar CCD detectors but different arrangement of optical components (Keyence, 2019). As a result, with increasing scanning length, the spatial resolution (along the scanned profi le) was reduced, as well as accuracy for the determination of the minute surface irregularities, such as wood anatomical components. Figure 2 presents an example of surface profi les acquired by three sensors from the same wood sample (planed friezes made of Scots pine, measured in slightly different positions along the piece). It is evident that LJ-7200 covered a very wide part of the object, but the surface defi nition was relatively poor, especially when compared with LJ-7020. This disqualifi ed the wide-range sensor for further investigations of surface smoothness assessment; however, this sensor has been identifi ed as an optimal quality control tool for the accuracy of profi ling complex frame shapes used in window production. Both LJ-7080 and LJ-7020 sensors were selected for further tests and integrated with production lines.
The scanning frequency of triangulation scanners varied between 200 Hz and 2000 Hz, depending on the expected scanning density and available data for postprocessin g. It was possible to increase the scanning frequency even more (top scanning speed of 16 μs/62.5 kHz), but, in that case, spatial resolution of the surface maps along the scanned profi le decreased due to necessary pixel binning.
Two optional placements for the smoothness sensor were recognized in the production line of the window producing factory:  in-line: installed directly after the fi nal planing head of the profi ling moulder and before the water wetting station, and  on-line: on the conveyer transporting elements between operations.
Both options were tested during the pilot, providing important decision-making observations and a series of topography maps acquired during scanning of the produced elements. The in-line option was superior from the reliability point of view, assuring very fast and direct detection of surface defects − linking the surface quality with a specifi c cutting t ool. An important disadvantage was limited access to the sensor due to restricted space available in the machine and its vibrations. It is expected that the optical sensor has to be frequently inspected and cleaned from dust present in the vicinity of the cutting tools. The second obstacle for in-line implementation was the fact that, according to the technological process, the wood surface of window frame elements was wetted in order to lift any loose fi bers before implementing other operations. The wetting process resulted in dramatic changes of the wood surface smoothness itself (Molnár et al., 2019).
The on-line option was identifi ed as superior for the pilot testing as it allowed the measurement of real production samples as well as pre-selected specimens containing specifi c surface characteristics. In this case, the belt conveyor was adapted as a sample feeder, while the smoothness sensor was fi xed to the conveyor mechanical frame. The feed speed was set at 5 m/min, which corresponded to the real production speeds used in the window frame factory.
In both cases (in-line and on-line), the data from sensors were properly acquired and stored on the computer hard disk for further post-processing.

Model samples 2.2. Model uzoraka
The engineers supervising the production process in the window factory pre-selected a number of samples representing diverse surface quality grades corresponding to different production stages and examples of surface defects commonly occurring on the produced wooden elements. The samples included: raw resources arriving from the suppliers -before profi ling, wooden elements resulting from planing with different confi gurations of the grain angles, elements after surface sanding, elements with repaired defects by means of fi lling and fi nished wooden frames, assuming different coatings, colors and number of layers. The identifi cation, as well as description of surface defects, was conducted in collaboration with process engineers and operators. The most problematic surface defect highlighted was torn grain. The quantity of data generated during wood surface scanning with investigated sensors was very high, requiring development of dedicated software tools enabling real-time data acquisition and data mining. Custom software was developed in LabView 2017 (National Instruments) implementing the algorithm presented in Figure 3. The data were acquired as a stream directly from the triangulation sensor controller. These were post-processed twofold:  grey scale image was generated to simplify visualization of the surface topography, and  data were processed independently for each scanned profi le, determining standardized surface roughness parameters and variation along the sample length.
The surface images (maps) were used for further detailed analysis by means of open-source software Gwyddion (2019), which allowed optional fi ltering, fl attening as well as computation of 3D surface roughness parameters, among others. The fl attening of surface topography maps was performed by subtracting the main plane from the primary dataset. No band pass fi ltering was applied here to extract topography components, with exception of spike removal. Spikes were unwanted artefacts in the primary profi les that were not related to the measured surface but to the triangulation system errors, such as refl ectance and shape discontinuity, corner or sensor occlusion (Sandak, 2007). These were removed by implementing "mask of outliers" tool of the Gwyddion software.
From the industrial implementation point of view, however, the second approach (single profi le at once analysis) was more effi cient. The raw set of data collected from the sensor was fi rst fi ltered to remove border artefacts and spikes (single pixel wide and exceptionally high data points far from the mean line). The form error was also removed by extracting linear fi tting of the surface profi le points (r i ). Root Mean Square deviation of the primary profi le (Pq) parameter was then computed on the fi ltered and fl attened data according to ASME B46.1-2009 and ISO 4287-1997, as presented in Eq. 1: The Pq value can then be confronted with the threshold, and the operator can be alerted if the limit is frequently exceeded. The fi nal adjustment of both threshold and allowed limit exceeding was not performed within the framework of this research. It has to be confronted with real production requirements in the case of future implementation of the system. Nevertheless, the value of the threshold should refl ect the specifi c quality requirements for each component type and be closely related to the statistical process control data provided by the production managers. Figure 4 presents a direct comparison of profi les extracted for the 3D surface smoothness maps for both sensors tested on-line. It is evident that both provided very similar profi le outlines, with LJ-7020 being slightly more precise in representation of the short wavelength components. Both the spatial distribution of irregularities and these heights are matching. It indicates high suitability of both sensors for practical implementation.

REZULTATI I RASPRAVA
The scanning frequency affects the number of details (profi les) used for the detection of surface defects.  The arrow corresponds to the same reference length. The spatial resolution is, therefore, 10 times higher in the case of 2000 Hz scanning, providing also 10 times more data to be processed in real time. As the presence of torn grain was hardly detected on the 200 Hz scanning frequency, it was assumed that 1000 Hz was an optimal scanning frequency with conveyor feed speed of 5 m/min. According to production managers, torn grain was considered the most problematic surface defect (Farrokhpayam et al., 2010). The specifi c characteristics of torn grain (void under the mean surface line of relatively high depth and width) allow automatic detection by simple thresholding of the surface image af ter removing the form error. Figure 6 presents an example of torn grain as sensed on-line with the triangulation sensor. It is also evident that the appearance of the surface profi le corresponding to earlywood and latewood differs. It is not clear, however, if the differences are affected by the anatomical structure topography or by differences in laser light scattered on optically varying wood zones. Additional laboratory tests with benchmark references method are therefore required to ultimately defi ne the triangulation sensor limitations.
Other surfaces were also tested in the pilot installation, with some of the results summarized in Figure  7. The 3D surface map, generated on the basis of sen-sor readings as well as Pq smoothness computed for each profi le along the scanning length, are presented for samples provided by production managers. As mentioned above, it was rather easy to detect torn grain as these irregularities have high Pq values. The results follow the expected trends, where the implementation of technological operations (with the exception of wetting) reduced overall smoothness. The surface roughness of fi nished surfaces was the smallest and most uniformly distributed along the sample length. Figure 8 presents an example of representative profi les scanned on model samples, including sections covering defects or other distinctive topography features. The presence of torn grain is evident in samples #2, #4 and #6. Moreover, the decrease of smoothness profi le amplitude is noticeable during the implementation of subsequent fi nishing process steps. The smoothest surfaces are perceived for coated samples, with the exception of #6 where wavy structure is related to the presence of miniature torn grains and surface pattern on early-and late-wood caused by water-based coating.
A comparative summary of these measurements is presented in Figure 9 as a histogram of Pq smoothness determined for each sample. The roughest were rough planed board (#1) and excessive torn grain (#2), in contrast to the coated white sample (#8) with a single histogram peak in the lowest smoothness bin. The histogram analysis was found as the most promising

ZAKLJUČAK
The present research was triggered by discussion with production managers raising an emerging problem of wood surface smoothness assessment in industrial realities. Optimal sensors for refi ned (Keyence LJ-7020) and accurate enough (Keyence LJ-7080) scanning of the wood surface topography were tested in an industrial environment in-line and on-line. Both sensors proved their usability and were able to access surfaces of diverse qualities and fi nishing states. A simple algorithm for real-time data processing has been proposed and implemented as a prototype. The followup to this project, including the development of a dedicated portable scanner for in-fi eld inspection of produced elements with an optional integration to the processing lines, is currently under way. agreement #739574) under the Horizon2020 Widespread-Teaming program and the Republic of Slovenia (investment funding of the Republic of Slovenia and the European Union's European Regional Development Fund) and infrastructural ARRS program IO-0035. "Delivering fi ngertip knowledge to enable service life performance specifi cation of wood" -CLICK DE-SIGN (N° 773324) supported under the umbrella of ERA-NET Cofund ForestValue by Ministry of Education, Science and Sport of the Republic of Slovenia. ForestValue has received funding from the European Union's Horizon 2020 research and innovation programme.
The anonymous window producer company and its production managers are acknowledged for allowing pilot tests on their production lines. Thanks to Keyence Europe, and especially Tomasz Michalski, for renting sensors and technical assistance during the pilot tests.
Part of this research has been presented during 24th International Wood Machining Seminar held at Oregon State University, Corvallis (USA) on August 25 -30, 2019.