时间:2024-08-31
DING Caihong(), HUANG Hao( ), YANG Yanzhu()
College of Mechanical Engineering, Donghua University, Shanghai 201620, China
Abstract: The accurate extraction and classification of leather defects is an important guarantee for the automation and quality evaluation of leather industry. Aiming at the problem of data classification of leather defects, a hierarchical classification for defects is proposed. Firstly, samples are collected according to the method of minimum rectangle, and defects are extracted by image processing method. According to the geometric features of representation, they are divided into dot, line and surface for rough classification. From analysing the data which extracting the defects of geometry, gray and texture, the dominating characteristics can be acquired. Each type of defect by choosing different and representative characteristics, reducing the dimension of the data, and through these characteristics of clustering to achieve convergence effectively, realize extracted accurately, and digitized the defect characteristics, eventually establish the database. The results show that this method can achieve more than 90% accuracy and greatly improve the accuracy of classification.
Key words: defect detection; hierarchical classification; principal component analysis; reduce dimension; clustering model
At present, the leather industry is booming, and the large volume of leather demand stimulates the development of the industry. The rapid development of leather has an important influence on the textile and garment industry. But cows are bites inevitably by insect in the process of growth. Then the leather will produce all sorts of scars. The formation of processing the original leather will certainly have some defects, such as openings and imprints. It will influence passively the quality of the product and affect its quality grade[1]. For example, it has a certain influence on the quality of shoes, bags and clothing and the level of leather also determines the quality of product.
For these defects, although there are some classification standards for defects, there is no very clear data to guide them, and the choice subjective of human is the main factors for deviation. In the age of industrialization, the digitized process of various leather defects is still long, and there is not effective database established. In the process of classification of defects, reasonable defect classification and digitization of defect categories are the basis for efficient management and discrimination of leather defects.
Wei[2]introduced some characteristics, causes and effects of leather. Zhu and Jin[3]studied the classification of leather images based on fractal dimension. Li and Han[4]studied the description of some leather defects and introduced them from different features, but did not distinguish and classify the defects.
Based on the characteristics of leather defects, such as the geometric shape, texture features and gray scale features, this paper describes the defects visually and establishes a reasonable and practical data-oriented system to provide convenient and effective reference for future automatic classification, evaluation and management communication of the leather industry[5].
To classify defects, a way of hierarchical classification[6]is adopted. Its essence is to decompose the known data until certain conditions are met. In the process of inspecting defects, the geometric shape feature is the most important feature of human sensory vision Then it is divided into different shape categories. According to the appearance features of defects, such as texture and gray-scale, they are classified, and finally the data of defects are classified, as shown in Table 1.
Table 1 Types and characteristics of leather defects
The process of defect transformation from image to data is called feature expression[7]. The main process is feature description. Through data description and expression, the process of transformation to data is finally realized.
Surface defects are irregular bodies of surface that are generated unintentionally or accidentally during the process of machining, storing and using time. In defect detection, different products have different defect definitions, but the classification of defects is based on the following main features, namely geometric features, gray-scale and color features, texture features. There are many kinds of leather defects, and each defect has different geometric shapes, gray-scale distribution and texture features. Therefore, to identify defects, it is necessary to effectively describe the characteristics of defects and obtain corresponding feature descriptors. This paper selects the above features, as shown in Fig. 1, and extracts the feature data corresponding to each defect[8].
Fig.1 Category of defects features
Geometric features: it is the first visual characteristics in the face of a picture. Geometric shapes can describe shapes and sizes in image through a series of single or multiple geometric expressions. The characteristic used to describe the geometric shape of surface defects[9]is shown in Fig. 2.
Fig.2 Description of geometric feature
Grayscale features: it is the characterization of the gray-scale distribution of pixels, reflecting the frequency of each gray level in the image. It is mainly a statistical description of the global distribution of each gray level in an image.
Texture features: it is a description of the property of the surface structure of an image that changes periodically or slowly[10].
For different defects, different features can be combined to describe them, and the descriptors of features are shown in Table 2.
Table 2 Description of leather defect
Feature selection is an important step after feature data extraction. If the number of features is small, the image information is small and the recognition rate is low. With the increase of feature categories, the information of image also increases accordingly, which can distinguish different types of defect images better. However, when the number of features increases to a certain number of dimensions, the information will become redundantly, and some invalid features may exist. When the number of features is increased, the recognition rate decreases. Therefore, it is necessary to select the most effective feature from the feature selection, and the process of reducing the spatial dimension is called dimension reduction[11], in which the effective feature is called dominant feature.
The features should have the following four features[12].
(1) Differentiability: for features belonging to different categories, their eigenvalues should be significantly different.
(2) Stability: for the same object, the eigenvalues should be similar.
(3) Independence: the characteristics used are not related to each other.
(4) High efficiency: get the feature vectors with less number of features and less probability of classification error.
(1) The dot shape can be seen from the visual representation that the area is small and round. It can be seen from Fig. 3 (a) that the roundness of the black spot is the highest and the other defects are clearly distinguished, and it can be seen from Fig. 3(b) that the black spot has the smallest area, so the black spot defect can be identified as a point[13].
In addition, the bad surface is composed of spot-like defects similar to black spots, but it is a composite defect. In this paper, the bad surface is defined as surface defect.
(2) The line shape is visually long and slender. How to define the line shape? The ratio of the square of the graph perimeter to its area can be defined by the mathematical method.
(a) Circularity
(b) AreaFig.3 Comparison of feature data: (a) circularity; (b) area
As shown in Fig. 4, the bigger theB, the more linear it is. According to the comparison between the data and the figure, the smaller theBis, the more round it is. WhenB=100, take Fig. 5 as an example. WhenS=100, the length ratio of both sides is 50∶1, which can be considered as a boundary of line shape. It can be seen from Fig. 5 that both the scratch and vein mark are greater than 30, which is significantly different from the rest and can be determined as linear. At the same time, it can be seen that the linearity of the dark spot is minimal and can be clearly distinguished from the rest. As it is in a round dot shape, it is minimal. However, it can be seen from the data of the neck strip is too large, because the extraction is too irregular and discrete, resulting in the contour longer and instability.
Fig.4 Expression of linearity
Fig.5 Data graph of linear
Based on the features expressed by each defect and the feature data extracted in it, we distinguish various defects, and the results are shown in Fig. 6.
Clustering algorithm[14]can be understood as a method of unsupervised classification, which is classified according to the distance between samples and the degree of similarity.
(1)
Fig.7 Classification of clustering methods
The number of samples is reduced in each application of feature vector and the combination of samples and will form a new sample set. For example, by means of circularity constraint, many samples that are not in range can be removed, and then the discrete areas that are close to each other in the effective samples can be merged. In the merging process, it is necessary to judge the distance between discrete data, within a certain error range, and present stability, then it is considered to be a valid set of the same kind.
Through analysis the data and by comparing the variance of (Fig. 8(a)) and (Fig. 8(b)), holes can be clearly distinguished from all other defects, while the feature of convexity (Fig. 8(c)) can be also improved accurately.
The dark spot can be clearly distinguished from all other defects by roundness (Fig. 3(a)) and convexity (Fig. 8(c)), besides, the area (Fig. 3(b)) and contour length (Fig. 8(f)) can be improved accurately.
The bad surface can be clearly distinguished from all other defects by roundness (Fig. 3(a)) and rectangularity (Fig. 8(d)), while convexity (Fig. 8(c)) can be improved accurately.
The main characteristic of contour length in the neck (Fig. 8(e)) is slightly overlapping with the mark, and can be effectively distinguished from the rest. There are many secondary features that also overlap. As a result, the average gray-scale (Fig. 8(g)) of the neck stripe and imprints is different, so the neck stripe can be effectively differentiated.
The mark can be effectively distinguished by contour length (Fig. 8(e)) and area (Fig. 3(b)) to distinguish scratches, vein marks, bad scar, openings, holes, and dark spots, with over-rectangularity (Fig. 8(d)) to distinguish bad surface, and mean grayness (Fig. 8(g)) to distinguish neck stripe.
Scratches can be distinguished by gray variance (Fig. 8(b)) from mark and holes, and by roundness (Fig. 3(a)) from openings, dark spots and mark, and by rectangles (Fig. 8(d)) from neck stripe, and contrast (Fig. 8(i)) can be distinguished in a limited way by scratch and vein mark.
Through the mean grey level (Fig. 8(g)), the vein mark can distinguish the mark, opening, hole and bad surface, and through the contour line length (Fig. 8(e)), they can distinguish the neck stripe, scar and dark spots. There is a great overlap between the vein mark and scratch, and the contrast degree (Fig. 8(i)) can be separated in a limited way.
Bad scar can be distinguished by the length of the contour line (Fig. 8(e)) from scratch, neck stripe, mark, hole, vein mark, bad surface and dark spots, and by the energy (Fig. 8(h)) from opening.
The opening can be distinguished by the length of contour line (Fig. 8(e)) to distinguish the neck stripe, mark, dark spots and bad surface, and by the mean gray level (Fig. 8(g)) to distinguish the scratch, vein mark and scar. Holes can be distinguished by correlation (Fig. 8(a)).
The eigenvector group corresponding to the defect is concluded.
Hole={ρ,σ2,C′};
Dark spots={RC,C′,S,L};
Bad surface={RC,RT,C′};
Scratch={σ2,RC,Rt,GT};
Bad scar={L,E};
(a) Correlation
(b) Gray variance
(c) Convexity
(d) Rectangularity
(e) Perimeter-1
(f) Perimeter-2
(g) Mean
(h) Energy
(i) Contrast
The extraction of feature is the key to the defect classification, traditional defect extraction focuses on physical features, including the geometrical features of the defect, gray-scale features and texture features. In view of the irregular shape of the defect, the small rectangular frame is used to fill the defect feature, and the approximate rectangle instead of the irregular defect to avoid calculating unrelated regions. This way can reduce the computation and minimize the influence on the feature extraction[15].
The sample used for experimental data needs to be collected and a large number of samples are needed. In order to solve the problem of insufficient sample, this paper expands the sample quantity through geometric transformation of the original sample. The specific operations are as follows[16].
(1) Rotate 90° and -90°
(2) Translate a certain number of pixels from top to bottom and from left to right.
For the acquired images, the defect features are extracted after a series of image processing, and the salient features are taken as the main features and it will be seen as the criteria for defect differentiation. Then the data will be stored in the feature data to set a sample of defects, as shown in Fig.9.
Fig.9 Database setup process
In the process of extracting leather defects, the boundary between many defects is not very obvious, and some features interfere with each other, which brings great difficulties to extract feature and will reduce the accuracy of extraction. The multi-dimensional features extracted from the image are irrelevant. The establishment of the sample feature database each defect to be well separated from each other and can be extracted according to each unique and characteristic feature. In this experiment, the cross-defect samples have achieved good results, and the process is shown in Fig. 10.
Fig.10 Process of extraction
As shown in Fig.11(a), we can see the results of the classification method that the point, line and surfaces can be well distinguished. In Fig. 11(b), there are two different defects of line, and the effect is obvious. In Fig. 11(c), there are several different surface defects, and all are well distinguished.
The experimental results can be seen in Table 3, with an accuracy rate of 90%, and the processing speed of the experimental single picture is as high as 2 s. This results meet the experimental requirements.
Table 3 Analysis of experimental results
(Table 3 continued)
Fig.11 Results of defect feature: (a) the classification of point, line and surface; (b) the classification of different lines; (c) the classification of different defects
The establishment of database is for the purpose of classification. In the process of classification, the applying and training of classifier is indispensable. The establishment of database is an indispensable stage.
Currently, the classification of leather quality still depends on the status quo of manual work. In order to improve the automation of leather industry, the classification and datamation of defects are conducive to the establishment of unified standards, the standardization of industry requirements, the strengthening of industry management and the promotion of communication. The classification of defects based on data provides an effective guarantee for the leather automation industry, such as the classification of leather grade.
In addition, this paper also needs to further strengthen the accuracy of the classified data and define the areas where the defects overlap, which is the next step of research and expansion.
我们致力于保护作者版权,注重分享,被刊用文章因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理! 部分文章是来自各大过期杂志,内容仅供学习参考,不准确地方联系删除处理!