Graphics processing unit (GPU)-based undercut detection method, device and equipment and storage medium

By generating depth maps and layer edge data using a GPU-based method, the problem of low efficiency and poor accuracy in existing undercut detection methods is solved, achieving efficient and accurate undercut detection and improving the fit and adaptability of dental restorations.

CN121660962APending Publication Date: 2026-03-13SHINING 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing undercut detection methods are inefficient and inaccurate, making it difficult to meet the requirements for fit and suitability between dental restorations and surrounding teeth and tissues.

Method used

A depth map of the target mesh model is generated using a GPU-based method. Layer edge data is determined based on preset layering rules and pixel depth values, and then converted into layer texture data. Finally, indentation detection is performed in the GPU to obtain the indentation detection results.

Benefits of technology

It improves the efficiency and accuracy of undercut detection, ensuring the quality and fit of dental restorations, and meeting the needs of chewing function and oral aesthetics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660962A_ABST
    Figure CN121660962A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a GPU-based undercut detection method and device, equipment and a storage medium. The method comprises the following steps: acquiring a target grid model; generating a depth map of the target grid model according to a preset line-of-sight direction, wherein the depth map comprises a plurality of pixel points carrying corresponding depth values; determining a plurality of layer edge data of the depth map according to a preset layering rule and the depth value of each pixel point; converting the plurality of pieces of layer edge data into layer texture data; and transmitting the layer texture data stored in the memory and the target grid model into a GPU (Graphics Processing Unit) for undercut detection to obtain an undercut detection result of the target grid model. By implementing the method provided by the embodiment of the invention, the efficiency and precision of undercut detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a GPU-based method, apparatus, device, and storage medium for detecting indentations. Background Technology

[0002] As people's quality of life improves, more and more people are paying attention to oral health. When oral problems are discovered, oral restoration is necessary.

[0003] In dental restoration, undercut detection is a crucial step to ensure the fit and conformation of dental restorations (orthodontic appliances and crowns, etc.) to surrounding teeth and tissues. Currently, during the fitting process, undercut detection is performed by applying pigments or other visible markers to examine the contact surfaces between the restoration and adjacent teeth or gums. The results of this undercut detection 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 detection methods are inefficient and lack accuracy. Summary of the Invention

[0004] This application provides a GPU-based undercut detection method, apparatus, device, and storage medium, which can improve the efficiency and accuracy of undercut detection.

[0005] In a first aspect, embodiments of this application provide a GPU-based indentation detection method, the method being applied to a target terminal, the target terminal including a GPU and memory, comprising:

[0006] Obtain the target mesh model;

[0007] A depth map of the target mesh model is generated according to a preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values.

[0008] Multiple layer edge data of the depth map are determined according to preset layering rules and the depth values ​​of each pixel.

[0009] The multiple layer edge data are converted into layer texture data;

[0010] The layer texture data stored in the memory and the target mesh model are fed into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0011] Secondly, embodiments of this application also provide a GPU-based undercut detection device, wherein the GPU-based undercut detection device is deployed on a target terminal, the target terminal including a GPU and memory, and the GPU-based undercut detection device includes:

[0012] Transceiver unit, used to acquire target mesh model;

[0013] The processing unit is configured to generate a depth map of the target mesh model according to a preset viewing direction, the depth map including multiple pixels carrying corresponding depth values; determine multiple layer edge data of the depth map according to a preset layering rule and the depth values ​​of each pixel; convert the multiple layer edge data into layer texture data; and input the layer texture data stored in the memory and the target mesh model into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0014] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the above-described method.

[0016] This application provides a GPU-based indentation detection method, apparatus, device, and storage medium. The method includes: acquiring a target mesh model; generating a depth map of the target mesh model according to a preset viewing direction, the depth map including multiple pixels carrying corresponding depth values; determining multiple layer edge data of the depth map according to preset layering rules and the depth values ​​of each pixel; converting the multiple layer edge data into layer texture data; and inputting the layer texture data stored in memory and the target mesh model into a GPU for indentation detection to obtain an indentation detection result for the target mesh model. The method provided in this application, by generating a depth map of the target mesh model, deriving layer edge data for each layer from the depth map, converting multiple layer edge data into layer texture data, and inputting the obtained layer texture data and the target mesh model into a GPU for indentation detection, ultimately obtains an indentation detection result for the target mesh model, effectively improving the efficiency and accuracy of indentation detection. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1A schematic flowchart of the GPU-based indentation detection method provided in this application embodiment;

[0019] Figure 2 A schematic diagram of a depth map provided in an embodiment of this application when the depth of the line of sight is continuous;

[0020] Figure 3 A schematic diagram of a depth map provided in an embodiment of this application when the depth of the line of sight is discontinuous;

[0021] Figure 4 A schematic diagram of a sub-process of the GPU-based indentation detection method provided in an embodiment of this application;

[0022] Figure 5 A schematic block diagram of a GPU-based indentation detection device provided in an embodiment of this application;

[0023] Figure 6 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] This application provides a method, apparatus, device, and storage medium for detecting undercuts based on a graphics processing unit (GPU).

[0029] The execution entity of the GPU-based undercut detection method can be the GPU-based undercut detection device provided in the embodiments of this application, or a computer device that integrates the GPU-based undercut detection device. The GPU-based undercut detection device can be implemented in hardware or software. In the embodiments of this application, the computer device is the target terminal, which includes a GPU and memory. The target terminal can be a smartphone, tablet computer, handheld computer, or laptop computer, etc., that has a GPU and memory.

[0030] 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. Furthermore, undercuts must be considered when fabricating dentures to ensure the crowns can be fitted smoothly.

[0031] Figure 1 This is a flowchart illustrating an undercut detection method provided in an embodiment of this application. The undercut detection method can be executed by a target terminal and is applicable to undercut detection scenarios of mesh models. The method includes the following steps S110-S150.

[0032] S110. Obtain the target mesh model.

[0033] Specifically, taking the detection of tooth undercuts in a dental treatment setting as an example, the target mesh model can be obtained by scanning the patient's oral cavity. The obtained target mesh model can be a three-dimensional model of the tooth, which can be a triangular mesh model. Specifically, the target mesh model is composed of multiple facets, and each facet is composed of multiple triangular facets. The target mesh model includes multiple triangular facets. In addition, the triangular facets are connected to each other through vertices. It can be seen that the target mesh model includes multiple vertices.

[0034] S120. Generate a depth map of the target mesh model according to the preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values.

[0035] In this embodiment, the preset line of sight can be the direction currently specified by the user or a pre-set direction. Generally, the preset line of sight is the direction in which the orthodontic appliance or denture is inserted. Different line of sight will result in different undercut areas and undercut distances.

[0036] Specifically, in some embodiments, an orthogonal camera is first created in the preset viewing direction. Then, the camera position is adjusted according to the box3 size of the target mesh model in this camera coordinate system, so that the camera just contains and fits the model, so as to make full use of the rendered data. Then, the GPU is used to render the depth map of the model in the corresponding viewing direction (e.g., a 2048*2048 pixel image, where the value of each pixel represents the distance of the model from the camera).

[0037] Specifically, in some embodiments, in order to improve the generation efficiency of the depth map, it is necessary to generate the depth map in the GPU. In this case, step S120 includes: transferring the target mesh model stored in memory into the GPU; generating the depth map of the target mesh model in the GPU according to the preset viewing direction; and transferring the depth map back to memory.

[0038] S130. Determine the edge data of multiple layers of the depth map according to the preset layering rules and the depth value of each pixel.

[0039] Specifically, the preset layering rules indicate that the mesh model is divided into a specified number of parts, and then the layer edge data of each layer is derived from the depth map, for example, into 400 parts.

[0040] In this embodiment, for cases where the depth along the line of sight is continuous (e.g.) Figure 2 As shown in the diagram, in each layer, for each point, if the depth value / layer of one or more of its four points (up, down, left, and right) is greater than its own, then this point is the edge point of this layer. That is, the place where the layers in the depth map intersect is the edge of this layer.

[0041] It should be noted that, Figure 2 The schematic diagram shown is only for illustrating the layering process; the depth map provided in this application is actually a two-dimensional depth map.

[0042] For situations where the depth of the line of sight is discontinuous (such as...) Figure 3 As shown in the diagram, when generating the depth map, a padding operation is required. Specifically, each layer's data consists of a set of points (x, y). If there is an empty space below a vertex along the line of sight, the corresponding vertex is added to the data of that layer. Figure 3 As shown, the vertex pixels at level 9 need to be added to the data of levels 10-18.

[0043] Edge padding for depth map images: For depth map image edges, the layers below the edge need to be padded. For example, if the depth map image edge data layer is 9 and there are 100 layers, then edge data of layer 9 should be added to the data of layers 10-100. Finally, by traversing the padded depth map, the data of all layer edge points are collected. Finally, the layer edge data of each layer is determined according to the preset layering rules and the padded depth map.

[0044] It should be noted that, Figure 3 The schematic diagram shown is only for illustrating the layering process; the depth map provided in this application is actually a two-dimensional depth map.

[0045] In some embodiments, since there is useless edge data (the corresponding layer does not have indentation points) in the acquired multiple layer edge data, in order to reduce the amount of data computation, it is necessary to filter the multiple layer edge data. That is, before converting the multiple layer edge data into layer texture data, the method further includes:

[0046] Determine the normal of each triangular facet; perform a dot product between each normal and a preset viewing direction to obtain the dot product result for each triangular facet; identify triangular facets whose dot product result is greater than a preset dot product threshold (which can be set to 0) as inverted concave triangular facets; filter the data in multiple layer edge data that do not intersect with the inverted concave triangular facets to obtain filtered multiple layer edge data.

[0047] Then, the filtered layer edge data stored in memory is converted into layer texture data.

[0048] Specifically, data that do not intersect with the inverted triangular facets in multiple layer edge data are filtered to obtain filtered layer edge data, including:

[0049] The inverted concave triangular facets are rendered to obtain an inverted concave binary map; the data that intersect with the inverted concave binary map from the edge data of multiple layers are taken as the filtered edge data of multiple layers.

[0050] Specifically, the rendering of the inverted concave triangular facet is similar to that of the depth map, where the camera position, the size of the rendered image, etc., are consistent with the depth map. Then, the back face of the model is rendered, that is, only the face where the dot product of the normal and the viewing direction is greater than 0 is rendered, resulting in a two-dimensional binary image (the pixel value in the binary image can be 0 or 1, and the place with a value of 1 is the back face seen (i.e., the inverted concave binary image)). For each layer of data, the data with values ​​in the binary image is filtered out by overlaying this image, which is the valid data (i.e., the filtered edge data of multiple layers).

[0051] At this point, all that is needed is to convert the filtered layer edge data into layer texture data, thereby reducing the amount of computation required for subsequent data.

[0052] S140. Convert multiple layer edge data into layer texture data.

[0053] In this embodiment, in order for the GPU to process the layer edge data, the layer edge data also needs to be converted into layer texture data that the GPU can process, that is, the data format of the layer edge data is converted into a data format that the GPU can process.

[0054] In some embodiments, in order to improve the efficiency of undercut distance calculation during subsequent undercut detection, it is necessary to generate k-dimensional tree (KD-Tree) data corresponding to the layer edge data (which can be generated by GPU). In this case, step S140 includes: arranging multiple layer edge data according to a preset tiling rule to obtain layer edge tiling data; generating KD-Tree data corresponding to the layer edge tiling data; and converting the KD-Tree data into layer texture data.

[0055] Specifically, the preset tiling rule can be to arrange the data in a 20*20 pattern. If there are 400 layer edge data points (if the layer edge data has been filtered, the corresponding positions of the filtered layer edge data will be empty), then the multiple layer edge data points are tiled in a 20*20 pattern according to the number of layers to form a large image (layer edge tiling data). The corresponding positions of the layer edge data are offset, and then the KD-Tree data of the layer edge tiling data is generated. Then, the KD-Tree data is packaged into texture data to convert the KD-Tree data into layer texture data.

[0056] In some embodiments, KD-Tree data is converted into layer texture data in the following manner:

[0057] The KD-Tree data (a binary tree of points consisting of x and y) is arranged sequentially from the root node to the leaf node into a Float32Array array of length 8192*8192 (the first layer of tree nodes is arranged first, then the second layer, and so on, until all layer nodes are arranged). This array is then packaged into a texture to obtain the layer texture data.

[0058] In other embodiments, instead of generating KD-Tree data for layer edge data, the layer data can be directly arranged into the texture layer by layer to convert multiple layer edge data into layer texture data and record the start and end points of each layer.

[0059] S150. Input the layer texture data stored in memory and the target mesh model into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0060] In this embodiment, the data is in memory before being transmitted to the GPU, while the model data can be in the cloud. After being downloaded, the data is processed in the browser. During the processing, there will be repeated interactions between GPU memory and memory. For example, when the target terminal (such as a computer device) performs indentation detection through the browser, the browser can repeatedly call the memory / GPU located in the same computer device.

[0061] The iterative interaction process includes: First, a depth map is rendered on the GPU during layered processing. This depth map is then transferred to memory for processing to generate layer edge data. Next, the layer edge data is organized into layer texture data, which is then transferred back to the GPU. The layer texture data is then transferred to the GPU for indentation detection. After indentation detection, the results are transferred from the GPU to memory for indentation connectivity filtering. Specifically, data processing in memory involves the CPU accessing the corresponding data in memory for processing.

[0062] As can be seen, in this embodiment, the depth map is rendered in the GPU, the layer edge data is processed in memory based on the depth map, and the layer texture data is converted in memory based on the layer edge data.

[0063] In addition, this application also provides a cloud platform, which provides the terminal with the function of the GPU-based undercut detection method provided in the embodiments of this application, performs undercut detection on patient order data, and improves the design effect of dental medical devices such as dentures, orthodontic appliances, and retainers based on the undercut detection results.

[0064] In the interaction of indentation detection, the layer texture data stored in memory can be transferred to the GPU, and then indentation detection is performed based on the target mesh model in the GPU to obtain the indentation detection result of the target mesh model. At this time, it is necessary to perform indentation detection based on the target mesh model in the GPU. Directly using the target mesh model transferred to the GPU when generating the depth map can improve the detection speed.

[0065] Alternatively, during the indentation detection interaction, the layer texture data stored in memory can be transferred to the GPU, and the target mesh model stored in memory can be transferred to the GPU again for indentation detection to obtain the indentation detection result of the target mesh model. In this case, transferring the target mesh model stored in memory to the GPU again for indentation detection can ensure the accuracy of the data.

[0066] Specifically, in some embodiments, such as Figure 4 As shown, step S150 includes S1501-S1503:

[0067] S1501: Transfer the layer texture data stored in memory and the target mesh model to the GPU.

[0068] In some embodiments, in order to improve the recognition speed of indented points in the GPU, after obtaining the target mesh model, the Bounding Bolume Hierarchy (BVH) data of the target mesh model is also generated (which can be generated by the GPU), and the BVH data is converted into BVH texture data. At this time, not only the layer texture data and the target mesh model need to be passed to the GPU, but also the BVH texture data needs to be passed to the GPU.

[0069] It should be noted that the generated BVH data can be reused under different line-of-sight directions.

[0070] S1502. In the GPU, identify multiple indentation points in the target mesh model.

[0071] In some embodiments, if BVH data for the target mesh model has been generated, then step S1502 includes:

[0072] For each vertex in the target mesh model, a ray is projected from the vertex toward the viewing direction; based on the BVH texture data, it is determined whether the ray hits the target mesh model itself, and the vertex corresponding to the ray that hits the target mesh model itself is identified as the inverted point.

[0073] As can be seen, the above embodiments can accelerate the detection speed of undercut points by using BVH data for undercut point detection.

[0074] In other embodiments, BVH data for the target mesh model may not be generated. The depth map is obtained by an orthogonal camera positioned on the target plane. Here, the target plane refers to a plane whose normal is along the line of sight and fits the model bounding box. This target plane is also the near plane of the camera. In this case, step S1502 includes:

[0075] For each vertex in the target mesh model, obtain the distance value from the vertex to the target plane; among multiple vertices, the vertex whose distance value is greater than the corresponding depth value is identified as the inverted concave point.

[0076] As can be seen, the BVH data of the target mesh model can be avoided by using the above embodiments.

[0077] S1503. In the GPU, for each indentation point, the indentation distance corresponding to the indentation point is determined based on the target layer level where the indentation point is located and the layer texture data.

[0078] In some embodiments, determining the undercut distance corresponding to the undercut point based on the target layer level where the undercut point is located and the layer texture data includes:

[0079] The target layer level is determined based on the distance from the indentation point to the target plane and the preset layering rules; the target layer edge texture data corresponding to the target layer level is determined from the layer texture data; the nearest distance between the indentation point and the target layer edge texture data is calculated, and the nearest distance is determined as the indentation distance.

[0080] Specifically, the preset layering rule instructs the mesh model to be divided into a specified number of equal parts. When determining the target layer number of the indentation point, the total depth value of the target mesh model is first determined based on the difference between the minimum and maximum depth values ​​in the depth map. Then, the total depth value is divided by the specified number of parts to obtain the depth corresponding to each layer. For example, if the total depth value is 1 and the specified number of parts is 400, then the depth corresponding to each layer is 1 divided by 400, which is 0.0025. Then, the distance from the current indentation point to the target plane and the distance from the first pixel of the target mesh model in the preset viewing direction to the target plane are calculated. The difference between the two distance values ​​is then calculated to obtain the depth difference between the current indentation point and the first pixel. Finally, this depth difference is divided by the depth corresponding to each layer to obtain the target layer number of the current indentation point.

[0081] In this embodiment, after obtaining the target number of levels, the indentation distance can be calculated using either the first or second embodiment below:

[0082] In the first embodiment, if KD-Tree data corresponding to the layer edge data is generated, the layer texture data is in KD-Tree form. In this case, the shader language in the GPU programmable pipeline, based on the characteristic that KD-Tree is a balanced binary tree (except for leaf data, each layer is twice the size of the previous layer), can quickly calculate the index position of the layer node corresponding to the target layer level in the array for the data of a certain layer node in the KD-Tree (e.g., the index of the first layer is 0, the index of the second layer is 1, 2, the index of the third layer is 3, 4, 5, 6, and the data of each layer is twice that of the previous layer). Then, by adding the offset of the layer data during tiling, the target node can be found in the KD-Tree data. The data corresponding to the target node is the target layer edge texture data corresponding to the target layer level. Then, based on the KD-Tree nearest neighbor search algorithm, the point closest to the current indentation point is found in the target layer edge texture data. The distance between the nearest point and the current indentation point is the indentation distance.

[0083] As can be seen, the above embodiments determine the indentation distance based on the KD-Tree nearest neighbor search algorithm, which can reduce the amount of computation required for the indentation distance.

[0084] In the second embodiment, when there is no KD-Tree data corresponding to the generated layer edge data, multiple layer edge data can be directly arranged into the texture in sequence, and the start point and end point of each layer edge data can be recorded (the start point and end point can be used to divide the layers), thereby converting the layer edge data into layer texture data. At this time, the target layer edge texture data of the corresponding layer can be found according to the target layer level, and the distance between the current indentation point and each point in the target layer edge texture data can be calculated respectively, and the minimum value calculated is taken as the indentation distance of the current indentation point.

[0085] As can be seen, the calculation of the indentation distance using the above embodiments does not require generating KD-Tree data for layer edge data.

[0086] Furthermore, after obtaining the concave detection results of the target mesh model, if the concave detection results are directly displayed on the target mesh model, the display effect will be unsatisfactory due to the presence of noise and many small concave surfaces. In order to optimize the display effect, this application also performs filtering processing on the smaller concave surfaces, specifically through the following scheme:

[0087] First, the indentation detection results are transferred from the GPU to memory. Based on the surface connectivity data and the indentation detection results, multiple indented connected surfaces are determined. Then, the indented connected surfaces with fewer than a preset connected surface threshold are filtered to obtain multiple target indented connected surfaces.

[0088] The aforementioned surface connectivity data is generated after the target mesh model is acquired. This surface connectivity data consists of key-value pairs between each triangular facet and other triangular faces in the target mesh model, and the surface connectivity data can be reused under different viewing directions of the target mesh model. The aforementioned preset connectivity threshold can be 10, or it can be adjusted according to the display accuracy required by the user. This embodiment does not limit the specific value of the preset connectivity threshold.

[0089] Furthermore, after obtaining multiple target concave connected surfaces, in order to better distinguish between concave and non-concave points in the model, this embodiment also sets the target concave connected surfaces in the target mesh model to a preset concave color. This preset concave color can be green, or it can be adjusted to other colors according to user needs. The set color only needs to be effectively distinguishable from the color of the tooth itself; the specific color is not limited in this embodiment.

[0090] This embodiment enables rapid detection of undercuts in a mesh model using a GPU in a terminal, such as a user's mobile phone or computer, allowing users to perform fast undercut detection on the mesh model anytime. Furthermore, using a GPU for undercut detection reduces the probability of the terminal's CPU overheating, and the parallel processing of CPU and GPU results in faster data processing. Since this embodiment utilizes a GPU for undercut detection, there is no need to install a corresponding undercut detection application on the terminal; undercut detection can be performed directly through a web browser, reducing the burden of installing such an application on the terminal. For terminals without an installed undercut detection application, undercut detection can be performed quickly through a browser.

[0091] In summary, the embodiments of this application generate a depth map of the target mesh model, derive the layer edge data of each layer from the depth map, convert multiple layer edge data into layer texture data, and input the obtained layer texture data and the target mesh model into the GPU for indentation detection, and finally obtain the indentation detection result of the target mesh model, which effectively improves the efficiency and accuracy of indentation detection.

[0092] Figure 5 This is a schematic block diagram of a GPU-based indentation detection device 500 provided in an embodiment of this application. Figure 5 As shown, corresponding to the GPU-based indentation detection method described above, this application also provides a GPU-based indentation detection device 500. This GPU-based indentation detection device 500 includes a unit for executing the aforementioned GPU-based indentation detection method. This device can be configured on a target terminal, which includes a GPU and memory. Specifically, please refer to... Figure 5 The GPU-based indentation detection device 500 includes a transceiver unit 501 and a processing unit 502, wherein:

[0093] Transceiver unit 501 is used to acquire the target mesh model;

[0094] The processing unit 502 is used to generate a depth map of the target mesh model according to a preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values. It determines multiple layer edge data of the depth map according to a preset layering rule and the depth value of each pixel. It converts the multiple layer edge data into layer texture data. It inputs the layer texture data stored in memory and the target mesh model into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0095] In some embodiments, when the processing unit 502 performs the step of generating a depth map of the target mesh model according to a preset viewing direction, it is specifically used for:

[0096] The target mesh model stored in memory is transferred to the GPU; in the GPU, a depth map of the target mesh model is generated according to the preset viewing direction; and the depth map is transferred back to memory.

[0097] In some embodiments, when the processing unit 502 performs the step of inputting the layer texture data stored in memory and the target mesh model into the GPU for indentation detection and obtaining the indentation detection result of the target mesh model, it is specifically used for:

[0098] The layer texture data stored in memory is passed to the GPU, and undercut detection is performed based on the target mesh model in the GPU to obtain the undercut detection result of the target mesh model; or, the layer texture data stored in memory is passed to the GPU, and the target mesh model stored in memory is passed to the GPU again for undercut detection to obtain the undercut detection result of the target mesh model.

[0099] In some embodiments, when the processing unit 502 performs the step of inputting the layer texture data stored in memory and the target mesh model into the GPU for indentation detection and obtaining the indentation detection result of the target mesh model, it is specifically used for:

[0100] The layer texture data and target mesh model stored in memory are passed to the GPU; in the GPU, multiple indentation points in the target mesh model are determined; in the GPU, for each indentation point, the indentation distance corresponding to the indentation point is determined based on the target layer level where the indentation point is located and the layer texture data.

[0101] In some embodiments, after performing the step of obtaining the target mesh model, the processing unit 502 is further configured to:

[0102] Generate BVH data for the target mesh model and convert the BVH data into BVH texture data; then input the BVH texture data into the GPU.

[0103] At this time, when processing unit 502 performs the step of determining multiple concave points in the target mesh model, it is specifically used for:

[0104] For each vertex in the target mesh model, a ray is projected from the vertex toward the viewing direction; based on the BVH texture data, it is determined whether the ray hits the target mesh model itself, and the vertex corresponding to the ray that hits the target mesh model itself is identified as the inverted point.

[0105] In some embodiments, the depth map is obtained by an orthogonal camera positioned on the target plane; in some embodiments, when the processing unit 502 performs the step of determining multiple concave points in the target mesh model, it is specifically used for:

[0106] For each vertex in the target mesh model, obtain the distance value from the vertex to the target plane; among multiple vertices, the vertex whose distance value is greater than the corresponding depth value is identified as the inverted concave point.

[0107] In some embodiments, when performing the step of converting multiple layer edge data into layer texture data, the processing unit 502 is specifically used for:

[0108] Multiple layer edge data are arranged and processed based on preset tiling rules to obtain layer edge tiling data; KD-Tree data corresponding to the layer edge tiling data is generated; and the KD-Tree data is converted into layer texture data.

[0109] In some embodiments, the depth map is obtained by an orthogonal camera positioned on the target plane; when the processing unit 502 performs the step of determining the indentation distance corresponding to the indentation point based on the target layer level where the indentation point is located and the layer texture data, it is specifically used for:

[0110] The target layer level is determined based on the distance from the indentation point to the target plane and the preset layering rules; the target layer edge texture data corresponding to the target layer level is determined from the layer texture data; the nearest distance between the indentation point and the target layer edge texture data is calculated, and the nearest distance is determined as the indentation distance.

[0111] In some embodiments, the target mesh model includes multiple triangular facets; before performing the step of converting multiple layer edge data into layer texture data, the processing unit 502 is further configured to:

[0112] Determine the normal of each triangular facet;

[0113] Each normal is multiplied by the preset line of sight to obtain the dot product result for each triangular facet.

[0114] Triangular facets whose dot product result is greater than a preset dot product threshold are identified as inverted concave triangular facets.

[0115] Filter the data that do not intersect with the inverted triangular facets in the edge data of multiple layers to obtain the filtered edge data of multiple layers.

[0116] Transforming multiple layer edge data into layer texture data, including:

[0117] The filtered layer edge data stored in memory is converted into layer texture data.

[0118] In some embodiments, when the processing unit 502 performs the step of filtering data that does not intersect with the concave triangular facets in the multiple layer edge data to obtain filtered multiple layer edge data, it is specifically used for:

[0119] The inverted concave triangular facets are rendered to obtain an inverted concave binary map; the data that intersect with the inverted concave binary map from the edge data of multiple layers are taken as the filtered edge data of multiple layers.

[0120] In some embodiments, after obtaining the target mesh model, the processing unit 502 is further configured to:

[0121] Obtain the surface connectivity data of the target mesh model;

[0122] At this point, after executing the step of inputting the layer texture data stored in memory and the target mesh model into the GPU for indentation detection and obtaining the indentation detection result of the target mesh model, the processing unit 502 is also used for:

[0123] The inverted concave detection results are transferred from the GPU to memory; based on the surface connectivity data and the inverted concave detection results, multiple inverted concave connected surfaces are determined; inverted concave connected surfaces whose number of connected surfaces is less than a preset connected surface threshold are filtered to obtain multiple target inverted concave connected surfaces.

[0124] In some embodiments, after performing the step of filtering the inverted concave connected surfaces among the plurality of inverted concave connected surfaces where the number of connected surfaces is less than a preset connected surface threshold to obtain a plurality of target inverted concave connected surfaces, the processing unit 502 is further configured to:

[0125] Set the target concave connected surface in the target mesh model to the preset concave color.

[0126] In summary, the GPU-based undercut detection device 500 provided in this application generates a depth map of the target mesh model, derives layer edge data for each layer based on the depth map, converts multiple layer edge data into layer texture data, and inputs the obtained layer texture data and the target mesh model into the GPU for undercut detection, ultimately obtaining the undercut detection result of the target mesh model, effectively improving the efficiency and accuracy of undercut detection.

[0127] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the GPU-based indentation detection device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0128] The aforementioned GPU-based indentation detection device can be implemented as a computer program, which can, for example... Figure 6 It runs on the computer device shown.

[0129] Please see Figure 6 , Figure 6This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 600 can be a target terminal, which includes a GPU and memory.

[0130] See Figure 6 The computer device 600 includes a processor 602, a memory, and a network interface 605 connected via a system bus 601. The memory may include a non-volatile storage medium 603 and internal memory 604.

[0131] The non-volatile storage medium 603 may store an operating system 6031 and a computer program 6032. The computer program 6032 includes program instructions that, when executed, cause the processor 602 to perform a GPU-based indentation detection method.

[0132] The processor 602 provides computing and control capabilities to support the operation of the entire computer device 600.

[0133] The internal memory 604 provides an environment for the execution of the computer program 6032 in the non-volatile storage medium 603. When the computer program 6032 is executed by the processor 602, the processor 602 can execute a GPU-based indentation detection method.

[0134] This network interface 605 is used for network communication with other devices. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 600 to which the present application is applied. The specific computer device 600 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0135] The processor 602 is used to run the computer program 6032 stored in the memory to perform the following steps:

[0136] Obtain the target mesh model;

[0137] A depth map of the target mesh model is generated based on a preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values.

[0138] The depth map's multiple layer edge data are determined based on preset layering rules and the depth values ​​of each pixel.

[0139] Transform multiple layer edge data into layer texture data;

[0140] The layer texture data stored in memory and the target mesh model are fed into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0141] It should be understood that in the embodiments of this application, the processor 602 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0142] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0143] Therefore, this application also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps:

[0144] Obtain the target mesh model;

[0145] A depth map of the target mesh model is generated based on a preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values.

[0146] The depth map's multiple layer edge data are determined based on preset layering rules and the depth values ​​of each pixel.

[0147] Transform multiple layer edge data into layer texture data;

[0148] The layer texture data stored in memory and the target mesh model are fed into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

[0149] The storage medium can be any computer-readable storage medium that can store program code, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0150] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0151] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0152] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.

[0154] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A GPU-based indentation detection method, characterized in that, The method is applied to a target terminal, the target terminal including a GPU and memory, and the method includes: Obtain the target mesh model; A depth map of the target mesh model is generated according to a preset viewing direction. The depth map includes multiple pixels carrying corresponding depth values. Multiple layer edge data of the depth map are determined according to preset layering rules and the depth values ​​of each pixel. The multiple layer edge data are converted into layer texture data; The layer texture data stored in the memory and the target mesh model are fed into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

2. The method according to claim 1, characterized in that, The step of generating a depth map of the target mesh model according to a preset line-of-sight direction includes: The target mesh model stored in memory is passed into the GPU; In the GPU, a depth map of the target mesh model is generated according to a preset viewing direction; The depth map is then transferred back to the memory.

3. The method according to claim 1, wherein the step of inputting the layer texture data stored in the memory and the target mesh model into the GPU for indentation detection to obtain the indentation detection result of the target mesh model includes: The layer texture data stored in the memory is passed into the GPU, and indentation detection is performed based on the target mesh model in the GPU to obtain the indentation detection result of the target mesh model; Alternatively, the layer texture data stored in the memory can be transferred to the GPU, and the target mesh model stored in the memory can be transferred to the GPU again for indentation detection to obtain the indentation detection result of the target mesh model.

4. The method according to claim 1, characterized in that, The step of inputting the layer texture data stored in the memory and the target mesh model into the GPU for indentation detection, and obtaining the indentation detection result of the target mesh model, includes: The layer texture data stored in memory and the target mesh model are passed to the GPU; In the GPU, multiple indentation points in the target mesh model are determined; In the GPU, for each indentation point, the indentation distance corresponding to the indentation point is determined based on the target layer level where the indentation point is located and the layer texture data.

5. The method according to claim 4, characterized in that, After obtaining the target mesh model, the method further includes: Generate BVH data for the target mesh model, and convert the BVH data into BVH texture data; The BVH texture data is then passed to the GPU. Determining multiple concave points in the target mesh model includes: For each vertex in the target mesh model, a ray is projected from the vertex toward the line of sight. Based on the BVH texture data, it is determined whether the ray hits the target mesh model itself, and the vertex corresponding to the ray that hits the target mesh model itself is determined as the inverted point.

6. The method according to claim 4, characterized in that, The depth map is obtained by an orthogonal camera positioned on the target plane; determining the multiple concave points in the target mesh model includes: For each vertex in the target mesh model, obtain the distance value from the vertex to the target plane; Among the multiple vertices, the vertex whose distance value is greater than the corresponding depth value is determined as the inverted concave point.

7. The method according to claim 4, characterized in that, The step of converting multiple layer edge data into layer texture data includes: The multiple layer edge data are arranged according to a preset tiling rule to obtain layer edge tiling data; Generate KD-Tree data corresponding to the tiled data at the layer edges; The KD-Tree data is converted into layer texture data.

8. The method according to any one of claims 2-7, characterized in that, The depth map is obtained by an orthogonal camera positioned on the target plane; determining the indentation distance corresponding to the indentation point based on the target layer level where the indentation point is located and the layer texture data includes: The target layer number is determined based on the distance from the concave point to the target plane and the preset layering rule; Determine the target layer edge texture data corresponding to the target layer level from the layer texture data; Calculate the nearest distance between the indentation point and the edge texture data of the target layer, and determine the nearest distance as the indentation distance.

9. The method according to claim 1, characterized in that, The target mesh model includes multiple triangular facets; before converting the multiple layer edge data into layer texture data, the method further includes: Determine the normal of each of the triangular facets; Each of the stated normals is multiplied by the preset line of sight to obtain the dot product result corresponding to each of the triangular facets. Triangular facets whose dot product result is greater than a preset dot product threshold are identified as inverted concave triangular facets. The data that do not intersect with the inverted triangular facet in the multiple layer edge data are filtered to obtain the multiple layer edge data after filtering. The step of converting multiple layer edge data into layer texture data includes: The filtered layer edge data stored in the memory is converted into layer texture data.

10. The method according to claim 9, characterized in that, The step of filtering the data in the multiple layer edge data that do not intersect with the inverted triangular facet to obtain the filtered multiple layer edge data includes: The concave triangular facet is rendered to obtain a concave binary image; Data that intersect with the inverted concave binary map among the multiple layer edge data are selected as the filtered multiple layer edge data.

11. The method according to claim 1, characterized in that, After obtaining the target mesh model, the method further includes: Obtain the surface connectivity data of the target mesh model; After passing the layer texture data stored in the memory and the target mesh model into the GPU for indentation detection and obtaining the indentation detection result of the target mesh model, the method further includes: The indentation detection results are transferred from the GPU to memory; Based on the surface connectivity data and the undercut detection results, multiple undercut connected surfaces are determined; The inverted concave connected surfaces with a number of connected surfaces less than a preset connected surface threshold are filtered to obtain multiple target inverted concave connected surfaces.

12. The method according to claim 11, characterized in that, After filtering out the inverted concave connected surfaces whose number of connected surfaces is less than a preset connected surface threshold to obtain multiple target inverted concave connected surfaces, the method further includes: Set the target concave connected surface in the target mesh model to a preset concave color.

13. A GPU-based indentation detection device, characterized in that, The GPU-based undercut detection device is deployed on a target terminal, which includes a GPU and memory. The GPU-based undercut detection device includes: Transceiver unit, used to acquire the target mesh model; The processing unit is configured to generate a depth map of the target mesh model according to a preset viewing direction, the depth map including multiple pixels carrying corresponding depth values; determine multiple layer edge data of the depth map according to a preset layering rule and the depth values ​​of each pixel; convert the multiple layer edge data into layer texture data; and input the layer texture data stored in the memory and the target mesh model into the GPU for indentation detection to obtain the indentation detection result of the target mesh model.

14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the GPU-based indentation detection method as described in any one of claims 1-12.

15. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the GPU-based indentation detection method as described in any one of claims 1-12.