1 Introduction

Laser light scattering inside wood fibres, better known as the ‘tracheid effect’, is a well-established and well researched method of detecting fibre directions of the softwoods (Nyström 2003; Sarén et al. 2006; Simonaho et al. 2004) with many commercially available industrial solutions. Knowledge of the direction of the grain is vital in determining the local strength characteristics of the wood (Brännström et al. 2008; Briggert et al. 2018; Olsson et al. 2018; Olsson and Oscarsson 2017), predicting bending strength and stiffness (Olsson et al. 2013), as well as inform on the locations of certain defects such as knots (Törmänen and Mäkynen 2009), pith (Briggert et al. 2016), and compression wood (Taylor 2008). Local grain angle coupled with X-ray imaging (to obtain local wood density) provides for good estimation of the local modulus of elasticity of the board (Viguier et al. 2015, 2017). Besides estimating strength properties of wood, for finger-jointed boards made of softwoods in particular, grain direction at the narrow fingers is critical—grain that are parallel to the fingers are preferred for strength at the joints. In most major brands of cross-cut optimizers, grain direction detection using tracheid effect is now a standard feature, such as Microtec Linköping Woodeye, Weinig CombiScan, Cursal Cross-Scan, Bottene Merlin, WoodInspector Q-Scan, ATB Blank Spectra, and Paul Machinenfabrik Wood Vision Scanner.

However, implementation of this tracheid effect technique in hardwood species is met with limited success due to the shorter fibres and limited diffusion of laser light in certain species with higher densities (Jolma and Mäkynen 2007). Hardwoods that were tested and worked successfully were ash (Fraxinis excelsior), basswood (Tilia spp.), European beech (Fagus sylvatica), birch (Betula pendula), maple (Acer spp.) (Schlotzhauer et al. 2018), silver birch (Betula pubescens) (Simonaho et al. 2004), sweet chestnut (Castanea sativa), oak (Irish, Quercus petraea, and English oak, Quercus robur) (Besseau et al. 2020), and Japanese beech (Fagus crenata) (Hu et al. 2004). As for red oak (Quercus rubra), black walnut (Juglans nigra) and black cherry (Prunus serotina), tracheid effect was hardly observed (Zhou and Shen 2003). There is a dearth of studies on tropical hardwood species as most of the studies focused on common European and American species.

An alternative method was proposed (Daval et al. 2015) by means of using heating conduction, and this method was tested successfully on poplar (Populus spp.) and sessile oak (Quercus petraea). However, practical considerations such as excitation time needed for heating render this method unsuitable for industrial deployment without further improvements to their methods. Moreover, they require higher powered lasers with wavelengths exceeding 1000 nm and special thermal cameras which are costly implementations, and heating of wood cells (albeit briefly) may introduce other unintended secondary effects on the wood.

This paper aims to address the primary gap in wood research, namely, to investigate the ‘tracheid effect’ phenomenon on light red meranti (Shorea spp.) (LRM) using both red as well as near infrared (NIR) lasers. Pine was used as a comparison. LRM is one of the most widely used timber in Malaysia, therefore results from this study shall be very informative for users of LRM timber looking to exploit this effect for automating their production lines.

Past researchers typically used specialized imaging equipment to capture the tracheid effect, for example using cameras equipped with matrix array picture processors (MAPP) (Nyström, 2003). This is particularly so when NIR lasers were used, for instance, the use of multisensory cameras similar to WoodEye 5 scanners (Briggert et al. 2016), and an infrared camera Basler acA2000-340 (Besseau et al. 2020). In this study, we assessed the viability of using regular modern CMOS industrial cameras to detect near infrared laser light rather than resorting to using special infrared cameras to detect this effect. This enables implementations at reasonable costs.

2 Materials and methods

2.1 Laser and Sensor Selection

Selection of laser wavelength and the camera used is critical, particularly when infrared wavelengths are used. Not all cameras respond equally to wavelengths in the near infrared spectrum even for those using the exact same image sensors—this depends on the choice of filters the manufacturer chooses to use in the product. Most consumer cameras are typically fitted with infrared cut off filters (typically at 700 nm) (Mangold et al. 2013) to prevent distortion of visible colours by infrared irradiation by warm or hot objects. While it is technically possible to extricate these filters to perform tests, it is impractical for industrial solutions, whereby purchasing an infrared camera would be easier.

However, some industrial cameras do not use these infrared cut-off filters (as do some close-circuit television cameras, or CCTVs, to enable night vision modes). We chose Hikrobot MV-CE200-10UC as opposed to its monochrome equivalent (MV-CE200-10UM) because while they both have almost equal normalized efficiency at 650 nm, MV-CE200-10UC elicited higher sensitivity than the MV-CE200-10UM at 808 nm (refer to Fig. 1). Furthermore, it (MV-CE200-10UC) provided almost equal response in all three red, green, and blue channels in the near infrared region above 800 nm. Likewise, we chose an 808 nm NIR laser as that is the closest one that is commercially available that responds equally in all three colour channels and has the highest possible spectral sensitivity (around 0.5). As for the red laser’s wavelength, we chose 650 nm as this was also commercially available and close to what was used in other studies as shown in Table 1.

Fig. 1
figure 1

Sensor quantum efficiencies for a Hikrobot MV-CE200-10UC, and b an equivalent monochrome camera Hikrobot MV-CE200-10UM (extracted from product brochure)

Table 1 Laser wavelengths used in selected previous studies, their respective output power, and methods of detecting ellipse

2.2 Ellipse angle detection

From the analysis of the quantum efficiency curves in Fig. 1 as well as individual channel analysis of the resulting images, it is evident that grayscale conversion from the colour image is disadvantageous to this study. The main reason for this is because the wavelengths of the lasers used in this study were in the red and infrared bandwidths. However, the grayscale conversion (Eq. 1) factor only weighs the red channel values at less than 30%. Saturation and blooming effects of the sensor, which contributes to spurious signals in the green and blue channels, limit the usable exposure level of the camera. This inevitably results in the tracheid effect that is registered in the red channel being depressed by low signal levels of the green and blue channels. As for the 808 nm NIR laser analysis, all the three channels had almost equal sensitivities around the 800 nm region, therefore all three channels were tested separately, and their results were compared.

$$Y = 0.2989R + 0.5870G + 0.1140B$$
(1)

where, \(Y\) is the grey intensity, \(R, G, B\) is the red, green, and blue channels’ intensities.

Having reviewed all the different methods of ellipse angle detection methods, detection using second order spatial moments appeared to be the most common method. This method of blob analysis is very straightforward, which is by calculating the axis of which the moment of inertia is at its minimum. The angle of the primary axis is calculated using Eq. 5 (Owens 1997), using second order moments shown in Eqs. 24 (Shapiro and Stockman 2000). The lengths of the major and minor axes of the ellipse are given by Eqs. 6 and 7, and the eccentricity and major-minor axes ratio are given by Eqs. 8 and 9 respectively. Parameters are as illustrated in Fig. 2.

$$M_{yy} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \left( {y_{i} - \overline{y}} \right)^{2}$$
(2)
$$M_{xx} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \left( {x_{i} - \overline{x}} \right)^{2}$$
(3)
$$M_{xy} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \left[ {\left( {y_{i} - \overline{y}} \right)\left( {x_{i} - \overline{x}} \right)} \right]$$
(4)
$$\theta = \frac{1}{2} \cdot \tan^{ - 1} \left( {\frac{{2M_{xy} }}{{M_{yy} - M_{xx} }}} \right)$$
(5)
$$L_{{{\text{major}}}} = \sqrt {8\left( {M_{xx} + M_{yy} + \sqrt {\left( {M_{xx} - M_{yy} } \right)^{2} + 4M_{xy}^{2} } } \right)}$$
(6)
$$L_{{{\text{minor}}}} = \sqrt {8\left( {M_{xx} + M_{yy} - \sqrt {\left( {M_{xx} - M_{yy} } \right)^{2} + 4M_{xy}^{2} } } \right)}$$
(7)
$$\varepsilon_{{{\text{moment}}}} = \sqrt {1 - \left( {\frac{{L_{{{\text{minor}}}} }}{{L_{{{\text{major}}}} }}} \right)^{2} }$$
(8)
$$r_{{{\text{moment}}}} = \frac{{L_{{{\text{major}}}} }}{{L_{{{\text{minor}}}} }}$$
(9)

where, \({M}_{yy}\) is the variance of plots in the y-axis, \({M}_{xx}\) is the variance of plots in the x-axis, \({M}_{xy}\) covariance of plots in the x and y axes, \(n\) is the number of plots, \(\overline{x }\), \(\overline{y }\) is the mean values of plots for the x and y coordinates, \(\theta\) is the angle of primary axis from x-axis, \({L}_{\text{major}}\), \({L}_{\text{minor}}\) is the length of the major and minor axes of the ellipse, \({\varepsilon }_{\text{moment}}\) is the eccentricity of ellipse using second order spatial moments method, \({r}_{\text{moment}}\) is the major to minor axes ratio using second order spatial moments method.

Fig. 2
figure 2

Main parameters for both the second order moment and the PCA methods for analysing ellipticity of binary images

The Principal Component Analysis (PCA) method, on the other hand, finds the bisecting line of any 2-dimensional dataset whereby orthogonal projections of all plots to that line form the largest variance to the centroid—so in the case of an ellipsoid shaped plot, its first principal component shall be its major axis. The conceptual approach is different than that of using spatial moments, however the mathematics behind them are rather similar. Eigenvalues are given by Eqs. 10 and 11, and eigenvector for the first principal component is given in Eq. 12. The first principal component will form the angle ϴ1 with the x-axis via Eq. 13, while the ellipse’s eccentricity and ratio between the ellipse major and minor axes can be calculated directly from the eigenvalues using Eq. 14 and Eq. 15 respectively.

$$\lambda_{1} = \frac{1}{2} \cdot \left( {M_{xx} + M_{yy} + \sqrt {\left( {M_{xx} - M_{yy} } \right)^{2} + 4M_{xy}^{2} } } \right)$$
(10)
$$\lambda_{2} = \frac{1}{2} \cdot \left( {M_{xx} + M_{yy} - \sqrt {\left( {M_{xx} - M_{yy} } \right)^{2} + 4M_{xy}^{2} } } \right)$$
(11)
$$\mathop{v}\limits^{\rightharpoonup} _{1} = \left[ {\begin{array}{*{20}c} {M_{xy} } \\ {\lambda_{1} - M_{xx} } \\ \end{array} } \right]$$
(12)
$$\theta_{1} = \tan^{ - 1} \left( {\frac{{M_{xy} }}{{\lambda_{1} - M_{xx} }}} \right)$$
(13)
$$\varepsilon_{{{\text{PCA}}}} = \sqrt {1 - \frac{{\lambda_{2} }}{{\lambda_{1} }}}$$
(14)
$$r_{{{\text{PCA}}}} = \sqrt {\frac{{\lambda_{1} }}{{\lambda_{2} }}}$$
(15)

where, \({M}_{yy}\), \({M}_{xx}\), \({M}_{xy}\) is the variances of plots in the y and x axes, and the covariance of plots in both x and y axes, identical to second order spatial moments, \({\lambda }_{1}\), \({\lambda }_{2}\) is the eigenvalues for first and second principal components, \(\mathop{v}\limits^{\rightharpoonup} _{1}\) is the eigenvector for the first principal component, \({\theta }_{1}\) is the angle of the principal component axis to the x-axis, \({\varepsilon }_{\text{PCA}}\) is the eccentricity of ellipse using PCA method, \({r}_{\text{PCA}}\) is the major to minor axes ratio using PCA method.

Both second order spatial moments and PCA methods require only a simple thresholding process to obtain the ellipse before computing the angle. The threshold that is selected should be one that includes the fainter tracheid effect signals in the processing and depends predominantly on the hardware setup used.

For a 2-dimensional plot, both the second order spatial moments and the PCA methods arrive at the same answer. As per Fig. 3, this is because, by definition, the PCA method maximizes the variance of the plots’ orthogonal projections onto the principal axis to the centroid, while the second order spatial moments method minimizes the second order inertial moment around the primary axis—and the second order inertial moment is the variance of the orthogonal distances of all the plots to the primary axis. Because both variances are orthogonal to each other, and the individual distances of the plots to the centroids are constants, Pythagorean theorem dictates that PCA’s maximum variance feature is a natural consequence of the second order spatial moments’ minimum variance characteristic. As both methods arrive at the same answer and algorithmically similar in computational load, this study shall use the PCA method to obtain the angles and the ratios of the major to minor axes of the ellipses.

Fig. 3
figure 3

Pictorial comparison of a second order spatial moments method, which finds the primary axis whereby variance of all the signal plots is at the minimum, and b the PCA method, which maximizes the variance of the plot’s orthogonal projection around the first principal axis

As for the measure of eccentricity, the eccentricity of an ellipse is a function of the ratio between the major and minor axes of that ellipse. The ratio between the two axes gives better comparative sense between the different elongations caused by the tracheid effect – also, it allows for a linear comparison of the major axis values given a fixed minor axis value, which is more intuitive than the actual mathematical ellipse’s eccentricity measure.

2.3 Experimental setup

A Puluz light box was set up with LED light strips removed to create a darkened test chamber. A miniature motorized turntable (100 mm diameter) was used to rotate the test pieces. Positions of every 30° angle interval were marked on the turntable and a reference point was set on the stationary base. Images were taken using the Hikrobot MV-CE200-10UC industrial area scan camera (coupled with a 12 mm lens Hikrobot MVL-KF1224M-25MP) at full resolution of 5472 × 3648 pixels (producing images at around 820 pixels per inch, equivalent to 0.031 mm length per pixel). It was positioned at the top of the light box facing vertically down, 125 mm above the surface of the test piece. One red dot laser (Haogekey® SYD1230 Red Dot Laser Diode Module, 650 nm, rated at 5 mW output) and one near infrared (NIR) dot laser (Jolooyo Model 808–100-1245-BL IR Laser Diode Dot, 808 nm, rated at 25 mW output) were spaced 15 mm apart from each other, both 40 mm away from the camera, 65 mm above the surface of the test piece.

Both camera and lasers were adjusted such that they are focused on the test pieces’ surface within the field of view of the camera. The camera was focused visually under white light illumination until it produced the sharpest image, and then lasers were individually focused in a darkened environment (viewed through the camera) until they each produced the smallest, sharpest dot on a sheet of white A4 paper placed above the test piece. Each laser formed a 1.0 mm diameter circular dot on the MDF surface. The 1.0 mm diameter was purposefully chosen as past studies had shown that red meranti has fibre lengths at around 1.0 mm (Sulistyo et al. 2020; Wahyudi and Sitanggang 2016; Wistara et al. 2016).

This setup is shown in Fig. 4, and is similar in concept to previous studies (Hu et al. 2004) with the exception that the lasers’ position being eccentric to the camera’s principle axis rather than being inline (via a beam splitter).

Fig. 4
figure 4

Image acquisition setup

Ten pieces of LRM were used as test pieces. All test pieces were surfaced two sides (S2S), unsanded, with an average width and thickness of 79.27 mm (standard deviation, s.d. = 2.47 mm), and 26.14 mm (s.d. = 0.19 mm), respectively. Parameters of each piece are detailed in Table 2. Dimensions were measured using a Mitutoyo 500–196-30 Digimatic vernier calliper. Apparent weight densities of the test pieces were obtained by measuring their weights and dividing them by their measured volume. Test pieces were weighed using an Adam Equipment CCT8UH 8 kg laboratory weighing scale. The moisture content (MC) of each piece was obtained using a Delmhorst JX-30W/CS with its temperature correction setting set using temperature measurements scanned using a FLIR TG56 Spot IR Thermometer. A single piece of pine wood (Pinus radiata) (sized 110.6 × 36.5 × 17.4 mm, surfaced 4 sides, S4S) was used as a proof of setup viability as tracheid effect for pine is very well established.

Table 2 Parameters for each LRM test piece, and the one pine timber

The lasers were tested independently. For each laser, turntable position was adjusted so that the laser points at dead centre of the turntable’s axis of rotation. As reference, images of the dots generated by each of the lasers were taken at every 30° interval, targeting a sheet of paper (Fujifilm paper, A4 size, 80 g, 155 CIE Whiteness), and a piece of 100 × 100 × 6 mm medium density fibreboard (MDF). Eccentricities of the reference dots were recorded and observed.

Each test piece was then imaged at 30° intervals for each of the laser types, with the image taken at turntable position 0° deemed the index grain direction. The angular position of the turntable was determined by visual alignment of markings therefore readings were repeated three times to average out human visual parallax error. The locations of the laser dots on the test pieces were visually ensured to be located on defect free straight grained regions of the wood. Three locations were tested per test piece, culminating in a total of 30 unique readings from the 10 samples. Milled and rough LRM surfaces were assessed on orthogonal surfaces of each of the S2S test pieces.

Images of both reference paper, MDF, pine and LRM test specimens were cropped at where the laser dots were located. The optimal thresholds for grain angle analysis were obtained by running the grain angle analysis with different threshold levels and analysing both their root-mean-squared errors (RMSE) from their expected grain angles, and their elliptical eccentricities. Due to the substantial differences in the camera response curve to the different laser wavelengths and the lasers’ power output, the red and NIR lasers were analysed independently. Different exposure times were tested for the visually clearest image, and was set at 0.50 ms for red laser, and 300 ms for NIR laser. As shown in Fig. 5, the image was separated into their individual red, green and blue constituents and thresholded at various intensity levels, then morphologically filtered for the largest contiguous region. The elliptical angle and eccentricity parameters of the resulting ellipses were recorded and analysed.

Fig. 5
figure 5

a NIR laser image of LRM specimen #1 milled surface, and b intensity plots of (i) red, (ii) green, and iii) blue channels, and c thresholded plots (at level of 0.04) of each respective red, green, and blue channels together with their major and minor axes illustrated

Analyses performed in this study were executed using MATLAB R2022a Release 3 on a PC equipped with Intel® Core™ i7-11,700 CPU with 16 GB RAM.

3 Results and discussion

3.1 Eccentricity of reference dot on MDF and PAPER

Figure 6 shows the average ratio between the major and minor axes of the resulting laser dots with respect to the different threshold levels. It is evident for NIR light that its eccentricity started distorting under 0.05—this could mean detection of subtle low intensity scattering on the substrate’s surface. Red light’s eccentricity remains relatively stable throughout the different threshold levels. Moreover, reference points using MDF in aggregate were less eccentric than points using paper, with NIR’s blue channel being the roundest. Analysed by angle as shown in Fig. 7, NIR’s blue channel on MDF yet again scored the lowest eccentricity values. Paper appeared to exhibit periodic patterns with peaks at 30° and 210° for most of the channels of both lasers. It is well known that paper contains ‘directionality’ which is a consequence of its production process, and this result reinforces this fact. As for MDF, no specific patterns were observed, with peaks for the red laser probably due to random localized surface specular reflection skewing the results. We can surmise that MDF would make a better reference target particularly when NIR is used for analysis.

Fig. 6
figure 6

Ratio between the major and minor axes of individual colour components (R = red, G = green, B = blue channels respectively) of the red and NIR laser plots, arranged by threshold value, for a A4 paper, and b MDF

Fig. 7
figure 7

Average ratio between the major and minor axes of individual colour components of the red and NIR laser plots, arranged by angle, for a A4 paper, and b MDF

This reference eccentricity is important when determining whether tracheid effect was indeed observed (when eccentricity or ratio values exceed that of reference), and not caused by the eccentricity of the laser dot itself. Elliptical axis ratios above 1.22 can therefore be deemed due to tracheid effect of the wood.

3.2 Tracheid effect of pine

Results of the preliminary study of tracheid effect of pine using this experiment’s setup is shown in Fig. 8. The results were good, with RMSE values of under 1.5° at the minimum, and scoring eccentricity ratios of close to 2.2 at the maximum. Interestingly, for NIR laser, the blue channel appeared to be the most accurate with a minimum at 1.533° at the threshold level, t = 0.07. As for red laser, the green component at threshold level of 0.06 scored the lowest RMSE of 1.158°. Red laser appeared to outperform NIR laser for pine, contrary to the assertion that longer wavelengths work better due to reduced attenuation; however, this result is anecdotal as only one sample was used.

Fig. 8
figure 8

a RMSE, and b ratio between ellipses’ major and minor axes for pine wood

Moreover, some proportion of the experimental error in this study may be attributable to human visual parallax when determining the actual position of the table (for a 100 mm circle, every degree arc is equivalent to a circumferential distance of 0.873 mm).

According to Fig. 9, both red and NIR lasers at their respective optimal threshold levels (minimum RMSE values) were very closely and linearly correlated to the actual angle with high coefficients of determination (R2). These results shall be used as a basis for comparison when performing study on LRM. It must be noted that the pine timber had a milled surface.

Fig. 9
figure 9

Correlation plot for a NIR laser blue channel (threshold level, t = 0.07), and b red laser green channel (t = 0.06) for pine reference timber

3.3 Tracheid effect of LRM

As evidenced in Fig. 10, tracheid effect laser scattering can be visually observed using lasers of either the red wavelengths or the NIR wavelengths. According to the results in Fig. 11, NIR elicited the lowest error among the two laser types, very likely by virtue of higher ratios between the major and minor axes of the laser dots. This supports incontrovertibly the assertion that light of longer wavelengths does indeed induce a more prominent and more readily detectable tracheid effect in hardwoods, specifically in LRM. In addition to that, milled surfaces yielded much more accurate angle readings. Nonetheless, NIR laser performed much better than red laser.

Fig. 10
figure 10

Tracheid effect seen on LRM test specimen #1 milled surface using a red, and b NIR laser dots, as well as reference for each laser type on MDF and white A4 paper

Fig. 11
figure 11

a RMSE and b ratio between ellipses’ major and minor axes for (i) milled, and (ii) rough sawn surfaces of LRM timber

There appeared to be visual inconsistencies between some images taken 180° apart, which were expected to look identical. This may be due to visual parallax when aligning the turntable to the centre of the light beam, the top and bottom surfaces of the timber not being parallel, moulder chatter marks, or combinations. This affects the higher intensity values that human eyes detect. However, thresholding at lower intensities detectable by the camera sensor yielded good results, particularly for milled surfaces. This is evident in Fig. 11 whereby lower threshold values yielded larger eccentricity ratios matched with lower RMSE values.

From Table 3 and Fig. 12, it is evident that NIR scored higher coefficients of determination for both milled and rough surfaces at the optimal threshold values. In addition, rough surfaces introduce higher error signals as compared to milled surfaces. Red laser scored particularly high error rates on rough sawn surfaces rendering it practically unusable (despite scoring R2 value of above 0.9, residuals were noticeably large—this means they only correlate linearly in aggregate but suffered very low precision). RMSE gives a much clearer picture of each laser’s usability.

Table 3 RMSE results for pine, and LRM with milled and rough surfaces using NIR and red lasers at their optimal threshold values (t), and their respective R2 linearity values
Fig. 12
figure 12

Correlation plots for optimal values for LRM’s a milled surfaces for i) NIR (t = 0.04) and ii) red (t = 0.14) lasers, and b rough sawn surfaces using (i) NIR (t = 0.02), and (ii) red lasers (t = 0.08); all using red channels—each 30° interval on the horizontal axis contains 90 plots consisting of readings from 3 repetitions, 3 different locations on each of the 10 samples

Therefore, it can be surmised that NIR laser at 808 nm is a better wavelength to use to detect tracheid effect for LRM when compared to red laser at 650 nm. However, for rough sawn surfaces, while NIR performed substantially better than the red laser, in some instances, angle confusion clocked errors more than 90° which is unacceptable. This could be due to the locale of the laser on the piece of timber where it might have been shone onto fibre strands that skewed the results. This may also be due to the laser light hitting onto medullary ray cells, particularly on radial surfaces, which skewed some of the eccentricity values by 90° angles. Averaging results over successive runs at nearby locations may minimize this error.

Laser units used in this study were economically sourced, therefore the power rating values were of unknown provenance. This may partly explain the large disparity in the exposure times required for red and NIR lasers. Despite this, tracheid effects on milled LRM were readily observed, hence it can be surmised that this phenomenon can be readily detected in LRM for industrial applications that requires it, assuming that the correct laser wavelengths are used, and other parameters such as laser power output and camera exposure times and gain are adjusted for. In addition to that, the conventional industrial camera (that is sensitive to NIR wavelengths just beyond red light) used in this study proves that it is possible to create affordable solutions for industrial applications where LRM is utilized without requiring specialized infrared cameras. A past study mentioned the need for sensor blooming effect mitigation using special sensors that drain excess electrons when the cells are filled up to prevent flooding into neighbouring cells (Nyström 2003). However, it is shown here in this study that, despite saturation at the central regions of the lasers’ target, with proper exposure and thresholding levels, tracheid effect can still be reliably detected with comparable ellipse eccentricity values using regular industrial cameras which are economical. For industrial applications, camera exposure levels are contingent on the camera’s sensitivity to the power of the laser and intended line speed. It is conceivable that providing higher-powered laser sources would allow for lower exposure levels to facilitate higher line speeds.

Results in this study also support the notion that longer wavelengths indeed perform better for hardwoods such as LRM than shorter ones. Further to this, it can be further postulated that should the need arise to detect tracheid effect on rough sawn LRM timber, lasers of even longer wavelengths are required—however, this means that specialized infrared cameras would be required. This can be the scope for future studies.

It must be stressed that threshold levels determined from experimentation in this study are not absolute and are contingent on the types of lasers as well as cameras, sensors, lenses, exposure times, and gain levels used. The optimal threshold levels obtained in this study were specific to this study’s setup and may differ for other setups. Having mentioned that, ellipse eccentricities were consistent with results of the study this research was conceptually based on (Hu et al. 2004).

Moreover, the relationship between tracheid effect performance and density was preliminarily sought, but no obvious trends were observed. Furthermore, the dataset used in this study was insufficient to adequately represent LRM’s density ranges.

3.4 Performance comparisons between LRM and pine

From this study, pine exhibited very prominent tracheid effect, with low RMSE values (under 5.0° for the up to threshold level of 0.20 for both lasers, in contrast with under 30.0 and 60.0 for the same range for LRM). The result may not be representative of pine in general as only a single piece was used. While this reinforces the fact that softwoods have longer tracheid cells than hardwoods, it is interesting to note that the maximum eccentricity ratios between the major and minor axes were not too different given the same source laser light. This meant that, despite longer tracheid cells in softwoods, the extent of the scattering of light in the direction of the grain were either offset by proportionally efficient scattering perpendicular to the grain direction, or rapid decay in light intensity within the fibres. In addition to that, we can see that for milled surface, NIR scored very similar coefficients of determination to that of pine (for both NIR and red sources). Average RMSE values, too, were very comparable. Furthermore, by studying the elliptical axes’ lengths shown in Fig. 13, milled pine surface elicited much higher elongations than the datum (MDF) in both major and minor axes for both red and NIR lasers, but particularly NIR laser. It had distinctly demarcated major and minor axes. LRM, on the other hand, clocked lower minor axis lengths than the datum, which implied that it does not scatter well in that axis (as compared to MDF). LRM with milled surfaces exhibited well demarcated major and minor lengths, however for rough surfaces, the substantial overlap between the major and minor lengths contributed to their poor results.

Fig. 13
figure 13

Box plot showing the statistics (maximums, minimums, means, and standard deviations) of all the calculated elliptical major and minor axes lengths for pine, MDF datum, and LRM (milled and rough surfaces); values for pine and LRM were taken at their respective optimal threshold levels, while for MDF datum, averages were taken from thresholds 0.02 till 0.14, blue channel for NIR datums, and red channel for red datums

Based on these results, it can be surmised that existing industrial vision systems exploiting tracheid effect, particularly ones that are tuned specifically for softwoods, and those that use lasers in the visible red colour band, may not perform well on LRM (or not at all if rough sawn) without significant modification. Those that utilize longer wavelengths may work on milled LRM with minor parametric adaptations. For rough sawn LRM timber, tests using infrared wavelengths beyond 808 nm shall be the scope for future studies.

4 Conclusion

This study confirmed that tracheid effect can indeed be observed in LRM using both 808 nm NIR and 650 nm red lasers. Red channel for both lasers scored lowest RMSE values. The NIR laser were the best for milled LRM surfaces, scoring optimal RMSE value of 2.2892° (compared to 1.5330° for pine) and 11.4948° for rough sawn surfaces. The red laser only managed 7.8922° and 34.1178° for milled and rough surfaces respectively, hence unsuitable for use with LRM where absolute grain angle accuracy is required (compared to 1.1582° for pine). It is also proven that regular industrial cameras which are sensitive to low NIR band wavelengths (~ 780 to 1000 nm) may be used as tracheid effect detectors for milled LRM timber.