| In the context of the mature development of e-commerce in China,the proportion of people’s online shopping of Hanfu in modern society is becoming higher and higher,which also leads to the increase of online shopping of Hanfu.In response,many Hanfu brands have launched online hanfu customization business or size recommendation business in order to meet consumer needs,among which obtaining accurate human body data is a major factor.Manual measurement and the popular 3D anthropometry both have their drawbacks and are not suitable for the e-commerce industry to solve this problem.Compared with this,the two-dimensional non-contact measurement technology is more suitable for the development of this field.The three-dimensional dimensions of the human body can be obtained through the two-dimensional images of the human body,and then the specifications and sizes of each type of Hanfu can be output,so as to help consumers recommend or customize the product sizes.Therefore,this research will be based on the continuous development of computer technology and the rise of Hanfu movement,aiming to study modern Hanfu styles and corresponding specifications and sizes,combined with computer vision,human body measurement technology and other related knowledge.Finally,this research will realize a system that takes the frontal image,side image,height and weight of the human body as input,and the size of the main body parts and the corresponding size of modern Hanfu as the output.The main content of this study can be divided into the following six parts:(1)Market questionnaire survey and human body data collection.The survey of consumers on the current situation of the Hanfu consumer market will provide data support for the determination of the body size collection part in the next step.After determining the collection requirements of the human body image and the parts of body size collection,the human body image and the size of the human body are collected.A total of 10 sets of sample data were collected in this human body data collection,including front and side photos of the human body.The body size collection parts include height,arm length,hand length,shoulder width,chest width,waist width,hip width,chest thickness,and waist thickness,hip thickness,bust,waist,and hips,a total of 13 sizes.The collected data is used to verify the validity and reliability of each part of the algorithm.(2)The design and implementation of human body image segmentation algorithm.This research proposes a contour extraction method that combines Sobel operator and HSV color model,and then further optimizes the obtained preliminary contour by obtaining the largest connected area and searching for the longest continuous projection area.Finally,performing basic morphological operations to remove the skirting lines and other noise backgrounds to obtain the final contour edge of the human body.The algorithm is implemented using the Matlab platform,combined with ten sets of sample images collected in the early stage for testing.The test results show that the extraction effect of the human body contour is better,and the algorithm has certain reliability and effectiveness.(3)Design and implementation of the algorithm for human body size research.Based on the study of human body shape and the proportion relation of human body,an algorithm to directly extract the size of each feature part is proposed.The extraction algorithm of chest width,chest thickness,waist width,waist thickness,hip width and hip thickness was realized by MATLAB platform.Then combined with the data of 187 samples collected by the research group,the curve fitting algorithm,regression analysis algorithm and graph matching algorithm were used to calculate the size of the chest,waist and hips.Separate the output results to perform a paired T test on the manual measurement value and curve fitting value,manual measurement value and regression analysis value,manual measurement value and graph matching value,so as to select the optimal algorithm for each part.The test results show that the regression analysis algorithm is selected for the prediction of bust size and waist size,and the curve fitting algorithm is selected for the prediction of hip size.(4)The research on the design of modern Hanfu specifications.In this study,10 models of modern Hanfu styles that are more fit and typical are selected for specification research.On the basis of the previous research on the specification of modern hanfu,combined with the basic garment specification design,this paper uses the reverse thinking to deduct the regression relation formula of each style and each specification.Finally,Matlab is used to realize the automatic design algorithm of various styles and specifications.(5)The implementation and testing of the system.After the development platform is determined,the algorithms of each part are integrated and the GUI interface design is carried out for the final realization of the Hanfu specification automatic design system based on the two-dimensional image of the human body.One group is randomly selected from the ten groups of human body data collected in the early stage to test the system operation process to ensure that users can perform normal operations. |