Next Article in Journal
Soil Metaproteomics as a Tool for Environmental Monitoring of Minelands
Next Article in Special Issue
Surface Detection of Solid Wood Defects Based on SSD Improved with ResNet
Previous Article in Journal
Carbon and Oxygen Gas Exchange in Woody Debris: The Process and Climate-Related Drivers
Previous Article in Special Issue
Correlation between Anatomical Grading and Acoustic–Elastic Properties of Resonant Spruce Wood Used for Musical Instruments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Color Classification and Texture Recognition System of Solid Wood Panels

College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Forests 2021, 12(9), 1154; https://doi.org/10.3390/f12091154
Submission received: 31 July 2021 / Revised: 19 August 2021 / Accepted: 23 August 2021 / Published: 26 August 2021
(This article belongs to the Special Issue Wood Production and Promotion)

Abstract

:
Solid wood panels are widely used in the wood flooring and furniture industries, and paneling is an excellent material for indoor decoration. The classification of colors helps to improve the appearance of wood products assembled from multiple panels due to the differences in surface colors of solid wood panels. Traditional wood surface color classification mainly depends on workers’ visual observations, and manual color classification is prone to visual fatigue and quality instability. In order to reduce labor costs of sorting and to improve production efficiency, in this study, we introduced machine vision technology and an unsupervised learning technique. First-order color moments, second-order color moments, and color histogram peaks were selected to extract feature vectors and to realize data dimension reduction. The feature vector set was divided into different clusters by the K-means algorithm to achieve color classification and, thus, the solid wood panels with similar surface color were classified into one category. Furthermore, during twice clustering based on second-order color moment, texture recognition was realized on the basis of color classification. A sample of beech wood was selected as the research object, not only was color classification completed, but texture recognition was also realized. The experimental results verified the effectiveness of the technical proposal.

1. Introduction

Solid wood panels are widely used in solid wood furniture [1], wood flooring, and other industries because of their gloss finish, good decoration performance, effective sound absorption, high strength, easy processing, durability, and long service life. Moreover, waste wooden products can be degraded naturally and will hardly produce pollution. The surface parameters of solid wood panels include color [2], texture [3], gloss [4], roughness, deformation rate, planeness, etc., which are directly related to the visual beauty and decorative performance of wood products and are closely related to the quality evaluation of wood products. Therefore, it is theoretically and practically important to achieve automatic and intelligent detection and sorting of solid wood panel colors.
Color is an important surface characteristic parameter of solid wood panels, as well as an important index to evaluate the quality, grade, and market value of wood products. In actual production, solid wood panels always need to be spliced together to form larger wood panels. It is preferable that panels with similar colors are spliced together to meet the needs of individual customers. Traditionally, the surface color classification of solid wood has mainly been based on manual observation, which is significantly influenced by human factors and has low efficiency and, therefore, cannot meet society’s needs in terms of processing automation and intelligence and human–computer interaction. The emergence of new detection technologies that depend on machines overcomes the shortcomings of manual sorting. Lu [5] researched an automatic color sorting system for hardwood edge-glued panel parts, capable of sorting red oak panel parts into a number of color classes at plant production speeds and the test results showed that the qualified rate exceeded 91%. Schmitt [6] improved the existing system based on fuzzy language rules and constructed a fuzzy language rule classifier for wood color classification. The results obtained with the new method showed a real improvement in the recognition rate compared to a Bayesian classifier. In a study by Mária [7], a new wood color measurement method was verified using digital images in CIE L* a* b* color space birch color measurement and analysis. Syafinaz [8] studied the relationship between wood color and formaldehyde emissions from plywood of seven tropical hardwood species. Anton [9] determined the chemical properties of logs and wood samples after boiling, analyzed the wood, and isolated holocellulose and Sievetz cellulose by attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR). It was found that the qualitative and quantitative changes in hemicellulose extracts during the cooking of birch were closely related to the measured pH value and wood color.
In recent years, machine vision technology [10,11] and machine learning algorithms [12,13] have become popular solutions for signal processing and have been applied to color image classification. At present, the main direction of wood color classification is to select the appropriate color features and to construct accurate classifiers [14]. Rong-Hui [15] extracted eight color features of images in HSV (hue, saturation, and value), HSL (hue, saturation, and luminance), and HSI (hue, saturation, and intensity) color spaces and used the k-NN algorithm to realize the classification of farmland images in different environments. Xing [16] proposed a wood color classification method based on wood image features and a support vector machine (SVM). The hue and color vector angle (CVA) of the Bessel color system were used to characterize the wood color of the sample, which could quickly and accurately estimate the wood color grade. Vahid [17] evaluated and compared the performance of an artificial neural network, i.e., SVM, and the Naive Bayes (NB) classifier in thermally treated wood classifications. Using color brightness parameters as the unique feature, the accuracies of the SVM and NB models were 0.960 and 0.949, respectively. The application of unsupervised learning [18,19] technology in wood detection is helpful to improve the quality and efficiency of wood processing. Lin [20] applied the k-means algorithm to the surface color clustering of solid wood panels, and used the clustering results for online classification, the experimental results verified the feasibility of the proposed mechanism. In addition, K-means algorithm has been applied in many aspects, such as color image segmentation [21], data analysis [22], multi-objective programming [23], and so on.
However, in actual production, due to long panel and high image resolution requirements, computational complexity increases and the color difference is small; therefore, it is difficult to find general classification rules. In view of these difficulties, in this study, we divided the solid wood panel into blocks, and since the surface information of small area panels is relatively uniform, it is conducive to classification. Due to the large and complex surface information of solid wood panels, RGB (red, green, blue), HSV (hue, saturation, value) and Lab (laboratory) color spaces commonly used in the field of machine vision technology were selected to extract feature vectors based on first-order color moments, second-order color moments, and color histogram peaks. Mohseni [24] selected a color histogram with three channels in the RGB and HSV color space as a single feature to identify induced emotions and studied the influence of picture vision on human emotions. In this study, to describe the color characteristics of solid wood panels, first-order and second-order color moments, as well as a color histogram peak, were selected and extracted from the R, G, B, L, a, b, H, S, and V channels of a solid wood panel image, resulting in 27 extracted feature vectors that were used for the clustering study of solid wood panels. This reduced the data dimension and ensured that enough information was extracted for clustering. The K-means unsupervised learning method was used to realize the color clustering of solid wood panels. The K-means clustering algorithm is usually used when we have unlabeled data (without defined categories) and it clusters the given data into K-clusters based on the K-centroids [25]. Then, the influence of different color characteristics on the clustering results was analyzed to find the best feature combination. Through theoretical analysis and experiments to find the optimal K value, a twice clustering method was proposed to identify texture information and to optimize the clustering results.
The overall objective of this study was to realize color classification and texture recognition of solid wood panels. In this paper, beech wood panels were selected as the research object, and the image characteristics of beech wood panels were analyzed. Based on the analysis, we proposed a new technical proposal for the color classification of wood panels. The framework included image acquisition, image preprocessing, feature extraction, unsupervised clustering, color classification, and texture recognition. The image preprocessing algorithm was used to subtract the superfluous background of the images of solid wood panels. Then, feature vectors were extracted from the processed images based on the first-order color moments, second-order color moments, and color histogram peaks. In the research of clustering, the feature vector sets were partitioned into different clusters by the K-means algorithm to realize color classification. Finally, texture recognition was realized based on color classification. Using machine vision technology [26] and digital image processing technology [27], in this study, we took a sample of beech wood as the research object and conduct clustering analysis on the color characteristics of the wood panel surface.
The rest of this paper is organized as follows. Section 2 describes the materials and methods used in the sorting of solid wood panels. Section 3 analyzes and shows the experimental results of color classification and texture recognition. Section 4 discusses the advantages of this technical proposal in color classification and texture recognition of solid wood panels. Finally, the conclusion is given in Section 5.

2. Materials and Methods

2.1. Panels

A sample of beech wood was selected as the research object for the surface color cluster analysis of solid wood panels. The experiments were carried out on beech from Europe, which can adapt to a wide range of climate and temperature. The wood panels needed for the experiment were purchased from the wood merchants in Nanjing, Jiangsu Province and can be bought in the market. The density of the beech was 0.70 g/cm3 and the moisture content was 10.2%. After chord cutting, longitudinal cutting, planning, and polishing, a 1000 mm × 100 mm × 10 mm (length × width × height) smooth surface panel was obtained.

2.2. Imaging

In actual production, color classification is performed on the image of a solid wood floor panel through several processing steps. The structure of the image acquisition system built in this study is shown in Figure 1. There were four main components to the acquisition system, namely the transmission device, a CCD camera, a camera fixing device, and a control device.
The core device of the CCD camera in the image acquisition system was a Linea LA-GC-02K05B color line scan camera (Teledyne DALSA Co., Waterloo, ON, Canada). The specific parameters of this device are shown in Table 1. The camera adopts high-sensitivity CMOS (complementary metal oxide semiconductor) technology; the line frequency can reach up to 26 KHz, with high acquisition speed, low noise, high single-line resolution, and high sensitivity. To improve the imaging quality of the acquired image, it was necessary to reduce the influence of light conditions on the acquisition effect during the data acquisition process, thus ensuring uniform illumination and minimizing the light reflection in the data acquisition area. Therefore, a linear light source LCOL-304-w (HZN, shanghai, China) was selected to meet the requirement of uniform illumination in the single-line area required by the linear CCD camera. The transmission belt in the image acquisition system consists of two parts rotating at a uniform speed. They dragged the wood panels into the data acquisition area, and then sent the solid wood panels completing the image acquisition to the storage area. The control and sensing device included sensors and a control panel. The wood transmission speed and the start and stop of data acquisition were controlled through the control panel. When collecting data, the scanning frequency was set to 1280 lines for processing once, and after collecting data on the front of each sheet, a 2048 × 18,000 pixel image of the solid wood panel with a depth of 8 bit was obtained.

2.3. Preprocessing Images

The three-channel color image of the BMP format collected by the image acquisition system was converted into a gray image, and morphological operations such as erosion and dilation were carried out. The canny edge operator was applied to detect the boundary of the panel. The closed operation used a convolution kernel of 7 × 7, the number of iterations was 1, and then used adaptive binarization. Finally, the boundary of the wood in the image was found and the panel image was cut out. Canny edge detection [28] technology is applied in image processing [29] and has been widely used in traffic accident detection [30], crack automatic segmentation [31], intelligent traffic management [32], and other fields. The solid wood panel image was extracted from the black background, and the influence of the background was removed. One example of the results is shown in Figure 2.

2.4. Color Features of Solid Wood Panel Images

The general descriptive methods of measuring color features include color histograms, color moments, color sets, color aggregation vectors, color correlation graphs, etc. Since color distribution information is mainly concentrated in low-order moments, only the first-order moments (mean), second-order moments (variance), and third-order moments (skewness) of colors are sufficient to express the color distribution in the image. In addition, color sets are an approximation of the color histograms and color aggregation vectors are an evolution of the color histograms; therefore, color histograms describe color features that are more extensive and representative. The first-order color moment μ i and the second-order color moment σ i are mathematically defined as follows:
μ i = 1 N j = 1 N p i , j
σ i = ( 1 N j = 1 N ( p i , j μ i ) 2 ) 1 2
where p i , j is the pixel value at the image coordinate, and its actual meaning represents the pixel mean and variance of a picture.
Color sorting is mainly used to ensure a consistent appearance of the solid wood panel to meet consumer psychology needs. The RGB color space is the most basic and most commonly applied color space in computer digital image processing. The hue and saturation in the HSV color space are directly related to humans’ perceptions of color. The hue and saturation components directly correspond to humans’ perceptions and their psychological responses to color and, therefore, are widely used in color classification. Lab color space can be directly used to compare and analyze different colors by using the geometric distance in the color space, which can be effectively and conveniently used to measure the smaller color difference. The distribution range of the wood color is narrow. The color characteristics in the Lab color space are used to represent the surface color of wood, which is beneficial for comparing and classifying wood surface colors.
The calculation formulas of the first-order color moment and the second-order color moment are shown in Equations (1) and (2). The average value of wood image pixels describes the overall color distribution of wood images and the variance describes the uniformity of the image distribution in the color domain. The color histogram of three color spaces of solid wood panel image is shown in Figure 3, which shows the numbers of pixels with each value in the R, G, B, H, S, V, L, a, and b channels, respectively.

2.5. Solid Wood Panel Clustering

Traditional artificial methods are not very effective for color classification of solid wood panel surface colors, while supervised learning consumes a lot of manpower and material resources for label setting. In this study, an unsupervised learning clustering algorithm was introduced to solve the color classification problem of solid wood panels.

2.5.1. Dataset

The images of solid wood panels collected by the image acquisition system had high resolutions and were large in size. The original image size of each collected image was 2048 * 18,000 pixels and contained a variety of information such as color, texture, and defects in the image. As shown in Figure 4, a variety of complex information co-exists in an image, which makes color classification difficult. Therefore, in this study, the larger image was divided into blocks, and each large image was divided into 3 × 3 = 9 subgraphs. Due to the small area of each subgraph, the surface color information was more centralized and unified. Such a dataset was conducive to the classification of the solid wood panel surface colors.
A sample of beech wood was selected as the research object for the surface color cluster analysis of solid wood. A total of 200 samples of beech wood were preprocessed and segmented to obtain the dataset of 200 × 3 × 3 = 1800.

2.5.2. Clustering Based on Color Features

Firstly, as previously mentioned, the solid wood panel images were preprocessed. Then, the first-order color moments, second-order color moments, and color histogram peaks of the R, G, B, L, a, b, H, S, and V nine color channels of each solid wood panel image were extracted, and a total of 27 color features were used for clustering. Finally, the k-means clustering algorithm was selected to realize the clustering of surface color characteristics of solid wood.
The steps of the algorithm are to divide the data into K groups, to randomly select K objects as the initial clustering center, then to calculate the distance between each object and each seed clustering center, and to assign each object to the nearest clustering center. Clustering centers and the objects assigned to them represent a clustering. The cluster center is recalculated based on the existing objects in the cluster when each sample is assigned. This process is repeated until no objects are reassigned to different clustering centers or when the clustering centers do not change.
The K-means clustering method is widely used and is stable and effective. However, the algorithm needs to specify the K value in advance. Since the clustering is unsupervised, the optimal K value cannot be determined based on the classification results. There have been studies on the optimal K value [33,34]. In this study, the contour coefficient method was selected to determine the K value of the clustering of the solid wood panel images. The core index of this method is the silhouette coefficient [35]. The silhouette coefficient of a sample point Xi is defined as follows:
S = b a max ( a , b )  
where a is the average distance between Xi and other samples in the same cluster, called cohesion, and where b is the average distance between Xi and all samples in the nearest cluster, called separation. The definition of nearest cluster is as follows:
C j = arg   min C k 1 n P C k | P X i | 2
where P is the sample in a cluster Ck.
In fact, after taking the average distance of Xi to all samples of a certain cluster as the distance from the point to the cluster, one cluster closest to Xi is selected as the nearest cluster.
The average contour coefficient is obtained by calculating the contour coefficient of all samples and then by calculating the average value. The closer the distance between the samples in one cluster, the farther the distance between the samples in different clusters, the greater the average contour coefficient, and the better the clustering result. The maximum average contour coefficient K is the best clustering number. Using the dataset produced in this scheme and considering that the K value can range from 2 to 10, each K value was clustered and the corresponding contour coefficient was obtained. Then, the relationship between the K value and contour coefficient was plotted, and the K value with the largest contour coefficient was selected. The python implementation is shown in Figure 5, and the optimal K value was 8.
The best K value obtained by theoretical analysis was 8, but in actual production, it is often adjusted according to different customer needs. In order to meet the actual needs, the K value in the experiment was set to 3–11, and the dataset of solid wood was clustered with different color feature combinations.
In this study, three color features were selected and combined as “first-order color moment’, “first-order color moment + second-order color moment’, “first-order color moment + color histogram peak”, “second-order color moment + color histogram peak”, and “first-order color moment + second-order color moment + color histogram peak”.

3. Results

3.1. Color Classification of Solid Wood Panels

Figure 6 shows that, under the five color feature combinations, the solid wood panels in the dataset were clustered into three, four, five, six, and seven categories. The number of columns in each figure represents the number of clusters (K value), and five rows represent five color feature combinations. As a single image was not representative, in order to reflect the real classification effect of the unsupervised clustering algorithm on the surface color of the solid wood panel, nine images were randomly selected from each clustering result and spliced together to form a new image to represent the overall performance of this class. Under the combination of five color features, for each K value, there were five × K images. Finally, images under each color feature combination were arranged in order from light to dark.
It can be seen from each row of the above figures that, under a certain color feature combination, although the number of clustering the centers, namely the K value, were different, the clustering results were able to sort solid wood panel surface colors from light to dark on the whole. With an increase in K value, the difference in surface color information of the solid wood panel in each class gradually decreases. From each column, it can be seen that the surface color information of solid wood panels in each class was chaotic, that some contained obvious texture information, and that some classified the panels with different depths into one class (the last column of each graph is the most obvious). The key to the above problems is that, due to the low K value setting, the different initial clustering centers may lead to the instability of the clustering results, which produces multiple local optimal values.
When the clustering center was selected as the theoretical optimal value, i.e., K = 8, it can be seen from Figure 7 that the clustering results improved compared with the previous five K values. As the number of clusters increased as the K value increased, the similarity of color information on the surface of solid wood panel in each class continually increased and the difference of color information on the surface of solid wood panel in adjacent classes gradually decreased.
Table 2 shows the number of solid wood panel images in each cluster under five color feature combinations. It can be seen that, for the dataset of 1800 images, when K = 8, there were only 11 images in the least number of classes and that their surface color information was very similar.
The theoretical analysis has certain guiding significance, but in actual production, we should make appropriate adjustments according to the complicated information of the surface color of solid wood panel. Previous studies and analyses have found that, when the K value is less than the theoretical optimal, the clustering results only realize the rough classification of the solid wood panel surface color and the difference in the same type of panel is large, which cannot meet the actual needs. When the theoretical optimal K value is selected, the classification effect is improved and the difference of the same type of panel decreases. In order to find the K value that is most suitable for solid wood panel surface color classification, it is necessary to add a K value for further research.
It has been found that the similarity of the same kind of panel increases with an increase in K value, which is a positive correlation. In order to find the number of clustering centers most suitable for solid wood panels, we continued to increase the K values to 9, 10, and 11 and analyzed their classification effect.
The experimental results of K = 9, 10, and 11 showed the following: Firstly, the color of solid wood panels in each class could be sorted from light to dark, especially based on the first-order color moment or color histogram peak clustering, and the results were smoother and less hierarchical. Secondly, as the K value increased, the similarity of images in each class increased and the difference between classes decreased. Thirdly, Lines 2, 4, and 5 of Figure 8, Figure 9 and Figure 10 appeared to be obvious classes of image texture information. Fourthly, from Table 3, Table 4 and Table 5, the number in the last column changed a little, and the number in the previous columns changed slightly.
It can be seen from Figure 8, Figure 9 and Figure 10 that different color feature combinations have different effects on clustering. Color and texture are important characteristics that affect the appearance of wood products. Color classification and texture recognition are conducive to improving the effect of solid wood panel sorting.
When K ≥ 9, there was almost no change in the clustering results of the last class of images, that is, the clustering centers of these images did not change. With an increase in K value, the similarity of the images was higher and higher. Therefore, the K value, in this study, should be set to nine.

3.2. Texture Information Recognition

For the classes with obvious texture information in Lines 2, 4, and 5 in Figure 8, Figure 9 and Figure 10, we found that their color feature combinations had second-order color moments. In total, 166 images in the seventh category of “mean” combination in Table 4 were selected as datasets, and the second-order color moments were used to extract feature vectors for secondary clustering of these images, K = 2.
In Figure 11, nine randomly selected images were taken from 166 images of the first clustering, where b and c are the results of the second clustering—in b, the texture was relatively smooth and the color information was unified, while in c, the texture information was prominent. It can be seen that the second-order color moment had a significant influence on the texture recognition of solid wood.
The images of solid wood panels for the first eight categories of the “mean + histogram” combination in Table 3 (the last category had fewer images and was relatively fixed) were selected as the datasets, and the feature vectors extracted by the second-order color moments were used for the second clustering of these datasets.
The experimental results are shown in Figure 12. The second clustering divided each result of the first clustering into two categories; one category was relatively smooth, with uniform color information, and the other category had prominent texture information and more complex surface information. After the overall color classification of the images in the dataset was completed, the second-order color moment effectively identified the texture information in each class and further optimized the clustering results.
When the clustering center K = 9 was selected, the clustering results of the surface information of solid wood panels met the production requirements; therefore, the optimal K value in this experiment was nine. In actual production, if only a rough classification of surface color of solid wood panels is needed, a smaller K value can be selected. In order to achieve a more detailed color classification, an appropriate feature combination can be selected along with an increase of the K value of clustering center. If we want to identify the texture information, we can choose “twice clustering” and further refine the results of the first clustering. In practical applications, different processing methods can be selected to meet the personalized needs of different customers.
In this experiment, the data in the last column in Table 3, Table 4 and Table 5 corresponded to the darkest color class in a graph with the same K value. The types and numbers of images in these categories basically did not change with a change in color feature combination and K value. We found that these specific images were quite different from other images, which may have been caused by pests, diseases, or special growth environments and can be treated as exceptions.
From Figure 8, Figure 9 and Figure 10, it can be seen that, after sorting the clustering results from light to dark, the classification of solid wood surface color was realized. The larger the K value, the smaller the difference between grades and the more detailed the classification. It can be seen from Figure 12 that the texture information was recognized by using texture sensitive color features. After color classification and texture recognition, the panels with similar surface information were spliced together to realize the coordination and consistency of the appearance of the spliced panel, as shown in Figure 13.

4. Discussion

The above sections verified the effectiveness of solid wood surface color sorting based on machine vision and unsupervised learning algorithm. By creating new datasets and analyzing the effect of different color feature combinations, a new classification method for multi-level color sorting of solid wood plates was proposed, and texture recognition was realized. In this study, the problem of setting the K value in advance was solved through theoretical analysis and experimental summary.
Based on learning style, machine learning can be divided into supervised learning and unsupervised learning. At present, the supervised learning classification algorithms that are widely used mainly include decision tree, k-nearest neighbor (KNN) algorithm, support vector machine (SVM) algorithm, naive Bayesian Model (NBM), deep learning, and other methods. However, the surface information of solid wood panels is complex, it is difficult to label categories manually, and the cost of manual category labeling is too high to obtain enough prior knowledge for supervised learning. Unsupervised learning technology can effectively solve this problem.
In this paper, the feature vectors of solid wood panel images were extracted based on color features for clustering, which realized data dimensionality reduction, which can not only reduce the difficulty of calculation, but also save processing time [36]. In the field of machine learning, there are also Hough transform method and wavelet and local binary pattern method for feature extraction.
Compared with the supervised learning method, the unsupervised learning method applied to the color classification of solid wood panels can overcome the disadvantages of difficult manual category labeling and high cost of manual category labeling, because the supervised learning algorithm needs enough prior knowledge for supervised learning.
Feature vectors were extracted based on the selected color features. On the one hand, sufficient information of solid wood panels can be obtained; on the other hand, it can reduce the dimension of data, reduce the difficulty of calculation, and improve the processing speed. In addition, according to the clustering results of different color features, we made it clear which color feature was suitable for color classification and which color feature was suitable for texture recognition.
In terms of experimental results, from the classification effect, the technical scheme proposed in this paper can realize more detailed classification with the increase of K value. This is difficult to complete by supervised learning method. Due to the fact that the surface information of solid wood panels was complex and there were similarities between the panels, with the increase of the number of classifications, the difference between different classes decreased. It is difficult to distinguish such small differences in the progress of manual category labeling, and manual labeling cannot provide a training set, test set, and verification set for the supervised learning algorithm.
Based on machine vision technology and the machine learning method, K-means unsupervised clustering algorithm completed the color classification and texture recognition of beech wood panels.

5. Conclusions

In this study, in order to solve the problems of solid wood panel surface color classification, including overcoming the low efficiency and high cost of manual classification, the high computational complexity of supervised learning method, and the difficulty in application, an unsupervised learning method was introduced and achieved good results.
The method involved the following: The preprocessed images were blocked, the dataset was expanded, and a new dataset was created. After this, clustering, solid wood panel surface color classification, and texture recognition were performed. Finally, the images in each class were spliced together according to the requirements. This completed the classification of the solid wood panel surface color and the color information of the large panel surface was more uniform.
The color features were selected and combined. According to these feature combinations, the feature vectors of nine color channels (R, G, B, L, a, b, H, S, and V) of a solid wood panel image were extracted, and therefore, the data dimension was reduced and the extraction of sufficient color information was ensured. The K-means clustering algorithm was used to divide the feature vector set into different clusters to complete the sorting of solid wood surface color.
For the beech panel, the optimal clustering center K value based on a theoretical analysis was eight, but in actual production, it was more suitable to set it to nine. The study on the effect of combination of different color features showed that the first-order color moment could be used as a better feature to describe the overall color distribution of wood images and that the color histogram described the proportion of different colors in the whole image. The second-order color moment described the uniformity of image distribution in the color domain. The color of normal wood does not change greatly. Texture is a region with different local color values and overall color, and therefore, it can represent the size of the texture region and the depth of the texture to a certain extent.
To achieve the best combination of color features and because there are neither uniform national standards nor industry standards for the color classification of solid wood panels, enterprises can make adjustments according to the actual needs of different customers. Generally, deciding which color grade a solid wood panel belongs to often depends on its background color rather than its texture color; the background color is the solid wood panel color that accounts for the largest proportion of color. In actual production, if only color classification from light to dark is needed, you can choose the “first-order color moment” or “first-order color moment + color histogram peak”. If texture recognition is required, you can choose the above “twice clustering” method.
The technical proposal has completed the color classification and texture recognition of beech wood panels and achieved good results. However, in actual production, enterprises often need to realize the color sorting of panels of multiple tree species, which requires an improvement to the generalization ability of this technical proposal. The next research direction is to analyze the surface color classification effect of this proposal on other tree species, modify it according to the actual situation, and verify the feasibility of the new proposal through experiments.

Author Contributions

Conceptualization, Z.W. and Z.Z.; methodology, Z.W. and Z.Z.; software, Z.W. and Z.Z.; validation, M.T. and F.D.; formal analysis, Z.W. and Z.Z.; investigation, F.D.; resources, Y.L.; data curation, Z.W. and Z.Z.; writing—original draft preparation, Z.W. and Z.Z.; writing—review and editing, Y.L.; visualization, Z.W., Z.Z. and M.T.; supervision, Y.L.; project administration, Y.L.; funding acquisition, Y.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the 2019 Jiangsu Province Key Research and Development Plan by the Jiangsu Province Science and Technology under grant BE2019112.

Data Availability Statement

The data are not publicly available due to this study is still in progress.

Acknowledgments

In addition to the funds we received, we should also like to thank China Jiangsu Jiangjia Machinery Co., Ltd. for providing us with materials and support for the image collection.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sedliačiková, M.; Moresová, M.; Aláč, P.; Malá, D. What Is the Supply and Demand for Coloured Wood Products? An Empirical Study in Slovakian Practice. Forests 2021, 12, 530. [Google Scholar] [CrossRef]
  2. Yang, X.; Yu, X.; Liu, Y.; Shi, Z.; Li, L.; Xie, S.; Zhu, G.; Zhao, P. Comparative metabolomics analysis reveals the color variation between heartwood and sapwood of Chinese fir (Cunninghamia lanceolata (Lamb.) Hook. Ind. Crop. Prod. 2021, 169, 113656. [Google Scholar] [CrossRef]
  3. Zamri, M.I.P.; Cordova, F.; Khairuddin, A.S.M.; Mokhtar, N.; Yusof, R. Tree species classification based on image analysis using Improved-Basic Gray Level Aura Matrix. Comput. Electron. Agric. 2016, 124, 227–233. [Google Scholar] [CrossRef]
  4. Salca, E.-A.; Krystofiak, T.; Lis, B.; Hiziroglu, S. Glossiness Evaluation of Coated Wood Surfaces as Function of Varnish Type and Exposure to Different Conditions. Coatings 2021, 11, 558. [Google Scholar] [CrossRef]
  5. Lu, Q.; Srikanteswara, S.; King, W.; Drayer, T.; Conners, R.; Kline, E. Machine vision system for color sorting wood edge-glued panel parts. In Proceedings of the IECON’97 23rd International Conference on Industrial Electronics, Control, and Instrumentation (Cat. No.97CH36066), New Orleans, LA, USA, 14 November 1997. [Google Scholar]
  6. Schmitt, E.; Bombardier, V.; Vogrig, R. Fuzzy linguistic rules classifier for wooden board color sorting. In Lecture Notes in Computer Science; BlancTalon, J., Ed.; Springer: Berlin, Germany, 2005; pp. 154–161. [Google Scholar]
  7. Hrčková, M.; Pavol, K.; Peter, K. Measuring and Analysis Colour of Birch Wood in Digital Picture. Manag. Syst. Prod. Eng. 2020, 28, 162–167. [Google Scholar] [CrossRef]
  8. Rashad, S.A.; Tahir, P.M.; Rusli, R.; Hua, L.S. Relationship Between Wood Colour of Seven Tropical Hardwood Species and Formaldehyde Emission of Plywood. Int. J. Recent Technol. Eng. (IJRTE) 2019, 8, 520–523. [Google Scholar]
  9. Geffert, A.; Geffertová, J.; Výbohová, E.; Dudiak, M. Impact of Steaming Mode on Chemical Characteristics and Colour of Birch Wood. Forests 2020, 11, 478. [Google Scholar] [CrossRef] [Green Version]
  10. Xie, B.; Chen, X.; Ding, M.; Zhou, G.; Zhao, X. Design and development of a new strain measuring method based on smartphone and machine vision. Measurement 2021, 182, 109724. [Google Scholar] [CrossRef]
  11. Deng, L.; Li, J.; Han, Z. Online defect detection and automatic grading of carrots using computer vision combined with deep learning methods. LWT 2021, 149, 111832. [Google Scholar] [CrossRef]
  12. Rahman, M.; Chen, N.; Elbeltagi, A.; Islam, M.; Alam, M.; Pourghasemi, H.R.; Tao, W.; Zhang, J.; Shufeng, T.; Faiz, H.; et al. Application of stacking hybrid machine learning algorithms in delineating multi-type flooding in Bangladesh. J. Environ. Manag. 2021, 295, 113086. [Google Scholar] [CrossRef]
  13. Farooq, H.; Deckard, E.R.; Arnold, N.R.; Meneghini, R.M. Machine Learning Algorithms Identify Optimal Sagittal Component Position in Total Knee Arthroplasty. J. Arthroplast. 2021, 36, S242–S249. [Google Scholar] [CrossRef]
  14. Zhuang, Z.; Liu, Y.; Ding, F.; Wang, Z. Online Color Classification System of Solid Wood Flooring Based on Characteristic Features. Sensors 2021, 21, 336. [Google Scholar] [CrossRef]
  15. Miao, R.-H.; Tang, J.-L.; Chen, X.-Q. Classification of farmland images based on color features. J. Vis. Commun. Image Represent. 2015, 29, 138–146. [Google Scholar] [CrossRef]
  16. Hu, X.Y.; Wang, P.L.; Xu, J.Y. A Wood Color Classifier Based on CAV and SVM. Appl. Mech. Mater. 2013, 241–244, 483–487. [Google Scholar] [CrossRef]
  17. Nasir, V.; Nourian, S.; Avramidis, S.; Cool, J. Classification of thermally treated wood using machine learning techniques. Wood Sci. Technol. 2019, 53, 275–288. [Google Scholar] [CrossRef]
  18. García Faura, Á.; Štepec, D.; Cankar, M.; Humar, M. Application of Unsupervised Anomaly Detection Techniques to Moisture Content Data from Wood Constructions. Forests 2021, 12, 194. [Google Scholar] [CrossRef]
  19. Diakhate, M.; Bastidas-Arteaga, E.; Pitti, R.M.; Schoefs, F. Cluster analysis of acoustic emission activity within wood material: Towards a real-time monitoring of crack tip propagation. Eng. Fract. Mech. 2017, 180, 254–267. [Google Scholar] [CrossRef]
  20. Lin, Y.; Chen, D.; Liang, S.; Xu, Z.; Qiu, Y.; Zhang, J.; Liu, X. Color Classification of Wooden Boards Based on Machine Vision and the Clustering Algorithm. Appl. Sci. 2020, 10, 6816. [Google Scholar] [CrossRef]
  21. Yadav, H.; Bansal, P.; Sunkaria, R.K. Color dependent K-means clustering for color image segmentation of colored medical images. In Proceedings of the 2015 1st International Conference on Next Generation Computing Technologies (NGCT), Dehradun, India, 4–5 September 2015. [Google Scholar]
  22. Sun, H.; Chen, Y.; Lai, J.; Wang, Y.; Liu, X. Identifying Tourists and Locals by K-Means Clustering Method from Mobile Phone Signaling Data. J. Transp. Eng. Part A Syst. 2021, 147. [Google Scholar] [CrossRef]
  23. Abo-Elnaga, Y.; Nasr, S. K-means cluster interactive algorithm-based evolutionary approach for solving bilevel multi-objective programming problems. Alex. Eng. J. 2022, 61, 811–827. [Google Scholar] [CrossRef]
  24. Mohseni, S.A.; Wu, H.R.; Thom, J.A.; Bab-Hadiashar, A. Recognizing Induced Emotions With Only One Feature: A Novel Color Histogram-Based System. IEEE Access 2020, 8, 37173–37190. [Google Scholar] [CrossRef]
  25. Kubovský, I.; Krišťák, L.; Suja, J.; Gajtanska, M.; Igaz, R.; Ružiak, I.; Réh, R. Optimization of Parameters for the Cutting of Wood-Based Materials by a CO2 Laser. Appl. Sci. 2020, 10, 8113. [Google Scholar] [CrossRef]
  26. Shi, J.; Li, Z.; Zhu, T.; Wang, D.; Ni, C. Defect Detection of Industry Wood Veneer Based on NAS and Multi-Channel Mask R-CNN. Sensors 2020, 20, 4398. [Google Scholar] [CrossRef]
  27. Jin, X.; Che, J.; Chen, Y. Weed Identification Using Deep Learning and Image Processing in Vegetable Plantation. IEEE Access 2021, 9, 10940–10950. [Google Scholar] [CrossRef]
  28. Luo, C.; Sun, X.; Sun, X.; Song, J. Improved Harris Corner Detection Algorithm Based on Canny Edge Detection and Gray Difference Preprocessing. J. Phys. Conf. Ser. 2021, 1971, 012088. [Google Scholar] [CrossRef]
  29. Hwa, S.K.T.; Bade, A.; Hijazi, M.H.A. Enhanced Canny edge detection for Covid-19 and pneumonia X-Ray images. IOP Conf. Ser. Mater. Sci. Eng. 2020, 979, 012016. [Google Scholar] [CrossRef]
  30. Chung, Y.-L.; Lin, C.-K. Application of a Model that Combines the YOLOv3 Object Detection Algorithm and Canny Edge Detection Algorithm to Detect Highway Accidents. Symmetry 2020, 12, 1875. [Google Scholar] [CrossRef]
  31. Nnolim, U.A. Automated crack segmentation via saturation channel thresholding, area classification and fusion of modified level set segmentation with Canny edge detection. Heliyon 2020, 6, e05748. [Google Scholar] [CrossRef]
  32. Baloch, A.; Memon, T.D.; Memon, F.; Lal, B.; Viyas, V.; Jan, T. Hardware Synthesize and Performance Analysis of Intelligent Transportation Using Canny Edge Detection Algorithm. Int. J. Eng. Manuf. (IJEM) 2021, 11, 22–32. [Google Scholar]
  33. Chouhan, R.; Purohit, A. An approach for document clustering using PSO and K-means algorithm. In Proceedings of the 2018 2nd International Conference on Inventive Systems and Control (ICISC), Coimbatore, India, 19–20 January 2018; pp. 1380–1384. [Google Scholar] [CrossRef]
  34. Akthar, N.; Ahamad, M.V.; Ahmad, S. MapReduce Model of Improved K-Means Clustering Algorithm Using Hadoop MapReduce. In Proceedings of the 2016 Second International Conference on Computational Intelligence & Communication Technology (CICT), Ghaziabad, India, 12–13 February 2016; pp. 192–198. [Google Scholar]
  35. Rousseeuw, P.J. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef] [Green Version]
  36. Wang, L.; Huang, Z.; Gao, H.; Ni, C. A method for continuously monitoring the quality of Masson pine seedlings. PLoS ONE 2021, 16, e0234592. [Google Scholar]
Figure 1. Image acquisition device: (1) transmission device, (2) transmission belt, (3) control panel, (4) CCD camera holder, (5) CCD camera, (6) sample solid wood floor panel, (7) photoelectric sensor, and (8) pressure wheel.
Figure 1. Image acquisition device: (1) transmission device, (2) transmission belt, (3) control panel, (4) CCD camera holder, (5) CCD camera, (6) sample solid wood floor panel, (7) photoelectric sensor, and (8) pressure wheel.
Forests 12 01154 g001
Figure 2. Example of the result: (a) original image; (b) image with the background removed.
Figure 2. Example of the result: (a) original image; (b) image with the background removed.
Forests 12 01154 g002
Figure 3. Color histogram of beech panel in RGB, HSV, and Lab color space.
Figure 3. Color histogram of beech panel in RGB, HSV, and Lab color space.
Forests 12 01154 g003
Figure 4. Original image and divided graph.
Figure 4. Original image and divided graph.
Forests 12 01154 g004
Figure 5. Contour coefficient and K value.
Figure 5. Contour coefficient and K value.
Forests 12 01154 g005
Figure 6. K = 3–7 clustering result images.
Figure 6. K = 3–7 clustering result images.
Forests 12 01154 g006
Figure 7. K = 8 clustering result images.
Figure 7. K = 8 clustering result images.
Forests 12 01154 g007
Figure 8. K = 9 clustering result images.
Figure 8. K = 9 clustering result images.
Forests 12 01154 g008
Figure 9. K = 10 clustering result images.
Figure 9. K = 10 clustering result images.
Forests 12 01154 g009
Figure 10. K = 11 clustering result images.
Figure 10. K = 11 clustering result images.
Forests 12 01154 g010
Figure 11. Second-order color moment result images: (a) the first clustering result images, (b) the second clustering result images with smooth outer surface, (c) the second clustering result images with obvious texture information.
Figure 11. Second-order color moment result images: (a) the first clustering result images, (b) the second clustering result images with smooth outer surface, (c) the second clustering result images with obvious texture information.
Forests 12 01154 g011
Figure 12. Two-clustering result images.
Figure 12. Two-clustering result images.
Forests 12 01154 g012
Figure 13. The result images: (a) no classification, (b) after clustering.
Figure 13. The result images: (a) no classification, (b) after clustering.
Forests 12 01154 g013
Table 1. Specific parameters of the CCD camera.
Table 1. Specific parameters of the CCD camera.
Parameter NameParameterParameter NameParameter
ModelLinea LA-GC-02K05BSpectrumColor
Sensor TechnologyCMOSOperating temperature0–65 °C
Resolution2048 × 2Pixel depth8 bit
Pixel Size7.04 × 7.04 µmHorizontal frequencyUp to 26 KHz
Table 2. K = 8 number of images in each cluster.
Table 2. K = 8 number of images in each cluster.
Features12345678
Mean36233032825123915210929
Mean + variance39338831924723111110011
Mean + histogram3813483072722071609035
Variance + histogram3773663132891911658712
Mean + variance + histogram3843583112661901638246
Table 3. K = 9 number of images in each cluster.
Table 3. K = 9 number of images in each cluster.
Features123456789
Mean3253123042422391821097710
Mean + variance3843253052532211101038811
mean + histogram37133630823219717890799
Variance + histogram3493432842312281541148611
Mean + variance + histogram37534530924419016092769
Table 4. K = 10 number of images in each cluster.
Table 4. K = 10 number of images in each cluster.
Features12345678910
Mean288269258232209191166958111
Mean + variance316301265243205179108947811
Mean + histogram31029929522922113715477699
Variance + histogram3633352892591941768680117
Mean + variance + histogram304287284228208178146777711
Table 5. K = 11 number of images in each cluster.
Table 5. K = 11 number of images in each cluster.
Features1234567891011
Mean265265256235199179146122685510
Mean + variance30029826222620517510896754411
Mean + histogram27427025721420917014912577469
Variance + histogram31631224424318915210985736611
Mean + variance + histogram3163002872432011481367248409
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, Z.; Zhuang, Z.; Liu, Y.; Ding, F.; Tang, M. Color Classification and Texture Recognition System of Solid Wood Panels. Forests 2021, 12, 1154. https://doi.org/10.3390/f12091154

AMA Style

Wang Z, Zhuang Z, Liu Y, Ding F, Tang M. Color Classification and Texture Recognition System of Solid Wood Panels. Forests. 2021; 12(9):1154. https://doi.org/10.3390/f12091154

Chicago/Turabian Style

Wang, Zhengguang, Zilong Zhuang, Ying Liu, Fenglong Ding, and Min Tang. 2021. "Color Classification and Texture Recognition System of Solid Wood Panels" Forests 12, no. 9: 1154. https://doi.org/10.3390/f12091154

APA Style

Wang, Z., Zhuang, Z., Liu, Y., Ding, F., & Tang, M. (2021). Color Classification and Texture Recognition System of Solid Wood Panels. Forests, 12(9), 1154. https://doi.org/10.3390/f12091154

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop