Neck-edge line extraction method and device, equipment and storage medium
By acquiring the target detection area of the tooth preparation model, unfolding it into a two-dimensional image, and using the curvature value to extract the cervical margin line, the problems of time-consuming, labor-intensive, and subjective manual annotation are solved, and automatic and accurate cervical margin line extraction is achieved.
Patent Information
- Application Number
- CN202310926814.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
AI Technical Summary
In existing technologies, the extraction of the cervical margin of tooth preparations relies on manual marking, which is time-consuming, labor-intensive, and subjective, affecting the accuracy of extraction.
By acquiring the target detection area, unfolding it into a two-dimensional image, extracting the neckline using the curvature values of pixels, and automatically mapping it to a three-dimensional model, stable extraction of the neckline is achieved.
Reduce labor costs, avoid subjective noise, and improve the accuracy and efficiency of neckline extraction.
Smart Images

Figure CN119380036A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of oral restoration, and in particular to a method, device, equipment and storage medium for extracting a cervical margin line. Background Art
[0002] In the field of oral restoration technology, the introduction of digital technology has brought about profound changes. Among them, oral CAD / CAM restoration technology has become a research hotspot due to its advantages such as fast restoration production speed and high restoration accuracy. In the process of oral CAD / CAM restoration, the extraction of the neck line of the tooth preparation is a key link in the edge sealing of the oral process. Whether the neck line of the tooth preparation fits the gum part has an important impact on the patient's comfort, oral health and the success of oral restoration work.
[0003] At present, the cervical margin line of the tooth preparation is usually extracted manually, that is, it is manually marked directly on the digital model of the tooth preparation. However, this method requires a lot of time and effort, and the labor cost is high. In addition, this method also has high professional requirements for the operator, and it will inevitably be subjective, resulting in the introduction of uncertain noise in the process of manual marking, affecting the accuracy of cervical margin line extraction. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a neck margin line extraction method, device, equipment and storage medium.
[0005] In a first aspect, the present disclosure provides a method for extracting a neck margin line, the method comprising:
[0006] Acquire a target detection region, wherein the target detection region includes a neck edge line of the target preparation model;
[0007] Expand the target detection area from three dimensions to two dimensions to obtain a target detection image;
[0008] According to the first curvature value corresponding to the pixel point in the target detection image, the target detection image is subjected to neck margin line extraction to obtain an initial neck margin line, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is the maximum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is the minimum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area;
[0009] The initial neck margin line is mapped back to the target detection area to obtain the neck margin line of the target preparation model.
[0010] In a second aspect, the present disclosure provides a neck margin line extraction device, the device comprising:
[0011] A first acquisition module is used to acquire a target detection area, wherein the target detection area includes a neck edge line of a target preparation model;
[0012] An expansion module is used to expand the target detection area from three dimensions to two dimensions to obtain a target detection image;
[0013] A detection module, configured to extract a neck edge line from the target detection image to obtain an initial neck edge line according to a first curvature value corresponding to a pixel point in the target detection image, wherein the first curvature value is a curvature value of a three-dimensional point located on the target detection area and corresponding to the pixel point on the target detection area;
[0014] The mapping module is used to map the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When one or more programs are executed by one or more processors, the one or more processors implement the neck margin line extraction method provided in the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the neck margin line extraction method provided in the first aspect is implemented.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] A neck margin line extraction method, apparatus, device and storage medium of the embodiments of the present disclosure can obtain a target detection area, wherein the target detection area includes the neck margin line of a target preparation model; expand the target detection area from three dimensions to two dimensions to obtain a target detection image; extract the neck margin line of the target detection image according to a first curvature value corresponding to a pixel point in the target detection image to obtain an initial neck margin line, wherein if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is a maximum curvature value of a three-dimensional point located in the target detection area corresponding to the pixel point on the target detection area, and if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is a minimum curvature value of a three-dimensional point located in the target detection area corresponding to the pixel point on the target detection area; map the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model. By adopting the above technical scheme, the neck margin line of the target preparation model can be extracted stably and automatically. Compared with manual neck margin line marking of the target preparation model, it can not only save labor costs, but also avoid the operator's subjectivity from introducing uncertain noise in the manual marking process, thereby improving the accuracy of neck margin line extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A schematic diagram of a process of extracting a neck margin line provided by an embodiment of the present disclosure is shown;
[0025] Figure 2 A schematic diagram showing a portion of a target detection area provided by an embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram showing another part of a target detection area provided by an embodiment of the present disclosure;
[0027] Figure 4 A schematic diagram showing a flow chart of another neck margin line extraction method provided by an embodiment of the present disclosure;
[0028] Figure 5 A schematic diagram of a target detection image provided by an embodiment of the present disclosure is shown;
[0029] Figure 6A logic schematic diagram of selecting a first intermediate point provided by an embodiment of the present disclosure is shown;
[0030] Figure 7 A schematic structural diagram of a neck margin line extraction device provided by an embodiment of the present disclosure is shown;
[0031] Figure 8 A schematic structural diagram of a neck margin line extraction device provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0034] In order to solve the above problems, the embodiments of the present disclosure provide a neck margin line extraction method, device, equipment and storage medium.
[0035] Combine the following Figures 1 to 3 The neck margin line extraction method provided in the embodiment of the present disclosure is described. In the embodiment of the present disclosure, the neck margin line extraction method can be executed by an electronic device. The electronic device can include a device with communication function such as a tablet computer, a desktop computer, a laptop computer, etc., and can also include a device simulated by a virtual machine or a simulator.
[0036] Figure 1 A schematic flow chart of a method for extracting a neck margin line provided in an embodiment of the present disclosure is shown.
[0037] like Figure 1 As shown, the neck margin line extraction method may include the following steps.
[0038] S110, obtaining a target detection region, wherein the target detection region includes a neck edge line of the target preparation model.
[0039] Specifically, the target preparation model is a preparation model of the cervical margin line to be extracted, wherein the preparation model is a three-dimensional model of the tooth preparation, which is the anatomical shape of the defective tooth that needs to be reconstructed and repaired, and the specific presentation form of the three-dimensional model may include Mesh, etc., but is not limited thereto.
[0040] Specifically, the cervical margin line mainly refers to the gingival margin, which is a closed curve containing the characteristics of the cervical margin. The cervical margin line includes convex cervical margin lines and concave cervical margin lines. The convex cervical margin line is usually the cervical margin line of the maxillary teeth, which is similar to an "inverted U shape", and the concave cervical margin line is usually the cervical margin line of the mandibular teeth, which is similar to a "U shape".
[0041] Specifically, the target detection area is the area where the cervical margin line is to be extracted, and the target detection area is a partial area on the target dental model (ie, the dental model including the target preparation model).
[0042] For example, Figure 2 A schematic diagram of a portion of a target detection area provided by an embodiment of the present disclosure is shown. Figure 3 FIG. 2 is a schematic diagram showing another part of a target detection area provided by an embodiment of the present disclosure. In order to clearly show the complete target detection area 210, Figure 2 and Figure 3 Different parts of the same target detection area 210 are shown respectively. Figure 2 FIG. 2 shows a portion of the target detection area 210, which includes a line segment portion of the neck edge line 220 close to the tongue surface. Figure 3 FIG. 2 shows another part of the target detection area 210, which includes the line segment portion of the neck edge line 220 close to the tongue surface. Figure 2 and Figure 3 As shown, the target detection area 210 includes a complete neck edge line 220 .
[0043] Specifically, there are many specific implementation methods for obtaining the target detection area, and typical examples are described below, but they do not constitute a limitation to the present disclosure.
[0044] In some embodiments, S110 may include: acquiring a target dental model, wherein the target dental model includes at least one preparation model; in response to a user's selection operation on a cervical margin line on the target dental model, determining an area selected by the selection operation on the cervical margin line as a target detection area.
[0045] In other embodiments, S110 may include: obtaining a target dental model, wherein the target dental model includes at least one preparation model; in response to a selection operation performed by a user on the target dental model, determining a first target point selected by the selection operation, and determining the preparation model where the first target point is located as the target preparation model; determining a target radius according to the position of the first target point on the target preparation model, wherein the target radius is the radius of a minimum spherical space with the first target point as the center and completely surrounding the target preparation model; selecting a target detection area from the minimum volume spherical space, wherein if the neck margin line of the target preparation model is a convex neck margin line, a first curvature value of the three-dimensional points on the target detection area is greater than a first preset curvature threshold; if the neck margin line of the target preparation model is a concave neck margin line, a first curvature value of the three-dimensional points on the target detection area is less than a second preset curvature threshold.
[0046] Specifically, the selection operation may include single-clicking, double-clicking, and the like performed by a mouse or touch, but is not limited thereto.
[0047] Specifically, the first target point is a three-dimensional point selected by the selection operation and located on the target preparation body model.
[0048] Specifically, the minimum spherical space is a spherical space with the smallest volume among all spherical spaces that take the first target point as the sphere center and can completely surround the target preparation body model.
[0049] Specifically, the specific method for determining the target radius can be set by technicians in this field according to actual conditions, and there is no limitation on this. For example, according to the position of the first target point on the target preparation model, the second target point is determined, wherein the second target point is the three-dimensional point on the target preparation model that is farthest from the first target point, and the distance between the first target point and the second target point is used as the target radius. In this way, the spherical space with the first target point as the center and the target radius as the radius can completely surround the target preparation model, that is, the neck margin line of the target preparation model can be completely surrounded. But it is not limited to this.
[0050] Specifically, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is the maximum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area. If the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is the minimum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area.
[0051] The first curvature value of the three-dimensional point on the convex neck margin line is usually larger, and the first curvature value of the three-dimensional point on the concave neck margin line is usually smaller. Therefore, the target detection area can be selected from the spherical space according to the first curvature value of the three-dimensional point on the target dental model located in the spherical space. For example, if the neck margin line of the target preparation model is a convex neck margin line, a three-dimensional point with a first curvature value greater than the first preset curvature threshold can be selected from the spherical space (if the neck margin line of the target preparation model is a concave neck margin line, a three-dimensional point with a first curvature value less than the second preset curvature threshold can be selected from the spherical space) to obtain at least one candidate detection area, wherein different candidate detection areas are discrete (i.e., not connected) from each other; from at least one candidate detection area, a candidate detection area in the shape of a ring is selected as the target detection area. It should be noted that the "ring-shaped" mentioned here includes a similar ring (or similar ring), and is not necessarily a circular ring. It should be noted that the specific value of the preset curvature threshold can be set by a person skilled in the art according to actual conditions, and the present disclosure does not limit this.
[0052] For example, see Figure 2 When the user performs a click operation on the target dental model, the first target point 230 selected by the click operation can be determined, and then the target detection area 210 can be automatically determined subsequently.
[0053] It can be understood that by setting a first target point determined in response to the user's selection operation on the target dental model, and then determining the target radius based on the first target point, the target detection area is selected from a spherical space with the first target point as the center and the target radius as the radius. After the user performs the selection operation, the target detection area can be automatically and accurately circled. In this way, a large amount of manual interaction and operation time can be avoided, making the cervical margin line extraction process simple and efficient.
[0054] S120, expanding the target detection area from three dimensions to two dimensions to obtain a target detection image.
[0055] In the embodiment of the present disclosure, as described above, the target detection area is a partial area on the target dental model, and therefore the target detection area is three-dimensional. In order to facilitate the subsequent extraction of the cervical margin line and reduce the computational difficulty of extracting the cervical margin line, the target detection area can be reduced in dimensionality and the target detection area can be expanded and flattened onto a two-dimensional plane to obtain a target detection image.
[0056] Specifically, there are various specific implementations for expanding the target detection area from three dimensions to two dimensions, and typical examples are described below, but do not constitute limitations to the present disclosure.
[0057] In some embodiments, S120 may include: inputting the target detection area into an expansion model to obtain a target detection image output by the expansion model, wherein the expansion model is trained by the sample detection area and the sample detection image obtained by expanding the sample detection area.
[0058] In some other embodiments, S120 may include: performing parameterized expansion processing on the target detection area to obtain two-dimensional points on the parameterized plane; and performing rasterization processing on the two-dimensional points on the parameterized plane to obtain a target detection image.
[0059] It can be understood that by expanding the target detection area through parametric expansion processing and rasterization processing to obtain a target detection image, the expansion method of the target detection area is simple, convenient, and occupies less computing resources, which is conducive to making the entire neck margin line extraction method more concise and less bloated, thereby reducing the performance requirements for electronic equipment.
[0060] S130. According to the first curvature value corresponding to the pixel point in the target detection image, the target detection image is subjected to neck margin line extraction to obtain an initial neck margin line, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is the maximum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is the minimum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area.
[0061] In the embodiment of the present disclosure, as described above, the target detection area can be expanded from three dimensions to two dimensions to obtain a target detection image. Therefore, the three-dimensional point in the target detection area has a corresponding two-dimensional pixel point in the target detection image, and the first curvature value corresponding to the pixel point is the curvature value of the corresponding three-dimensional point on the target detection area (or the surface corresponding to the target detection area) (for the convex neck edge line, the curvature value described here is the maximum curvature value, and for the concave neck edge line, the curvature value described here is the minimum curvature value).
[0062] Specifically, the initial neck edge line is a two-dimensional neck edge line extracted from the target detection image.
[0063] Specifically, as mentioned above, the first curvature value of the three-dimensional point on the convex neck edge line is usually larger, and the first curvature value of the three-dimensional point on the concave neck edge line is usually smaller. Therefore, the neck edge line of the target detection image can be extracted according to the first curvature value corresponding to the pixel point in the target detection image to obtain the initial neck edge line.
[0064] S140, mapping the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0065] Specifically, the initial neck margin line includes multiple pixel points. For the pixel points on the initial neck margin line, the three-dimensional points corresponding to the pixel points on the initial neck margin line (that is, the three-dimensional points on the neck margin line of the target preparation model) can be determined based on the correspondence between the pixel points in the target detection image and the three-dimensional points in the target detection area. In this way, the neck margin line of the target preparation model can be determined.
[0066] The disclosed embodiment can obtain a target detection area, wherein the target detection area includes the neck margin line of the target preparation model; expand the target detection area from three dimensions to two dimensions to obtain a target detection image; extract the neck margin line of the target detection image according to the first curvature value corresponding to the pixel point in the target detection image to obtain an initial neck margin line, wherein if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is the maximum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area, and if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is the minimum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area; map the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model. The above technical solution can stably and automatically extract the neck margin line of the target preparation model, which can save labor costs and avoid the subjectivity of the operator from introducing uncertain noise in the process of manual annotation, thereby improving the accuracy of neck margin line extraction.
[0067] Figure 4 The flowchart of another neck margin line extraction method provided by the embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.
[0068] like Figure 4 As shown, the neck margin line extraction method may include the following steps.
[0069] S410, obtaining a target detection region, wherein the target detection region includes a neck edge line of the target preparation model.
[0070] Specifically, S410 is similar to S110 and will not be described in detail here.
[0071] S420: Expand the target detection area from three dimensions to two dimensions to obtain a target detection image.
[0072] Specifically, S420 is similar to S120 and will not be described in detail here.
[0073] S430: Acquire an annular image region in the target detection image and an inner edge region in the annular image region, wherein the inner edge region includes an inner edge line of the annular image region.
[0074] Specifically, as mentioned above, the target detection area is annular, so the target detection image includes an annular image area corresponding to the target detection area. The "annular image area" mentioned here includes a graphic area similar to an annular shape, and is not necessarily a circular annular graphic area.
[0075] Optionally, the grayscale value of a pixel in the target detection image is positively correlated (or negatively correlated) with the first curvature value corresponding thereto. In this way, the first curvature value of the three-dimensional point corresponding to the pixel can be displayed intuitively and vividly.
[0076] Specifically, the annular image area includes two contour lines, namely an inner edge line and an outer edge line, and the outer edge line surrounds the inner edge line. The inner edge area is the portion of the annular image area away from the outer edge line. In other words, the inner edge area includes two contour lines, one of which is the inner edge line, and the other is located between the inner edge line and the outer edge line of the annular image area. It should be noted that the specific value of the maximum width between the two contour lines of the inner edge area can be set by those skilled in the art according to actual conditions and is not limited here. For example, the maximum width is the width of 1 pixel, or the width of 2 pixels, etc., but is not limited thereto.
[0077] For example, Figure 5 FIG. 1 is a schematic diagram of a target detection image provided by an embodiment of the present disclosure. Figure 5 The target detection image includes a ring-shaped image area 510 corresponding to the target detection area, and the ring-shaped image area 510 includes an inner edge line 511 and an outer edge line 512.
[0078] S440. Select a starting point and an ending point from the pixel points in the inner edge area, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value corresponding to the starting point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value corresponding to the starting point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood.
[0079] Specifically, if the neck margin line of the target preparation model is a convex neck margin line, the starting point and the ending point meet the requirement of the local maximum value of the curvature. If the neck margin line of the target preparation model is a concave neck margin line, the starting point and the ending point meet the requirement of the local minimum value of the curvature.
[0080] For example, Figure 5As shown, a starting point A and an ending point B are selected from the pixel points in the inner edge area.
[0081] Optionally, the straight-line distance between the starting point and the end point in the target detection image meets the requirement of being greater than a preset distance threshold. It should be noted that the specific value of the preset distance threshold can be set by technicians in the field according to actual conditions and is not limited here.
[0082] In this way, the distance between the initial point and the end point can be made large enough, so that the path length from the initial point to the end point and the path length from the end point to the initial point are not particularly long, which is conducive to improving the accuracy of subsequent generation of the path from the initial point to the end point and the path from the end point to the initial point, thereby improving the accuracy of initial cervical margin line extraction.
[0083] Further optionally, S440 may include: selecting a starting point from the pixel points in the inner edge area, and selecting an ending point with the largest distance from the starting point from the pixel points in the inner edge area.
[0084] In this way, the method of determining the starting point and the end point can be made simple and convenient, which is conducive to improving the efficiency of selecting the starting point and the end point, and then improving the efficiency of extracting the neck margin line.
[0085] S450. According to the first curvature values corresponding to the pixel points in the annular image area, a first intermediate point is selected from the pixel points in the annular image area to generate a path from the starting point to the ending point, and a second intermediate point is selected to generate a path from the ending point to the starting point, wherein the starting point, the first intermediate point, the second intermediate point and the ending point are all pixel points on the initial cervical margin line.
[0086] Specifically, the path from the starting point to the end point and the path from the starting point to the end point have the same extension direction, which is clockwise or counterclockwise.
[0087] Specifically, the starting point, the first middle point, the second middle point, and the end point are connected clockwise or counterclockwise to obtain the initial neck edge line.
[0088] For example, see Figure 5 According to the first curvature value corresponding to the pixel points in the annular image area, the first middle point O1 and the second middle point O2 are selected from the pixel points in the annular image area, and the starting point A, the first middle point O1, the second middle point O2, and the end point B are connected clockwise or counterclockwise to obtain the initial neck margin line.
[0089] Optionally, the shortest path algorithm can be used to select a first intermediate point from the pixel points in the annular image area according to the first curvature value corresponding to the pixel points in the annular image area to generate a path from the starting point to the end point; the shortest path algorithm can be used again to select a second intermediate point from the pixel points in the annular image area according to the first curvature value corresponding to the pixel points in the annular image area to generate a path from the end point to the starting point.
[0090] In this way, the first middle point and the second middle point can be selected by using the shortest path algorithm twice.
[0091] Further optionally, S450 may include: taking the starting point as the first current point, searching for the first intermediate point with the smallest path weight between the first current point and the end point from the pixel points in the neighborhood where the first current point is located, if the first preset condition is not satisfied between the latest found first intermediate point and the end point, updating the first current point to the latest found first intermediate point, and returning to execute the step of searching for the first intermediate point with the smallest path weight between the first current point and the end point from the pixel points in the neighborhood where the first current point is located, until the first preset condition is satisfied between the latest found first intermediate point and the end point;
[0092] The end point is taken as the second current point, and the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located is searched. If the second preset condition is not satisfied between the latest found second middle point and the start point, the second current point is updated to the latest found second middle point, and the step of searching for the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located is returned to be executed until the second preset condition is satisfied between the latest found second middle point and the end point;
[0093] Among them, if the neck edge line of the target preparation model is a convex neck edge line, the path weight is positively correlated with the first curvature value of the pixel point; if the neck edge line of the target preparation model is a concave neck edge line, the path weight is inversely correlated with the first curvature value of the pixel point.
[0094] Specifically, if the neck margin line of the target preparation model is a convex neck margin line, for the pixel points in the neighborhood of the first current point, the larger the first curvature value corresponding to the pixel point, the greater the probability that the three-dimensional point corresponding to the pixel point is a point on the neck margin line, and the greater the probability that the pixel point is the first intermediate point, therefore, the path weight between the first current point and the pixel points in its neighborhood is inversely correlated with the first curvature value corresponding to the pixel points in the neighborhood. Similarly, the path weight between the second current point and the pixel points in its neighborhood is inversely correlated with the first curvature value corresponding to the pixel points in the neighborhood. If the neck margin line of the target preparation model is a concave neck margin line, for the pixel points in the neighborhood of the first current point, the smaller the first curvature value corresponding to the pixel point, the greater the probability that the three-dimensional point corresponding to the pixel point is a point on the neck margin line, and the greater the probability that the pixel point is the first intermediate point, therefore, the path weight between the first current point and the pixel points in its neighborhood is positively correlated with the first curvature value corresponding to the pixel points in the neighborhood. Similarly, the path weight between the second current point and the pixel points in its neighborhood is positively correlated with the first curvature value corresponding to the pixel points in the neighborhood.
[0095] Specifically, the first preset condition may include that the end point is located in the neighborhood of the most recently found first intermediate point, or that the straight-line distance between the first intermediate point and the end point is less than a preset threshold, etc., but is not limited thereto. Similarly, the second preset condition may include that the start point is located in the neighborhood of the most recently found second intermediate point, or that the straight-line distance between the second intermediate point and the start point is less than a preset threshold, etc., but is not limited thereto.
[0096] For example, Figure 6 FIG. 1 shows a logic diagram of selecting a first intermediate point provided by an embodiment of the present disclosure. Figure 6 , the starting point A is taken as the first current point. The neighborhood Z where the first current point (i.e., the starting point A) is located includes two pixel points. The path weights between the two pixel points and the first current point are Q01 and Q02, respectively, wherein Q01>Q02. Therefore, the pixel point corresponding to the path weight Q02 is taken as the first intermediate point O1; the first preset condition is not satisfied between the latest found first intermediate point and the end point B. Therefore, the first current point is updated to the latest found first intermediate point O1. The neighborhood Z where the first current point (i.e., the latest found first intermediate point O1) is located includes two pixel points. The path weights between the two pixel points and the first current point are Q11 and Q12, respectively, wherein Q12>Q11. Therefore, the pixel point corresponding to the path weight Q11 is taken as the first intermediate point O1. Similarly, Q22>Q21. The pixel point corresponding to the path weight Q21 is taken as the first intermediate point O1. Similarly, all first intermediate points O1 on the path from the starting point A to the end point B can be found.
[0097] It can be understood that by setting the path weight to be inversely correlated with the first curvature value of the pixel point, and searching for the first midpoint and the second midpoint based on the path weight, the method of searching for the first midpoint and the second midpoint can be made simple and convenient, and less computing resources are occupied, which is conducive to making the entire neck margin line extraction method simpler and less bloated, thereby reducing the performance requirements for electronic equipment.
[0098] S460, mapping the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0099] Specifically, S460 is similar to S140 and will not be described in detail here.
[0100] Optionally, before S460, the method further includes: correcting the initial neck edge line according to a first curvature value and a second curvature value corresponding to the pixel points in the annular image area, wherein the second curvature value is a curvature value of the pixel points on the initial neck edge line on the initial neck edge line.
[0101] Specifically, the second curvature value is a curvature value of a pixel point on the initial neck edge line on the initial neck edge line (ie, the curve).
[0102] Accordingly, S460 may include: mapping the corrected initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0103] Specifically, the initial neck edge line may be corrected by using an active contour algorithm or the like.
[0104] Further optionally, the initial neck margin line is corrected according to the first curvature value and the second curvature value corresponding to the pixel point in the annular image area, including: if the neck margin line of the target preparation model is a convex neck margin line, for the pixel point in the annular image area, the first evaluation curvature value and the second curvature value corresponding to the pixel point are weighted summed to obtain the corresponding evaluation value; if the neck margin line of the target preparation model is a concave neck margin line, for the pixel point in the annular image area, the second evaluation curvature value and the second curvature value corresponding to the pixel point are weighted summed to obtain the corresponding evaluation value, wherein the first evaluation curvature value is negatively correlated with the first curvature value, the second evaluation curvature value is positively correlated with the first curvature value, and the second curvature value is the curvature value of the pixel point on the initial neck margin line on the initial neck margin line; for the pixel point on the initial neck margin line, the minimum value among the evaluation values corresponding to the pixel points in its neighborhood is determined, and if the corresponding evaluation value is not equal to the minimum value, the pixel point corresponding to the minimum value is replaced as the pixel point on the initial neck margin line.
[0105] Specifically, for a pixel point on the initial neck edge line, if its corresponding evaluation value is equal to the minimum value (that is, the minimum value among the evaluation values corresponding to the pixels in its neighborhood), no correction is performed so that the pixel point is still a point on the initial neck edge line.
[0106] It should be noted that the number of iterative modifications to the initial neck margin line can be set by those skilled in the art according to actual conditions and is not limited thereto.
[0107] It can be understood that by comprehensively considering the first curvature value and the second curvature value (ie, the smoothness of the initial neck margin line) to modify the initial neck margin line position, it can be made smoother and closer to the actual initial neck margin line, thereby improving the extraction accuracy of the initial neck margin line.
[0108] The disclosed embodiment can obtain the annular image area in the target detection image and the inner edge area in the annular image area, and select the starting point and the ending point from the pixel points in the inner edge area, and then select the first intermediate point from the pixel points in the annular image area according to the first curvature value corresponding to the pixel points in the annular image area to generate a path from the starting point to the ending point, and select the second intermediate point to generate a path from the ending point to the starting point. In this way, geometric methods are used in the process of extracting the initial neck margin line, which is conducive to making the program lighter, more convenient, and less bloated.
[0109] Figure 7 A schematic structural diagram of a neck margin line extraction device provided in an embodiment of the present disclosure is shown.
[0110] like Figure 7 As shown, the neck margin line extraction device 700 may include:
[0111] An acquisition module 710 is used to acquire a target detection area, wherein the target detection area includes a neck edge line of a target preparation model;
[0112] An expansion module 720, used to expand the target detection area from three dimensions to two dimensions to obtain a target detection image;
[0113] An extraction module 730 is used to extract a neck margin line from the target detection image according to a first curvature value corresponding to a pixel point in the target detection image to obtain an initial neck margin line, wherein if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is a maximum curvature value of a three-dimensional point located on the target detection area and corresponding to the pixel point on the target detection area; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is a minimum curvature value of a three-dimensional point located on the target detection area and corresponding to the pixel point on the target detection area;
[0114] The mapping module 740 is used to map the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0115] In another embodiment of the present disclosure, the first acquisition module 710 includes:
[0116] A first acquisition submodule is used to acquire a target dental model, wherein the target dental model includes at least one preparation model;
[0117] A first determination submodule is used for determining a first target point selected by the selection operation on the target dental model in response to a selection operation by a user, and determining the preparation model where the first target point is located as the target preparation model;
[0118] A second determination submodule is used to determine a target radius according to the position of the first target point on the target preparation model, wherein the target radius is the radius of a minimum spherical space that takes the first target point as the center and completely surrounds the target preparation model;
[0119] The first selection submodule is used to select the target detection area from the minimum spherical space, wherein if the neck edge line of the target preparation model is a convex neck edge line, the first curvature value of the three-dimensional point on the target detection area is greater than a first preset curvature threshold; if the neck edge line of the target preparation model is a concave neck edge line, the first curvature value of the three-dimensional point on the target detection area is less than a second preset curvature threshold.
[0120] In yet another embodiment of the present disclosure, the expansion module 720 includes:
[0121] A parameterized expansion processing submodule, used for performing parameterized expansion processing on the target detection area to obtain a two-dimensional point located on a parameterized plane;
[0122] The rasterization processing submodule is used to perform rasterization processing on the two-dimensional points on the parameterized plane to obtain the target detection image.
[0123] In another embodiment of the present disclosure, the extraction module 730 includes:
[0124] A second acquisition submodule is used to acquire an annular image region in the target detection image and an inner edge region in the annular image region, wherein the inner edge region includes an inner edge line of the annular image region;
[0125] A second selection submodule is used to select a starting point and an ending point from the pixel points in the inner edge area, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value corresponding to the starting point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value corresponding to the starting point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood;
[0126] The third selection submodule is used to select a first intermediate point from the pixel points in the annular image area to generate a path from the starting point to the ending point, and to select a second intermediate point to generate a path from the ending point to the starting point according to the first curvature value corresponding to the pixel points in the annular image area, wherein the starting point, the first intermediate point, the second intermediate point and the ending point are all pixel points on the initial cervical margin line.
[0127] In another embodiment of the present disclosure, the second selection submodule is specifically used to select the starting point from the pixel points in the inner edge area; and select the ending point with the largest distance from the starting point from the pixel points in the inner edge area.
[0128] In another embodiment of the present disclosure, the third selection submodule is specifically used to take the starting point as the first current point, and search for the first intermediate point with the smallest path weight between the first current point and the pixel points in the neighborhood where the first current point is located; if the first intermediate point found most recently and the end point do not satisfy the first preset condition, update the first current point to the first intermediate point found most recently, and return to the step of searching for the first intermediate point with the smallest path weight between the first current point and the pixel points in the neighborhood where the first current point is located, until the first intermediate point found most recently and the end point satisfy the first preset condition;
[0129] Taking the end point as the second current point, searching for the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located, if the second middle point found most recently and the start point do not satisfy the second preset condition, updating the second current point to the second middle point found most recently, and returning to the step of searching for the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located, until the second middle point found most recently and the end point satisfy the second preset condition;
[0130] Among them, if the neck edge line of the target preparation model is a convex neck edge line, the path weight is inversely correlated with the first curvature value of the pixel point; if the neck edge line of the target preparation model is a concave neck edge line, the path weight is positively correlated with the first curvature value of the pixel point.
[0131] In another embodiment of the present disclosure, the device further comprises:
[0132] A summing processing submodule, for performing weighted summing processing on the first evaluation curvature value and the second curvature value corresponding to the pixel points in the annular image area to obtain the corresponding evaluation value if the neck margin line of the target preparation body model is a convex neck margin line, and performing weighted summing processing on the second evaluation curvature value and the second curvature value corresponding to the pixel points in the annular image area to obtain the corresponding evaluation value if the neck margin line of the target preparation body model is a concave neck margin line, wherein the first evaluation curvature value is inversely correlated with the first curvature value, the second evaluation curvature value is positively correlated with the first curvature value, and the second curvature value is the curvature value of the pixel points on the initial neck margin line on the initial neck margin line;
[0133] A correction submodule, for determining, for a pixel point on the initial neck edge line, a minimum value among the evaluation values corresponding to the pixel points in its neighborhood, and, if the evaluation value corresponding to the pixel point is not equal to the minimum value, replacing the pixel point corresponding to the minimum value as the pixel point on the initial neck edge line;
[0134] Correspondingly, the mapping module 740 is specifically configured to map the corrected initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
[0135] It should be noted that Figure 7 The neck margin line extraction device 700 shown can execute the various steps in the method embodiments described in any of the above embodiments, and realize the various processes and effects in the method embodiments described in any of the above embodiments, which will not be described in detail here.
[0136] Figure 8A schematic structural diagram of a neck margin line extraction device provided in an embodiment of the present disclosure is shown.
[0137] like Figure 8 As shown, the neck margin line extraction device may include a processor 801 and a memory 802 storing computer program instructions.
[0138] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0139] The memory 802 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 802 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 802 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 802 is a non-volatile solid-state memory. In a particular embodiment, the memory 802 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0140] The processor 801 reads and executes the computer program instructions stored in the memory 802 to perform the steps of the neck margin line extraction method provided in the embodiment of the present disclosure.
[0141] In one example, the neck margin line extraction device may further include a transceiver 803 and a bus 804. Figure 8 As shown, the processor 801, the memory 802 and the transceiver 803 are connected via a bus 804 and communicate with each other.
[0142] The bus 804 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 804 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0143] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the neck margin line extraction method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, please refer to the embodiment of the above-mentioned neck margin line extraction method.
[0144] This embodiment provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform a neck margin line extraction method. The method includes:
[0145] Acquire a target detection region, wherein the target detection region includes a neck edge line of the target preparation model;
[0146] Expand the target detection area from three dimensions to two dimensions to obtain a target detection image;
[0147] According to the first curvature value corresponding to the pixel point in the target detection image, the target detection image is subjected to neck edge line extraction to obtain an initial neck edge line, wherein the first curvature value is the curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area;
[0148] The initial neck margin line is mapped back to the target detection area to obtain the neck margin line of the target preparation model.
[0149] Of course, the computer executable instructions of a storage medium including computer executable instructions provided in an embodiment of the present disclosure are not limited to the above method operations, and can also execute related operations in the neck margin line extraction method provided in any embodiment of the present disclosure.
[0150] Through the above description of the implementation methods, technicians in the field can clearly understand that the present disclosure can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure can essentially or contribute to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer cloud platform (which can be a personal computer, server, or network cloud platform, etc.) to execute the neck margin line extraction method provided by each embodiment of the present disclosure.
[0151] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A method for extracting a neck margin line, characterized in that: include: Acquire a target detection area, wherein the target detection area includes a neck edge line of the target preparation model; Expanding the target detection area from three dimensions to two dimensions to obtain a target detection image; According to the first curvature value corresponding to the pixel point in the target detection image, the target detection image is subjected to neck margin line extraction to obtain an initial neck margin line, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is the maximum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area, and if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is the minimum curvature value of the three-dimensional point located on the target detection area corresponding to the pixel point on the target detection area; The initial neck margin line is mapped back to the target detection area to obtain the neck margin line of the target preparation model.
2. The method according to claim 1, characterized in that The acquiring of the target detection area comprises: Acquire a target dental model, wherein the target dental model includes at least one preparation model; In response to a selection operation by a user on the target dental model, determining a first target point selected by the selection operation, and determining the preparation model where the first target point is located as the target preparation model; Determining a target radius according to the position of the first target point on the target preparation model, wherein the target radius is the radius of a minimum spherical space that takes the first target point as the center and completely surrounds the target preparation model; The target detection area is selected from the minimum spherical space, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value of the three-dimensional point on the target detection area is greater than a first preset curvature threshold; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value of the three-dimensional point on the target detection area is less than a second preset curvature threshold.
3. The method according to claim 1, characterized in that Expanding the target detection area from three dimensions to two dimensions to obtain a target detection image includes: Performing parameterized expansion processing on the target detection area to obtain two-dimensional points located on a parameterized plane; The two-dimensional points on the parameterized plane are subjected to rasterization processing to obtain the target detection image.
4. The method according to claim 1, characterized in that The step of extracting a neck edge line from the target detection image according to a first curvature value corresponding to a pixel point in the target detection image to obtain an initial neck edge line includes: Acquire an annular image region in the target detection image and an inner edge region in the annular image region, wherein the inner edge region includes an inner edge line of the annular image region; A starting point and an ending point are selected from the pixel points in the inner edge area, wherein, if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value corresponding to the starting point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a maximum value among the first curvature values corresponding to the pixel points in its neighborhood; if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value corresponding to the starting point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood, and the first curvature value corresponding to the ending point is a minimum value among the first curvature values corresponding to the pixel points in its neighborhood; According to the first curvature value corresponding to the pixel points in the annular image area, a first intermediate point is selected from the pixel points in the annular image area to generate a path from the starting point to the ending point, and a second intermediate point is selected to generate a path from the ending point to the starting point, wherein the starting point, the first intermediate point, the second intermediate point and the ending point are all pixel points on the initial cervical margin line.
5. The method according to claim 4, characterized in that The step of selecting a starting point and an ending point from the pixel points in the inner edge area includes: Selecting the starting point from the pixel points in the inner edge area; The end point having the largest distance from the start point is selected from the pixel points in the inner edge area.
6. The method according to claim 4, characterized in that The selecting, according to the first curvature values corresponding to the pixels in the annular image area, a first intermediate point to generate a path from the starting point to the ending point, and selecting a second intermediate point to generate a path from the ending point to the starting point from the pixels in the annular image area comprises: Taking the starting point as the first current point, searching for the first intermediate point with the smallest path weight between the first current point and the pixel points in the neighborhood where the first current point is located, if the first intermediate point found most recently and the end point do not satisfy the first preset condition, updating the first current point to the first intermediate point found most recently, and returning to the step of searching for the first intermediate point with the smallest path weight between the first current point and the pixel points in the neighborhood where the first current point is located, until the first intermediate point found most recently and the end point satisfy the first preset condition; Taking the end point as the second current point, searching for the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located, if the second middle point found most recently and the start point do not satisfy the second preset condition, updating the second current point to the second middle point found most recently, and returning to the step of searching for the second middle point with the smallest path weight between the second current point and the pixel points in the neighborhood where the second current point is located, until the second middle point found most recently and the end point satisfy the second preset condition; Among them, if the neck edge line of the target preparation model is a convex neck edge line, the path weight is inversely correlated with the first curvature value of the pixel point; if the neck edge line of the target preparation model is a concave neck edge line, the path weight is positively correlated with the first curvature value of the pixel point.
7. The method according to claim 4, characterized in that Before mapping the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation body model, the method further includes: If the neck margin line of the target preparation model is a convex neck margin line, for the pixel points in the annular image area, the corresponding first evaluation curvature value and the second curvature value are weighted summed to obtain the corresponding evaluation value; if the neck margin line of the target preparation model is a concave neck margin line, for the pixel points in the annular image area, the corresponding second evaluation curvature value and the second curvature value are weighted summed to obtain the corresponding evaluation value, wherein the first evaluation curvature value is negatively correlated with the first curvature value, the second evaluation curvature value is positively correlated with the first curvature value, and the second curvature value is the curvature value of the pixel point on the initial neck margin line on the initial neck margin line; For a pixel point on the initial neck edge line, determine the minimum value of the evaluation value corresponding to the pixel points in the neighborhood where the pixel point is located, and if the evaluation value corresponding to the pixel point is not equal to the minimum value, replace the pixel point corresponding to the minimum value as the pixel point on the initial neck edge line; Correspondingly, mapping the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation body model includes: The corrected initial neck margin line is mapped back to the target detection area to obtain the neck margin line of the target preparation model.
8. A neck margin line extraction device, characterized in that: include: An acquisition module, used for acquiring a target detection area, wherein the target detection area includes a neck edge line of a target preparation model; An expansion module, used to expand the target detection area from three dimensions to two dimensions to obtain a target detection image; An extraction module, for performing neck margin line extraction on the target detection image to obtain an initial neck margin line according to a first curvature value corresponding to a pixel point in the target detection image, wherein if the neck margin line of the target preparation model is a convex neck margin line, the first curvature value is a maximum curvature value of a three-dimensional point located on the target detection area and corresponding to the pixel point, and if the neck margin line of the target preparation model is a concave neck margin line, the first curvature value is a minimum curvature value of a three-dimensional point located on the target detection area and corresponding to the pixel point; A mapping module is used to map the initial neck margin line back to the target detection area to obtain the neck margin line of the target preparation model.
9. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the neck margin line extraction method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the neck margin line extraction method according to any one of claims 1 to 7.