Recognition of Similar Wooden Surfaces with a Hierarchical Neural Network Structure

—The surface quality assurance check is an important task in industrial production of wooden parts. There are many automated systems applying different methods for preprocessing and recognition/classification of surface textures, but in the most cases these methods cannot produce very high recognition accuracy. This paper aims to propose a method for effective recognition of similar wooden surfaces applying simple preprocessing, recognition and classification stage. The method is based on simultaneously training two different neural networks with surface image histograms and their second derivatives. The combined outputs of these networks give an input training set for a third neural network to make the final decision. The proposed method is tested with image samples of seven similar wooden texture images and shows high recognition accuracy. The results are analyzed, discussed and further research tasks are proposed.


INTRODUCTION
Many modern automated inspection systems in wooden industry are developed for inspection of the wooden surface quality.All of them have costly hardware solutions and are compatible with the specific company production equipment.The existing software products for texture recognition are not intended for implementation in common purpose programmable logic controllers widely used in technological processes control.A specific task in wooden industry is the sorting of similar tiles having identical textures but with different shades or including some defects.It is difficult to obtain high classification accuracy in this case because of the high correlated texture parametrical descriptions.
In some cases the surface textures have to be recognized in movement, because of the production process specifics.Thus the motion blur noise is added to the similarities of the textures and some other kind of noise with Gaussian or uniform distribution.Thus de-correlation of the texture descriptions in the preprocessing stage is needed, as these descriptions usually feed the recognition structure itself.That is the reason to develop effective methods and algorithms aiming high recognition accuracy for different kinds of similar textures when evaluating them in production environment.As well optimal (considering the proportion between classification accuracy, calculation simplicity and cost) methods, software and hardware system solutions have to be sought, suitable for implementation in real time systems.
Taking into consideration the above discussion, a method for recognition of similar wooden surfaces applying simple preprocessing, recognition and classification stage is presented.The method is based on preliminary analyzing the correlation between different wood texture descriptions, followed by a simultaneously training two different neural networks with surface image histograms and their second derivatives.The combined outputs of these networks give an input training set for a third neural network to take the final decision.The proposed method is tested with image samples of seven similar wooden classes and many exemplars of their noisy images.The obtained results are presented and discussed.

II. RELATED WORKS
The most research in the wood product industry has been applied in the development of automatic visual inspection systems, based on the quality of the wood and the presence of defects.Usually these technologies use devices and technologies that are rather complex and expensive.A wood classification system based on several Multi-layered perceptron (MLP) neural network models has been developed and discussed in [1].The MLP structure has been trained by the authors, using 20 input features such as angular second moment, contrast, correlation, inverse difference moment, entropy, etc., for five different image rotations [1]), extracted from the texture.In this case, the authors have obtained 1sec overall computation time and 95% accuracy.Other methods for defect detection in textured wood surfaces rely on the analysis and fusion of image series with variable illumination [2,3].These methods can be considered as filter-based, where the filters or feature detectors are learned from a set of training surfaces.It spends 0.5 to 1.6 seconds to process an image of 256x256 pixels and is tested in Mat Lab.The method represented in [4] is based on applying a length histogram that embodies the width and height of the grey level texture histogram and gives a maximum of 86.6% recognition accuracy.Considering the existing texture classification methods [1,2,3,4] and technologies, we came to the conclusion that they are not effective for textures having identical structures, they need significant computational time, and in the most cases cannot obtain high recognition accuracy.The existing neural network software for texture recognition is applicable for simulating and testing the methods but is not intended for implementation in real time systems for control of different automated technological processes in industry.www.ijarai.thesai.org

III. HIERARHICAL NEURAL NETWORK RECOGNITION STRUCTURE
When investigating recognition and classification of a preliminary known texture classes, more suitable is to apply an adaptive recognition method and a supervised learning scheme, since this method gives the more accurate results.In this instance the best variant is to choose neural networks (NN) because of the good NN capabilities to adapt to changes in the input vector, to set precisely the boundaries between the classes therefore offering high recognition accuracy and fast computations in the recognition phase [5].
After choosing a NN for combination between a supervised learning scheme and utilization of the histogram parameters, the more important thing is the right choice of the input NN data.This choice is influential for the right and fast convergence of the NN, for the number of parameters in the input vector and the whole NN topology.The initial choice of variables is guided by intuition.Next the number of NN input parameters has to be optimized, developing a suitable method for their reduction aiming to preserve only the informative parameters without loose of any information useful for accurate class determination.The preprocessing stage in the recognition systems with visual image acquisition is intended for image quality enhancement, for feature extraction and constituting a feature parametrical vector.This vector is provided for feeding the chosen recognition structure with input data.Some important requirements to the input vector are: precisely description of the class using distinguishing features, high input vector correlation between different samples of the same class and high de-correlated input vectors representing different classes.
Before taking the decision what kind of appropriate texture recognition method to apply, it is necessary to evaluate the similarity i.e. the correlation between the estimated description vectors [6].As the histograms give an integral characteristic of the texture image, they are very appropriate to be used as initial parametrical description vectors of the image.

A. The proposed method
The proposed method aims high recognition accuracy of similar wooden surfaces applying simple preprocessing to obtain different input parametrical vectors for feeding two neural networks (NN) on the first recognition stage.The first stage NN outputs constitute the input vector for feeding the second stage NN, designed for making the final decision.[6,7,8].The NNs are capable of setting precisely the boundaries between overlapping classes in the parametrical feature space.But feeding the NN with decorrelated input vectors already in the preprocessing stage, would give assistance to the training process and respectively to the recognition accuracy.
The proposed recognition structure is shown in Fig. 1.NN1 is trained with a set of histogram values H(g) representing different samples of the examined texture classes for each grey level g.NN2 is trained with a set of second derivative over the histogram values d 2 H(g)/dg 2 representing different samples of the same texture classes.The outputs of NN1 and NN2 constitute the input training vector for the third NN3 which is intended to make the final decision, increasing the recognition accuracy.The proposed method and the hierarchical recognition structure was trained and tested with many samples of seven similar texture images with their species numbers, shown in Fig. 2.

B. Preprocessing stage
In the preprocessing stage the correlation of different texture image parametrical descriptions between each two species was calculated.The inter class correlation coefficient of classes (species) i and j is r ij and was calculated according to (1), where ( ) is the histogram value for grey level g and ̅ is the mean of all histogram values for class i.Next the coefficient r ij was calculated when the parametrical descriptions of all species are DCTs over their histograms , ( )-as it is given in (2).The correlation coefficient r ij between each two texture species was also calculated for the first dH(g)/dg and second derivative d 2 H(g)/dg 2 over the texture histogram values.Fig. 3 represents the four r ij between each two wooden species over their H(g), Fig. 3. Correlation coefficients between each two texture species , ( )-dH(g)/dg and d 2 H(g)/dg 2 .Obviously r ij decreases considerably for the first and second histogram derivative.So it seems reasonable to use d 2 H(g)/dg 2 as input training set because of its low inter class correlation and its capability to reflect the vertical histogram changes for each grey level g.Thus the both parametrical descriptions H(g) as an integral grey level distribution and d 2 H(g)/dg 2 are used as input vectors for NN1 and NN2.

IV. EXPERIMENTS AND RESULTS
The texture image histograms of the seven investigated species are normed through division of each histogram value by  , ( )for the tested similar texture images, respectively Fig. 6 shows the normed first dH(g)/dg derivatives for the same images.

A. Training the NN structure
The images were captured with a CCD camera Nikon D7100 with CMOS 23.5x15.6 sensor and resolution of 4494x3000 pixels.The suggested hierarchical NN recognition structure is trained, tested and validated with 40 samples representing each one of the seven species given in Fig. 2. Some normed d2H(g)/dg2 for the tested similar texture images are represented in Fig. 7.The samples were generated adding respectively different amount -between 5 and 25 Pix -motion blur to simulate the effect of image acquisition in movement.Also 3% or 5% Gaussian noise was added to some of the images.According to the requirements of the sampling theorem [9] the number of values in H(g) and d 2 H(g)/dg 2 were reduced to 50 points to facilitate the real-time work of the NN structure.The most frequently used proportion between training, cross validating and testing set of 60%-15%-25% of the general sample number is used in the research [10].The 60% of the samples for each specie were randomly given to the corresponding NN1 -H(g) and to NN2 -d 2 H(g)/dg 2 .The NN1 was trained to mean square error of ε=0.001,NN2 to ε=0.01 and NN3 to ε=0.03.Each NN has only one hidden layer with 20 neurons.The three NNs were trained applying Backpropagation (BPG) learning algorithm since it seems to give the most promising results.Neuro Solution software package [10] was used, because it offers DLL export of the trained NN structure and an opportunity for implementation in different Three different BPG algorithms [10] were probed aiming best accuracy in the recognition phase: static where the output of a network is strictly a function of its present input, trajectory where each exemplar has a temporal dimension defined by its forward period and fixed point where each exemplar represents a static pattern that is to be embedded as a fixed point of a recurrent network [10].The best recognition accuracy in the recognition phase was obtained applying the static BPG learning algorithm.

B. Results and discussion
The achieved recognition accuracy when testing the trained NN structure with 10 samples (i.e.25% of the general sample number) of each class/specie is represented in Table 1.It is visible that NN1 gives recognition accuracy between 50 and 70%, NN2between 70 and 90% (because the input vectors are better de-correlated), but NN3 on the last stage gives between 90% and 100%.Thus each NN contributes to the training and to the recognition accuracy in the test phase.NN3 on the second stage sets precisely the boundaries between similar texture images and classifies accurately the tested samples.Fig. 8 represents NNs output values in dependence of variations of two characteristic pointsmax[d 2 H(g)/dg 2 ] and VH (g) max-diff .www.ijarai.thesai.org Considering the real-time working of the system, the influence of the production technology specifics is reflected in the chosen input training set, i.e. motion blur and Gaussian noise are added to the images.Many recent developed methods use texture histograms, DCT or Wavelet transform over the texture histogram as NN input training sets [6, 7].The proposed method here combines two different input training vectors aiming to reflect simultaneously the translations or stretches along the argument axis together with changing the function values.The translation of the histogram because of brightening or darkening of the image and the histogram stretches because of adding motion blur are the most possible reasons for histogram changes along the argument (grey levels) axis.As the image histograms are an integral presentation of the image texture and reflect the above mentioned image changes, they could be used as input training vectors for a recognition structure.The first and second derivatives of the image histogram represent the changes in the function values, i.e. in the height of the grey level texture histogram for each grey level point.The present research shows that the second derivative over the image texture histogram meets better the requirements for low inter class correlation, in comparison to other previous tested by the author NN input training sets

Fig. 4 .
Fig. 4. Normed histogram values for the tested similar texture images

Fig. 6 .
Fig. 6.Normed dH(g)/dg for the tested similar texture images the maximum H max (g) value.Thus the NN1 input training set is in the argument range of the NN activation function.They are represented in Fig.4.All of the rest descriptions -, ( )-dH(g)/dg and d 2 H(g)/dg 2 are also normed in this way on account of better correlation analysis and NNs argument fitting.Fig.5shows the normed histogram , ( )for the tested similar texture images, respectively Fig.6shows the normed first dH(g)/dg derivatives for the same images.

Fig. 7 .
Fig. 7. Normed d 2 H(g)/dg 2 for the tested similar texture images Programmable Logic Controllers (PLC) for real-time work.Three different BPG algorithms[10] were probed aiming best accuracy in the recognition phase: static where the output of a network is strictly a function of its present input, trajectory where each exemplar has a temporal dimension defined by its forward period and fixed point where each exemplar represents a static pattern that is to be embedded as a fixed point of a recurrent network[10].The best recognition accuracy in the recognition phase was obtained applying the static BPG learning algorithm.

Fig. 8 .
Fig. 8. NNs output values in dependence of variations of two characteristic points -0 1 H (g) max-diff