# Texture Detect on Rotary-Veneer Surface Based on Semi-Fuzzy Clustering Algorithm

Wei Cheng, Ping Liang, Suqun Cao

► To cite this version:

Wei Cheng, Ping Liang, Suqun Cao. Texture Detect on Rotary-Veneer Surface Based on Semi-Fuzzy Clustering Algorithm. Third IFIP TC 12 International Conference on Computer and Computing Technologies in Agriculture III (CCTA), Oct 2009, Beijing, China. pp.369-374, 10.1007/978-3-642-12220-0_54. hal-01055425

HAL Id: hal-01055425

https://inria.hal.science/hal-01055425

Submitted on 12 Aug 2014

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
TEXTURE DETECT ON ROTARY-VENEER
SURFACE BASED ON SEMI-FUZZY
CLUSTERING ALGORITHM

Wei Cheng*, Ping Liang, Suqun Cao

Faculty of Mechanical Engineering, Huaiyin Institute of Technology, Huaian, Jiangsu
Province, P. R. China 223003

* Corresponding author, Address: Faculty of Mechanical Engineering, Huaiyin Institut of Technology, huaian 223003, Jiangsu Province, P. R. China, Tel: +86-517-83559196, Email: hychw@sina.com

**Abstract:** The texture of rotary-veneer can interference in defects detection, this paper presented a modified semi-fuzzy clustering (SFC) algorithm. SFC algorithm incorporates Fisher discrimination method with fuzzy theory using fuzzy scatter matrix. By iteratively optimizing the fuzzy Fisher criterion function, the final clustering results are obtained. SFC algorithm exhibits its robustness and capability to obtain well separable clustering results. This algorithm can detect the texture and defects on rotary-veneer surface exactly.

**Keywords:** Rotary-veneer; Semi-fuzzy clustering (SFC); Defects detection; Texture

# 1. INTRODUCTION

Plywood grade was decided by the surface quality of rotary-veneer. The defect of rotary-veneer surface affects the quality of the wood-board panels products such as plywood, the computer vision system that forms using linear CCD gathers the image of veneer tape can be used automatic control and optimization of veneer tape cut out offer tech support. A goal of the rotary-veneer defects detection is that presents according to the defects different with the veneer background characteristic, and separates it from the veneer background. The superficial backgrounds of rotary-veneer include mainly each kind of shape and the relative order texture pattern. Due to
textures and the most detects of veneer surface are the nature formations,
their quality are the same, and their characteristic are similar. Rotary-veneer
surface texture regular session disturbance defects characteristic extraction.
Therefore, the research of the rotary-veneer surface texture detection may
enhance the rotary-veneer detection precision, realizes automatic grading
based on the computer vision veneer.

In reference (Ping Liang, Wei Cheng 2008), the texture of rotary-veneer
can interference in defect detects, this paper presented a modified Fuzzy C-
Mean algorithm (FCM). The approach of this algorithm is sample density of
inter-class and distances of intra-class as comprehensive parameters, thereby
to obtain the validity initial cluster centers. This algorithm can detect the
texture and defects on rotary-veneer surface. Most of these methods like
FCM are essentially rooted at the within-cluster scatter matrix as a
compactness measure, which means that the assumption that the clusters are
hyperspheroidal is taken. In fact, real data sets seldom accommodate such an
assumption. Except for the compactness measure, the concept of the
separation measure such as the between-cluster scatter matrix should also be
involved in the design of clustering methods such that well separated cluster
can be obtained.

In this paper, we extend Fisher linear discriminant to its fuzzified version
and define the fuzzy Fisher criterion function. Then a novel semi-fuzzy
clustering (SFC) method is presented. Compared with FCM, the proposed
algorithm has the following characteristics: (1) It directly uses the fuzzy
FLD as its objective function, therefore, it is an unsupervised fuzzy partition
clustering method. Its objective function integrates the fuzzy between-cluster
scatter matrix well with the fuzzy within-cluster scatter matrix. (2) It
incorporates the discriminating vector into its update equations such that the
obtained update equations do not take commonly-used FCM-like forms. (3)
It is more robust to noise and outliers than FCM.

## 2. FISHER CRITERION AND FISHER LINEAR DISCRIMINANT

Given c pattern classes $X^{(i)} = [x_i^1, x_i^2, ..., x_i^{N_i}]$ in the pattern set which contains N d-dimensional patterns, where $i = 1, 2, ..., c$, $N_i$ is the number of all the patterns in the $i$th class, thus $N = N_1 + N_2 + ... + N_c$. The between-class scatter matrix $S_b$ and the within-class scatter matrix $S_w$ are determined by the following formulae:
$$S_b = \sum_{i=1}^{c} \frac{N_i}{N} (m_i - \bar{x})(m_i - \bar{x})^T \quad (1)$$

$$S_w = \frac{1}{N} \sum_{i=1}^{c} \sum_{j=1}^{N_i} (x_j^i - m_i)(x_j^i - m_i)^T \quad (2)$$

Where $m_i$ denotes the mean of the $i$th class, $\bar{x}$ denotes the mean of all the patterns in the pattern set.

According to the scatter matrices, the Fisher criterion function can be defined as follows:

$$J_{FC}(\omega) = \frac{\omega^T S_b \omega}{\omega^T S_w \omega} \quad (3)$$

Where $\omega$ is an arbitrary vector in d-dimensional space. The Fisher optimal discriminate vector is $\omega^*$ corresponding to maximum of $J_{FC}(\omega)$, which is the eigenvector corresponding to maximum eigenvalue of the following eigensystem equation:

$$S_b \omega^* = \lambda S_w \omega^* \quad (4)$$

Where $\lambda$ is diagonal and consists of the corresponding eigenvalues.

### 3. FUZZY FISHER CRITERION AND THE PROPOSED ALGORITHM

First, let us fuzzily the concept of the above Fisher linear discriminate (FLD).

Suppose that the membership function $u_{ij} \in [0,1]$ with $\sum_{i=1}^{c} u_{ij} = 1$ for all $j$ and the index $m > 1$ is a given real value, where $u_{ij}$ denotes the degree of the $j$th d-dimensional pattern belonging to the $i$th class, we can define the following fuzzy within-class scatter matrix $S_{fw}$:

$$S_{fw} = \sum_{i=1}^{c} \sum_{j=1}^{N_i} u_{ij}^m (x_j - m_i)(x_j - m_i)^T \quad (5)$$

And the following fuzzy between-class scatter matrix $S_{fb}$:

$$S_{fb} = \sum_{i=1}^{c} \sum_{j=1}^{N_i} u_{ij}^m (m_i - \bar{x})(m_i - \bar{x})^T \quad (6)$$

Thus, we can derive a novel fuzzy Fisher criterion called fuzzy FLD as follows:
$$J_{\text{FFC}}(\omega) = \frac{\omega^T S_{fb} \omega}{\omega^T S_{fw} \omega} \qquad (7)$$

In terms of the fuzzy FLD as above, we will derive a novel semi-fuzzy clustering algorithm based on fuzzy Fisher criterion. Maximizing $J_{\text{FFC}}$ directly in Eq.(7) is not a trivial mathematical derivation task due to the existence of its denominator. However, we can reasonably relax this problem by applying the following Lagrange multipliers $\lambda$ and $\beta_j (j = 1,2,\dots,n)$

together with the constraint $\sum_{i=1}^{c} u_{ij} = 1$ to formula (7):

$$F = \omega^T S_{fb} \omega - \lambda \omega^T S_{fw} \omega + \sum_{j=1}^{N} \beta_j (\sum_{i=1}^{c} u_{ij} - 1) \qquad (8)$$

Setting $\frac{\partial F}{\partial \omega}, \frac{\partial F}{\partial m_i}, \frac{\partial F}{\partial u_{ij}}$ to be zero, we respectively have

$$S_{fb} \omega = \lambda S_{fw} \omega \qquad (9)$$

Where $\lambda$ may be taken as the largest eigenvalue.

$$m_i = \frac{\sum_{j=1}^{N} u_{ij}^{m} (x_j - \frac{\bar{x}}{\lambda})}{\sum_{j=1}^{N} u_{ij}^{m} (1 - \frac{1}{\lambda})} \qquad (10)$$

$$u_{ij} = \frac{F_1}{F_2} \qquad (11)$$

Where

$$F_1 = (\omega^T (x_j - m_i)(x_j - m_i)^T \omega - \frac{1}{\lambda} \omega^T (m_i - \bar{x})(m_i - \bar{x})^T \omega)^{\frac{1}{m-1}}$$

$$F_2 = \sum_{k=1}^{c} (\omega^T (x_j - m_k)(x_j - m_k)^T \omega - \frac{1}{\lambda} \omega^T (m_k - \bar{x})(m_k - \bar{x})^T \omega)^{\frac{1}{m-1}}$$

When Eq.(11) is used, as stated in the above, $u_{ij}$ should satisfy $u_{ij} \in [0,1]$, hence, in order to satisfy this constraint, we let

$$u_{ij} = 1 \text{ and } u_{ij} = 0 \text{ for all } i' \neq i, \text{ if}$$

$$\omega^T (x_j - m_i)(x_j - m_i)^T \omega \leq \frac{1}{\lambda} \omega^T (m_i - \bar{x})(m_i - \bar{x})^T \omega \qquad (12)$$
That is to say, if Eq.(12) holds, we take a hard partition for the pattern. The rational can be intuitively explained from a geometric viewpoint as shown in Fig. 1. In Fig. 1, all the patterns with one class □ and the other class ○, the two clusters center with * and the total mean point (i.e. the average point of all samples) with ⭐ are projected along dotted lines onto the optimal discriminating vector. Obviously, if the Euclidean distance between the projection of a pattern and the projection of certain cluster is equal to or less than multiplied by the Euclidean distance between the projection of this cluster and ⭐, then we should take a hard partition for this pattern.

<figure><img src="image_2.png" /><figcaption>Fig.1 FFC-SFC hard partition regions</figcaption></figure>

From the above analysis, we can obtain a novel semi-fuzzy algorithm based on fuzzy fisher criterion (FFC-SFC).

**Algorithm FFC-SFC**

Step1. Set the given threshold $\varepsilon$, initialize $U = [u_{ij}]_{c×N}$ and
$m = (m_1, m_2, \cdots, m_c)$ using K-mean;

step2. Compute $S_{fw}, S_{fb}$ using Eq.(5), Eq.(6) respectively;

step3. Compute the largest eigenvalue $\lambda$ and the corresponding $\omega$ using Eq.(9);

Step4. Update $m_i$ and $u_{ij}$ using Eq.(10), Eq.(11) and Eq.(12) respectively;

Step5. Compute $J_{FFC}$ using Eq.(7);
Step6. If $J_{FFC} < \varepsilon$ or the number of iteration $\ge$ the given value, output the clustering result and then terminate, otherwise back to Step 2.

## 4. THE ANALYSES OF ROTARY-VENEER SURFACE TEXTURE DETECTION

In the research of rotary-veneer surface texture detection, a goal is to enhance the detection precision of rotary-veneer surface defects. Due to the textures show large expanse, continuously long linearity distribution. The textures occupy the big region in the rotary-veneer surface. But the defects of rotary-veneer surface occupy the small region, and they are regular, such as the shape of knots is an ellipse. Compares with the texture color, the defects color is also deep. Therefore, when we segment the rotary-veneer defect image, shape and color was chosen for this segmentation characteristic.

In fig.1, (a) image show rotary-veneer image; (b) image show used the FCM algorithm which this reference (Ping Liang, Wei Cheng 2008) proposed to segment this texture image; (c) image show used SFC to segment this texture image.

We can see that SFC has better segmentation accuracy, and is comparatively competitive to FCM.

<figure><img src="image_3.png" /><figcaption>a) original image</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>b) FCM</figcaption></figure>

<figure><img src="image_5.png" /></figure>

na

<figure><img src="image_6.png" /><figcaption>c) SFC</figcaption></figure>

<figure><img src="image_7.png" /></figure>
ACKNOWLEDGEMENTS

Funding for this natural science research was provided by Jiangsu
Provincial Department of Education (P. R. China) (No. 2005KJD520033).

REFERENCES

Suqun Cao, Shitong Wang, et al, “Fuzzy Fisher Criterion Based Semi-Fuzzy Clustering Algorithm”, Journal of Electronics & Information Technology, 30(9), 2008, pp.2132-2165(in Chinese)

Ping Liang, Wei Cheng, “Texture Detection on the Rotary-Veneer Surface Based on FCM”,
Techniques of Automation and Applications, 2008(11), pp.79-85(in Chinese)