# Intelligent Clothing Design and Data Acquisition under the Scientific Graphics Programming Combined with Wearable Multisensor

Authors: Mengshu Ding; Qistina Donna Lee Abdullah; Salmiah bt Abdul Hamid
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

This research focuses on the improvement of intelligent Hanfu design system’s performance. Henceforth, in the current study, an intelligent Hanfu design data acquisition system based on scientific graphics programming and wearable multisensor is designed for the field of human body size measurement and human model reconstruction. Initially, on the basis of wearable multisensor, a design of the recognition and analysis system of human posture is presented. The error of nine-axis inertial sensor in the process of collecting data, the data of accelerometer, gyroscope, and magnetometer are preprocessed, and the processing results are observed. Moreover, MATLAB programming is used for preprocessing of collected images. It is also used for grey normalization, filtering denoising, and image sharpening. The advantages and disadvantages of different methods are compared experimentally. Experiments show that MATLAB programming is more suitable for grey normalization than histogram equalization, and local brightness will appear in histogram equalization. After denoising the image with salt-and-pepper noise and Gaussian noise, the median filter and mean filter have defects. Wiener’s adaptive filter leads to the increase of noise, and wavelet denoising has the best effect. The data acquisition system of intelligent Hanfu design established in this work provides a certain direction for the development of intelligent Hanfu design.


---

## Body

## 1. Introduction

In recent years, the number of Hanfu lovers has increased rapidly, and the Hanfu industry has attracted more and more attention. The development and progress of economy, science, and technology have promoted the development of e-commerce platform. People are more and more inclined to online shopping, and the proportion of Hanfu online shopping is also gradually increasing. Therefore, for the problem of low quality and ill-fitting of Hanfu in online shopping, intelligent Hanfu design can effectively design Hanfu according to the physical characteristics of consumers to make it more suitable for consumers. The most important thing in intelligent Hanfu design is the construction of human body data acquisition system, which can help Hanfu design collect human body data and improve the design.Many researches have been made on human data acquisition at home and abroad. Chung et al. built a test platform, including eight wearable inertial measurement unit sensors and an Android mobile device for activity data acquisition. A long-term and short-term memory network framework was developed to support the training of deep learning models for human activity data obtained in the real world and controlled environment [1]. Dickinson et al. determined the effects of collar size and collar weight on the acceleration measured by the collar mounted accelerator. The purpose is to propose best practices for the size and weight of collars for deploying triaxial accelerometers [2]. Liberadzki et al. proposed a multispectral separation support method based on structured light to realize multidirectional and parallel acquisition. In this method, single-frame fringe projection is used for detailed geometric reconstruction. An extended-phase unwrapping method suitable for anthropometry is also proposed. This method uses the local fringe parameter information to determine the best unpacking path for reconstruction [3]. Based on scientific graphics programming and the construction of wearable multisensor human body data acquisition system, the specific data of human body size can be collected more accurately. According to these data, Hanfu can be designed to better meet the needs of modern people. At the same time, this data-based design can rapidly improve Hanfu culture in the e-commerce market. The paper is arranged in a way such that Section 1 introduces the research subject and gives a review of literate. In Section 2, the methods and material used in the analysis of human posture are discussed. Different tools are presented with their advantages and disadvantages. Moreover, their designs and structures are explained. In Section 3, the experiments are carried out for the purpose of comparison. A deep analysis of the experimental results is carried out, and the validity of the proposed work is confirmed. Finally, the paper is concluded in Section 4.


## 2. Materials and Methods

In this section, the methods and material used in the analysis of human posture are discussed along with the recognition of intelligent Hanfu design system. Different tools are discussed with their advantages and disadvantages. Moreover, their designs and structures are explained. In this process, we described the data acquisition preprocessing and error analysed the intelligent Hanfu design system. Further, human body image acquisition of intelligent Hanfu system is presented. Grey normalization preprocessing, filtering, denoising preprocessing, and image sharpening preprocessing with MATLAB are also proposed.


### 2.1. Human Posture Analysis and Recognition of Intelligent Hanfu Design System

The human posture analysis and recognition of the intelligent Hanfu design system mainly uses the original sensor data collected at each inertial acquisition point to obtain human body-related data for Hanfu design [4]. The connection between multiple sensors is constrained, the data is transmitted and summarized by wireless module, and the attitude is reconstructed and displayed by inputting it into the host computer through Ethernet [5]. The system block diagram is illustrated in Figure 1.Figure 1
Frame diagram of posture analysis and recognition.The data acquisition of the intelligent Hanfu system is mainly carried out by the inertial sensor, and the nine-axis inertial sensor is set at the main joints of the human body by binding [6]. The structure of nine-axis inertial sensor is shown in Figure 2.(i)
Accelerometer. The acceleration of the carrier movement and the gravitational acceleration received at rest are measured by accelerometer [7]. The current work measures the acceleration of gravity by accelerometer and uses mathematical methods to calculate the pitch angle and yaw angle of the carrier at rest. However, the existing problem is that the dynamic performance of the accelerometer is poor, and the advantage of the accelerometer is that it can quickly and accurately measure the posture angle under static conditions.(ii)
Gyroscope. The angular velocity of the carrier moving around the body is measured by gyroscope [8]. In the current work, the performance degradation of acceleration sensor in high dynamic is made up by gyroscope. When the human body is moving, each joint is basically moving around the axis, and the gyroscope can measure the rotation posture information. However, the gyroscope itself has some problems, such as serious zero drift and angular wandering, which need to be corrected in combination with other sensors to improve the system performance.(iii)
Magnetometer. The direction and size of the Earth’s magnetic field are measured by magnetometer [9]. However, this tool has a drawback; the magnetic field environment of the object is interfered by the ferromagnetic substances. But the plus point of the said tool is that the measured value is stable without serious drift and random interference [10]. The sensor fusion algorithm in this work is to fuse the data of magnetometer and accelerometer and then measure the attitude angle of human body to correct the gyroscope.Figure 2
Frame diagram of nine-axis sensor.


### 2.2. Data Acquisition Preprocessing and Error Analysis of Intelligent Hanfu Design System

For the data acquisition of the intelligent Hanfu design system, due to the influence of external interference, the original data of the nine-axis sensor cannot be used directly, and the human body in motion is more complex [11]. Therefore, the accelerometer, gyroscope, and magnetometer must be preprocessed to calibrate the data [12]. Next, error analysis and data preprocessing are carried out for data collected by different sensors. The three-axis gyroscope sensor mainly collects angular velocity data, and the error is mainly uncertainty error and certainty error [13]. Figure 3 illustrated the details.Figure 3
Error classification framework.Deterministic error and uncertain error exist at the same time, in which uncertain error must exist. Under the same conditions, the characteristics of random error are also different. It is necessary to use mathematical theories and methods to explore the law of random error and determine the commonness of the law [14]. In this work, low-pass filtering and recursive average filtering are used to process gyroscope data, in which the recursive window is 20. The low-pass filter is used to eliminate the high-frequency noise in the signal. The Butterworth low-pass filter with a cut-off frequency of 20 Hz is designed by MATLAB toolbox FDATool. Recursive average filtering can well suppress periodic interference and has high smoothness. It is suitable for high-frequency oscillation system. The specific implementation steps are as follows: the average filtering recursive window is set to 20. The average value of the sampling data was calculated at the current time and the data at N − 1 sampling points, which is expressed in equation (1). The window returns to the previous step, the new sampled data is placed at the end, the first sampled value is removed, and then, the second step is repeated.(1)Xit=1NXi+Xi1+⋯+X0,i=N−1.The errors of the accelerometer in the measurement process include random error, proportional error, nonorthogonal error, and fixed deviation [15]. In the ideal case, the three axes of the accelerometer are completely orthogonal and do not interfere with each other. It is assumed that the three-axis output is ax,ay,az; the following equation was obtained.(2)ax2+ay2+az2=g2,where g represents the gravitational acceleration whose value is 9.8 m/s2. In practice, there are fixed error and proportional error, and the deterministic error is expressed as follows.(3)ax′ay′az′=ax0ay0az0+∅xKxyKxzKyx∅yKyzKzxKzy∅zaxayaz,where ax′ represents the actual output acceleration of accelerometer x-axis; ay″ represents the actual output acceleration of accelerometer y-axis; az′ represents the actual output acceleration of accelerometer z-axis; ∅x represents the scale coefficient of accelerometer x-axis; ∅y represents the scale coefficient of accelerometer y-axis; ∅z represents the scale coefficient of accelerometer z-axis; Kxy represents the interference coefficient between x-axis and y-axis caused by accelerometer installation error. When calibrating the deterministic error of accelerometer, the coefficient of accelerometer error model will be obtained and the acceleration value will be normalized.(4)ax1′=φx+Kxy,ay1′=φy+∅y,az1′=φz+Kzy,ax2′=φx+Kxz,ay2′=φy+Kyz,az2′=φz+∅z,ax3′=φx−∅x,ay3′=φy−Kyx,az3′=φz−Kzx,ax4′=φx−Kxy,ay4′=φy−∅y,az4′=φz−Kzy,ax5′=φx−Kxz,ay5′=φy−Kyz,az5′=φz−∅z,ax6′=φx+∅x,ay6′=φy+Kyx,az6′=φz+Kzx.By simple algebraic calculations and simplifications of above equations, the following equations are obtained.(5)φx=ax1′+ax2′+ax4′+ax5′4,φy=ay2′+ay3′+ay5′+ay6′4,φz=az1′+az3′+az4′+az6′4,(6)∅x=ax6′−ax3′2,∅y=ay1′−ay4′2,∅z=az2′−az5′2,∅x=ax6′−ax3′2,∅y=ay1′−ay4′2,∅z=az2′−az5′2,(7)Kxy=ax1′−ax4′2,Kxz=ax2′−ax5′2,Kyx=ay6′−ay3′2Kyz=ay2′−ay5′2,Kzx=az6′−az3′2,Kzy=az1′−az4′2.After the accelerometer is placed in the above way and the data is collected, the zero-position error and scale factor coefficient can be obtained. The installation error is expressed as(8)φx=−0.0153,φy=0.0413,φz=−0.0776,∅x=1.0053,∅x=1.0053,∅y=0.9996,Kxy=0.03015,Kxz=0.0057,Kyx=−0.11405,Kyz=0.0123,Kzx=0.0123,Kzy=0.0297.The deterministic error model is obtained as follows.(9)ax′ay′az′=−0.01530.0413−0.0776+1.00530.030150.0057−0.114050.99960.01230.01230.02971.01815axayaz.The random error of accelerometer is that impulse noise occasionally occurs when collecting acceleration under high dynamic conditions [16]. The adaptive median filter is used for processing. The adaptive median filter can suppress the impulse noise. The basic process is shown in(10)Zmed=ak,n∈1,3,5,…,2n+1,ak+ak+12,n2,4,6,…,2n,where n is sliding window size and ak means that the number in the middle after the data of the current sliding window is arranged from small to large. When the magnetometer is installed, the installation error will occur if the installation angle is different. The magnetic field strength of ferromagnetic materials is greater than that of geomagnetic field, which will cause great interference to the measurement of magnetometer, so the magnetometer must be calibrated [17]. The method of compensating hard iron distortion is to determine the offset of x-axis and y-axis of magnetometer axis and then apply it directly to the data. The hard iron correction is determined by rotating the sensor at least 360°, and the distance from (0, 0) to the center of the circle is determined by using the average of the maximum and minimum values of each axis. The following equation illustrates the details.(11)α=xmax+xmin2,β=ymax+ymin2,xmin represents the minimum value of x-axis of magnetometer actually measured; xmax means the maximum value of x-axis of magnetometer actually measured. ymax refers to the maximum value of y-axis of magnetometer actually measured; ymin is the minimum value of y-axis of magnetometer actually measured. α refers to the offset of the x-axis of the magnetometer; β represents the offset of the x-axis of the magnetometer. As long as the offset is subtracted from the original x and y magnetometer data, the hard iron distortion can be eliminated to some extent. The following equation was used to calculate the long-axis length r and short-axis length q of the magnetometer.(12)ν1=x1y1=rcosθsinθ,ν2=x2y2=r−sinθ−cosθ.After rotation, the major and minor axes of the ellipse are aligned and scaled with thex-axis and y-axis. The scale factor is expressed as(13)σ=qr.


### 2.3. Human Body Image Acquisition of Intelligent Hanfu System

The human body size data collected in the intelligent Hanfu design system needs to go through the following steps: image processing, contour extraction, feature point extraction, size measurement, and so on [18]. Therefore, as the first step of human body size measurement, the acquisition and preprocessing of human body image is very important. It is not only an important source of experimental data, but also the feedback data when using experimental comparison error for analysis [19]. In this work, to obtain the human body size accurately, the front and side images of the human body are used to obtain the relevant human body information. Figure 4 below illustrated the taken experimental human body images.Figure 4
Front, side, and back images of experimental human body.


### 2.4. MATLAB for Grey Normalization Preprocessing

MATLAB is a combination of matrix and laboratory, which means matrix factory (Matrix Laboratory). The software mainly faces the high-tech computing environment of scientific computing, visualization, and interactive programming [20]. It integrates many powerful functions such as numerical analysis, matrix calculation, scientific data visualization, and modelling and simulation of nonlinear dynamic systems into an easy-to-use window environment. It also provides a comprehensive solution for scientific research, engineering design, and many scientific fields that must carry out effective numerical calculation. Besides, to a great extent, it gets rid of the editing mode of traditional noninteractive programming languages (e.g., C and Fortran) [21]. MATLAB has the advantages of high programming efficiency and friendly interface. It has very powerful function and strong expansibility such as flexible and convenient graphic functions. Its software self-study is convenient. For the image processing of the front, side, and back of the human body, this work mainly uses the toolbox unit of MATLAB image processing.Firstly, the obtained colour image is greyed, and the Joint Photographic Experts Group (JPEG) colour image is converted to the Bitmap (BMP) grey image [22]. The principle of converting colour image into grey image is as follows.(14)RGBGrayscale=0.2990.5870.1140.2990.5870.1140.2990.5870.114∗RGBColour.The equation is simplified asY=0.299R+0.578G+0.114B. Y refers to grey value. In computer image processing, there are four methods to convert colour image into grey image. The component method is expressed as (15)f1x,y=Rx,y,f2x,y=Gx,y,f3x,y=Bx,y.f1x,yi=1,2,3: the grey value at x,y is obtained after grey image conversion. Maximum value method is used to get the following equations.(16)fx,y=maxRx,y,Gx,y,Bx,y,fx,y=minRx,y,Gx,y,Bx,y.The weighted average method was used and (17) can be obtained.(17)fx,y=iRx,y+jGx,y+kBx,y,i,j, and k are the coefficients of R, G, and B, respectively.When the average method is used, (18) can be obtained.(18)fx,y=Rx,y+Gx,y+Bx,y3.The average method is used for processing, and MATLAB is used to realize programming. Figure5 shows the final processing result.Figure 5
Grayscale contrast of colour image. (a) Front colour image before conversion and black and white image after conversion; (b) colour image before side conversion and black and white image after conversion; (c) colour image before back conversion and black-and-white image after conversion.
(a)(b)(c)The converted black-and-white image needs image preprocessing. The digital image processing algorithm is used to properly process the image, highlight the effective information, remove the invalid information, and then improve the image quality. It includes three aspects: grey normalization, noise filtering, and image sharpening. Grey normalization mainly carries out grey change and histogram transformation on the original image, analyses the similarities and differences between the two cases, and makes appropriate selection. Grey scale transformation includes linear transformation and nonlinear transformation. The global linear transformation of linear transformation is expressed as (19). The maximum value of F (x, y) is obtained.(19)gx,y=c,0≤fx,y<a,gx,y=d−cb−a×fx,y+c,a≤fx,y<b,gx,y=d,b≤fx,y<Mf.The commonly used three segment linear transformations are expressed as follows.(20)gx,y=cb×fx,y,0≤fx,y<a,gx,y=d−cb−a×fx,y−a+c,a≤fx,y<b,gx,y=Mg−dMf−b×fx,y−b+d,b≤fx,y<Mf.WhenMg: and Mf: fx,y are the maximum, the nonlinear transformation of image grey can be realized by using some nonlinear functions. The logarithmic transformation form is obtained as follows.(21)gx,y=a+lnfx,y+1b×lnc.a,b,c are adjustable parameters. The form of exponential transformation is (22)gx,y=bcfx,y−a−1.a,b,c are parameters for adjusting the position and shape of the curve. In this work, MATLAB programming and global linear transformation method are used to transform black-and-white graphics. Histogram transformation by grey normalization can make the image details clearer and enhance the image. There are two commonly used histogram transformation methods: equalization and regulation [23]. Histogram equalization is a method to enhance the image. Expanding the range of image grey distribution can enhance the image effect. The transformation equation is as follows.(23)sk=Trk=∑j=0kprrj=∑j=0knjnrk∈0,1,k=0,1,…,L−1.n refers to the total number of image pixels; L represents the number of grey levels; and nk is the kth grey level rk frequency, prrj=nk/n. Histogram specification is to transform the histogram into a specific shape and then selectively enhance the contrast of a certain section of grey value. The specific steps are as follows.(24)sk=Trk=∑j=0kprrj=∑j=0knjnui∈0,1,k=0,1,…,L−1,vl=Hui=∑i=0lpuuiui∈0,1,l=0,1,…,L−1.Finally, the commonly used histogram equalization method is used to process the histogram of grey image, which is compared with grey transformation.


### 2.5. MATLAB for Filtering and Denoising Preprocessing

In the digital image acquisition of the intelligent Hanfu design system, there will be a variety of noise interference in the acquisition process, which will affect the subsequent image processing effect. Therefore, it is very important to filter the noise in the image acquisition process. Noise is random. Statistical features are used to describe noise. Noise features include mean to describe noise, variance to describe noise, and mean square to represent noise.(25)Enx,y,Enx,y−Enx,y2,Enx,y2.Figure6 illustrates the common noise of image system.Figure 6
Classification diagram of common noise.In order to reduce the interference of image by noise, the following methods are generally used to filter noise: mean filter, median filter, adaptive filter, and wavelet transform [24]. The main method of mean filtering is the neighborhood average method, and the equation is as follows.(26)f¯m,n=19∑i=−11∑j=−11fm+i,n+j,f¯m,n=1M∑i,j∈Sfm,n=1M∑i,j∈Sgi,j+1M∑i,j∈Sni,j,D1M∑i,j∈Sni,j=1M2∑i,j∈SDni,j=1Mσ2,f is the additive noise, fm,n=gi,j+ni,j; g is image not polluted by noise; D is variance; and σ2 is the noise variance of the original image before neighborhood smoothing. Mean filtering has a good effect on suppressing noise, but the same mean filtering will make the image edge blurred. The mean filtering with the same weight does not make full use of the correlation such as the position of pixels. Median filter is a nonlinear processing method, and its basic principle is expressed as follows.(27)y=Medx1,x2,x3,…,xn=xin+12,12xn/2+xin/2+1,nfor odd numbers,nfor even numbers,yi=Medxi=Medxi−u,…,xi,…,xi+ui∈I,u=n−12,yij=MedAxij=Medxi+r,j+s,r,s∈A,i,j∈I2,Y represents the median value of sequence x1,x2,x3,…,xn; n refers to the window length; xi,i∈I is the input sequence; I represents the natural number set; and xi,i,j∈I2 refers to the grey value of each point of digital image. Median filter is a nonlinear filter. In terms of suppressing random noise, the performance of median filter is not as good as that of mean filter. Median filter is very effective in dealing with impulse interference and filtering out image salt-and-pepper noise. Adaptive filter is divided into nonlinear adaptive filter and linear adaptive filter. Wiener’s algorithm of classical linear filter can be used in MATLAB. When Wiener’s filter is used, the following equations are used.(28)u=1MN∑n1,n2∈ηan1,n2,σ2=1MN∑n1,n2∈ηa2n1,n2−u2,bn1,n2=u+σ2−v2σ2an1,n2−u,η is the neighbourhood of each pixel of the image; u refers to the mean value of image matrix; and v2 represents the variance of the whole image. Wiener’s filter is characterized by good noise filtering through the algorithm to enhance the image visual effect and overall quality. However, in some cases, such as low signal-to-noise ratio, the image restoration effect cannot meet the requirements. There is also a filtering algorithm based on partial differential equation. The denoising and solution of partial differential equation are as follows:(29)∂u∂t=Fux,y,t,∂u∂t=divc∇u∇u,uxi,j=ui,j−ui−1,j,uyi,j=ui,j−ui,j−1,∇ui,j=ux2i,j+uy2i,j,u0x,y=Ix,y,un+1x,y=f∇u|unx,yΔt+unx,y,ux,y,t is the solution of partial differential equation; F is the operator corresponding to a specific algorithm; ∇u is the gradient module; c∇u is the coefficient distribution function; and ∇ui,j is the gradient module. Partial differential equation has its own characteristics, and its algorithm is complex. It can improve the image signal-to-noise ratio and maintain the image edge information. Wavelet denoising can also be regarded as low-pass filtering, but the retention of image features is stronger than general low-pass filtering. Figure 7 illustrated the flow chart.Figure 7
Steps of wavelet denoising.The steps of wavelet denoising include decomposing the two-dimensional wavelet signal, selecting the threshold of high-frequency coefficient, and reconstructing the two-dimensional wavelet. The main feature is that the entropy is reduced after image transformation, and it can also well characterize the nonstationary characteristics of the signal.


### 2.6. Image Sharpening Preprocessing with MATLAB

For the grey processing of the image, after the filtering processing, the sharpening processing needs to be used to make the fuzzy contour clearer after the previous processing [25]. There are many methods for image sharpening preprocessing. In this work, in the gradient method, high-pass filtering method and mask matching method, MATLAB language is used to select the gradient method for image sharpening. The specific equation is as follows.(30)G⟶fx,y=∂f∂x∂f∂y,Gfx,y=∂f∂x2+∂f∂y2,Gfx,y=fi,j−fi+1,j2+fi,j−fi,j+12,Gfi,j=fi,j−fi+1,j+12fi+1,j−fi,j+1+2,Gfi,j≅fi,j−fi+1,j+1+fi+1,j−fi,j+1.Gx,y is the maximum change rate of fx,y. It can be observed that the time value is relatively small where the image changes slowly and large where the image contour changes rapidly. After image sharpening by gradient method, the image can become clearer.


## 2.1. Human Posture Analysis and Recognition of Intelligent Hanfu Design System

The human posture analysis and recognition of the intelligent Hanfu design system mainly uses the original sensor data collected at each inertial acquisition point to obtain human body-related data for Hanfu design [4]. The connection between multiple sensors is constrained, the data is transmitted and summarized by wireless module, and the attitude is reconstructed and displayed by inputting it into the host computer through Ethernet [5]. The system block diagram is illustrated in Figure 1.Figure 1
Frame diagram of posture analysis and recognition.The data acquisition of the intelligent Hanfu system is mainly carried out by the inertial sensor, and the nine-axis inertial sensor is set at the main joints of the human body by binding [6]. The structure of nine-axis inertial sensor is shown in Figure 2.(i)
Accelerometer. The acceleration of the carrier movement and the gravitational acceleration received at rest are measured by accelerometer [7]. The current work measures the acceleration of gravity by accelerometer and uses mathematical methods to calculate the pitch angle and yaw angle of the carrier at rest. However, the existing problem is that the dynamic performance of the accelerometer is poor, and the advantage of the accelerometer is that it can quickly and accurately measure the posture angle under static conditions.(ii)
Gyroscope. The angular velocity of the carrier moving around the body is measured by gyroscope [8]. In the current work, the performance degradation of acceleration sensor in high dynamic is made up by gyroscope. When the human body is moving, each joint is basically moving around the axis, and the gyroscope can measure the rotation posture information. However, the gyroscope itself has some problems, such as serious zero drift and angular wandering, which need to be corrected in combination with other sensors to improve the system performance.(iii)
Magnetometer. The direction and size of the Earth’s magnetic field are measured by magnetometer [9]. However, this tool has a drawback; the magnetic field environment of the object is interfered by the ferromagnetic substances. But the plus point of the said tool is that the measured value is stable without serious drift and random interference [10]. The sensor fusion algorithm in this work is to fuse the data of magnetometer and accelerometer and then measure the attitude angle of human body to correct the gyroscope.Figure 2
Frame diagram of nine-axis sensor.


## 2.2. Data Acquisition Preprocessing and Error Analysis of Intelligent Hanfu Design System

For the data acquisition of the intelligent Hanfu design system, due to the influence of external interference, the original data of the nine-axis sensor cannot be used directly, and the human body in motion is more complex [11]. Therefore, the accelerometer, gyroscope, and magnetometer must be preprocessed to calibrate the data [12]. Next, error analysis and data preprocessing are carried out for data collected by different sensors. The three-axis gyroscope sensor mainly collects angular velocity data, and the error is mainly uncertainty error and certainty error [13]. Figure 3 illustrated the details.Figure 3
Error classification framework.Deterministic error and uncertain error exist at the same time, in which uncertain error must exist. Under the same conditions, the characteristics of random error are also different. It is necessary to use mathematical theories and methods to explore the law of random error and determine the commonness of the law [14]. In this work, low-pass filtering and recursive average filtering are used to process gyroscope data, in which the recursive window is 20. The low-pass filter is used to eliminate the high-frequency noise in the signal. The Butterworth low-pass filter with a cut-off frequency of 20 Hz is designed by MATLAB toolbox FDATool. Recursive average filtering can well suppress periodic interference and has high smoothness. It is suitable for high-frequency oscillation system. The specific implementation steps are as follows: the average filtering recursive window is set to 20. The average value of the sampling data was calculated at the current time and the data at N − 1 sampling points, which is expressed in equation (1). The window returns to the previous step, the new sampled data is placed at the end, the first sampled value is removed, and then, the second step is repeated.(1)Xit=1NXi+Xi1+⋯+X0,i=N−1.The errors of the accelerometer in the measurement process include random error, proportional error, nonorthogonal error, and fixed deviation [15]. In the ideal case, the three axes of the accelerometer are completely orthogonal and do not interfere with each other. It is assumed that the three-axis output is ax,ay,az; the following equation was obtained.(2)ax2+ay2+az2=g2,where g represents the gravitational acceleration whose value is 9.8 m/s2. In practice, there are fixed error and proportional error, and the deterministic error is expressed as follows.(3)ax′ay′az′=ax0ay0az0+∅xKxyKxzKyx∅yKyzKzxKzy∅zaxayaz,where ax′ represents the actual output acceleration of accelerometer x-axis; ay″ represents the actual output acceleration of accelerometer y-axis; az′ represents the actual output acceleration of accelerometer z-axis; ∅x represents the scale coefficient of accelerometer x-axis; ∅y represents the scale coefficient of accelerometer y-axis; ∅z represents the scale coefficient of accelerometer z-axis; Kxy represents the interference coefficient between x-axis and y-axis caused by accelerometer installation error. When calibrating the deterministic error of accelerometer, the coefficient of accelerometer error model will be obtained and the acceleration value will be normalized.(4)ax1′=φx+Kxy,ay1′=φy+∅y,az1′=φz+Kzy,ax2′=φx+Kxz,ay2′=φy+Kyz,az2′=φz+∅z,ax3′=φx−∅x,ay3′=φy−Kyx,az3′=φz−Kzx,ax4′=φx−Kxy,ay4′=φy−∅y,az4′=φz−Kzy,ax5′=φx−Kxz,ay5′=φy−Kyz,az5′=φz−∅z,ax6′=φx+∅x,ay6′=φy+Kyx,az6′=φz+Kzx.By simple algebraic calculations and simplifications of above equations, the following equations are obtained.(5)φx=ax1′+ax2′+ax4′+ax5′4,φy=ay2′+ay3′+ay5′+ay6′4,φz=az1′+az3′+az4′+az6′4,(6)∅x=ax6′−ax3′2,∅y=ay1′−ay4′2,∅z=az2′−az5′2,∅x=ax6′−ax3′2,∅y=ay1′−ay4′2,∅z=az2′−az5′2,(7)Kxy=ax1′−ax4′2,Kxz=ax2′−ax5′2,Kyx=ay6′−ay3′2Kyz=ay2′−ay5′2,Kzx=az6′−az3′2,Kzy=az1′−az4′2.After the accelerometer is placed in the above way and the data is collected, the zero-position error and scale factor coefficient can be obtained. The installation error is expressed as(8)φx=−0.0153,φy=0.0413,φz=−0.0776,∅x=1.0053,∅x=1.0053,∅y=0.9996,Kxy=0.03015,Kxz=0.0057,Kyx=−0.11405,Kyz=0.0123,Kzx=0.0123,Kzy=0.0297.The deterministic error model is obtained as follows.(9)ax′ay′az′=−0.01530.0413−0.0776+1.00530.030150.0057−0.114050.99960.01230.01230.02971.01815axayaz.The random error of accelerometer is that impulse noise occasionally occurs when collecting acceleration under high dynamic conditions [16]. The adaptive median filter is used for processing. The adaptive median filter can suppress the impulse noise. The basic process is shown in(10)Zmed=ak,n∈1,3,5,…,2n+1,ak+ak+12,n2,4,6,…,2n,where n is sliding window size and ak means that the number in the middle after the data of the current sliding window is arranged from small to large. When the magnetometer is installed, the installation error will occur if the installation angle is different. The magnetic field strength of ferromagnetic materials is greater than that of geomagnetic field, which will cause great interference to the measurement of magnetometer, so the magnetometer must be calibrated [17]. The method of compensating hard iron distortion is to determine the offset of x-axis and y-axis of magnetometer axis and then apply it directly to the data. The hard iron correction is determined by rotating the sensor at least 360°, and the distance from (0, 0) to the center of the circle is determined by using the average of the maximum and minimum values of each axis. The following equation illustrates the details.(11)α=xmax+xmin2,β=ymax+ymin2,xmin represents the minimum value of x-axis of magnetometer actually measured; xmax means the maximum value of x-axis of magnetometer actually measured. ymax refers to the maximum value of y-axis of magnetometer actually measured; ymin is the minimum value of y-axis of magnetometer actually measured. α refers to the offset of the x-axis of the magnetometer; β represents the offset of the x-axis of the magnetometer. As long as the offset is subtracted from the original x and y magnetometer data, the hard iron distortion can be eliminated to some extent. The following equation was used to calculate the long-axis length r and short-axis length q of the magnetometer.(12)ν1=x1y1=rcosθsinθ,ν2=x2y2=r−sinθ−cosθ.After rotation, the major and minor axes of the ellipse are aligned and scaled with thex-axis and y-axis. The scale factor is expressed as(13)σ=qr.


## 2.3. Human Body Image Acquisition of Intelligent Hanfu System

The human body size data collected in the intelligent Hanfu design system needs to go through the following steps: image processing, contour extraction, feature point extraction, size measurement, and so on [18]. Therefore, as the first step of human body size measurement, the acquisition and preprocessing of human body image is very important. It is not only an important source of experimental data, but also the feedback data when using experimental comparison error for analysis [19]. In this work, to obtain the human body size accurately, the front and side images of the human body are used to obtain the relevant human body information. Figure 4 below illustrated the taken experimental human body images.Figure 4
Front, side, and back images of experimental human body.


## 2.4. MATLAB for Grey Normalization Preprocessing

MATLAB is a combination of matrix and laboratory, which means matrix factory (Matrix Laboratory). The software mainly faces the high-tech computing environment of scientific computing, visualization, and interactive programming [20]. It integrates many powerful functions such as numerical analysis, matrix calculation, scientific data visualization, and modelling and simulation of nonlinear dynamic systems into an easy-to-use window environment. It also provides a comprehensive solution for scientific research, engineering design, and many scientific fields that must carry out effective numerical calculation. Besides, to a great extent, it gets rid of the editing mode of traditional noninteractive programming languages (e.g., C and Fortran) [21]. MATLAB has the advantages of high programming efficiency and friendly interface. It has very powerful function and strong expansibility such as flexible and convenient graphic functions. Its software self-study is convenient. For the image processing of the front, side, and back of the human body, this work mainly uses the toolbox unit of MATLAB image processing.Firstly, the obtained colour image is greyed, and the Joint Photographic Experts Group (JPEG) colour image is converted to the Bitmap (BMP) grey image [22]. The principle of converting colour image into grey image is as follows.(14)RGBGrayscale=0.2990.5870.1140.2990.5870.1140.2990.5870.114∗RGBColour.The equation is simplified asY=0.299R+0.578G+0.114B. Y refers to grey value. In computer image processing, there are four methods to convert colour image into grey image. The component method is expressed as (15)f1x,y=Rx,y,f2x,y=Gx,y,f3x,y=Bx,y.f1x,yi=1,2,3: the grey value at x,y is obtained after grey image conversion. Maximum value method is used to get the following equations.(16)fx,y=maxRx,y,Gx,y,Bx,y,fx,y=minRx,y,Gx,y,Bx,y.The weighted average method was used and (17) can be obtained.(17)fx,y=iRx,y+jGx,y+kBx,y,i,j, and k are the coefficients of R, G, and B, respectively.When the average method is used, (18) can be obtained.(18)fx,y=Rx,y+Gx,y+Bx,y3.The average method is used for processing, and MATLAB is used to realize programming. Figure5 shows the final processing result.Figure 5
Grayscale contrast of colour image. (a) Front colour image before conversion and black and white image after conversion; (b) colour image before side conversion and black and white image after conversion; (c) colour image before back conversion and black-and-white image after conversion.
(a)(b)(c)The converted black-and-white image needs image preprocessing. The digital image processing algorithm is used to properly process the image, highlight the effective information, remove the invalid information, and then improve the image quality. It includes three aspects: grey normalization, noise filtering, and image sharpening. Grey normalization mainly carries out grey change and histogram transformation on the original image, analyses the similarities and differences between the two cases, and makes appropriate selection. Grey scale transformation includes linear transformation and nonlinear transformation. The global linear transformation of linear transformation is expressed as (19). The maximum value of F (x, y) is obtained.(19)gx,y=c,0≤fx,y<a,gx,y=d−cb−a×fx,y+c,a≤fx,y<b,gx,y=d,b≤fx,y<Mf.The commonly used three segment linear transformations are expressed as follows.(20)gx,y=cb×fx,y,0≤fx,y<a,gx,y=d−cb−a×fx,y−a+c,a≤fx,y<b,gx,y=Mg−dMf−b×fx,y−b+d,b≤fx,y<Mf.WhenMg: and Mf: fx,y are the maximum, the nonlinear transformation of image grey can be realized by using some nonlinear functions. The logarithmic transformation form is obtained as follows.(21)gx,y=a+lnfx,y+1b×lnc.a,b,c are adjustable parameters. The form of exponential transformation is (22)gx,y=bcfx,y−a−1.a,b,c are parameters for adjusting the position and shape of the curve. In this work, MATLAB programming and global linear transformation method are used to transform black-and-white graphics. Histogram transformation by grey normalization can make the image details clearer and enhance the image. There are two commonly used histogram transformation methods: equalization and regulation [23]. Histogram equalization is a method to enhance the image. Expanding the range of image grey distribution can enhance the image effect. The transformation equation is as follows.(23)sk=Trk=∑j=0kprrj=∑j=0knjnrk∈0,1,k=0,1,…,L−1.n refers to the total number of image pixels; L represents the number of grey levels; and nk is the kth grey level rk frequency, prrj=nk/n. Histogram specification is to transform the histogram into a specific shape and then selectively enhance the contrast of a certain section of grey value. The specific steps are as follows.(24)sk=Trk=∑j=0kprrj=∑j=0knjnui∈0,1,k=0,1,…,L−1,vl=Hui=∑i=0lpuuiui∈0,1,l=0,1,…,L−1.Finally, the commonly used histogram equalization method is used to process the histogram of grey image, which is compared with grey transformation.


## 2.5. MATLAB for Filtering and Denoising Preprocessing

In the digital image acquisition of the intelligent Hanfu design system, there will be a variety of noise interference in the acquisition process, which will affect the subsequent image processing effect. Therefore, it is very important to filter the noise in the image acquisition process. Noise is random. Statistical features are used to describe noise. Noise features include mean to describe noise, variance to describe noise, and mean square to represent noise.(25)Enx,y,Enx,y−Enx,y2,Enx,y2.Figure6 illustrates the common noise of image system.Figure 6
Classification diagram of common noise.In order to reduce the interference of image by noise, the following methods are generally used to filter noise: mean filter, median filter, adaptive filter, and wavelet transform [24]. The main method of mean filtering is the neighborhood average method, and the equation is as follows.(26)f¯m,n=19∑i=−11∑j=−11fm+i,n+j,f¯m,n=1M∑i,j∈Sfm,n=1M∑i,j∈Sgi,j+1M∑i,j∈Sni,j,D1M∑i,j∈Sni,j=1M2∑i,j∈SDni,j=1Mσ2,f is the additive noise, fm,n=gi,j+ni,j; g is image not polluted by noise; D is variance; and σ2 is the noise variance of the original image before neighborhood smoothing. Mean filtering has a good effect on suppressing noise, but the same mean filtering will make the image edge blurred. The mean filtering with the same weight does not make full use of the correlation such as the position of pixels. Median filter is a nonlinear processing method, and its basic principle is expressed as follows.(27)y=Medx1,x2,x3,…,xn=xin+12,12xn/2+xin/2+1,nfor odd numbers,nfor even numbers,yi=Medxi=Medxi−u,…,xi,…,xi+ui∈I,u=n−12,yij=MedAxij=Medxi+r,j+s,r,s∈A,i,j∈I2,Y represents the median value of sequence x1,x2,x3,…,xn; n refers to the window length; xi,i∈I is the input sequence; I represents the natural number set; and xi,i,j∈I2 refers to the grey value of each point of digital image. Median filter is a nonlinear filter. In terms of suppressing random noise, the performance of median filter is not as good as that of mean filter. Median filter is very effective in dealing with impulse interference and filtering out image salt-and-pepper noise. Adaptive filter is divided into nonlinear adaptive filter and linear adaptive filter. Wiener’s algorithm of classical linear filter can be used in MATLAB. When Wiener’s filter is used, the following equations are used.(28)u=1MN∑n1,n2∈ηan1,n2,σ2=1MN∑n1,n2∈ηa2n1,n2−u2,bn1,n2=u+σ2−v2σ2an1,n2−u,η is the neighbourhood of each pixel of the image; u refers to the mean value of image matrix; and v2 represents the variance of the whole image. Wiener’s filter is characterized by good noise filtering through the algorithm to enhance the image visual effect and overall quality. However, in some cases, such as low signal-to-noise ratio, the image restoration effect cannot meet the requirements. There is also a filtering algorithm based on partial differential equation. The denoising and solution of partial differential equation are as follows:(29)∂u∂t=Fux,y,t,∂u∂t=divc∇u∇u,uxi,j=ui,j−ui−1,j,uyi,j=ui,j−ui,j−1,∇ui,j=ux2i,j+uy2i,j,u0x,y=Ix,y,un+1x,y=f∇u|unx,yΔt+unx,y,ux,y,t is the solution of partial differential equation; F is the operator corresponding to a specific algorithm; ∇u is the gradient module; c∇u is the coefficient distribution function; and ∇ui,j is the gradient module. Partial differential equation has its own characteristics, and its algorithm is complex. It can improve the image signal-to-noise ratio and maintain the image edge information. Wavelet denoising can also be regarded as low-pass filtering, but the retention of image features is stronger than general low-pass filtering. Figure 7 illustrated the flow chart.Figure 7
Steps of wavelet denoising.The steps of wavelet denoising include decomposing the two-dimensional wavelet signal, selecting the threshold of high-frequency coefficient, and reconstructing the two-dimensional wavelet. The main feature is that the entropy is reduced after image transformation, and it can also well characterize the nonstationary characteristics of the signal.


## 2.6. Image Sharpening Preprocessing with MATLAB

For the grey processing of the image, after the filtering processing, the sharpening processing needs to be used to make the fuzzy contour clearer after the previous processing [25]. There are many methods for image sharpening preprocessing. In this work, in the gradient method, high-pass filtering method and mask matching method, MATLAB language is used to select the gradient method for image sharpening. The specific equation is as follows.(30)G⟶fx,y=∂f∂x∂f∂y,Gfx,y=∂f∂x2+∂f∂y2,Gfx,y=fi,j−fi+1,j2+fi,j−fi,j+12,Gfi,j=fi,j−fi+1,j+12fi+1,j−fi,j+1+2,Gfi,j≅fi,j−fi+1,j+1+fi+1,j−fi,j+1.Gx,y is the maximum change rate of fx,y. It can be observed that the time value is relatively small where the image changes slowly and large where the image contour changes rapidly. After image sharpening by gradient method, the image can become clearer.


## 3. Results and Discussion

### 3.1. Verification of Experimental Results of Data Acquisition and Preprocessing of Intelligent Hanfu Design System

For the intelligent Hanfu design system, Figure8 indicates that the low-pass filtering and recursive average filtering are carried out for the sensor and gyroscope data.Figure 8
Comparison diagram before and after gyro mean filter processing.Figure8 reveals the image of gyroscope data after low-pass filtering and recursive average filtering. It is obviously found that the image burr formed by gyroscope data is reduced and the smoothness of data is better than that before processing. For subsequent processing using the algorithm, the accuracy of the algorithm can be improved. For accelerometer error calibration, the deceleration sensor is put horizontally and still on the horizontal desktop, and it is calibrated by six-position calibration method. Figure 9 shows the comparison diagram before and after calibration.Figure 9
Comparison diagram of accelerometer signal before and after calibration. (a) Comparison diagram of accelerometerx-axis signal calibration; (b) comparison diagram of accelerometer y-axis signal calibration; (c) comparison diagram of accelerometer z-axis signal calibration.
(a)(b)(c)Figure9 suggests that after the accelerometer data is calibrated by the calibration method, the acceleration data has changed obviously, and the data becomes more stable compared with the data before processing. In the static state, the data of x-axis, y-axis is about 0 g and the data of z-axis is about 1 g. The error is well eliminated and closer to the real value. Figure 10 shows the magnetic field intensity before and after magnetometer calibration.Figure 10
Error classification frame diagram. (a)x-y-z triaxial magnetic field intensity curve before magnetometer calibration; (b) x-y-z triaxial magnetic field intensity curve after magnetometer calibration; (c) magnetic field intensity in xy-plane before magnetometer calibration; (d) magnetic field intensity in xy-plane after magnetometer calibration.
(a)(b)(c)(d)Figure10 indicates clearly that the transformation curve of y-axis relative to x-axis of magnetometer deviates seriously before processing with soft iron algorithm and hard iron algorithm. Besides, after the soft iron algorithm and hard iron algorithm are processed, the center of the plane magnetic field intensity graph drawn by the magnetometer is basically (0, 0), which proves the effectiveness and correctness of the calibration algorithm.


### 3.2. Comparative Analysis of Experimental Results of Grey Image Preprocessing Programmed by MATLAB

In this work, MATLAB programming and global linear transformation method are used to transform the grey level of the processed black-and-white graphics in the intelligent Hanfu design system. The front, side, and back image processing results before and after grey transformation are illustrated in Figure11.Figure 11
Error classification frame diagram. (a) Contrast image of front image before and after grey processing; (b) contrast image of side image before and after grey processing; (c) contrast image of back image before and after grey processing.
(a)(b)(c)Figure11 gives the comparison of the experimental results of the front, side, and back before and after grey-scale transformation. The processed black-and-white image is significantly better than the preprocessing black-and-white image. It is found that the contrast is enhanced, the background brightness is significantly higher than the brightness of the human body, the contour and shape of the human body are more obvious, and it is easier to process the image by the following algorithm. The front, side, and back of the human body are processed by MATLAB programming and histogram equalization method (Figure 12).Figure 12
Error classification frame diagram. (a) Comparison of front image before and after equalization; (b) comparison of statistics before and after frontal image equalization; (c) comparison of side image before and after equalization; (d) comparison of statistical charts before and after equalization of side images; (e) contrast before and after equalization of back image; (f) comparison of statistical figures before and after back image equalization.
(a)(b)(c)(d)(e)(f)Figure12 illustrates that the image after equalization is stronger in contrast than the image before processing, and the dynamic range of pixel grey value is wider. Grey transformation and histogram transformation, through the comparison of the front, side, and back images of the human body, the processed images generally have enhanced image contrast, which makes the human body image more obvious in the background. However, the images processed by histogram equalization are prone to local overbrightness, pseudocontour, and other shortcomings. Therefore, grey transformation is a more suitable image enhancement algorithm. MATLAB programming language is used to add noise after grey processing and then filter and denoise (Figure 13).Figure 13
Comparison effect of images processed by different filters. (a) The results of mean filtering with salt and pepper noise are presented; (b) the result of Gaussian noise image is processed by mean filtering; (c) the results of median filter processing image with salt-and-pepper noise; (d) median filter is used to process images with Gaussian noise; (e) Wiener’s filtering adds salt-and-pepper noise to the image results; (f) Wiener’s filter processing adds Gaussian noise to the image results; (g) wavelet denoising adds salt-and-pepper noise to the image results; (h) wavelet denoising adds Gaussian noise to the image results.
(a)(b)(c)(d)(e)(f)(g)(h)Figure13 reveals that after adding Gaussian noise to the images collected in the intelligent Hanfu design system, the noise in the image is significantly more than that of adding salt-and-pepper noise. For the image with Gaussian noise and salt-and-pepper noise, the denoising effect of median filter is compared with that of mean filter. It is found that the denoising effect of median filter is better, the processed image is clearer, and the effect of salt-and-pepper noise is better than that of Gaussian noise. However, median filter and mean filter will have defects in the edge contour after processing, which are not suitable for image denoising with more edge details. Compared with other methods, Wiener’s adaptive filter has the worst effect in dealing with the two kinds of noise, but the noise increases, so it is not practical. The last wavelet denoising performs well in dealing with two different noises. Compared with median filter and mean filter, wavelet denoising is better. Also, the processed image edge is clearer and flawless, which is the best filtering method compared with all filtering methods. To summarize the experimental comparison of the advantages and disadvantages of different methods, it is verified that MATLAB programming is more suitable for grey normalization than histogram equalization, and local brightness will appear in histogram equalization. After denoising the image with salt-and-pepper noise and Gaussian noise, the median filter and mean filter have defects. Wiener’s adaptive filter leads to the increase of noise, and wavelet denoising has the best effect. The data acquisition system of intelligent Hanfu design established in this work provides a certain direction for the development of intelligent Hanfu design.


## 3.1. Verification of Experimental Results of Data Acquisition and Preprocessing of Intelligent Hanfu Design System

For the intelligent Hanfu design system, Figure8 indicates that the low-pass filtering and recursive average filtering are carried out for the sensor and gyroscope data.Figure 8
Comparison diagram before and after gyro mean filter processing.Figure8 reveals the image of gyroscope data after low-pass filtering and recursive average filtering. It is obviously found that the image burr formed by gyroscope data is reduced and the smoothness of data is better than that before processing. For subsequent processing using the algorithm, the accuracy of the algorithm can be improved. For accelerometer error calibration, the deceleration sensor is put horizontally and still on the horizontal desktop, and it is calibrated by six-position calibration method. Figure 9 shows the comparison diagram before and after calibration.Figure 9
Comparison diagram of accelerometer signal before and after calibration. (a) Comparison diagram of accelerometerx-axis signal calibration; (b) comparison diagram of accelerometer y-axis signal calibration; (c) comparison diagram of accelerometer z-axis signal calibration.
(a)(b)(c)Figure9 suggests that after the accelerometer data is calibrated by the calibration method, the acceleration data has changed obviously, and the data becomes more stable compared with the data before processing. In the static state, the data of x-axis, y-axis is about 0 g and the data of z-axis is about 1 g. The error is well eliminated and closer to the real value. Figure 10 shows the magnetic field intensity before and after magnetometer calibration.Figure 10
Error classification frame diagram. (a)x-y-z triaxial magnetic field intensity curve before magnetometer calibration; (b) x-y-z triaxial magnetic field intensity curve after magnetometer calibration; (c) magnetic field intensity in xy-plane before magnetometer calibration; (d) magnetic field intensity in xy-plane after magnetometer calibration.
(a)(b)(c)(d)Figure10 indicates clearly that the transformation curve of y-axis relative to x-axis of magnetometer deviates seriously before processing with soft iron algorithm and hard iron algorithm. Besides, after the soft iron algorithm and hard iron algorithm are processed, the center of the plane magnetic field intensity graph drawn by the magnetometer is basically (0, 0), which proves the effectiveness and correctness of the calibration algorithm.


## 3.2. Comparative Analysis of Experimental Results of Grey Image Preprocessing Programmed by MATLAB

In this work, MATLAB programming and global linear transformation method are used to transform the grey level of the processed black-and-white graphics in the intelligent Hanfu design system. The front, side, and back image processing results before and after grey transformation are illustrated in Figure11.Figure 11
Error classification frame diagram. (a) Contrast image of front image before and after grey processing; (b) contrast image of side image before and after grey processing; (c) contrast image of back image before and after grey processing.
(a)(b)(c)Figure11 gives the comparison of the experimental results of the front, side, and back before and after grey-scale transformation. The processed black-and-white image is significantly better than the preprocessing black-and-white image. It is found that the contrast is enhanced, the background brightness is significantly higher than the brightness of the human body, the contour and shape of the human body are more obvious, and it is easier to process the image by the following algorithm. The front, side, and back of the human body are processed by MATLAB programming and histogram equalization method (Figure 12).Figure 12
Error classification frame diagram. (a) Comparison of front image before and after equalization; (b) comparison of statistics before and after frontal image equalization; (c) comparison of side image before and after equalization; (d) comparison of statistical charts before and after equalization of side images; (e) contrast before and after equalization of back image; (f) comparison of statistical figures before and after back image equalization.
(a)(b)(c)(d)(e)(f)Figure12 illustrates that the image after equalization is stronger in contrast than the image before processing, and the dynamic range of pixel grey value is wider. Grey transformation and histogram transformation, through the comparison of the front, side, and back images of the human body, the processed images generally have enhanced image contrast, which makes the human body image more obvious in the background. However, the images processed by histogram equalization are prone to local overbrightness, pseudocontour, and other shortcomings. Therefore, grey transformation is a more suitable image enhancement algorithm. MATLAB programming language is used to add noise after grey processing and then filter and denoise (Figure 13).Figure 13
Comparison effect of images processed by different filters. (a) The results of mean filtering with salt and pepper noise are presented; (b) the result of Gaussian noise image is processed by mean filtering; (c) the results of median filter processing image with salt-and-pepper noise; (d) median filter is used to process images with Gaussian noise; (e) Wiener’s filtering adds salt-and-pepper noise to the image results; (f) Wiener’s filter processing adds Gaussian noise to the image results; (g) wavelet denoising adds salt-and-pepper noise to the image results; (h) wavelet denoising adds Gaussian noise to the image results.
(a)(b)(c)(d)(e)(f)(g)(h)Figure13 reveals that after adding Gaussian noise to the images collected in the intelligent Hanfu design system, the noise in the image is significantly more than that of adding salt-and-pepper noise. For the image with Gaussian noise and salt-and-pepper noise, the denoising effect of median filter is compared with that of mean filter. It is found that the denoising effect of median filter is better, the processed image is clearer, and the effect of salt-and-pepper noise is better than that of Gaussian noise. However, median filter and mean filter will have defects in the edge contour after processing, which are not suitable for image denoising with more edge details. Compared with other methods, Wiener’s adaptive filter has the worst effect in dealing with the two kinds of noise, but the noise increases, so it is not practical. The last wavelet denoising performs well in dealing with two different noises. Compared with median filter and mean filter, wavelet denoising is better. Also, the processed image edge is clearer and flawless, which is the best filtering method compared with all filtering methods. To summarize the experimental comparison of the advantages and disadvantages of different methods, it is verified that MATLAB programming is more suitable for grey normalization than histogram equalization, and local brightness will appear in histogram equalization. After denoising the image with salt-and-pepper noise and Gaussian noise, the median filter and mean filter have defects. Wiener’s adaptive filter leads to the increase of noise, and wavelet denoising has the best effect. The data acquisition system of intelligent Hanfu design established in this work provides a certain direction for the development of intelligent Hanfu design.


## 4. Conclusions

The central theme of this research was the field of human body size measurement and human model reconstruction. To this end, we designed an intelligent Hanfu data acquisition system based on scientific graphics programming and wearable multisensor. It was found that the processed data improves the data accuracy of the acquisition system. Additionally, MATLAB programming was used for grey normalization on the collected images. The results directed that the grey transformation is more suitable than histogram equalization, and local brightness will appear in histogram equalization. After denoising the image with salt-and-pepper noise and Gaussian noise, the median filter and mean filter have defects. Wiener’s adaptive filter leads to the increase of noise, and wavelet denoising has the best effect. This system provided a good reference in the field of human body data acquisition, but the inertial sensor was bound to the human body, and there will be more errors in the process of movement. There are still more ideal and convenient algorithms for the collected images in terms of computer algorithms. Subsequent research will continue to explore these aspects.



---

*Source: 2474047-2022-04-15.xml*