Three-dimensional model deformation simulation method, electronic equipment and storage medium

By obtaining the facial model and using the path algorithm to determine the target area, the problem of high labor cost and low accuracy of local plastic surgery in 3D model deformation technology is solved, achieving higher accuracy and user experience.

CN118691774APending Publication Date: 2024-09-24SHINING 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410843258.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing 3D model deformation technology relies on doctors' experience, has high labor costs and low accuracy in local plastic surgery. It is easy to mishandle key facial points, resulting in inaccurate plastic surgery results.

Method used

By obtaining the facial model, multiple local contour points are determined, a preset path algorithm is used to determine the target point, the target points are connected to form a target area, neighborhood search is performed to determine regional feature points, and the target area is deformed based on the facial template to generate a rendering. .

Benefits of technology

It improves the accuracy and user experience of 3D model deformation, reduces labor costs, avoids mishandling of feature points in other local areas, and ensures the accuracy of the plastic surgery effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691774A
    Figure CN118691774A
Patent Text Reader

Abstract

The invention provides a three-dimensional model deformation simulation method, electronic equipment and a storage medium, and the method comprises the steps: obtaining a face model, and determining a plurality of local contour points of a face; determining a plurality of target points from the plurality of local contour points based on a preset path algorithm; connecting the plurality of target points to obtain a target area; performing neighborhood search in the target region, and determining region feature points corresponding to the target region; and based on a preset face template and the region feature points, deforming the target region to obtain an effect picture. The manual cost can be reduced, and the accuracy of local shaping can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a three-dimensional model deformation simulation method, electronic equipment and storage medium. Background Art

[0002] Three-dimensional model deformation technology can be used to adjust a person's appearance. Traditional plastic surgery relies on the doctor's experience. This type of method needs to rely on the doctor's rich experience and is not universal. Therefore, the relevant technology proposes to use facial scanning technology to obtain facial parameters, manually mark facial feature points based on facial parameters, and thus determine the facial area to be reshaped. This type of method requires high labor costs. In other related technologies, facial parameters can be used to simulate the appearance of local areas of the face after plastic surgery, but this type of method may cause inaccurate detection of facial key points and lead to erroneous processing of other local areas. For example, the local area to be processed is the eyes, but due to inaccurate detection of facial key points, the root of the nose near the eyes is mistakenly processed. Summary of the invention

[0003] The embodiments of the present application disclose a three-dimensional model deformation simulation method, an electronic device and a storage medium, which solve the technical problems of high labor costs and low local shaping accuracy of related shaping methods.

[0004] The present application provides a three-dimensional model deformation simulation method, which includes: obtaining a facial model and determining multiple local contour points of the face; based on a preset path algorithm, determining multiple target points from the multiple local contour points; connecting the multiple target points to obtain a target area; performing a neighborhood search in the target area to determine regional feature points corresponding to the target area; based on a preset facial template and the regional feature points, deforming the target area to obtain an effect diagram.

[0005] In some embodiments of the present application, the path algorithm includes a first path algorithm and a second path algorithm, and the path algorithm based on a preset path algorithm determines multiple target points from the multiple local contour points, including: based on the multiple local contour points, using the first path algorithm to determine a weighted directed graph; based on the weighted directed graph, using the second path algorithm to perform path planning and determine candidate local contour points; calculating the curvature of the candidate local contour points to obtain the multiple target points.

[0006] In some embodiments of the present application, determining a weighted directed graph based on the multiple local contour points using the first path algorithm includes: calculating the distance between every two local contour points in the multiple local contour points as a weight; generating a mesh graph based on the weight; and determining the weighted directed graph based on the mesh graph using the first path algorithm.

[0007] In some embodiments of the present application, the weighted directed graph is determined based on the mesh graph using the first path algorithm, including: using the first path algorithm to determine a first local contour point and a second local contour point from the mesh graph, the second local contour point being an adjacent local contour point that forms a shortest path with the first local contour point; determining the local contour points that form each shortest path as first-class points, and determining non-first-class points among the multiple local contour points as second-class points; and determining the weighted directed graph based on the distance between each first-class point and each second-class point.

[0008] In some embodiments of the present application, calculating the curvature of the candidate local contour points to obtain the multiple target points includes: generating a curve between every two candidate local contour points based on the candidate local contour points; calculating the curvature of the candidate local contour points corresponding to the curve; if the curvature is less than a preset curvature threshold, determining the candidate local contour point corresponding to the curvature as the target point; and eliminating the candidate local contour points corresponding to the curvature that is greater than or equal to the curvature threshold.

[0009] In some embodiments of the present application, the method of obtaining a facial model and determining multiple local contour points of the face includes: using the facial model to scan and detect the face to obtain key point information of the face, wherein the key point information includes position information of the facial key points and attribute information of the facial key points; and determining the multiple local contour points from the key point information based on the attribute information and the position information.

[0010] In some embodiments of the present application, the neighborhood search is performed within the target area to determine the regional feature points corresponding to the target area, including: determining the geometric center point of the target area; using the geometric center point as the starting point for performing the neighborhood search to determine the neighborhood points corresponding to all points in the target area; when the multiple target points are all determined to be neighborhood points, stopping the neighborhood search; and using the starting point, the neighborhood point, and the multiple target points as the regional feature points.

[0011] In some embodiments of the present application, the method includes: the first path algorithm includes the Dijkstra algorithm; the second path algorithm includes the A-star algorithm.

[0012] In some embodiments of the present application, after obtaining the rendering, the method further includes: determining the axis of symmetry of the face based on the placement angle of the face in the rendering; dividing the face into a left face and a right face based on the axis of symmetry; adjusting the right face based on the amount of movement determined by the user's dragging operation on the left face; or, adjusting the left face based on the amount of movement determined by the user's dragging operation on the right face.

[0013] In some embodiments of the present application, the target area is deformed based on a preset facial template and the regional feature points to obtain a rendering, including: scaling the facial template based on the facial features parameters; determining a reference area from the scaled and adjusted facial template based on the target area; iteratively adjusting the regional feature points based on the reference area to obtain an adjusted target area; if the matching degree between the adjusted target area and the reference area is greater than a preset threshold, the deformation of the target area is completed to obtain the rendering.

[0014] The present application also provides an electronic device, which includes a processor and a memory, and the processor is used to implement the three-dimensional model deformation simulation method when executing a computer program stored in the memory.

[0015] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the three-dimensional model deformation simulation method is implemented.

[0016] In the three-dimensional model deformation simulation method provided in the present application, a facial model is used to determine multiple local contour points of the face, and boundary points are provided for determining the local area of ​​the face. Based on a preset path algorithm, multiple target points are determined from multiple local contour points, and the multiple target points are connected to obtain a target area. The multiple target points are calculated by the path algorithm so that the boundary of the target area formed after connecting the multiple target points is smooth. Then, a neighborhood search is performed in the target area to determine the regional feature points corresponding to the target area. Based on the preset facial template and regional feature points, the target area is deformed to obtain an effect diagram. All regional feature points in the target area can be determined through the neighborhood search to avoid misprocessing feature points in other areas, thereby improving the accuracy of the three-dimensional model deformation and, to a certain extent, improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0018] Figure 2 It is a flow chart of the three-dimensional model deformation simulation method provided in an embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of multiple local contour points provided in an embodiment of the present application.

[0020] Figure 4 It is a schematic diagram of regional feature points provided in an embodiment of the present application.

[0021] Figure 5It is a schematic diagram of the determination effect diagram provided in the embodiment of the present application.

[0022] Figure 6 It is a flow chart for determining multiple target points provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given by way of example for reference.

[0024] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0025] Three-dimensional model deformation technology can be used to adjust a person's appearance. Traditional plastic surgery relies on the doctor's experience. This type of method needs to rely on the doctor's rich experience and is not universal. Therefore, the relevant technology proposes to use facial scanning technology to obtain facial parameters, manually mark facial feature points based on facial parameters, and thus determine the facial area to be reshaped. This type of method requires high labor costs. In other related technologies, facial parameters can be used to simulate the appearance of local areas of the face after plastic surgery, but this type of method may cause inaccurate detection of facial key points and lead to erroneous processing of other local areas. For example, the local area to be processed is the eyes, but due to inaccurate detection of facial key points, the root of the nose near the eyes is mistakenly processed.

[0026] In order to solve the technical problems of high labor cost and low local shaping accuracy of related shaping methods, the embodiments of the present application provide a three-dimensional model deformation simulation method, an electronic device and a storage medium. The structure of the electronic device of the present application is first described below.

[0027] Figure 1 The 3D model deformation simulation method provided in the embodiment of the present application is applied to an electronic device 10, which can be a computer device with a shooting function such as a mobile phone, a tablet computer, a laptop computer, a face scanner, etc.

[0028] The electronic device 10 includes a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, a bus 105, and a camera 106. The processor 103 is coupled to the communication interface 101, the memory 102, the I / O interface 104, and the camera 106 through the bus 105.

[0029] The communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB), Controller Area Network (CAN), etc. The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc.

[0030] The memory 102 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 103, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0031] The non-volatile memory may also store executable programs and user and application data, etc., and may be pre-loaded into the random access memory for direct reading and writing by the processor 110. The non-volatile memory may include a disk storage device and a flash memory.

[0032] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 103, the three-dimensional model deformation simulation method executed on the electronic device 10 can be implemented.

[0033] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10 .

[0034] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0035] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the above-mentioned three-dimensional model deformation simulation method.

[0036] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0037] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , and the I / O interface 104 in the electronic device 10 .

[0038] The photographing device 106 may be a camera for scanning or photographing the face.

[0039] Hint Figure 1 It is only an example of the electronic device 10 and does not constitute a limitation of the electronic device 10. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 10 may also include input and output devices, network access devices, etc.

[0040] Figure 2 is a flow chart of a three-dimensional model deformation simulation method provided in an embodiment of the present application, which is applied to electronic devices (such as Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0041] Step S201, obtaining a facial model and determining a plurality of local contour points of the face.

[0042] In some embodiments of the present application, the electronic device may be a computer device with a photographing function, or the structure of the electronic device includes a photographing device, for example, the electronic device may be a computer, and the photographing device may be a camera built into the computer. The present application does not limit the structure of the electronic device.

[0043] In some embodiments of the present application, the facial model can be a combination of one or more models such as 3D facial scanning and deep learning facial scanning. Among them, 3D facial scanning uses technologies such as laser or structured light to obtain three-dimensional information of the face and more accurately restore the three-dimensional structure of the face; deep learning facial scanning builds a deep learning model by training a large number of images and extracts facial features, which can quickly and accurately capture the facial skeleton features of the collected object.

[0044] In some embodiments of the present application, when the electronic device recognizes a face in real time, it calls a facial model to perform facial detection on the face to obtain key point information corresponding to the face, and the key point information may include position information of the facial key points and attribute information of the facial key points, wherein the position information of the facial key points may be the position of the facial key points on the face, and the attribute information of the facial key points may be information of the specific organ of the face to which the facial key points belong, for example, the attribute information is the upper eyelid of the eye, the root of the nose, the lower lip, etc.

[0045] In other embodiments of the present application, a video is shot of the acquisition object in advance, a target video frame is extracted from the video as a facial image, and a facial recognition model pre-stored in the electronic device is called to recognize the facial image to obtain key point information corresponding to the facial image, and the key points obtained in the facial image are two-dimensional point information.

[0046] In some embodiments of the present application, after the key point information is determined, a plurality of local contour points can be determined from the key point information according to the attribute information and the position information, and the local contour points are three-dimensional point information.

[0047] Figure 3 is a schematic diagram of multiple local contour points provided in an embodiment of the present application, such as Figure 3 As shown, the facial image is determined using facial scanning technology, and multiple local contour points are marked on the facial image.

[0048] Step S202: determining a plurality of target points from the plurality of local contour points based on a preset path algorithm.

[0049] In some embodiments of the present application, the preset path algorithm may include a combination of one or more of the following algorithms: Dijkstra algorithm, A-star algorithm, Bellman-Ford algorithm, Floyd-Warshall algorithm, Breadth-First Search (BFS), and Prim's algorithm, and the present application does not limit this. By using the preset path algorithm to determine multiple target points from multiple local contour points, it is possible to ensure that every two target points have the most adjacent relationship.

[0050] Step S203, connecting the multiple target points to obtain a target area.

[0051] In some embodiments of the present application, after the target points are determined, the order of determining each target point is obtained, and based on the order, all the target points are connected to obtain the target area. The present application does not restrict the shape of the target area, and the shape of the target area is determined according to the position of the target point on the face.

[0052] Step S204: performing a neighborhood search in the target area to determine regional feature points corresponding to the target area.

[0053] In some embodiments of the present application, neighborhood search is a search algorithm, which may be an algorithm that is a combination of one or more of a K-nearest neighbor (KNN) algorithm, an R-tree algorithm, a quadtree algorithm, and a grid-based algorithm.

[0054] In some embodiments of the present application, feature points of the entire face can be obtained using a facial model. After the target area is determined, the geometric center point of the target area can be determined based on the attribute information of the feature points. For example, if the target area is the area where the nose is located, the feature point whose attribute information indicates the tip of the nose is used as the geometric center point. The above is only an example. The geometric center point can be determined based on the actual target area, and the present application does not limit this.

[0055] The geometric center point is used as the starting point for performing neighborhood search. The search begins from the starting point to determine the neighborhood points corresponding to all points in the target area. Among them, all points and neighborhood points are feature points in the target area, which are determined by facial scanning technology. Through neighborhood search, all feature points in the target area can be completely found, avoiding misjudgment of feature points in non-target areas and missing feature points in non-target areas.

[0056] Since multiple target points are boundary points corresponding to the target area, in order to segment the target area, when multiple target points are determined to be neighborhood points, the neighborhood search is stopped, thereby segmenting all regional feature points in the target area. The regional feature points include the starting point, neighborhood points and multiple target points.

[0057] Figure 4 is a schematic diagram of regional feature points provided in an embodiment of the present application, such as Figure 4 As shown, the target area is the nose, and all feature points are traversed in the area where the nose is located, so as to segment the regional feature points corresponding to the nose. In order to avoid the influence of other areas on the target area, after determining the target area, the area that does not need to be deformed can be segmented out in advance.

[0058] Step S205: deforming the target area based on the preset facial template and the regional feature points to obtain an effect image.

[0059] In some embodiments of the present application, the facial template may be a three-dimensional model deformation template pre-stored in the electronic device and defined according to the type of plastic surgery, and may be a deformation template of any facial features type, and the plastic surgery types may include raising the bridge of the nose, pulling the bridge of the nose, shrinking the dorsum of the nose, and the nose wing, etc. The facial template may be determined in response to the user's selection instruction, and the facial template may also be determined based on the degree of matching with the face. For example, after determining the target area, all candidate templates matching the attribute information are traversed from the database according to the attribute information of the target area, and the degree of matching between the facial features parameters corresponding to the face and the facial features parameters of the candidate template is calculated, and the candidate template with a matching degree greater than the preset matching degree is determined as the facial template to fit the user's face shape and facial features to the maximum extent.

[0060] In some embodiments of the present application, the target area is deformed based on the preset facial template and regional feature points to obtain an effect diagram. Specifically, since there is a certain difference between the proportion of the facial template and the user's face, the facial template can be scaled and adjusted based on the facial features parameters so that the facial template and the user's face size are similar. Based on the target area, a reference area is determined from the scaled and adjusted facial template. In one example, if the target area is the nose area, the reference area is also the nose area.

[0061] Iteratively adjust the regional feature points based on the reference area to obtain the adjusted target area, calculate the difference between the reference area and the target area of ​​the facial template, determine the regional feature points that need to be adjusted based on the difference, and continuously iteratively adjust the regional feature points to obtain the adjusted target area. If the matching degree between the adjusted target area and the reference area is greater than a preset threshold, it means that the adjusted target area has a high similarity with the reference area, and the deformation of the target area is completed to obtain the effect diagram. If the matching degree between the adjusted target area and the reference area is less than or equal to the preset threshold, it means that the adjusted target area has a low similarity with the reference area, and the iteration can continue until the matching degree between the adjusted target area and the reference area is greater than the preset threshold. Among them, the preset threshold can be set according to actual conditions, and this application is not limited to this.

[0062] Figure 5 is a schematic diagram of determining the effect diagram provided in the embodiment of the present application, such as Figure 5 As shown, the target area is the nose, and the adjusted effect image is obtained based on the facial template and the user image with determined regional feature points.

[0063] In the three-dimensional model deformation simulation method provided by the present application, a facial model is obtained, and multiple local contour points of the face are determined to provide boundary points for determining the local area of ​​the face. Based on a preset path algorithm, multiple target points are determined from multiple local contour points, and the multiple target points are connected to obtain a target area. The multiple target points are calculated by the path algorithm so that the boundary of the target area formed after connecting the multiple target points is smooth. Then, a neighborhood search is performed in the target area to determine the regional feature points corresponding to the target area. Based on the preset facial template and regional feature points, the target area is deformed to obtain an effect diagram. All regional feature points in the target area can be determined through the neighborhood search to avoid misprocessing feature points in other areas, thereby improving the accuracy of the three-dimensional model deformation and, to a certain extent, improving the user experience.

[0064] In some embodiments of the present application, after the rendering is determined, the user's adjustment of the face can be received. Since the face generally has a symmetrical attribute, in one example, the symmetry axis of the face can be determined according to the placement angle of the face in the rendering. In another example, the electronic device can detect the selection operation performed by the user and determine the symmetry axis of the face according to the selection operation. The present application does not limit this.

[0065] The face is divided into a left face and a right face based on a symmetry axis to achieve a mirror effect. The right face is adjusted based on a movement amount determined by a user's drag operation on the left face; or the left face is adjusted based on a movement amount determined by the user's drag operation on the right face.

[0066] In the embodiment of the present application, after the effect image is determined, the mirroring technology is used to determine the movement amount when the dragging operation of the user is detected, and the symmetrical face on the other side changes accordingly, which can improve the modification efficiency of the effect image to a certain extent.

[0067] Figure 6 is a flow chart for determining multiple target points provided by an embodiment of the present application. After determining multiple local contour points, a path algorithm can be used to determine multiple target points, wherein the path algorithm includes a first path algorithm and a second path algorithm. Figure 6 As shown, the following steps are included.

[0068] Step S601: Based on the multiple local contour points, determine a weighted directed graph using the first path algorithm.

[0069] In some embodiments of the present application, the distance between every two local contour points among multiple local contour points is calculated as a weight, and based on the weight, a mesh graph is generated, each local contour point is used as a node of the mesh graph, and the connection between each local contour point is used as an edge of the mesh graph, and the weight of the edge is determined.

[0070] In some embodiments of the present application, based on the mesh graph, a first path algorithm is used to determine a weighted directed graph, wherein the first path algorithm may be the Dijkstra algorithm, which, as a full-search algorithm, can ensure that the optimal shortest path is found. Specifically, the first path algorithm is used to determine the first local contour point and the second local contour point from the mesh graph, wherein the second local contour point is an adjacent local contour point that forms the shortest path with the first local contour point, wherein the first local contour point represents the starting point of each search, and the second local contour point represents the adjacent local contour point corresponding to the starting point of each search. The mesh graph is traversed by the first path algorithm to determine the adjacent local contour point of the nearest neighbor corresponding to each local contour point.

[0071] The local contour points that form each shortest path are determined as first-class points, and the non-first-class points among multiple local contour points are determined as second-class points. The first-class points are the set of local contour points for which the shortest path has been determined, and the second-class points are the set of local contour points for which the shortest path has not been determined. After each shortest path is determined, the local contour points corresponding to the determined shortest path are classified as first-class points, and the local contour points newly added to the first-class points are used as the starting point for the next shortest path to be determined from the second-class points, until all the second-class points are traversed. Based on the distance between each first-class point and each second-class point, a weighted directed graph is determined.

[0072] Step S602: Based on the weighted directed graph, the second path algorithm is used to perform path planning to determine candidate local contour points.

[0073] In some embodiments of the present application, after determining the weighted directed graph, the second type of path algorithm is used for path planning, which can reduce the number of searched nodes and improve the efficiency of path planning. Specifically, the weighted directed graph is gridded, and the weighted directed graph is gridded into a plurality of squares, and the size of the squares is not limited. For example, the size of the squares can be 1*1, 2*2 or 3*3. The candidate local contour points are determined based on the position of the center point of each square.

[0074] Step S603, calculating the curvature of the candidate local contour points to obtain the multiple target points.

[0075] In some embodiments of the present application, based on the candidate local contour points, a curve between every two candidate local contour points is generated to calculate the curvature of the candidate local contour point corresponding to the curve, and the curvature represents the curvature of the curve. If the curvature is less than a preset curvature threshold, the candidate local contour point corresponding to the curvature is determined as a target point, until multiple target points are determined, and the candidate local contour points corresponding to the curvature greater than or equal to the curvature threshold are eliminated.

[0076] In some embodiments of the present application, combining the first path algorithm and the second path algorithm to determine multiple target points not only improves the efficiency of determining the target points, but also improves the smoothness of the connecting lines of the subsequent determination of the target area to a certain extent, and improves the accuracy of the target area division.

[0077] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.

[0078] The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.

[0079] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0080] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0081] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0082] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0083] 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.

[0084] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A three-dimensional model deformation simulation method, characterized in that: The method comprises: Obtain a facial model and determine multiple local contour points of the face; Based on a preset path algorithm, determining a plurality of target points from the plurality of local contour points; Connecting the multiple target points to obtain a target area; Performing a neighborhood search in the target area to determine the regional feature points corresponding to the target area; Based on the preset facial template and the regional feature points, the target area is deformed to obtain an effect image.

2. The three-dimensional model deformation simulation method according to claim 1, characterized in that: The path algorithm includes a first path algorithm and a second path algorithm. The path algorithm based on the preset path algorithm determines a plurality of target points from the plurality of local contour points, including: Based on the multiple local contour points, determining a weighted directed graph using the first path algorithm; Based on the weighted directed graph, using the second path algorithm to perform path planning to determine candidate local contour points; The curvature of the candidate local contour points is calculated to obtain the multiple target points.

3. The three-dimensional model deformation simulation method according to claim 2, characterized in that: The determining of a weighted directed graph based on the plurality of local contour points by using the first path algorithm comprises: Calculating the distance between every two local contour points in the plurality of local contour points as a weight; Based on the weights, generating a network graph; Based on the mesh graph, the weighted directed graph is determined using the first path algorithm.

4. The three-dimensional model deformation simulation method according to claim 3, characterized in that: The determining the weighted directed graph based on the mesh graph by using the first path algorithm includes: Using the first path algorithm, determining a first local contour point and a second local contour point from the mesh graph, wherein the second local contour point is an adjacent local contour point that forms a shortest path with the first local contour point; Determining local contour points forming each shortest path as first-category points, and determining non-first-category points among the plurality of local contour points as second-category points; The weighted directed graph is determined based on the distance between each of the first-category points and each of the second-category points.

5. The three-dimensional model deformation simulation method according to claim 2, characterized in that: The step of calculating the curvature of the candidate local contour points to obtain the plurality of target points comprises: Based on the candidate local contour points, generating a curve between every two candidate local contour points; Calculating the curvature of the candidate local contour points corresponding to the curve; If the curvature is less than a preset curvature threshold, the candidate local contour point corresponding to the curvature is determined as a target point; The candidate local contour points corresponding to the curvature greater than or equal to the curvature threshold are eliminated.

6. The three-dimensional model deformation simulation method according to claim 1, characterized in that: The step of acquiring a facial model and determining a plurality of local contour points of the face includes: Scanning and detecting the face using the facial model to obtain key point information of the face, wherein the key point information includes position information of the facial key points and attribute information of the facial key points; The plurality of local contour points are determined from the key point information according to the attribute information and the position information.

7. The three-dimensional model deformation simulation method according to claim 1, characterized in that: The performing a neighborhood search in the target area to determine the regional feature points corresponding to the target area includes: Determining the geometric center point of the target area; Taking the geometric center point as the starting point for performing the neighborhood search, determining the neighborhood points corresponding to all points in the target area; When the plurality of target points are all determined to be neighborhood points, stopping the neighborhood search; The starting point, the neighborhood point and the multiple target points are used as the regional feature points.

8. The three-dimensional model deformation simulation method according to claim 2, characterized in that: include: The first path algorithm includes a Dijkstra algorithm; The second path algorithm includes an A-star algorithm.

9. The three-dimensional model deformation simulation method according to claim 1, characterized in that: After obtaining the effect diagram, the method further includes: Determining a symmetry axis of the face based on a placement angle of the face in the rendering; Dividing the face into a left face and a right face based on the symmetry axis; adjusting the right face portion based on a movement amount determined by a user's dragging operation on the left face portion; or, The left face portion is adjusted based on a movement amount determined by the user's drag operation on the right face portion.

10. The three-dimensional model deformation simulation method according to claim 1, characterized in that: The step of deforming the target area based on the preset facial template and the regional feature points to obtain an effect diagram includes: Based on the facial features parameters of the face, scaling and adjusting the facial template; Based on the target area, determining a reference area from the scaled face template; Iteratively adjusting the regional feature points based on the reference region to obtain an adjusted target region; If the matching degree between the adjusted target area and the reference area is greater than a preset threshold, the deformation of the target area is completed to obtain the effect image.

11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the three-dimensional model deformation simulation method as claimed in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the three-dimensional model deformation simulation method according to any one of claims 1 to 10 is implemented.