Abstract
Based on computer vision technology, we studied predictive method of tie-dye pattern information. We extracted the average value of HSV (hue, saturation, value) tri-component of valid tie-dye area, proportion of tie-dye white area and coarseness as pattern feature, and designed correlation analysis on tie-dye production process and pattern feature accordingly. The results showed that dye concentration and pattern feature are highly correlated and the speed is also an important indicator of the effect of tiedye pattern. In view of tie-dye production speed, concentration process parameters and pattern feature linear regression analysis, the findings are as follows: there is a positive correlation between process parameters and H, S component mean; process parameters negatively correlate with V component mean and proportion of tie-dye white area and coarseness; R-Squared values of prediction model are greater than 0.5. The linear regression models can be used to predict tie-dye image pattern effects.
1. Introduction
The pattern of tie-die is a crucial factor for evaluating the effect of tie-die technique [1]. If the mapping between production technique and pattern is established, then prediction of the effect of the pattern can be made on the basis of used technique. This will significantly shorten production cycle and reduce screening cost. This paper focuses on the visual features of digital image processing by examining extracted pattern characteristics of printed color and textures. A mathematical model is established to estimate the pattern effect by regressional analysis of tie-dye technique and pattern characteristics.
Subjective human evaluation is based on examining color and texture of the tie-dye pattern. Color is an important visual feature of the image. So the method of using color to identify image has been widely applied. The extraction of color information should use appropriate color space. There are a lot of applications of extracting characteristics from color space for relevant analysis within the field of facial recognition, remote sensing analysis and traffic management.
Lachkar [2] realized a system for textile design patterns retrieval by proposing an adaptive and efficient unsupervised color image segmentation method. Sheng [3] took (S+V)/H as the base value to characterize skin color, which could enhance the recognition capacity of HSV space for human skin. Guo [4] developed a fabric image retrieval system. He presented a method of color extraction and used HSV color space to handle color data which could be inputted into database. Amine [5] sumed up the Gaussian distribution in pure-color space YCrCb to classify the pixels. Wei Li [6] introduced the hue component of HSV color space to the cloud test system. Martel [7] raised the method to cut shadows of moving vehicle on the edge of HSV color space. Cucchiara [8] firstly adopted the middle-value filtering to obtain the background model and then utilized the similarity of hue and saturation as well as the difference of lightness between shadows of moving vehicles and the background pixels within HSV color space to identify and separate the shadow of moving vehicle. Hong-yin Yang [9] proposed an image indexing method on the basis of HSV space color edge histogram.
Compared with the models of RGB and YCrCb, HSV color space is better in color description. HSV color space has two important features: V component is not related to color information; H and S components closely imitate colour observation by human naked eyes. These features make the HSV color space suitable for digital image processing. So we chose to analyze tie-dye image within HSV color space.
Texture is a key component of human visual perception. It describes the homogeneity of image surface and the spatial distribution of different elements without color and brightness information dependency. There are many texture feature extraction methods, including waveletbased texture feature, Tamura feature, feature Gray-Level Co-occurrence Matrix and so on [10]. Kuo [11] proposed an approach for texture analysis to recognize the fabric nature and type of the main weaving texture by learning vector quantization networks. First, the color 2D scanner captures the fabric image and then the wavelet transformation is used to display image texture. The co-occurrence matrix is then applied to calculate the texture characteristics. Alper Selver [12] proposed a texture analysis method to realize the inspection of fabric defects which uses sum and difference histograms conjointly with co-occurrence matrices.
In this paper we focused on coarseness [13], one of the textural properties mostly used in literature for differentiation between fine and coarse textures. In fact, the concept of texture is usually associated with the presence of fineness. A fine texture can be considered as small texture primitives with big gray tone differences between neighbor primitives. On the contrary, if texture primitives are bigger and formed by several pixels, it is a coarse texture.
Based on digital image processing technology, this paper extracted the average value of HSV (hue, saturation, value) tri-component of the valid tie-dye area, the proportion of tie-dye white area and coarseness as pattern feature. A set of correlation analysis was designed to validate the strong relationship between the tie-dye technique and the characteristic quantity of color and texture. Then a mathematical model was built up to forecast pattern feature with the tie-dye technique (the tie-dye concentration, rotation speed).
2. Experiment Theory and Method
2.1. Theory of Pattern Analysis
The color halo of tie-dye products, formed by the different color depths, and the whitespace (incompletely dyed area), as a result of dye-resistant theory, are important artistic characteristics. To a certain extent, these beautiful halos and vivid white spaces are affected by the penetration of dye liquor. When there is excessive penetration, levels of color halo are decreased and whitespace effects are compromised, result in blurred color effect; however when there is limited penetration, color saturation is insufficient, and whitespace effect is excessive, so the color effect may be confused, both of which cannot reach a satisfactory artistic effect. Appropriate color penetration is the combined result of proper concentration and rotation speed.
Generally, the higher the concentration of dye liquor, the faster the rotation speed (the rotation speed of fabric in the dye liquor) and the stronger the dyeing effect. Lower concentration of dye liquor equates to slower rotation speed and weaker the dyeing effect. In order to study the relationship between tie-dye pattern color, texture characteristics and concentration of dyeing liquor and rotation speed, this paper selects a stable, typical stick-like bundling technique among the multiple dyeing techniques to design the dyeing test under the different concentrations and rotation speeds of the same tie-dye method, collects the image and analyzes the relationship between its color, texture characteristics, and dye liquor concentration and rotation speed.
2.2. Experiment
The experiment was conducted in constant temperature and humidity. Dyeing process contains tying, soaking, dyeing, acid pickling, soaping, stain washing, soft finishing and drying. We selected 32s 140-gram cotton knitted fabric and cut into size with 60 cm∗40 cm. These fabrics were then pinched and tied tightly with space about 1 cm apart. Then the targets were soaked for 120 minutes and separately put into 5 different dyeing vats (please refer to Table 1 for formula) with the condition of 100% regain. In Table 1, KN-B (reactive black) and B-2BF (reactive red) are code of reactive dyes. Three tests were done with different rotation speeds, i.e. 5 circles/minute, 15 circles/minute and 30 circles/minute. After dyeing, the fabrics were washed and dried. They were scanned with high-definition scanner under natural light. The images were collected in sizes of 27 cm∗42 cm and stored with RGB mode.
Table 1.
Formula table.
3. Feature Extraction
After the experiment, the computer based color information processing of tie-dye image was divided in two steps: basic image processing and extraction of pattern feature.
3.1. Image Processing
The basic image processing included image capturing, smooth filtering and image segmentation.
3.1.1. Tie-dye Image Capturing
Tie-dye images were captured with computer visual sense system composed of computer and scanner. To restore maximal characteristics of original image, we conducted professional color calibration to computer and scanner and selected the middle part of sample as scan area with image definition being 300 dpi. The images were saved in TIFF format with lower distortion rate. Please refer to Figure 1.
Figure 1.
Experimental sample collection.
The scanned images were saved in RGB color model which produced 24-digit color space through the sensitivity quantity of sensitive components of R, G and B at each pixel. The conversion formula from the RGB model to HSV model is as follows:
where RGB color matrix has been normalized within [0, 1] with linear function, the max is the max value among R, G and B and the min is the min value among R, G and B. The scope of H value after conversion ranges from 0 to 360, and S value and V value are in the range [0, 1]. For the subsequent treatment, H is normalized to the range of [0, 1] with linear function.
3.1.2. Noise Reduction
Due to various noise interferences occurred during data collection, filtering process is necessary for effect precision.
Median filter is a nonlinear digital filtering technique often used to remove noise. It has the advantages of easy calculation and high feasibility. The median filter has a sliding window with odd points. In each of the matrix of HSV color model, the median of every elemental value replaces the gray value of the central point. If the number of elements is odd, the value in the middle is the median. If the number of elements is even, the average value of two values in the middle is the median. This paper adopts 3 ∗ 3 median filter to eliminate the noise so that the filtered images become smoother.
Figure 2.
Filtering effect diagram of two examples.
3.1.3. Image Segmentation
The step is to divide the image into two mutually exclusive areas. The tie-dye image is composed of dyeing area and white area. They must be separated for later processing. This Paper adopts the Otsu method which is not impacted by the image value and contrast. As a result, it is widely applied in the digital image processing.
Firstly, the grey scale image of the color image was calculated. The histogram of gray scale image was analyzed. It is then classified into background and foreground parts. The higher value the between-class variance of two areas, the less difference two areas have. As a result, the maximum separation of between-class variance means the minimum misclassification probability. The classification point is the desired segmentation threshold.
Assuming the grey scale of grayscale image is L, the grey scale range is [0, L−1]. The calculation of the best segmentation threshold with OTSU method depends greatly on the calculation of the following extreme value.
maxt{w0(t) × [u0(t) − u]2 + w1(t) × [u1(t) − u]2}
Among the variables above, when the separated threshold is t, w0 is the background proportion, u0 is the background average value, w1 is the foreground proportion, u1 is the foreground average value, and u is the average value of the whole image. When t, makes the expression formula above maximum it is then the best threshold value of image separation.
Figure 3.
Segmentation image of two examples.
3.2. Coarseness
Tamura features have six dimensions including coarseness [13], contrast, directionality, linelikeness, regularity and roughness, to take into account during human perception of texture. Coarseness is designed to measure differences between coarse and fine textures. It provides us with the information about the size of texture elements. Fine textures have smaller sizes than the coarse ones. We can measure coarseness of the image by applying the following steps.
Step 1: Take the average at every pixel over neighborhoods whose sizes are the power of 2. The average over the neighborhood of size 2k× 2k(k=0, 1, 2, 3, 4, 5) at every pixel is:
where g(i, j) is the gray-level at (i, j).
Step 2: For each pixel, calculate the differences between the non-overlapping neighborhoods on horizontal and vertical directions:
Step 3: For each pixel, select the best size which gives the highest output value:
where k maximizes E in either direction:
Sbest(x, y) = 2k+ 1
Ek(x, y) = max(Ek,h(x, y), Ek,V (x, y))
Step 4: Take the average of Sbest over the picture to be the coarseness measure Fcrs:
where m and n are the effective size of the image.
3.3. Features of the Image
Features are composed of coarseness and the average value of HSV tri-component of the valid tie-dye area and the proportion of tie-dye white area. Calculation formula of HSV average value is as follows:
where W is the pixel coordinate of black area in segmentation image, and N is the pixel number of that area.
Assuming all pixels in image are M and all image pixels in dyeing area are F, the proportion of non-dyeing area is as follows:
R = (M − F)/M
After filtering and segmentation, features are shown in Table 2.
Table 2.
Test parameters and test data of the image feature.
4. Data Analysis and Discussion
4.1. Correlation Analysis
According to correlational analysis for data in Table 2, the dye liquor concentration is strongly relevant for all indexes, and the influence is obvious. It positively correlates with Hm and negatively correlates with other indexes. Rotation speed has a weak positive correlation for Hm, a median correlation for Sm, and negative correlation for Vm and R. However, the value of significance level is more than 0.05, which means that rotation speed has no obvious impacts for all indexes. The results correspond with actual production. The main factor that affects the tie-dye effects is concentration. From the experimental sample collection as shown in Figure 1, when the liquor concentration is fixed, the influence of rotation speed on the color is obvious. The faster the rotation speed is, the deeper the color is. Therefore, rotation speed must be considered in forecasting the characteristics of color and texture.
The actual image texture of visual perception is stably consistent with calculated coarseness. As the concentration increases, incompletely dyed area decreases and stripes increase. Image is considered to have fine texture as its coarseness was significantly smaller than when in low concentration.
Table 3.
The correlation between pattern features and experimental factors.
4.2. Regression Analysis
Multiple regression analysis prediction method is a predicting mathematical models according to correlation analysis between independent variables (including two variables or more) and dependent variables. When the independent variables and dependent variables are in linear relationship, this kind of analysis is called multiple linear regression analysis. In our tie-dye experiment, the rotation speed and dye liquor concentration were set as independent variables. The average value of HSV tri-component of the valid tie-dye area and the proportion of tie-dye white area and coarseness are set as dependent variables, 4 regression models are built according to above independent variables and dependent variables. The linear regression analysis results are shown in Table 4 and Table 5.
Table 4.
Multiple correlation coefficient of regression models and prediction residual table.
Table 5.
Regression coefficients and significance.
R-Squared values of multiple correlation coefficients in regression models are all greater than 0.5, which is in a higher fitting degree. The corresponding P value is smaller than significant at 0.05 level with residual error of predicted models being quite low. Therefore, it can be explained that the average value of HSV tri-component of the valid tie-dye area and the proportion of tie-dye white area obviously rely on rotation speed and dye liquor concentration. The rotation speed and liquor concentration are positively correlated with Hm and Sm, while negatively correlated with Vm and R. The index of concentration is twice the rotation speed for Hm, which demonstrates that the main factor determining the value of Hm is liquor concentration. The coefficients of liquor concentration for Sm, Vm, R and Fcrs are slightly higher than coefficients of rotation speed, which indicates the rotation speed affects the image pattern significantly.
4.3. Regression Forecast Verification
Two tests were done with speed of 10 circles/minute, concentration of 0.67% KN-B and 0.075% B-2BF and speed of 15 circles/minute, concentration of 4.05% KN-B and 0.45% B-2BF. Predictive value of five features are (0.544, 0.1256, 0.9055, 0.8395, 0.6915) and (0.5685, 0.309, 0.768, 0.5805, 0.4805); measured value of five features are (0.5453, 0.1267, 0.9035, 0.84, 0.6891) and (0.5672, 0.3082, 0.7723, 0.581, 0.4786). The predicted value and the measured value relative error is less than 1%, linear model established in this paper has good prediction ability.
5. Conclusions
15 sets of tie-dye experiments were done, setting concentration and rotation speed as two main experimental factors. Computer vision techniques were employed to collect and extract tie-dye image pattern features. The tie-dye digitalized images were processed by noise reduction and image segmentation, and we extracted the average value of HSV tri-component of the valid tiedye area, the proportion of tie-dye white area and coarseness as pattern features. According to the correlation analysis between features and technological parameters in tie-dye production, dye liquor concentration and pattern features are in strong correlations; the rotate speed has no obvious relevance to pattern features. However, the rotate speed is an important indicator to affect tie-dyed image patterns. According to linear regression analysis between two technological parameters (rotate speed and dye liquor concentration) and pattern features, rotate speed and dye liquor concentration have positive correlations with Hm and Sm, although have negative correlations with Vm, R and Fcrs. Fitting degrees of forecasting models are 0.93, 0.928, 0.872, 0.925, 0.519 respectively and the residual error is small. The linear regression models can be used by tie-dyed enterprises to predict tie-dye image pattern effects.
In this paper, dye liquor concentration and rotate speed in regression analysis are rank values. Our future work is to analyze with its actual values and we should extract more features for analysis.
References
- Gu, M. The general talk about technique of modern tie-dye. J. Donghua Univ. (Social Sciences) 2004, 3, 41–45. [Google Scholar]
- Lachkar, A.; Benslimane, R.; D’Orazio, L.; Martuscelli, E. A system for textile design patterns retrieval. Part I: Design patterns extraction by adaptive and efficient color image segmentation method. J. Text. Inst. 2006, 97(4), 301–312. [Google Scholar] [CrossRef] [Scilit]
- Sheng, K.K.; Liu, Y.; Lu, Y.X. Features of human skin in HSV color space and new recognition parameter. J. Optoelectron. 2007, 18(11), 391–1393. [Google Scholar]
- Guo, R.L.; Pan, B.; Chen, L.H. Fabric image retrieved system based on color data. Wool. Text. J. 2010, 38(8), 57–60. [Google Scholar]
- Amine, A.; Ghouzali, S.; Rziza, M. Face detection in still color images using skin color information. IEEE Tr. PAMI 2002, 24. [Google Scholar]
- Li, W.; Li, D.R. The cloud detection study of MODIS based on HSV color space. J. Image Graph. 2011, 16(9), 1691–1701. [Google Scholar] [CrossRef] [Scilit]
- Martel-Brisson, N.; Zacearin, A. Learning and removing cast shadows through a multi distribution approach. IEEE Trans. Pattern Anal. Mach. Intell. 2007, 29(7), 1133–1146. [Google Scholar] [CrossRef] [Scilit]
- Cucchiara, R.; Grana, C.; Piccardi, M.; et al. Detecting moving objects, ghosts, and shadows in video reams. IEEE Trans. Pattern Anal. Mach. Intell. 2003, 25(10), 1337–1342. [Google Scholar] [CrossRef] [Scilit]
- Yang, H.Y.; Wu, J.F.; Yu, Y.J.; Wang, X.Y. Content based image retrieval using color edge histogram in HSV color space. J. Image Graph. 2008, 13(10), 2035–2038. [Google Scholar]
- Liu, Y.; Zhang, D.; Lu, G.; Ma, W.Y. A survey of content-based image retrieval with high level semantics. Pattern Recognition 2008, 262–282. [Google Scholar]
- Kuo, C.F.; Tsai, C.C. Automatic Recognition of Fabric Nature by Using the Approach of Texture Analysis. Text. Res. J. 2006, 76(5), 375–382. [Google Scholar] [CrossRef] [Scilit]
- Alper Selver, M.; Avşar; Vural; Özdemir; Hakan. Textural fabric defect detection using statistical texture transformations and gradient search. J. Text. Inst. 2014, 105(9), 9981007. [Google Scholar] [CrossRef] [Scilit]
- Tamura, H.; Mori, S.; Yamawaki, T. Textural features corresponding to visual perception. IEEE Trans. On Systems, Man and Cyber 1978, 6(8), 460–473. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2014 Textile Bioengineering and Informatics Society. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).


