Three-dimensional modeling method and apparatus for flexible object, electronic device, and storage medium
By determining the three-dimensional preset model and two-dimensional texture picture of flexible objects in three-dimensional modeling, geometric and topological projection, and adding perturbations to the topological plane, the authenticity problem of deformation phenomena in flexible material simulation is solved, and the three-dimensional Modeling accuracy and disturbance immunity.
Patent Information
- Application Number
- PCT/CN2024/076387
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-05
- Filing Date
- 2024-02-06
- Publication Date
- 2024-12-12
AI Technical Summary
Existing three-dimensional modeling technologies lack authenticity when simulating flexible material objects, making it difficult to accurately simulate deformation phenomena.
By determining the three-dimensional preset model and two-dimensional texture picture of the target flexible object, perform geometrically reasonable projection and topological relationship splicing, and add perturbations to the topologically reasonable projection plane, moving rendering points to improve the authenticity of three-dimensional modeling.
It improves the authenticity of the three-dimensional modeling results of flexible objects, can more accurately simulate the deformation phenomenon of flexible materials, and enhances the disturbance resistance in the physical implementation of the model.
Smart Images

Figure CN2024076387_12122024_PF_FP_ABST
Abstract
Description
Three-dimensional modeling method, device, electronic device and storage medium for flexible objects Technical Field
[0001] The present disclosure relates to the field of secure computing, and in particular to a three-dimensional modeling method, device, electronic device, and storage medium for flexible objects. Background Art
[0002] Currently, the technology of simulating physical objects through three-dimensional modeling is widely used in various fields. However, the existing modeling method has high accuracy when modeling objects made of rigid materials. However, since flexible materials often deform in the real physical world, the results obtained by three-dimensional modeling often lack authenticity and it is difficult to accurately simulate real flexible objects.
[0003] Summary of the Invention
[0004] In view of this, the present disclosure proposes a three-dimensional modeling method, device, electronic device and storage medium for flexible objects, aiming to improve the authenticity of the three-dimensional modeling results of objects made of flexible materials.
[0005] According to a first aspect of the present disclosure, a method for three-dimensional modeling of a flexible object is provided, the method comprising:
[0006] Determining a three-dimensional preset model and a two-dimensional texture image of the target flexible object, wherein the preset model includes a plurality of vertices and a plurality of triangular facets, the points constituting each triangular facet are the vertices, and at least one triangular facet includes a rendering point having a corresponding pixel value in the texture image;
[0007] Determine a geometrically reasonable projection consisting of two-dimensional coordinates corresponding to each vertex, wherein the geometrically reasonable projection includes a two-dimensional area projection corresponding to at least one three-dimensional area constituting the preset model;
[0008] Splicing each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model;
[0009] By adding a disturbance to at least one rendering point on the topologically reasonable projection plane, the rendering point is moved from an initial position on the geometrically reasonable projection plane to a target position;
[0010] The preset model is rendered according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object.
[0011] In a possible implementation, determining a geometrically reasonable projection of the two-dimensional coordinates corresponding to each vertex includes:
[0012] Segmenting the preset model to obtain at least one three-dimensional region;
[0013] Each of the three-dimensional regions is unfolded in a physical simulation plane to obtain an image of the corresponding two-dimensional region projection, and the images of each two-dimensional region projection are spliced to obtain a geometrically reasonable projection, and the two-dimensional coordinates corresponding to each vertex are determined according to the position of the geometrically reasonable projection.
[0014] In a possible implementation, the step of splicing each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model includes:
[0015] Initializing the coordinates of each of the two-dimensional region projections to obtain initialized candidate projections;
[0016] Iteratively move each vertex in the candidate projection multiple times by means of physical simulation;
[0017] In response to the two-dimensional vertex positions of the vertices in the candidate projections that overlap in position in the preset model all overlap, the iterative movement process is stopped, and the current candidate projection is determined to be a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
[0018] In a possible implementation, initializing the coordinates of each of the two-dimensional region projections to obtain an initialized candidate projection includes:
[0019] Determining a corresponding coordinate transformation rule according to the positional relationship of each two-dimensional area projection in the preset model;
[0020] Coordinate transformation is performed on each of the vertices included in the two-dimensional region projection according to a coordinate transformation rule corresponding to each of the two-dimensional region projections to obtain an initialized candidate projection.
[0021] In a possible implementation, the iteratively moving each vertex in the candidate projection multiple times by means of physical simulation includes:
[0022] In each iteration, a preset attraction force is applied between every two vertices of the candidate projections that overlap in the preset model by means of physical simulation;
[0023] Calculating the force corresponding to each vertex respectively, and determining the corresponding updated coordinates according to the force corresponding to each vertex and the time step between adjacent iterative movement processes;
[0024] The coordinate position of each vertex in the candidate projection is updated according to the updated coordinates of each vertex in the current iteration process.
[0025] In a possible implementation, the time step constraint conditions include:
[0026] Each vertex does not overlap with any edge of the triangle element during the movement, and the step length is less than a preset threshold.
[0027] In a possible implementation, adding a disturbance to at least one rendering point on the topologically reasonable projection plane to move the rendering point from an initial position on the geometrically reasonable projection plane to a target position includes:
[0028] Determining an initial position of each of the rendering points in the geometrically reasonable projection;
[0029] Determining the position of each rendering point on the topologically reasonable projection plane according to the initial position, and determining a candidate position of each rendering point on the topologically reasonable projection plane after disturbance by random perturbation;
[0030] The target position of each rendering point on the geometrically reasonable projection plane after disturbance is determined according to the corresponding candidate position.
[0031] In a possible implementation, the random perturbation mode is a random plane deformation perturbation.
[0032] In a possible implementation, the method further includes:
[0033] Determining a target human body model according to the target three-dimensional model and a preset human body model;
[0034] Determining a model training set according to the target human body model;
[0035] A human body detection model is trained according to the model training set.
[0036] According to a second aspect of the present disclosure, a three-dimensional modeling device for a flexible object is provided, the device comprising:
[0037] an information determination module, configured to determine a three-dimensional preset model and a two-dimensional texture image of the target flexible object, wherein the preset model includes a plurality of vertices and a plurality of triangular facets, wherein the points constituting each triangular facet are the vertices, and at least one triangular facet includes at least one rendering point having a corresponding pixel value in the texture image;
[0038] A first projection determination module is configured to determine a geometrically reasonable projection consisting of two-dimensional coordinates corresponding to each vertex, wherein the geometrically reasonable projection includes a two-dimensional area projection corresponding to at least one three-dimensional area constituting the preset model;
[0039] A second projection determination module is used to splice each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model;
[0040] a pixel perturbation module, configured to add perturbation to at least one rendering point on the topologically reasonable projection plane, thereby moving the rendering point from an initial position on the geometrically reasonable projection plane to a target position;
[0041] The model rendering module is used to render the preset model according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object.
[0042] In a possible implementation, the first projection determination module is further configured to:
[0043] Segmenting the preset model to obtain at least one three-dimensional region;
[0044] Each of the three-dimensional regions is unfolded in a physical simulation plane to obtain an image of the corresponding two-dimensional region projection, and the images of each two-dimensional region projection are spliced to obtain a geometrically reasonable projection, and the two-dimensional coordinates corresponding to each vertex are determined according to the position of the geometrically reasonable projection.
[0045] In a possible implementation, the second projection determination module is further configured to:
[0046] Initializing the coordinates of each of the two-dimensional region projections to obtain initialized candidate projections;
[0047] Iteratively move each vertex in the candidate projection multiple times by means of physical simulation;
[0048] In response to the two-dimensional vertex positions of the vertices in the candidate projections that overlap in position in the preset model all overlap, the iterative movement process is stopped, and the current candidate projection is determined to be a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
[0049] In a possible implementation, the second projection determination module is further configured to:
[0050] Determining a corresponding coordinate transformation rule according to the positional relationship of each two-dimensional area projection in the preset model;
[0051] Coordinate transformation is performed on each of the vertices included in the two-dimensional region projection according to a coordinate transformation rule corresponding to each of the two-dimensional region projections to obtain an initialized candidate projection.
[0052] In a possible implementation, the second projection determination module is further configured to:
[0053] In each iteration, a preset attraction force is applied between every two vertices of the candidate projections that overlap in the preset model by means of physical simulation;
[0054] Calculating the force corresponding to each vertex respectively, and determining the corresponding updated coordinates according to the force corresponding to each vertex and the time step between adjacent iterative movement processes;
[0055] The coordinate position of each vertex in the candidate projection is updated according to the updated coordinates of each vertex in the current iteration process.
[0056] In a possible implementation, the time step constraint conditions include:
[0057] Each vertex does not overlap with any edge of the triangle element during the movement, and the step length is less than a preset threshold.
[0058] In a possible implementation, the pixel perturbation module is further configured to:
[0059] Determining an initial position of each of the rendering points in the geometrically reasonable projection;
[0060] Determining the position of each rendering point on the topologically reasonable projection plane according to the initial position, and determining a candidate position of each rendering point on the topologically reasonable projection plane after disturbance by random perturbation;
[0061] The target position of each rendering point on the geometrically reasonable projection plane after disturbance is determined according to the corresponding candidate position.
[0062] In a possible implementation, the random perturbation mode is a random plane deformation perturbation.
[0063] In a possible implementation, the apparatus further includes:
[0064] A model generation module, configured to determine a target human body model based on the target three-dimensional model and a preset human body model;
[0065] A training set determination module, configured to determine a model training set based on the target human body model;
[0066] The model training module is used to train the human body detection model according to the model training set.
[0067] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0068] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0069] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0070] In an embodiment of the present disclosure, a three-dimensional preset model and a two-dimensional texture image of a target flexible object are determined, wherein the preset model includes a vertex and a triangular face composed of three vertices, and the triangular face includes at least one rendering point. A geometrically reasonable projection composed of the two-dimensional coordinates of each vertex is determined, and a perturbation is added to at least one rendering point on a topologically reasonable projection plane whose topological relationship conforms to the position relationship of the vertices in the preset model, and the perturbation is moved from the initial position on the geometrically reasonable projection plane to the target position. The preset model is rendered according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object. The present disclosure improves the authenticity of the three-dimensional modeling effect of the flexible object by adding position perturbations in the two-dimensional projection that conforms to the topological relationship of the three-dimensional model and rendering based on the perturbated rendering points.
[0071] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0073] FIG1 shows a flow chart of a method for three-dimensional modeling of a flexible object according to an embodiment of the present disclosure;
[0074] FIG2 is a schematic diagram showing a geometrically reasonable projection according to an embodiment of the present disclosure;
[0075] FIG3 shows a schematic diagram of a topologically reasonable projection according to an embodiment of the present disclosure;
[0076] FIG4 is a schematic diagram showing a process for determining a topologically reasonable projection according to an embodiment of the present disclosure;
[0077] FIG5 is a schematic diagram showing a vertex force according to an embodiment of the present disclosure;
[0078] FIG6 is a schematic diagram showing a process of disturbing rendering points according to an embodiment of the present disclosure;
[0079] FIG7 is a schematic diagram showing an application scenario of a target three-dimensional model according to an embodiment of the present disclosure;
[0080] FIG8 is a schematic diagram showing a target three-dimensional model effect according to an embodiment of the present disclosure;
[0081] FIG9 is a schematic diagram showing a three-dimensional modeling apparatus for a flexible object according to an embodiment of the present disclosure;
[0082] FIG10 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure;
[0083] FIG11 shows a schematic diagram of another electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0084] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0085] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0086] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0087] The three-dimensional modeling method of the flexible object of the embodiment of the present disclosure can be executed by an electronic device such as a terminal device or a server. Among them, the terminal device can be any fixed or mobile terminal such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the three-dimensional modeling method of the flexible object of the embodiment of the present disclosure by calling computer-readable instructions stored in a memory through a processor.
[0088] Figure 1 shows a flow chart of a method for three-dimensional modeling of a flexible object according to an embodiment of the present disclosure. As shown in Figure 1 , the method for three-dimensional modeling of a flexible object according to an embodiment of the present disclosure may include the following steps S10-S50.
[0089] Step S10: Determine a three-dimensional preset model and a two-dimensional texture image of the target flexible object.
[0090] In one possible implementation, an electronic device can determine a preset 3D model of a target flexible object and a 2D texture image. The target flexible object is any flexible material requiring 3D modeling, such as clothing, bed sheets, curtains, and other objects made of materials such as silk, cotton, and leather. The 3D preset model of the target flexible object is used to simulate the target flexible object's normal shape, i.e., its shape under normal conditions. The 2D texture image of the target flexible object is used to simulate the texture features of the target flexible object's surface, including material, pattern, and color.
[0091] Optionally, the preset model may be composed of multiple vertices, wherein three adjacent vertices may form a triangular face, and the three-dimensional preset model may be formed by multiple interconnected triangular faces. That is, the preset model may include multiple vertices and triangular faces, and the points that make up each triangular face are all vertices in the preset model. Based on the resolution of the image to be ultimately rendered, at least one triangular face of the preset model may include a rendering point having a corresponding pixel value in the texture image, and the triangular face including the rendering point may include one or more rendering points.
[0092] Furthermore, the electronic device can generate a 3D preset model and a 2D texture image through human-computer interaction with a user, or can receive a 3D preset model and a 2D texture image transmitted by other devices.
[0093] Step S20: Determine a geometrically reasonable projection of the two-dimensional coordinates corresponding to each vertex.
[0094] In one possible implementation, after determining the three-dimensional preset model of the target flexible object, the electronic device can obtain a two-dimensional geometrically reasonable projection by projection to convert each vertex from a three-dimensional coordinate to a two-dimensional coordinate. Therefore, there is a corresponding mapping relationship between the three-dimensional coordinates of each vertex in the preset model and the two-dimensional coordinates in the geometrically reasonable projection, and the three-dimensional coordinates of the rendering points included in each triangular facet in the preset model and the two-dimensional coordinates in the geometrically reasonable projection also have the same mapping relationship. Among them, the geometrically reasonable projection includes a two-dimensional area projection corresponding to at least one three-dimensional area constituting the preset model. That is, the electronic device can first divide the shape structure of the three-dimensional preset model into multiple three-dimensional areas, and then project each three-dimensional area to obtain a two-dimensional area projection, and each two-dimensional area projection includes at least one two-dimensional coordinate corresponding to the three-dimensional coordinates of each vertex in the corresponding three-dimensional area.
[0095] Alternatively, the electronic device can directly obtain the two-dimensional coordinates corresponding to each vertex while modeling the target flexible object using three-dimensional modeling software to obtain a geometrically reasonable projection. Alternatively, the electronic device can also segment a preset model to obtain at least one three-dimensional region, perform a physical simulation plane expansion on each three-dimensional region, obtain an image of the corresponding two-dimensional region projection, and splice the images of each two-dimensional region projection to obtain a geometrically reasonable projection. The two-dimensional coordinates corresponding to each vertex are determined based on the position in the geometrically reasonable projection. In other words, the three-dimensional region can be converted into a two-dimensional region to achieve projection in a manner that simulates tiling a real three-dimensional object, and an image including the projection of the two-dimensional region is determined, and each image is simply spliced to obtain a geometrically reasonable projection. The two-dimensional coordinates corresponding to each vertex can be UV coordinates, that is, the coordinates determined based on the position of each vertex in the horizontal direction U and the vertical direction V after all image files are tiled onto a two-dimensional plane. The two-dimensional coordinates of each vertex in the geometrically reasonable projection have local distance consistency, that is, the ratio of the Euclidean distance of each edge in the three-dimensional preset model and the two-dimensional coordinates remains substantially unchanged.
[0096] FIG2 shows a schematic diagram of a geometrically reasonable projection according to an embodiment of the present disclosure. As shown in FIG2 , when the target flexible object is clothing, the electronic device can cut the preset model of the clothing into a three-dimensional area in the front, a three-dimensional area in the back, a three-dimensional area of the left sleeve, and a three-dimensional area of the right sleeve according to the structure of the clothing. Intuitively, the surface of the three-dimensional preset model can be regarded as multiple small areas in the geometrically reasonable projection (GeoProj), that is, two-dimensional area projections stitched together. The geometrically reasonable projection can be regarded as a target flexible object that is cut and then tiled.
[0097] Step S30: splicing each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
[0098] In one possible implementation, after determining a geometrically reasonable projection of a preset model, the electronic device can stretch and splice each two-dimensional area projection through physical simulation to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model. That is, the positional relationship of adjacent vertices in the topologically reasonable projection can be determined based on the adjacent positional relationship of each vertex in the preset model, so that vertices that are adjacent in the preset model are also adjacent in the topologically reasonable projection. In the process of stretching and splicing the two-dimensional area projection, the electronic device can splice together two or more two-dimensional vertices that correspond to the same three-dimensional coordinates in the preset model.
[0099] Figure 3 shows a schematic diagram of a topologically reasonable projection according to an embodiment of the present disclosure. As shown in Figure 3, in the topologically reasonable projection (TopoProj) generated by the embodiment of the present disclosure based on the geometrically reasonable projection GeoProj corresponding to the preset model, the topological relationship between vertices remains unchanged from their topological relationship in the three-dimensional preset model. In other words, vertices that overlap in the three-dimensional preset model also overlap in the topologically reasonable projection, and vertices that are adjacent in the preset model are also adjacent in the topologically reasonable projection.
[0100] Optionally, to ensure that the vertices in the topologically reasonable projection maintain their relative positional relationships in the preset model, the electronic device can simulate the dynamic process by initializing first and then iterating multiple times to achieve the splicing of the points in the geometrically reasonable projection that overlap in the preset model. That is, the electronic device can first initialize the coordinates of each two-dimensional area projection to obtain an initialized candidate projection. Then, each vertex in the candidate projection is iteratively moved multiple times through physical simulation. In response to the two-dimensional vertex positions of the vertices in the candidate projection that overlap in the preset model all overlapping, the iterative movement process is stopped, and the current candidate projection is determined to be a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
[0101] FIG4 shows a schematic diagram of a process for determining a topologically reasonable projection according to an embodiment of the present disclosure. As shown in FIG4 , the electronic device may first splice the two-dimensional area projections that can be individually spliced based on the positional relationship in the geometrically reasonable projection, and then splice different two-dimensional area projections based on the positional relationship in the preset model. For example, in the case where the target flexible object is clothing, for the two-dimensional area projection corresponding to the sleeve, the electronic device may first initialize the coordinates to bring the vertices that overlap in the preset model as close as possible, and then iteratively move the overlapping vertices in the projection multiple times through physical simulation to overlap, thereby obtaining a topologically reasonable projection of the sleeve portion. Furthermore, the same method may be used to splice the projections of the two spliced sleeves with the projections of the unspliced front and back parts of the clothing.
[0102] Furthermore, the process of coordinate initialization of the electronic device can be implemented by a preset coordinate transformation rule, wherein the coordinate transformation rule can be pre-set according to the structure of the preset model, and each two-dimensional area projection has a corresponding coordinate transformation rule, and the coordinate transformation rules corresponding to different two-dimensional area projections can be the same or different. The electronic device can first determine the corresponding coordinate transformation rule based on the positional relationship of each two-dimensional area projection in the preset model. Then, according to the coordinate transformation rule corresponding to each two-dimensional area projection, the coordinates of each vertex included therein are transformed to obtain an initialized candidate projection. The coordinate transformation rule can be a preset function used to perform position transformation processing such as translation and flipping on each vertex. The initialization process can be regarded as a preliminary pulling and splicing of the tiled target flexible object according to the connection relationship, so that the overlapping vertices in the preset model are as close as possible.
[0103] In one possible implementation, the electronic device may perform multiple iterations using physical simulation to simulate slowly pulling a target flexible object that has already deformed after initialization until overlapping vertices in a preset model reconcile. During each iteration, the electronic device may apply a preset attractive force to each pair of vertices in the preset model (i.e., each pair of candidate projections that overlap). The electronic device calculates the force applied to each vertex and determines the corresponding updated coordinates based on the force applied to each vertex and the time step between adjacent iterative movement processes. The coordinate position of each vertex in the candidate projections is then updated based on the updated coordinates of each vertex in the current iteration. The attractive force applied to each candidate projection may be constant during each iteration. Furthermore, the time step between each iterative movement process is the same, i.e., the time step between adjacent iterative movement processes is the elapsed time of one iterative movement process. After determining the force applied to each vertex, the electronic device determines the corresponding updated coordinates based on the time step between adjacent iterative movement processes and the force applied, thereby modifying the coordinates of each vertex to the corresponding updated position. Alternatively, the electronic device may calculate the force applied to each vertex simultaneously or sequentially according to a preset positional order. The position order may be to start from the vertex located at each candidate projection edge and calculate the forces on adjacent vertices in sequence.
[0104] Optionally, the selection of the time step in the embodiments of the present disclosure may be determined based on preset constraints. For example, the constraints may include ensuring that the time step does not overlap with any edge of a triangle during movement and is less than a preset step threshold. Alternatively, the constraints may further include selecting the longest time step among all eligible step lengths as the time step.
[0105] In other words, the electronic device performs a dynamic process on the candidate projections obtained after initialization, essentially "pulling" the points to be joined together while maintaining the inter-vertex relationships as unchanged as possible. For example, if the target flexible object is clothing, the 2D projection corresponding to the sleeve of the clothing is a quadrilateral cut along the arm. The final topologically sound projection should be a hollow circle that re-seams the cuts. The process of obtaining a topologically sound projection from the candidate projections initialized from the 2D projections consists of multiple time steps, with an iterative movement process performed in each time step. This process applies a force to each vertex in the candidate projection, similar to an elastic object in the physical world. Due to the mechanical properties of elastic materials, each vertex is subject to a restoring force in addition to a tensile force. The electronic device can apply an attractive force between each pair of vertices at the edge of the 2D projection as a tensile force. The total restoring force on a vertex not at the edge of the 2D projection is composed of the restoring force components applied to each triangle facet in which the vertex resides. Each restoration component is similar to the elastic stress in the physical world, attempting to restore the triangle element of the current time step to the shape of the triangle element after initialization and before the dynamic process. That is, it requires that the shape of the entire mapping remain as unchanged as possible during the dynamic process of iterative movement, so that the relative position relationship of the vertices can be kept as unchanged as possible to a large extent.
[0106] Figure 5 shows a schematic diagram of a vertex force according to an embodiment of the present disclosure. As shown in Figure 5, during each iterative movement process, the electronic device performs mechanical simulation by applying attraction to the vertices in the candidate projection that coincide with each other in the preset model, and setting a restoring component force for restoring the deformation according to the properties of the flexible material itself. The figure shows the effect of the restoring component force of the face element k on each vertex i. The electronic device can translate and rotate the shape of the triangular face element where the vertex i is located in the initial state so that the midpoint of the opposite side corresponding to the vertex i coincides with the midpoint of the opposite side in the state after this iterative movement process. The displacement of the vertex i from the current position to the position corresponding to the initial face element after translation and rotation is determined as follows: Since vertex i is also affected by the restoring force, and the vertex is strongly forced away from the bottom edge when it approaches the bottom edge of the triangle, it tends to move away from the bottom edge in the next iterative movement process. The total restoring force received by vertex i is:
[0107] Among them, the height vector from the base to the vertex of the triangle element is:
[0108] Among them, (·,·) represents the inner product, Represents the three edges of the triangle where vertex i is located, and the coordinates of each vertex in the current iterative movement process t According to the combined force Perform iterative updates and obtain the updated coordinates as follows:
[0109] where β (t) The time step during the iteration process can be set small enough to prevent the vertex from crossing the bottom edge and causing the triangle to be flipped during the iteration process:
[0110] in, And when the coordinates When , there exists i,k such that. }, is the time step that will cause the vertex trajectory and the bottom edge trajectory to intersect during the iteration. γ can be 0.5, β max The value may be 0.1. Based on the above method, the electronic device can obtain a topologically reasonable projection by stitching together the area corresponding to each two-dimensional region projection in the candidate projection, and then stitching together the areas corresponding to all two-dimensional region projections as a whole.
[0111] Step S40: adding disturbance to at least one rendering point on the topologically reasonable projection plane to move the rendering point from an initial position on the geometrically reasonable projection plane to a target position.
[0112] In one possible implementation, after determining a topologically reasonable projection, the electronic device adds disturbances to the rendering points included in the triangular facets therein to move the position of at least one rendering point on the geometrically reasonable projection plane. The electronic device may first determine the initial position of each rendering point in the geometrically reasonable projection, then further obtain its corresponding position on the topologically reasonable projection plane and perform disturbances, and finally determine the target position on the geometrically reasonable projection plane based on the disturbance result. That is, the electronic device may disturb at least one rendering point by first determining the position of each rendering point on the topologically reasonable projection plane based on the initial position of each rendering point in the geometrically reasonable projection, and determining the candidate position of each rendering point on the topologically reasonable projection plane after disturbance through random disturbances. The target position of each rendering point on the geometrically reasonable projection plane after disturbance is determined based on the corresponding candidate position.
[0113] Optionally, the perturbation method of the embodiment of the present disclosure may be a random plane deformation perturbation. Exemplarily, the plane deformation perturbation may be a Thin Plate Spline Sampling (TPS) method, which is a two-dimensional interpolation method. By giving corresponding control points in two images, one of the images is deformed in a specific manner so that the control points after deformation coincide with the control points of the other image. In the process of perturbation, the electronic device first determines the centroid coordinates of the rendering point to be disturbed within the geometrically reasonable projection inner triangle element, and determines the absolute position of the rendering point on the topologically reasonable projection plane based on the centroid coordinates. Further perturbation is performed through TPS to obtain its new position, and then the centroid coordinates of the new position are calculated, and the new target position of the rendering point after projection back to the geometrically reasonable projection is calculated based on the new centroid coordinates.
[0114] FIG6 is a schematic diagram of a perturbation rendering point process according to an embodiment of the present disclosure. As shown in FIG6 , the position of a rendering point in a geometrically reasonable projection is determined by the triangle barycentric coordinates of the triangle face in which it is located. The triangle barycentric coordinates are relative coordinates represented by the weighted weights of the three vertices of a triangle. Through this coordinate, the corresponding pixel position of a rendering point on the surface of any preset model in the texture image can be obtained by the relationship relative to the vertex of the triangle face in which it is located, and is used to collect pixel values on the texture image according to its position for image rendering. In order to calculate the new pixel value of the rendered image after the perturbation, the electronic device can add an additional mapping transformation in the original rendering process. For a rendering point in any triangle face, since the triangle face is usually very small, its position relative to the triangle face can be considered to remain unchanged in the two mappings. Therefore, its position in different projection images can be calculated using the triangle barycentric coordinates as a medium. Two areas that are far apart on a geometrically reasonable projection can be adjacent in a topologically reasonable projection. Assuming that the two triangle faces at the edges of two small areas in the geometrically reasonable projection are actually adjacent in the preset model, they are also adjacent in the projection vertices. Each vertex on the topologically reasonable projection plane corresponds to a vertex in a geometrically reasonable projection.
[0115] Step S50 : Rendering the preset model according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object.
[0116] In one possible implementation, after the electronic device alters the positions of rendering points on a two-dimensional, geometrically reasonable projection plane through perturbation, it then obtains the corresponding pixel values of the rendering points and the texture image based on the target position of each rendering point for rendering, ultimately obtaining a target three-dimensional model of the target flexible object. Specifically, the pixel value of each rendering point in the rendered image is collected by interpolating the pixel value of the corresponding position of the rendering point on the texture image. The corresponding position of the rendering point on the texture image may be the target position of the rendering point in the geometrically reasonable projection after the perturbation.
[0117] Optionally, each rendered point corresponds to a light path passing through the camera point. This light path may intersect with the 3D model at one or more points, but typically only the point closest to the camera point is considered. This intersection point must fall on a triangle on the surface of the 3D model. Therefore, the centroid coordinates of the perturbed rendered point on the corresponding triangle are calculated. Based on the centroid coordinates, the corresponding position on the texture image is determined, and the pixel values are obtained for rendering to obtain the final target 3D model.
[0118] Figure 7 shows a schematic diagram of a target three-dimensional model application scenario according to an embodiment of the present disclosure. As shown in Figure 7, the embodiment of the present disclosure can be applied to a model training scenario to improve the model training effect. That is, the electronic device can determine the target human body model based on the target three-dimensional model and the human body model. Then determine the model training set based on the target human body model. Train the human body detection model based on the model training set. Among them, the electronic device can generate different target human body models by multiple determinations of different perturbations of the target three-dimensional model to increase the number of samples in the training set. At the same time, the model training set can be determined by capturing multiple images of the target human body model at different angles. The training set determined in this way can accurately model the state of real clothes on the human body, thereby improving the accuracy and generalization of the human body detection model obtained through training.
[0119] Figure 8 shows a schematic diagram of a target three-dimensional model effect according to an embodiment of the present disclosure. As shown in Figure 8, when the rendering points are directly disturbed on the geometrically reasonable projection (GeoProj), since the topological structure between the small areas of GeoProj is no longer retained, some patterns will be disturbed to positions where they should not appear, and an effect that does not conform to physical reality will be caused in the final rendered image. However, the present disclosure ensures that the topological relationship between points and their topological relationship in the three-dimensional preset model remain unchanged by adding disturbances in the topologically reasonable projection, thereby achieving disturbances that simulate deformations in the approximate physical world and obtaining a target flexible object with deformations that conform to actual physical conditions.
[0120] Based on the above technical features, the disclosed embodiments can add positional perturbations to a 2D projection that conforms to the topological relationships of a 3D model and render the model based on the perturbed rendering points, resulting in a deformed target flexible object that conforms to actual physical conditions. This improves the fidelity of the 3D modeling results for the flexible object. Furthermore, the highly realistic 3D model obtained through this modeling approach can be used for data augmentation, improving the perturbation resistance of the acquired image during physical realization.
[0121] FIG9 is a schematic diagram of a three-dimensional modeling apparatus for a flexible object according to an embodiment of the present disclosure. As shown in FIG9 , the three-dimensional modeling apparatus for a flexible object according to an embodiment of the present disclosure may include:
[0122] An information determination module 90 is configured to determine a three-dimensional preset model and a two-dimensional texture image of the target flexible object, wherein the preset model includes a plurality of vertices and a plurality of triangular facets, wherein the points constituting each triangular facet are the vertices, and at least one triangular facet includes at least one rendering point having a corresponding pixel value in the texture image;
[0123] A first projection determination module 91 is configured to determine a geometrically reasonable projection consisting of two-dimensional coordinates corresponding to each vertex, wherein the geometrically reasonable projection includes a two-dimensional region projection corresponding to at least one three-dimensional region constituting the preset model;
[0124] A second projection determination module 92 is configured to splice each of the two-dimensional region projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model;
[0125] A pixel perturbation module 93 is configured to move at least one rendering point on the topologically reasonable projection plane from an initial position to a target position by adding perturbation to the rendering point.
[0126] The model rendering module 94 is configured to render the preset model according to the pixel value corresponding to the target position of each rendering point in the texture image, so as to obtain a target three-dimensional model of the target flexible object.
[0127] In a possible implementation, the first projection determination module 91 is further configured to:
[0128] Segmenting the preset model to obtain at least one three-dimensional region;
[0129] Each of the three-dimensional regions is unfolded in a physical simulation plane to obtain an image of the corresponding two-dimensional region projection, and the images of each two-dimensional region projection are spliced to obtain a geometrically reasonable projection, and the two-dimensional coordinates corresponding to each vertex are determined according to the position of the geometrically reasonable projection.
[0130] In a possible implementation, the second projection determination module 92 is further configured to:
[0131] Initializing the coordinates of each of the two-dimensional region projections to obtain initialized candidate projections;
[0132] Iteratively move each vertex in the candidate projection multiple times by means of physical simulation;
[0133] In response to the two-dimensional vertex positions of the vertices in the candidate projections that overlap in position in the preset model all overlap, the iterative movement process is stopped, and the current candidate projection is determined to be a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
[0134] In a possible implementation, the second projection determination module 92 is further configured to:
[0135] Determining a corresponding coordinate transformation rule according to the positional relationship of each two-dimensional area projection in the preset model;
[0136] Coordinate transformation is performed on each of the vertices included in the two-dimensional region projection according to a coordinate transformation rule corresponding to each of the two-dimensional region projections to obtain an initialized candidate projection.
[0137] In a possible implementation, the second projection determination module 92 is further configured to:
[0138] In each iteration, a preset attraction force is applied between every two vertices of the candidate projections that overlap in the preset model by means of physical simulation;
[0139] Calculating the force corresponding to each vertex respectively, and determining the corresponding updated coordinates according to the force corresponding to each vertex and the time step between adjacent iterative movement processes;
[0140] The coordinate position of each vertex in the candidate projection is updated according to the updated coordinates of each vertex in the current iteration process.
[0141] In a possible implementation, the time step constraint conditions include:
[0142] Each vertex does not overlap with any edge of the triangle element during the movement, and the step length is less than a preset threshold.
[0143] In a possible implementation, the pixel perturbation module 93 is further configured to:
[0144] Determining an initial position of each of the rendering points in the geometrically reasonable projection;
[0145] Determining the position of each rendering point on the topologically reasonable projection plane according to the initial position, and determining a candidate position of each rendering point on the topologically reasonable projection plane after disturbance by random perturbation;
[0146] The target position of each rendering point on the geometrically reasonable projection plane after disturbance is determined according to the corresponding candidate position.
[0147] In a possible implementation, the random perturbation mode is a random plane deformation perturbation.
[0148] In a possible implementation, the apparatus further includes:
[0149] A model generation module, configured to determine a target human body model based on the target three-dimensional model and a preset human body model;
[0150] A training set determination module, configured to determine a model training set based on the target human body model;
[0151] The model training module is used to train the human body detection model according to the model training set.
[0152] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0153] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0154] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0155] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0156] 10 shows a schematic diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0157] 10 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0158] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0159] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0160] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0161] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration step and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0162] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0163] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0164] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and temperature changes of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0165] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0166] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0167] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions. The computer program instructions can be executed by the processor 820 of the electronic device 800 to perform the above method.
[0168] FIG11 shows a schematic diagram of another electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal device. Referring to FIG11 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions that can be executed by the processing component 1922, such as an application. The application stored in the memory 1932 can include one or more modules, each of which corresponds to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0169] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0170] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0171] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0172] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0173] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0174] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0175] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0176] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0177] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0178] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that 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 flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0179] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A three-dimensional modeling method for a flexible object, It is characterized in that The method comprises: Determine a three-dimensional preset model and a two-dimensional texture image of the target flexible object, wherein the preset model includes a plurality of vertices and a plurality of triangular face elements, and the points constituting each of the triangular face elements are the vertices; Determine a geometrically reasonable projection composed of two-dimensional coordinates corresponding to each of the vertices, wherein the geometrically reasonable projection includes a two-dimensional area projection corresponding to at least one three-dimensional area constituting the preset model; Splicing each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model; By adding disturbance to at least one rendering point on the topologically reasonable projection plane, the rendering point is moved from an initial position on the geometrically reasonable projection plane to a target position; The preset model is rendered according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object.
2. The method according to claim 1, It is characterized in that Determining the geometrically reasonable projection composed of the two-dimensional coordinates corresponding to each vertex includes: Segmenting the preset model to obtain at least one three-dimensional region; Each of the three-dimensional regions is unfolded in a physical simulation plane to obtain an image of the corresponding two-dimensional region projection, and each of the two-dimensional region projection images is spliced to obtain a geometrically reasonable projection, and the two-dimensional coordinates corresponding to each vertex are determined according to the position of the geometrically reasonable projection.
3. The method according to claim 1, It is characterized in that The step of splicing each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model includes: Initializing the coordinates of each of the two-dimensional region projections to obtain an initialized candidate projection; Iteratively move each vertex in the candidate projection multiple times by means of physical simulation; In response to the two-dimensional vertex positions of vertices in the candidate projections that overlap in position in the preset model all overlap, the iterative movement process is stopped, and the current candidate projection is determined to be a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model.
4. The method according to claim 3, It is characterized in that The step of initializing the coordinates of each of the two-dimensional area projections to obtain an initialized candidate projection includes: Determine a corresponding coordinate transformation rule according to the positional relationship of each two-dimensional area projection in the preset model; The coordinate transformation is performed on each of the vertices included in the two-dimensional area projection according to the coordinate transformation rule corresponding to each of the two-dimensional area projections to obtain an initialized candidate projection.
5. The method according to claim 3 or 4, It is characterized in that The iteratively moving each vertex in the candidate projection multiple times by means of physical simulation includes: In each iteration, a preset attraction force is applied between every two vertices in the candidate projections that overlap in position in the preset model by means of physical simulation; The force corresponding to each vertex is calculated respectively, and the corresponding update coordinates are determined according to the force corresponding to each vertex and the time step between adjacent iterative movement processes; The coordinate position of each vertex in the candidate projection is updated according to the updated coordinates of each vertex in the current iteration process.
6. The method according to claim 5, It is characterized in that The time step constraints include: Each of the vertices does not overlap with any edge of the triangular face element during the movement, and the step length is smaller than a preset threshold.
7. The method according to claim 1, It is characterized in that The step of adding disturbance to at least one rendering point on the topologically reasonable projection plane to move the rendering point from an initial position on the geometrically reasonable projection plane to a target position comprises: Determining an initial position of each of the rendering points in the geometrically reasonable projection; Determine the position of each rendering point on the topologically reasonable projection plane according to the initial position, and determine the candidate position of each rendering point on the topologically reasonable projection plane after disturbance by random perturbation; The target position of each of the rendering points on the geometrically reasonable projection plane after disturbance is determined according to the corresponding candidate position.
8. The method according to claim 7, It is characterized in that The random perturbation mode is a random plane deformation perturbation.
9. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: Determining a target human body model according to the target three-dimensional model and a preset human body model; Determine a model training set according to the target human body model; A human body detection model is trained according to the model training set.
10. A three-dimensional modeling device for flexible objects, It is characterized in that The device comprises: An information determination module, used to determine a three-dimensional preset model and a two-dimensional texture image of the target flexible object, wherein the preset model includes a plurality of vertices and a plurality of triangular face elements, the points constituting each of the triangular face elements are the vertices, and at least one of the triangular face elements includes at least one rendering point having a corresponding pixel value in the texture image; A first projection determination module is used to determine a geometrically reasonable projection composed of two-dimensional coordinates corresponding to each of the vertices, wherein the geometrically reasonable projection includes a two-dimensional area projection corresponding to at least one three-dimensional area constituting the preset model; A second projection determination module is used to splice each of the two-dimensional area projections in the geometrically reasonable projections to obtain a topologically reasonable projection whose topological relationship conforms to the vertex position relationship in the preset model; A pixel perturbation module, configured to move the rendering point from an initial position on the geometrically reasonable projection plane to a target position by adding a perturbation to at least one rendering point on the topologically reasonable projection plane; The model rendering module is used to render the preset model according to the pixel value corresponding to the target position of each rendering point in the texture image to obtain a target three-dimensional model of the target flexible object.
11. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 9 when executing the instructions stored in the memory.
12. A non-volatile computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Three-dimensional real human body online virtual fitting system
CN107578323A
Target object rendering method and device, computer equipment and medium
CN113096254A
Three-dimensional hair model generation method and device, electronic equipment, and storage medium
CN114078180A
Method and electronic equipment for solving problem of wearing of three-dimensional human body model and clothes model
CN115588076A
Distributed large-scale high-speed AUV high-fidelity simulation system based on real disturbance data
CN115981349A
Cited By
Three-dimensional model deformation simulation method and device and storage medium
CN120372894A
Modeling method and system for three-dimensional geometric model of aviation wing structure
CN120893129A
Projection method and device of three-dimensional grid model, equipment and storage medium
CN121357314A
Knitted fabric three-dimensional structure intelligent generation method based on texture features
CN122655170A
