Disclosure of Invention
The invention aims to provide a method, a system, a storage medium and an electronic device for measuring the two-dimensional size of a dressed human body, which can realize that a user can automatically mark characteristic points and extract two-dimensional size information from a human body photo only by providing the height information and the images of the front and the side of the user on the basis of the human body image.
The technical scheme provided by the invention is as follows:
the invention provides a method for measuring two-dimensional size of a dressed human body, which comprises the following steps:
acquiring characteristic information of a user;
acquiring a front character image and a side character image of a preset posture;
after preprocessing the front figure image and the side figure image, extracting outlines to obtain a corresponding front outline image and a corresponding side outline image;
carrying out image segmentation on the front profile map, and determining front profile areas corresponding to all parts of the human body;
carrying out characteristic point positioning on the front profile area corresponding to each part to determine the front characteristic points of each part;
obtaining corresponding front two-dimensional size according to the front characteristic points of each part and the characteristic information;
determining side feature points of each part in the side profile map according to the mapping relation between the front profile map and the side profile map and the front feature points of each part;
and obtaining corresponding side two-dimensional size according to the side characteristic points of each part and the characteristic information.
Further, after preprocessing the front person image and the side person image, extracting the contour to obtain the corresponding front contour map and the corresponding side contour map specifically includes:
respectively converting figure images into input pictures with preset formats, wherein the figure images comprise the front figure image and the side figure images;
carrying out picture channel conversion on the input picture, and converting the RGB picture into HSV to obtain an original image;
solving for a Sobel operator for the original image, increasing the contrast and carrying out image binarization to obtain a black-and-white image;
taking the maximum outline of the black-and-white image, and carrying out corrosion expansion to obtain a preprocessed image, wherein the preprocessed image comprises a front preprocessed image and a side preprocessed image;
and extracting contours according to the front preprocessed image and the side preprocessed image to obtain a corresponding front contour map and a corresponding side contour map.
Further, the positioning of the feature points of the front profile area corresponding to each part to determine the front feature points of each part specifically includes:
positioning front hand characteristic points according to a contour detection function;
positioning the front neck characteristic points by combining the hand characteristic points by using a maximum distance method;
positioning the characteristic points of the front shoulder by utilizing curve fitting or eight-chain codes;
and positioning the front characteristic points of the rest parts according to a template traversal method, a shape estimation method or a scanning line detection method.
Further, obtaining the corresponding front two-dimensional size according to the front feature points of each part and the feature information specifically includes:
calculating the proportion of the front characteristic points of each part to the characteristic points of the human body in the front profile;
identifying height information in the characteristic information;
obtaining the front two-dimensional size of each part according to the characteristic point proportion of each part and the height information;
according to the mapping relation between the front outline drawing and the side outline drawing, determining the specific side feature points of each part in the side outline drawing;
positioning the characteristic points of the neck at the side surface according to the side surface contour map by using an angle method;
and mapping the front characteristic points of the rest parts to the side profile graph according to the characteristic point proportion to obtain the side characteristic points of the rest parts.
The invention also provides a system for measuring two-dimensional size of a dressed human body, comprising:
the information acquisition module is used for acquiring the characteristic information of the user;
the image acquisition module is used for acquiring a front character image and a side character image of a preset posture;
the preprocessing module is used for preprocessing the front figure image and the side figure image acquired by the image acquisition module and extracting outlines to obtain a corresponding front outline image and a corresponding side outline image;
the image segmentation module is used for carrying out image segmentation on the front profile image obtained by the preprocessing module and determining front profile areas corresponding to all parts of the human body;
the characteristic point positioning module is used for positioning the characteristic points of the front profile area corresponding to each part obtained by the image segmentation module to determine the front characteristic points of each part;
the size calculation module is used for obtaining corresponding front two-dimensional sizes according to the front characteristic points of all the parts obtained by the characteristic point positioning module and the characteristic information obtained by the information acquisition module;
the characteristic point positioning module is used for determining the side characteristic points of each part in the side profile map according to the front characteristic points of each part according to the mapping relation between the front profile map and the side profile map;
and the size calculation module is used for obtaining corresponding side two-dimensional sizes according to the side characteristic points of each part obtained by the characteristic point positioning module and the characteristic information obtained by the information acquisition module.
Further, the preprocessing module specifically includes:
the format conversion unit is used for respectively converting the figure images into input pictures with preset formats, wherein the figure images comprise the front figure images and the side figure images;
the channel conversion unit is used for carrying out picture channel conversion on the input picture obtained by the format conversion unit and converting the RGB picture into HSV to obtain an original image;
the processing unit is used for solving the Sobel operator for the original image obtained by the channel conversion unit, increasing the contrast and carrying out image binarization to obtain a black-and-white image;
the processing unit is used for taking the maximum outline of the black-and-white image and carrying out corrosion expansion to obtain a preprocessed image, wherein the preprocessed image comprises a front preprocessed image and a side preprocessed image;
and the contour extraction unit is used for extracting contours according to the front preprocessed image and the side preprocessed image obtained by the processing unit to obtain a corresponding front contour map and a corresponding side contour map.
Further, the feature point positioning module specifically includes:
the characteristic point positioning unit is used for positioning the front hand characteristic points according to the profile detection function;
the feature point positioning unit positions the front neck feature point by combining the hand feature point with a maximum distance method;
the characteristic point positioning unit positions the characteristic points of the front shoulder by utilizing curve fitting or eight-chain codes;
the feature point positioning unit positions the front feature points of the rest parts according to a template traversal method, a shape estimation method or a scanning line detection method.
Further, the size calculation module specifically includes:
a proportion calculating unit for calculating the proportion of the characteristic points of the front surface of each part to human bodies in the front surface contour map;
the height identification unit is used for identifying height information in the characteristic information;
the size calculation unit is used for obtaining the front two-dimensional size of each part according to the characteristic point proportion of each part calculated by the proportion calculation unit and the height information obtained by the height identification unit;
the characteristic point positioning module also comprises;
the characteristic point positioning unit is used for positioning the characteristic points of the neck part on the side surface according to the side profile graph by using an angle method;
and the characteristic point mapping unit is used for mapping the front characteristic points of the rest parts positioned by the characteristic point positioning unit to the side profile graph to obtain the side characteristic points of the rest parts according to the characteristic point proportion calculated by the proportion calculating unit.
The invention also provides a storage medium having stored thereon a computer program which, when executed by a processor, implements any of the methods described above.
The invention also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor implements any one of the methods described above when executing the computer program.
The dressing human body two-dimensional size measuring method, the dressing human body two-dimensional size measuring system, the storage medium and the electronic equipment provided by the invention can bring at least one of the following beneficial effects:
1. the invention realizes remote two-dimensional size measurement, height information and two person images are provided by a user and are directly input into a program, namely two-dimensional size information of the front and side surfaces of the collar, the chest and the like is automatically acquired. The whole process does not need manual calibration, and the system has high accuracy and strong robustness.
2. According to the invention, the human body contour map is subjected to image segmentation to obtain the range area of the human body part, then the characteristic points are positioned by utilizing a template traversal method or a scanning line method aiming at different parts, and finally the two-dimensional size is obtained, so that the accuracy is higher.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will explain specific embodiments of the present invention with reference to the drawings of the specification. It is obvious that the drawings in the following description are only some examples of the invention, from which other drawings and embodiments can be derived by a person skilled in the art without inventive effort.
For the sake of simplicity, only the parts relevant to the present invention are schematically shown in the drawings, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
In one embodiment of the present invention, as shown in fig. 1, a method for measuring a two-dimensional size of a wearer includes:
s100, acquiring characteristic information of a user;
specifically, the characteristic information of the user is obtained, the characteristic information is information affecting the two-dimensional size of the user, for example, height information of the user, and the two-dimensional sizes of different parts of the height information of the user with the same height are different. The two-dimensional size of a general body part can be calculated by combining height information of a user, but for parts with special requirements and parts with difference of each user, the parts need to be according to characteristic requirements of the user, such as head circumference size.
S200, acquiring a front character image and a side character image of a preset posture;
specifically, a front person image and a side person image of a preset posture are acquired, for example, when the front person image is acquired, the user's heel is closed and both hands are opened to present an angle of about 45 °, and when the side person image is acquired, the user's hands are brought close to the root of the thigh. In addition, in order to obtain a front person image and a side person image which meet the requirements, the preset posture includes not only the state requirements of the user to be photographed, but also the requirements for the photographing environment, such as the photographing background, the distance between the camera and the human body, the distance between the camera and the ground, and the like.
The acquired front figure image and the side figure image can be selected from existing pictures or can be shot in real time through a camera device. In addition, no matter the existing picture or real-time shooting is carried out, in order to avoid size ratio distortion during shooting, the plane where the lens is located is ensured to be parallel to the vertical plane where the human body is located, and the lens does not need to look up or look down the user during shooting.
The steps S100 and S200 are both acquisition steps of the system early-stage basic data, and there is no specific sequence between the two steps, and the sequence numbers herein are only for convenience of description, and do not represent that the actual sequence is fixed.
S300, after preprocessing the front person image and the side person image, extracting outlines to obtain a corresponding front outline image and a corresponding side outline image;
specifically, the same preprocessing process is carried out on the front figure image and the side figure image to obtain corresponding preprocessed images, the contour effect is good, and the preprocessed images comprise the front preprocessed image and the side preprocessed image. The system then extracts contours from the pre-processed image to obtain corresponding front and side contour maps.
S400, carrying out image segmentation on the front outline image, and determining front outline areas corresponding to all parts of the human body;
specifically, the front profile map is subjected to image segmentation to determine front profile regions corresponding to various parts of the human body, and as shown in fig. 2, the image segmentation based on the golden ratio of the human body divides the human body into 7.5 parts, wherein the neck region is 0.5-1.5, and the shoulder region is a neck profile point-1.5 region.
S500, positioning feature points of the front outline region corresponding to each part to determine front feature points of each part;
specifically, the front profile area corresponding to each part is determined, and the feature points are positioned by adopting a corresponding method according to the characteristics of each part, so that the front feature points of each part are determined.
S600, obtaining corresponding front two-dimensional size according to the front characteristic points of each part and the characteristic information;
specifically, according to height information in the feature information acquired by the user, a proportion coefficient f can be calculated by combining pixel points representing the height in the image, and then the position of each front feature point can be obtained by multiplying the Euclidean distance of the feature point positioned by each part in the image by f, so that the front two-dimensional size is obtained.
S700, determining side feature points of each part in the side profile map according to the front feature points of each part according to the mapping relation between the front profile map and the side profile map;
specifically, since the front outline and the side outline are both of the same user, the proportions of the respective feature points with respect to the entire human body are the same, and the side feature points of the respective parts can be specified by combining the mapping relationship between the front outline and the side outline based on the front feature points of the respective parts on the front outline. However, since the measurement of the neck circumference is performed with an inclination of 25 ° to 30 ° in the measurement standard for the side neck feature point, the side neck feature point is located separately, and the side feature points of the remaining portions are mapped from the frontal feature point.
And S800, obtaining corresponding side two-dimensional size according to the side feature points of each part and the feature information.
Specifically, after the side feature points are determined, since the side feature points are obtained by mapping the front feature points in proportion, the positions of the side feature points are determined by combining the height information in the feature information, so that the two-dimensional size of the side is obtained.
In this embodiment, based on the human body image, the user can automatically mark the feature points and extract the two-dimensional size information from the human body photograph only by providing the height information of the user and the images of the person on the front and the side. This is done without any manual operation. From the perspective of a merchant, the device such as a three-dimensional scanner with high value does not need to be purchased or a great amount of time is spent to send a master to the home for manual measurement, and for a customer, the specified place is not needed for measurement, so that the flexibility and the convenience are higher.
Another embodiment of the present invention is an optimized embodiment of the foregoing embodiment, as shown in fig. 3, the main improvement of this embodiment is that, compared with the foregoing first embodiment, after the preprocessing is performed on the front human image and the side human image, S300, extracting the contour to obtain the corresponding front contour map and the corresponding side contour map specifically includes:
s310, respectively converting the figure images into input pictures in a preset format, wherein the figure images comprise the front figure image and the side figure images;
specifically, first, a picture Resize converts an input person picture into an input picture in a preset format, for example, a picture in a 1000X600 wide format.
S320, converting the input picture into a picture channel, and converting the RGB picture into HSV to obtain an original image;
specifically, the input image is converted from the RGB image to the HSV image, the obtained image is an RGB space, but the effect of separating the human body image by the S space in the HSV color space is best, so that the original image is obtained by converting the image channel of the input image, and the obtained data contour effect is best.
RGB is designed based on the principle of color light emission, and in popular terms, its color mixing mode is like three lamps of red, green and blue, when their lights are superimposed, the colors are mixed, but the brightness is equal to the sum of the two brightnesses, the higher the mixed brightness is, the additive mixing is. HSV is a relatively intuitive color model and is therefore widely used in many image editing tools, where the color parameters are: hue (H, Hue), Saturation (S, Saturation), lightness (V, Value).
RGB → HSV method formula is:
R'=R/255
G'=G/255
B'=B/255
Cmax=max(R',G',B')
Cmin=min(R',G',B')
Δ=Cmax-Cmin
V=Cmax
s330, solving for a Sobel operator of the original image, increasing the contrast and carrying out image binarization to obtain a black-and-white image;
specifically, a Sobel operator (Sobel operator) is mainly used for edge detection, and the Sobel operator is used for solving the problem of the Sobel convolution factor:
a represents the original image, Gx represents the horizontal Sobel operator, and Gy represents the horizontal Sobel operator. And then increasing the contrast, and increasing the brightness of the human body edge based on the obtained Sobel operator. Then, image binarization is performed to convert the image into a black-and-white image with only black (0) and white (255).
S340, taking the maximum outline of the black-and-white image, and carrying out corrosion expansion to obtain a preprocessed image, wherein the preprocessed image comprises a front preprocessed image and a side preprocessed image;
specifically, the maximum contour of the obtained black-and-white image is obtained, and the contour extraction error is avoided. And then carrying out corrosion expansion to remove noise points generated after binarization to obtain a preprocessed image, wherein the preprocessed image comprises a front preprocessed image and a side preprocessed image.
S350, extracting contours according to the front preprocessed image and the side preprocessed image to obtain a corresponding front contour map and a corresponding side contour map.
Specifically, the contour of the task is extracted according to the front preprocessed image and the side preprocessed image respectively, so that a corresponding front contour map and a corresponding side contour map are obtained.
In this embodiment, a series of steps are adopted to preprocess the acquired front figure image and the side figure image, and the brightness of the human body edge is highlighted, so that the front outline image and the side outline image can be accurately extracted.
Another embodiment of the present invention is an optimized embodiment of the above-described embodiment, and as shown in fig. 4, the main improvement of this embodiment over the first embodiment is that the determining the front feature points of each part by performing the feature point location on the front contour region corresponding to each part in S500 specifically includes:
s510, positioning front hand characteristic points according to a contour detection function;
specifically, the front contour map is detected through a contour detection function such as cvFindContours to obtain left and right extreme points, the left and right extreme points are respectively left and right hand feature points, and the front hand feature points include left and right hand feature points.
S520, positioning the front neck characteristic points by combining the hand characteristic points by using a maximum distance method;
specifically, as shown in fig. 5, the contour line of the neck region is obtained as the front neck contour line, the vertex midpoint in the front contour map is determined, and two front hand feature points, i.e., the left-right hand feature point and the vertex midpoint are connected to obtain two front neck feature straight lines, which are marked as α1,α2. Two frontal neck contours are denoted κ1,κ2Traversing contour points on the front neck contour, and marking the contour points as beta respectively1,β2Wherein beta is1∈κ1,β2∈κ2Calculating beta1,β2Alpha to the respective side1,α2Of Euclidean distance d1,d2. The characteristic point of the front collar part is gamma1=max(d1),Γ2=max(d2)。
S530, positioning the front shoulder characteristic points by utilizing curve fitting or eight-chain codes;
specifically, as shown in FIG. 6, the shoulder contour line is extracted, and a curve is fitted by the least square method at the point X1,X2,X3...XnFunction value y of1,y2,y3...ynObtaining a polynomial p (x) a0+a1x+...+anxkFor determining the value of a under load conditions, the equation for the right-hand side aiK, the partial derivatives are calculated to obtain k +1 equations:
and (3) the equation is collated to obtain:
formula for curvature:
the greater the curvature of a certain point of the curve, the greater the degree of curvature of the curve. Wherein the contour point with the largest curvature is the shoulder contour point.
In addition, as shown in fig. 7, the eight-chain code value proposed by Freeman assigns a value to each pixel of the contour line in the direction. The eight-chain code theory adopts 0 to 7 eight marks to represent pixel points in eight neighborhoods of a certain pixel point counterclockwise. Therefore, each continuous human body contour line can be represented by eight-chain code values of pixel points on the contour. Taking the analysis of the contour line of the shoulder of a human body as an example, starting from a pixel f0 to f8, wherein the 9 pixels all have the same code value of "0". At the f9 pixel point, the code value changes to "7", so pixels f0 through f8 can be considered as vector a 0. Similarly, the pixels f8 to f9 can be regarded as vectors a1, and the vectors are connected end to form the contour line of the shoulder of the human body. By studying the direction change between adjacent vectors in the shoulder contour line, for example, the change trend of the feature vector of the right shoulder is (0, 7, 0, 7, 0, 0, 7, 0, 7, 7, 7, 0, 0) as shown in fig. 7, 12 feature points are determined by the change trend, and then the 6 th feature point is selected as the feature point of the right shoulder. If the determined characteristic points are even numbers, the characteristic points corresponding to the middle number of the even numbers are taken as shoulder characteristic points, and for example, the 6 th characteristic point in the 12 characteristic points is taken as the corresponding shoulder characteristic point. If the odd number of feature points is determined, the middle feature point is taken as the shoulder feature point, for example, the 5 th feature point in the 11 feature points is the corresponding shoulder feature point. Then, the shoulder characteristic points can be located by traversing and querying the outline of the whole shoulder.
And S540, positioning the front characteristic points of the rest parts according to a template traversal method, a shape estimation method or a scanning line detection method.
Specifically, as shown in fig. 8, the pixel value of the template pattern in the template traversal method is (0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0), the entire chest region is recursively searched, and obviously, only the two points under the armpit are in accordance with the requirement of the template, and the two points under the armpit are the front chest feature points. By analogy, the feature points of the rest preset parts can be positioned according to a template traversal method, or the feature points of the rest preset parts such as the waist and the hip can be positioned according to a scanning line detection method.
In addition, the height of the person in the picture cannot be simply the Euclidean distance between the top of the head and the toes, because the real foot feature point is actually the heel due to the problem of the photographing angle. And the front foot feature points are positioned at the junction of the inner edges of the two soles, and feature point extraction is carried out by using a shape estimation method. For example, as shown in fig. 9, the sole is separated by 45 ° from the vertical direction, a coordinate system is set according to the feature points of the sole to be located, and a shape estimation curve function cr(s) extracted from the sole contour is set as a piecewise function, as shown in the formula

Where x(s) is the abscissa of any contour point on the foot contour, and y(s) is the ordinate of any contour point on the foot contour, and the front 1/2 model curve is located near the first section of shape curve, and the rear 1/2 model curve is located near the second section of shape curve.
Another embodiment of the present invention is an optimized embodiment of the above embodiment, and as shown in fig. 10, the main improvement of this embodiment in comparison with the first embodiment is that the step S600 of obtaining the corresponding front two-dimensional size according to the front feature points of each part and the feature information specifically includes:
s610, calculating the proportion of the front characteristic points of each part to the characteristic points of the human body in the front outline drawing;
s620, identifying height information in the characteristic information;
s630, obtaining the front two-dimensional size of each part according to the feature point proportion of each part and the height information;
specifically, pixel points representing height in the front profile are identified, the proportion of the front characteristic points of each part to the characteristic points of the human body is calculated, then the positions of the characteristic points of each part on the human body are determined according to the height information of the user, and meanwhile, the corresponding two-dimensional size can be determined by combining the pixel points representing height in the front profile and the height information.
S700, according to the mapping relation between the front outline drawing and the side outline drawing, determining the specific side feature points of each part in the side outline drawing;
s710, positioning the characteristic points of the neck at the side surface according to the side surface contour map by using an angle method;
specifically, as shown in fig. 11, the scanning line detects the side neck contour lines, the neck horizontal distance of the neck horizontal connecting line corresponding to each contour point in the side neck contour lines is determined, the neck horizontal connecting line with the largest distance value is the side neck characteristic straight line, and the side neck characteristic points are determined according to the side neck characteristic straight line and the preset neck circumference measurement inclination angle. The intersection point of the side neck characteristic straight line and the neck contour line on the front side of the person is a side neck characteristic point, the side neck characteristic straight line is rotated counterclockwise by a preset neck circumference with the side neck characteristic as the center to measure an inclination angle, for example, 25 degrees to 30 degrees, and then another side neck characteristic point on the neck contour line on the front side of the person is obtained. The preset collar circumference measurement inclination angle can be respectively set according to different clothing requirements.
S720, according to the characteristic point proportion, the front characteristic points of the rest parts are mapped to the side profile map to obtain the side characteristic points of the rest parts.
Specifically, since the frontal contour map and the side contour map are both of the same user, the proportions of the respective feature points with respect to the entire human body are the same, and the side feature points of the respective parts are determined based on the proportions of the feature points of the frontal feature points of the respective parts in the frontal contour map.
In the embodiment, the front two-dimensional size of the front characteristic points is calculated according to the height information of the user, and then the front characteristic points of each part are directly mapped on the side profile map to obtain the corresponding side characteristic points based on the mapping relation between the front profile map and the side profile map, so that the calculated amount of the system is reduced, the running speed is improved, and the problem that the front characteristic points and the side characteristic points cannot be correspondingly positioned is solved.
In one embodiment of the present invention, as shown in FIG. 12, a two-dimensionalbody measurement system 100 is provided, comprising:
an information obtaining module 110 for obtaining the characteristic information of the user;
an image obtaining module 120, which obtains a front person image and a side person image of a preset posture;
a preprocessing module 130, configured to extract contours to obtain a front contour map and a side contour map corresponding to the front person image and the side person image acquired by the image acquisition module 120 after preprocessing the front person image and the side person image;
the preprocessing module 130 specifically includes:
a format conversion unit 131 that converts the personal images, including the front personal image and the side personal images, into input pictures of a preset format, respectively;
a channel conversion unit 132, configured to perform picture channel conversion on the input picture obtained by the format conversion unit 131, and convert an RGB picture into HSV to obtain an original image;
the processing unit 133, which finds a sobel operator for the original image obtained by the channel conversion unit 132, and increases contrast and binarizes the image to obtain a black-and-white image;
the processing unit 133 is configured to obtain a maximum contour of the black-and-white image, perform erosion expansion to obtain a preprocessed image, where the preprocessed image includes a front preprocessed image and a side preprocessed image;
an outline extraction unit 134, which extracts an outline according to the front preprocessed image and the side preprocessed image obtained by the processing unit 133 to obtain a corresponding front outline image and a corresponding side outline image;
an image segmentation module 140, configured to perform image segmentation on the front profile obtained by the preprocessing module 130, and determine front profile regions corresponding to various parts of a human body;
a feature point positioning module 150, which performs feature point positioning on the front contour region corresponding to each part obtained by the image segmentation module 140 to determine front feature points of each part;
the feature point positioning module 150 specifically includes:
a feature point positioning unit 151 that positions front hand feature points according to a contour detection function;
the feature point positioning unit 151 positions the front neck feature points by using a maximum distance method in combination with the hand feature points;
the feature point positioning unit 151 positions the front shoulder feature points by using curve fitting or eight-chain codes;
the feature point positioning unit 151 positions the front feature points of the remaining portions according to a template traversal method, a shape estimation method, or a scan line detection method;
a size calculation module 160, which obtains a corresponding front two-dimensional size according to the front feature points of each part obtained by the feature point positioning module 150 and the feature information obtained by the information obtaining module 110;
the size calculating module 160 specifically includes:
proportion calculating means 161 for calculating the proportion of the feature points of the front surface of each part to the feature points of the human body in the front surface outline;
a height identifying unit 162 that identifies height information in the feature information;
a size calculation unit 163 for obtaining the two-dimensional size of each part on the front surface from the feature point ratio of each part calculated by the ratio calculation unit 161 and the height information obtained by the height identification unit 162;
the feature point positioning module 150 further comprises;
the feature point positioning unit 151 positions the feature points of the side neck according to the side profile by using an angle method;
a feature point mapping unit 152, which maps the front feature points of the rest positions located by the feature point positioning unit 151 to the side profile map according to the feature point proportion calculated by the proportion calculating unit 161 to obtain the side feature points of the rest positions;
the feature point positioning module 150 determines the side feature points of each part in the side contour map according to the front feature points of each part according to the mapping relationship between the front contour map and the side contour map;
the size calculating module 160 obtains a corresponding two-dimensional size of the side surface according to the side surface feature points of each part obtained by the feature point positioning module 150 and the feature information obtained by the information obtaining module 110.
The specific operation modes of the modules in this embodiment have been described in detail in the corresponding method embodiments, and thus are not described in detail again.
An embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out all or part of the method steps of the first embodiment.
The present invention can implement all or part of the flow in the method of the first embodiment, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.