Face three-dimensional model area measurement method and device, electronic equipment and storage medium

By generating ordered three-dimensional control points and closed edge lines on the three-dimensional model, the problems of complex operation and poor accuracy in the traditional three-dimensional model area measurement methods are solved, and simple, visual and high-precision area measurement is achieved.

CN119478016APending Publication Date: 2025-02-18SHINING 3D TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411586231.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When selecting the area to be measured in the traditional three-dimensional model, the operation is complicated, the selected area to be measured lacks continuity, and the accuracy of brush operation is poor.

Method used

By loading and displaying the three-dimensional model of the face to be measured in the plane display area, an ordered three-dimensional control point is generated according to the user's point selection operation, and then a three-dimensional closed edge line is generated, and the three-dimensional grid area to be measured surrounded by the three-dimensional closed edge line is determined. And measure it in area.

Benefits of technology

It realizes simple operation and visual three-dimensional model area measurement, ensures the continuity of the area to be measured, and improves the measurement accuracy, so that the resulting three-dimensional closed edge line and area to be measured are more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478016A_ABST
    Figure CN119478016A_ABST
Patent Text Reader

Abstract

The invention provides a face three-dimensional model area measurement method and device, electronic equipment and a storage medium, in the method, a user can perform click operation on a to-be-measured face three-dimensional model so as to obtain ordered three-dimensional control points, a three-dimensional closed edge line is generated according to the plurality of ordered three-dimensional control points, and finally, the area of the to-be-measured face three-dimensional model is measured. Area measurement of the to-be-measured three-dimensional grid region of the to-be-measured face three-dimensional model surrounded by the three-dimensional closed edge line is realized, that is, the surface area of the face three-dimensional model is measured by adding the control point closed edge line, the operation is simple and visual, the determined to-be-measured three-dimensional grid region is continuous, and the measurement accuracy is high. Moreover, the mode of automatically generating the three-dimensional control points through the click operation is high in precision, and the finally obtained three-dimensional closed edge line and the to-be-measured three-dimensional grid region surrounded by the three-dimensional closed edge line are more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of measurement, and in particular to a method, device, electronic equipment and storage medium for measuring the area of ​​a three-dimensional face model. Background Art

[0002] At present, products related to area measurement generally use a brush to select the area to be measured on a 3D model, such as Figure 1 As shown, the software automatically measures the area size of the above area according to the selected area to be measured.

[0003] The above method of selecting the area to be measured by brushing is prone to penetration, that is, the selected area to be measured lacks continuity; in addition, it is difficult to select the area to be measured at the turning point by brushing.

[0004] In summary, the traditional area measurement method of a three-dimensional model has technical problems such as complex operation when selecting the area to be measured, lack of continuity of the selected area to be measured, and poor accuracy when operating with a brush. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, electronic device and storage medium for measuring the area of ​​a three-dimensional face model, so as to alleviate the technical problems of the traditional three-dimensional model area measurement method, such as complex operation when selecting the area to be measured, lack of continuity of the selected area to be measured, and poor accuracy during brush operation.

[0006] In a first aspect, an embodiment of the present invention provides a method for measuring the area of ​​a three-dimensional face model, comprising:

[0007] Loading and displaying the three-dimensional model of the face to be tested in the plane display area, and generating ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and displaying them on the display plane, wherein the order between the three-dimensional control points is related to the order of the point selection operation of the user, and the three-dimensional control point is the ray perpendicular to the display plane and pointing to the three-dimensional model of the face to be tested, which is drawn from the point selection operation position displayed on the display plane, and the first intersection point of the ray with the three-dimensional model of the face to be tested;

[0008] Generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points;

[0009] Determine, according to the three-dimensional closed edge line, a three-dimensional grid area to be measured of the three-dimensional model of the face to be measured that is surrounded by the three-dimensional closed edge line;

[0010] The area of ​​the three-dimensional grid region to be measured is measured to obtain the area of ​​the three-dimensional grid region to be measured.

[0011] Furthermore, generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points comprises:

[0012] A current three-dimensional edge line is generated between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and all generated three-dimensional edge lines are optimized according to the current three-dimensional control point to make the three-dimensional edge lines on both sides of each three-dimensional control point transition smoothly until the current three-dimensional control point is the starting three-dimensional control point, thereby obtaining the three-dimensional closed edge line.

[0013] Furthermore, generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points comprises:

[0014] A current three-dimensional edge line is generated between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and the previous three-dimensional edge line is optimized according to the current three-dimensional control point so that the three-dimensional edge lines on both sides of the current three-dimensional control point have a smooth transition until the current three-dimensional control point is the starting three-dimensional control point, thereby obtaining the three-dimensional closed edge line.

[0015] Furthermore, a current three-dimensional edge line is generated between the current three-dimensional control point and the previous three-dimensional control point by using a spline curve, including:

[0016] If the distance between the current three-dimensional control point and the previous three-dimensional control point is greater than a preset distance threshold, generating an additional three-dimensional control point between the current three-dimensional control point and the previous three-dimensional control point;

[0017] The current three-dimensional edge line is generated between the previous three-dimensional control point, the additional three-dimensional control point and the current three-dimensional control point in a manner of the spline curve.

[0018] Further, determining the three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line includes:

[0019] Determining a three-dimensional edge line extreme point in a first target direction according to the three-dimensional closed edge line, wherein the first target direction is an arbitrary direction;

[0020] Starting from the extreme point of the three-dimensional edge line, traverse the three-dimensional closed edge line along the second target direction, and when bifurcation occurs, traverse along the outer three-dimensional edge line until returning to the extreme point of the three-dimensional edge line again, to obtain the maximum area enclosed by the three-dimensional closed edge line, wherein the second target direction includes any one of the following directions: clockwise direction, counterclockwise direction;

[0021] The maximum area surrounded by the three-dimensional closed edge line is used as the three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the three-dimensional closed edge line.

[0022] Further, performing area measurement on the three-dimensional grid area to be measured includes:

[0023] If the first target triangle in the three-dimensional mesh area to be measured is not divided by the three-dimensional closed edge line, calculating the area of ​​the first target triangle according to the three-dimensional coordinates of the vertices of the first target triangle;

[0024] If a second target triangle in the three-dimensional mesh area to be measured is segmented by the three-dimensional closed edge line, subdividing the second target triangle into second target sub-triangles using the three-dimensional edge line used for segmentation as a segmentation line, and calculating the area of ​​the second target sub-triangle according to the three-dimensional coordinates of the vertices of the second target sub-triangle, wherein the second target sub-triangle is a triangle located in the three-dimensional mesh area to be measured;

[0025] The area of ​​the three-dimensional mesh region to be measured is calculated according to the area of ​​the first target triangle and the area of ​​the second target sub-triangle.

[0026] Furthermore, the method further comprises:

[0027] adjusting the position of the target three-dimensional control point on the three-dimensional closed edge line according to a user's dragging operation on the target three-dimensional control point;

[0028] Update the three-dimensional closed edge line according to the adjusted position of the target three-dimensional control point;

[0029] Determine, according to the updated three-dimensional closed edge line, an updated three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured that is surrounded by the updated three-dimensional closed edge line;

[0030] The area of ​​the updated three-dimensional grid region to be measured is measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

[0031] Furthermore, the method further comprises:

[0032] Determine two endpoints of the three-dimensional edge line closest to the new three-dimensional control point according to the operation of adding a new three-dimensional control point on the three-dimensional closed edge line by the user, and calculate the closest point of the line segment formed by the new three-dimensional control point and the two endpoints;

[0033] Determine whether the distance from the new three-dimensional control point to the nearest point is less than a preset line segment width;

[0034] If it is less than, it is determined that the new 3D control point is projected to the nearest 3D edge line, and the operation of adding the new 3D control point to the nearest 3D edge line is completed.

[0035] Furthermore, the method further comprises:

[0036] Deleting the target three-dimensional control point on the three-dimensional closed edge line according to a user's deletion operation on the target three-dimensional control point;

[0037] updating the three-dimensional closed edge line according to the remaining three-dimensional control points on the three-dimensional closed edge line;

[0038] Determine, according to the updated three-dimensional closed edge line, an updated three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured that is surrounded by the updated three-dimensional closed edge line;

[0039] The area of ​​the updated three-dimensional grid region to be measured is measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

[0040] In a second aspect, an embodiment of the present invention further provides an area measurement device for a three-dimensional face model, comprising:

[0041] A first generating unit is used to load and display the three-dimensional model of the face to be tested in the plane display area, and generate ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and display them on the display plane, wherein the order between the three-dimensional control points is related to the point selection operation order of the user, and the three-dimensional control point is a ray perpendicular to the display plane and pointing to the three-dimensional model of the face to be tested, which is drawn from the point selection operation position displayed on the display plane, and the first intersection point of the ray with the three-dimensional model of the face to be tested;

[0042] A second generating unit, configured to generate a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points;

[0043] A determination unit, configured to determine, according to the three-dimensional closed edge line, a three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured and surrounded by the three-dimensional closed edge line;

[0044] The area measuring unit is used to measure the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured.

[0045] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0046] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.

[0047] In an embodiment of the present invention, a method for measuring the area of ​​a three-dimensional face model is provided, comprising: loading and displaying the three-dimensional face model to be measured in a plane display area, and generating ordered three-dimensional control points according to a point selection operation performed by a user on the three-dimensional face model to be measured, and displaying the points on the display plane, wherein the order between the three-dimensional control points is related to the order of the point selection operation performed by the user, the three-dimensional control point is a ray drawn from a point selection operation position displayed on the display plane, which is perpendicular to the display plane and points to the three-dimensional face model to be measured, and the first intersection point of the ray with the three-dimensional face model to be measured; generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points; determining a three-dimensional grid area to be measured of the three-dimensional face model to be measured which is surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line; and measuring the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured. It can be seen from the above description that in the area measurement method of the human face three-dimensional model of the present invention, the user can perform a point selection operation on the human face three-dimensional model to be measured, so as to obtain ordered three-dimensional control points, and then generate a three-dimensional closed edge line according to multiple ordered three-dimensional control points. Finally, the area measurement of the three-dimensional grid area to be measured of the human face three-dimensional model to be measured surrounded by the three-dimensional closed edge line is realized, that is, the surface area of ​​the human face three-dimensional model is measured by adding control points to close the edge line. The operation is simple and visual, the determined three-dimensional grid area to be measured is continuous, and the method of automatically generating three-dimensional control points by point selection operation has high accuracy. The finally obtained three-dimensional closed edge line and the three-dimensional grid area to be measured surrounded by the three-dimensional closed edge line are more accurate, which alleviates the technical problems of the traditional three-dimensional model area measurement method in selecting the area to be measured, such as complex operation, lack of continuity of the selected area to be measured, and poor accuracy during brush operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic diagram of selecting the area to be measured on a 3D model by brushing provided by the traditional technology;

[0050] Figure 2A flowchart of a method for measuring the area of ​​a three-dimensional face model provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of generating ordered three-dimensional control points provided by an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of a three-dimensional closed edge line in the case of a three-dimensional edge line self-intersecting provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of a three-dimensional closed edge line provided by an embodiment of the present invention when the three-dimensional edge lines do not intersect;

[0054] Figure 6 A schematic diagram of a three-dimensional control point of a drag target provided by an embodiment of the present invention;

[0055] Figure 7 A schematic diagram of adding, dragging and deleting control points provided by an embodiment of the present invention;

[0056] Figure 8 A schematic diagram of a device for measuring the area of ​​a three-dimensional face model provided by an embodiment of the present invention;

[0057] Fig. 9 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The traditional area measurement method of three-dimensional models has the following problems: when selecting the area to be measured, the operation is complicated, the selected area to be measured lacks continuity, and the accuracy is poor when using a brush.

[0060] Based on this, in the area measurement method of the human face 3D model of the present invention, the user can perform a point selection operation on the human face 3D model to be measured, so as to obtain ordered 3D control points, and then generate a 3D closed edge line according to multiple ordered 3D control points. Finally, the area measurement of the 3D grid area to be measured of the human face 3D model to be measured surrounded by the 3D closed edge line is realized, that is, the surface area of ​​the human face 3D model is measured by adding control points to close the edge line. The operation is simple and visual, the determined 3D grid area to be measured is continuous, and the method of automatically generating 3D control points by point selection operation has high precision, and the finally obtained 3D closed edge line and the 3D grid area to be measured surrounded by the 3D closed edge line are more accurate.

[0061] To facilitate understanding of this embodiment, a method for measuring the area of ​​a three-dimensional face model disclosed in an embodiment of the present invention is first introduced in detail.

[0062] Embodiment 1:

[0063] According to an embodiment of the present invention, an embodiment of a method for measuring the area of ​​a three-dimensional face model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0064] Figure 2 FIG. 1 is a flow chart of a method for measuring the area of ​​a three-dimensional face model according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0065] Step S202, loading and displaying the three-dimensional model of the face to be tested in the plane display area, and generating ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and displaying them on the display plane, wherein the order between the three-dimensional control points is related to the point selection operation order of the user, and the three-dimensional control point is the point selection operation position displayed on the display plane, the ray drawn out from the vertical display plane and pointing to the three-dimensional model of the face to be tested, and the first intersection point of the ray with the three-dimensional model of the face to be tested;

[0066] In an embodiment of the present invention, the above-mentioned method for measuring the area of ​​a 3D face model can be implemented by 3D model area measurement software. When measuring the area of ​​a 3D face model to be measured, the above-mentioned software first loads and displays the 3D face model to be measured, such as Figure 3 As shown, in this way, the user can select points on the 3D model of the face to be tested. When performing the point selection operation, an ordered 3D control point (i.e., the world coordinates of the 3D model) is generated. The above point selection operation can be performed by mouse clicks, touch clicks, etc., and the following is obtained: Figure 3 , and then when the point selection operation position is suspended to other positions on the screen (i.e., display plane), the point selection operation is performed again to obtain the three-dimensional control point B, and then the three-dimensional control points C, D, E, F... are added in sequence until they are connected and closed with A, so that multiple ordered three-dimensional control points related to the user's point selection operation sequence can be obtained. Among the above multiple ordered three-dimensional control points, the starting three-dimensional control point and the ending three-dimensional control point are the same.

[0067] Step S204, generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points;

[0068] Specifically, during implementation, after all ordered three-dimensional control points are generated, a three-dimensional closed edge line is generated based on multiple ordered three-dimensional control points, or each time an ordered three-dimensional control point is generated, a three-dimensional edge line is generated between the point and the previous three-dimensional control point, so that a three-dimensional closed edge line is finally obtained.

[0069] Step S206, determining a to-be-measured three-dimensional grid area of ​​the to-be-measured face three-dimensional model surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line;

[0070] Step S208: measuring the area of ​​the three-dimensional grid region to be measured to obtain the area of ​​the three-dimensional grid region to be measured.

[0071] It should be noted that if there is another three-dimensional closed edge line inside the above-mentioned three-dimensional closed edge line, then the three-dimensional grid area to be measured should be the area surrounded by the two three-dimensional closed edge lines. When measuring the area, the area of ​​the three-dimensional grid area to be measured surrounded by the outer three-dimensional closed edge line is subtracted from the area of ​​the three-dimensional grid area to be measured surrounded by the inner three-dimensional closed edge line, which is the area of ​​the area surrounded by the two three-dimensional closed edge lines, thereby realizing the measurement of the void area.

[0072] In an embodiment of the present invention, a method for measuring the area of ​​a three-dimensional face model is provided, comprising: loading and displaying the three-dimensional face model to be measured in a plane display area, and generating ordered three-dimensional control points according to a point selection operation performed by a user on the three-dimensional face model to be measured, and displaying the points on the display plane, wherein the order between the three-dimensional control points is related to the order of the point selection operation performed by the user, the three-dimensional control point is a ray drawn from a point selection operation position displayed on the display plane, which is perpendicular to the display plane and points to the three-dimensional face model to be measured, and the first intersection point of the ray with the three-dimensional face model to be measured; generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points; determining a three-dimensional grid area to be measured of the three-dimensional face model to be measured which is surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line; and measuring the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured. It can be seen from the above description that in the area measurement method of the human face three-dimensional model of the present invention, the user can perform a point selection operation on the human face three-dimensional model to be measured, so as to obtain ordered three-dimensional control points, and then generate a three-dimensional closed edge line according to multiple ordered three-dimensional control points. Finally, the area measurement of the three-dimensional grid area to be measured of the human face three-dimensional model to be measured surrounded by the three-dimensional closed edge line is realized, that is, the surface area of ​​the human face three-dimensional model is measured by adding control points to close the edge line. The operation is simple and visual, the determined three-dimensional grid area to be measured is continuous, and the method of automatically generating three-dimensional control points by point selection operation has high accuracy. The finally obtained three-dimensional closed edge line and the three-dimensional grid area to be measured surrounded by the three-dimensional closed edge line are more accurate, which alleviates the technical problems of the traditional three-dimensional model area measurement method in selecting the area to be measured, such as complex operation, lack of continuity of the selected area to be measured, and poor accuracy during brush operation.

[0073] The above content briefly introduces the area measurement method of the three-dimensional face model of the present invention. The specific contents involved are described in detail below.

[0074] In an optional embodiment of the present invention, generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points specifically includes the following steps:

[0075] The current 3D edge line is generated between the current 3D control point and the previous 3D control point using a spline curve, and all generated 3D edge lines are optimized according to the current 3D control point to make the 3D edge lines on both sides of each 3D control point transition smoothly until the current 3D control point is the starting 3D control point, thus obtaining a 3D closed edge line.

[0076] In an optional embodiment of the present invention, generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points specifically includes the following steps:

[0077] A spline curve is used to generate the current 3D edge line between the current 3D control point and the previous 3D control point, and the previous 3D edge line is optimized according to the current 3D control point to make the 3D edge lines on both sides of the current 3D control point transition smoothly until the current 3D control point is the starting 3D control point, thus obtaining a 3D closed edge line.

[0078] Specifically, when each current 3D control point is generated, a current 3D edge line is generated between the current 3D control point and the previous 3D control point using a spline curve, and the previous 3D edge line is optimized based on the current 3D control point to make the 3D edge lines on both sides of the current 3D control point transition smoothly. Specifically, the 3D edge lines between the 3D control points can be interpolated using a spline curve until the current 3D control point is the starting 3D control point to obtain a 3D closed edge line.

[0079] In an optional embodiment of the present invention, a current three-dimensional edge line is generated between a current three-dimensional control point and a previous three-dimensional control point by using a spline curve, which specifically includes the following steps:

[0080] (1) if the distance between the current 3D control point and the previous 3D control point is greater than a preset distance threshold, generating an additional 3D control point between the current 3D control point and the previous 3D control point;

[0081] Specifically, the additional three-dimensional control points are generated so that the distance between two adjacent three-dimensional control points is smaller than a preset distance threshold.

[0082] The system has a preset distance threshold between two 3D control points. If the distance between the two 3D control points is greater than the preset distance threshold, additional 3D control points will be generated to ensure that the distance between adjacent 3D control points is not greater than the preset distance threshold. If the distance between the two 3D control points is too large, multiple additional 3D control points may be generated.

[0083] (2) Generate a current 3D edge line between the previous 3D control point, the additional 3D control point and the current 3D control point using a spline curve.

[0084] Specifically, the generation of two-dimensional edge lines is real-time and visual, achieving the goal of "connecting whatever you click" and the connection transition is smooth after closure.

[0085] In an optional embodiment of the present invention, determining the to-be-measured three-dimensional grid area of ​​the to-be-measured three-dimensional model of the face surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line specifically comprises the following steps:

[0086] (1) determining a three-dimensional edge line extreme point in a first target direction according to the three-dimensional closed edge line, wherein the first target direction is an arbitrary direction;

[0087] (2) starting from the extreme point of the three-dimensional edge line, traversing the three-dimensional closed edge line along the second target direction, and when a bifurcation occurs, traversing along the outer three-dimensional edge line until returning to the extreme point of the three-dimensional edge line again, to obtain the maximum area surrounded by the three-dimensional closed edge line, wherein the second target direction includes any of the following directions: clockwise direction, counterclockwise direction;

[0088] (3) The maximum area enclosed by the three-dimensional closed edge line is used as the three-dimensional grid area to be measured of the three-dimensional model of the face to be measured enclosed by the three-dimensional closed edge line.

[0089] Specifically, in order to support users to edit 3D edge lines in any direction and to arbitrarily intersect 3D edge lines, care needs to be taken when selecting the internal area of ​​the 3D closed edge line. The maximum area enclosed by the 3D closed edge line can be obtained by the following steps:

[0090] 1) Select the extreme point of the 3D edge line: Randomly select any direction, and the contour extreme point in this direction is used as the extreme point of the 3D edge line. If there are multiple extreme points of the 3D edge line, the direction can be re-randomized;

[0091] 2) Traverse the three-dimensional closed edge line from a selected three-dimensional edge line extreme point, and walk along the outer three-dimensional edge line when bifurcation occurs (usually using the common rolling ball method);

[0092] 3) Until the extreme point of the three-dimensional edge line (i.e., the starting point) is reached, a circle of outer enclosing contours is obtained, that is, the maximum area enclosed by the three-dimensional closed edge line is obtained, such as Figure 4 As shown, for the case of self-intersection of three-dimensional edge lines, the maximum enclosing area is taken for calculation.

[0093] In an optional embodiment of the present invention, the area measurement of the three-dimensional grid region to be measured specifically includes the following steps:

[0094] (1) if the first target triangle in the three-dimensional mesh area to be measured is not divided by the three-dimensional closed edge line, the area of ​​the first target triangle is calculated according to the three-dimensional coordinates of the vertices of the first target triangle;

[0095] Specifically, the area of ​​the first target triangle is equal to half of the cross product of vectors formed by the three-dimensional coordinates of two vertices of the first target triangle.

[0096] (2) if the second target triangle in the three-dimensional mesh area to be measured is divided by a three-dimensional closed edge line, subdividing the second target triangle into second target sub-triangles using the three-dimensional edge line used for division as a dividing line, and calculating the area of ​​the second target sub-triangle according to the three-dimensional coordinates of the vertices of the second target sub-triangle, wherein the second target sub-triangle is a triangle located in the three-dimensional mesh area to be measured;

[0097] (3) Calculate the area of ​​the three-dimensional grid region to be measured based on the area of ​​the first target triangle and the area of ​​the second target sub-triangle.

[0098] Specifically, Figure 5 As shown, after the three-dimensional edge line is connected and closed, the second target triangle that intersects with the three-dimensional edge line is subdivided. For a second target triangle, all the three-dimensional edge lines that intersect with it are collected, and these three-dimensional edge lines are used as dividing lines to subdivide this second target triangle into smaller triangles (i.e., second target sub-triangles). By walking along the three-dimensional closed edge line, all the second target triangles near the three-dimensional edge line can be subdivided to obtain the second target sub-triangle located in the three-dimensional grid area to be measured, and then the area of ​​the second target sub-triangle is calculated according to the three-dimensional coordinates of the vertices of the second target sub-triangle. According to the formula: the area of ​​a triangle is equal to half of the size of the cross product of the vectors formed by the three-dimensional coordinates of the two vertices, and the calculation is performed by traversal. Finally, the calculated areas of all the first target triangles and all the second target sub-triangles are added together to obtain the area of ​​the three-dimensional grid area to be measured.

[0099] In an optional embodiment of the present invention, the method further comprises the following steps:

[0100] (1) adjusting the position of the target 3D control point according to the user's dragging operation on the target 3D control point on the 3D closed edge line;

[0101] (2) updating the three-dimensional closed edge line according to the adjusted position of the target three-dimensional control point;

[0102] (3) determining an updated three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the updated three-dimensional closed edge line according to the updated three-dimensional closed edge line;

[0103] (4) Measuring the area of ​​the updated three-dimensional grid region to be measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

[0104] Specifically, Figure 6 As shown, when the user makes an error operation or is not satisfied with the measurement result, the user drags the target 3D control point B to the B' position, and the 3D edge line is redrawn in real time. When the drag is released, a new updated 3D closed edge line and an updated 3D mesh area to be measured are generated, and the area of ​​the updated 3D mesh area to be measured is recalculated.

[0105] In an optional embodiment of the present invention, the method further comprises the following steps:

[0106] (1) according to the operation of adding a new 3D control point on the 3D closed edge line by the user, determining the two endpoints of the 3D edge line closest to the new 3D control point, and calculating the closest point of the line segment formed by the new 3D control point and the two endpoints;

[0107] (2) determining whether the distance from the new 3D control point to the nearest point is less than the preset line segment width;

[0108] (3) If it is less than , the new 3D control point is projected to the nearest 3D edge line, and the operation of adding the new 3D control point to the nearest 3D edge line is completed.

[0109] Specifically, for the flexibility of interaction, the present invention implements manually adding new three-dimensional control points on the edge line to achieve a more accurate area envelope.

[0110] like Figure 7 As shown, because the 3D closed edge line is composed of multiple 3D edge lines, the mouse position P (i.e., the new 3D control point) is calculated to the two endpoints BC of the nearest 3D edge line, and then the nearest point Q of the line segment BC formed by the new 3D control point and the two endpoints is calculated. It is determined whether the length of PQ is less than the preset line segment width, and based on this, it is determined whether the new 3D control point is projected onto the nearest 2D edge line and the corresponding 3D coordinate Q. After adding a new 3D control point, you can also drag the new 3D control point, and the edge line will be updated in real time according to the positions of all 3D control points.

[0111] In an optional embodiment of the present invention, the method further comprises the following steps:

[0112] (1) deleting the target 3D control point on the 3D closed edge line according to the user's deletion operation;

[0113] (2) updating the three-dimensional closed edge line according to the remaining three-dimensional control points on the three-dimensional closed edge line;

[0114] (3) determining an updated three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the updated three-dimensional closed edge line according to the updated three-dimensional closed edge line;

[0115] (4) Measuring the area of ​​the updated three-dimensional grid region to be measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

[0116] Specifically, after deleting the target 3D control point, the 3D edge line will also be updated in real time according to all the remaining 3D control points that currently exist. Finally, when the mouse is released, the updated 3D closed edge line is obtained, and finally the updated 3D mesh area to be measured surrounded by the updated 3D closed edge line is determined (that is, the model triangular mesh is accurately divided using the updated 3D closed edge line), and the area of ​​the updated 3D mesh area to be measured is calculated.

[0117] The area measurement method of the three-dimensional face model of the present invention realizes the visual, accurate and effective measurement of the surface area on the three-dimensional face model, and can adjust the measurement position in real time. It also solves the difficult problems of complex surface measurement, edge line intersection measurement, geometric edge and cavity measurement, etc.

[0118] The key points of the present invention include:

[0119] 1. Surface area measurement method of closing edge lines by adding control points one by one;

[0120] 2. Use the edge line to first roughly divide the inner and outer triangular meshes, and then finely divide the triangular meshes where the edge line passes;

[0121] 3. Drag, add, and delete control points to generate new closed areas.

[0122] The present invention has the following advantages:

[0123] 1. Measure the surface area of ​​3D models by adding control points to close edge lines. The operation is simple and visual.

[0124] 2. Automatically smooth edge lines to optimize user experience. Triangular meshes are cut by coarse and fine division, and the area results obtained are accurate and reliable.

[0125] 3. Control points can be dragged, added, and deleted, allowing users to adjust measurement results according to actual needs.

[0126] Embodiment 2:

[0127] An embodiment of the present invention also provides an area measurement device for a three-dimensional face model. The area measurement device for a three-dimensional face model is mainly used to execute the area measurement method for a three-dimensional face model provided in Embodiment 1 of the present invention. The following is a specific introduction to the area measurement device for a three-dimensional face model provided in the embodiment of the present invention.

[0128] Figure 8 is a schematic diagram of a device for measuring the area of ​​a three-dimensional face model according to an embodiment of the present invention. Figure 8 As shown, the device mainly includes: a first generating unit 10, a second generating unit 20, a determining unit 30 and an area measuring unit 40, wherein:

[0129] A first generating unit is used to load and display the three-dimensional model of the face to be tested in the plane display area, and generate ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and display them on the display plane, wherein the order between the three-dimensional control points is related to the point selection operation order of the user, and the three-dimensional control point is the point selection operation position displayed on the display plane, the ray drawn out from the vertical display plane and pointing to the three-dimensional model of the face to be tested, and the first intersection point of the ray with the three-dimensional model of the face to be tested;

[0130] A second generating unit, used for generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points;

[0131] A determination unit, used to determine a three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line;

[0132] The area measurement unit is used to measure the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured.

[0133] In an embodiment of the present invention, a device for measuring the area of ​​a three-dimensional face model is provided, comprising: loading and displaying a three-dimensional face model to be measured in a plane display area, and generating ordered three-dimensional control points according to a point selection operation performed by a user on the three-dimensional face model to be measured, and displaying the points on the display plane, wherein the order between the three-dimensional control points is related to the point selection operation order of the user, the three-dimensional control point is a ray drawn from a point selection operation position displayed on the display plane, which is perpendicular to the display plane and points to the three-dimensional face model to be measured, and the first intersection point of the ray with the three-dimensional face model to be measured; generating a three-dimensional closed edge line according to a plurality of ordered three-dimensional control points; determining a three-dimensional grid area to be measured of the three-dimensional face model to be measured surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line; and measuring the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured. It can be seen from the above description that in the area measurement device of the three-dimensional face model of the present invention, the user can perform a point selection operation on the three-dimensional face model to be measured, so as to obtain ordered three-dimensional control points, and then generate a three-dimensional closed edge line according to multiple ordered three-dimensional control points. Finally, the area measurement of the three-dimensional grid area to be measured of the three-dimensional face model to be measured surrounded by the three-dimensional closed edge line is realized, that is, the surface area of ​​the three-dimensional face model is measured by adding control points to close the edge line. The operation is simple and visual, the determined three-dimensional grid area to be measured is continuous, and the method of automatically generating three-dimensional control points by point selection operation has high accuracy. The finally obtained three-dimensional closed edge line and the three-dimensional grid area to be measured surrounded by the three-dimensional closed edge line are more accurate, which alleviates the technical problems of the traditional three-dimensional model area measurement method in selecting the area to be measured, such as complex operation, lack of continuity of the selected area to be measured, and poor accuracy during brush operation.

[0134] Optionally, the second generation unit is also used to: generate a current three-dimensional edge line between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and optimize all generated three-dimensional edge lines based on the current three-dimensional control point to make the three-dimensional edge lines on both sides of each three-dimensional control point transition smoothly, until the current three-dimensional control point is the starting three-dimensional control point, and a three-dimensional closed edge line is obtained.

[0135] Optionally, the second generation unit is also used to: generate a current three-dimensional edge line between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and optimize the previous three-dimensional edge line based on the current three-dimensional control point to make the three-dimensional edge lines on both sides of the current three-dimensional control point transition smoothly, until the current three-dimensional control point is the starting three-dimensional control point, and a three-dimensional closed edge line is obtained.

[0136] Optionally, the second generation unit is also used to: if the distance between the current three-dimensional control point and the previous three-dimensional control point is greater than a preset distance threshold, generate an additional three-dimensional control point between the current three-dimensional control point and the previous three-dimensional control point; and generate the current three-dimensional edge line between the previous three-dimensional control point, the additional three-dimensional control point and the current three-dimensional control point using a spline curve.

[0137] Optionally, the determination unit is also used to: determine the three-dimensional edge line extreme point of the first target direction based on the three-dimensional closed edge line, wherein the first target direction is an arbitrary direction; traverse the three-dimensional closed edge line along the second target direction starting from the three-dimensional edge line extreme point, and when a bifurcation occurs, traverse along the outer three-dimensional edge line until returning to the three-dimensional edge line extreme point again, to obtain the maximum area enclosed by the three-dimensional closed edge line, wherein the second target direction includes any one of the following directions: clockwise, counterclockwise; and use the maximum area enclosed by the three-dimensional closed edge line as the three-dimensional grid area to be measured of the three-dimensional model of the face to be measured enclosed by the three-dimensional closed edge line.

[0138] Optionally, the area measurement unit is also used for: if the first target triangle in the three-dimensional mesh area to be measured is not divided by a three-dimensional closed edge line, then calculating the area of ​​the first target triangle according to the three-dimensional coordinates of the vertices of the first target triangle; if the second target triangle in the three-dimensional mesh area to be measured is divided by a three-dimensional closed edge line, then subdividing the second target triangle into second target sub-triangles using the three-dimensional edge line used for division as a dividing line, and calculating the area of ​​the second target sub-triangle according to the three-dimensional coordinates of the vertices of the second target sub-triangle, wherein the second target sub-triangle is a triangle located in the three-dimensional mesh area to be measured; and calculating the area of ​​the three-dimensional mesh area to be measured according to the area of ​​the first target triangle and the area of ​​the second target sub-triangle.

[0139] Optionally, the device is also used to: adjust the position of the target three-dimensional control point according to the user's dragging operation on the target three-dimensional control point on the three-dimensional closed edge line; update the three-dimensional closed edge line according to the adjusted position of the target three-dimensional control point; determine an updated three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the updated three-dimensional closed edge line according to the updated three-dimensional closed edge line; and measure the area of ​​the updated three-dimensional grid area to be measured to obtain the area of ​​the updated three-dimensional grid area to be measured.

[0140] Optionally, the device is also used to: determine the two endpoints of the three-dimensional edge line closest to the new three-dimensional control point based on the user's operation of adding a new three-dimensional control point on the three-dimensional closed edge line, and calculate the nearest point of the line segment formed by the new three-dimensional control point to the two endpoints; determine whether the length from the new three-dimensional control point to the nearest point is less than a preset line segment width; if less than, determine that the new three-dimensional control point is projected to the nearest three-dimensional edge line, and complete the operation of adding the new three-dimensional control point on the nearest three-dimensional edge line.

[0141] Optionally, the device is also used to: delete the target three-dimensional control point on the three-dimensional closed edge line according to the user's deletion operation on the target three-dimensional control point; update the three-dimensional closed edge line according to the remaining three-dimensional control points on the three-dimensional closed edge line; determine the updated three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the updated three-dimensional closed edge line according to the updated three-dimensional closed edge line; measure the area of ​​the updated three-dimensional grid area to be measured to obtain the area of ​​the updated three-dimensional grid area to be measured.

[0142] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0143] like Fig. 9 As shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the area measurement method of the three-dimensional face model as described above.

[0144] Specifically, the above-mentioned memory 602 and processor 601 can be general-purpose memories and processors, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, it can execute the above-mentioned area measurement method of the three-dimensional face model.

[0145] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0146] Corresponding to the above-mentioned method for measuring the area of ​​a three-dimensional face model, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned method for measuring the area of ​​a three-dimensional face model.

[0147] The area measurement device of the three-dimensional face model provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present application are the same as those of the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0148] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0149] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0152] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or partly be embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the area measurement method of the three-dimensional face model described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0153] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0154] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for measuring the area of ​​a three-dimensional face model, characterized in that: include: Loading and displaying the three-dimensional model of the face to be tested in the plane display area, and generating ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and displaying them on the display plane, wherein the order between the three-dimensional control points is related to the order of the point selection operation of the user, and the three-dimensional control point is the ray perpendicular to the display plane and pointing to the three-dimensional model of the face to be tested, which is drawn from the point selection operation position displayed on the display plane, and the first intersection point of the ray with the three-dimensional model of the face to be tested; Generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points; Determine, according to the three-dimensional closed edge line, a three-dimensional grid area to be measured of the three-dimensional model of the face to be measured that is surrounded by the three-dimensional closed edge line; The area of ​​the three-dimensional grid region to be measured is measured to obtain the area of ​​the three-dimensional grid region to be measured.

2. The method according to claim 1, characterized in that Generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points comprises: A current three-dimensional edge line is generated between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and all generated three-dimensional edge lines are optimized according to the current three-dimensional control point to make the three-dimensional edge lines on both sides of each three-dimensional control point transition smoothly until the current three-dimensional control point is the starting three-dimensional control point, thereby obtaining the three-dimensional closed edge line.

3. The method according to claim 1, characterized in that Generating a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points comprises: A current three-dimensional edge line is generated between the current three-dimensional control point and the previous three-dimensional control point using a spline curve, and the previous three-dimensional edge line is optimized according to the current three-dimensional control point so that the three-dimensional edge lines on both sides of the current three-dimensional control point have a smooth transition until the current three-dimensional control point is the starting three-dimensional control point, thereby obtaining the three-dimensional closed edge line.

4. The method according to claim 3, characterized in that The current 3D edge line is generated between the current 3D control point and the previous 3D control point by using a spline curve, including: If the distance between the current three-dimensional control point and the previous three-dimensional control point is greater than a preset distance threshold, generating an additional three-dimensional control point between the current three-dimensional control point and the previous three-dimensional control point; The current three-dimensional edge line is generated between the previous three-dimensional control point, the additional three-dimensional control point and the current three-dimensional control point in a manner of the spline curve.

5. The method according to claim 1, characterized in that: Determining a three-dimensional grid area to be measured of the three-dimensional model of the face to be measured and surrounded by the three-dimensional closed edge line according to the three-dimensional closed edge line includes: Determining a three-dimensional edge line extreme point in a first target direction according to the three-dimensional closed edge line, wherein the first target direction is an arbitrary direction; Starting from the extreme point of the three-dimensional edge line, traverse the three-dimensional closed edge line along the second target direction, and when bifurcation occurs, traverse along the outer three-dimensional edge line until returning to the extreme point of the three-dimensional edge line again, to obtain the maximum area enclosed by the three-dimensional closed edge line, wherein the second target direction includes any one of the following directions: clockwise direction, counterclockwise direction; The maximum area surrounded by the three-dimensional closed edge line is used as the three-dimensional grid area to be measured of the three-dimensional model of the face to be measured surrounded by the three-dimensional closed edge line.

6. The method according to claim 1, characterized in that Measuring the area of ​​the three-dimensional grid area to be measured includes: If the first target triangle in the three-dimensional mesh area to be measured is not divided by the three-dimensional closed edge line, calculating the area of ​​the first target triangle according to the three-dimensional coordinates of the vertices of the first target triangle; If a second target triangle in the three-dimensional mesh area to be measured is segmented by the three-dimensional closed edge line, subdividing the second target triangle into second target sub-triangles using the three-dimensional edge line used for segmentation as a segmentation line, and calculating the area of ​​the second target sub-triangle according to the three-dimensional coordinates of the vertices of the second target sub-triangle, wherein the second target sub-triangle is a triangle located in the three-dimensional mesh area to be measured; The area of ​​the three-dimensional mesh region to be measured is calculated according to the area of ​​the first target triangle and the area of ​​the second target sub-triangle.

7. The method according to claim 1, characterized in that The method further comprises: adjusting the position of the target three-dimensional control point on the three-dimensional closed edge line according to a user's dragging operation on the target three-dimensional control point; Update the three-dimensional closed edge line according to the adjusted position of the target three-dimensional control point; Determine, according to the updated three-dimensional closed edge line, an updated three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured that is surrounded by the updated three-dimensional closed edge line; The area of ​​the updated three-dimensional grid region to be measured is measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

8. The method according to claim 1, characterized in that The method further comprises: Determine two endpoints of the three-dimensional edge line closest to the new three-dimensional control point according to the operation of adding a new three-dimensional control point on the three-dimensional closed edge line by the user, and calculate the closest point of the line segment formed by the new three-dimensional control point and the two endpoints; Determine whether the distance from the new three-dimensional control point to the nearest point is less than a preset line segment width; If it is less than, it is determined that the new 3D control point is projected to the nearest 3D edge line, and the operation of adding the new 3D control point to the nearest 3D edge line is completed.

9. The method according to claim 1, characterized in that: The method further comprises: Deleting the target three-dimensional control point on the three-dimensional closed edge line according to a user's deletion operation on the target three-dimensional control point; updating the three-dimensional closed edge line according to the remaining three-dimensional control points on the three-dimensional closed edge line; Determine, according to the updated three-dimensional closed edge line, an updated three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured that is surrounded by the updated three-dimensional closed edge line; The area of ​​the updated three-dimensional grid region to be measured is measured to obtain the area of ​​the updated three-dimensional grid region to be measured.

10. A device for measuring the area of ​​a three-dimensional face model, characterized in that: include: A first generating unit is used to load and display the three-dimensional model of the face to be tested in the plane display area, and generate ordered three-dimensional control points according to the point selection operation of the user on the three-dimensional model of the face to be tested, and display them on the display plane, wherein the order between the three-dimensional control points is related to the order of the point selection operation of the user, and the three-dimensional control point is a ray perpendicular to the display plane and pointing to the three-dimensional model of the face to be tested, which is drawn from the point selection operation position displayed on the display plane, and the first intersection point of the ray with the three-dimensional model of the face to be tested; A second generating unit, configured to generate a three-dimensional closed edge line according to the plurality of ordered three-dimensional control points; A determination unit, configured to determine, according to the three-dimensional closed edge line, a three-dimensional grid area to be measured of the three-dimensional model of the human face to be measured and surrounded by the three-dimensional closed edge line; The area measuring unit is used to measure the area of ​​the three-dimensional grid area to be measured to obtain the area of ​​the three-dimensional grid area to be measured.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Method and apparatus for measuring area of three-dimensional face model, electronic device, and storage medium

    WO2026098302A1