A method, apparatus, device and storage medium for detecting an undercut
By projecting and slicing the target mesh model, the distance of the undercut triangles is calculated, generating accurate undercut detection results. This solves the problems of low efficiency and poor accuracy in existing technologies, and improves the fit and suitability of dental restorations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHINING 3D TECH CO LTD
- Filing Date
- 2023-06-25
- Publication Date
- 2026-04-14
AI Technical Summary
Existing undercut detection methods are inefficient and inaccurate, affecting the fit and suitability of dental restorations to surrounding teeth and tissues.
By acquiring the target mesh model, projecting and slicing it along a preset viewing direction, calculating the distance, and generating inverted concavity detection results, the accuracy and efficiency of detection are improved by using rasterization processing and ray intersection to calculate the inverted concavity triangles.
It enables rapid and accurate undercut detection, ensuring the fit and suitability of dental restorations to teeth, thus improving the effectiveness of orthodontic treatment and the user experience.
Smart Images

Figure CN116758137B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for detecting undercuts. Background Technology
[0002] In dental restoration, undercut testing is a crucial step to ensure the fit and conformation of dental restorations (such as crowns and bridges) to surrounding teeth and tissues. Currently, undercut testing involves examining the contact surfaces between the restoration and adjacent teeth or gums using pigments or other visible markers during the fitting process. The results of undercut testing allow dentists to assess the quality and fit of the restoration and make adjustments to ensure optimal performance in both chewing function and oral aesthetics. However, existing undercut testing methods are inefficient and lack precision. Summary of the Invention
[0003] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and storage medium for detecting undercuts, effectively improving the efficiency and accuracy of undercut detection.
[0004] In a first aspect, embodiments of this disclosure provide a method for detecting undercuts, including:
[0005] Obtain the target mesh model;
[0006] The target mesh model is projected according to a preset viewing direction to generate a projection plane, and the distance from the projection plane to the target mesh model is calculated to obtain multiple first distances;
[0007] The target mesh model is sliced along the preset viewing direction at preset intervals to obtain multiple cutting planes, and the distance from each of the multiple cutting planes to the projection plane is calculated to obtain multiple second distances;
[0008] Indentation detection is performed based on the plurality of first distances and the plurality of second distances to generate indentation detection results for the target mesh model.
[0009] Optionally, the calculation of the distance from the projection plane to the target mesh model yields multiple first distances, including:
[0010] The projection plane is rasterized to generate raster data, wherein the raster data is composed of multiple target cells;
[0011] Calculate the distance from each of the multiple target cells to the target mesh model to obtain multiple first distances.
[0012] Optionally, the calculation of the distance from each of the plurality of target cells to the target mesh model yields a plurality of first distances, including:
[0013] For each of the multiple target grids, taking the center point of each target grid as the starting point, a target ray is emitted along the opposite direction of the preset line of sight and intersected with multiple triangles included in the target network model to determine the target triangle that intersects with the target ray;
[0014] Calculate the distance from the starting point of the target ray to the target triangle to obtain the first distance of each target grid.
[0015] The plurality of first distances includes the plurality of first distances for each target grid.
[0016] Optionally, the step of performing concave detection based on the plurality of first distances and the plurality of second distances to generate concave detection results for the target mesh model includes:
[0017] In the target mesh model, inverted concave triangles are calculated among the multiple triangles to obtain multiple inverted concave triangles;
[0018] A target distance greater than the plurality of second distances is determined from the plurality of first distances, and a two-dimensional map of each tangent plane is generated based on the target grid corresponding to the target distance in the projection plane;
[0019] Based on the two-dimensional diagram of each cutting plane and the plurality of inverted triangles, the inverted concavity detection result of the target mesh model is generated.
[0020] Optionally, the step of calculating inverted concave triangles among the multiple triangles included in the target mesh model to obtain multiple inverted concave triangles includes:
[0021] Determine the normal of each triangle among the multiple triangles included in the target mesh model;
[0022] The normal and the preset line of sight are multiplied by a dot product, and triangles whose dot product result is less than a first preset threshold are identified as inverted concave triangles.
[0023] Optionally, generating the concave detection result of the target mesh model based on the two-dimensional image of each cutting plane and the plurality of concave triangles includes:
[0024] Select target inverted triangles with a preset interval corresponding to each cutting plane from the plurality of inverted triangles;
[0025] Calculate the nearest contour distance from the center point of the target inverted concave triangle to the two-dimensional image of each tangent plane to obtain multiple third distances;
[0026] The indentation detection results of the target mesh model are generated based on the multiple third distances.
[0027] Optionally, after generating the concave detection results of the target mesh model based on the plurality of third distances, the method further includes:
[0028] Set the inverted triangle corresponding to the target third distance that is greater than the second preset threshold among the plurality of third distances to the first color;
[0029] Set the inverted triangles corresponding to the remaining third distances (excluding the target third distance) among the plurality of third distances to the second color;
[0030] The target mesh model is displayed based on the first color and the second color.
[0031] Secondly, embodiments of this disclosure provide a concave detection device, comprising:
[0032] Acquisition unit, used to acquire the target mesh model;
[0033] The first calculation unit is used to project the target mesh model according to a preset viewing direction to generate a projection plane, and calculate the distance from the projection plane to the target mesh model to obtain multiple first distances;
[0034] The second calculation unit is used to slice the target mesh model along the preset viewing direction at preset intervals to obtain multiple cutting planes, and calculate the distance from each of the multiple cutting planes to the projection plane to obtain multiple second distances;
[0035] The generation unit is used to perform concave detection based on the plurality of first distances and the plurality of second distances, and generate concave detection results for the target mesh model.
[0036] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0037] Memory;
[0038] Processor; and
[0039] Computer programs;
[0040] The computer program is stored in the memory and configured to be executed by the processor to implement the above-described undercut detection method.
[0041] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described undercut detection method.
[0042] This disclosure provides a method for undercut detection, comprising: acquiring a target mesh model; projecting the target mesh model along a preset viewing direction to generate a projection plane, and calculating the distance from the projection plane to the target mesh model to obtain multiple first distances; slicing the target mesh model along the preset viewing direction at preset intervals to obtain multiple cutting planes, and calculating the distance from each cutting plane to the projection plane to obtain multiple second distances; performing undercut detection based on the multiple first distances and multiple second distances to generate an undercut detection result for the target mesh model. The method provided in this application, by calculating the first distance between the projection plane and the mesh model and the second distance between the cutting planes of the mesh model and the projection plane, determines a two-dimensional diagram of the cutting planes based on the first and second distances. Based on the distance from the undercut triangles in the mesh model to the two-dimensional diagram, the undercut distance of each undercut triangle can be quickly calculated, and an undercut detection result for the entire mesh model can be generated. This effectively improves the efficiency and accuracy of undercut detection, facilitating better subsequent dental restoration and ensuring the fit and suitability of the restoration to the tooth. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0044] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0045] Figure 1 A schematic flowchart of a method for detecting undercuts provided in an embodiment of this disclosure;
[0046] Figure 2 A schematic diagram of an inverted concave plane provided in an embodiment of this disclosure;
[0047] Figure 3 for Figure 1 A detailed flowchart of S140 in a method for detecting undercuts is shown.
[0048] Figure 4 A schematic diagram of a mesh model provided in an embodiment of this disclosure;
[0049] Figure 5 This is a schematic diagram of the structure of a concave detection device provided in an embodiment of this disclosure;
[0050] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0051] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0052] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0053] Invisible aligners are a type of dental restoration. They work by creating a negative model of the adjusted dental arch using thin plastic sheets, which then act as orthodontic appliances, forcing teeth to shift. However, the adjusted dental arch model may have large or insufficient undercuts, making the appliances difficult to wear or prone to falling out. Therefore, undercut detection is necessary during treatment. Here are some important purposes and benefits of undercut detection: 1) Fit assessment: Undercut detection helps dentists assess the fit of the restoration with adjacent teeth and gums. Poor contact or gaps between the restoration and surrounding tissues can lead to discomfort, infection, or limited chewing function; 2) Chewing function: Undercut detection allows dentists to confirm the stability and fit of the restoration during chewing. Appropriate contact surfaces and force distribution provide better chewing results and oral comfort; 3) Oral aesthetics: Undercut detection also ensures that the restoration is consistent with the surrounding teeth in color, shape, and contour, which is crucial for restoring oral aesthetics and a natural appearance. After completing the undercut test, the dentist can adjust any unsuitable parts of the restoration based on the results to achieve better restorative effects and durability, helping to ensure that patients obtain satisfactory oral restoration results.
[0054] To address the aforementioned technical problems, this disclosure provides an undercut detection method. By projecting and segmenting a mesh model, a first distance between the projection plane and the mesh model, and a second distance between the segmentation plane and the projection plane, are obtained. Subsequently, based on the first and second distances, the undercut triangles and their depths on the mesh model are quickly calculated, generating accurate undercut detection results and effectively improving undercut detection efficiency. Detailed descriptions are provided below through one or more embodiments.
[0055] Figure 1 This is a flowchart illustrating an undercut detection method provided in an embodiment of this disclosure. The undercut detection method can be executed by a terminal or a server and is applicable to undercut detection scenarios in mesh models. Specifically, it includes, for example... Figure 1 Steps S110 to S140 are shown below:
[0056] S110. Obtain the target mesh model.
[0057] Understandably, the acquisition of the target mesh model is illustrated in the following example using tooth undercut detection in a dental treatment setting. The acquired target mesh model can be a 3D tooth model, which can be a triangular mesh model. Specifically, the target mesh model is composed of multiple facets, and each facet is composed of multiple triangles. The target mesh model includes multiple triangles.
[0058] S120. Project the target mesh model according to a preset viewing direction to generate a projection plane, and calculate the distance from the projection plane to the target mesh model to obtain multiple first distances.
[0059] Understandably, based on the above S110, the viewing direction is predetermined before projection, denoted as the preset viewing direction. This viewing direction is generally the direction of the insertion path set by the dentist. The insertion path refers to the common direction and angle of the various components of the removable partial denture when inserted into the mouth, also known as the common insertion path. Subsequently, the target mesh model is projected onto the preset viewing direction to obtain a two-dimensional box of the target mesh model. This two-dimensional box is denoted as the projection plane. For example, if the target mesh model is projected downwards, a projection plane exists at a certain distance below the target mesh model. Then, the distance from the projection plane to the target mesh model is calculated, obtaining multiple first distances. Understandably, the target mesh model is an irregular three-dimensional model; therefore, different first distances can be obtained from the same projection plane to different parts of the target mesh model.
[0060] Optionally, in step S120 above, the distance from the projection plane to the target mesh model is calculated to obtain multiple first distances. This can be achieved through the following steps:
[0061] The projection plane is rasterized to generate raster data, wherein the raster data is composed of multiple target cells; the distance from each target cell to the target mesh model is calculated to obtain multiple first distances.
[0062] Understandably, the projection plane is rasterized according to a set point spacing to generate raster data. The point spacing is generally set according to precision, such as 0.1 millimeters (mm). The raster data is composed of multiple target cells, which can be understood as pixel blocks. After generating the raster data, the distance from each target cell to the multiple triangles included in the target mesh model is calculated to obtain multiple first distances.
[0063] Optionally, the above calculation of the distance from each target cell in the plurality of target cells to the target mesh model yields a plurality of first distances, which can be implemented through the following steps:
[0064] For each of the plurality of target cells, taking the center point of each target cell as the starting point, a target ray is emitted along the opposite direction of the preset line of sight and intersects with the plurality of triangles included in the target network model to determine the target triangle that intersects with the target ray; the distance from the starting point of the target ray to the target triangle is calculated to obtain the first distance of each target cell; wherein, the plurality of first distances includes the plurality of first distances of each target cell.
[0065] Understandably, for each of the multiple target cells, the center point of the target cell is used as the starting point, and a ray is emitted in the opposite direction of the preset viewing direction to intersect with multiple triangles included in the target mesh model. At least one target triangle intersects with the ray, and the ray emitted from the target cell is denoted as the target ray. The target triangle can be understood as the intersecting triangle that intersects with the target ray. Specifically, each target cell emits a target ray from its center point, and each target ray intersects with at least one triangle. Subsequently, the distance from the starting point of the target ray to each target triangle is calculated to obtain at least one first distance for the target cell. This means retaining the perpendicular distance from the starting point of the ray to all intersecting triangles on each ray. The first distance can also be understood as the ray distance. Therefore, a target cell may have multiple first distances calculated with different intersecting triangles. The first distances of multiple target cells constitute multiple first distances from the projection plane to the target mesh model.
[0066] S130. The target mesh model is sliced along the preset viewing direction at preset intervals to obtain multiple cutting planes, and the distance from each cutting plane to the projection plane is calculated to obtain multiple second distances.
[0067] Understandably, based on the above S120, the target mesh model is uniformly sliced along a preset viewing direction at preset intervals to obtain multiple three-dimensional cutting planes. The slicing interval can be determined by the user. The perpendicular direction to the preset viewing direction is the tangent line of the target mesh model. For example, along the preset downward viewing direction, the target mesh model is uniformly sliced using the tangent line at preset intervals to obtain multiple cutting planes. Each cutting plane is a part of the mesh model, therefore it is also a three-dimensional model. Subsequently, the distance from each cutting plane to the projection plane is calculated to obtain multiple second distances, which can be understood as slice distances.
[0068] For example, see Figure 2 , Figure 2 This is a schematic diagram of an inverted concave plane provided in an embodiment of the present disclosure. Figure 2The inverted concave plane shown includes the viewing direction, the mesh model, and the inverted concave surface. The inverted concave surface refers to the downward surface obscured by the upward surface in the viewing direction. The mesh model is projected onto the viewing direction to obtain a projection plane. Rays are emitted from the center point of the target grid in the projection plane in the opposite direction of the viewing direction to intersect with triangles in the mesh model, resulting in multiple first distances, such as... Figure 2 The starting point of ray 210 shown is intersected by four first distances from the triangle, denoted as first distance 211 to first distance 214. The mesh model is uniformly sliced along the line of sight to obtain multiple slicing planes. The distances from these slicing planes to the projection plane are calculated to obtain multiple second distances, such as... Figure 2 The distance from the tangent plane 220 to the projection plane is used to obtain the second distance 221.
[0069] S140. Perform undercut detection based on the plurality of first distances and the plurality of second distances to generate undercut detection results for the target mesh model.
[0070] Understandably, based on the above S130, undercut detection is performed according to the calculated first distance and multiple second distances to determine the regions with undercuts in the mesh model and to calculate the undercut depth / undercut distance, thereby obtaining the undercut detection results of the target mesh model. The regions with undercuts are specifically defined as triangles in the target mesh model.
[0071] This disclosure provides a method for detecting undercuts. The method projects a target mesh model along the line of sight to obtain a projection plane. The projection plane is then rasterized to accelerate computation. Rays are emitted from the centerline point of each grid cell in the raster data towards the target mesh model, and intersections are calculated with the triangles included in the mesh model to obtain intersecting triangles for each ray. The distances from the ray's origin to all intersecting triangles are then calculated to obtain multiple first distances. The mesh model is then uniformly sliced at preset intervals to obtain multiple slicing planes. The distance from each slicing plane to the projection plane is then calculated to obtain multiple second distances. The undercut depth of the undercut triangles is determined based on the first and second distances, generating undercut detection results. This method effectively improves the speed and accuracy of undercut detection, facilitates accurate fitting of orthodontic appliances based on the undercut detection results, avoids dislodgement, and enables the fabrication of more suitable and precise prostheses, further enhancing the user's orthodontic experience.
[0072] Based on the above embodiments, Figure 3 for Figure 1 The diagram illustrates a refinement process for step S140 in an undercut detection method. Optionally, undercut detection is performed based on the plurality of first distances and the plurality of second distances to generate undercut detection results for the target mesh model. Specifically, this includes... Figure 3Steps S310 to S330 are shown below:
[0073] S310. Calculate the inverted concave triangles among the multiple triangles included in the target mesh model to obtain multiple inverted concave triangles.
[0074] Understandably, after obtaining the target mesh model, or after calculating the first or second distance, inverted concave triangles are calculated among the multiple triangles included in the target mesh model to obtain multiple inverted concave triangles.
[0075] Optionally, in step S310 above, inverted concave triangles are calculated among the multiple triangles included in the target mesh model to obtain multiple inverted concave triangles. This can be achieved through the following steps:
[0076] Determine the normal of each triangle in the target mesh model; perform a dot product between the normal and the preset line-of-sight direction, and determine the triangles whose dot product result is less than a first preset threshold as inverted concave triangles.
[0077] Understandably, the normal of each triangle is determined, which can be obtained by the cross product of the triangle's sides. For each triangle, the normal is multiplied by a preset viewing direction, and the result is compared to a first preset threshold. If the result is less than the first preset threshold, the triangle is considered an inverted concave triangle; otherwise, if the result is greater than or equal to the first preset threshold, the triangle is not an inverted concave triangle. Preferably, the first preset threshold can be 0, but the specific inverted concave triangles for depth detection can be determined by the user based on their needs.
[0078] S320. Determine a target distance greater than the plurality of second distances from the plurality of first distances, and generate a two-dimensional map of each tangent plane based on the target grid corresponding to the target distance in the projection plane.
[0079] Understandably, based on the above S310, the target mesh model is an irregular and non-smooth mesh model, and each cutting plane after uniform cutting is also irregular. Therefore, there is at least one second distance between each cutting plane and the projection plane. For each cutting plane, at least one target distance greater than or equal to the second distance of the cutting plane is selected from multiple first distances. In the raster data after the projection plane is rasterized, the target cell corresponding to each target distance is determined. That is, if the ray distance is greater than the slice distance, the mesh corresponding to the ray distance is retained. Then, a two-dimensional map is built based on the target mesh. That is, a two-dimensional map is built by selecting meshes including slice distances from multiple ray distances. The two-dimensional map can be understood as a two-dimensional map of the outer contour of the cutting plane. The two-dimensional map of each cutting plane is obtained by analogy.
[0080] S330. Based on the two-dimensional diagram of each cutting plane and the plurality of inverted triangles, generate the inverted detection result of the target mesh model.
[0081] Understandably, based on the above S320, the undercut distance / depth of the undercut triangle corresponding to each cutting plane is calculated according to the two-dimensional image of each cutting plane and multiple undercut triangles. The undercut triangles and undercut distances of all cutting planes are integrated to generate the undercut detection result of the entire target mesh model. Each undercut triangle has an undercut distance. Multiple cutting planes can be calculated layer by layer. If there is an undercut triangle in a layer, the depth of the undercut triangle is calculated. If there is no undercut triangle in a layer, the undercut depth does not need to be calculated to improve the calculation speed.
[0082] Optionally, in step S330 above, the undercut detection result of the target mesh model is generated based on the two-dimensional image of each cutting plane and the plurality of undercut triangles. This can be achieved through the following steps:
[0083] Select target inverted triangles at preset intervals corresponding to each tangent plane from the plurality of inverted triangles; calculate the nearest contour distance from the center point of the target inverted triangle to the two-dimensional image of each tangent plane to obtain a plurality of third distances; generate the inverted detection result of the target mesh model based on the plurality of third distances.
[0084] Understandably, for each tangent plane, target inverted triangles within the tangent plane interval (the tangent plane corresponds to a preset interval) are selected from multiple inverted triangles. This means determining whether each tangent plane contains an inverted triangle. If so, the shortest distance from the center point of the target inverted triangle to the tangent plane's 2D graph is calculated, yielding a third distance. This third distance can be understood as the inverted triangle distance, which is the distance from the inverted triangle to the outer contour of the tangent plane. By calculating the distances from the inverted triangles to the outer contour in multiple tangent planes, multiple third distances can be obtained. Subsequently, the position of each inverted triangle in the target mesh model and the inverted triangle distance of each inverted triangle are integrated to generate the inverted triangle detection result of the target mesh model.
[0085] Optionally, after generating the concave detection result of the target mesh model, the method further includes:
[0086] Set the inverted triangle corresponding to the target third distance among the plurality of third distances that is greater than the second preset threshold to the first color; set the inverted triangle corresponding to the other third distances among the plurality of third distances besides the target third distance to the second color; display the target mesh model based on the first color and the second color.
[0087] Understandably, after calculating the third distance of each inverted triangle, the values of multiple third distances are compared with a second preset threshold. Inverted triangles with a target third distance greater than the second preset threshold are set to the first color. Inverted triangles with other third distances (excluding the target third distance) in the target mesh model are set to the second color. The colors of the other triangles in the target mesh model can remain unchanged. The target mesh model with the completed color settings is then displayed, where inverted triangles of different depths have different display colors, allowing users to intuitively understand the inverted triangle detection results. Understandably, multiple second preset thresholds can be set according to user needs to further subdivide inverted triangles of different depths and set more refined colors.
[0088] For example, see Figure 4 , Figure 4 This is a schematic diagram of a mesh model provided in an embodiment of the present disclosure. The mesh model is a three-dimensional mesh model of a tooth. After completing the undercut detection of the mesh model and generating the undercut detection results, the undercut detection results are displayed on the mesh model, such as... Figure 4 As shown, the mesh model displayed here allows users to more intuitively understand the undercut of the teeth.
[0089] This disclosure provides a method for detecting undercuts. Undercut triangles are calculated in a target mesh model. A two-dimensional image of the outer contour of the tangent plane is then created based on target cells corresponding to multiple target distances, including a second distance within a first distance. Undercut triangles within the slice intervals are selected, and the distance from the center point of the undercut triangle to the nearest contour in the two-dimensional image is calculated to obtain a relatively accurate undercut distance. The calculation is fast, and different display colors for the undercut triangles can be set according to the undercut distance, allowing users to intuitively understand the undercut detection results and better facilitate orthodontic treatment.
[0090] Figure 5 This is a schematic diagram of a dent detection device provided in an embodiment of the present disclosure. The dent detection device provided in this embodiment can execute the processing flow provided in the dent detection method embodiment, such as... Figure 5 As shown, the undercut detection device 500 includes an acquisition unit 510, a first calculation unit 520, a second calculation unit 530, and a generation unit 540, wherein:
[0091] Acquisition unit 510 is used to acquire the target mesh model;
[0092] The first calculation unit 520 is used to project the target mesh model according to a preset viewing direction to generate a projection plane, and calculate the distance from the projection plane to the target mesh model to obtain multiple first distances;
[0093] The second calculation unit 530 is used to slice the target mesh model along the preset viewing direction based on a preset interval to obtain multiple cutting planes, and calculate the distance from each of the multiple cutting planes to the projection plane to obtain multiple second distances;
[0094] The generation unit 540 is used to perform concave detection based on the plurality of first distances and the plurality of second distances, and generate concave detection results of the target mesh model.
[0095] Optionally, the first computing unit 520 is used for:
[0096] The projection plane is rasterized to generate raster data, wherein the raster data is composed of multiple target cells;
[0097] Calculate the distance from each of the multiple target cells to the target mesh model to obtain multiple first distances.
[0098] Optionally, the first computing unit 520 is used for:
[0099] For each of the multiple target grids, taking the center point of each target grid as the starting point, a target ray is emitted along the opposite direction of the preset line of sight and intersected with multiple triangles included in the target network model to determine the target triangle that intersects with the target ray;
[0100] Calculate the distance from the starting point of the target ray to the target triangle to obtain the first distance of each target grid.
[0101] The plurality of first distances includes the plurality of first distances for each target grid.
[0102] Optionally, the generating unit 540 is used for:
[0103] In the target mesh model, inverted concave triangles are calculated among the multiple triangles to obtain multiple inverted concave triangles;
[0104] A target distance greater than the plurality of second distances is determined from the plurality of first distances, and a two-dimensional map of each tangent plane is generated based on the target grid corresponding to the target distance in the projection plane;
[0105] Based on the two-dimensional diagram of each cutting plane and the plurality of inverted triangles, the inverted concavity detection result of the target mesh model is generated.
[0106] Optionally, the generating unit 540 is used for:
[0107] Determine the normal of each triangle among the multiple triangles included in the target mesh model;
[0108] The normal and the preset line of sight are multiplied by a dot product, and triangles whose dot product result is less than a first preset threshold are identified as inverted concave triangles.
[0109] Optionally, the generating unit 540 is used for:
[0110] Select target inverted triangles with a preset interval corresponding to each cutting plane from the plurality of inverted triangles;
[0111] Calculate the nearest contour distance from the center point of the target inverted concave triangle to the two-dimensional image of each tangent plane to obtain multiple third distances;
[0112] The indentation detection results of the target mesh model are generated based on the multiple third distances.
[0113] Optionally, device 500 is also used for:
[0114] Set the inverted triangle corresponding to the target third distance that is greater than the second preset threshold among the plurality of third distances to the first color;
[0115] Set the inverted triangles corresponding to the remaining third distances (excluding the target third distance) among the plurality of third distances to the second color;
[0116] The target mesh model is displayed based on the first color and the second color.
[0117] Figure 5 The undercut detection device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.
[0118] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 600 in the embodiments of this disclosure. The electronic device 600 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0119] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603 to implement the undercut detection method as described in the embodiments of this disclosure. The RAM 603 also stores various programs and data required for the operation of the electronic device 600. The processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0120] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0121] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the undercut detection method as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0122] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0123] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0124] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0125] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.
[0126] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0128] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0129] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0130] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0131] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or gateway that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or gateway. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or gateway that includes said element.
[0132] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of detecting an undercut, characterized by, include: Obtain the target mesh model; The target mesh model is projected according to a preset viewing direction to generate a projection plane, and the distance from the projection plane to the target mesh model is calculated to obtain multiple first distances; The target mesh model is sliced along the preset viewing direction at preset intervals to obtain multiple cutting planes, and the distance from each of the multiple cutting planes to the projection plane is calculated to obtain multiple second distances; Inverted concavity detection is performed based on the plurality of first distances and the plurality of second distances to generate inverted concavity detection results for the target mesh model, including: calculating inverted concavity triangles in the plurality of triangles included in the target mesh model to obtain a plurality of inverted concavity triangles; A target distance greater than the plurality of second distances is determined from the plurality of first distances, and a two-dimensional image of each tangent plane is generated based on the target grid corresponding to the target distance in the projection plane; based on the two-dimensional image of each tangent plane and the plurality of inverted triangles, an inverted concavity detection result of the target mesh model is generated.
2. The method of claim 1, wherein, The calculation of the distance from the projection plane to the target mesh model yields multiple first distances, including: The projection plane is rasterized to generate raster data, wherein the raster data is composed of multiple target cells; Calculate the distance from each of the multiple target cells to the target mesh model to obtain multiple first distances.
3. The method of claim 2, wherein, The calculation of the distance from each target cell in the plurality of target cells to the target mesh model yields a plurality of first distances, including: For each of the multiple target grids, taking the center point of each target grid as the starting point, a target ray is emitted along the opposite direction of the preset line of sight and intersected with multiple triangles included in the target mesh model to determine the target triangle that intersects with the target ray; Calculate the distance from the starting point of the target ray to the target triangle to obtain the first distance of each target grid. The plurality of first distances includes the plurality of first distances for each target grid.
4. The method of claim 1, wherein, The calculation of inverted concave triangles within the multiple triangles included in the target mesh model yields multiple inverted concave triangles, including: Determine the normal of each triangle among the multiple triangles included in the target mesh model; The normal and the preset line of sight are multiplied by a dot product, and triangles whose dot product result is less than a first preset threshold are identified as inverted concave triangles.
5. The method of claim 1, wherein, The step of generating the concave detection result of the target mesh model based on the two-dimensional image of each cutting plane and the plurality of concave triangles includes: Select target inverted triangles with a preset interval corresponding to each cutting plane from the plurality of inverted triangles; Calculate the nearest contour distance from the center point of the target inverted concave triangle to the two-dimensional image of each tangent plane to obtain multiple third distances; The indentation detection results of the target mesh model are generated based on the multiple third distances.
6. The method of claim 5, wherein, After generating the concave detection result of the target mesh model based on the plurality of third distances, the method further includes: Set the inverted triangle corresponding to the target third distance that is greater than the second preset threshold among the plurality of third distances to the first color; Set the inverted triangles corresponding to the remaining third distances (excluding the target third distance) among the plurality of third distances to the second color; The target mesh model is displayed based on the first color and the second color.
7. A device for detecting undercuts, characterized in that, include: Acquisition unit, used to acquire the target mesh model; The first calculation unit is used to project the target mesh model according to a preset viewing direction to generate a projection plane, and calculate the distance from the projection plane to the target mesh model to obtain multiple first distances; The second calculation unit is used to slice the target mesh model along the preset viewing direction at preset intervals to obtain multiple cutting planes, and calculate the distance from each of the multiple cutting planes to the projection plane to obtain multiple second distances; The generation unit is used to perform concave detection based on the plurality of first distances and the plurality of second distances, and generate concave detection results of the target mesh model, including: calculating concave triangles in the plurality of triangles included in the target mesh model to obtain a plurality of concave triangles; A target distance greater than the plurality of second distances is determined from the plurality of first distances, and a two-dimensional image of each tangent plane is generated based on the target grid corresponding to the target distance in the projection plane; based on the two-dimensional image of each tangent plane and the plurality of inverted triangles, an inverted concavity detection result of the target mesh model is generated.
8. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the undercut detection method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the undercut detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Spraying robot trajectory planning method based on grid projection algorithm
CN113019763A
Detection method and device, electronic equipment and storage medium
CN116228718A