External ear model edge smoothing method, device and medium based on pipeline cutting
Through a pipe cutting method, resampling and cutting treatment of three-dimensional surfaces with sharp edges and acute angle relationships solves the problem of difficulty in smoothing in the prior art, and achieves higher quality ear mold processing and comfort of hearing aid shell.
Patent Information
- Application Number
- CN202510181768.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-19
AI Technical Summary
Existing three-dimensional modeling techniques are difficult to smooth effectively when dealing with three-dimensional surfaces with sharp edges and acute angles, and may instead highlight the sharp effect of these areas.
Using a pipeline cutting method, a closed pipe with equal radius rings is constructed by resampling the vertices of sharp edges, cutting the original outer ear model, retaining the outer part of the pipe, and filling the cutting surface with a smooth curved surface.
Effective smoothing of sharp edges and acute angle relationship areas is achieved, improving the quality of ear mold processing and the comfort of hearing aid shell.
Smart Images

Figure CN119672237B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of three-dimensional modeling, and in particular to a method, device and medium for smoothing the edge of an external ear model based on pipeline cutting. Background Art
[0002] Hearing aids can amplify sound signals and filter background noise, thus effectively improving the life experience of hearing-impaired people. When fitting in-the-ear hearing aids and behind-the-ear hearing aids, customized production is required to customize the shell of the in-the-ear hearing aid and the ear mold of the behind-the-ear hearing aid according to the shape of the user's ear canal. The current main production process is as follows:
[0003] 1. Use fast-curing materials to cast the user's ear canal, accurately replicate the shape of the ear canal and obtain an ear impression;
[0004] 2. Use a 3D scanner to obtain a 3D digital model of the ear impression;
[0005] 3. Use professional 3D editing software to process the digital model surface and export the processed model file;
[0006] 4. Use a 3D printer to print the model with light-curing material to get a customized hearing aid shell or BTE hearing aid ear mold.
[0007] Throughout the entire process, the accuracy of 3D modeling by 3D editing software and the rationality of processing determine the usability of the final product and user satisfaction.
[0008] During the 3D processing, especially when cutting some specific parts, some irregular edges will be generated. These edges are usually sharp. If they are not smoothed, the shell will not be suitable for wearing. In order to ensure the appearance of the shape and wearing comfort, the edges after cutting must be smoothed to ensure that the customized ear canal hearing aid shell and BTE ear mold meet ergonomic requirements.
[0009] The three-dimensional surface smoothing methods in the prior art are all improved on the basis of the Laplace algorithm. The core principle of these methods is to move each vertex to the average position of adjacent vertices, and shorten the spatial distance between adjacent vertices through multiple iterations, so as to achieve a smooth surface effect. However, this type of method has a defect. When there are sharp peak structures on the three-dimensional surface of the area to be smoothed or there are sharp angles between the surfaces in the edge area, this type of method cannot effectively smooth the surface, but will highlight the sharp effects of these areas. Summary of the invention
[0010] The embodiments of the present invention provide a method, device and medium for smoothing the edge of an outer ear model based on pipeline cutting to solve the above technical problems.
[0011] In a first aspect, an embodiment of the present invention provides an outer ear model edge smoothing method based on pipeline cutting, comprising:
[0012] Obtaining the original outer ear model;
[0013] Resampling the edges to be smoothed in the original outer ear model according to the average distance of the vertices of the original outer ear model;
[0014] Taking a new edge formed by connecting the resampled vertices as a center line, constructing a closed pipeline extending along the new edge and each cross section of which is a circular ring with equal radius;
[0015] Using the closed tube to cut the original outer ear model, retaining the portion outside the closed tube;
[0016] The retained cut surface is filled into a smooth surface to obtain the final external ear model.
[0017] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0018] one or more processors;
[0019] a memory for storing one or more programs,
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the outer ear model edge smoothing method based on pipeline cutting described in any embodiment.
[0021] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the outer ear model edge smoothing method based on pipeline cutting as described in any embodiment.
[0022] The embodiment of the present invention provides an outer ear model edge smoothing method based on pipeline cutting, which first removes the edge portion to be smoothed by pipeline cutting, and then constructs a regular edge mesh by bridging, corrects the smoothing effect of the sharp edge area of the three-dimensional model, improves the quality of ear mold processing, and improves the comfort of the hearing aid shell. This method can achieve excellent edge smoothing effects when there are sharp peak structures on the three-dimensional surface of the area to be smoothed, when there are sharp angles between the surfaces in the edge area, and when the surface mesh includes irregular triangular meshes or complex polygons, and effectively improves the modeling quality of the hearing aid shell and eardrum. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a method for smoothing the edge of an outer ear model based on pipeline cutting provided by an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of an original outer ear model provided by an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of pipeline generation provided by an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of a pipeline cutting provided by an embodiment of the present invention;
[0028] Figure 5 is a schematic diagram of a final smoothing effect provided by an embodiment of the present invention;
[0029] Figure 6 is a schematic diagram of a smoothing effect of a traditional smoothing method provided by an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0032] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0033] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0034] As described in the background technology, when the 3D modeling files of the hearing aid shell and the ear mold are processed by software, if the cutting edge is sharp, the traditional surface smoothing algorithm cannot effectively process it; in addition, the traditional smoothing algorithm is based on an iterative method to smooth the processed 3D model surface, and too many iterations will cause a large deformation of the surface. In view of this, this embodiment proposes a method for smoothing the edge of the outer ear model, which smoothes the cutting edge during the ear mold processing process based on pipeline cutting and equal arc adjustment.
[0035] Figure 1 1 is a flow chart of a method for smoothing the edge of an outer ear model based on pipeline cutting provided by an embodiment of the present invention. The method is applicable to the case of smoothing a three-dimensional outer ear model in the production of a hearing aid, and is executed by an electronic device. Figure 1 As shown, the method specifically includes:
[0036] S110: Obtain an original outer ear model.
[0037] The original outer ear model here refers to a three-dimensional outer ear model including sharp edges, such as Figure 2 As shown. The outer ear model can be a three-dimensional model of an ear canal hearing aid shell, or a three-dimensional ear mold of a behind-the-ear hearing aid. The outer ear includes the auricle and the ear canal. The outer ear model is composed of multiple surface meshes, each of which includes vertices and edges. The model includes some sharp edges, and the edge mesh may also include a triangular mesh or a complex polygonal mesh. This embodiment will smooth these sharp edges.
[0038] S120. Resample the edges to be smoothed in the original outer ear model according to the average distance between the vertices of the original outer ear model.
[0039] The purpose of resampling is to make the vertices in sharp edges more uniform, so as to generate a uniform regular mesh in subsequent operations.
[0040] In one embodiment, the original outer ear model is first calculated The average distance between vertices of the entire surface mesh , the formula is as follows:
[0041] (1)
[0042] in, For Model The set of all vertices The number of vertices in , and and are mutually adjacent vertices.
[0043] Then, calculate the sharp edges to be smoothed Length , the formula is as follows:
[0044] (2)
[0045] in, To constitute The multiple edges of i =1,…, N .
[0046] Next, based on the sharp edge length and , calculate the total number of resampled vertices :
[0047] (3)
[0048] Finally, the edges to be smoothed in the original outer ear model are resampled according to the average distance of the vertices of the original outer ear model. All vertices of Two adjacent vertices and The distance between , then merge these two vertices to get a new vertex ; At the same time, adjust the vertex connection and change the other vertices that were previously connected to these two vertices to connected. The remaining vertices on remain unchanged.
[0049] S130 , taking a new edge formed by connecting the resampled vertices as a center line, constructing a closed pipeline extending along the new edge and with each cross section being a circular ring with equal radius.
[0050] Each vertex of the edge to be smoothed after resampling (including the new vertex after merging and the old vertex that has not been merged) is called a resampled vertex. The connection of each resampled vertex will form a new edge, which is still a sharp edge. This embodiment constructs a closed circular pipe based on the edge to cut off the sharp edge.
[0051] In a specific embodiment, the construction of a closed pipeline may include the following steps:
[0052] Step 1: In clockwise or counterclockwise direction, construct direction vectors from each resampled vertex to the next resampled vertex. Connect the direction vectors in sequence to form a new edge. Specifically, taking clockwise as an example, for each resampled vertex , using the coordinate information of clockwise adjacent vertices, calculate the direction vector of a set of adjacent vertices .
[0053] Step 2: Generate circular rings perpendicular to the direction vectors of the resampled vertices with each resampled vertex as the center, where the radius of each circular ring is equal. For example, based on this group of direction vectors, generate the resampled vertices ( k =1,…, n ) is the center of the circle, and the direction vectors of each vertex Vertical multiple rings , together forming a ring group The radius of the ring is , by adjusting the radius , you can control the final smoothing range of sharp edges.
[0054] Step 3: Establish connections between adjacent circular rings to obtain a closed pipe extending along the new edge and each cross section of which is a circular ring with equal radius.
[0055] Specifically, firstly, two intersection points of each circle and the original outer ear model can be determined, and the intersection points in the same order in adjacent circles are connected to form edges, so as to obtain two closed curves extending along the new edges. For example, calculate Surface and ring set and add connecting edges between adjacent intersections in the same order (such as all above or all below) to obtain two closed curves. and , vertices with the same number and In on the same ring in .
[0056] Then, starting from the intersection of each ring on the same closed curve, multiple vertices with equal distances are added to each ring in sequence, and the vertices in the same ring are numbered according to the order of addition. For example, we can use The point in the middle is the starting point, and evenly distributed points are added to each ring in a clockwise direction. vertices and number them sequentially.
[0057] Finally, the vertices with the same number on adjacent circular rings are connected to form edges, and the edges forming closed curves are supplemented to obtain a closed pipe extending along the new edge and each cross section is a circular ring with equal radius. Figure 3 As shown, a closed pipe with the resampled vertex as the center is formed based on the original outer ear model, which is recorded as .
[0058] After the closed pipe is generated, it is usually necessary to further process the pipe to remove the self-intersecting grids that are included in the pipe due to the pipe bends, and obtain the final closed pipe. All vertices on , perform the following operations in sequence:
[0059] S1-1, calculate the current The distance between the vertex and the resampled edge vertex.
[0060] S1-2. If the minimum value of each distance is less than the pipe radius r, it indicates that the vertex is not on the pipe surface, but is a vertex contained inside the pipe surface after the curved pipes intersect each other, and the vertex is removed.
[0061] Finally, after removing all such vertices, the resulting pipeline is It can be used for subsequent cutting operations.
[0062] S140: Using the closed tube to cut the original outer ear model, retaining the portion outside the closed tube.
[0063] In this step, all vertices in the original outer ear model can be , perform the following operations in sequence:
[0064] S2-1. Calculate the current Vertices and resampled vertices distance.
[0065] S2-2, if the minimum value among all distances Smaller than the pipe radius , it indicates that the vertex is inside the pipe and should be removed.
[0066] In order to distinguish the above two groups of traversal operations (S1-1 and S1-2, and S2-1 and S2-2), this embodiment uses the pipeline model The vertices in The vertex in the original outer ear model is called the first vertex. It is called the second vertex.
[0067] Finally, after all the vertices inside the pipe are removed, the pipe cutting is completed, and the remaining part is the cut 3D model. Figure 4 The example shows Figure 3 The closed tube in the original outer ear model The 3D model after cutting.
[0068] S150, filling the remaining cut surface into a smooth surface to obtain a final outer ear model.
[0069] Combination Figure 4 , after the model is cut, and Once it becomes a new cutting edge, a smooth surface can be filled between the two new cutting edges.
[0070] In a specific implementation, first, connecting edges can be added between vertices with the same number on two closed curves to obtain a set of edges: , and add multiple vertices with equal distances on each connecting edge. Optionally, you can add The equidistant vertices are Each edge in Equally divided, where the distance between vertices is the length of the edge , p It is a configurable value, determined according to actual needs. The vertices on each edge can be numbered 1, 2, ..., p , numbering order from Start at the vertex.
[0071] Then, each connecting edge is bent using the same curvature. , smoothed by Bezier curves or circular curves to generate new edge shapes.
[0072] Finally, the vertices on each bent edge are connected to form a mesh and the surface is filled to obtain the final outer ear model. The vertices with the same number on each edge of the grid are formed into a grid, and these grids are filled at the same time to obtain a smooth edge with a certain curvature. The smoothing effect is as follows Figure 5 In order to better reflect the processing effect of the method of this embodiment, Figure 6 The smoothing effect of a traditional smoothing method is shown. It can be seen that the method of this embodiment can obtain a better three-dimensional outer ear model.
[0073] In summary, this embodiment provides an outer ear model edge smoothing method based on pipeline cutting, which first removes the edge portion to be smoothed by pipeline cutting, and then constructs a regular edge mesh by bridging, corrects the smoothing effect of the sharp edge area of the three-dimensional model, improves the quality of ear mold processing, and improves the comfort of the hearing aid shell. This method can achieve excellent edge smoothing effects in the case where there are sharp peak structures on the three-dimensional surface of the area to be smoothed, when there are sharp angles between the surfaces of the edge area, and when the surface mesh includes irregular triangular meshes or complex polygons, and effectively improves the modeling quality of the hearing aid shell and eardrum.
[0074] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 7 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0075] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the outer ear model edge smoothing method based on pipeline cutting in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the outer ear model edge smoothing method based on pipeline cutting.
[0076] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0077] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0078] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the outer ear model edge smoothing method based on pipeline cutting of any embodiment.
[0079] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0080] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0081] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0082] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A method for smoothing the edge of an outer ear model based on pipeline cutting, characterized in that: include: Obtaining the original outer ear model; Resampling the edges to be smoothed in the original outer ear model according to the average distance of the vertices of the original outer ear model; In a clockwise or counterclockwise direction, a direction vector pointing from each resampled vertex to the next resampled vertex is constructed in sequence, and each direction vector is connected in sequence to form a new edge; Generate circular rings perpendicular to the direction vectors of the resampled vertices with the resampled vertices as the centers of the circles, wherein the radii of the circular rings are equal; Establishing connections between adjacent circular rings to obtain a closed pipe extending along the new edge and each cross section of which is a circular ring with equal radius; Using the closed tube to cut the original outer ear model, retaining the portion outside the closed tube; The retained cut surface is filled into a smooth surface to obtain the final external ear model.
2. The method according to claim 1, characterized in that The step of resampling the edge to be smoothed in the original outer ear model according to the average distance of the vertices of the original outer ear model comprises: If the distance between two adjacent vertices in the edge to be smoothed in the original outer ear model is less than the average distance between the vertices of the original outer ear model, merge the two adjacent vertices into one resampled vertex; The other vertices originally connected to the two adjacent vertices are modified to be connected to the resampled vertex.
3. The method according to claim 1, characterized in that The step of establishing a connection between adjacent circular rings to obtain a closed pipe extending along the new edge and each cross section of which is a circular ring of equal radius includes: Determine two intersection points of each circular ring with the original outer ear model, connect the intersection points of adjacent circular rings in the same order into edges, and obtain two closed curves extending along the new edges; Taking the intersection points of each circle on the same closed curve as the starting point, multiple vertices with equal distances are added in each circle in sequence, and the vertices in the same circle are numbered according to the order of addition; Vertices with the same number on adjacent circular rings are connected to form edges, and the edges forming closed curves are supplemented to obtain closed pipes extending along the new edges and each cross section of which is a circular ring with equal radius.
4. The method according to claim 1, characterized in that: After establishing connections between adjacent circular rings to obtain a closed pipeline extending along the new edge and each cross section of which is a circular ring with equal radius, the method further includes: The self-intersecting meshes contained in the closed pipe due to the pipe bending are removed to obtain the final closed pipe.
5. The method according to claim 4, characterized in that The removing of the self-intersecting meshes contained in the closed pipe due to the pipe bending comprises: For each first vertex in the closed pipe model, perform the following operations in sequence: S1-1, respectively calculating the distance between the current first vertex and each resampled vertex; S1-2. If the minimum value of each distance is smaller than the radius of the circle, determine that the current first vertex is a self-intersecting mesh contained in the closed pipe due to the bending of the pipe, and remove the current first vertex.
6. The method according to claim 1, characterized in that The method of cutting the original outer ear model by using the closed tube to retain the portion outside the closed tube includes: For each second vertex in the original outer ear model, perform the following operations in sequence: S2-1, calculating the distance between the current second vertex and each resampled vertex; S2-2, if the minimum value among the distances is smaller than the radius of the ring, determine that the current second vertex is a part within the closed pipe, and remove the current second vertex; The second vertices that are finally left together constitute the part outside the closed pipe.
7. The method according to claim 3, characterized in that The step of filling the retained cut surface into a smooth curved surface to obtain a final outer ear model comprises: Add connecting edges between vertices with the same number on two closed curves, and add multiple vertices with equal distances on each connecting edge; Use the same arc to bend each connecting edge; The vertices on each bent connecting edge are connected into a mesh and the surface is filled to obtain the final external ear model.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the outer ear model edge smoothing method based on pipeline cutting as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for smoothing the edge of an outer ear model based on pipeline cutting as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Inner-ear three-dimensional level set segmentation method based on statistical shape model
CN107680110A
3D human ear model construction method, system, device and medium
CN113313822A