Method and device for automatically generating fat male suit model based on two-dimensional image
By obtaining three-dimensional and two-dimensional dimensional data of obese male bodies, conducting body type classification and regression analysis, and establishing a personalized suit pattern parametric model, the existing technology problems of difficulty and high cost in customizing non-standard body shapes have been solved, and the Efficient and accurate suit patterns for fat men are automatically generated.
Patent Information
- Application Number
- CN202410859908.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
The existing automatic generation method of suit pattern based on two-dimensional images is not suitable for people with non-standard body shapes, and traditional personalized customization has problems such as difficult measurement, high cost and inaccurate pattern.
By obtaining the three-dimensional and two-dimensional dimensional data of obese men, we conduct body type classification and regression analysis, establish a personalized basic pattern and suit pattern parametric model, and use mathematical models to generate personalized suit pattern diagrams for obese men.
It improves the efficiency and accuracy of pattern drawing, reduces costs, and can better meet the personalized suit needs of fat men. The generated pattern drawings are more accurate and standardized.
Smart Images

Figure CN118734375A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of clothing customization, and in particular to a method and device for automatically generating a suit pattern for obese men based on a two-dimensional image. Background Art
[0002] With the improvement of living standards, male consumers have a higher pursuit of the fit and comfort of suits, but the overweight and obesity rate of adults has continued to increase. The body shapes of most men are developing towards overweight or obese status. Most suits made according to standard sizes cannot meet men's needs for personalized suits.
[0003] Personalized customization is an important means to solve the problem of fat men's suits not fitting well, but traditional personalized customization has many limitations. For example, traditional suit customization requires manual measurement of customers' body dimensions. If customers cannot come to the store, the measurement cannot be performed. In addition, traditional suit customization mainly relies on pattern makers to draw patterns manually or using CAD. Once the pattern does not meet expectations, it must be re-made. This process requires high experience and skills from the pattern maker, and hiring experienced pattern makers often requires higher fees, which undoubtedly increases the cost of the company.
[0004] Regarding how to quickly and remotely obtain human body data, three-dimensional body scanners are considered to be one of the most reliable methods. However, three-dimensional body scanners have high requirements for the measurement site and environment, and will also increase the cost of the enterprise. For this reason, more and more researchers are trying to replace three-dimensional human models with two-dimensional images. Obtaining human body data by processing images is relatively simple to operate, and has good development prospects in remote online customization, virtual fitting, etc. However, the current human body data collection based on two-dimensional images is more suitable for people with standard body shapes. Once the body shape of the person being measured is significantly different from the standard body shape, obvious errors will occur, affecting the final customization effect. In addition, the data collected based on two-dimensional images is relatively single and cannot accurately reflect the human body shape.
[0005] Regarding how to quickly draw clothing patterns, pattern parameterization is one of the important technical means. Using pattern parameterization technology, pattern designers only need to input key dimensions to quickly generate patterns. This technology can quickly draw or modify clothing patterns, improve efficiency while ensuring accuracy, and save a lot of costs. Compared with traditional manual or CAD plate making methods, it saves more time and is less dependent on pattern designers. It is a better choice to improve plate making efficiency. However, common pattern parameterization models focus more on differences in size and do not consider differences in local human morphology. Therefore, it cannot be considered personalized customization in the true sense.
[0006] In summary, the problems existing in the prior art include: First, in terms of human body size obtained using two-dimensional images, most studies focus on standard body types, while there are few studies on non-standard body types (fat bodies) for men, and the collected data cannot reflect the human body shape very well. Second, most scholars currently focus on the differences in size rather than the differences in human body shape when generating personalized patterns through pattern parameterization. Therefore, it cannot be considered personalized customization. Third, there is almost no research on constructing a parametric model of personalized suit patterns using non-standard (fat body) human body photo data. Summary of the invention
[0007] The purpose of the present invention is to provide a method and device for automatically generating a suit pattern for obese men based on two-dimensional images in order to solve the problem that the existing method for automatically generating a suit pattern based on two-dimensional images is not suitable for people with non-standard body shapes.
[0008] The above-mentioned purpose of the present application is achieved through the following technical solutions:
[0009] S1: Obtain body size data of obese males and establish a data set; the body size data of obese males includes: three-dimensional body size data and two-dimensional body size data;
[0010] S2: Based on the data set, classify the body shapes of each part and obtain the classification results;
[0011] S3: Obtain a basic version; modify the basic version according to the classification result to obtain a personalized basic version for fat men;
[0012] S4: Based on the body size data of obese men, a regression model of two-dimensional key body size and three-dimensional key body size is established;
[0013] S5: Combined with the regression model, a parameterized model of personalized basic shape for fat men is established;
[0014] S6: Combined with the regression model, a parameterized model of personalized suit pattern for fat men is established;
[0015] S7: Obtain a two-dimensional image of an obese male and input it into a parameterized model of a personalized suit pattern for obese males to generate a men's suit pattern diagram; and make ready-made garments according to the suit pattern diagram.
[0016] Optionally, step S1 includes:
[0017] S11: Performing a three-dimensional scan on the obese male using a three-dimensional body scanner to obtain three-dimensional body size data;
[0018] S12: Take photos of the front, side and back of the obese male with a camera;
[0019] Using mathematical morphology, we can obtain the binary human body contour from the photo;
[0020] Use the Canny operator to extract the human body edge contour from the photo;
[0021] Using the feature point recognition method based on contour vector, combined with the binary human body contour and human body edge contour, human body feature point recognition is performed to obtain feature points;
[0022] Through the feature points, feature lines are obtained, and two-dimensional human body size measurements are performed to obtain two-dimensional human body size data;
[0023] S13: Combining the three-dimensional human body size data and the two-dimensional human body size data into a human body size data set.
[0024] Optionally, step S2 includes:
[0025] Divide the torso of a fat man into three parts: above the shoulders, between the waistline and shoulders, and below the waistline;
[0026] The body size data of three parts of obese men were preprocessed, factor analyzed and cluster analyzed to obtain the classification results of local body shapes.
[0027] Optionally, step S3 includes:
[0028] S31: According to the classification result and the drawing formula of the basic pattern, the basic framework of the basic pattern is modified;
[0029] S32: on the basis of the corrected basic frame, according to the classification result, correcting the shoulder of the basic frame;
[0030] S33: Based on the basic frame after shoulder correction, the armhole arc is corrected;
[0031] S34: Matching the correction results of the basic frame, shoulder and armhole arc to obtain a personalized basic pattern after preliminary correction;
[0032] S35: Establish a three-dimensional human body model of the classification result, perform virtual fitting in combination with the personalized basic pattern, modify the personalized basic pattern, and obtain the personalized basic pattern of fat men in various body parts.
[0033] Optionally, step S4 includes:
[0034] Conduct correlation analysis on the three-dimensional key human dimensions and the two-dimensional key human dimensions in the fat male body dimension data to determine the two-dimensional key dimensions related to the three-dimensional key dimensions;
[0035] Based on the pattern structure requirements, regression analysis is performed on the three-dimensional key human body dimensions and the two-dimensional key human body dimensions to obtain a regression model.
[0036] Optionally, step S5 includes:
[0037] S51: writing the regression model of the two-dimensional key size and the three-dimensional key size;
[0038] S52: determining a first auxiliary line equation according to the classification result and the personalized basic version of the fat male;
[0039] S53: According to the first auxiliary line equation and the basic framework, determine the straight line endpoints, plot function and draw the straight line to obtain a parameterized first straight line model; the straight line endpoints control the length and direction of the straight line;
[0040] S54: Determine control points and a second-order Bessel function according to the first auxiliary line equation and the basic framework to obtain a first arc model in parameterization; the control points control the direction and curvature of the arc;
[0041] S55: combining the first straight line model and the first arc model to obtain a parameterized model of a personalized basic version for fat men.
[0042] Optionally, step S6 includes:
[0043] S61: writing the regression model of the two-dimensional key size and the three-dimensional key size;
[0044] S62: determining the second auxiliary line equation according to the classification result, the personalized basic pattern parameterized model and the six-body plus dart suit style drawing formula;
[0045] S63: According to the second auxiliary auxiliary line equation, determine the straight line endpoints, plot function and draw the straight line to obtain the second straight line model in parameterization;
[0046] S64: According to the second auxiliary line equation and the basic framework, the control points and the second-order Bessel function are determined to obtain the second arc model in parameterization;
[0047] S65: Based on the second auxiliary line equation, the drawing formula of the suit style with six body and belly darts and the second arc model, the intersection of the second-order Bessel function of the side dart related auxiliary line and the armhole arc is found through the for loop method, the endpoint is determined for the side dart drawing, and then the plot function is used to establish the side dart parameterized model;
[0048] S66: The second straight line model, the second arc line model, and the side dart parameterized model are combined to obtain a parameterized model of a personalized suit pattern for obese men.
[0049] An electronic device includes a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a method for automatically generating a suit pattern for obese men based on two-dimensional images.
[0050] A computer-readable storage medium stores instructions. When the instructions are executed, a method for automatically generating a suit pattern for obese men based on a two-dimensional image is executed.
[0051] The beneficial effects of the technical solution provided by this application are:
[0052] 1. Obtain 2D human body size data through 2D images of obese men, and then modify the basic pattern according to the body type classification results and regression model. Use plot function and Bessel function to build a mathematical model to automatically generate men's suit pattern diagrams, without the need for multiple manual modifications, which greatly improves the efficiency of pattern drawing. At the same time, it provides a feasible solution for the personalized suit needs of obese men. The efficiency of pattern making has been greatly improved, and the pattern generation relies on mathematical models, which is more accurate and standardized.
[0053] 2. Dividing the torso of obese men into three parts: above the shoulders, above the waistline and below the shoulders, and below the waistline can more accurately determine the body characteristics of obese men and make the classification results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The present application will be further described below with reference to the accompanying drawings and embodiments, in which:
[0055] Figure 1 This is a step diagram of a method for automatically generating a suit pattern for obese men based on a two-dimensional image in an embodiment of the present application;
[0056] Figure 2 is a schematic diagram of a second-order Bessel function of a method for automatically generating a suit pattern for fat men based on a two-dimensional image in an embodiment of the present application;
[0057] Figure 3 It is a pattern drawing diagram of the back piece of a men's suit in the method for automatically generating a suit pattern for fat men based on a two-dimensional image in an embodiment of the present application;
[0058] Figure 4 It is a schematic diagram of the electronic device structure of the method for automatically generating suit patterns for obese men based on two-dimensional images in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.
[0060] An embodiment of the present application provides a method for automatically generating a suit pattern for obese men based on a two-dimensional image.
[0061] Please refer to Figure 1 , Figure 1 This is a step diagram of a method for automatically generating a suit pattern for fat men based on a two-dimensional image in an embodiment of the present application, comprising:
[0062] S1: Obtain body size data of obese males and establish a data set; the body size data of obese males includes: three-dimensional body size data and two-dimensional body size data;
[0063] Step S1 includes:
[0064] S11: Performing a three-dimensional scan on the obese male using a three-dimensional body scanner to obtain three-dimensional body size data;
[0065] S12: Take photos of the front, side and back of the obese male with a camera;
[0066] Using mathematical morphology, we can obtain the binary human body contour from the photo;
[0067] Use the Canny operator to extract the human body edge contour from the photo;
[0068] Specifically, the Canny algorithm is a standard algorithm widely used in edge detection. Its goal is to find an optimal edge detection solution or find the location with the strongest grayscale intensity change in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. The brief steps of the Canny operator are as follows: Denoising: Apply Gaussian filtering to smooth the image in order to remove noise Gradient: Find the gradient of the image Non-maximum suppression: Apply non-maximum suppression technology to filter out non-edge pixels and make the blurred boundaries clear. This process retains the maximum value of the gradient intensity at each pixel and filters out other values. Double threshold analysis: Apply the double threshold method to determine possible (potential) boundaries; use hysteresis technology to track boundaries. If a weak boundary connected to a strong boundary at a certain pixel position is considered to be a boundary, other weak boundaries are deleted.
[0069] Using the feature point recognition method based on contour vector, combined with the binary human body contour and human body edge contour, human body feature point recognition is performed to obtain feature points;
[0070] Specifically, the human body feature points are identified using the feature point recognition method based on the contour vector, and the eight-chain code is used for vector detection calculation, and the human body feature points are found through the relationship between vectors. The principle is that the key points of the human body are generally located at the most concave or convex point of the human body, and are also the turning points of the human body contour vector direction. When the local curvature or vector direction of the human body changes at a certain point, this point is the key point of the human body, that is, the feature point.
[0071] Through the feature points, feature lines are obtained, and two-dimensional human body size measurements are performed to obtain two-dimensional human body size data;
[0072] S13: Combining the three-dimensional human body size data and the two-dimensional human body size data into a human body size data set.
[0073] Specifically, obese men are defined as having a BMI ≥ 24. In order to improve the accuracy of non-standard body type classification, it is necessary to obtain three-dimensional human body size data to assist in body type classification.
[0074] S2: Based on the data set, classify the body shapes of each part and obtain the classification results;
[0075] Step S2 includes:
[0076] Divide the torso of a fat man into three parts: above the shoulders, between the waistline and shoulders, and below the waistline;
[0077] The body size data of three parts of obese men were preprocessed, factor analyzed and cluster analyzed to obtain the classification results of local body shapes.
[0078] Specifically, the abnormal data in the human body size data of obese men are removed through preprocessing. The key factors in the data are extracted through factor analysis. The classification results of three parts of obese men are obtained through cluster analysis.
[0079] S3: Obtain a basic version; modify the basic version according to the classification result to obtain a personalized basic version for fat men;
[0080] Step S3 includes:
[0081] S31: According to the classification result and the drawing formula of the basic pattern, the basic framework of the basic pattern is modified;
[0082] S32: on the basis of the corrected basic frame, according to the classification result, correcting the shoulder of the basic frame;
[0083] S33: Based on the basic frame after shoulder correction, the armhole arc is corrected;
[0084] S34: Matching the correction results of the basic frame, shoulder and armhole arc to obtain a personalized basic pattern after preliminary correction;
[0085] S35: Establish a three-dimensional human body model of the classification result, perform virtual fitting in combination with the personalized basic pattern, modify the personalized basic pattern, and obtain the personalized basic pattern of fat men in various body parts.
[0086] Specifically, the step of correcting the basic pattern (the third-generation basic men's clothing pattern) uses the third-generation basic men's clothing pattern from "Principles and Applications of Clothing Pattern Design (Men's Wear)" compiled by Liu Ruipu.
[0087] S4: Based on the body size data of obese men, a regression model of two-dimensional key body size and three-dimensional key body size is established;
[0088] Step S4 includes:
[0089] Conduct correlation analysis on the three-dimensional key human dimensions and the two-dimensional key human dimensions in the fat male body dimension data to determine the two-dimensional key dimensions related to the three-dimensional key dimensions;
[0090] Based on the pattern structure requirements, regression analysis is performed on the three-dimensional key human body dimensions and the two-dimensional key human body dimensions to obtain a regression model.
[0091] Specifically, the regression model of chest circumference in three dimensions and chest thickness and chest width in two dimensions is as follows: chest circumference = 47.126 + 1.869 * chest thickness + 0.230 * chest width. The regression model of back center length in three dimensions and height in two dimensions is as follows: back center length = 0.252 * two-dimensional height - 2.635.
[0092] S5: Combined with the regression model, a parameterized model of personalized basic shape for fat men is established;
[0093] Step S5 includes:
[0094] S51: writing the regression model of the two-dimensional key size and the three-dimensional key size;
[0095] Specifically, a regression model of two-dimensional key dimensions and three-dimensional key dimensions is written, and the input dimensions are two-dimensional human dimensions. Three-dimensional human dimensions for plate making, such as chest circumference and back center length, can be obtained from the two-dimensional human dimensions.
[0096] S52: determining a first auxiliary line equation according to the classification result and the personalized basic version of the fat male;
[0097] S53: According to the first auxiliary line equation and the basic framework, determine the straight line endpoints, plot function and draw the straight line to obtain a parameterized first straight line model; the straight line endpoints control the length and direction of the straight line;
[0098] S54: Determine control points and a second-order Bessel function according to the first auxiliary line equation and the basic framework to obtain a first arc model in parameterization; the control points control the direction and curvature of the arc;
[0099] Specifically, the control points and arcs of the personalized basic pattern are determined according to the coordinate points of the basic framework, the drawing rules and formulas of the personalized basic pattern. According to the above restrictions, the second-order Bezier function is selected. Through the control points, the arc model of the personalized basic pattern, such as the armhole arc and the neckline arc, is obtained using the second-order Bezier function. Bezier curve, also known as Bezier curve or Bezier curve, is a mathematical curve applied to two-dimensional graphics applications. Figure 2 , the path of a quadratic Bezier curve is given by the function B(t) at given points P0, P1, P2:
[0100] B(t)=(1-t) 2 P0+2t(1-t)P1+t 2 P2, t∈[0, 1]
[0101] Among them, P0 is the starting point, P1 is the control point, and P2 is the end point.
[0102] S55: combining the first straight line model and the first arc model to obtain a parameterized model of a personalized basic version for fat men.
[0103] S6: Combined with the regression model, a parameterized model of personalized suit pattern for fat men is established;
[0104] Step S6 includes:
[0105] S61: writing the regression model of the two-dimensional key size and the three-dimensional key size;
[0106] S62: determining the second auxiliary line equation according to the classification result, the personalized basic pattern parameterized model and the six-body plus dart suit style drawing formula;
[0107] Specifically, the formula for drawing a six-panel body and dart suit style comes from "Principles and Applications of Clothing Pattern Design (Men's Wear)" compiled by Liu Ruipu.
[0108] S63: According to the second auxiliary auxiliary line equation, determine the straight line endpoints, plot function and draw the straight line to obtain the second straight line model in parameterization;
[0109] S64: According to the second auxiliary line equation and the basic framework, the control points and the second-order Bessel function are determined to obtain the second arc model in parameterization;
[0110] S65: Based on the second auxiliary line equation, the drawing formula of the suit style with six body and belly darts and the second arc model, the intersection of the second-order Bessel function of the side dart related auxiliary line and the armhole arc is found through the for loop method, the endpoint is determined for the side dart drawing, and then the plot function is used to establish the side dart parameterized model;
[0111] Specifically, for example, the program is compiled using the published open source module programmed in the Matlab language, mainly using function packages such as Canny, plot, Bezier and for loop, and the functions in this embodiment are respectively:
[0112] The Canny operator is a gradient-based edge detection algorithm that calculates the gradient size and direction of pixels in an image and then uses non-maximum suppression and double threshold processing to detect edges.
[0113] plot(x,y) is a straight line function. Its main function is to draw a straight line, that is, to draw a two-dimensional line graph with the horizontal axis as x and the vertical axis as y, and the y value corresponds to the x value one by one.
[0114] Bezier mainly needs to use the following instructions:
[0115] bezier([x1,x2,x3],[y1,y2,y3]), input the coordinates of three points and get the mathematical expression of the arc, where subscripts 1 and 3 are the coordinates of the two endpoints and subscript 2 is the coordinate of the control point.
[0116] The for loop is a loop statement in a programming language that is used to repeatedly execute a section of code.
[0117] S66: The second straight line model, the second arc line model, and the side dart parameterized model are combined to obtain a parameterized model of a personalized suit pattern for obese men.
[0118] S7: Obtain a two-dimensional image of an obese male and input it into a parameterized model of a personalized suit pattern for obese males to generate a men's suit pattern diagram; and make ready-made garments according to the suit pattern diagram.
[0119] Refer to the following Figure 3 , the automatic generation process of the back piece of a men's suit is used for detailed explanation:
[0120] Since the methods for generating pattern contour lines described below are all calculated and automatically generated in a computer environment, rather than drawn manually, the endpoints, control points, and auxiliary points are all represented by (x, y) coordinates, the straight line is represented by the equation y=kx+b, and the arc is also represented by a function in a computer environment. The second-order Bezier function is expressed as: bezier([x1,x2,x3],[y1,y2,y3]), where subscripts 1 and 3 are the coordinates of the two endpoints, subscript 2 is the coordinates of the control point, and the x and y coordinates of the three points represent an arc of a second-order Bezier function.
[0121] The first step is to determine the basic framework of the back of the suit.
[0122] The basic framework of the back piece of the suit is composed of rectangles ABCD, CKEF and EFGH, with point F as the coordinate origin (0, 0). The focus of the back piece of the suit is on the back center line, the back neckline arc, the back shoulder arc, the back armhole arc, the back side seam darts and the back hem. The remaining straight lines can be drawn directly without detailed description.
[0123] Secondly, draw the basic framework based on the known conditions; the known conditions include human body size data, such as chest circumference and back center length, and the basic version and the formula for drawing a six-piece men's suit. Among them, the chest circumference is 103.18cm, and the back center length is 42.38cm. Compare its human body data with the body type classification results to obtain its classification results, select the appropriate personalized basic version, and draw the formula for the six-piece plus belly dart men's suit based on the personalized basic version and the formula: the distance between AB is: chest circumference / 6+4; the distance between BF is: back center length-3; the distance between FC is: back center length-(chest circumference / 6+9.5)-2; the distance between CD is: chest circumference / 6+4; the distance between CK is: 19*chest circumference / 72+31 / 6; the distance between EF is: 19*chest circumference / 72+31 / 6; the distance between GF is: back length-10; the distance between GH is: 19*chest circumference / 72+31 / 6, / represents the division sign. From this we can get the coordinates of each point of the basic frame: A(21.2, 39.4); B(0, 39.4); C(0, 13.7); D(21.2, 13.7); E(32.4, 0); F(0, 0); G(0, -32.4); H(0, -32.4); K(32.4, 13.7), and add ABCD, CKEF, EFGH to get the basic frame of the back piece of the suit.
[0124] The second step is to draw auxiliary lines.
[0125] First, determine the coordinates of the center line of rectangle ABCD. Through the drawing formula of the personalized basic version, the coordinates of its endpoints are obtained as follows: I (0, 26.53); J (21.2, 26.53). IJ is connected to obtain the center line of rectangle ABCD. Then determine the auxiliary line of the neckline height. Through the drawing formula of the personalized basic version: the distance between BL is: chest circumference / 12+0.5; the distance between ML is: (chest circumference / 12+0.5) / 3-1, / represents the division sign. Through the drawing formula of the personalized basic version, the coordinates of its endpoints are obtained as follows: L (9.1, 39.4); M (9.1, 41.4). LM is connected to obtain the auxiliary line of the neckline height. Then determine the back center extension line. Through the drawing formula of the personalized basic version, the coordinates of its endpoints are obtained as follows: N (-1, 39.4); O (-1, -32.4). NO is connected to obtain the back center extension line. Then draw the auxiliary lines of the armhole and the back side seam. The endpoint coordinates are obtained through the drawing formula of the personalized basic pattern: Q (21.2, 20.1); P (32.4, 20.1). QP is connected to obtain the auxiliary lines of the armhole and the back side seam.
[0126] Step 3: Draw the rear center line.
[0127] First, draw the first straight line of the back center. From the coordinates of the auxiliary lines, we can get the coordinates of its endpoints: N(-1, 39.4); R(-1, 26.53). The line segment NR is the first straight line of the back center. Then use the second-order Bezier function to draw the first arc of the back center. First, determine the endpoints of the Bezier function based on the auxiliary lines: R(-1, 26.53); C(0, 13.7), and then determine the control point: S(-1, 20.1). According to the second-order Bezier function formula: bezier([x1, x2, x3], [y1, y2, y3]), substitute the endpoints and control points to get the first arc of the back center. Then, draw the second arc of the back center. First, determine the endpoints of the Bezier function based on the auxiliary lines: C(0, 13.7); U(2, 0), and then use the midpoint T of the endpoints as the control point: T(1, 6.85). According to the second-order Bezier function formula: bezier([x1, x2, x3], [y1, y2, y3]), substitute the endpoints and control points to get the second arc of the back center. Finally, draw the second straight line of the back center. According to the coordinates of the auxiliary lines, the coordinates of the second arc, and the suit drawing formula, we can get its endpoint coordinates: U(2, 0); V(3.5, -32.4). UV is connected to get the second straight line of the back center. All the above straight lines and arcs constitute the back center line of the suit.
[0128] Step 4: Draw the arc of the back neckline.
[0129] Through the neckline height auxiliary line and the back center extension line, we can get the coordinates of the two endpoints of the back neckline arc: M (9.1, 41.4); N (-1, 39.4). By comparing the aesthetics of the back neckline arc under different control points, we finally choose (6.1, 39.4) as the control point. According to the second-order Bezier function formula: bezier ([x1, x2, x3], [y1, y2, y3]), substitute the endpoints and control points to get the back neckline arc.
[0130] Step 5: Draw the arc of the back shoulder.
[0131] According to the drawing formula of the personalized basic pattern and the coordinates of the related auxiliary lines, the endpoints of the back shoulder line can be obtained: M (9.1, 41.4); W (22.2, 35.5). By comparing the aesthetics of the back neckline arc under different control points, (12.9, 39.38) is finally selected as the control point. According to the second-order Bezier function formula: bezier ([x1, x2, x3], [y1, y2, y3]), the endpoints and control points are substituted to obtain the back shoulder arc.
[0132] Step 6: Draw the back armhole line.
[0133] According to the drawing formula of the personalized basic pattern and the related line coordinates, the endpoints of the back armhole arc can be obtained: W (22.2, 35.5); K (32.4, 13.7). By comparing the aesthetics of the back armhole arc under different control points, (18.5, 13.8) is finally selected as the control point. According to the second-order Bezier function formula: bezier ([x1, x2, x3], [y1, y2, y3]), the endpoints and control points are substituted to obtain the back armhole arc.
[0134] Step 7: Draw the back side seam darts.
[0135] First, according to the point-to-straight-line distance formula, use the for loop to find the intersection of the back armhole and the armhole and back side seam auxiliary lines: X(22.6, 20.0), determine the other end point of the back side seam dart center line Y(22.6, -32.4), link XY to get the back side seam center line, and according to the suit dart dart requirements, determine the dart related coordinates: a(24.1, 0); b(21.6, 0); c(23.6, -32.4); d(21.6, -32.4). Connect Xa, Xb, bc, and ad respectively to get the back side seam.
[0136] Step 8: Draw the bottom hem of the back piece.
[0137] First calculate the straight line equation of the straight line UV:
[0138] y = -21.6x + 43.2;
[0139] Then calculate the linear equation of line ad:
[0140] y = 13.0x - 312.3;
[0141] Next, calculate the equation of the line bc:
[0142] y = -16.2x + 349.9;
[0143] According to the drawing requirements of the hem of the back piece of the suit, the starting point of the hem is point V. The straight line drawn from point V intersects the straight line bc at point e, intersects the straight line ad at point f, and is perpendicular to UV. Therefore, it can be concluded that the slope of line segment Ve is k = 1 / 21.6. Through the slope k and the coordinates of point V, the straight line equation of Ve can be obtained as:
[0144] y = 1 / 21.6x - 32.6;
[0145] From the above straight line equation, we can calculate the coordinates of point e and point f: e(23.4, -31.0); f(21.8, -32.1). Connect Ve and you can draw the bottom swing of the back piece.
[0146] The present application also discloses an electronic device. Figure 4 , Figure 4 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0147] The communication bus 502 is used to realize the connection and communication between these components.
[0148] The user interface 503 may include a display screen, and the optional user interface 503 may also include a standard wired interface or a wireless interface.
[0149] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0150] The present application also discloses a computer-readable storage medium storing a plurality of instructions suitable for loading by a processor to execute the above-mentioned method for automatically generating a suit pattern for obese men based on two-dimensional images.
[0151] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0152] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for automatically generating suit patterns for obese men based on two-dimensional images, characterized in that: The method comprises the following steps: S1: Obtain body size data of obese men and establish a data set; S2: Based on the data set, classify the body shapes of each part and obtain the classification results; S3: Get the basic pattern; According to the classification results, the basic version is modified to obtain a personalized basic version for fat men; S4: Based on the body size data of obese men, a regression model of two-dimensional key body size and three-dimensional key body size is established; S5: Combined with the regression model, a parameterized model of personalized basic shape for fat men is established; S6: Combined with the regression model, a parameterized model of personalized suit pattern for fat men is established; S7: Obtain a two-dimensional image of an obese male and input it into a parameterized model of a personalized suit pattern for obese males to generate a men's suit pattern diagram; and make garments according to the suit pattern diagram.
2. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 1, characterized in that: Step S1 includes: The obese male body size data includes: three-dimensional body size data and two-dimensional body size data; S11: Performing a three-dimensional scan on the obese male using a three-dimensional body scanner to obtain three-dimensional body size data; S12: Take photos of the front, side and back of the obese male with a camera; Using mathematical morphology, we can obtain the binary human body contour from the photo; Use the Canny operator to extract the human body edge contour from the photo; Using the feature point recognition method based on contour vector, combined with the binary human body contour and human body edge contour, human body feature point recognition is performed to obtain feature points; Through the feature points, feature lines are obtained, and two-dimensional human body size measurements are performed to obtain two-dimensional human body size data; S13: Combining the three-dimensional human body size data and the two-dimensional human body size data into a human body size data set.
3. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 1, characterized in that: Step S2 includes: Divide the torso of a fat man into three parts: above the shoulders, between the waistline and shoulders, and below the waistline; The body size data of three parts of obese men were preprocessed, factor analyzed and cluster analyzed to obtain the classification results of local body shapes.
4. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 1, characterized in that: Step S3 includes: S31: According to the classification result and the drawing formula of the basic pattern, the basic framework of the basic pattern is modified; S32: on the basis of the corrected basic frame, according to the classification result, correcting the shoulder of the basic frame; S33: Based on the basic frame after shoulder correction, the armhole arc is corrected; S34: Matching the correction results of the basic frame, shoulder and armhole arc to obtain a personalized basic pattern after preliminary correction; S35: Establish a three-dimensional human body model of the classification result, perform virtual fitting in combination with the personalized basic pattern, modify the personalized basic pattern, and obtain the personalized basic pattern of fat men in various body parts.
5. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 4, characterized in that: Step S4 includes: Conduct correlation analysis on the three-dimensional key human dimensions and the two-dimensional key human dimensions in the fat male body dimension data to determine the two-dimensional key dimensions related to the three-dimensional key dimensions; Based on the pattern structure requirements, regression analysis is performed on the three-dimensional key human body dimensions and the two-dimensional key human body dimensions to obtain a regression model.
6. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 5, characterized in that: Step S5 includes: S51: writing the regression model of the two-dimensional key size and the three-dimensional key size; S52: determining a first auxiliary line equation according to the classification result and the personalized basic version of the fat male; S53: According to the first auxiliary line equation and the basic framework, determine the straight line endpoints, plot function and draw the straight line to obtain a parameterized first straight line model; the straight line endpoints control the length and direction of the straight line; S54: Determine control points and a second-order Bessel function according to the first auxiliary line equation and the basic framework to obtain a first arc model in parameterization; the control points control the direction and curvature of the arc; S55: combining the first straight line model and the first arc model to obtain a parameterized model of a personalized basic version for fat men.
7. The method for automatically generating a suit pattern for obese men based on a two-dimensional image as claimed in claim 1, characterized in that: Step S6 includes: S61: writing the regression model of the two-dimensional key size and the three-dimensional key size; S62: determining the second auxiliary line equation according to the classification result, the personalized basic pattern parameterized model and the six-body plus dart suit style drawing formula; S63: According to the second auxiliary auxiliary line equation, determine the straight line endpoints, plot function and draw the straight line to obtain the second straight line model in parameterization; S64: According to the second auxiliary line equation and the basic framework, the control points and the second-order Bessel function are determined to obtain the second arc model in parameterization; S65: Based on the second auxiliary line equation, the drawing formula of the suit style with six body and belly darts and the second arc model, the intersection of the second-order Bessel function of the side dart related auxiliary line and the armhole arc is found through the for loop method, the endpoint is determined for the side dart drawing, and then the plot function is used to establish the side dart parameterized model; S66: The second straight line model, the second arc line model, and the side dart parameterized model are combined to obtain a parameterized model of a personalized suit pattern for obese men.
8. An electronic device, characterized in that: The electronic device comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device executes the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method steps according to any one of claims 1 to 7 are executed.
