# Application of Spatial Neighborhood Fuzzy c-Means Algorithm in 3D Image Segmentation of National Clothing

Authors: Ri Hai
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

National costume contains rich patterns and patterns with national characteristics, which is an important part of the study of national costume culture. Neither the traditional protection of national costumes nor the early digital protection can clearly and effectively preserve the details of national costumes, which is not conducive to the development and research of national costume culture. The development of image processing technology provides new technical support for the protection and inheritance of national costumes. This paper proposes the application of spatial neighborhood fuzzy c-means algorithm in 3D image segmentation of national clothing. Based on the traditional fuzzy c-means algorithm, combined with spatial information and gray information, a 3D image segmentation model based on spatial neighborhood fuzzy c-means is constructed. The experimental results show that the 3D image segmentation model based on spatial neighborhood fuzzy c-means has faster convergence speed and better algorithm performance than the improved fuzzy c-means algorithm and has better image segmentation effect in different noise levels. In the 3D image segmentation of national costumes, more detailed information can be retained on the basis of maintaining high accuracy and effect.


---

## Body

## 1. Introduction

National costume is one of the carriers of national culture and spirit, which is closely related to national development and inheritance. National costumes are constantly evolving with the development history of various nationalities. Whether it is the raw materials, styles and colors of national costumes, or the production technology and patterns of costumes, they can show the development and evolution of a national culture [1]. At the same time, different ethnic groups have their own culture and history with different characteristics. In addition, most ethnic groups live in groups and have less influence on each other. Therefore, ethnic costumes also retain the cultural characteristics of their own ethnic costumes, which is also one of the important bases for the study of ethnic culture [2]. With the development of national technology, there are many factors that have no influence on the inheritance of national characteristics. At the same time, the development of popular fashion clothing and the invasion of foreign culture have compressed the development space of national clothing. Most national clothing with national characteristics can only be seen in tourism performances [3]. Many young people are also more inclined to fashion clothes with trend and personality in the choice of clothes. They do not understand the cultural heritage contained in national clothes and the importance of national clothes to national development. In addition, the particularity and uniqueness of national costumes make it need to spend a lot of human and material resources to store in the process of research. At the same time, many ethnic groups live in relatively remote areas and their national costumes are not easy to carry and find [4]. Therefore, the protection, inheritance, effective utilization, and promotion of national costumes have always been the problems to be solved in the development of national culture.With the development of Internet and computer technology, the digitization of national clothing has become an inevitable trend in the development of national clothing. The early digitization of national costumes was mainly realized by means of scanners and image shooting, which is the most effective and direct protection method [5]. However, due to the influence of the environment, many ethnic costume materials are weathered and the original form, color, and pattern information of costumes cannot be preserved. At the same time, the previous digital means have poor effect on the retention and performance of national costume detail information, which is not conducive to further analysis and research [6]. Image processing technology provides favorable technical support for the digitization and research of national clothing. Therefore, this paper proposes the application of spatial neighborhood fuzzy c-means algorithm in 3D image segmentation of national clothing. Based on the traditional fuzzy c-means algorithm, combined with gray information and spatial information, this paper constructs an image segmentation model based on spatial neighborhood fuzzy c-means algorithm. This paper is mainly divided into three parts. The first part expounds the current situation and development of national costume digitization and image segmentation technology. The second part is to build a 3D image segmentation model based on spatial neighborhood fuzzy c-means algorithm. The third part is the application experiment and result analysis of 3D image segmentation model based on spatial neighborhood fuzzy c-means algorithm in national clothing.


## 2. Current Situation and Development of Digital and Image Segmentation Technology for National Costumes

The protection and inheritance of national costume culture is inseparable from the participation of research scholars and corresponding academic work. In the past, the protection of national costume culture mainly relied on museums and art galleries. Not only the ways and means of protection are limited, but also the number of national costumes that can be protected is limited. With the development of national culture, many experts and scholars have done a lot of work on the protection and inheritance of national clothing culture. Some scholars have elaborated on how to protect and inherit national costumes from many aspects. While encouraging all ethnic groups to establish self-confidence and belief in protecting national costume culture, they actively encourage individuals and local people to collect and protect national costumes [7, 8]. Other scholars proposed that national costumes should be displayed and promoted through different channels, and the contributions made by excellent promoters of national costumes should be rewarded [9]. In addition, some scholars took clothing culture and inheritance as the starting point, expounded the position of national clothing in intangible cultural heritage, and answered the problems of how to protect national clothing and how to inherit national clothing and put forward corresponding attention and suggestions [10]. For the better development of national costume culture, 28 ethnic tribes and standardization institutes in Inner Mongolia Autonomous Region put forward corresponding normative standards of representative national costumes in 2011 and further effectively positioned and standardized national costumes [11].With the development of computer technology and Internet technology, the protection and inheritance of national clothing has also entered the digital era. In 2011, Google launched the Google and Culture Program in conjunction with museums and art galleries around the world, uploading and sharing more than 32000 works of art on the Internet [12]. Therefore, the establishment of digital museum also began to rise in China, and some scholars made corresponding analysis on the digital museum and then expounded the importance, necessity, and significance of building a digital museum of national costumes on the basis of analysis [13]. Other scholars pointed out that the construction of national costume digital museum not only needs to increase the investment of human, material, and capital but also needs to effectively integrate the costume resources of all ethnic groups [14]. Other scholars have made a comprehensive analysis and comparison between physical museums and digital museums in terms of display methods, contents, methods, and effects and pointed out that the relatively mature and perfect way of protection and inheritance of national costume culture is still physical museums. Although the digital museum of national costumes is an important way of protection and inheritance, it is still in the stage of development and exploration and needs to be continuously optimized and improved [15, 16]. In the research of national costumes, many scholars elaborate from the perspective of humanities. With the development of computer vision and image processing technology, some scholars put forward the application of image processing technology to the protection and inheritance of national costumes [17]. Some scholars have proposed that there is no need for any predefined clothing model for clothing image segmentation [18]. Other scholars have optimized the original clothing extraction algorithm according to the characteristics that the same clothing can correspond to multiple images, which improves the accuracy of extraction [19]. Other scholars proposed the maximum similarity region merging algorithm based on the watershed algorithm to improve the segmentation effect of color clothing image [20]. However, most of the above methods are image segmentation of mass clothing, which cannot meet the national clothing with gorgeous colors and rich details. As shown in Figure 1, it is the comparison between popular clothing and national clothing.Figure 1
Comparison of popular clothing and national clothing.


## 3. Construction of 3D Image Segmentation Model Based on Spatial Neighborhood Fuzzy c-Means Algorithm

### 3.1. Fuzzy c-Means Algorithm Based on Spatial Neighborhood

Compared with general natural images, ethnic costumes have more colorful and rich patterns visually. At the same time, many patterns are also displayed on free costumes. These characteristics are consistent with the images displayed in computer vision. Therefore, 3D images of ethnic costumes can be segmented by image segmentation algorithm. Fuzzy c-means algorithm (FCM algorithm) is one of the widely used fuzzy clustering algorithms. The principle is to regard all pixels in the image as isolated data and cluster them. It shows the advantages of fast speed and strong robustness in image segmentation and can retain more image information than hard clustering algorithm. However, the traditional fuzzy c-means algorithm is vulnerable to noise, which is mainly because the spatial information of the image is not considered in the algorithm. Aiming at the problems existing in the traditional fuzzy c-means algorithm, based on the improved rfcm algorithm of the traditional fuzzy c-means algorithm, combined with the spatial neighborhood and gray information and introduced the kernel function, this paper constructs the spatial neighborhood fuzzy c-means algorithm model. The objective function of rfcm algorithm is shown in the following formula:(1)J=∑i=1c∑j=1nuij2xj−vi2+∑j=1naj∑i=1cuij1−uij.The total number of samples in the sample set isc, the initial set number of clusters is n, the membership function from the i sample to the j cluster center is uij, the cluster center is vi, and the Euclidean distance between the sample and the cluster center is xj−vi2. By minimizing formula (1) through Lagrange number multiplication, the renewal equation of cluster center and membership function can be obtained, as shown in the following formulas:
(2)vi=∑j=1nuij2xj∑j=1nuij2,(3)uij=1∑k=1cxj−vi2−aj/xj−vk2−aj.Ifuij,0≤uij≤1,α0≤α≤1,aj=α⋅minxj−vs2s∈1,2,⋯,c in the above formula is satisfied, the convergence speed is controlled by parameters. When α=0 is satisfied, the algorithm is equivalent to the traditional fuzzy c-means algorithm. The selection and setting of parameter α affect the speed of rfcm algorithm to a certain extent. Selecting appropriate parameter α can improve the clustering speed of rfcm algorithm and show good clustering performance. However, rfcm algorithm does not consider the relationship between noise and neighborhood and assigns noise to the components of normal image, so it cannot effectively reduce the impact of noise.According to the relevant literature, the kernel-based fuzzy c-means algorithm, namely, KFCM, is expressed asΦ:x∈X⊆Rd⟶Φx∈RHd<<H, that is, a nonlinear mapping transformation is carried out in the high-dimensional feature space F and Φx−Φy2 replaces the Euclidean distance xj−vi2, as shown in the following formula:
(4)Φx−ΦyTΦx−Φy2=ΦxTΦx−ΦxTΦy−ΦyTΦx+ΦyTΦy.When the linear algorithm can meet Mercer’s condition, the kernel function can be extended to nonlinearity through inner product. The corresponding feature space of Gaussian kernel function has infinite dimension, which makes the limited samples expressed as linearly separable in this space. Therefore, this paper uses Gaussian kernel function and calculates the inner product of kernel function, as shown in the following formula, which is the definition of kernel function:(5)Kx,y=exp−x−y2σ2.Bring formula (4) into formula (5) to obtain the following:
(6)Φx−Φy2=21−Kx,y.The variance estimationσ2 of data samples is shown in the following formulas:
(7)σ2=∑j=1nxj−x′2n,x′=∑j=1nxjn∘.After introducing kernel function and combining local space and gray information, a new fuzzy c-means clustering image segmentation algorithm, namely, spatial neighborhood fuzzy c-means clustering image segmentation algorithm, is proposed, which is called ksnrfcm. After formula (6), the objective function is shown in the following formula:
(8)JNKRFCM_S=2∑i=1cri∑j=1nui,j2di,j2+β∂ij+2λ∑i=1cri∑j=1nuijm1−Kx¯j,vi.Through Lagrange multiplier method, membership function and cluster center are shown in the following formulas:(9)uij=1∑l=1c∑i=1cridi,j2+β∂ij+λ1−Kx¯j,vi/∑i=1cridij2+β∂ij+λ1−Kx¯j,vi1/m−1,(10)vi=∑j=1nuij2∑i=1crix+λKx¯j,vi⋅x¯j∑j=1nuij2∑i=1cri+λKx¯j,vi.


### 3.2. Effectiveness Analysis Index of Fuzzy c-Means Algorithm Based on Spatial Neighborhood

The clustering effect of spatial neighborhood fuzzy c-means clustering image segmentation algorithm can be evaluated through clustering effectiveness analysis. Clustering effectiveness analysis algorithms include partition coefficient, partition entropy, Xie Beni effectiveness index, Kwon clustering effectiveness index, and Tang effectiveness index.The partition coefficient is to transform the fuzzy c-means clustering algorithm into a mathematical programming problem and give the corresponding standards. If the fuzzy c-means clustering number and membership matrix are known, the partition coefficient is shown in the following formula:(11)Vpc=1n∑i=1n∑j=1cuji2.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the partition coefficient is expressed as Vpc and 1/c≤Vpc≤1. Vpc=1, if and only if U is in the hardened state. Vpc=1/c, if and only if U=1/c. Therefore, the clustering segmentation effect of the algorithm becomes more obvious with the increase of the partition coefficient. The smaller the partition coefficient, the more fuzzy the clustering effect of the algorithm.Partition entropy is to put forward the definition of fuzzy clustering partition entropy based on Xiangnong information entropy formula and judge the effectiveness of fuzzy clustering. The fuzzy c-means clustering number and membership matrix are known. The partition entropy formula is shown in the following equation:(12)Vpe=−1n∑i=1n∑j=1cuji2log2uji.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the partition entropy is expressed as Vpe. When and only when the membership meets the condition U=1/c,0≤Vpe≤log2c, the partition entropy reaches the maximum. The effect visibility of fuzzy clustering algorithm decreases with the increase of partition entropy.Xie Beni effectiveness index takes the effectiveness index function as the evaluation criterion to evaluate the degree of cohesion and isolation between various types. The fuzzy c-means clustering number and membership matrix are known, and its formula is shown in the following:(13)Vxb=∑i=1c∑j=1nujimxj−xi2nminj≠kvj−vk2.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the Xie Beni effectiveness index is expressed as Vxb, which is independent of the membership. Therefore, it can be seen that it does not belong to the in class clustering algorithm, so the Xie Beni effectiveness index can be expressed by the following formula:
(14)Vxb=Jmndmin2.In the formula, the objective function of fuzzy c-means clustering algorithm is expressed asJm, dmin2 is an important factor of Xie Beni effectiveness index, which can evaluate the isolation degree between classes, and Jm/n can evaluate the cohesion degree between classes. The larger the Vxb, the more blurred the image segmentation effect of the clustering algorithm and vice versa.Kwon clustering effectiveness index is based on Xie Beni effectiveness index and adds a penalty function, so as to solve the problem that the value of Xie Beni effectiveness index tends to decrease monotonically with the increase of the number of clusters. Given the fuzzy c-means clustering number and membership matrix, the formula is shown in the following:(15)Vk=∑i=1n∑j=1cuji2xj−vi2+1/c∑j=1cvj−v¯2minj≠kvj−vk2,wherev¯ is as shown in the following formula:
(16)v¯=1n∑i=1nxi.The first term of formula (15) is to measure the intraclass similarity, and the higher the intraclass similarity, the smaller the value. The second item is the penalty item. When the number of clusters of the algorithm is close to the number of samples, it will evaluate the downward trend of the algorithm. The smaller the value of Kwon clustering effectiveness index is, the fuzzier the distinction between various types is and vice versa.Tang validity index is based on Kwon clustering validity index, adding a new validity index function to improve the penalty function, as shown in formula (17):
(17)Vt=∑i=1n∑j=1cuji2xi−vj2+1/cc−1∑i=1c∑k=1,k≠icvi−vk2minj≠kvj−vk2+1/c.In the formula, the Tang effectiveness index is expressed asVt and the second term of the molecule represents the improved penalty function and reflects the average distance between various types. Therefore, the clustering division effect of the algorithm increases with the increase of the Tang effectiveness index.This paper analyzes the above fuzzy clustering effectiveness index in detail and finally selects the partition coefficient and partition entropy to evaluate the effectiveness of the spatial neighborhood fuzzy c-means algorithm, so as to provide relevant basis for the image segmentation effect of the spatial neighborhood fuzzy c-means algorithm in national clothing. At the same time, this paper selects the segmentation accuracy to evaluate the accuracy of the clustering algorithm, as shown in the following formula:(18)sa=∑i=1cAi∩Ci∑j=1cCj.


## 3.1. Fuzzy c-Means Algorithm Based on Spatial Neighborhood

Compared with general natural images, ethnic costumes have more colorful and rich patterns visually. At the same time, many patterns are also displayed on free costumes. These characteristics are consistent with the images displayed in computer vision. Therefore, 3D images of ethnic costumes can be segmented by image segmentation algorithm. Fuzzy c-means algorithm (FCM algorithm) is one of the widely used fuzzy clustering algorithms. The principle is to regard all pixels in the image as isolated data and cluster them. It shows the advantages of fast speed and strong robustness in image segmentation and can retain more image information than hard clustering algorithm. However, the traditional fuzzy c-means algorithm is vulnerable to noise, which is mainly because the spatial information of the image is not considered in the algorithm. Aiming at the problems existing in the traditional fuzzy c-means algorithm, based on the improved rfcm algorithm of the traditional fuzzy c-means algorithm, combined with the spatial neighborhood and gray information and introduced the kernel function, this paper constructs the spatial neighborhood fuzzy c-means algorithm model. The objective function of rfcm algorithm is shown in the following formula:(1)J=∑i=1c∑j=1nuij2xj−vi2+∑j=1naj∑i=1cuij1−uij.The total number of samples in the sample set isc, the initial set number of clusters is n, the membership function from the i sample to the j cluster center is uij, the cluster center is vi, and the Euclidean distance between the sample and the cluster center is xj−vi2. By minimizing formula (1) through Lagrange number multiplication, the renewal equation of cluster center and membership function can be obtained, as shown in the following formulas:
(2)vi=∑j=1nuij2xj∑j=1nuij2,(3)uij=1∑k=1cxj−vi2−aj/xj−vk2−aj.Ifuij,0≤uij≤1,α0≤α≤1,aj=α⋅minxj−vs2s∈1,2,⋯,c in the above formula is satisfied, the convergence speed is controlled by parameters. When α=0 is satisfied, the algorithm is equivalent to the traditional fuzzy c-means algorithm. The selection and setting of parameter α affect the speed of rfcm algorithm to a certain extent. Selecting appropriate parameter α can improve the clustering speed of rfcm algorithm and show good clustering performance. However, rfcm algorithm does not consider the relationship between noise and neighborhood and assigns noise to the components of normal image, so it cannot effectively reduce the impact of noise.According to the relevant literature, the kernel-based fuzzy c-means algorithm, namely, KFCM, is expressed asΦ:x∈X⊆Rd⟶Φx∈RHd<<H, that is, a nonlinear mapping transformation is carried out in the high-dimensional feature space F and Φx−Φy2 replaces the Euclidean distance xj−vi2, as shown in the following formula:
(4)Φx−ΦyTΦx−Φy2=ΦxTΦx−ΦxTΦy−ΦyTΦx+ΦyTΦy.When the linear algorithm can meet Mercer’s condition, the kernel function can be extended to nonlinearity through inner product. The corresponding feature space of Gaussian kernel function has infinite dimension, which makes the limited samples expressed as linearly separable in this space. Therefore, this paper uses Gaussian kernel function and calculates the inner product of kernel function, as shown in the following formula, which is the definition of kernel function:(5)Kx,y=exp−x−y2σ2.Bring formula (4) into formula (5) to obtain the following:
(6)Φx−Φy2=21−Kx,y.The variance estimationσ2 of data samples is shown in the following formulas:
(7)σ2=∑j=1nxj−x′2n,x′=∑j=1nxjn∘.After introducing kernel function and combining local space and gray information, a new fuzzy c-means clustering image segmentation algorithm, namely, spatial neighborhood fuzzy c-means clustering image segmentation algorithm, is proposed, which is called ksnrfcm. After formula (6), the objective function is shown in the following formula:
(8)JNKRFCM_S=2∑i=1cri∑j=1nui,j2di,j2+β∂ij+2λ∑i=1cri∑j=1nuijm1−Kx¯j,vi.Through Lagrange multiplier method, membership function and cluster center are shown in the following formulas:(9)uij=1∑l=1c∑i=1cridi,j2+β∂ij+λ1−Kx¯j,vi/∑i=1cridij2+β∂ij+λ1−Kx¯j,vi1/m−1,(10)vi=∑j=1nuij2∑i=1crix+λKx¯j,vi⋅x¯j∑j=1nuij2∑i=1cri+λKx¯j,vi.


## 3.2. Effectiveness Analysis Index of Fuzzy c-Means Algorithm Based on Spatial Neighborhood

The clustering effect of spatial neighborhood fuzzy c-means clustering image segmentation algorithm can be evaluated through clustering effectiveness analysis. Clustering effectiveness analysis algorithms include partition coefficient, partition entropy, Xie Beni effectiveness index, Kwon clustering effectiveness index, and Tang effectiveness index.The partition coefficient is to transform the fuzzy c-means clustering algorithm into a mathematical programming problem and give the corresponding standards. If the fuzzy c-means clustering number and membership matrix are known, the partition coefficient is shown in the following formula:(11)Vpc=1n∑i=1n∑j=1cuji2.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the partition coefficient is expressed as Vpc and 1/c≤Vpc≤1. Vpc=1, if and only if U is in the hardened state. Vpc=1/c, if and only if U=1/c. Therefore, the clustering segmentation effect of the algorithm becomes more obvious with the increase of the partition coefficient. The smaller the partition coefficient, the more fuzzy the clustering effect of the algorithm.Partition entropy is to put forward the definition of fuzzy clustering partition entropy based on Xiangnong information entropy formula and judge the effectiveness of fuzzy clustering. The fuzzy c-means clustering number and membership matrix are known. The partition entropy formula is shown in the following equation:(12)Vpe=−1n∑i=1n∑j=1cuji2log2uji.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the partition entropy is expressed as Vpe. When and only when the membership meets the condition U=1/c,0≤Vpe≤log2c, the partition entropy reaches the maximum. The effect visibility of fuzzy clustering algorithm decreases with the increase of partition entropy.Xie Beni effectiveness index takes the effectiveness index function as the evaluation criterion to evaluate the degree of cohesion and isolation between various types. The fuzzy c-means clustering number and membership matrix are known, and its formula is shown in the following:(13)Vxb=∑i=1c∑j=1nujimxj−xi2nminj≠kvj−vk2.The fuzzy c-means clustering number is expressed asc, the membership matrix is expressed as uij, and the Xie Beni effectiveness index is expressed as Vxb, which is independent of the membership. Therefore, it can be seen that it does not belong to the in class clustering algorithm, so the Xie Beni effectiveness index can be expressed by the following formula:
(14)Vxb=Jmndmin2.In the formula, the objective function of fuzzy c-means clustering algorithm is expressed asJm, dmin2 is an important factor of Xie Beni effectiveness index, which can evaluate the isolation degree between classes, and Jm/n can evaluate the cohesion degree between classes. The larger the Vxb, the more blurred the image segmentation effect of the clustering algorithm and vice versa.Kwon clustering effectiveness index is based on Xie Beni effectiveness index and adds a penalty function, so as to solve the problem that the value of Xie Beni effectiveness index tends to decrease monotonically with the increase of the number of clusters. Given the fuzzy c-means clustering number and membership matrix, the formula is shown in the following:(15)Vk=∑i=1n∑j=1cuji2xj−vi2+1/c∑j=1cvj−v¯2minj≠kvj−vk2,wherev¯ is as shown in the following formula:
(16)v¯=1n∑i=1nxi.The first term of formula (15) is to measure the intraclass similarity, and the higher the intraclass similarity, the smaller the value. The second item is the penalty item. When the number of clusters of the algorithm is close to the number of samples, it will evaluate the downward trend of the algorithm. The smaller the value of Kwon clustering effectiveness index is, the fuzzier the distinction between various types is and vice versa.Tang validity index is based on Kwon clustering validity index, adding a new validity index function to improve the penalty function, as shown in formula (17):
(17)Vt=∑i=1n∑j=1cuji2xi−vj2+1/cc−1∑i=1c∑k=1,k≠icvi−vk2minj≠kvj−vk2+1/c.In the formula, the Tang effectiveness index is expressed asVt and the second term of the molecule represents the improved penalty function and reflects the average distance between various types. Therefore, the clustering division effect of the algorithm increases with the increase of the Tang effectiveness index.This paper analyzes the above fuzzy clustering effectiveness index in detail and finally selects the partition coefficient and partition entropy to evaluate the effectiveness of the spatial neighborhood fuzzy c-means algorithm, so as to provide relevant basis for the image segmentation effect of the spatial neighborhood fuzzy c-means algorithm in national clothing. At the same time, this paper selects the segmentation accuracy to evaluate the accuracy of the clustering algorithm, as shown in the following formula:(18)sa=∑i=1cAi∩Ci∑j=1cCj.


## 4. Experimental Results of 3D Image Segmentation Model Based on Spatial Neighborhood Fuzzy c-Means Algorithm in National Clothing

In order to investigate the performance of spatial neighborhood fuzzy c-means algorithm, this paper will compare the running time, image segmentation effectiveness and image segmentation accuracy of spatial neighborhood fuzzy c-means algorithm, improved fuzzy c-means algorithm, and traditional fuzzy c-means algorithm. As shown in Figure2, the running time comparison results of spatial neighborhood fuzzy c-means algorithm and improved fuzzy c-means algorithm are shown. Since it is known that the running speed of the improved fuzzy c-means algorithm is faster than that of the traditional fuzzy c-means algorithm, only the running time of the spatial neighborhood fuzzy c-means algorithm and the improved fuzzy c-means algorithm are compared. It can be seen from the data in the figure that the running time of single iteration of spatial neighborhood fuzzy c-means algorithm is longer than that of improved fuzzy c-means algorithm, but the number of iterations is significantly reduced than that of improved fuzzy c-means algorithm. This shows that the spatial neighborhood fuzzy c-means algorithm has faster convergence speed, and the running time of a single iteration is mainly related to the complexity of the algorithm.Figure 2
Comparison of running time between spatial neighborhood fuzzy c-means algorithm and improved fuzzy c-means algorithm.As shown in Figure3, the partition coefficients and entropy of spatial neighborhood fuzzy c-means algorithm and improved fuzzy c-means algorithm under different noise levels are shown. It can be seen from the data in the figure that the partition coefficient of the two algorithms will decrease with the increase of noise level, while the partition entropy will increase with the increase of noise level. However, both the increase of partition coefficient and the decrease of partition entropy of the improved fuzzy c-means algorithm are larger than that of spatial neighborhood fuzzy c-means algorithm. In the same noise level, the spatial neighborhood fuzzy c-means algorithm has more advantages than the improved fuzzy c-means algorithm.Figure 3
Partition coefficient and partition entropy of spatial neighborhood fuzzy c-means algorithm and improved fuzzy c-means algorithm under different noise levels.
(a)
Partition coefficient(b)
Partition entropyAs shown in Figure4, the membership weight index and spatial domain information weight index of spatial neighborhood fuzzy c-means algorithm and improved fuzzy c-means algorithm affect the clustering effect of the algorithm in different noise levels. On the whole, the influence trend of different membership weight index and spatial neighborhood information weight index on the partition coefficient and partition entropy of the two algorithms in different noise levels is the same and the change range of influence is different. At the same noise level, p=3,q=1 has the largest partition coefficient and the smallest partition entropy. There is little difference between the effect of p=2,q=1 and p=3,q=1, the effect of p=1,q=1 is moderate, and the effect of p=0,q=2 is the worst.Figure 4
The influence of membership weight index and spatial domain information weight index of (a) spatial neighborhood fuzzy c-means algorithm and (b) improved fuzzy c-means algorithm on the clustering effect of the algorithm in different noise levels.
(a)(b)In order to further study the application of 3D image segmentation model based on spatial neighborhood fuzzy c-means algorithm in national clothing, this paper will compare the experimental results of the three algorithms in national clothing. As shown in Figure5, the clustering effectiveness evaluation results of the three algorithms are compared. It can be seen from the data in the figure that in the case of different proportions of noise, the image segmentation accuracy of the traditional fuzzy c-means algorithm is the lowest and there is a large gap between the accuracy of the traditional fuzzy c-means algorithm and the other two algorithms. The accuracy of improved fuzzy c-means algorithm and spatial neighborhood fuzzy c-means algorithm can be maintained at more than 95%, but the accuracy of improved fuzzy c-means algorithm is lower than that of spatial neighborhood fuzzy c-means algorithm.Figure 5
Comparison results of segmentation accuracy of spatial neighborhood fuzzy c-means algorithm, improved fuzzy c-means algorithm, and traditional fuzzy c-means algorithm.As shown in Figure6, the clustering effectiveness evaluation index results of the three algorithms are compared. It can be seen from the results in the figure that among the effects of 3D image segmentation for different national costumes, the effect indexes of the traditional fuzzy c-means algorithm and the improved fuzzy c-means algorithm are almost the same, while the clustering effectiveness index of the spatial neighborhood fuzzy c-means algorithm is quite different from the index results of the other two algorithms, which shows that in the 3D image segmentation of national costumes, the effect of spatial neighborhood fuzzy c-means algorithm is better than that of traditional fuzzy c-means algorithm and improved fuzzy c-means algorithm.Figure 6
Comparison of clustering effectiveness evaluation index results of spatial neighborhood fuzzy c-means algorithm, improved fuzzy c-means algorithm, and traditional fuzzy c-means algorithm.Since the image segmentation effects of the traditional fuzzy c-means algorithm and the improved fuzzy c-means algorithm are similar, the improved fuzzy c-means algorithm and the spatial neighborhood fuzzy c-means algorithm are selected to compare the 3D image segmentation effects of national costumes, as shown in Figure7. It can be seen from the results in the figure that although both algorithms can effectively segment the 3D image of national clothing, the image segmentation effect of spatial neighborhood fuzzy c-means algorithm is better than that of improved fuzzy c-means algorithm. National costumes contain many totems, groups, and patterns with national characteristics. These national costume elements are also an important basis for the study of national costume culture. By improving the fuzzy c-means algorithm, some patterns with national characteristics appear in the effect image segmented or belong to a range with the background color and the result of image segmentation is not ideal. The spatial neighborhood fuzzy c-means algorithm can more clearly segment the patterns in national costumes, while retaining more detailed information, which is more suitable for the segmentation of 3D images of national costumes.Figure 7
Comparison of 3D image segmentation effects of improved fuzzy c-means algorithm and spatial neighborhood fuzzy c-means algorithm.To sum up, compared with the traditional fuzzy c-means algorithm and the improved fuzzy c-means algorithm, the spatial neighborhood fuzzy c-means algorithm has faster convergence speed and better image segmentation effect in different noise levels. At the same time, the spatial neighborhood fuzzy c-means algorithm has higher accuracy in the 3D image segmentation of national costumes. It can segment the patterns of great significance in national costumes and retain more details of national costumes. Therefore, the spatial neighborhood fuzzy c-means algorithm has better performance and is more suitable for the segmentation of 3D images of national costumes.


## 5. Conclusions

(1)
National costumes contain many patterns and patterns with their own characteristics, gorgeous colors and rich details. Although the previous digital methods of national clothing can effectively and directly protect and record it, due to technical problems, many details contained in national clothing are difficult to be recorded and preserved in detail and truly. With the development of image processing technology, it provides new technical support for the digital development of national clothing(2)
This paper presents the application of spatial neighborhood fuzzy c-means algorithm in three-dimensional image segmentation of national clothing. Based on the traditional fuzzy c-means algorithm, spatial information and gray information are introduced and a three-dimensional image segmentation model based on spatial neighborhood fuzzy c-means is established. The experimental results show that compared with the traditional fuzzy c-means algorithm and the improved fuzzy c-means algorithm, the 3D image segmentation model based on spatial neighborhood fuzzy c-means has faster convergence speed and better performance. At the same time, under different noise levels, the clustering effectiveness index of spatial neighborhood fuzzy c-means algorithm is better and the clustering effect is better(3)
In the three-dimensional image segmentation of national clothing, the spatial neighborhood fuzzy c-means algorithm can not only maintain high accuracy but also segment the patterns in national clothing more clearly and retain more clothing details, and it is more suitable for the three-dimensional image segmentation of national clothing. However, the algorithm still has problems such as long single replacement time, which needs to be further optimized and adjusted



---

*Source: 2786826-2022-07-19.xml*