Virtual Design Method of Customized Clothing Based on Three-Dimensional Image

Because the traditional virtual design \method of customized clothing has the problems of poor matching between the designed clothing and the user’s body shape and long design time, a virtual design method of customized clothing based on a threedimensional image is proposed. rough the way of camera imaging, the three-dimensional human model is established by the linear regression method, and the three-dimensional point cloud image of the human body is obtained. e three-dimensional human key points are extracted by shoulder point extraction, neck point extraction, elbow point extraction, and crotch bottom point extraction. According to the key point extraction results, the customized clothing is registered with the three-dimensional human model. e simulation results show that the proposed method has good matching with the user’s body shape and short design time.


Introduction
"Clothing, food, housing, and transportation" comes rst. Clothing, as the "second layer of human skin," presents the personality and needs of di erent people and has more diversi ed forms in today's era. Technology often promotes the development of the garment industry. With the development of the Internet, social media, and web media, clothing is showing a diversi ed trend in aesthetics and selection. As the country began to gradually deepen the "supply-side" structural reform, the disadvantages of the traditional garment industry are also constantly exposed. Heavy pollution, labor-intensive, overcapacity, inventory backlog, poor quality, old style, and other problems have become chronic poisons restricting the traditional garment industry [1]. With the national attention and construction of cultural development in recent years, more extensive and intuitive display of cultural works has become a new demand of the society. In this context, the garment industry has also updated and upgraded the design, production, and sales modes and methods from di erent directions. In terms of design, the traditional fashion design cooperates in the design and development of clothing through the designer drawing the clothing e ect drawing and style drawing, the platemaker drawing the plate type, and the sample clothes made by the sample clothes maker [2]. Due to the communication errors and technical limitations among the links, this model often needs to undergo two or three sample clothing corrections, which requires high human, material, and time costs. erefore, more and more companies have begun to adopt modular design and the construction of clothing-style libraries. rough the separation of garment parts and patterns and the reuse of garment styles, we can speed up the garment design and development and reduce the cost. In terms of production, most advanced customized brands have di culties with revenue, while modern garment factories are also facing many problems, such as meager pro ts, tight capital chain, and shortage of manpower. With the mature application of new technologies such as image recognition technology, integrated weaving technology, and intelligent storage technology, the degree of intelligence of new garment factories is becoming higher and higher, and there is a flexible customization mode different from the mass assembly line production of traditional garment factories to support the rapid production of small batches of clothing. In terms of sales, with the vigorous development of e-commerce, the sales of offline clothing stores have been affected. However, online sales also face the problems of insufficient traffic, high return rate, and low profit margin. In this context, the operating cost of clothing brands has become high, and the living space of new clothing brands has become increasingly narrow, which further promotes the trend of clothing homogenization in disguise. Nowadays, clothing brands pay more and more attention to community operation and online marketing [3], expand brand awareness, and stabilize brand audience through the influence of social networks such as microblog and Xiaohongshu, through live broadcast, microfilm, and other video media to display brand clothing and brand tonality in an all-round interactive way.
On the contrary, clothing brands in some segments show vigorous vitality. In recent years, the vigorous development of the Hanfu industry and China's local Gaoding brand is the best example [4]. ere are many reasons for the success of these brands, but their commonness is that they are oriented to the market segments with customization demand, small production volume, high price, and stable and growing audience. With the global epidemic, the domestic luxury industry is becoming more and more popular. e show venues of many colleges and brands have moved to the "cloud." Abandoning models and "unmanned" show venues with intensive contact has become one of the most popular show concepts in 2020. is also reflects that the demand for chasing fashion and high-end consumption has not decreased significantly, but the digitization of the fashion industry needs to be realized urgently. In this situation, people have an unprecedented demand for digital fitting and digital dynamic display of customized clothing [5].
Reference [6] proposes a design method of personalized virtual clothing display system based on clothing adaptive deformation. Firstly, a 3D human body reconstruction framework based on human body shape parameters is established, and then, the relationship between human model vertices and 3D clothing vertices is established by using a hybrid skin algorithm. Finally, the dual quaternion is interpolated to realize human body deformation, drive clothing deformation, and complete clothing adaptive adjustment. A virtual clothing display system for advanced customization is developed based on unity platform to test the application effect of relevant algorithms [7] and puts forward the virtual design method of customized clothing based on clo3d virtual fitting. Taking customer customized clothing as an example, this paper uses garment professional CAD platemaking design and discusses the feasibility of virtual fitting in garment private customization through clo3d virtual fitting software. However, the virtual design of customized clothing by the above two methods has a low degree of matching with the user's body shape [8] and puts forward the interactive design method of men's shirt personalized customization system based on the virtual display. MATLAB is selected as the design and development platform. Based on the comprehensive analysis of the constituent elements of men's shirt style, the database information meeting the system requirements is created, and the system is divided into five module areas: parameter setting area, genetic algorithm area, style scoring area, database, and virtual display area so as to realize the system function. Users can use various functions of the system to realize the independent design and scoring of men's shirt style. At the same time, the system uses a genetic algorithm to interactively calculate the user's score to obtain the men's shirt style with the highest user satisfaction and visually and vividly display the ready-made effect of men's shirt to users through the virtual display function of the system. us, the participation of users in the whole process of personalized customization and virtual display is greatly improved and guaranteed [9] and proposes an interactive virtual garment design method based on the Internet platform. e user logs in to the system through the user layer. e display layer of the system uses three-dimensional scanning technology to scan the user's head, trunk, and other information to obtain human body data. e collected human body data are projected to obtain the human body contour. e interpolation algorithm is selected to denoise the obtained human contour. Finally, the feature points of human contour are extracted by corner detection method. e final contour line is obtained by using the final feature points, and the three-dimensional human body data file is generated and transmitted to the interface layer. e interface layer designs the clothing through style design, adding color, and pattern; adaptively adjusts the clothing pieces by using the global optimization method to realize the clothing design; and tries the designed clothing through the virtual fitting module until it meets the needs of users. However, the above two methods take a long time to carry out customized clothing virtual design, resulting in low design efficiency.
In view of the problems existing in the above methods, this paper proposes a virtual design method of customized clothing based on three-dimensional images and verifies through simulation experiments that this method can quickly and accurately design customized clothing and provide a new reference model for clothing-related industries.

Virtual Design Method of Customized
Clothing Based on Three-Dimensional Image

Construction of 3D Human Model Based on Linear
Regression. In the process of image measurement and the application of machine vision, in order to determine the relationship between the three-dimensional position of spatial points and their corresponding points in the image, it is necessary to establish the three-dimensional human body model imaged by the camera, obtain the three-dimensional human body data, and solve the camera parameters relative to the three-dimensional human body model, that is, the simplification of the optical imaging process [10]. e classical lens imaging model is shown in Figure 1.
According to the lens FOSS imaging theory, the lens, m OA ′ is the image distance, and n OA is the object distance. Generally, n ≈ f can be approximated as m ≈ f. At this time, the lens imaging model can be approximated as a small hole imaging model.
In the classical small hole imaging model, the imaging plane is located at the rear end of the projection center, as shown in Figure 2, which is called the back projection model. In this model, the projection center is equivalent to the lens center, and the straight line passing through the projection center and perpendicular to the image plane is called the optical axis. Corresponding to the back projection model, when the image plane is located at the front end of the projection center, it is called the front projection model [11].
oxyz is the camera rectangular coordinate system, which follows the right-hand rule, in which the origin o is located in the projection center, the Z axis and the optical axis are recombined and point to the scene, the x axis and y axis are, respectively, with the coordinate axes x′ and y ′ of the image plane, and the distance between the x, y plane and the image plane is the camera focal length f. e imaging process of the camera is the process of transforming a space point P(x, y, z) to a pixel point p(u, v) on the image through perspective projection, that is, a point in three-dimensional space is projected onto the two-dimensional plane of the camera, which can be represented by a mapping from three-dimensional space to two-dimensional space: (1) Namely, Linear regression is a statistical analysis method that uses regression analysis in mathematical statistics to determine the interdependent quantitative relationship between two or more variables. It is widely used. According to the above lens imaging principle, there is a linear relationship between human shape semantics and 3D model space. erefore, this paper uses the linear regression method to establish the mapping relationship between human shape semantic parameters and 3D model space. e semantic parameters are shown in Table 1, including six main body shape data such as height and weight [12]. e basic information parameters can be read directly from the manikin database. For the carefully adjusted parameters, the cross-sectional curve convex hull measurement method is used to measure the human chest circumference, waist circumference, and hip circumference. Jarvis March algorithm is used to construct cross-sectional convex hull. Assuming that a human model has l semantic parameters, the semantic parameter matrix of m human models can be expressed as Principal component analysis (PCA) method was used to establish human low-dimensional parameter space based on the MPI human model. It is known that each human body in the MPI model has the same topology, which is represented by H i . Each human body mesh has n vertices. For m human body mesh models with constant connectivity, it can be expressed as a matrix.
where g i is a vector of 3n * 1 composed of n vertex coordinates of mesh model H i . Note that the human body of the template is en, the sample matrix G can be obtained where G describes the vertex o set of each instance mesh relative to the template mesh to represent the shape change [13]. Decompose the singular value of the left singular matrix C G(G) T of G to obtain the eigenvector y i of matrix C. e human body shape space can be projected into a new space constructed by the largest k eigenvectors, namely, where q i is the weight in k-dimensional space and y T j is the normalized eigenvector. e mapping relationship between human semantic parameter p i and human shape space q i is

Mobile Information Systems
established by the linear regression method. e mapping relationship between human semantic parameters and human shape space is established by the linear regression method, and the three-dimensional point cloud image of the human body is obtained as shown in Figure 3 and formula.
where T is the correlation matrix and μ is the corresponding residual, which is solved by the least square method [14].

Shoulder Point Extraction.
Shoulder landmark is one of the most important key points in anthropometry. It involves the measurement of important dimensions such as shoulder width and arm length. Most of the previous methods are to project the three-dimensional human body to the two-dimensional plane and then use the geometric method to extract the shoulder points from the projected contour curve or image mask. However, such methods have high requirements for projection angle, and projection dimensionality reduction will inevitably lead to irreversible information loss [15]. ere are also methods to locate the shoulder point by analyzing the curve gradient and then defining the change limit point, but for the common "shoulder slip" phenomenon, the gradient change of the curve is not obvious. According to the threedimensional human model, this paper looks for the shoulder point. Taking the left shoulder as an example, the extraction steps of shoulder points are described in detail. Except for the direction, the right shoulder points are the same [16].
Step 1: p UT−LUA estimate the joint.
Step 2: make rays upward (+y) and left (+x), respectively, at p UT−LUA and mark the intersection with the human body as p top and p left . p UT−LUA , p top , and p left must be in the same plane. Note that p top is not necessarily located on the projection curve of the human body. For ease of expression, the curve of the intersection between the coronal plane where p top is located and the human body is drawn here as shown in the black curve in Figure 4.
Step 4: use k-NN to search the vertex closest to p inter , that is, the left shoulder point p L−Acromion . In this step, KD tree can be used to accelerate the search [10].

Neck Point Extraction.
Neck landmark actually contains four key points, two lateral neck points, one anterior neck point, and one cervical point. In this paper, two lateral cervical points are extracted by using the obtained shoulder points, and then, the anterior cervical point and cervical point are extracted [17]. Taking the left cervical point as an example, the specific steps are as follows: Step 1: define the coronal plane α parallel to X-Y at the left shoulder point to cut the human body to obtain the black section contour curve as shown in Figure 5, in which the dotted line represents the invisible part of the curve in the front view.
Step 2: find the point p max with the largest x value in the profile curve of S Head and discretize the line segment l p max −p L−Acromion composed of p max and left shoulder point p L−Acromion , i.e., l p max −p L−Acromion � p 0 , p 1 , ..., p n .
Step 3: in plane α, project l p max −p L−Acromion to the human body in a direction perpendicular to itself, and the intersection between the largest distance and the human body is the left cervical point p L−Neck . e right cervical point is the same except for the direction [18]. It can also be extracted by taking p L−Acromion as the  origin and making ray intersection in the direction of X.
After extracting the cervical points on both sides, based on the statistical results of anthropometry, cut the cross section after rotating 20°around the X axis at the side shoulder point to obtain the cervical root line, as shown in the black line segment in Figure 6, in which the points with the largest and smallest z values are anterior cervical point p F−Neck and cervical point p B−Neck [19].

Elbow Point Extraction.
Elbow landmark is very important for some functional clothing. Compared with other key points, it is more di cult to extract elbow landmark. First of all, the elbow has no obvious characteristics when the arm is straight; secondly, for the case of arm bending, the high degree of freedom of elbow and arm makes it very di cult to extract elbow points by the pure geometric method [20]. is method is inspired by a medical study that points out that there is a linear relationship between human height and upper arm length. However, due to di erent research elds, the study did not specify its measurement method [21]. erefore, the Euclidean distance of the upper arm of 378 three-dimensional mannequins was measured manually, including 200 human bodies evenly sampled by height from the spring data set and 178 human bodies scanned by the research group, including 193 males and 185 females. A linear model is established based on the Euclidean distance and human body height, in which the height is approximate to the height of the standing human body bounding box.
Step 1: approximate the height h with the height of the bounding box of the three-dimensional manikin and predict the Euclidean length D LUA of the upper arm according to the linear model.
Step 2: estimate the direction of the upper arm with the bones extracted by segmentation.
where p UT−LUA represents the shoulder joint on the bone and p LUA−LFA represents the elbow joint estimated according to the bone as shown in Figure 7.
Step 3: according to d LUA , a plane α LUA can be de ned that is perpendicular to d LUA and passes through the shoulder point p L−Acromion . Move the plane α LUA in the d LUA direction by a distance D LUA [22].
Step 4: cut the arm mesh at the current position of the plane α LUA to obtain the ring tangent point set P cutting . For the convenience of measurement, this paper takes the outermost vertex in P cutting as the elbow point p L−Elbow .

Crotch Bottom Point Extraction.
e Crotch Landmark is also called the perineal point. e circumcision method is a common method for extracting the crotch bottom point from the three-dimensional human body. It determines the crotch bottom position by detecting the change in the number of loops produced by each cutting. However, circumcision cannot handle the crotch bottom adhesion that often exists in scanning as shown in Figure 8(a). In this paper, based on the extracted bones from segmentation, a simple and e ective crotch bottom point extraction method is proposed, which can be used to make up for the shortcomings of the circumcision method [23]. Speci c steps are as follows: Step 1: take the joint point p UT−BT at S UT and S BT extracted from the segmentation as the origin, and take the direction d crotch as the ray, as shown by the dotted rough extensive experiments, we set to −0.02, which satis es all human bodies after preprocessing.
Step 2: the rst intersection of the ray and the human mesh is approximated as the crotch bottom point d crotch [24].

Registration of Custom Clothing and 3D Human Model.
In order to avoid or reduce the penetration phenomenon, not only the minimum distance objective function but also constraints such as characteristic curves and triangular constraints need to be considered. Both mannequins and custom garments have characteristic curves and girth indicators such as bust, waist, and hip. To improve the registration accuracy, rst set the characteristic curve constraints: (1) e feature size value of the human body and customized clothing is >0 (verify whether the clothing is upper body clothing, lower body clothing, or fullbody clothing) (2) e circumference size of customized clothing-the circumference size of the human body > a given positive number q(q > 0).
If condition (2) is not met, perform the scaling transformation of the a ne transformation on the clothing and enlarge the size of the clothing model until condition (2) is met.
After the above conditions are met, in order to improve the matching accuracy and reduce the interference of multiple corresponding regions, three point sets are further selected as the triangular constraint conditions in the above curvature feature point set: (1) Constraints on the angle between the normals: (2) Distance constraints: In the formula, ang(b), dist(b) represents the included angle and mutual distance between the selected feature point b 1 , b 2 , b 3 and the normal line; similarly, ang(m), dist(m) is the included angle and mutual distance between the selected feature point m 1 , m 2 , m 3 and the normal line, and σang, σdist is the error between the angle and the distance [25]. After the

Simulation Experiment Analysis
In order to verify the effectiveness of the virtual design method for customized clothing based on 3D images proposed in this paper in practical application, a simulation experiment analysis was carried out. All experiments were performed on a computer with an Intel i7 7700HQ, 2.8 GHz CPU, 16G RAM, and an NVIDIA e Force GTX 1070 graphics card with 8G VRAM. We used Microsoft Visual Studio 2010 software to create the project file of the virtual fitting system, wrote related program codes in C++ and OPENGL language, and used MFC to create a virtual design interface for custom clothing as shown in Figure 9.
An e-commerce user who is about to buy clothing is selected as the experimental object to evaluate the effectiveness of the virtual design of customized clothing. e user body size table is shown in Table 2.
Virtual fitting on the clothing of the target user was conducted and the circumference of the user was tested. e results are shown in Table 3.
According to the results in Table 3, the relative error between the body measurement results obtained by the application of the proposed method and the reference value is small. It can be seen that the data obtained by the proposed 3D image-based customized clothing virtual design method is in line with the reality, which proves that the method can be applied to clothing color design.  e method in this paper is used to carry out virtual design of customized clothing for users as shown in Figure 10.
According to Figure 10, it can be seen that the method in this paper can accurately carry out the virtual design of customized clothing for the user and determine that the structure of the suit and dress is reasonable, and there is no situation the clothing being too tight or falling off during the activity. In order to further verify the effectiveness of the method in this paper, the virtual design method of custom   clothing based on 3D images proposed in this paper, the method in Reference [6] and Reference [7], is used for the virtual design of custom clothing. e matching degree is compared, and the comparison results are shown in Figure 11. According to Figure 11, it can be seen that the virtual design method of customized clothing based on 3D images proposed in this paper has the highest matching degree of clothing with the user's body shape, while the clothing designed by the method in Reference [6] and Reference [7] matches the user's body shape. e body shape matching degree is poor, indicating that the virtual design method of customized clothing based on 3D images proposed in this paper has a better effect on the virtual design of customized clothing.
In order to verify the effectiveness of the method in this paper, the virtual design method of customized clothing based on 3D images proposed in this paper, the method of reference [6] and reference [7], is used to compare and analyze the virtual design time of customized clothing. e comparison results are shown in Figure 12.
According to Figure 12, it can be seen that the virtual design method of customized clothing based on 3D images proposed in this paper takes less than 5s to perform virtual design of customized clothing, which is more than the time used for virtual design of customized clothing by the method in Reference [6] and Reference [7].

Conclusion
e single-category mass production method of the traditional clothing manufacturing industry has been unable to meet the needs of social development. Under the new background that garment customization has become the production of garment industry, large-scale garment marketization has gradually changed to customization based on consumers' personalized needs.. e Industry 4.0 strategy and the introduction of "Made in China 2025" have also had a profound impact on the clothing manufacturing industry. Large clothing companies have developed Internet-based customization platforms to meet the diverse needs of customers. Digital transformation has become a key link in the structural adjustment and technological upgrading of the country's clothing industry, and it has formed a good situation that is closely related to the clothing industry and is mutually integrated and symbiotic, which further promotes the development of clothing online customization business. With the rapid development of computer science and technology and the continuous innovation of the clothing industry, clothing design is gradually expanding from functions such as grading, layout, and style design based on two-dimensional graphics to three-dimensional virtual body scanning, virtual design, virtual fitting, and virtual presentations. 3D virtual technology can not only improve the production efficiency of clothing enterprises but also provide a better user experience for online e-commerce remote shopping. Using clothing virtual try-on technology, users can experience the effect of clothing on the basis of their own three-dimensional human model, analyze the rationality of clothing design, and then put forward revision suggestions to obtain personalized clothing.
ere are many virtual 3D design software for custom clothing on the market today, such as Style 3D, Browzwear, CLO 3D, and Marvelous Designer. Digital technology is gradually infiltrating the clothing industry, improving the information collection efficiency of clothing enterprises, promoting the implementation of large-scale customized production plans for clothing, and bringing better personalized services to customers. In order to meet the needs of mass customization of clothing, modular design, as a modern design method, can not only quickly respond to market changes, effectively shorten the design and manufacturing cycle of products, and prolong the life cycle of products but also improve product quality and reliability and facilitate disassembly and remanufacturing of products. erefore, the reasonable modularization of the virtual design process of customized clothing can give full play to the flexibility and efficiency of the modular theory, meet the individual needs of the clothing market to the greatest extent, and at the same time ensure the design efficiency and quality, thereby improving the economic benefits of enterprises and enhancing enterprises. erefore, it is necessary to study a fast custom clothing virtual design method. In this paper, a virtual design method for customized clothing based on the three-dimensional image is proposed. Based on the establishment of the three-dimensional human model, the three-dimensional point cloud image of the human body is obtained. By extracting the key points of the 3D human body and registering the 3D human model of customized clothing, the virtual design of customized clothing is realized. e experimental results show that this method improves the dimensional accuracy of users' virtual design of customized clothing, matches the designed clothing with users' body shape, and shortens the design time.

Data Availability
e data used to support the findings of the study can be obtained from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest in the study.