Abstract
Seam puckering is often considered an undesirable wrinkling appearance along a seamline, and is a problem that concerns fabric, sewing machine and sewing thread manufacturers. Until now, the standardized evaluation method for seam-puckering grading is still a visual-based, subjective method. This research project was aimed at developing a computer-vision system for automatic seam-puckering evaluation to improve the consistency and efficiency of grading. Fabric seam images were captured by a customized image acquisition system, and the seam images and the optimal image parameters, such as length and width, were determined according to the results of human inspection. The seamline was located with edge detection and Hough transform techniques. After rotating and cropping the image, the projection profile was then obtained and smoothed with the locally scatter-plot smoothing (LOESS) algorithm. Five characteristic features were extracted from the smoothed profile. Finally, an artificial neural network classifier was created to realize the automatic assessment of the seam-puckering grade. The experimental results proved that the proposed system can achieve accurate seam-puckering grades, and has the potential to replace the current manual evaluation.
Seam puckering refers to the gathering of a seam during or after the sewing and laundering due to yarn displacement, thread tension, machine feeding and shrinkage. Seam puckering causes an unwanted appearance along the seamline and reduces the aesthetic value of a garment. Therefore, it has become one of the major performance attributes to be evaluated routinely in the apparel industry for the quality control of garments and the optimal settings of sewing machines. Until now, the subjective evaluation methods, such as AATCC 88B and ISO 7770:2009,1,2 have been the major approaches for assessing seam puckering based on the photographic standards that represent five discrete seam-puckering grades ranging from 1 (worst) to 5 (best).
Research on automated methods for objective seam-puckering grading has been carried out by using a three-dimensional (3D) or two-dimensional (2D) imaging system.3–6 A seam appears to be puckered when fabric smoothness along the seamline is disturbed by vertical waves or wrinkles. This surface structure has made 3D image analysis particularly suitable for seam-puckering evaluation.3,4 Fan et al. 7 used a laser scanner and a band pass filter to extract the fabric surface profiles parallel to the seamline. The features computed from the profiles exhibited excellent correlations with the subjective puckering grades. Park and Kang 8 employed 3D image analysis to calculate five shape features that quantify seam puckering. Koehl et al. 9 proposed a 3D digitizing system to create 3D models for seam specimens, and the feature vectors from the spectral analysis, texture analysis, multi-scale wavelets analysis and fractal analysis were then extracted. Kang et al. 10 employed a non-contact scanning system and a novel wavelet-fractal method to perform the seam-puckering and fabric wrinkle evaluation.
In a 2D fabric image, seam puckering is indicated by deviation patterns of pixel brightness. Stylios and Sotomi5,6 developed a cognitive model to measure the seam puckering of lightweight fabrics and used a 2D computer-vision system to estimate seam-puckering grades. Bahlmann et al. 11 used spectral analysis and the self-organized map network to classify the seam specimens into five grades. Mariolis and Dermatas12,13 used a radial basis function (RBF) network and later an ordinal logistic regression model to realize the classification of seam-puckering grades. Xin et al. 14 characterized seam-puckering appearance by integrating X-illumination, which means one set of illumination units using four directional lighting resources located slantingly in the east, west, north and south of the sample testing board, morphological fractal analysis and Bayes classifier into an evaluation system. Although the methods based on 2D image analysis appeared to be a good option for constructing an easy-to-use and cost-effective evaluation system, the problems on how to achieve consistent and reproducible results in seam-puckering evaluations have not been thoroughly addressed. For instance, the image dimensions used to grade seam puckering can directly change the measurement of puckering features as well as the final grading. At a given image resolution, what are the sufficient image length and width to be evaluated? In addition, what are the characteristic seamline features that allow comprehensive seam-puckering evaluations?
This paper attempts to explore the optimal image parameters for seam-puckering analysis using visual assessment and relevant geometrical features for seam-puckering characterization. Effective image-processing techniques and a neural network are adopted for seam-puckering segmentation and classification. The ultimate goal of this research is to develop a reliable 2D imaging system that can produce accurate seam-puckering grading consistent with human evaluations.
System setup for image acquisition
As shown in Figure 1(a), the setup for acquiring fabric seam images is a simple 2D imaging system composed of a digital camera (Canon Rebel EOS 1000D), a flash light (Canon, Speedlite 270EX II) and a copy stand (RPS Studio, RS-CS1070). The camera, connected to a computer through a USB3 port, is set at the “Program AE” shooting mode, in which the shut speed and aperture can be set programmatically. For this application, the image dimension was set at 3888 × 2592 pixels (10.1 megapixels), and the focus length was fixed at f = 55 mm. We adjusted the working distance to make a full image frame cover a physical area of 105 mm × 102 mm (6 inches × 4 inches) on the stand’s platform. This area is enough for evaluating the seam-puckering grade. The image resolution can be determined by dividing the image dimension with the corresponding view area, which was 0.039 mm/pixel in this application. The wrinkle information and the seamline in the fabric are clear in the captured image with this image resolution. The flash, mounted at a rear corner of the platform, is connected to the camera via an E-TTL off-camera shoe cord and generates an oblique illumination that highlights surface variations. The flash can be automatically triggered when the camera’s shutter is activated by the software’s “image-capture” command. The main material characteristics used in the experiment are listed in Table 1. Figure 1(b) shows the image of one of the five standard seam-puckering samples specified in ISO 7770:2009.
2
The puckering variations are clearly indicated by bright and dark waves intensified by the oblique light. In addition to many small bumps on the seamline, a number of large bumps are unevenly spread out on both sides of the seamline.
Acquisition of seam-puckering image: (a) setup; (b) sample image. Characteristics of the seam samples
Selection of image parameters
As indicated in Figure 1(b), seam-puckering waves vary along and across a seamline. A puckering image covers only a portion of the viewed sample near a seamline. In order to achieve a consistent and reproducible evaluation of seam puckering, this image with a selected length and width must contain sufficient information. The selection of an optimal length and width of the image can be determined by a trial test associated with visual rating of seam puckering. In the experiment, 10 observers (five males and five females) were trained with the ISO 7770-2009 standard, 2 and the five graded fabric seam-puckering samples (G = 1,…, 5) in the ISO 7770-2009 standard were used as the standard materials for evaluation (1—worst,…, 5—best). Each of these graded samples was imaged five times and at different seamline locations.
Five image lengths, 2500, 2000, 1500, 1200 and 1000 pixels (correspondingly, 97.5, 78.0, 58.5, 46.8 and 39.0 mm), were first examined by comparing the observer’s ratings to the actual grade of each sample when the image width was fixed at 800 pixels (31.2 mm), which covers the entire sample width (see Figure 2). The five images of each graded sample were cropped into the five length groups (k = 1,…, 5), and each length group contains 5 × 5 = 25 images (j = 1,…, 25). Note that in this paper, a cropped seam image was rotated 90° counterclockwise to make the seamline horizontal for a better presentation. The 10 observers (i = 1,…, 10) rated all the images independently on the same computer screen in reference to the ISO 7770-2009 standard. If Fabric seam images with different lengths.

Figure 3 shows the total rating error of the images in each length group. It is clear that at the current image resolution (0.039 mm/pixel), the second length group, that is, 2000 pixels or 78.0 mm in length, generated the smallest error when the observers rated the 25 images of this length using the ISO 7700-2009 standard. This was because when the length was too long, for example, the first length group (2500 pixels, or 97.5 mm), the image contained too large variations in puckering, which complicated the observers’ judgments. When the image length was short, for example, the third group, the image might not contain adequate puckering information to permit a realistic rating. This was the reason why the error increased exponentially for groups 3 (1500 pixels), 4 (1200 pixels) and 5 (1000 pixels), even if the intervals between these groups diminished. Thus, the optimal image length at the given resolution was selected at 2000 pixels (78.0 mm).
Five image widths, 600, 450, 300, 200 and 150 pixels (correspondingly, 23.4, 17.5, 11.7, 7.8 and 5.8 mm), were then considered to check the influence of puckering variations in the transverse direction when the image length was set at 2000 pixels (78.0 mm). As shown in Figure 4, the cropped images with different widths were approximately centered on the seamline. Figure 5 displays the total rating error of the images in each width group. It can be seen that the error descended when the image width decreased from group 1 (600 pixels) to group 4 (200 pixels), and then rose at group 5 (150 pixels). This was because when the image width was too wide or too narrow, the image might either contain too much non-puckering information or omit real puckering components. Therefore, the optimal width at this resolution was 200 pixels (7.8 mm). Finally, the size of the images used for the automatic seam-puckering analysis in this research was set at 2000 × 200 pixels (78.0 mm × 7.8 mm).
Total rating error of each length group performed by human observers. Fabric seam images with different widths: Width 1–600 pixels (23.40 mm); Width 2–450 pixels (17.55 mm); Width 3–300 pixels (11.70 mm); Width 4–200 pixels (7.80 mm), Width 5–150 pixels (5.85 mm). Total rating error of each width group performed by human observers.


Seam image processing
Cropping seam images
An original seam image needs to be cropped to generate an image with the optimal dimensions determined above and the seamline being positioned horizontally at the middle of the image height. This comprises the following steps.
Locate the seamline using the Canny edge-detection algorithm.
15
Figure 6(a) is the detected seamline for the sample in Figure 4. Use the Hough transform
16
to determine the orientation angle of the seamline and then rotate the image by the orientation angle so that the seamline is horizontally oriented (Figure 6(b)). The rotation eliminates the influence of the orientation of the sample in the initial placement during image acquisition. Take the fitting line of the rotated seamline as the vertical center of the image and crop the image with the size of 2000 × 200 pixels. The new image is the one for further processing (Figure 6(c)).
Cropping fabric seam image: (a) the detected seamline by Canny edge-detection; (b) the rotated seam image; and (c) the cropped seam image in 2000 × 200 pixels (78.0 mm × 7.8 mm).

Adjusting image intensity
Because of the oblique illumination used in the system, the image intensity changes from high values (bright) on the right to low values (dark) on the left along the seamline. To reduce this uneven illumination, a smooth seam image (non-puckered) was used to estimate the coefficient for intensity adjustment, as shown in Figure 7. The adjustment takes two steps:
choose a small region on both left-hand (dark) and right-hand (bright) sides to calculate the average intensities of a bright region and a dark region, Lb and Ld; adjust the image intensity, I(i, j), as follows
A smooth seam image for intensity adjustment.
where i and j are the column and row numbers of an image, w and h are the width and height of the image and Ia(i, j) is the adjusted intensity at pixel (i, j). Equation (2) gives a general expression for adjusting pixel intensities of a cropped image.

Extraction of seam-puckering features
To eliminate the influence of the seamline on the extraction of puckering features, the top portion and the bottom portion of the image need to be cropped, respectively. Figure 8(b) shows that the cropping lines that define the top portion are the top 80 rows and the bottom portion is the bottom 80 rows out of the total of 200 rows. This is because a seamline normally takes around 40 central rows in the image.
Top and bottom sub-images (b) and projection profiles ((a) and (c)).
An intensity profile can be calculated by accumulating pixel intensities in the vertical direction, that is, vertically projection, to intensify puckering variations along the seamline. Figures 8(a) and (c) display the vertically projected profiles of the top and bottom sub-images. The waves on the two profiles strictly link to the puckers in the sub-images, providing the wrinkle information in the image. Prior to the feature extraction, small blurs on the profiles should be eliminated because they result from the weave structure. The locally weighted regression smooth algorithms, including the locally weighted scatter-plot smoothing (LOWESS) algorithm and locally scatter-plot smoothing (LOESS),17,18 are effective for removing this kind of scattered noisy fluctuation. For a given date set {xi}, a smoothed data {yi} can be calculated using the weighted polynomial least squares method within a span. The polynomial model of a single variable parameter {xi, yi} can be expressed as
Select a proper span for data smoothing. The weight coefficient for each data point in the span is calculated by the following equation
Perform the weighted linear least-squares regression on a second-degree polynomial to obtain the estimated coefficient Computer intermediate weights,
where x is the predicted value associated with the response value to be smoothed, xi is the nearest neighbor of x as defined by the span and d(x) is the distance along the abscissa from x to the most distant predictor value within the span.
In the experiment, we selected the span as 0.03, and implemented the LOESS in MATLAB. Figure 9 presents the smoothed data of the top projection profile in Figure 8(a) by the LOESS algorithm. The smoothed curve follows the same shape as the original projection data but omits small fluctuations, which permits more relevant puckering feature extraction.
The smoothed top projection profile in Figure 8(a).
A data whitening algorithm was then applied to normalize the smoothed data. If Si represents the ith smoothed data, the corresponding whitened value, Wi, can be simply calculated by
The whitened projection profile. (Color online only.)

The red dash-dot line in Figure 10 represents the zero standard line, above which the projective lines are brighter than the average of all the projection lines. Let A denote the mean of all the whitened data above the zero line. A can be served as the background for determining dark projection lines corresponding to shadows of puckering. An inversed projection curve can be created by
The inversed whitened projection profile. (Color online only.)

Based on these thresholds, five puckering features, Pj (j = 1,…, 5), can be extracted from the profile
In order to show the relationship between the threshold values and the puckering features, different threshold values of T1 from 0.36 to 0.44 with an interval of 0.01 were selected to compute the puckering feature, P1, for two seam-puckering samples: grades 1 and 2. The results are shown in Figure 12. From the figure, it can be seen that P1 decreases with the increase of T1, and P1 of grade 1 is much larger than that of grade 2 at all given T1. Thus, any value in the range of [0.36, 0.44] can be used as T1. The values of the other thresholds T2,…, T5 can be determined in the same way.
The relationship between the threshold value T1 and puckering feature P1.
Seam-puckering classification
In this application, we chose a multilayer backward-propagation (BP) artificial neural network (ANN) because such an ANN has been proven to be robust and flexible in data classification19,20 and has been widely used for textile evaluations.21–23 A BP network normally contains three connected layers, input, hidden and output, and can transmit the errors occurring in the output layer to the hidden layer to adjust the weighted coefficients. 24
The five parameters extracted from the seam sample were combined into an integrated feature using the following equation
The numbers of neurons in the input layer and the output layer are often set to be the number of input parameters and output classes. In this case, we had five puckering features as input and five puckering grades as output. A proper number of neurons in the hidden layer could be determined experientially. Choose the number of hidden neurons in a range from 3 to 11, train the network to achieve the same classification results and record the epoch times in the training process. Figure 13 shows the mean epoch times of BP networks with different numbers of hidden neurons. It is clear that the epoch times stopped the descending after the number of neurons reached 7. Therefore, we determined to use a 5-7-5 BP network to perform the seam-puckering grading.
Epoch times in training a backwards-propagation network with different numbers of hidden neurons.
To avoid the local optimum in the training of the BP network, a moment coefficient was added in the update step of the weight coefficient
24
Error convergence process of the neural network.

Results and discussion
Feature measurements and grades of seam-puckering samples a
Seam-puckering samples were the ISO 7770 standard samples. Ga is the automatic grade by the back-propagation network. Go is the average visual grade of 10 observers. Gs is the standard grade. So is the standard deviation of grade values rated by 10 observers.
Samples 16 and 17 were the two images from the second sample (Gs = 2) in the ISO 7770 standard, which were automatically rated as grade 1 (Ga = 1). This was because along this standard sample, puckering waves varied to a certain extent, and these two images were more severely puckered areas than the other three, as shown in Figure 15. Figure 15 shows five images of the second standard sample (Gs = 2) and one image (image 24) of the first standard sample (Gs = 1). By comparing images 16 and 17 with image 24, it can be seen that the puckering in images 16 and 17 appeared to be at a similar level to that in image 24. This was also true in their five feature measurements as well. Therefore, grading these two images as 1 (Ga = 1) was acceptable. Since an image only covers a small portion (78.2 mm long) of a seam sample, the final grade should be calculated from multiple readings at different locations to include the variability of seam puckering within the sample. Even if the ratings of these two images were considered to be incorrect, the automatic evaluation method still achieved an accuracy of 92%.
Error analyses of fabric seam samples; images 16–20 are the images from the second standard sample, and image 24 is an image from the first standard sample.
These 25 images of the standard samples were also rated by the 10 observers, and their visual grades (Go) are listed in Table 1. The average grades of the 10 observers were different from the standard grades. The seam-puckering grades of 16 images were wrongly assessed even after the data of the 10 observers were averaged. Thus, the automated evaluation results based on quantitative characteristic features were more objective and reliable than the vision evaluation.
Conclusion
This paper introduced a 2D image analysis system for automated seam-puckering evaluation. We analyzed the errors of the manual evaluations on seam-puckering images of various widths and lengths to determine the optimal image dimensions for the analysis, and used the edge-detection and Hough transform techniques to locate the seamline. The image was then cropped into the selected dimensions, and light intensities at both ends of the seamline were employed to reduce the unevenness of luminance. The projection profiles were calculated and smoothed with the LOESS algorithm. Five characteristic features of seam puckering were measured using different thresholds on the whitened profile, and a 5-7-5 BP neural network was created to realize the automatic classification of fabric seam-puckering grade. The experimental results demonstrated that the proposed system can achieve the automatic seam-puckering evaluation consistent with the ISO 7770:2009 standard, and has the potential to replace the current manual evaluation.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was partially supported by Jiangsu Overseas Research & Training Program for University Prominent Young & Middle-aged Teachers and Presidents.
