Method and device for optimizing harmonic mapping into conformal mapping, equipment and storage medium
By dividing and moving the boundary area of the topological disk in the harmonic mapping, the problem of distortion of the boundary area of the harmonic mapping result is solved, and conformal mapping is realized, reducing the degree of distortion of the mapping result.
Patent Information
- Application Number
- CN202411252585.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, the harmonic mapping results are severely distorted in the boundary area, making it difficult to achieve conformal mapping.
By obtaining the three-dimensional model, harmonic mapping to the topological disk, dividing the fixed area and deformation area, analyzing the boundary direction of the deformation area, moving the boundary to calculate the transition harmonic mapping results, and repeating the division until the conformal mapping is reached.
On the basis of harmonic mapping, the degree of distortion of the boundary area of the mapping result is reduced, and conformal mapping is realized, making the operation simple and easy to implement.
Smart Images

Figure CN119228635A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer graphics, and in particular, relates to a method, device, equipment and storage medium for optimizing a harmonic mapping into a conformal mapping. Background Art
[0002] A 3D model can be viewed as a 2D manifold embedded in a 3D space. To convert a 3D graphic into a 2D plane graphic, a mapping can be established to map it into a 2D plane graphic. Then, high-quality mesh generation is performed on the 2D plane graphic, and finally the generated plane mesh is mapped back to the 3D model in the original 3D space. In order to maintain the mesh quality during the mapping back to the 3D model in the original 3D space, it is necessary to ensure that the mapping between the 3D model and the plane graphic is conformal, i.e., conformal mapping.
[0003] Harmonic mapping is a very important type of differentiable mapping between Riemann manifolds. It has the property of differential homeomorphism, but the result of harmonic mapping will be seriously distorted in the boundary area.
[0004] Therefore, how to achieve conformal mapping based on harmonic mapping and reduce the distortion of the boundary area of the harmonic mapping result is an important issue in current research. Summary of the invention
[0005] The main technical problem solved by the present invention is to provide a method, device, equipment and storage medium for optimizing harmonic mapping into conformal mapping, so as to solve the problem of how to realize conformal mapping based on harmonic mapping and reduce the degree of distortion of the harmonic mapping results in the boundary area in the prior art.
[0006] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a method, device, equipment and storage medium for optimizing a harmonic mapping into a conformal mapping, wherein the method for optimizing a harmonic mapping into a conformal mapping comprises:
[0007] Step S1, obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating an initial harmonized mapping result of the three-dimensional model.
[0008] Step S2: dividing the fixed area and the deformable area in the topological disk according to the initial harmonic mapping result.
[0009] Step S3, analyzing the deformation direction of the boundary of the deformation area, moving the boundary of the deformation area along the deformation direction to obtain an intermediate transition parameter domain, and calculating the transition harmonic mapping result of the parameter domain.
[0010] Step S4, determining whether the transition harmonic mapping result of the parameter domain is a conformal mapping;
[0011] Step S5: if the transition harmonic mapping result of the parameter domain is not conformal mapping, the parameter domain is re-divided into a fixed area and a deformable area according to the transition harmonic mapping result, and the process returns to repeatedly execute steps S3 and S4 until the transition harmonic mapping result of the parameter domain is conformal mapping.
[0012] Step S6: if the transition harmonic mapping result of the parameter domain is a conformal mapping, then outputting the final harmonic mapping result corresponding to the three-dimensional model.
[0013] In some embodiments, step S1, obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating an initial harmonic mapping result of the three-dimensional model are as follows: mapping the surface boundary of the three-dimensional model to the boundary of the topological disk, and keeping the boundary position of the topological disk fixed; continuously adjusting the position of the grid points in the topological disk through Laplace transform; judging whether the harmonic energy is less than the harmonic energy threshold, and obtaining an initial harmonic mapping result when the harmonic energy is less than the harmonic energy threshold.
[0014] In some embodiments, the method for determining whether the harmonization energy is less than the harmonization energy threshold is:
[0015] E(f)-E0|<δ;
[0016] Wherein, E(f) represents the harmonic energy, E0 represents the initial harmonic energy, and δ represents the harmonic energy threshold.
[0017] In some embodiments, step S2, based on the initial harmonic mapping result, divides the fixed area and the deformable area in the topological disk, the method is: determine whether all the triangular mesh units in the topological disk are non-deformable; divide the convex area formed by the non-deformable and mutually continuous triangular mesh units in the topological disk into a fixed area; divide the triangular mesh units outside the convex area into a deformable area.
[0018] In some embodiments, all the triangular mesh units in the topological disk are judged to be non-deformed by: when the deformation value of the triangular mesh unit is less than the deformation threshold, the triangular mesh unit is regarded as non-deformed; otherwise, the triangular mesh unit is regarded as deformed.
[0019] In some embodiments, in step S3, the deformation direction of the boundary of the deformation area is analyzed, the boundary of the deformation area is moved along the deformation direction to obtain a parameter domain of the intermediate transition, and the harmonic mapping result of the parameter domain is calculated, including: according to the deformation of the triangular mesh units in the deformation area, a deformation trend vector of the grid points of each triangular mesh unit is obtained; according to the deformation trend vector, the grid points are conducted to the boundary of the parameter domain to obtain the deformation direction component; according to the deformation direction component, the deformation direction of the boundary of the deformation area is obtained; the boundary of the deformation area is moved by a unit step along the deformation direction to obtain the parameter domain of the intermediate transition.
[0020] In some embodiments, in step S4, it is determined whether the transition harmonic mapping result of the parameter domain is conformal mapping, and the determination method is: when the deformation values of all triangular mesh units in the parameter domain are less than the deformation threshold, it indicates conformal mapping.
[0021] To solve the above technical problems, the present application also provides a device for optimizing a harmonic mapping into a conformal mapping, comprising a mapping and calculation module, a partitioning module, an analysis and boundary movement module, a conformal judgment module, a repeated partitioning module and an output module;
[0022] The mapping and calculation module is used to obtain the three-dimensional model, harmonically map the three-dimensional model to the topological disk, and calculate the initial harmonized mapping result of the three-dimensional model.
[0023] The partitioning module is used to partition the fixed area and the deformable area in the topological disk according to the initial harmonic mapping result.
[0024] The analysis and boundary movement module is used to analyze the deformation direction of the boundary of the deformation area, move the boundary of the deformation area along the deformation direction to obtain the parameter domain of the intermediate transition, and calculate the transition harmonic mapping result of the parameter domain.
[0025] The conformal judgment module is used to judge whether the transition harmonic mapping result of the parameter domain is a conformal mapping.
[0026] The repeated division module is used to re-divide the parameter domain into a fixed area and a deformation area according to the transition harmonic mapping result when the transition harmonic mapping result of the parameter domain is not a conformal mapping, and return to the analysis and boundary movement module and the conformal judgment module until the transition harmonic mapping result of the parameter domain is a conformal mapping.
[0027] The output module is used to output a final harmonic mapping result corresponding to the three-dimensional model when the transition harmonic mapping result of the parameter domain is a conformal mapping.
[0028] In order to solve the above technical problems, the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the above-mentioned methods for optimizing the harmonic mapping into a conformal mapping.
[0029] In order to solve the above technical problems, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is used to implement any of the above-mentioned methods for optimizing a harmonic mapping into a conformal mapping.
[0030] Beneficial effects: The present application discloses a method, device, equipment and storage medium for optimizing a harmonic mapping into a conformal mapping, wherein the method comprises: obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating the initial harmonic mapping result of the three-dimensional model; dividing the fixed area and the deformed area in the topological disk according to the initial harmonic mapping result; analyzing the deformation direction of the boundary of the deformed area, moving the boundary of the deformed area along the deformation direction to obtain the parameter domain of the intermediate transition, and calculating the transition harmonic mapping result of the parameter domain; judging whether the transition harmonic mapping result of the parameter domain is a conformal mapping; if the transition harmonic mapping result of the parameter domain is not a conformal mapping, re-dividing the parameter domain into a fixed area and a deformed area according to the transition harmonic mapping result until the transition harmonic mapping result of the parameter domain is a conformal mapping; if the transition harmonic mapping result of the parameter domain is a conformal mapping, outputting the final harmonic mapping result corresponding to the three-dimensional model. The method of the present application can realize conformal mapping on the basis of harmonic mapping, reduce the distortion degree of the boundary area of the mapping result, and is simple to operate and easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A flow chart of an embodiment of a method for optimizing a harmonic mapping into a conformal mapping of the present application is provided;
[0032] Figure 2 An example diagram of the input 3D model is given;
[0033] Figure 3 For the general Figure 2 The mapping result diagram obtained after the three-dimensional model input is harmonically mapped to the topological disk;
[0034] Figure 4 A schematic diagram for analyzing the deformation trend vector of a triangular mesh element is given;
[0035] Figure 5 The mapping result graph is given when the boundary of the deformation area changes;
[0036] Figure 6 The mapping result diagram when conformal mapping is achieved is given;
[0037] Figure 7 A schematic diagram of a framework of a device for optimizing a harmonic mapping into a conformal mapping according to the present application is provided;
[0038] Figure 8 A schematic diagram of a framework of an electronic device according to an embodiment of the present application is provided;
[0039] Fig. 9 A schematic diagram of a computer-readable storage medium according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] The terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically limited. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or terminal comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or terminals.
[0042] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0043] It should be noted that the "harmonic map" referred to in this application is a very important type of differentiable mapping between Riemann manifolds. Mathematically, a (smooth) mapping between a Riemann manifold M and a Riemann manifold N is called a harmonic map. Harmonic maps have the property of diffeomorphism.
[0044] A "Riemannian manifold" is a differentiable manifold where the tangent space of each point p defines a dot product that varies smoothly with p. It allows the definition of arc lengths, angles, areas, volumes, curvatures, function gradients, and divergences of vector fields.
[0045] "Conformal Mapping" is a particularly important class of complex variable functions, which is an angle-preserving mapping. These functions keep the angle unchanged during the mapping process, which is very useful in many applications, such as fluid dynamics, electromagnetics, etc.
[0046] “Harmonic energy” refers to the elastic deformation energy induced by the distortion of the mapping between the surfaces of the three-dimensional model.
[0047] The "topological disk" is the area where the shape of the input 3D model is constrained to the unit circle when it is first mapped to the 2D plane.
[0048] The "parameter domain" is a finite area formed on a two-dimensional plane by expanding the boundary of a topological disk according to the deformation direction of the boundary of the topological disk during the mapping of the three-dimensional model to the two-dimensional plane.
[0049] Figure 1 A flowchart of an embodiment of a method for optimizing a harmonic mapping into a conformal mapping of the present application is provided. The method of the present application includes:
[0050] Step S1, obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating an initial harmonized mapping result of the three-dimensional model.
[0051] Step S2: dividing the fixed area and the deformable area in the topological disk according to the initial harmonic mapping result.
[0052] Step S3, analyzing the deformation direction of the boundary of the deformation area, moving the boundary of the deformation area along the deformation direction to obtain an intermediate transition parameter domain, and calculating the transition harmonic mapping result of the parameter domain.
[0053] Step S4, determining whether the transition harmonic mapping result of the parameter domain is a conformal mapping;
[0054] Step S5: if the transition harmonic mapping result of the parameter domain is not conformal mapping, the parameter domain is re-divided into a fixed area and a deformable area according to the transition harmonic mapping result, and the process returns to repeatedly execute steps S3 and S4 until the transition harmonic mapping result of the parameter domain is conformal mapping.
[0055] Step S6: if the transition harmonic mapping result of the parameter domain is a conformal mapping, then outputting the final harmonic mapping result corresponding to the three-dimensional model.
[0056] In the method of the present application, the input three-dimensional model is first mapped to a topological disk using harmonic mapping, and then the topological disk is divided into a fixed area and a deformation area, and the position of the grid points in the deformation area is continuously adjusted to achieve the effect of conformal mapping. Therefore, the method of the present application can achieve conformal mapping on the basis of harmonic mapping, reduce the degree of distortion in the boundary area of the mapping result, and is simple to operate and easy to implement.
[0057] To further illustrate the method of this application, Figure 2 An example of a 3D model (i.e., original model) input in 3D space is given. Figure 2It can be seen that the surface of the input three-dimensional model 1 includes a plurality of triangular mesh units 11. When the surface of the three-dimensional model 1 is along the surface boundary 12 ( Figure 2 The thick lines in the figure represent the surface boundaries. When the surface is unfolded, its unfolded shape is a rectangle.
[0058] In order to facilitate deformation analysis, the parameter domain in the two-dimensional plane is also divided into a plurality of triangular mesh units, and the triangular mesh units on the parameter domain are mapped one-to-one with the triangular mesh units of the input three-dimensional model. It should be noted that the "grid point" referred to in this application refers to each vertex of the triangular mesh unit.
[0059] In some embodiments, in combination Figure 2 and Figure 3 In step S1, a three-dimensional model is obtained, the three-dimensional model is harmonically mapped to a topological disk, and an initial harmonic mapping result of the three-dimensional model is calculated, and the method is:
[0060] The surface boundary 12 of the three-dimensional model 1 is mapped to the boundary 17 of the topological disk 13, and the position of the boundary 17 of the topological disk 13 is kept fixed; the position of the grid points in the topological disk 13 is continuously adjusted through Laplace transform; it is determined whether the harmonic energy is less than the harmonic energy threshold, and when the harmonic energy is less than the harmonic energy threshold, an initial harmonic mapping result is obtained.
[0061] It should be noted that Laplace transform is an integral transform commonly used in engineering mathematics, also known as Laplace transform. Laplace transform is a linear transformation that can convert a function with a real parameter into a function with a complex parameter.
[0062] Specifically, when the surface boundary 12 of the three-dimensional model 1 is first mapped to the boundary 17 of the topological disk 13 and the position of the boundary 17 of the topological disk 13 is kept fixed, the harmonic energy at this time is the initial harmonic energy E0. In the process of continuously adjusting the position of the grid points in the topological disk 13 through Laplace transform, the harmonic energy changes continuously.
[0063] Specifically, the calculation method of the harmonic energy E(f) is:
[0064]
[0065] Where E(f) represents the harmonic energy, f(v i ) represents the grid point v i The corresponding mapping function, f(v j ) indicates the network point v j The corresponding mapping function, v i 、v j Respectively represent the positions of different grid points on the parameter domain, k ijrepresents the weight coefficient, and M represents the total number of grid points.
[0066] In some embodiments, the method for determining whether the harmonic energy is less than the harmonic energy threshold is: when E(f)-E0|<δ is satisfied, it indicates that the minimum harmonic energy can be obtained by continuously adjusting the positions of the grid points in the topological disk through Laplace transform, and the harmonic mapping result obtained at this time is the initial harmonic mapping result. Wherein, E0 represents the initial harmonic energy, δ represents the harmonic energy threshold, and illustratively, δ can be taken as e -5 .
[0067] Combination Figure 3 , Figure 3 For the general Figure 2 After the three-dimensional model 1 input in is mapped to the topological disk 13, the mapping result diagram is obtained. Figure 3 It can be seen that at this time, the triangular mesh units inside the topological disk 13 are fully expanded, and the triangular mesh units that are distorted are concentrated on the boundary 17 of the topological disk 13. The triangular mesh units without distortion inside the topological disk 13 are fixed, and since the triangular mesh units on the topological disk 13 correspond one-to-one with the triangular mesh units of the input three-dimensional model, the shapes of the triangular mesh units that are distorted on the boundary 17 of the topological disk 13 and the triangular mesh units on the input three-dimensional model can be analyzed.
[0068] Specifically, Figure 4 As shown, based on the common characteristics, the grid cells of the topological disk and the grid cells corresponding to the input three-dimensional model form a set of similar triangles, for example: Figure 4 ΔABC is similar to ΔA'B'C', where ΔA'B'C' represents the triangular mesh unit of the topological disk, ΔABC represents the triangular mesh unit of the input three-dimensional model corresponding to ΔA'B'C', and the A'B' side belongs to the side of the fixed area and is equal to the AB side of ΔABC. By comparing ΔABC with ΔA'B'C', the deformation trend vector of the triangular mesh unit of the topological disk C' in the three-dimensional model can be obtained.
[0069] Furthermore, the method for judging whether the triangular mesh unit is deformed is as follows: according to the angles θ of each corner on ΔABC on the three-dimensional model A ,θ B ,θ C The angles θ with each corner of ΔA'B'C' on the topological disk A' ,θ B' ,θ C' , calculate the deformation value T ΔABC , where the deformation value T ΔABC The calculation method is:
[0070]
[0071] When T ΔABC <ε, the triangular mesh unit is considered to be non-deformed, where ε represents the deformation threshold; otherwise, the triangular mesh unit is considered to be deformed.
[0072] In some embodiments, in step S2, a fixed region and a deformable region in the topological disk are divided according to the initial harmonic mapping result.
[0073] Combination Figure 3 , exemplarily, according to the above method for determining whether the triangular mesh units are non-deformable, the topological disk 13 is divided into a fixed area 15 and a deformable area. The red circle in the figure exemplarily represents the fixed area and the deformable area, and can also be represented by other methods or other areas. This is only for illustrating the method of the present application and cannot be used as a limitation on the scope of protection of the present application. The convex area formed by the non-deformable and mutually continuous triangular mesh units in the topological disk 13 is divided into the fixed area 15, and the triangular mesh units other than the above convex area are divided into the deformable area. Figure 3 It can be seen that the triangular mesh units that produce distortion are concentrated at the left and right ends of the topological disk 13, that is, the first deformation area 14 and the second deformation area 16. It should be noted that the convex area can be a rectangle, a circle or other arbitrary polygons, and the circle is used as the convex area in this application.
[0074] In some embodiments, in combination Figure 5 , step S3, analyzing the deformation direction of the boundary of the deformation area, moving the boundary of the deformation area along the deformation direction to obtain the parameter domain 18 of the intermediate transition, and calculating the transition harmonic mapping result of the parameter domain 18.
[0075] Specifically, according to the above method for judging whether a triangular mesh unit is deformable or not, the deformation of the triangular mesh unit in the deformation area is obtained; further, according to the deformation of the triangular mesh unit in the deformation area, a deformation trend vector can be obtained for each grid point of the triangular mesh unit in the deformation area, wherein the deformation trend vector is used to represent the deformation trend of the point; further, according to the deformation trend vector, the point is conducted from the inside to the outside (i.e., the boundary of the parameter domain), that is, the deformation direction component of the deformation trend vector along the boundary direction can be obtained, and finally the deformation direction of the boundary of the deformation area is obtained. (like Figure 3 (in the direction of the arrow in the figure).
[0076] Specifically, the boundary of the deformation region is moved by a unit step along the deformation direction to obtain the parameter domain 18 of the intermediate transition. iAfter the position moves unit step, the new position v of the grid point is obtained i 'for:
[0077]
[0078] Among them, step represents the unit step length, v i represents the initial position of the grid points on the deformation area, Indicates the deformation direction of the deformation region boundary.
[0079] Furthermore, when the boundary of the deformation region moves a unit step along the deformation direction, since the boundary of the deformation region changes, the boundary 19 of the parameter domain 18 will also change accordingly. At this time, the mapping result is shown in FIG. Figure 5 As shown, the obtained harmonic mapping result is called a transitional harmonic mapping result, and at this time, it is judged whether the conformal mapping effect is achieved.
[0080] Specific, combined Figure 4 and Figure 5 ,Depend on Figure 5 It can be seen that relative to Figure 4 The first deformation region 14 and the second deformation region 16, Figure 5 The triangular mesh units in the first deformation region 14 and the second deformation region 16 have been partially expanded, and since the boundaries of the deformation regions have changed, the harmonic energy of the parameter domain 18 of the intermediate transition may not be less than the harmonic energy threshold. However, since the boundaries of the deformation regions have moved to new positions, i.e., the new boundaries have been fixed, the positions of the mesh points in the deformation regions can be readjusted by Laplace transform until the harmonic energy is less than the harmonic energy threshold, i.e., the transition harmonic mapping result of the parameter domain is obtained.
[0081] Specifically, the method for calculating the harmonic energy and the method for determining whether the harmonic energy is less than the harmonic energy threshold value can be found above and will not be described in detail here.
[0082] In some embodiments, step S4 determines whether the transition harmonic mapping result of the parameter domain is conformal mapping. The determination method is: when the deformation values of all triangular mesh units in the parameter domain are less than the deformation threshold, it satisfies: T ΔABC <ε, it indicates that the effect of conformal mapping has been achieved.
[0083] If the conformal mapping effect is not achieved, the parameter domain formed at this time is re-divided according to the transition harmonic mapping result, and steps S3 and S4 are repeated. Please refer to the above for the specific method, which will not be repeated here. When the distorted part of the boundary area of the parameter domain is completely unfolded, the conformal mapping effect is achieved. When the conformal mapping effect is achieved, the final harmonic mapping result corresponding to the three-dimensional model is output, that is, the final mapping result diagram, such as Figure 6 As shown. Figure 6 It can be seen that at this time, the first deformation area 14 and the second deformation area 16 (combined with Figure 3 and Figure 5 ) are also expanded, and there is no distortion at the boundary 19 of the parameter domain 18, which is similar to Figure 2 The three-dimensional model 1 shown achieves the effect of conformal mapping.
[0084] Combination Figure 7 The present application also provides a device for optimizing a harmonic mapping into a conformal mapping, including a mapping and calculation module 21, a division module 22, an analysis and boundary movement module 23, a conformal judgment module 24, a repeated division module 25 and an output module 26.
[0085] The mapping and calculation module 21 is used to obtain the three-dimensional model, harmonically map the three-dimensional model to the topological disk, and calculate the initial harmonized mapping result of the three-dimensional model.
[0086] The partitioning module 22 is used to partition the topological disk into a fixed area and a deformable area according to the initial harmonic mapping result.
[0087] The analysis and boundary movement module 23 is used to analyze the deformation direction of the boundary of the deformation area, move the boundary of the deformation area along the deformation direction to obtain the parameter domain of the intermediate transition, and calculate the transition harmonic mapping result of the parameter domain.
[0088] The conformal determination module 24 is used to determine whether the transition harmonization mapping result of the parameter domain is a conformal mapping.
[0089] The repeated division module 25 is used to re-divide the parameter domain into a fixed area and a deformation area according to the transition harmonic mapping result when the transition harmonic mapping result of the parameter domain is not a conformal mapping, and return to the analysis and boundary movement module 23 and the conformal judgment module 25 until the transition harmonic mapping result of the parameter domain is a conformal mapping.
[0090] The output module 26 is used to output a final harmonic mapping result corresponding to the three-dimensional model when the transition harmonic mapping result of the parameter domain is a conformal mapping.
[0091] Other technical features of the above-mentioned device for optimizing a harmonic mapping into a conformal mapping are the same as those disclosed in the above-mentioned embodiment method, and will not be described in detail here.
[0092] Combination Figure 8 The present application also provides an electronic device, including a processor 32 and a memory 31, wherein the memory 31 stores a computer program that can be executed by the processor, and when the computer program is executed by the processor 32, it implements any of the above-mentioned methods of optimizing the harmonic mapping into a conformal mapping.
[0093] Specifically, the memory 31 is used to store computer programs or data. The memory 31 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0094] The processor 32 is used to read / write data or computer programs stored in the memory 31 and execute corresponding functions. For example, when the computer program stored in the memory 31 is executed by the processor 32, the method for optimizing the harmonic mapping into the conformal mapping provided in the embodiment of the present application can be implemented.
[0095] In some embodiments, the electronic device may further include: a peripheral terminal interface 33 and at least one peripheral terminal. The processor 32, the memory 31 and the peripheral terminal interface 33 may be connected via a bus or a signal line. Each peripheral terminal may be connected to the peripheral terminal interface 33 via a bus, a signal line or a circuit board. Specifically, the peripheral terminal includes: at least one of a radio frequency circuit 34, a display screen 35, an audio circuit 36 and a power supply 37.
[0096] The peripheral terminal interface 33 can be used to connect at least one peripheral terminal related to I / O (Input / output) to the processor 32 and the memory 31. In some embodiments, the processor 32, the memory 31 and the peripheral terminal interface 33 are integrated on the same chip or circuit board; in some other implementations, any one or two of the processor 32, the memory 31 and the peripheral terminal interface 33 can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0097] The radio frequency circuit 34 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 34 communicates with the communication network and other IoT devices through electromagnetic signals, and the radio frequency circuit 34 is the communication circuit of the electronic device. The radio frequency circuit 34 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 34 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identity module card, and the like. The radio frequency circuit 34 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 34 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0098] The display screen 35 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 35 is a touch display screen, the display screen 35 also has the ability to collect touch signals on the surface or above the surface of the display screen 35. The touch signal can be input to the processor 32 as a control signal for processing. At this time, the display screen 35 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 35 can be one, set on the front panel of the electronic device; in other embodiments, the display screen 35 can be at least two, respectively set on different surfaces of the electronic device or in a folding design; in other embodiments, the display screen 35 can be a flexible display screen, set on the curved surface or folding surface of the electronic device. Even, the display screen 35 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 35 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light Emitting Diode, organic light emitting diode).
[0099] The audio circuit 36 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, and convert the sound waves into electrical signals and input them into the processor 32 for processing, or input them into the radio frequency circuit 34 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged in different parts of the electronic device. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 32 or the radio frequency circuit 34 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 36 may also include a headphone jack.
[0100] The power supply 37 is used to power various components in the electronic device. The power supply 37 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 37 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0101] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiment of the present application, reference can be made to the description in the above-mentioned method embodiments of the present application, which will not be repeated here.
[0102] Combination Fig. 9 The present application also provides a computer-readable storage medium 40 on which a computer program 401 is stored. The computer program 401 is used to implement any of the above-mentioned methods for optimizing a harmonic mapping into a conformal mapping.
[0103] 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 embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0104] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0105] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or partly contributed to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium can be non-transient or transient. Specifically, it includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0108] In summary, the present application discloses a method, device, equipment and storage medium for optimizing a harmonic mapping into a conformal mapping, the method comprising: obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating the initial harmonic mapping result of the three-dimensional model; dividing the fixed area and the deformed area in the topological disk according to the initial harmonic mapping result; analyzing the deformation direction of the boundary of the deformed area, moving the boundary of the deformed area along the deformation direction to obtain the parameter domain of the intermediate transition, and calculating the transition harmonic mapping result of the parameter domain; judging whether the transition harmonic mapping result of the parameter domain is a conformal mapping; if the transition harmonic mapping result of the parameter domain is not a conformal mapping, re-dividing the parameter domain into a fixed area and a deformed area according to the transition harmonic mapping result until the transition harmonic mapping result of the parameter domain is a conformal mapping; if the transition harmonic mapping result of the parameter domain is a conformal mapping, outputting the final harmonic mapping result corresponding to the three-dimensional model. The method of the present application can realize conformal mapping on the basis of harmonic mapping, reduce the degree of distortion of the boundary area of the mapping result, and is simple to operate and easy to implement.
[0109] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for optimizing a harmonic mapping into a conformal mapping, characterized in that: include: Step S1, obtaining a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating an initial harmonized mapping result of the three-dimensional model; Step S2, dividing the fixed area and the deformable area in the topological disk according to the initial harmonic mapping result; Step S3, analyzing the deformation direction of the boundary of the deformation area, moving the boundary of the deformation area along the deformation direction to obtain an intermediate transition parameter domain, and calculating a transition harmonic mapping result of the parameter domain; Step S4, determining whether the transition harmonic mapping result of the parameter domain is a conformal mapping; Step S5, if the transition harmonic mapping result of the parameter domain is not a conformal mapping, re-dividing the parameter domain into a fixed area and a deformable area according to the transition harmonic mapping result, returning to repeatedly execute steps S3 and S4 until the transition harmonic mapping result of the parameter domain is a conformal mapping; Step S6: if the transition harmonic mapping result of the parameter domain is a conformal mapping, outputting a final harmonic mapping result corresponding to the three-dimensional model.
2. The method for optimizing a harmonic mapping into a conformal mapping according to claim 1, characterized in that: In step S1, a three-dimensional model is obtained, and the three-dimensional model is harmonically mapped to a topological disk. The method for calculating the initial harmonized mapping result of the three-dimensional model is: Mapping the curved surface boundary of the three-dimensional model onto the boundary of the topological disk, and keeping the boundary position of the topological disk fixed; Continuously adjusting the positions of the grid points in the topological disk by Laplace transformation; It is determined whether the harmonization energy is less than a harmonization energy threshold, and when the harmonization energy is less than the harmonization energy threshold, the initial harmonization mapping result is obtained.
3. The method for optimizing a harmonic mapping into a conformal mapping according to claim 2, characterized in that: The method for judging whether the harmonic energy is less than the harmonic energy threshold is: |E(f)-E0|<δ; Wherein, E(f) represents the harmonic energy, E0 represents the initial harmonic energy, and δ represents the harmonic energy threshold.
4. The method for optimizing a harmonic mapping into a conformal mapping according to claim 1, characterized in that: In step S2, according to the initial harmonic mapping result, a fixed area and a deformable area in the topological disk are divided by: Determine whether all triangular mesh units in the topological disk are deformable; Dividing a convex area formed by non-deformable and mutually continuous triangular grid units in the topological disk as the fixed area; The triangular mesh units outside the convex area are divided into deformation areas.
5. The method for optimizing a harmonic mapping into a conformal mapping according to claim 4, characterized in that: The method for determining whether all triangular mesh units in the topological disk are deformable is as follows: When the deformation value of the triangular mesh unit is less than the deformation threshold, the triangular mesh unit is regarded as having no deformation; Otherwise, the triangular mesh unit is regarded as deformed.
6. The method for optimizing a harmonic mapping into a conformal mapping according to claim 5, characterized in that: In the step S3, the deformation direction of the boundary of the deformation region is analyzed, the boundary of the deformation region is moved along the deformation direction to obtain an intermediate transition parameter domain, and a harmonic mapping result of the parameter domain is calculated, including: According to the deformation of the triangular mesh unit in the deformation area, a deformation trend vector of a mesh point of each triangular mesh unit is obtained; Conducting the grid point toward the parameter domain boundary according to the deformation trend vector to obtain a deformation direction component; Obtaining a deformation direction of a boundary of the deformation region according to the deformation direction component; The boundary of the deformation region is moved by a unit step along the deformation direction to obtain a parameter domain of an intermediate transition.
7. The method for optimizing a harmonic mapping into a conformal mapping according to claim 1, characterized in that: In step S4, it is determined whether the transition harmonic mapping result of the parameter domain is a conformal mapping, and the determination method is: When the deformation values of all the triangular mesh units in the parameter domain are less than the deformation threshold, it indicates conformal mapping.
8. A device for optimizing a harmonic mapping into a conformal mapping, characterized in that: It includes a mapping and calculation module, a partitioning module, an analysis and boundary movement module, a conformal judgment module, a repeated partitioning module and an output module; A mapping and calculation module, used for acquiring a three-dimensional model, harmonically mapping the three-dimensional model to a topological disk, and calculating an initial harmonized mapping result of the three-dimensional model; A partitioning module, used for partitioning the fixed area and the deformable area in the topological disk according to the initial harmonic mapping result; An analysis and boundary movement module, used for analyzing the deformation direction of the boundary of the deformation area, moving the boundary of the deformation area along the deformation direction to obtain an intermediate transition parameter domain, and calculating a transition harmonic mapping result of the parameter domain; A conformal judgment module, used to judge whether the transition harmonic mapping result of the parameter domain is a conformal mapping; a repeated division module, configured to, when the transition harmonic mapping result of the parameter domain is not a conformal mapping, re-divide the parameter domain into a fixed area and a deformation area according to the transition harmonic mapping result, and return to the analysis and boundary movement module and the conformal judgment module until the transition harmonic mapping result of the parameter domain is a conformal mapping; The output module is used to output a final harmonic mapping result corresponding to the three-dimensional model when the transition harmonic mapping result of the parameter domain is a conformal mapping.
9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, the method for optimizing a harmonic mapping into a conformal mapping as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is used to implement the method of optimizing a harmonic mapping into a conformal mapping as described in any one of claims 1 to 7.