• 沒有找到結果。

Repeat Pattern Segmentation of Printed Fabrics by Hough Transform Method

N/A
N/A
Protected

Academic year: 2021

Share "Repeat Pattern Segmentation of Printed Fabrics by Hough Transform Method"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

Repeat Pattern Segmentation of Printed Fabrics by Hough Transform Method

C

HUNG

-F

ENG

J

EFFREY

K

UO1

, C

HUNG

-Y

ANG

S

HIH

,

AND

J

IUNN

-Y

IH

L

EE

Intelligence Control and Simulation Laboratory, Department of Polymer Engineering, National Taiwan University of Science and Technology, Taipei, Taiwan, Republic of China

ABSTRACT

A novel approach of repeat pattern segmentation is proposed for printed fabrics. Printed fabrics are captured by a color scanner and converted into full color digital files. To classify the color segmentation and pattern elements a fuzzy C-means (FCM) clustering algorithm and a specific cluster-validity criterion are used to obtain the pattern image of printed fabric. Then, the repeat pattern segmentation of the pattern image is established by Hough transform. The experimental results have shown that this systematic method is very suitable for the analysis of the repeat pattern of printed fabrics.

The patterns on printed fabrics are made by printing equipment in order to duplicate a repeat pattern onto the fabrics. When designing the printed fabrics, the repeat pattern becomes the most important characteristic, espe- cially for comparing different printed fabrics. Although computerized color dividing and plate-making systems have been used to improve the working process recently [5, 6], the analysis of repeat patterns on printed fabrics still needs to be performed manually. During the gray level image processing, although the Fourier transform can be used for dealing with the repeat pattern in the image, the examination of the repeat features from a spectral diagram [8, 11] is still a manual operation.

Furthermore, there is still no relevant study of the auto- matic repeat pattern segmentation for printed fabrics and the display of repeat patterns at the moment has no standardized method. All of these factors have caused difficulties in expressing and comparing printing pat- terns. In a previous study we have used unsupervised fuzzy clustering algorithms to elucidate the colors and patterns on printed fabrics [3]. The present study ex- tended those results to classify the pattern elements and the Hough transform was used to distinguish different repeat patterns automatically.

Research Methods

The issue of repeat patterns on printed fabrics is the need to obtain repeat pattern segmentation that can pro- duce the complete pattern of the printed fabrics. In ad- dition, different starting locations of a repeat pattern will

produce different types of repeat pattern. As the four repeat patterns shown in Figure 1 can all give the same print pattern, an effective way to differentiate repeat pattern segmentation is necessary.

The repeat pattern consists of a set of pattern elements, which is continuously duplicated for a complete print pattern. Hence, if the distribution of the same pattern elements can be found and the corresponding vertical and horizontal distance of this repeated pattern element

1To whom correspondence should be addressed: e-mail:

[email protected]

FIGURE1. Four different types of repeat patterns.

Textile Res. J. 75(11), 779 –783 (2005) DOI: 10.1177/0040517505058848 © 2005 SAGE Publications www.sagepublications.com

(2)

can be measured, then the size of the repeat pattern can be acquired. The Hough transform [2] can be used to construct lines vertically and horizontally to connect the central points of the same pattern elements.

H

OUGH

T

RANSFORM

How to construct straight lines from a set of discon- nected points without a priori knowledge of slopes or intersections? The Hough transform is an algorithm that will take a collection of points and find all the lines on which these points are lying [2, 7, 9]. A polar represen- tation of a straight line shown in Figure 2 is given by:

␳ ⫽ r cos ␪ ⫹ c sin ␪ . (1) In a row and column (r, c)-based image space, the distance from the origin to the line along a perpendicular to the line can be defined by ␳, and the angle between the r-axis and the ␳ -line can be defined by ␪. Then, for each pair of values for ␳ and ␪, the corresponding line will be defined. This ( ␳, ␪) parameter space is divided into a specific number of blocks. Each block corresponds to a line. If a single line is needed, the peak detection to the maximum value in the ( ␳, ␪) parameter space will be a constraint. If all significant lines are desired, a threshold value will be set for the peak in such ( ␳, ␪) parameter space.

The algorithms of the Hough transform are given here.

1. Define the desired increments on ␳ and ␪, ⌬␳ and ⌬␪, and quantize the ( ␳, ␪) parameter space accordingly.

2. For each point in (r, c)-based image space, plug the values for r and c into the line equation (1). Then, for each value of ␪ in the quantized space, solve for ␳.

3. Accumulate the ( ␳, ␪) pairs in the corresponding block of the ( ␳, ␪) parameter space.

Experimental Methods

I

MAGE

C

APTURE AND

P

REPROCESS

MATLAB [1] was used as a software tool to develop the system. The experimental material was a two-color printed fabric. The size of the fabric sample was 6 inches

⫻ 6 inches. An EPSON 2400 PHOTO scanner with resolution of 150 dpi was used to digitize the printed fabric image in full-color mode (RGB model). The cap- tured image consisted of 900 pixels ⫻ 900 pixels. In order to reduce the color differentiation caused by undu- lated weaving structures on the fabric appearance, mean filters were applied to process scanned full-color images [3, 10].

C

OLOR

S

EGMENTATION BY THE

U

NSUPERVISED

C

LUSTERING

M

ETHOD

The patterns were obtained by the color segmentation.

The clusters of colors were obtained based on a fuzzy C-means (FCM) clustering algorithm and the search for good cluster numbers was made by specific cluster- validity (SC) criterion. The unsupervised fuzzy cluster- ing method was implemented by using the following steps [3, 4].

1. Initial setting of cluster number: c ⫽ 2, c

max

⫽ 10.

2. Use the FCM algorithm to compute the cluster centers matrix (W) and membership degree matrix (U). By iteratively updating the cluster centers and the mem- bership grades for each data point, FCM moves the cluster centers to the “right” location within a data set by iteration. The FCM algorithm is implemented by using the following steps.

A. Choose the weighting exponent (m ⫽ 2) and the terminative precision ( ␧ ⫽ 0.00001).

FIGURE2. (a) A polar representation of a straight line; (b) the (␳, ␪) parameter space.

(3)

B. Initialize the fuzzy C-partition and set iteration counter t ⫽ 1.

C. Update the centers matrix, using

w

i

j⫽1 n

共u*

ij

m

x

j

j⫽1 n

共u*

ij

m

, for 1 ⱕ i ⱕ c (2)

D. Update the memberships degree matrix, using

u

ij

k⫽1c

储 x 储 x

jj

⫺ w ⫺ w

ki

2/2/共m⫺1兲共m⫺1兲⫺1

(3)

E. If 兩U

共t⫹1兲

⫺ U

共t兲

兩 ⱕ ␧ stop, otherwise t ⫽ t ⫹ 1 go to step C.

3. Compute the SC index with the specific cluster-valid- ity criterion.

The SC index introduced by Zahid et al. [12] is adopted, and the maximum SC for a given number of clusters c is used to examine which cluster number set is better.

SCS

␲ ⫺ FS

FC (4)

where

S

i⫽1 c

储w

i

⫺ w៮储

c , w ៮ is the mean of the

whole data set ,

␲ ⫽

r⫽1

c j⫽1n

共u

ij

m

储 x

j

⫺ w

i

2

j⫽1 n

u

ij

,

FS

i⫽1

c⫺1

r⫽1

c⫺i j⫽1n

min 共u

ij

,u

kj

2

j⫽1 n

min 共u

ij

,u

kj

, k ⫽ r ⫹ i ,

FC

j⫽1

n

max

1ⱕiⱕci

u

ij2

j⫽1 n

max

i 1ⱕ i ⱕ c

u

ij

4. Let c ⫽ c ⫹ 1, if c ⱕ c

max

then go to step 2.

P

ATTERN

E

LEMENTS

C

LASSIFICATION BY

U

NSUPERVISED

C

LUSTERING

M

ETHOD

In the final step, all pattern elements have been deter- mined, based on the colors, and so the numbers and the central point location of pattern elements can be calcu- lated. In order to avoid the presence of incomplete pat- tern elements on the image fringes influencing the anal- ysis, the elimination of these pattern elements before evaluating the pattern characteristic values is essential.

To determine the distribution of the same pattern ele- ments, these pattern elements need to be classified based on unsupervised clustering analysis. This unsupervised clustering is also done using the FCM clustering algo- rithm and a specific cluster-validity criterion, as men- tioned. For classified patterns, it calculates the shape features of each pattern element for unsupervised clus- tering analysis including Color (the color of pattern ele- ments), Area (the actual number of pixels in the single pattern), Extent (the Area divided by area of bounding box) and Eccentricity (the ratio of the distance between the focus of the ellipse and its major axis length). The eccentricity ranges from 0 to 1. It is zero for a circular object and one for a linear object.

R

EPEAT

P

ATTERN

S

EGMENTATION BY

T

HE

H

OUGH

T

RANSFORM

As the lines required are straight lines structured in the horizontal and vertical directions of the same pattern elements, it is necessary to define the center of the same type of pattern elements. The Hough transform is em- ployed to obtain plus/minus 5° of the horizontal and plus/minus 5° of the perpendicular lines. The parameters for calculation are set to 0.1° for the angle increment, ⌬␪

, and 1 pixel for the distance increment , ⌬␳. The straight line that connects the pattern elements would take 3 as its threshold value and can be obtained from the ( ␳,␪) pa- rameter space. Then the straight lines reconstruct the position of the pattern element center. The distance be- tween the horizontal and vertical lines, which connect the same pattern elements is the vertical and horizontal size of the repeat pattern. Finally, from the central point of the same pattern elements, the desired repeat pattern of the pattern image of the printed fabric can be segmented.

Results and Discussion

The color digital image of the two-color printed fabric

with 900 pixels ⫻ 900 pixels captured by a color scanner

is shown in Figure 3. After color segmentation, the

pattern elements are shown in Figure 4.

(4)

The pattern element, obtained in Figure 4, after being classified by the unsupervised clustering analysis, can be divided into two clusters. The two types of pattern ele- ments obtained are called cluster A and cluster B. In terms of the cluster center, the closest one of the two cluster pattern elements is illustrated in Figure 5. When the incomplete individual patterns on the image fringes

are removed, and the central point of each individual pattern is marked with a ⫹ symbol, the distribution diagram of all cluster A pattern elements can be defined as shown in Figure 6.

The central points (r, c) in Figure 6 have been trans- formed by the approach of Hough transform into ( ␳, ␪) parameter space. In Figure 7, the angle of lines is chosen by threshold value, where the horizontal angle is ⫺0.7°

and the perpendicular angle is 90.6°. Based on different corresponding perpendicular distances ( ␳), all the straight lines on the horizontal and vertical direction will be drawn. From the diagram, the average distance of cluster A pattern element on the horizontal direction is 257 pixels, and the average distance of cluster A pattern element on perpendicular direction is 235 pixels can be

FIGURE3. Full-color digital image of two-color printed fabric.

FIGURE4. Pattern image of two-color printed fabric.

FIGURE5. (a) Cluster A pattern element; (b) cluster B pattern element.

FIGURE6. The distribution diagram of cluster A pattern element.

(5)

seen. Therefore, 257 pixels ⫻ 235 pixels would be the horizontal and perpendicular size of the repeat pattern segmentation of this printed fabric. The repeat pattern of this printed fabric in Figure 8 is segmented from Figure 4 based on the coordinate (67, 50) of the pattern element central point on the left corner of the top and 257 pixels

⫻ 235 pixels size. However, due to slight declination, the image in Figure 8 has been transformed into a rectangle by the program.

Conclusions

This study has successfully shown the method of ob- taining repeat pattern segmentation of a printed fabric.

As it is based on the pattern element central point, the displayed segmentation would have a fixed shape. The

approach seems more practical and convenient. More- over, when scanning fabric, it is usually difficult to accurately keep the fabric fixed in horizontal and per- pendicular angles, which results in declination of the image. In this paper, the suggested Hough transform can easily solve this problem. The expression of the repeat pattern segmentation obtained, based on the pattern ele- ment central point, is a new creative concept. It is a practical processing approach for computer vision and we hope it will be helpful for further study of repeat pattern segmentation in printed fabrics in the future.

A

CKNOWLEDGEMENT

The research was supported by the National Science Council of the Republic of China under the grant No.

NSC-93-2216-E-011-019.

Literature Cited

1. Fausett, L. V., “Applied Numerical Analysis using MATLAB,” Prentice Hall, Englewood Cliffs, NJ, 1999 2. Hough, P. V. C., Methods and Means for Recognizing

Complex Patterns., U.S. Patent 3, 069, 654, (1962).

3. Kuo, C. F., Shih, C. Y., Kao, C. Y. and Lee, J. Y., Color and Pattern Analysis for Printed Fabric by Unsupervised Clustering Method, Textile Res. J. 75(1), 9 –12 (2005).

4. Kuo, C. F., Shih, C. Y and Lee, J, Y., Automatic Recog- nition of Fabric Weave Patterns by Fuzzy C-Means Clus- tering Method, Textile Res. J. 74(2), 107–111 (2004) 5. Lung, H.-J., Application and Development of Automatic

Color Dividing System for Print, J. China Textile Inst., 2(4), 24 –31 (1992).

6. Lung, H.-J., Application and Development of Automatic Color Dividing System for Print, J. China Textile Inst.

4(2), 111–115 (1994).

7. Pitas, I., “Digital Image Processing Algorithms,” Prentice Hall, Englewood Cliffs, NJ, pp. 231–239, 1993.

8. Ravandi, S. A. H., and Toriumi, K., Fourier Transform Analysis of Plain Weave Fabric Appearance, Textile Res.

J. 65(11), 676 – 683 (1995).

9. Umbaugh, S. E., “Computer Vision and Image Process- ing,” Prentice Hall PTR, Englewood Cliffs, NJ, pp. 75–79 1999.

10. Umbaugh, S. E., “Computer Vision and Image Process- ing,” Prentice Hall PTR, Englewood Cliffs, NJ, pp. 39 – 61 1999.

11. Xu, B., Identifying Fabric Structures with Fast Fourier Transform Techniques, Textile Res. J. 66(8), 496 –506 1996.

12. Zahid, N., Abouelala, O., Limouri, M., and Essaid, A., Unsupervised fuzzy clustering, Pattern Recognit. Lett. 20, 123–129 (1999).

FIGURE7. The connecting lines of cluster A pattern element central point in vertical and horizontal direction.

FIGURE8. Repeat pattern of printed fabric.

參考文獻

相關文件

Keywords: pattern classification, FRBCS, fuzzy GBML, fuzzy model, genetic algorithm... 第一章

/** Class invariant: A Person always has a date of birth, and if the Person has a date of death, then the date of death is equal to or later than the date of birth. To be

grep - print lines matching a pattern. $ grep [OPTIONS]

Since the FP-tree reduces the number of database scans and uses less memory to represent the necessary information, many frequent pattern mining algorithms are based on its

of each cluster will be used to derive the search range of this cluster. Finally, in order to obtain better results, we take twice the length of

In the second phase, the optimization design of the dot pattern of the light guide plate can be launched to categorize the light guide plate into 31 areas and used the

A digital color image which contains guide-tile and non-guide-tile areas is used as the input of the proposed system.. In RGB model, color images are very sensitive

In each window, the best cluster number of each technical indicator is derived through Fuzzy c-means, so as to calculate the coincidence rate and determine number of trading days