Method, device and application for calculating clipping surface of three-dimensional tooth model
By calculating the clipping surface of the three-dimensional tooth model, the eigenvalues and eigenvectors are used to generate the plane clipping surface, and the envelope circle is combined to form the target clipping surface, which solves the problem of poor clipping effect caused by the inability to form a plane when selecting midpoints in the existing technology. Fast and effective cutting of tooth models is achieved.
Patent Information
- Application Number
- CN202210257003.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-03-16
AI Technical Summary
When cutting a three-dimensional tooth model with the existing technology, the selected points cannot ensure that the cutting plane is formed, resulting in poor cutting effects and a lack of effective solutions.
By obtaining a three-dimensional tooth model composed of triangular patches, multiple points are selected to calculate their average as the center coordinate, a basic matrix is constructed and converted into a symmetric matrix, the minimum eigenvalue and eigenvector are calculated, the original clipping plane is generated, and the center coordinate is An enveloping circle is drawn at the center of the circle, and sampling points are collected to form the target clipping surface.
It realizes the generation of planes from non-planar points, ensuring that the cutting plane is close to the selected cutting area, which is suitable for rapid cutting of tooth models and improves the efficiency and effect of product design.
Smart Images

Figure CN114596427B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a method, device and application for calculating the clipping surface of a three-dimensional tooth model. Background Art
[0002] Computer-aided methods are widely used in stomatology. The construction of three-dimensional data models helps people understand and master the appearance and internal structure of teeth, and plays an important role in various fields of stomatology such as oral restoration, orthodontics, oral medicine, oral surgery, etc.
[0003] When editing a 3D tooth model and correcting product design, it is necessary to select and edit the tooth model. The general means of interaction is to click the mouse, cut the model according to the obtained n points, obtain the required surface, and proceed to the next step of product design. However, if the model is directly cut using the selected points as the cutting surface, it cannot be guaranteed that the selected points constitute the cutting plane, and if the cutting surface is not a plane, it is difficult to cut the model. Therefore, the optimal cutting effect cannot be achieved.
[0004] Based on this, when trimming a three-dimensional tooth model, the method of directly determining the trimming surface based on a number of selected points results in the selected trimming surface being unable to obtain a cutting plane, thus resulting in a poor trimming effect. No solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method, device and application for calculating the cutting surface of a three-dimensional tooth model. For an existing three-dimensional tooth model, the present solution can automatically generate a target cutting surface through multiple points selected initially to cut the three-dimensional tooth model, and obtain the tooth plane required for the next step of product design, thereby playing the role of quickly generating a cutting surface for quickly cutting the tooth model.
[0006] In a first aspect, an embodiment of the present application provides a method for calculating a clipping surface of a three-dimensional tooth model, the method comprising: obtaining a three-dimensional tooth model composed of triangular facets; selecting multiple point coordinates in the three-dimensional tooth model, taking the coordinate mean of the multiple point coordinates as the center coordinates, and constructing a basic matrix based on the difference between each point coordinate and the center coordinate; changing the basic matrix into a symmetric matrix, calculating the minimum eigenvalue of the symmetric matrix, and the eigenvector corresponding to the minimum eigenvalue; constructing an original clipping surface with the center coordinate as the origin and the eigenvector as the normal vector, cutting the three-dimensional tooth model according to the original clipping surface, and obtaining multiple intersection coordinates of the original clipping surface and the three-dimensional tooth model; drawing an envelope circle outside the intersection coordinates with the center coordinate as the center, and collecting multiple sampling point coordinates on the envelope circle; combining each two adjacent intersection coordinates and the sampling point closest to them into a triangle, and forming a target clipping surface with all triangles and the envelope circle.
[0007] In some embodiments, "obtaining a three-dimensional tooth model composed of triangular facets" includes: obtaining an original tooth model, triangulating each facet of the original tooth model, and obtaining a three-dimensional tooth model composed of triangular facets.
[0008] In some of the embodiments, the difference between the selected point coordinates and the center coordinates is defined as the selected point difference, and the row matrix elements of the basic matrix correspond to the difference between the xyz coordinates of the same selected point and the center coordinates; different rows of the basic matrix correspond to different differences between the xyz coordinates of the selected point and the center coordinates.
[0009] In some of the embodiments, "changing the base matrix into a symmetric matrix" includes: calculating the product of the base matrix and the transposed matrix of the base matrix, and dividing the product by the total number of selected points to obtain a symmetric matrix.
[0010] In some of the embodiments, "cutting the three-dimensional tooth model according to the original cutting plane" includes: constructing a plane equation of the original cutting plane, traversing all selected point coordinates of the three-dimensional tooth model, calculating the function value of substituting the selected point coordinates into the plane equation, using the selected point coordinates with function values greater than 0 as the first type of coordinate points of the three-dimensional tooth model, and using the selected point coordinates with function values less than 0 as the second type of coordinate points of the three-dimensional tooth model, wherein the three-dimensional tooth model is segmented into a first partial model consisting of all the first type of coordinate points and a second partial model consisting of all the second type of coordinate points.
[0011] In some embodiments, the intersection coordinates are characterized as: selected point coordinates located on the original clipping plane; wherein the step of obtaining the intersection coordinates includes: eliminating the first type of coordinate points and the second type of coordinate points from all selected point coordinates of the three-dimensional tooth model to obtain the intersection coordinates, and substituting the intersection coordinates into the plane equation to calculate a function value of 0.
[0012] In some embodiments, the farthest distance from the center coordinate to the coordinates of all intersection points is used as the radius of the envelope circle.
[0013] In some of the embodiments, the sampling point coordinates are characterized as: selected point coordinates located on the envelope circle, wherein "collecting multiple sampling point coordinates on the envelope circle" includes: substituting all selected point coordinates of the three-dimensional tooth model into the function expression of the envelope circle, and taking the selected point coordinates with a function value of 0 as the sampling point coordinates.
[0014] In a second aspect, an embodiment of the present application provides a clipping surface calculation device for a three-dimensional tooth model, including: an acquisition module for acquiring a three-dimensional tooth model composed of triangular facets; a matrix construction module for selecting multiple selected point coordinates in the three-dimensional tooth model, taking the coordinate mean of the multiple selected point coordinates as the center coordinate, and constructing a basic matrix based on the difference between each selected point coordinate and the center coordinate; a calculation module for changing the basic matrix into a symmetric matrix, calculating the minimum eigenvalue of the symmetric matrix, and the eigenvector corresponding to the minimum eigenvalue; a cutting module for constructing an original clipping surface with the center coordinate as the origin and the eigenvector as the normal vector, cutting the three-dimensional tooth model according to the original clipping surface, and obtaining multiple intersection coordinates of the original clipping surface and the three-dimensional tooth model; a fitting module for drawing an envelope circle with the center coordinate as the center outside the intersection coordinates, and collecting multiple sampling point coordinates on the envelope circle; a clipping surface processing module for combining each two adjacent intersection coordinates and a sampling point closest to them into a triangle, and forming a target clipping surface with all triangles and the envelope circle.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the clipping surface calculation method of the three-dimensional tooth model as described in any one of the first aspects.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, wherein a computer program is stored in the readable storage medium, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes a method for calculating a clipping surface of a three-dimensional tooth model according to any one of the first aspects.
[0017] The main contributions and innovations of the embodiments of the present application are as follows: This solution targets the original selected multiple point coordinates, and based on the purpose of "ultimately generating a plane with non-planar points on the three-dimensional model", the area formed by the original selected point coordinates is repaired, so that the repaired cutting surface is close to the selected cutting area and can also be the tooth plane required for product design, thereby playing a role in quickly generating the cutting surface for fast cutting of the tooth model.
[0018] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a flow chart of the main steps of the method for calculating the clipping surface of a three-dimensional tooth model according to the first embodiment of the present application.
[0021] Figure 2 This is a schematic diagram of the model file.
[0022] Figure 3 It is a schematic diagram of the user's mouse click.
[0023] Figure 4 It is a schematic diagram of constructing plane F on the three-dimensional tooth model.
[0024] Figure 5 It is a schematic diagram of using plane F to cut the tooth model and then fitting the maximum enveloping circle to the intersection points with a circle.
[0025] Figure 6 It is a schematic diagram of the triangulated smooth boundary.
[0026] Figure 7 It is a structural block diagram of a clipping surface calculation device for a three-dimensional tooth model according to the second embodiment of the present application.
[0027] Figure 8 It is a schematic diagram of the hardware structure of an electronic device according to the third embodiment of the present application. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0029] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0030] Before describing this solution, it is necessary to explain the confusing terms: This solution is aimed at a three-dimensional tooth model composed of triangular facets. In the model, each triangular facet includes three vertices, so the vertex position of the triangular facet is expressed as "vertex coordinates". The coordinates of the point selected by the user in the three-dimensional tooth model can be any point on the model. The selected point may coincide with the vertex position of the triangular facet, or it may not be at the vertex position of the triangular facet, so the position of the selected point is expressed as "selected point coordinates".
[0031] The problem that this solution solves is that when editing, selecting, or correcting a product design for a 3D tooth model, if multiple points are directly selected to cut the model, it is impossible to ensure that the selected points form a cutting plane, so it is difficult to cut the model. Therefore, this solution can generate a target cutting plane based on multiple points selected initially to cut the 3D tooth model, thereby obtaining the tooth plane required for the next step of product design.
[0032] Therefore, this solution targets the original selected multiple point coordinates, and based on the purpose of "ultimately generating a plane with non-planar points on the three-dimensional model", the area formed by the original selected point coordinates is repaired so that the repaired cutting surface is close to the selected cutting area and can still be the tooth plane required for product design, thereby playing a role in quickly generating the cutting surface for fast cutting of the tooth model.
[0033] Figure 1 It is a flow chart of the main steps of the method for calculating the clipping surface of a three-dimensional tooth model according to the first embodiment of the present application.
[0034] To achieve this goal, Figure 1 As shown, the clipping surface calculation method of the three-dimensional tooth model mainly includes the following steps 101 to 106.
[0035] Step 101: Obtain a three-dimensional tooth model consisting of triangular facets.
[0036] In step 101, the obtained three-dimensional tooth model is composed of multiple triangular facets, and the purpose is to restore the three-dimensional shape of the tooth through the triangular facets. It can be understood that if the original tooth model is not composed of triangles, then the original tooth model is first obtained, and each facet of the original tooth model is triangulated to obtain a three-dimensional tooth model composed of triangular facets. The position, area, and normal vector of any triangular facet can be calculated from the coordinates of the three vertices of the triangular facet.
[0037] It is worth noting that the present solution uses a method of representing the three-dimensional shape of teeth with triangular facets to facilitate calculation of the center point and feature vector of the area formed by the coordinates of the initially selected points so as to facilitate subsequent determination of the position and area of the clipping surface.
[0038] The schematic diagram of the original three-dimensional tooth model is as follows Figure 1 As shown, it can be seen that the tooth surface in the three-dimensional tooth model is non-planar, so when the initial points are selected in the model, the area surrounded by each point is also not a plane.
[0039] Step 102: select a plurality of selected point coordinates in the three-dimensional tooth model, take the coordinate mean of the plurality of selected point coordinates as the center coordinate, and construct a basic matrix based on the difference between each selected point coordinate and the center coordinate.
[0040] In step 102, the difference between the selected point coordinates and the center coordinates is defined as the selected point difference. The row matrix elements of the basic matrix correspond to the difference between the xyz coordinates of the same selected point and the center coordinates; different rows of the basic matrix correspond to the coordinate differences of different selected points. For example, the matrix is constructed with pi=pi-c Among them, p11, p12, and p13 represent the difference between the xyz coordinates of the selected point 1 and the center coordinates. Different rows of the X matrix represent different selected points. For example, the three elements in the first row represent the xyz coordinates of the selected point i=1, and the three elements in the last row represent the xyz coordinates of the selected point i=N.
[0041] It should be noted that the selected point coordinates refer to the coordinates of any point selected on the model. The selected point coordinates may be the coordinates of the vertices of a triangular face or may not be the coordinates of the vertices of a triangular face. This solution does not limit the selection range of the selected point coordinates.
[0042] Step 103: transform the basic matrix into a symmetric matrix, calculate the minimum eigenvalue of the symmetric matrix, and the eigenvector corresponding to the minimum eigenvalue.
[0043] In step 103, a symmetric matrix C is constructed and eigenvalue decomposition is performed on the symmetric matrix to obtain eigenvalues and corresponding eigenvectors.
[0044] The purpose of constructing a matrix to obtain eigenvectors in this scheme is to construct an original clipping surface, thereby flattening the three-dimensional area surrounded by the coordinates of the multiple selected points initially.
[0045] Specifically, each element in the basic matrix represents the difference between the selected point coordinates and the center coordinates, and the difference is reflected by the three dimensions of the x, y, and z axes. That is, p11 of the matrix P represents the difference between the x-axis of the selected point 1 and the x-axis of the center coordinate, p12 represents the difference between the y-axis of the selected point 1 and the y-axis of the center coordinate, and p13 represents the difference between the z-axis of the selected point 1 and the z-axis of the center coordinate. The eigenvector of the basic matrix indicates that the data changes the most in the direction of this vector, or it is considered that the data is most separated in this direction, so the eigenvector can represent the normal vector of the basic matrix. When constructing the basic matrix, the number of columns is fixed at 3, but the number of rows will vary depending on the number of selected points. For example, if the number of selected points is 10, the number of rows is 10, and if the number of selected points is 14, the number of rows is 14. Figure 3 As shown, the user clicked 14 points with the mouse, so the number of rows of N is 14. Therefore, the dimension of the constructed basic matrix is 14*3. To find the eigenvalue of the basic matrix of 14*3 dimensions, the basic matrix needs to be transformed to obtain a square matrix. Therefore, this solution calculates the product of the basic matrix and the transposed matrix of the basic matrix, and divides the product by the total number of selected points to obtain a symmetric matrix. For example, let C = 1 / N*P T P constructs a symmetric matrix C of P, where
[0046] Available In matrix C, cov() represents covariance, that is, the degree of deviation of each selected point from the center point.
[0047] It is worth mentioning that there are many ways to find eigenvalues and eigenvectors through square matrices. In this solution, the Jacobi method is used. The basic idea of the Jacobi method is to gradually transform the real symmetric matrix C into a diagonal matrix A through a series of orthogonal transformations composed of plane rotation matrices, so as to obtain all the eigenvalues and corresponding eigenvectors of A.
[0048] It should be noted that the eigenvalue represents the measure of the dispersion of each element in the matrix in each direction, that is, it is understood as whether the characteristics of each element in each direction are obvious. The larger the eigenvalue, the more dispersed and the more obvious the characteristics, and vice versa. The eigenvectors corresponding to the eigenvalues are the directions corresponding to the matrix elements. In this solution, a plane is required for all points so that all neighboring points are on this plane, or the distance between all points and the plane is the smallest, so it is necessary to select the eigenvector corresponding to the minimum eigenvalue of the covariance matrix C, and use this eigenvector as the plane normal. It shows the normal direction of the center point of the selected point set. Then the original clipping surface can be constructed using the plane normal.
[0049] In addition to the example of constructing a matrix to obtain the normal vector of the original clipping surface shown above, in another embodiment, the normal vector can be obtained by the average normal of each triangular facet. That is, in this embodiment, the matrix can be constructed without directly calculating the normal vector of the original clipping surface using the normal vector of the triangular facet. Exemplarily, the coordinates of the triangular facet vertices adjacent to the selected point coordinates selected by the user are first selected, and N' triangular facets are determined by the coordinates of the triangular facet vertices, where the normal vectors of the three vertices of a certain facet are na, nb, and bc, respectively. Then the average normal of △abc is, and S△abc is. The normal vectors of all triangular facets formed by the selected point coordinates are defined as, where N' is the total number of facets in the tooth model, Stotal is the sum of the areas of all facets, and Norm is a vector normalization operation.
[0050] In this formula, Si / Stotal represents the facet area ratio of the ith triangle, and the facet area ratio is the ratio of the facet area to the total area of all triangular facets. Si / Stotal*ni represents the normal vector of the ith triangle. It should be noted that the normal vector of the selected area calculated in this solution comprehensively considers the influence of triangular facets of different areas on the normal vector. That is, the greater the proportion of the area of the triangle, the greater the impact on the final result, and the higher the proportion of the normal vector in the final total direction. Specifically, each triangular facet has a normal direction and a triangular area. The area ratio of the triangle area is multiplied before the normal direction. The larger the area ratio, the greater the weight of the normal direction. This embodiment can quickly calculate the normal vector of a three-dimensional shape by multiplying the normal vector by the area weight.
[0051] It can be seen from the above embodiments that the total area of the selected triangles may be similar to the area composed of the selected points selected by the user, that is, the areas of the two are not always equal. Therefore, the difference between this embodiment and step 103 is that the premise of directly calculating the normal vector of the original clipping surface with the normal vector of the triangle surface without constructing a matrix is that the point selected by the user falls on the vertex of the model triangle surface. At this time, the accuracy of the two methods of calculating the original clipping surface is the same. If the selected points selected by the user are not completely the vertices of the model triangle surface, the method of directly averaging the normal of each point to obtain the normal vector has a larger error. Therefore, the user can choose between the two embodiments according to the actual situation.
[0052] Step 104: construct an original clipping plane using the center coordinate as the origin and the eigenvector as the normal vector, cut the three-dimensional tooth model according to the original clipping plane, and obtain multiple intersection coordinates of the original clipping plane and the three-dimensional tooth model.
[0053] Specifically, the present invention utilizes the eigenvector corresponding to the minimum eigenvalue to construct a plane F, and the equation of the plane F is F(x, y, z): a(x-c0)+b(y-c1)+c(z-c2)=0.
[0054] The purpose of obtaining plane F is to substitute the coordinates of the selected point into equation F to calculate the function value. If the function value = 0, it means that the point is on plane F. If the function value > 0, it means that the point is on the first surface of plane F. If the function value < 0, it means that the point is on the second surface of plane F. Therefore, by calculating the function value, the coordinates of the selected point of the three-dimensional tooth model on the original clipping surface are obtained. It should be noted that the area enclosed by the obtained intersection points is Figure 4 It can be seen that the surface is not smooth enough, so this step achieves the goal of obtaining a plane area from the curved surface area enclosed by the selected point coordinates. In the subsequent steps, the edges of the plane area need to be repaired so that the outer points of the repaired clipping surface all fall on the selected point coordinates of the three-dimensional tooth model, and finally the target clipping surface can be formed.
[0055] It should be noted that, in this step, "cutting the three-dimensional tooth model according to the original cutting plane" includes: constructing the plane equation of the original cutting plane, traversing all the selected point coordinates of the three-dimensional tooth model, calculating the function value of substituting the selected point coordinates into the plane equation, taking the selected point coordinates with function values greater than 0 as the first type of coordinate points of the three-dimensional tooth model, and taking the selected point coordinates with function values less than 0 as the second type of coordinate points of the three-dimensional tooth model, wherein the three-dimensional tooth model is divided into a first partial model composed of all the first type of coordinate points and a second partial model composed of all the second type of coordinate points.
[0056] That is, by constructing the equation F(x, y, z) of the plane F, this solution can quickly distinguish the coordinates of the selected points on both sides of the plane F through the magnitude relationship between the function value and 0, thereby realizing the cutting of the three-dimensional tooth model.
[0057] Step 105 , draw an envelope circle outside the intersection coordinates with the central coordinates as the center, and collect coordinates of multiple sampling points on the envelope circle.
[0058] It should be noted that the collection point coordinates are the point coordinates of any point on the envelope circle, that is, there is no restriction on the collection points. In actual operation, the collection points can be selected by the user at will, so the collection points do not need to be equidistant, and the collection points are not necessarily the vertices of the triangle facets.
[0059] In this step, if Figure 5 As shown, the smooth edge is constructed with the enveloping circle as the original clipping surface. The enveloping circle refers to a circle that includes all the intersection coordinates. Therefore, with the center coordinate as the center of the circle and the length of the longest distance from the center coordinate to all the intersection coordinates as the radius, an enveloping circle that includes all the intersection coordinates can be drawn. The sampling point coordinates are collected on the enveloping circle, where the sampling point coordinates are characterized as: the selected point coordinates located on the enveloping circle. The purpose of drawing the enveloping circle is to repair the periphery to make the boundary surrounded by the intersection coordinates smooth.
[0060] In this step, obtaining the sampling point coordinates includes: substituting all the selected point coordinates of the three-dimensional tooth model into the function expression of the envelope circle, and taking the selected point coordinates with a function value of 0 as the sampling point coordinates.
[0061] In one embodiment, the farthest distance from the center coordinate to all intersection coordinates is used as the radius of the envelope circle.
[0062] Specifically, in this embodiment, the intersection points are fitted with the minimum enveloping circle, so that the area of the target clipping surface can be close to the area of the region enclosed by the coordinates of the multiple selected points originally selected.
[0063] Step 106: A triangle is formed based on the coordinates of each two adjacent intersection points and a sampling point closest to the intersection points, and all triangles and an enveloping circle form a target clipping surface.
[0064] The area enclosed by the intersection coordinates is Figure 6 The irregular shape inside the marked area makes the outer boundary rough. If the model is cut directly in this area, the model boundary will be rough, and the user experience will be poor, which means it cannot meet the needs of use. The nearest distance principle is used to triangulate the points in the P1 and P2 points to obtain the boundary of the final target clipping surface. Figure 6 The marked outer circle is an envelope circle, so it is smooth. That is, compared with the area enclosed by the initially selected point coordinates, the target cutting surface is not only more conducive to cutting the plane of the three-dimensional tooth model, but also the periphery of the cutting surface is smooth, so it can meet the product requirements.
[0065] In addition, if Figure 7 As shown, the present solution provides a cutting surface calculation device for a three-dimensional tooth model, which calculates a target cutting surface using the above-mentioned cutting surface calculation method for a three-dimensional tooth model, and the device comprises:
[0066] An acquisition module 701 is used to acquire a three-dimensional tooth model composed of triangular facets;
[0067] A matrix construction module 702 is used to select a plurality of selected point coordinates in the three-dimensional tooth model, take the coordinate mean of the plurality of selected point coordinates as the center coordinate, and construct a basic matrix based on the difference between each selected point coordinate and the center coordinate;
[0068] A calculation module 703 is used to transform the basic matrix into a symmetric matrix, calculate the minimum eigenvalue of the symmetric matrix, and the eigenvector corresponding to the minimum eigenvalue;
[0069] A cutting module 704 is used to construct an original cutting plane using the center coordinate as the origin and the feature vector as the normal vector, and to cut the three-dimensional tooth model according to the original cutting plane to obtain the coordinates of multiple intersections between the original cutting plane and the three-dimensional tooth model;
[0070] A fitting module 705 is used to draw an envelope circle outside the intersection coordinates with the central coordinates as the center of the circle, and collect coordinates of multiple sampling points on the envelope circle;
[0071] The clipping surface processing module 706 is used to combine the coordinates of each two adjacent intersection points and the sampling point closest to them into a triangle, and form a target clipping surface with all triangles and an enveloping circle.
[0072] like Figure 8 As shown, an electronic device according to an embodiment of the present application includes a memory 804 and a processor 802. The memory 804 stores a computer program, and the processor 802 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0073] Specifically, the processor 802 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0074] Among them, the memory 804 may include a large capacity memory 804 for data or instructions. By way of example and not limitation, the memory 804 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 804 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 804 may be inside or outside the data processing device. In a specific embodiment, the memory 804 is a non-volatile memory. In a specific embodiment, the memory 804 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (Static Random-Access Memory, abbreviated as SRAM) or a dynamic random access memory (Dynamic Random Access Memory, abbreviated as DRAM), wherein the DRAM can be a fast page mode dynamic random access memory 804 (Fast Page Mode Dynamic Random Access Memory, abbreviated as FPMDRAM), an extended data output dynamic random access memory (Extended Date Out Dynamic Random Access Memory, abbreviated as EDODRAM), a synchronous dynamic random access memory (Synchronous Dynamic Random-Access Memory, abbreviated as SDRAM), etc.
[0075] The memory 804 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 802 .
[0076] The processor 802 reads and executes the computer program instructions stored in the memory 804 to implement any one of the clipping plane calculation methods of the three-dimensional tooth model in the above embodiments.
[0077] Optionally, the electronic device may further include a transmission device 806 and an input / output device 808 , wherein the transmission device 806 is connected to the processor 802 , and the input / output device 808 is connected to the processor 802 .
[0078] The transmission device 806 can be used to receive or send data via a network. The specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 806 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0079] The input / output device 808 is used to input or output information. In this embodiment, the input information may be an original tooth model, etc., and the output information may be a cut tooth plane, etc.
[0080] Optionally, in this embodiment, the processor 802 may be configured to perform the following steps through a computer program:
[0081] S101, obtaining a three-dimensional tooth model composed of triangular facets.
[0082] S102, selecting a plurality of selected point coordinates in the three-dimensional tooth model, taking the coordinate mean of the plurality of selected point coordinates as the center coordinate, and constructing a basic matrix based on the difference between each selected point coordinate and the center coordinate.
[0083] S103, transforming the basic matrix into a symmetric matrix, calculating the minimum eigenvalue of the symmetric matrix, and the eigenvector corresponding to the minimum eigenvalue.
[0084] S104, constructing an original clipping plane with the center coordinate as the origin and the eigenvector as the normal vector, cutting the three-dimensional tooth model according to the original clipping plane, and obtaining coordinates of multiple intersections between the original clipping plane and the three-dimensional tooth model.
[0085] S105 , drawing an envelope circle outside the intersection coordinates with the central coordinates as the center of the circle, and collecting coordinates of multiple sampling points on the envelope circle.
[0086] S106: Combining the coordinates of every two adjacent intersection points and the sampling point closest to them into a triangle, and forming a target clipping surface with all triangles and an enveloping circle.
[0087] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0088] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0089] Embodiments of the present invention can be implemented by computer software, which is executable by a data processor of a mobile device, such as in a processor entity, or implemented by hardware, or implemented by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros can be stored in any device readable data storage medium, and they include program instructions for performing specific tasks. Computer program products can include one or more computer executable components configured to perform embodiments when the program is running. One or more computer executable components can be at least one software code or a part thereof. In addition, at this point, it should be noted that any box of the logic flow in the figure can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored in physical media such as memory chips or storage blocks implemented in processors, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs. Physical media are non-transient media.
[0090] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0091] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for calculating the clipping surface of a three-dimensional tooth model, characterized in that: The following steps are involved: Obtaining a three-dimensional tooth model composed of triangular facets; A plurality of selected point coordinates are selected in the three-dimensional tooth model, and the coordinate average of the plurality of selected point coordinates is used as the center coordinate. A basic matrix is constructed based on the difference between each selected point coordinate and the center coordinate, wherein the difference between the selected point coordinate and the center coordinate is defined as the selected point difference, and the row matrix elements of the basic matrix correspond to the difference between the three coordinates xyz of the same selected point and the center coordinate; different rows of the basic matrix correspond to different differences between the selected point coordinate and the center coordinate; The basic matrix is transformed into a symmetric matrix, and the minimum eigenvalue of the symmetric matrix and the eigenvector corresponding to the minimum eigenvalue are calculated, wherein the product of the basic matrix and the transposed matrix of the basic matrix is obtained, and the product is divided by the total number of selected points to obtain a symmetric matrix; An original clipping plane is constructed with the center coordinate as the origin and the eigenvector as the normal vector, and the three-dimensional tooth model is cut according to the original clipping plane to obtain multiple intersection coordinates of the original clipping plane and the three-dimensional tooth model, wherein the plane equation of the original clipping plane is constructed, all selected point coordinates of the three-dimensional tooth model are traversed, and the function value of substituting the selected point coordinates into the plane equation is calculated, and the selected point coordinates with a function value greater than 0 are used as the first type of coordinate points of the three-dimensional tooth model, and the selected point coordinates with a function value less than 0 are used as the second type of coordinate points of the three-dimensional tooth model, wherein the three-dimensional tooth model is divided into a first local model composed of all the first type of coordinate points and a second local model composed of all the second type of coordinate points, and the intersection coordinates are characterized as: the selected point coordinates located on the original clipping plane; wherein the step of obtaining the intersection coordinates includes: removing the first type of coordinate points and the second type of coordinate points from all the selected point coordinates of the three-dimensional tooth model to obtain the intersection coordinates, and the function value obtained by substituting the intersection coordinates into the plane equation is 0; An envelope circle is drawn outside the intersection coordinates with the center coordinates as the center, and multiple sampling point coordinates are collected on the envelope circle, wherein the farthest distance from the center coordinates to all the intersection coordinates is used as the radius of the envelope circle, and all the selected point coordinates of the three-dimensional tooth model are substituted into the function expression of the envelope circle, and the selected point coordinates with a function value of 0 are used as the sampling point coordinates; A triangle is formed based on the coordinates of each two adjacent intersection points and the sampling point closest to them, and all triangles and the enveloping circle constitute the target clipping surface.
2. The method for calculating the clipping surface of a three-dimensional tooth model according to claim 1, characterized in that: "Obtaining a three-dimensional tooth model consisting of triangular facets" includes: The original tooth model is obtained, and each face of the original tooth model is triangulated to obtain a three-dimensional tooth model composed of triangular facets.
3. A device for calculating the cutting surface of a three-dimensional tooth model, characterized in that: include: An acquisition module, used for acquiring a three-dimensional tooth model composed of triangular facets; A matrix construction module is used to select multiple selected point coordinates in a three-dimensional tooth model, take the coordinate mean of the multiple selected point coordinates as the center coordinate, and construct a basic matrix based on the difference between each selected point coordinate and the center coordinate, wherein the difference between the selected point coordinate and the center coordinate is defined as the selected point difference, and the row matrix elements of the basic matrix correspond to the difference between the three coordinates xyz of the same selected point and the center coordinate; different rows of the basic matrix correspond to different differences between the selected point coordinates and the center coordinate; A calculation module, used for changing a basic matrix into a symmetric matrix, calculating the minimum eigenvalue of the symmetric matrix and the eigenvector corresponding to the minimum eigenvalue, wherein the product of the basic matrix and the transposed matrix of the basic matrix is obtained, and the product is divided by the total number of selected points to obtain the symmetric matrix; A cutting module, used to construct an original clipping plane with the center coordinate as the origin and the eigenvector as the normal vector, cut the three-dimensional tooth model according to the original clipping plane, and obtain multiple intersection coordinates of the original clipping plane and the three-dimensional tooth model, wherein the plane equation of the original clipping plane is constructed, all selected point coordinates of the three-dimensional tooth model are traversed, and the function value of substituting the selected point coordinates into the plane equation is calculated, and the selected point coordinates with a function value greater than 0 are used as the first type of coordinate points of the three-dimensional tooth model, and the selected point coordinates with a function value less than 0 are used as the second type of coordinate points of the three-dimensional tooth model, wherein the three-dimensional tooth model is divided into a first local model composed of all the first type of coordinate points and a second local model composed of all the second type of coordinate points, and the intersection coordinates are characterized as: the selected point coordinates located on the original clipping plane; wherein the step of obtaining the intersection coordinates includes: removing the first type of coordinate points and the second type of coordinate points from all the selected point coordinates of the three-dimensional tooth model to obtain the intersection coordinates, and the function value calculated by substituting the intersection coordinates into the plane equation is 0; A fitting module is used to draw an envelope circle outside the intersection coordinates with the center coordinates as the center of the circle, collect multiple sampling point coordinates on the envelope circle, wherein the farthest distance from the center coordinates to all the intersection coordinates is used as the radius of the envelope circle, substitute all the selected point coordinates of the three-dimensional tooth model into the function expression of the envelope circle, and use the selected point coordinates with a function value of 0 as the sampling point coordinates; The clipping surface processing module is used to combine the coordinates of each two adjacent intersection points and the sampling point closest to them into a triangle, and all triangles and an enveloping circle constitute a target clipping surface.
4. A readable storage medium, characterized in that: The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes the method for calculating a clipping plane of a three-dimensional tooth model according to any one of claims 1 to 2.
Citation Information
Patent Citations
Automatic division method of dental crowns in dental models
CN101706971A
Teeth modeling method based on three-dimensional model retrieval
CN106504331A
Tooth mold alignment method, tooth structure, three-dimensional model alignment method and structural member
CN112927374A
Tooth three-dimensional model construction system based on medical big data
CN113240799A
Method for automatically segmenting teeth
WO2020161121A1
