The Algorithms of Image Processing and Analysis in the Textile Fabrics Abrasion Assessment

The abrasion resistance and susceptibility of textiles to surface damage is an important issue for their utility properties. The currently used test method for abrasion resistance assessment has been based on criteria that define the breakage point of fabrics, visually identified and highly depended on observer perception. Taking under consideration the character of abrasion assessment process the efforts were made to elaborate the new alternative test technique which supports this evaluation. The abrasion resistance tests using instrumental method (based on image analysis tools) parallel with standard method were carried out. There were two steps of analysis. Firstly, the preliminary analysis for selecting the most effective and sensitive algorithm was carried out. Secondly, the final analysis, involving whole range of captured image samples, using chosen algorithm, based on image histogram calculation was done. Summarizing the abrasion resistance tests results obtained using both standard and instrumental methods it was found that the instrumental method gave more complex results during identification of surface changes caused directly by the abrasion process. The instrumental method is more sensitive to surface texture modifications and colour fade and its discrimination threshold is significantly lower than standard methods with qualitative breakage criteria (such as broken threads, loss of pile).


Introduction
The abrasion resistance and susceptibility of textiles to surface damage is an important issue for their utility properties and is widely discussed in the subject literature. The abrasion resistance parameters are crucial in durability evaluation, especially when the new kind of treatment of textile product surface is created. For example, the incorporation of iron ores as component in polymers coating had helped to improve some important properties of textile surfaces, such as antibacterial activity, protection against UV or flame retardant [1]. Similarly, Mojsov et al. investigated [2] the new type of enzymatic treatment dedicated for textiles made of cotton fibres. One of the aspects considered in publications was the assessment of abrasion resistance of finished textiles, measured using loss of the sample mass method. Moreover, Yu et al. [3] thought, that the abrasion resistance was an important factor in the design process of a new kind of prints dedicated to water resistant sportswear. The proper abrasion resistance was also highly important for textile products when electronics elements have been incorporated (smart textiles), as was investigated in research work [4]. These elements could have different functions, for example, transmitting an ECG signal in medical applications or collecting energy for smart textile accessories which use fibres with piezoelectric properties, as was described in research works [5][6][7][8] The fibres-based construction of photovoltaic units, dedicated to electric power harvesting, not only for smart textile garments purposes, but as a renewable power source, was investigated by Zhang et al. [9]. The authors evaluated the different weaves' influence on the ability of photovoltaic fabric to harvest electric energy. Recently, deep learning techniques for fabric evaluation were used. The main advantage of these image analysis tools is to carry out analysis based on numerical indications found by neural networks themselves. This technique was highly efficient in fabric defect detection, with accuracy above 94 percent as presented in research work [10]. In other publications, defects, especially regarding colour disturbances were investigated by Jing et al. [11]. The convolutional neural network (CNN) was involved in this evaluation. In all the above mentioned publications, researchers evaluated newly developed surface modifications or commercial products, among others, using an abrasion resistance parameter, which influences the utility properties of textiles, mainly their mechanical durability, but aesthetic properties as well. The commonly used test methods for abrasion resistance assessment have been based on a few criteria, which define the breakage point of fabrics. The breakage criteria, described in below mentioned standards have been as follows: loss of fabric mass [12], achieving a specified breakage point (certain number of broken threads in fabric, loss of fabric pile either fully or partially, occurrence of holes) [13], or colour change of sample [14]. The above mentioned methods [12,13] are based on the subjective, visual identification of breakage existence assessment. In the case of the subjective type of abrasion resistance evaluation, in many cases the unwanted wide range of obtained results (low precision) has been observed. Taking into consideration the character of the abrasion assessment process, efforts were made to elaborate the new alternative test technique which supports this evaluation. Manich et al investigated [15] the numerical model for the relationship between the loss of woollen fabrics mass and Martindale abrasion test duration. The exponential function proposed by the authors should be convex, concave or similar to a straight line. It was found that the most characteristic point in the woollen woven fabric abrasion process was the loss of fabric mass obtained after 500 rubs of the Martindale device. Moreover, researchers investigated the numerical model, on which basis the abrasion resistance could be calculated, as an alternative indicator estimating the abrasion properties of woollen woven fabrics. This indication was dependent on woven fabric properties, such as mass per unit area, warp and weft density and the linear mass of threads in fabric. They found that the newly investigated indicator could be useful as a criterion for woollen woven fabric abrasion assessment or was a basis for abrasion resistance prediction for the mentioned type of textiles.

Related Works
The abrasion resistance was evaluated using image analysis tools as well. The one publication from this region of interest is research work from the University of Bursa [16], which described a new method for abrasion resistance assessment of chenille yarn. The authors compared the test results obtained in a group of eight woven fabrics containing chenille yarn in their structure. The samples differed by their composition of the raw material of chenille yarn and its production process. Furthermore, the researchers elaborated the method for the determination of yarn abrasion resistance. As the main criterion in this assessment, the values of the indicator, based on differences between the yarn seen before and after the abrasion process, were established. The next step was a statistical analysis of results acquired from both methods for different test objects-yarns and woven fabrics. The analysis showed the existence of a linear correlation between the abrasion resistance of woven fabrics and the yarns these fabrics were made of. In research work done by Leucker et al. [17], the method of pilling and abrasion resistance dedicated to low mass polypropylene non-wovens was investigated. The method was based on image processing and analysis techniques; images of samples were subjected to thresholding. The threshold value was set experimentally, based on the loss of non-woven fabric mass during the abrasion test. The breakage criteria for the abrasion resistance test-the occurrence of the longitudinal entanglement of fibres on the fabric surface was not subjected to the instrumental method by the researchers because of difficulties in the precise recognition of this type of objects. The method of abrasion resistance presented by Naderpour et al. [18] was based on changes in the brightness profile of sample images grabbed before and after the abrasion procedure. The subject of the investigation was a woven fabric with anti-wrinkling treatment. After the sample images were captured, the comparative assessment of their brightness profiles was undertaken. The researchers found that image profiles grabbed after the abrasion process were smoother, their lines were more aligned in comparison with profiles before abrasion. The brightness level alteration was primarily caused by colour changes of samples (loss of their colour fastness). The above presented test method, based on the brightness profiles of woven fabric samples, was also used in surface roughness analysis [19,20]. In these publications, the influence of yarn properties on the final woven fabric surface roughness was investigated. Additionally, the influence of the structural parameters of woven fabric was analyzed. The surface roughness of woven fabric was defined as an absolute deviation of the height, measured for fibres protruding from the woven fabric's surface. Because of the fact that abrasion resistance has been a crucial factor during the assessment of newly developed textile structures, it was important to look for alternative, more objective measurement techniques in this field. Simultaneously, test methods for abrasion resistance based on image analysis techniques-presented in the subject literature-have been related to the narrow range of textiles, as well as the algorithms used in these methods. Consequently, a comparative analysis of the chosen algorithms was done, taking into account their capability and sensitivity to surface changes, which occurs during the abrasion process.

Materials and Methods
In order to specify the optimal image analysis algorithms for abrasion resistance assessment, the six fabrics-dedicated for different purposes and characterized by dissimilar structures-were investigated. The subjects of the tests were three woven fabrics dedicated for garments, two technical woven textiles and one upholstery textile product. The details of each fabric subjected to tests are presented in Table 1. Parallel with standard method assessments, the abrasion resistance of fabrics using an instrumental method was investigated. The images of certain samples, after each number of rubs, were captured in order to carry out dual evaluation of samples. The processing and analysis of grabbed images was carried out. Figure 1 presents the scheme of the acquisition stand, Figures 2 and 3 show the set of stages and processes that were necessary for the whole experiment and instrumental method as well. There were two steps of the sample image analysis. Firstly, the preliminary analysis for selecting effective algorithms was carried out. Secondly, the final analysis, involving whole range of captured image samples, using a chosen algorithm, was done. The images of abraded samples (mounted on a Martindale device sample holder) were taken using the stand, presented in Figure 1. The stand consisted of a flat surface table with a fixed arm (1), dedicated for precise image acquisition, digital camera Canon EOS Mark II with prime 50 mm lens (2) and the Crimi-Lite 80L (3) lamp, which is a linear, 100 klux intensity light source (3a). The stand is located in room light conditions, because of the high intensity of the lamp, the machine vision scenes are almost steady. The images of abraded samples were captured in steady-state light conditions. During the preliminary analysis, image processing and analysis techniques were involved, for example, cutting of edges for processing images, conversion from RGB colour space to CIELAB, resulting tree particular channels-L-general brightness level, *a-brightness level for green and red components of colour, *b-brightness level for blue and yellow ones. The CIELAB standard is based on the perception model of the human eye, because it seems to be closest to the visual sensations of observer. The following algorithms, described in publication [21] and known as potentially sensitive, were chosen for the investigation: based on image histogram calculation (skewness, kurtosis) and global transformation (FHT-2D Fast Hartley Transform, Gabor and wavelet transforms) . Both preliminary and final image processing analysis were carried out using Image 1.52 (Fiji) software, equipped with essential plugins, which enabled the use of the following image analysis algorithms: the calculation of Fourier-related transform (algorithm 2D Fast Hartley Transform (FHT), represented as 32-bit float FHT attached to the 8-bit image that displays the power spectrum; high and low-pass filtering using wavelet transform (with the Haar wavelet, Mexican-hat wavelet and B-spline function as a scaling functions, by decomposition level 2); transformations based on Gabor filtering; and calculations of parameters based on a brightness level histogram in a CIELab colour space (mean brightness, median, skewness, kurtosis). Firstly, the algorithms were chosen taking into consideration previous research experience in this field (sensitivity to surface changes caused by the abrasion process) and the knowledge that the algorithms work. Secondly, the efficiency of each tested algorithm was evaluated. The subjects of preliminary analysis were the selected image samples coming from the first stage of the abrasion process, the middle stage and the end of the process. The comparison of the obtained results for the above mentioned three images of the same sample could be specified if the algorithm used in the test was sensitive enough to surface changes connected with the abrasion process, not only caused by breakage criteria but by other phenomena such as fuzzing, matting or pilling. This type of evaluation did not provide the complex information about the algorithm's sensitivity to certain surface changes; it is more like the screening test but allows us to select algorithms that are probably the most effective in this area.

Test Materials
In order to specify the optimal image analysis algorithms for abrasion resistance assessment, the six fabrics, dedicated for different purposes and characterized by dissimilar structures, were investigated. The subjects of the tests were three woven fabrics dedicated for garments, two technical woven textiles and one upholstery textile product. The details of each fabric subjected to tests are presented in Table 1. The raw material composition, presented in percentages, refers to the outer layer of the multi-layer fabric (for Fabrics 1 and 3). The mean values of mass per unit area (M) are given.

Experiment
The tests were carried out according to following stages: Presented above, the instrumental method for abrasion resistance assessment is based on simple image analysis algorithms. The source for the calculations of image features is an image histogram, which is easy to achieve, low-time consuming and an effective source of many texture indicators. In preliminary tests, more complex algorithms were applied for image feature extraction but none of them presents sensitivity to texture changes on an abraded fabric surface. More elaborate techniques and algorithms could be tested or designed for this specific purpose but the main goal of this research is to find the easiest and fastest techniques for the identification of abraded fabrics' texture. In the future, this tiny but efficient algorithm could be easily implemented as a part of a Martindale device, to help its operator to carry out an abrasion test.

Results
The results of abrasion resistance test are shown in Table 2. During the abrasion, the following phenomena took place, which were not covered by criteria described in EN ISO 12947-2:2016: • Fabric 1 showed gradual damage of pile and progressive colour fade (grade 4 after initial 3000 rubs-assessment according to standard requirements for upholstery fabrics), which caused the loss of aesthetic properties without reaching the breakage criteria described in the standard, • Fabric 2 showed intense damage of singular filaments in threads after just 6000 rubs, which caused the occurrence of a dense pile-like structure on the fabric surface made of damaged filaments. This structure significantly decreased the aesthetic properties of the fabric and additionally, its colour changed. According to the standard, the breakage criteria were not reached up to more than 50,000 rubs.
In the case of Fabric 3, evaluated according to EN ISO 5470-2:2003, a slight change in the colour vividness of the coat surface was found. Assessment regarding the damage degree of particular layers of the coated fabric did not take place in this case. The tested fabrics showed varying abrasion resistance (from 10,000 to more than 50,000 rubs). The higher values of mass loss during the abrasion process (excluding Fabric 3) are recorded . The presented relation is the most significant for woven fabric made of cotton (Fabrics 4 to 6) and for Fabric 2 as well. The lowest value of mass loss was shown in Fabric 3, which was connected with its structure and the presence of a coating layer on the fabric's surface. The sample evaluation results, obtained using image analysis tools, are presented in Table 3. The algorithms: FHT transform and wavelet transform were not sensitive to surface changes on the sample surface as a result of the abrasion process. The next two algorithms groups gave results marking as follows: • ++ algorithm was sensitive to surface changes occurring on the sample during the abrasion process; • + algorithm was potentially sensitive to surface changes existing on the sample surface during the abrasion process, but not for each fabric (which generally decreases its effectiveness) Table 3. Image analysis results-preliminary tests. The preliminary test results, presented in Table 3, show the best efficiency of surface change identification for algorithms based on brightness level histogram features (e.g., median, third and fourth moments of brightness function, skewness and kurtosis). For the final analysis, among histogram-based parameters, the skewness was chosen as the most sensitive numerical parameter used in the assessment of surface changes caused by the abrasion process. The skewness values were determined for two channels (*a and *b) of CIELAB colour space images. The images, captured for each stage of standard assessment, were processed from RGB to CIELAB colour space. Next, the trend in skewness changes was analysed by comparing of their values to visible alterations of a sample's surface identified by the observer. Figures 4-9 presented skewness changes, for both CIELAB channels, in the duration of the abrasion process, in rubs.  Figure 4 shows the skewness values measured for Fabric 1; it was found that:

Fabric No Gabor Transform Histogram Parameters
• Skewness values for image channel *a of Fabric 1 were positive, which means a left skewed brightness level curve and a higher contribution of green component in the sample's colour. However, the skewness for *b channel fluctuated, which should be connected with surface changes. The *b skewness values altered after each rub, which corresponded to the brush of pile fibres and their colour changes caused by the abrasion process. The skewness underwent a cyclic alteration during the abrasion process; very low values were observed, for example, for channel *b, after 8000 and 25,000 rubs. It was found that some part of the pile fibres was gone (loss of fibre mass) and the pile surface faded. Consequently, at the end of the test, skewness is negative and the sample's surface was becoming redder. It is connected to the significant colour change of Fabric 1 (fade caused by the abrasion process) and the clearly visible loss of pile fibres. • Skewness cycle changes reflected Fabric 1 surface structure. The pile was extremely fragile to any abrasion-like movement, causing alteration in the position angle of singe pile fibres (pile brush) and a loss of colour.
The visible adaptation of skewness values to surface changes meant a low discrimination threshold (high sensitivity) of this parameter in the abrasion resistance evaluation. The skewness values were modified in the early stages of the abrasion process, especially for *b channel, as opposed to the standard method of abrasion evaluation (showing a lack of visible changes). Fabric 1 is the only sample of pile textile tested in this work, so its characteristics and behaviour during the abrasion process could not be compared to any other sample.  Figure 5 presents skewness values obtained during the abrasion resistance test for Fabric 2. It was found that the skewness values went up and down together with the change of sign. Because Fabric 2 did not reach breakage criteria before the end of the test, it was not possible to follow skewness values' modification for more than 50,000 rubs. This test duration is long enough to identify Fabric 2's ability to be assessed by image analysis-based abrasion assessment, not consuming so much time and effort in the laboratory (when a precise level of abrasion resistance was not a main goal of the presented work). However, the skewness varied from positive to negative values in a cyclic pattern. It could be caused by significant variations in Fabric 2's surface during the abrasion process. Fabric 2 was made of a high resistance multifilament yarn and was extremely resistant to abrasion (meant as a standard definition of breakage criteria-two threads completely broken). Nevertheless, during the abrasion process, fuzzing occurred on fabric surface caused by single filaments' rupture. The fibres' ends, protruding from the surface, modified their visual appearance in an unacceptable way, without mechanical weakening of the fabric's structure. The standard methods for abrasion resistance assessment did not cover identification of this type of surface changes. Using the instrumental method, surface variation caused by the existence and then intensity of protruding fibres was easily recognized by skewness values (in both CIELAB channels). The protruding fibres made the fabric surface brighter, more pixels are indexed in higher values, which significantly varied the shape of brightness level density function. Therefore, the instrumental method of abrasion resistance assessment provided more precise, complex results for Fabric 2 in comparison with standard methods. The assessment of surface changes on Fabric 3's surface was realized until the number of rubs described in the standard [22] was reached. At the end of the test (51,200 rubs reached), the fabric surface did not vary significantly, only grade 1 (meaning a slight change in colour vividness) was obtained. The test, carried out using the instrumental method, enabled the identification of colour alterations and slight surface changes just at the beginning of the test. The skewness values, presented in Figure 6, went down or up (according to channel) after the first interval (1600 rubs), then fluctuated during the whole test. The skewness variations observed were generally connected with the slow, but sure, fading of samples and the loss of their initially shiny surfaces during the abrasion process. The lower the skewness measured for the channel *a histogram and the higher the skewness measured for channel *b, the less green and more yellow the colour of Fabric 3's surface became. In laboratory practice, the variation in the vividness of colour on the coated fabric's surface was evaluated subjectively. Implementation of the instrumental method provided the opportunity to more precisely identify surface changes (colour, shine) of the coated fabric. The next fabrics subjected to abrasion resistance analysis were cotton woven fabrics-Fabrics 4 to 6. The mentioned fabrics were divided by weaving pattern and technological parameters such a warp and weft density and mass per unit area. Fabrics 4 to 6 represented different abrasion resistance values, tested according to the standard [11], from 10,000 up to 25,000 rubs. The pilling phenomena occurred during the tests. Generally it was found that Fabrics 4 and 5 (plain and broken twill weaves had a prevalence of negative skewness values (Figures 7 and 9), which meant that the sample colour was getting redder (channel *a) and more yellow (channel *b). Despite not being dyed, the samples' surfaces showed some traces of colour, even if not visible to the human eye. For Fabric 4, the negative skewness values were obtained (Figure 7) for both image channels. Similar to previous graphs, skewness fluctuated, regarding changes on fabric surface such as the occurrence of loose, protruding fibres and pills of different shapes and sizes. At the end of the abrasion process (two threads broken at 10,000 rubs), the skewness for channel *b reached positive values, the brightness level histogram moved to a more blue colour. The intense pilling occurred after 4000 rubs, which was a pivotal point in the process of the final damage of Fabric 4 (two separate threads were broken). The threads were getting thin, more single fibres were broken and pills had grown, destroying the surface structure. In the case of Fabric 5 (Figure 8), skewness showed negative values for channel *a of the CIELAB image, which meant a shift of the brightness level histogram towards red. The skewness calculated for the second channel-*b went up and down during the whole test, which was dependent on the pilling stages (from loose protruding fibres to formed pills), observed on Fabric 7's surface. The above mentioned skewness changes were not only seen in value but in the signs too. The longer the abrasion resistance test lasted, the more diverse the skewness values, especially for channel *b, until the end of the process. The skewness values calculated for Fabric 6 related to test duration (presented in number of rubs) are shown in Figure 9. The cotton satin woven fabric gave an oscillated skewness, but for channel *b only. In the case of *a channel skewness, the values were consistently negative as a result of moving the brightness level to red. Similar to previously analyzed Fabric 5, the skewness values for channel *b fluctuated from negative to positive during the whole abrasion process. This is similar to other fabrics and is caused by pill formation. The peak value for channel *b was reached after 6000 rubs, together with pilling intensity achieving its maximum. Summarized above, the presented analysis of skewness behaviour for Fabrics 5 and 6 shows that the fluctuation was mostly correlated with not only pill formation, but also with other phenomena inside the fabric structure-changes in thread location (inter-yarn spaces were relocated and enlarged) and threads thinning. It meant that the instrumental method used in this work was more sensitive, with a lower discrimination threshold in comparison to standard methods for abrasion resistance assessment. It was connected with breakage criteria defined in the standards [13,22] as well as the visual perception ability of laboratory staff carrying out test.

Discussion
As a result of the evaluation of image analysis algorithms in scope of their potential sensitivity to surface alterations during the abrasion process it was found that: • Among all algorithms investigated within this work, the best outcomes gave calculations based on the brightness level histogram. The skewness, measured for CIELAB channels *a and *b showed sensitivity to surface alterations, such as protruding fibres, pills, relocated and thinning threads, missing places in the fabric as a result of broken thread and colour changes; • In most cases, when skewness changed significantly, especially its sign, the surface texture was altered, e.g., pilling occurred, threads were relocated and became thinner or damaged; • Effects of image global transformation-FHT transform, wavelet transform-did not allow for evaluating surface modifications caused by the abrasion process; • Implementation of Gabor filtering, despite its similarity to human eye perception, did not give a sharper image of the abraded samples, with better visible signs of abrasion-caused damaged. However, beyond the visual effect, further attempts to express surface changes numerically did not give positive results. Gabor filtering was effective in pile fabric surface evaluation only, because of typical surface changes for this structure (smoothing, abrading of pile, colour fading).

Conclusions
To summarize, the abrasion resistance test results obtained using both standard and instrumental methods found that the instrumental method gave more complex results during the identification of surface changes caused directly by the abrasion process. The instrumental method is more sensitive to surface texture modifications and colour fade, and its discrimination threshold is significantly lower than that of standard methods with qualitative breakage criteria (such as broken threads or loss of pile). Despite the simplicity of the analytic technique involved in this work, other image analysis techniques, especially deep learning, should be investigated in future work.