Image Deﬁnition Evaluations on Denoised and Sharpened Wood Grain Images

: Decorative paper and wood veneer have been widely used in the surface decoration of wood-based panels. These surface decoration methods require two-dimensional image acquisition of natural wood grain to obtain the digital grain. However, optically scanned images sometimes produce noise during the process of image acquisition and transmission. In this situation, scanned images cannot be used directly in wood grain reproductions. To reduce noise and retain or strengthen the image sharpness, studies are mostly aimed at the improvement of classic denoising algorithms and edge width-based sharpness evaluation algorithms. To enhance accessibility for common users, four kinds of wood grain images with distinct colors were chosen, and the noise ﬁlter ( Dust & Scratches ) and sharpen ﬁlter ( Unsharp Mask , USM) were used to denoise and sharpen the images. According to the properties of the two ﬁlters, image deﬁnition in this study was considered from two aspects: detail retention and sharpness retention. To have an objective evaluation on the deﬁnition of denoised and sharpened images, two types of evaluation functions Roberts gradient function (RGF) and modulation transfer function (MTF) were introduced. The purpose of this study was to estimate the image deﬁnition by exploring the relationships between the evaluation functions and the commonly used ﬁlters in order to allow the required wood grain images to be quickly and accurately processed by common users. The results showed that RGF was only applicable to the case where the two parameters in Dust & Scratches were changed individually, while MTF was not suitable in any case. When both parameters were changed, the required denoising scheme could be obtained through PSNR and SSIM. For the images with distinct colors, even if they were acquired in the same way, denoising them with the same parameter setting was not recommended. For sharpness retention, the values of Radius and Amount in USM were given, and when the Threshold value was set to 20 (levels), the sharpness of the wood grain images barely changed. In this case, both RGF and MTF were suitable to evaluate the sharpness of the wood grain images sharpened by USM.


Introduction
The unique appearance of natural wood grain, which is characterized by beautiful colors, mellow gloss, and rich texture, leaves an excellent visual impression. To imitate and communicate such visual impressions of natural wood grain and alleviate the shortage of precious timber resources, decorative paper and wood veneer have been widely used in the surface decoration of wood-based panels [1,2]. In other reports [3,4], a UV-curable inkjet technology approach to print 3D wood grain surface layers on wood-based panels was presented. These surface decoration methods all require image acquisition of the natural wood grain to obtain the digital grain, and then they are applied to mass reproductions. There were also studies obtaining digital wood grain by cutting the trunks of virtual trees (volumetric simulations), but the acquisition of simulated wood grain involved several more complicated procedures compared with the two-dimensional image acquisition [5].

Image Acquisition of Wood Grain
Flat scanning is a very common image acquisition method [4]. A charge-coupled device (CCD) technology scanner (Phantom 9900XL, Microtek Co., Suzhou, China) with a light-emitting diode (LED) light system and professional International Color Consortium (ICC) profiles was used to scan the wood specimens to digitize their wood grain. As shown in Figure 1, the transverse direction of Plane A was set parallel to the scanner's sensor moving direction. The opposite of Plane A was also scanned under the same condition, and each wood specimen produced two planes in identical size.
The purpose of this study was to estimate the denoising and sharpening effects through the discussion on the relationships between the evaluation functions and the commonly used filters in order to allow the required wood grain images to be quickly and accurately processed by common users.

Wood Specimens
The wood specimens were obtained from four kinds of tree species with distinct colors. The specimen surfaces were polished by waterproof abrasive paper of 400 meshes to prepare a clear and flat surface and then roller coated with waterborne transparent coatings. The basic information of the four specimens is shown in Table 1.

Image Acquisition of Wood Grain
Flat scanning is a very common image acquisition method [4]. A charge-coupled device (CCD) technology scanner (Phantom 9900XL, Microtek Co., Suzhou, China) with a light-emitting diode (LED) light system and professional International Color Consortium (ICC) profiles was used to scan the wood specimens to digitize their wood grain. As shown in Figure 1, the transverse direction of Plane A was set parallel to the scanner's sensor moving direction. The opposite of Plane A was also scanned under the same condition, and each wood specimen produced two planes in identical size. The eight scanned planes were stored in a lossless TIFF format at 8 bits per channel and 300 pixels per inch (ppi) resolution and then cropped to the size of 100 mm × 100 mm. Consequently, each scanned plane produced nine images; that is, each tree species produced eighteen images for testing.

Parameter Settings in Dust & Scratches and Unsharp Mask
The parameter settings in Dust & Scratches include Radius (R is an integer between 1 and 500) and Threshold (T is an integer between 0 and 255). The Radius control tells the filter how many surrounding pixels to consider when calculating the new value for the subject pixel [20], meaning that the Radius value determines the size of the area searched for dissimilar pixels. The Threshold control in Dust & Scratches is designed to protect textured areas from being denoised. As defects could be hidden by various combinations of Radius and Threshold settings, to reduce changes, the Radius value was set to 1 and 2 (pixels). The eight scanned planes were stored in a lossless TIFF format at 8 bits per channel and 300 pixels per inch (ppi) resolution and then cropped to the size of 100 mm × 100 mm. Consequently, each scanned plane produced nine images; that is, each tree species produced eighteen images for testing.

Parameter Settings in Dust & Scratches and Unsharp Mask
The parameter settings in Dust & Scratches include Radius (R is an integer between 1 and 500) and Threshold (T is an integer between 0 and 255). The Radius control tells the filter how many surrounding pixels to consider when calculating the new value for the subject pixel [20], meaning that the Radius value determines the size of the area searched for dissimilar pixels. The Threshold control in Dust & Scratches is designed to protect textured areas from being denoised. As defects could be hidden by various combinations of Radius and Threshold settings, to reduce changes, the Radius value was set to 1 and 2 (pixels).
The parameter settings in Unsharp Mask (USM) include Amount (A is an integer between 1 and 500), Radius (R is a number between 1 and 500), and Threshold (T is an integer between 0 and 255). An Amount of around 50 (%) was recommended for screenbased publishing, and a Radius of 1.5 (pixels) was given based on the often-quoted rule of thumb, which is to divide the 300 ppi resolution by 200 [30]. Feng et al. [3] also proved that the sharpening scheme at this setting was the optimal, though lacking the description and settings of Threshold. The Threshold control in USM is designed to protect textured areas from being sharpened. At high settings, Threshold tends to create unnatural-looking transitions between the sharpened and unsharpened areas. Because of this tendency, layer masks (edge or surface masks) are usually used to protect the textured areas. Theoretically, applying sharpening on a layer and adjusting the blur and contrast of a layer mask make it feasible to localize sharpening to specific areas of the image [20]. However, due to the delicate texture and uneven color transitions of wood grain images, it was difficult to confine sharpening to specific tonal ranges or image areas if maximumly retaining the sharpness of the original scanned images was required. As a result, the Threshold control was used in this study instead of the layer masks.

Calculation Methods for Evaluation Values
The Roberts gradient function (RGF) was used to evaluate the definition of the denoised and sharpened wood grain images. This function uses Roberts gradient operator as a convolution template, and the calculation formula of RGF values in MATLAB R2018b was as follows: where I is the current image, and I(x, y) is the pixel value at the point (x, y).
Similarly, the modulation transfer function (MTF) was also used to evaluate the definition of the above images. According to the previous description of MTF, by defining the image frequency and calculating the area enclosed by the MTF curve and coordinate axis after a 2D Fourier transform of the image in MATLAB R2018b, MTF values can be obtained.

Noise Reduction
Overly aggressive noise reduction creates an irreparably soft image. Therefore, noise reduction must be used with caution and should always be carried out prior to sharpening; otherwise, the noise will also be sharpened [20]. To obtain a better view of the image noise, the zoom ratio was adjusted until the areas containing noise were visible during the selection of the Threshold value range. When the Radius value was in the proposed range and the Threshold value was no more than 50 (levels) (if the value exceeded 50 (levels), the noise was conspicuous), we found it was difficult to judge which denoising scheme protected more details and meanwhile reduced more noise when both parameters in Dust & Scratches were changed.
Therefore, to find out whether there was a unified parameter setting that could meet the above requirements, four images (one from each tree species) were chosen as the representative images for observation. Table 2 shows the parameter settings of denoising intensities and the corresponding local effects of the four images at 400% zoom view.
The definition of the four kinds of wood grain images under six denoising schemes was evaluated by the two evaluation functions MTF and RGF, and the evaluation values were calculated following the methodologies explained in the previous section. Each kind of wood grain image produced eighteen MTF and RGF values under each denoising scheme. To compare the changing trends of MTF and RGF values more intuitively, the eighteen evaluations were averaged, and then the averaged values under these schemes were normalized. The results are shown in Figure 2. Since the research object was the changing trend of each function, the norma MTF and RGF values were not comparable. As the image color of Birch was too li observe the denoising effects, the MTF and RGF evaluations on the image definit Birch were only used to test the accuracy of the results.
Combining the denoising effects of Dust & Scratches on the four kinds of image cluding the light-colored images of Birch) in Table 2 and the corresponding cha trends of MTF and RGF values in Figure 2, the following points could be summarize When the Radius value was set to 1 or 2 (pixels), the noise became gradually obvious the increase in Threshold value, implying that the image definition increased. The and RGF values also rose, but the variation tendency of the MTF values of Birch slightly different from that of the other tree species. (2) When the Threshold value w to 30 (levels) and the Radius value changed from 1 to 2 (pixels), the image noise red and the image definition decreased. The MTF and RGF values also fell. Since the research object was the changing trend of each function, the normalized MTF and RGF values were not comparable. As the image color of Birch was too light to observe the denoising effects, the MTF and RGF evaluations on the image definition of Birch were only used to test the accuracy of the results.
Combining the denoising effects of Dust & Scratches on the four kinds of images (excluding the light-colored images of Birch) in Table 2 and the corresponding changing trends of MTF and RGF values in Figure 2, the following points could be summarized: (1) When the Radius value was set to 1 or 2 (pixels), the noise became gradually obvious with the increase in Threshold value, implying that the image definition increased. The MTF and RGF values also rose, but the variation tendency of the MTF values of Birch was slightly different from that of the other tree species. (2) When the Threshold value was set to 30 (levels) and the Radius value changed from 1 to 2 (pixels), the image noise reduced, and the image definition decreased. The MTF and RGF values also fell.                             To further determine which function was more accurate in the evaluation, Dust & Scratches was used again to denoise the four kinds of images. The parameter settings are shown in Table 3, and the settings of Scheme III and Scheme VI are the same as those in Table 2. The corresponding changing trends of normalized MTF and RGF values are shown in Figure 3. To further determine which function was more accurate in the evaluation, Dust & Scratches was used again to denoise the four kinds of images. The parameter settings are shown in Table 3, and the settings of Scheme Ⅲ and Scheme Ⅵ are the same as those in Table 2. The corresponding changing trends of normalized MTF and RGF values are shown in Figure 3.     Figure 3 clearly shows that the changing trends of MTF values were irregular, while the RGF values rose with the increase in Threshold value at constant Radius settings. In addition, for Teak and Balsamo, the RGF values of Scheme VI were lower than those of Scheme VII, while for Walnut and Birch, the values of Scheme VI were higher. To figure out whether RGF could evaluate the definition of denoised images when both parameters in Dust & Scratches were changed, the relativity between the denoised images and the corresponding original images was calculated using the pixel-based method PSNR and the structure-based method SSIM [18,31]. Table 4 shows the averaged RGF, PSNR, and SSIM values at the same parameter settings in Table 3. From Table 4, the variation tendency of RGF was consistent with that of PSNR and SSIM when only one parameter in Dust & Scratches was changed. When both parameters were changed, the rankings of the RGF values of the four images were different from those of PSNR and SSIM, suggesting that RGF was not applicable to this case.
Except for Birch, PSNR and SSIM values were both the lowest at the 2 (pixels) and 50 (levels) setting, meaning that the changes to the originals at this setting were the greatest. Consequently, the images would present less noise, and more details would be destroyed. If more details were required, the setting of 1 (pixels) and 35 (levels) could be selected where PSNR and SSIM values were the highest, though there would be more noise at this setting.
To sum up, when both parameters in Dust & Scratches were changed and the required denoising scheme could not be selected by subjective observation, the setting with the lowest or highest value calculated by PSNR and SSIM could be the option. It is noted that the optimal scheme might not be applicable to the light-colored images.
Moreover, the rankings of the three indexes were not completely consistent for the images with distinct colors; thus, it was not recommended to denoise these images with the same parameter setting even if the best denoising scheme was found. Gradient function RGF, unlike PSNR and SSIM, was only applicable to the case where the two parameters in Dust & Scratches were changed individually, while MTF was not suitable in any case.

Sharpening
For Unsharp Mask (USM), some Photoshop experts recommended converting images to L * a * b * mode and then sharpening the L * channel [30]. One previous work also proved that the effects of USM on L * channel alone were better than that on the whole channels [3]. However, roundtripping from RGB to L * a * b * to RGB is a destructive process on 8-bit/channel images that can lead to unwanted hue or saturation shifts and possible posterization [20]. To avoid such sharpening-induced shifts, the original RGB mode of the scanned images was kept, and the method to sharpen the seventy-two images by USM in Photoshop was as follows: First, the image layer of Teak, Balsamo, Walnut, and Birch denoised by Dust & Scratches at the 2 (pixels) and 50 (levels) setting was duplicated. Then, the blending mode of the duplicated layer was set to Luminosity.
A Threshold value between 2 and 20 (levels) was recommended according to the Adobe Photoshop User Guide. The same four images in Table 2 were chosen for observation after sharpening. Table 5 shows the parameter settings of sharpening intensities and the corresponding local effects of the four images at 400% zoom view.
From Table 5, except for the change in the image sharpness (contrast of image edges) of Teak, Balsamo, and Walnut, the change in details was almost invisible. Since the Threshold control was to protect textured areas from being sharpened, when the Threshold value was set to 20 (levels), the image sharpness was closest to that of the corresponding originals.
The sharpness of the four kinds of wood grain images under the four sharpening schemes was evaluated by the two evaluation functions MTF and RGF, and the evaluation values were calculated following the methodologies explained in the previous section. Each kind of wood grain image produced eighteen MTF and RGF values under each sharpening scheme. For the same reason, the eighteen evaluations were averaged, and then the averaged values under these schemes were normalized. The results are shown in Figure 4.  Combining the sharpening effects of USM on the four kinds of images (excluding light-colored images of Birch) in Table 5 and the corresponding changing trends of and RGF values in Figure 4, the following points could be summarized: (1) When Amount value was set to 50 (%) and the Radius value was set to 1.5 (pixels), the im sharpness and MTF and RGF values declined with the increase in Threshold value The image sharpness and MTF and RGF values of Scheme Ⅳ were almost the sam those of the corresponding denoised images. It is noted that the normalized MTF and RGF values are still not comparable. As the image color of Birch was too light to observe the sharpening effects, the MTF and RGF evaluations on the image sharpness of Birch were only used to test the accuracy of the results.         Combining the sharpening effects of USM on the four kinds of images (excluding the light-colored images of Birch) in Table 5 and the corresponding changing trends of MTF and RGF values in Figure 4, the following points could be summarized: (1) When the Amount value was set to 50 (%) and the Radius value was set to 1.5 (pixels), the image sharpness and MTF and RGF values declined with the increase in Threshold value. (2) The image sharpness and MTF and RGF values of Scheme IV were almost the same as those of the corresponding denoised images.
To sum up, when only the Threshold value was changed in USM, both MTF and RGF were suitable to evaluate the sharpness of the wood grain images sharpened by USM. The larger the Threshold value, the smaller the evaluation values of MTF and RGF and the lower the image sharpness. When the Amount value was set to 50 (%), the Radius value was set to 1.5 (pixels), and the Threshold value was set to 20 (levels), the sharpness of the wood grain images hardly changed.

Conclusions
To estimate the denoising effects of the original scanned images processed by Dust & Scratches, objective evaluation functions MTF and RGF were used to help with subjective evaluation. However, when both parameters in Dust & Scratches were changed, the gradient function RGF could not accurately evaluate the denoising effects. RGF was only applicable to the case where the two parameters were changed individually, while MTF was not suitable in any case. Detail retention and noise reduction could not be at the optimum conditions simultaneously, but the required denoising scheme could be obtained through the calculation results of PSNR and SSIM when both parameters in Dust & Scratches were changed. It was not recommended to denoise the images with distinct colors with the same parameter setting even if the required denoising scheme was found.
To estimate the sharpening effects of the original scanned images processed by USM, the recommended values of Radius and Amount were given from the related research, and when the Threshold value was set to 20 (levels), the sharpness of the wood grain images barely changed according to the subjective observation and objective evaluation by MTF and RGF. When only the Threshold value was changed in USM, both MTF and RGF were suitable to evaluate the sharpness of the wood grain images. The larger the Threshold value, the smaller the MTF and RGF values and the lower the image sharpness.
In this study, through the observation of four kinds of wood grain images and the evaluation by two functions on denoising effects and sharpness retention, subjective and objective references were provided from a macro perspective to obtain the required wood grain images more conveniently. The deeper causes of these phenomena require further investigation.

Conflicts of Interest:
The authors declare no conflict of interest.