Method and device for extracting the center of a metal ball in an oral cbct image, computer equipment
Patent Information
- Application Number
- CN202310491304.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-05-04
AI Technical Summary
[0006]1、点选CBCT影像中的金属球,需要按照设计顺序依次点选,容易排错顺序,导致所得球心点集不可用;
[0086] Compared with the prior art, the beneficial effects are as follows: 1) In this application, the variable CT threshold sphere core extraction module traverses the surface reconstruction CT threshold from large to small to ensure that the matching error of the extracted sphere core is minimized before using the surface reconstruction CT threshold at this time to extract the sphere core. This avoids the problem of improper selection of CT value for surface reconstruction. The ROI range of surface reconstruction is narrowed according to the extraction result, which can avoid a large number of bone surfaces being reconstructed and improve the calculation speed.
Smart Images

Figure CN116596986B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method, apparatus, and computer device for extracting the core of a metal sphere from a CBCT image of the oral cavity. Background Technology
[0002] In image-guided dental implant surgery, the tool shown in the image below is used for patient oral image registration. The main body of this tool is made of a polymer material with low contrast on CBCT, and it has several metal balls (high contrast on CBCT) and reflective balls (low contrast on CBCT) that can be detected by an infrared positioning camera. Figure 1 As shown, establish a spatial coordinate system F for the metal sphere. metal With the reflective sphere spatial coordinate system F drf (Coordinate system establishment method, for example: one sphere center is the origin of the coordinate system, the direction of the line connecting the two sphere centers is the x-axis direction, and the cross product of the x-axis direction and the direction vector of the line connecting the other two sphere centers yields the z-axis direction vector), because the relative positional relationship between the metal sphere and the reflective sphere is known in advance (determined by hardware parameters), F drf To F metal Transformation matrix T drfToMetal It is known.
[0003] During the surgery, medical adhesive is used to rigidly fix the tool shown in the image above to the patient's teeth on the non-operating side. The positioning camera establishes its coordinate system F by capturing the position of the reflective sphere. camera To F drf Transformation relation T cameraToDrf .like Figure 2 As shown, an intraoperative CBCT scan of the patient's oral cavity was taken. In this CBCT image (image coordinate system F... image By extracting the core of each metal sphere, F can be obtained. metal To F image Transformation matrix T metalToImage At this point, the registration of the patient's oral CBCT images can be completed, thus obtaining the F... camera To F image Transformation matrix
[0004] T cameraToImage =T cameraToDrf ·T drfToMetal ·T metalToImage In the above process, the step of extracting the metal sphere core from the CBCT image directly determines the success rate, accuracy, and ease of operation of the overall image registration.
[0005] The disadvantages of using existing technology for manually selecting the center of a metal ball in oral CBCT images are as follows:
[0006] 1. When selecting metal spheres in CBCT images, they must be selected in the designed order. It is easy to select them in the wrong order, which will result in the unusable set of sphere center points.
[0007] 2. CBCT has artifacts. The metal sphere appears as an ellipsoid or other irregular shape in CBCT images, making it difficult to accurately select the center of the metal sphere image.
[0008] 3. If there are other metal implants in the patient's oral cavity, CBCT will have more noise, which can easily be mistaken for images of the metal ball used for positioning, interfering with the selection.
[0009] The method described in patent CN115423789A, "A Method and Apparatus for Extracting the Position of a Metal Ball for Localization in CBCT Images," automatically extracts the center of the ball. However, it has the following drawbacks:
[0010] The number of metal balls used for positioning is n (n>3). The algorithm outputs only two cases: 1. All ball centers are successfully extracted; 2. All ball centers cannot be extracted, and the extraction fails. The failure to extract even a few metal balls will prevent subsequent registration from proceeding.
[0011] In some cases, improper selection of CT values for surface reconstruction can cause the extracted sphere center to deviate slightly from the actual center of the metal sphere image. When the CT values for surface reconstruction are updated to a lower value, a large amount of bone surface is reconstructed, severely reducing the processing speed.
[0012] Therefore, it is necessary to provide a novel method, apparatus, and computer equipment for extracting the core of a metal sphere from oral CBCT images to overcome the aforementioned deficiencies. Summary of the Invention
[0013] The purpose of this invention is to provide a method for extracting the center of a metal sphere from oral CBCT images, which avoids the problem of improper selection of CT values for surface reconstruction, avoids the reconstruction of a large amount of bone surface, improves the calculation speed, and increases the success rate of subsequent registration.
[0014] To achieve the above objectives, the present invention provides a method for extracting the center of a metallic sphere from a CBCT image of the oral cavity, characterized by comprising the following steps:
[0015] S1: The variable CT threshold core extraction module extracts the core point set Pset_extracted containing the metal sphere image from the CBCT image and the standard core point set Pset_foundStandard corresponding to the core point set Pset_extracted, and initializes the core point set Pset_extracted to an empty point set Pset_extracted_h.
[0016] Input a CBCT image (image) and a set of sphere centers (Pset_extracted), and the resulting cropped CBCT image (image_cropped) will be displayed.
[0017] S2: Reconstruct the surface of the metal sphere using image_cropped based on the current surface reconstruction CT threshold threshold_tmp to obtain surface data surface_tmp. Add the center point coordinates of each unconnected sub-part in surface data surface_tmp as the center of the metal sphere to the above Pset_extracted_h to obtain the candidate center point set Pset_extracted_g.
[0018] Initially initialize the threshold t for the number of matching points, retrieve the standard ball center point set Pset_standard and the candidate ball center point set Pset_extracted_g for filtering to obtain the ball center point set Pset_selected_g and the standard ball center point set Pset_foundStandard_g corresponding to the ball center point set Pset_selected_g;
[0019] The standard center point set Pset_foundStandard_g and the center point set Pset_selected_g are used to obtain the best sorted point set Pset_extracted_tmp after matching and sorting, and the standard center point set Pset_foundStandard_tmp corresponding to the best sorted point set Pset_extracted_tmp. The best sorted point set Pset_extracted_tmp is then initialized with an empty point set Pset_tmp_e_.
[0020] S3: Retrieve the standard ball center point set Pset_standard, the candidate ball center point set Pset_extracted_g, and the initial matching number threshold t, and filter to obtain Pset_selected_g and Pset_foundStandard_g;
[0021] S4: Generate the feature array Array_standard of Pset_standard and the feature array Array_toSelect of Pset_tmp. Add the t similar points existing in the feature array Array_standard and the feature array Array_toSelect to Pset_foundStandard_g and Pset_selected_g, respectively.
[0022] Iterate through all permutations of Pset_selected_g after adding similar points, continuously changing the order of the internal points. When Pset_selected_g after adding similar points is in each permutation...
[0023] Assign the first 'a' elements of Pset_selected_g after adding similar points to the empty point set Pset_tmp_e_.
[0024] Set Pset_foundStandard_g (after adding similar points) as the target point set, and Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T for the target and source point sets.
[0025] Apply the transformation matrix T to the source point set Pset_tmp_e_ and calculate the distance between each point in the empty point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
[0026] Preferably, in step S11: Initialize the iteration count n = 0, and determine whether the number of points contained in the standard sphere center point set Pset_standard is equal to m; if so, input the CBCT image image and the sphere center point set Pset_extracted into the CBCT ROI cropping module to obtain the cropped CBCT image image_cropped.
[0027] If not, a copy of the CBCT image is made and named image_cropped. Then, the variable CT threshold sphere core extraction module calculates the current surface reconstruction CT threshold threshold_tmp.
[0028] Preferably, step S2 further includes step S12: the CBCT ROI extraction module calculates the axis-aligned bounding box of the sphere center point set Pset_extracted of image_copy, denoted as the center point coordinate of the bounding box as o, and the coordinates of the eight vertices of the bounding box as p1, p2, p3, p4, p5, p6, p7, p8. A new cuboid region is generated using these eight vertex coordinates, with the center point coordinate of the cuboid region as o', and the coordinates of the eight vertices as p1', p2', p3', p4', p5', p6', p7', p8'.
[0029] in,
[0030]
[0031] In addition, a 1 / 4 diagonal length is added to the axis-aligned bounding box; the CBCT ROI cropping module uses the cuboid region to crop the image_copy, and only retains the CBCT image_cropped that falls inside the cuboid region as the output.
[0032] Preferably, step S2 further includes step S21:
[0033] The coarse extraction module obtains surface data surface_tmp. Points in the CBCT image whose voxel CT threshold is greater than the current surface reconstruction CT threshold threshold thres_tmp will fall within surface_tmp. The vtkConnectivityFilter method is used to split and number the unconnected sub-parts in surface_tmp, and an empty point set Pset_extracted_g is initialized and constructed to obtain surface data surface_1, surface_2...surface_n. Iterates through surface_1, surface_2...surface_n:
[0034] The coordinates of the center point of the axis-aligned bounding box are calculated to be o, and the length of the longest side is l;
[0035] If l < 5d, align the point axis with the center point coordinate o of the bounding box and add it to Pset_extracted_g, then output Pset_extracted_g as the candidate sphere center point set.
[0036] Preferably, step S2 further includes step S22: the ball center matching and sorting module obtains the maximum matching error value errorMax_tmp between the ball center point set Pset_extracted_tmp and the corresponding standard ball center point set Pset_foundStandard_tmp, and the average matching error value errorAvg_tmp between the optimal sorted point set Pset_extracted_tmp and the corresponding standard ball center point set Pset_foundStandard_tmp, based on the standard ball center point set Pset_foundStandard_g and the ball center point set Pset_selected_g.
[0037] If the number of points in the optimal sorted point set Pset_extracted_tmp is greater than or equal to the number of points m in Pset_extracted, and the maximum matching error errorMax_tmp ≤ maximum matching error errorMax, and the average matching error errorAvg_tmp ≤ average matching error errorAvg,
[0038] Then, clear the center point set Pset_extracted, assign the contents of the best sorted point set Pset_extracted_tmp to the center point set Pset_extracted, clear the standard center point set Pset_foundStandard, assign the contents of the standard center point set Pset_foundStandard_tmp to the standard center point set Pset_foundStandard, assign the maximum matching error errorMax_tmp to the maximum matching error errorMax, assign the average matching error errorAvg_tmp to the average matching error errorAvg, and assign the current surface reconstruction CT threshold threshold thres_tmp to the surface reconstruction CT threshold threshold thres.
[0039] Next, check if n equals 10. If so, output the sphere center point set Pset_extracted, the standard sphere center point set Pset_foundStandard, the maximum matching error errorMax, the average matching error errorAvg, and the surface reconstruction CT threshold thres.
[0040] Otherwise, increment the value of n by 1, return to step S11 to determine whether the number of points contained in the standard sphere center point set Pset_standard is equal to m, and repeat the above steps.
[0041] S23: Initialize the matching number threshold t to a variable threshold ball center filtering module, and return to the step S11 to copy a set of ball center points to be filtered, Pset_extracted_g, named Pset_tmp;
[0042] S24: If the threshold for the number of matching points t is equal to m-1 or n-1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module ends its operation; otherwise, continue to execute the subsequent step S24.
[0043] S25: Compare the number of points s_d contained in Pset_selected_g with the threshold t for the number of matching points.
[0044] If s_d = 0, reduce the matching threshold t by 1;
[0045] If s_d=t+1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output the ball center point set Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module operation ends.
[0046] If s_d > t + 1, increase the matching number threshold t by 1 and return to step S23.
[0047] Preferably, the threshold value t for the number of matches is compared with 2;
[0048] If the threshold for the number of matches t > 2, copy Pset_extracted_g, name it Pset_tmp, and use the single-threshold sphere filtering module to filter and obtain Pset_selected_g and Pset_foundStandard_g.
[0049] Preferably, step S2 further includes step S26:
[0050] The standard center point set Pset_foundStandard, which is input into the center point matching and sorting module, contains a points, and the center point set Pset_selected_g contains b points, where a ≤ b;
[0051] If the number of points in the standard center point set Pset_foundStandard_g is a = 0, output an empty point set as the sorted center point set Pset_extracted_tmp, and output the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp. If both the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp are 100, the center point matching and sorting module ends; otherwise, proceed to the next step.
[0052] Iterate through all permutations of the sphere center point set Pset_selected_g by continuously changing the order of the internal points. When Pset_selected_g, after adding similar points, is in each permutation...
[0053] Assign the first a elements of Pset_selected_g after adding similar points to the empty point set Pset_tmp_e_;
[0054] Set Pset_foundStandard_g after adding similar points as the target point set, and set Pset_tmp_e_ after assigning elements as the source point set. Calculate the optimal affine transformation matrix T for the target point set and the source point set.
[0055] Apply the transformation matrix T to the source point set Pset_tmp_e_, calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g, and denote the maximum value of these distances as maxError_tmp_e, and the average value of all distances as avgError_tmp_e.
[0056] If the maximum value `maxError_tmp_e` is less than the maximum matching error value `errorMax_tmp`, and the average value `avgError_tmp_e` is less than the average matching error value `errorAvg_tmp`, then assign the value of the maximum value `maxError_tmp_e` to the maximum matching error value `errorMax_tmp`, and the value of the average value `avgError_tmp_e` to the average matching error value `errorAvg_tmp`. Clear the ball center point set `Pset_selected_g`, and assign the contents of the first `a` elements of the current unsorted point set `Pset_selected_g` to the best unsorted point set `Pset_extracted_tmp`.
[0057] If the maximum matching error value errorMax_tmp is less than the set value (0.3), the traversal ends; otherwise, the traversal continues.
[0058] After the traversal is complete, the final unsorted point set Pset_extracted_tmp is the set of center points of the spheres that need to be output after matching and sorting. At this time, the standard center point set Pset_foundStandard_g and the optimal sorted point set Pset_extracted_tmp contain the same number of points. Output the optimal sorted point set Pset_extracted_tmp, the maximum matching error value errorMax_tmp, and the average matching error value errorAvg_tmp.
[0059] Preferably, step S4 further includes,
[0060] S41: Use the feature array generation module to generate the feature array Array_standard of Pset_standard.
[0061]
[0062] And use the feature array generation module to generate the feature array Array_toSelect for Pset_tmp
[0063]
[0064] Iterate through each row of Array_standard from top to bottom.
[0065] For the i-th row of Array_standard, traverse each row of Array_toSelect from top to bottom: If there are t elements a1, a2…at in the i-th row of Array_standard, and there are t elements b1, b2…bt in the j-th row of Array_toSelect, then the following condition is met:
[0066]
[0067] Then, the i-th point in Pset_standard and the j-th point in Pset_tmp are called similar points, and the i-th point in Pset_standard is added to Pset_foundStandard_g, and the j-th point in Pset_toSelect is added to Pset_selected_g.
[0068] After adding similar points, reorganize Pset_selected_g and remove duplicate points.
[0069] After adding similar points, reorganize Pset_foundStandard_g and remove duplicate points.
[0070] Compare the number of points contained in Pset_selected_g and Pset_tmp after adding similar points:
[0071] If the number of points in Pset_selected_g after adding similar points is less than the number of points in Pset_tmp, then clear the points in Pset_tmp, assign the contents of Pset_selected_g after adding similar points to Pset_tmp, and return to step S3.
[0072] If the number of points in Pset_selected_g after adding similar points is equal to the number of points in Pset_tmp, output Pset_selected_g as the final set of center points obtained by filtering, and output Pset_foundStandard_g as the standard set of center points corresponding to the final Pset_selected_g.
[0073] A device for extracting the core of a metal sphere from oral CBCT images, comprising:
[0074] The variable CT threshold sphere core extraction module extracts the sphere core set Pset_extracted containing the metallic sphere image from CBCT images, as well as the corresponding standard sphere core set Pset_foundStandard. It then initializes the sphere core set Pset_extracted to an empty set Pset_extracted_h.
[0075] The CBCT ROI cropping module takes the CBCT image (image) and the sphere center point set (Pset_extracted) as inputs, and obtains the cropped CBCT image (image_cropped).
[0076] The single CT threshold sphere center fine extraction module uses the sphere center coarse extraction module in the CT threshold sphere center fine extraction module to reconstruct the surface data surface_tmp of the metal sphere based on the current surface reconstruction CT threshold threshold_tmp. The center point coordinates of each unconnected sub-part of the surface data surface_tmp are added to the above Pset_extracted_h as the sphere center to obtain the candidate sphere center point set Pset_extracted_g.
[0077] The variable threshold ball center filtering module initializes the matching number threshold t, and uses the variable threshold ball center filtering module to retrieve the standard ball center point set Pset_standard and the candidate ball center point set Pset_extracted_g for filtering to obtain the ball center point set Pset_selected_g and the standard ball center point set Pset_foundStandard_g corresponding to the ball center point set Pset_selected_g.
[0078] The ball center matching and sorting module uses the standard ball center point set Pset_foundStandard_g and the ball center point set Pset_selected_g to obtain the best sorted point set Pset_extracted_tmp after matching and sorting, and the standard ball center point set Pset_foundStandard_tmp corresponding to the best sorted point set Pset_extracted_tmp.
[0079] The single-threshold ball center filtering module retrieves the standard ball center point set Pset_standard, the candidate ball center point set Pset_extracted_g, and the matching number threshold t, and filters to obtain Pset_selected_g and Pset_foundStandard_g corresponding to Pset_selected_g.
[0080] The feature array generation module generates the feature array Array_standard for Pset_standard and the feature array Array_toSelect for Pset_tmp. The t similar points from the feature arrays Array_standard and Array_toSelect are then added to Pset_foundStandard_g and Pset_selected_g, respectively.
[0081] The process iterates through all permutations of Pset_selected_g after adding similar points, continuously changing the order of the internal points. When Pset_selected_g with added similar points is in each permutation...
[0082] Initialize an empty point set Pset_tmp_e_, and assign the first 'a' elements of Pset_selected_g (after adding similar points) to the empty point set Pset_tmp_e_.
[0083] Set Pset_foundStandard_g (after adding similar points) as the target point set, and Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T for the target and source point sets.
[0084] The transformation matrix T is applied to the source point set Pset_tmp_e_ to calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
[0085] A computer device includes a memory and a processor, the memory storing a computer program that, when executed on the processor, performs the method for extracting the core of a metal sphere from a CBCT image of the oral cavity.
[0086] Compared with the prior art, the beneficial effects are as follows: 1) In this application, the variable CT threshold sphere core extraction module traverses the surface reconstruction CT threshold from large to small to ensure that the matching error of the extracted sphere core is minimized before using the surface reconstruction CT threshold at this time to extract the sphere core. This avoids the problem of improper selection of CT value for surface reconstruction. The ROI range of surface reconstruction is narrowed according to the extraction result, which can avoid a large number of bone surfaces being reconstructed and improve the calculation speed.
[0087] 2) This application can confirm the corresponding point found in the standard sphere center point set when it is impossible to extract all the metal sphere centers, thereby greatly improving the success rate of subsequent registration. Attached Figure Description
[0088] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0089] Figure 1 The flowchart illustrates the method for extracting the core of a metal sphere from a CBCT image of the oral cavity, as provided by this invention.
[0090] Figure 2 This is a schematic diagram of the axis-aligned bounding box constructed in an embodiment of the present invention.
[0091] Figure 3 This is a schematic diagram of a surface reconstruction based on a CT threshold, provided by an embodiment of the present invention.
[0092] Figure 4 A schematic diagram of establishing a reflective sphere spatial coordinate system for CBCT image registration.
[0093] Figure 5 This diagram illustrates the establishment of a reflective sphere spatial coordinate system for CBCT image registration using the method for extracting the center of a metal sphere in an oral CBCT image according to an embodiment of the present invention. Detailed Implementation
[0094] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described in this specification are merely for explaining the invention and are not intended to limit the invention.
[0095] Please see Figures 1 to 3 This invention provides a method for extracting the core of a metal sphere from a CBCT image of the oral cavity, comprising the following steps:
[0096] S1: Input the CBCT image of the metal sphere (image), the standard center point set Pset_standard of the CBCT image (the number of points in the standard center point set Pset_Standard is denoted as m), and the diameter d of the metal sphere to the variable CT threshold center point extraction module. The variable CT threshold center point extraction module extracts the center point set Pset_extracted containing the metal sphere image from the CBCT image and the standard center point set Pset_foundStandard corresponding to the center point set Pset_extracted. It also initializes the center point set Pset_extracted to an empty point set Pset_extracted_h (the number of points in the center point set Pset_extracted is the same as the number of points in the standard center point set Pset_foundStandard).
[0097] S11: The variable CT threshold sphere core extraction module calculates the maximum matching error errorMax between the standard sphere core set Pset_standard and the sphere core set Pset_extracted, and initializes the maximum error errorMax to 100. The variable CT threshold sphere core extraction module calculates the average matching error errorAvg between the standard sphere core set Pset_standard and the sphere core set Pset_extracted, and initializes the average error to 100.
[0098] Initialize the number of iterations n = 0.
[0099] Determine if the number of points contained in the standard sphere center set Pset_standard is equal to m; if so, input the CBCT image image and the sphere center set Pset_extracted into the CBCT ROI cropping module to obtain the cropped CBCT image image_cropped.
[0100] If not, a copy of the CBCT image is made and named image_cropped. Then, the variable CT threshold sphere core extraction module calculates the current surface reconstruction CT threshold threshold_tmp. The formula for the current surface reconstruction CT threshold threshold_tmp is: threshold_tmp = 15000 - n × (15000 - 1500) / 10.
[0101] It should be noted that the CT value of metal in CBCT images is generally above 10,000, while the CT value of bone cortex is around 1,500. Therefore, the above steps limit the current surface reconstruction CT threshold thres_tmp to the range of 1,500 to 15,000. This can reconstruct the surface of the metal sphere as completely as possible while eliminating the interference caused by the reconstruction of a large amount of bone surface in subsequent calculations.
[0102] Specifically, in step S12: the CBCT ROI extraction module copies a CBCT image and names it image_copyed.
[0103] The CBCT ROI extraction module calculates the axis-aligned bounding box of the sphere center point set Pset_extracted of image_copy. The center point coordinates of the bounding box are denoted as o, and the coordinates of its eight vertices are p1, p2, p3, p4, p5, p6, p7, and p8. A new cuboid region is generated using these eight vertex coordinates. The center point coordinates of this cuboid region are denoted as o', and the coordinates of its eight vertices are p1', p2', p3', p4', p5', p6', p7', and p8'.
[0104] in,
[0105]
[0106] That is, the new cuboid region has the same center as the axis-aligned bounding box of the point set, and 1 / 4 of the diagonal length is added to the axis-aligned bounding box (the purpose is to enable the cuboid region to completely contain the metal sphere image).
[0107] The CBCT ROI cropping module uses the cuboid region to crop the image_copy, retaining only the CBCT image_cropped that falls within the cuboid region as the output.
[0108] S2: Input image_cropped, standard sphere center point set Pset_standard, current surface reconstruction CT threshold threshold_tmp, and metal sphere diameter d into the single CT threshold sphere center fine extraction module. Use the sphere center coarse extraction module in the single CT threshold sphere center fine extraction module to reconstruct the surface of the metal sphere according to the current surface reconstruction CT threshold threshold_tmp to obtain surface data surface_tmp. Add the center point coordinates of each unconnected sub-part in the surface data surface_tmp as the sphere center to the above Pset_extracted_h to obtain the candidate sphere center point set Pset_extracted_g.
[0109] The standard center point set Pset_standard and the center point set Pset_extracted are input into the variable threshold center point filtering module in the single CT threshold center point extraction module. The matching number threshold t is initialized (t is 2). The variable threshold center point filtering module is used to retrieve the standard center point set Pset_standard and the candidate center point set Pset_extracted_g. The standard center point set Pset_standard contains m points, and the candidate center point set Pset_extracted_g contains n points, n≥3. The filtering is performed to obtain the center point set Pset_selected_g and the standard center point set Pset_foundStandard_g corresponding to the center point set Pset_selected_g.
[0110] Then, input the standard center point set Pset_foundStandard_g and the center point set Pset_selected_g into the center point matching and sorting module in the single CT threshold center point extraction module. The center point matching and sorting module uses the standard center point set Pset_foundStandard and the center point set Pset_selected_g to obtain the best sorted point set Pset_extracted_tmp after matching and sorting.
[0111] Furthermore, the specific working process of the coarse extraction module for the sphere core is as follows: Step S2 further includes step S21:
[0112] The vtkMarchingCubes method is used to input the CBCT image (image), the diameter d of the metal sphere, and the current surface reconstruction CT threshold (thres_tmp) into the sphere coarse extraction module to obtain surface data (surface_tmp). Points in the CBCT image whose voxel CT threshold is greater than the current surface reconstruction CT threshold (thres_tmp) will fall within surface_tmp. The vtkConnectivityFilter method is used to split and number the unconnected sub-parts in surface_tmp, and an empty point set Pset_extracted_g is initialized to obtain surface data surface_1, surface_2…surface_n. The process of traversing surface_1, surface_2…surface_n is then performed.
[0113] The axis-aligned bounding box is calculated.
[0114] Specifically, the surface data `surface_tmp` is actually a spatial polygon formed by connecting multiple vertices. For a given surface data `surface_i`, the coordinate values of each vertex in `surface_tmp` are traversed, and the maximum x-axis coordinate is `x_max`, the minimum x-axis coordinate is `x_min`, the maximum y-axis coordinate is `y_max`, the minimum y-axis coordinate is `y_min`, the maximum z-axis coordinate is `z_max`, and the minimum z-axis coordinate is `z_min`. The closed spatial shape formed by the eight vertices (x_max, y_max, z_max), (x_min, y_max, z_max), (x_max, y_min, z_max), (x_max, y_max, z_min), (x_min, y_min, z_max), (x_min, y_max, z_min), (x_min, y_min, z_min), (x_max, y_min, z_min), (x_min, y_min, z_min) is the axis-aligned bounding box. Figure 4 As shown;
[0115] The coordinates of the center point of the bounding box aligned with the axis are o, and the length of the longest side is l;
[0116] If l < 5d (this can be adjusted according to actual needs; if the image caused by the metal sphere artifact is relatively small, it can be set to "s < 2d" or "s < 3d", etc.), align the point axis with the bounding box center point coordinate o and add it to Pset_extracted_g (because the metal sphere has a high CT threshold artifact in the CBCT image, the artifact will be slightly larger than the actual volume of the metal sphere, so the screening requirements are appropriately relaxed, and surface data with a size significantly larger than the metal sphere are excluded); output Pset_extracted_g as the candidate sphere center point set.
[0117] That is, such as Figure 3 As shown, the coarse extraction module first reconstructs the surface based on the current surface reconstruction CT threshold thres_tmp, and then splits and numbers the unconnected sub-parts of the reconstructed surface (splitting them into several different data). Among the split surface data, some are the surfaces of metal spheres, some are bone surfaces, and some are surfaces with other noise such as metal implants. Therefore, these surfaces are initially screened based on the bounding box size, and then the center of the bounding box of the screened surface is used as the center of the candidate metal sphere for further screening by subsequent modules.
[0118] S22: The sphere center matching and sorting module in the single CT threshold sphere center fine extraction module obtains the maximum matching error value errorMax_tmp between the sphere center point set Pset_extracted_tmp and the corresponding standard sphere center point set Pset_foundStandard_tmp, and the average matching error value errorAvg_tmp between the optimal sorted point set Pset_extracted_tmp and the corresponding standard sphere center point set Pset_foundStandard_tmp, based on the standard sphere center point set Pset_foundStandard_g and the sphere center point set Pset_selected_g. The maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp are initialized to 100.
[0119] If the number of points in the optimal sorted point set Pset_extracted_tmp is greater than or equal to the number of points m in Pset_extracted, and the maximum matching error errorMax_tmp ≤ maximum matching error errorMax, and the average matching error errorAvg_tmp ≤ average matching error errorAvg,
[0120] Then, clear the center point set Pset_extracted, assign the contents of the best sorted point set Pset_extracted_tmp to the center point set Pset_extracted, clear the standard center point set Pset_foundStandard, assign the contents of the standard center point set Pset_foundStandard_tmp to the standard center point set Pset_foundStandard, assign the maximum matching error errorMax_tmp to the maximum matching error errorMax, assign the average matching error errorAvg_tmp to the average matching error errorAvg, and assign the current surface reconstruction CT threshold threshold thres_tmp to the surface reconstruction CT threshold threshold thres.
[0121] Next, determine if n equals 10 (the value of n can be adjusted according to actual needs). If it does, output the sphere center point set Pset_extracted, the standard sphere center point set Pset_foundStandard, the maximum matching error errorMax, the average matching error errorAvg, and the surface reconstruction CT threshold threshold. At this point, the variable CT threshold sphere center extraction module finishes its operation.
[0122] Otherwise, increment the value of n by 1 and return to step S11 to determine whether the number of points contained in the standard sphere center point set Pset_standard is equal to m. Repeat the above steps to achieve fine extraction of the metal sphere center.
[0123] S23: Initialize the matching number threshold t to a variable threshold ball center filtering module, and copy a set of ball center points to be filtered, Pset_extracted_g, as described in step S11, and name it Pset_tmp;
[0124] S24: If the threshold for the number of matching points t is equal to m-1 or n-1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module ends its operation; otherwise, continue to execute the subsequent step S24.
[0125] S25: Compare the number of points s_d contained in Pset_selected_g with the threshold t for the number of matching points:
[0126] If s_d=t+1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output the ball center point set Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module operation ends.
[0127] If s_d > t + 1, increase the matching number threshold t by 1 and return to step S23.
[0128] Furthermore, the working process of the ball center matching and sorting module is as follows: Step S2 further includes step S26:
[0129] The standard center point set Pset_foundStandard_g input into the center point matching and sorting module contains a points, and the center point set Pset_selected_g contains b points, where a≤b;
[0130] Initialize both the maximum matching error (maxError) and the average matching error (avgError) to 100.
[0131] If the number of points in the standard center point set Pset_foundStandard_g is a = 0, output an empty point set as the sorted center point set Pset_extracted_tmp, and output the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp. If both the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp are 100, the center point matching and sorting module ends; otherwise, proceed to the next step.
[0132] Iterate through all permutations of the empty point set Pset_selected_g after adding similar points, changing the internal point arrangement order. For each permutation, Pset_selected_g after adding similar points is:
[0133] Initialize an empty point set Pset_tmp_e_, and assign the first a elements of Pset_selected_g after adding similar points to the empty point set Pset_tmp_e_.
[0134] Using the rigidBody mode of the vtkLandmarkTransform method, the empty point set Pset_foundStandard_g after adding similar points is set as the target point set, and the element-assigned Pset_tmp_e_ is set as the source point set. The optimal affine transformation matrix T between the target point set and the source point set is calculated.
[0135] Apply the transformation matrix T to the source point set Pset_tmp_e_, calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g, and denote the maximum value of these distances as maxError_tmp_e, and the average value of all distances as avgError_tmp_e.
[0136] If the maximum value `maxError_tmp_e` is less than the maximum matching error value `errorMax_tmp`, and the average value `avgError_tmp_e` is less than the average matching error value `errorAvg_tmp`, then assign the value of the maximum value `maxError_tmp_e` to the maximum matching error value `errorMax_tmp`, and the value of the average value `avgError_tmp_e` to the average matching error value `errorAvg_tmp`. Clear the ball center point set `Pset_selected_g`, and assign the contents of the first `a` elements of the current unsorted point set `Pset_selected_g` to the best unsorted point set `Pset_extracted_tmp`.
[0137] If the maximum matching error value errorMax_tmp is less than the set value (0.3), the traversal ends; otherwise, the traversal continues.
[0138] After the traversal is complete, the final unsorted point set Pset_extracted_tmp is the set of center points of the spheres that need to be output after matching and sorting. At this time, the standard center point set Pset_foundStandard_g and the optimal sorted point set Pset_extracted_tmp contain the same number of points. Output the optimal sorted point set Pset_extracted_tmp, the maximum matching error value errorMax_tmp, and the average matching error value errorAvg_tmp.
[0139] S3: The single-threshold center point filtering module retrieves the standard center point set Pset_standard and the candidate center point set Pset_extracted_g or Pset_tmp, and reinitializes the matching number threshold t. It then filters out the empty point set Pset_selected_g of the candidate center point set Pset_extracted_g and the standard center point set Pset_foundStandard_g corresponding to the empty point set Pset_selected_g as the empty point set. If s_d = 0, the matching number threshold t is reduced by 1.
[0140] Compare the number of matches threshold t with 2;
[0141] If the number of matching points threshold t > 2, copy Pset_extracted_g and name it Pset_tmp. Use the single-threshold sphere center filtering module to filter and obtain Pset_selected_g corresponding to the sphere center point set Pset_extracted_g and Pset_foundStandard_g corresponding to the empty point set Pset_selectedg. The variable-threshold sphere center filtering module operation ends.
[0142] S4: Use the feature array generation module to generate the feature array Array_standard of Pset_standard and the feature array Array_toSelect of Pset_tmp. Add the t similar points existing in the feature array Array_standard and the feature array Array_toSelect to Pset_foundStandard_g and Pset_selected_g respectively.
[0143] The process iterates through all permutations of Pset_selected_g after adding similar points, continuously changing the order of the internal points. When Pset_selected_g with added similar points is in each permutation...
[0144] Assign the first 'a' elements of Pset_selected_g after adding similar points to the empty point set Pset_tmp_e_.
[0145] Set Pset_foundStandard_g (after adding similar points) as the target point set, and Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T for the target and source point sets.
[0146] The transformation matrix T is applied to the source point set Pset_tmp_e_ to calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
[0147] Specifically, S41: Use the feature array generation module to generate the feature array Array_standard of Pset_standard.
[0148]
[0149] And use the feature array generation module to generate the feature array Array_toSelect for Pset_tmp
[0150]
[0151] Iterate through each row of Array_standard from top to bottom.
[0152] For the i-th row of Array_standard, iterate through each row of Array_toSelect from top to bottom: if the i-th row of Array_standard contains t elements a1, a2…a… t The j-th row of Array_toSelect contains t elements b1, b2...b t ,satisfy:
[0153]
[0154] Then, the i-th point in Pset_standard and the j-th point in Pset_tmp are called similar points, and the i-th point in Pset_standard is added to Pset_foundStandard_g, and the j-th point in Pset_toSelect is added to Pset_selected_g.
[0155] After adding similar points, reorganize Pset_selected_g and remove duplicate points (keeping only one duplicate point).
[0156] After adding similar points, reorganize Pset_foundStandard_g and remove duplicate points (only one duplicate point is kept).
[0157] Compare the number of points contained in Pset_selected_g and Pset_tmp after adding similar points:
[0158] If the number of points in Pset_selected_g after adding similar points is less than the number of points in Pset_tmp, then clear the points in Pset_tmp, assign the contents of Pset_selected_g after adding similar points to Pset_tmp, and return to step S3 (initialize the selected sphere center point set Pset_selected_g as an empty point set).
[0159] If the number of points in Pset_selected_g after adding similar points is equal to the number of points in Pset_tmp, output Pset_selected_g as the final filtered center point set, and output Pset_foundStandard_g as the standard center point set corresponding to the final filtered center point set Pset_selected_g.
[0160] In this application, the variable CT threshold sphere core extraction module traverses the surface reconstruction CT thresholds from largest to smallest to ensure that the matching error of the extracted sphere core is minimized. Only when this ensures that the matching error of the extracted sphere core is minimized will the current surface reconstruction CT threshold hres_tmp be used to output the extracted sphere core. This avoids the problem of improper selection of CT values for surface reconstruction. Based on the extraction results, the ROI range of surface reconstruction is narrowed, which can avoid a large number of bone surfaces being reconstructed and improve the calculation speed.
[0161] The present invention also provides an apparatus for image registration and extraction of the center of a metal sphere in oral CBCT images, comprising:
[0162] The variable CT threshold sphere core extraction module extracts the sphere core set Pset_extracted containing the metallic sphere image from CBCT images, as well as the corresponding standard sphere core set Pset_foundStandard. It then initializes the sphere core set Pset_extracted to an empty set Pset_extracted_h.
[0163] The CBCT ROI cropping module takes the CBCT image (image) and the sphere center point set (Pset_extracted) as inputs, and obtains the cropped CBCT image (image_cropped).
[0164] The single CT threshold sphere center fine extraction module uses the sphere center coarse extraction module in the CT threshold sphere center fine extraction module to reconstruct the surface data surface_tmp of the metal sphere based on the current surface reconstruction CT threshold threshold_tm of image_cropped. The center point coordinates of each unconnected sub-part of the surface data surface_tmp are added to the above Pset_extracted_h as the sphere center to obtain the candidate sphere center point set Pset_extracted_g.
[0165] The variable threshold ball center filtering module initializes the matching number threshold t, and uses the variable threshold ball center filtering module to retrieve the standard ball center point set Pset_standard and the candidate ball center point set Pset_extracted_g for filtering to obtain the ball center point set Pset_selected_g and the standard ball center point set Pset_foundStandard_g corresponding to the ball center point set Pset_selected_g.
[0166] The ball center matching and sorting module uses the standard ball center point set Pset_foundStandard_g and the ball center point set Pset_selected_g to obtain the best sorted point set Pset_extracted_tmp after matching and sorting, and the standard ball center point set Pset_foundStandard_tmp corresponding to the best sorted point set Pset_extracted_tmp.
[0167] The single-threshold ball center filtering module retrieves the standard ball center point set Pset_standard, the candidate ball center point set Pset_extracted_g, and the matching number threshold t, and filters to obtain Pset_selected_g and Pset_foundStandard_g corresponding to Pset_selected_g.
[0168] The feature array generation module generates the feature array Array_standard for Pset_standard and the feature array Array_toSelect for Pset_tmp. The t similar points from the feature arrays Array_standard and Array_toSelect are then added to Pset_foundStandard_g and Pset_selected_g, respectively.
[0169] The process iterates through all permutations of Pset_selected_g after adding similar points, continuously changing the order of the internal points. When Pset_selected_g with added similar points is in each permutation...
[0170] Initialize an empty point set Pset_tmp_e_, and assign the first 'a' elements of the empty point set Pset_selected_g (after adding similar points) to the empty point set Pset_tmp_e_.
[0171] Set Pset_foundStandard_g (after adding similar points) as the target point set, and Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T for the target and source point sets.
[0172] The transformation matrix T is applied to the source point set Pset_tmp_e_ to calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
[0173] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed on the processor, performs the method for extracting the core of a metal sphere from a CBCT image of the oral cavity.
[0174] The present invention also provides a computer-readable storage medium storing a computer program, which, when run on a processor, executes the method for extracting the core of a metal sphere from a CBCT image of the oral cavity.
[0175] It should be noted that the method of extracting the center of the oral CBCT metal sphere for image registration in this invention is applied to CBCT image registration:
[0176] like Figure 4 As shown, a spatial coordinate system F for the reflective sphere is established in the hardware design drawings. drf (Coordinate system establishment method, for example: the center of one reflective sphere is the origin of the coordinate system, the direction of the line connecting the two centers is the x-axis direction, and the cross product of the x-axis direction with the direction vector of the line connecting the other two centers yields the z-axis direction vector), obtain the coordinate system at F drf The ordered set of points formed by the centers of the metal spheres is denoted as Pset_standard;
[0177] like Figure 5 As shown, CBCT images and Pset_standard are used as input to the variable CT threshold sphere center extraction module to obtain the sphere center point set Pset_extracted extracted from the CBCT images (e.g., ...). Figure 5As shown), and the standard set of sphere centers Pset_foundStandard corresponding to the extracted sphere center set Pset_extracted. (If the number of points contained in Pset_extracted and Pset_foundStandard is not 0, it must be greater than or equal to 3, and a spatial coordinate system can definitely be established).
[0178] Using the rigidBody mode of the vtkLandmarkTransform method, the standard sphere center point set Pset_foundStandard is set as the target point set, and the sphere center point set Pset_extracted is set as the source point set. The optimal affine transformation matrix T is then calculated, where T is F. drf Transformation matrix to CBCT image coordinate system;
[0179] The positioning camera establishes its coordinate system F by capturing the position of the reflector sphere. camera To F drf Transformation relation T cameraToDrf ,
[0180] Further obtain F camera To F image Transformation matrix T cameraToImage =T cameraToDrf ·T metalToImage At this point, the registration of the patient's oral CBCT images is complete.
[0181] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0182] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0183] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion 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 smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0184] The present invention is not limited to the description in the specification and embodiments, and thus other advantages and modifications can be readily realized by those skilled in the art. Therefore, the present invention is not limited to the specific details, representative devices and examples shown and described herein without departing from the spirit and scope of the general concept as defined by the claims and their equivalents.
Claims
1. A method for extracting the center of a metal sphere from a CBCT image of the oral cavity, characterized in that, Includes the following steps: S1: Extract the center point set Pset_extracted containing the metal sphere image from the CBCT image and the standard center point set Pset_foundStandard corresponding to the center point set Pset_extracted, and initialize the center point set Pset_extracted to an empty point set Pset_extracted_h. Input the CBCT image "image" and the sphere center point set "Pset_extracted", and the cropped CBCT image will be "image_cropped". Step S1 further includes step S11: Initialize the iteration count n=0, and determine whether the number of points contained in the standard sphere center point set Pset_standard is equal to m; if so, input the CBCT image image and the sphere center point set Pset_extracted into the CBCT ROI cropping module to obtain the cropped CBCT image image_cropped. If not, a copy of the CBCT image is made and named image_cropped. Then, the variable CT threshold sphere core extraction module calculates the current surface reconstruction CT threshold. thres_tmp ; S2: Reconstruct the CT threshold for image_cropped based on the current surface. thres_tmp The surface data surface_tmp is obtained by reconstructing the surface of the metal sphere. The coordinates of the center points of each unconnected sub-part of the surface data surface_tmp are added to the above Pset_extracted_h as the center of the metal sphere to obtain the candidate center point set Pset_extracted_g. Initially, the threshold for the number of matches is t, which is 2. The standard center point set Pset_standard and the candidate center point set Pset_extracted_g are retrieved and filtered to obtain the center point set Pset_selected_g and the standard center point set Pset_foundStandard_g corresponding to the center point set Pset_selected_g. Based on the standard center point set Pset_foundStandard_g and the center point set Pset_selected_g, we obtain the best sorted point set Pset_extracted_tmp after matching and sorting, and the standard center point set Pset_foundStandard_tmp corresponding to the best sorted point set Pset_extracted_tmp. S3: Retrieve the standard ball center point set Pset_standard, the candidate ball center point set Pset_extracted_g, and the initial matching number threshold t, and filter to obtain Pset_selected_g and Pset_foundStandard_g; S4: Generate the feature array Array_standard of Pset_standard and the feature array Array_toSelect of -Pset_tmp. Add the t similar points existing in the feature array Array_standard and the feature array Array_toSelect to Pset_foundStandard_g and Pset_selected_g, respectively. Assign the first 'a' elements of Pset_selected_g (after adding similar points) to the empty point set Pset_tmp_e_, set Pset_foundStandard_g (after adding similar points) as the target point set, and set Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T between the target and source point sets. The transformation matrix T is applied to the source point set Pset_tmp_e_ to calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
2. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 1, characterized in that: Step S1 further includes step S12: The CBCT ROI extraction module calculates the axis-aligned bounding box of the sphere center point set Pset_extracted of image_copy. Let the center point coordinate of the bounding box be o, and the coordinates of its eight vertices be p1, p2, p3, p4, p5, p6, p7, and p8. Using these eight vertex coordinates, a new cuboid region is generated. The center point coordinate of this cuboid region is o', and the coordinates of its eight vertices are p1', p2', p3', p4', p5', p6', p7', and p8'. in, ; In addition, a 1 / 4 diagonal length is added to the axis-aligned bounding box; the CBCT ROI cropping module uses the cuboid region to crop the image_copy, and only retains the CBCT image_cropped that falls inside the cuboid region as the output.
3. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 2, characterized in that: Step S2 further includes step S21: The obtained surface data (surface_tmp) and the CT threshold of each voxel in the CBCT image (image) are greater than the current surface reconstruction CT threshold. thres_tmp All points with values fall within surface_tmp. The unconnected sub-parts of surface_tmp are split and numbered, and an empty point set Pset_extracted_g is initialized to obtain surface data surface_1, surface_2…surface_n. The following steps are taken to traverse surface_1, surface_2…surface_n: The coordinates of the center point of the axis-aligned bounding box are calculated as o, and the length of the longest side is l; If l < 5d, add the coordinates o of the center point of the axis-aligned bounding box to Pset_extracted_g, and output Pset_extracted_g as the candidate sphere center point set.
4. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 3, characterized in that: Step S2 further includes step S22: obtaining the maximum matching error value errorMax_tmp between the center point set Pset_extracted_tmp and the corresponding standard center point set Pset_foundStandard_tmp, and the average matching error value errorAvg_tmp between the optimal sorted point set Pset_extracted_tmp and the corresponding standard center point set Pset_foundStandard_tmp, based on the standard center point set Pset_foundStandard_g and the center point set Pset_selected_g; If the number of points in the optimal sorted point set Pset_extracted_tmp is greater than or equal to the number of points m in Pset_extracted, and the maximum matching error errorMax_tmp ≤ maximum matching error errorMax, and the average matching error errorAvg_tmp ≤ average matching error errorAvg, Then, clear the center point set Pset_extracted, assign the contents of the best sorted point set Pset_extracted_tmp to the center point set Pset_extracted, clear the standard center point set Pset_foundStandard, assign the contents of the standard center point set Pset_foundStandard_tmp to the standard center point set Pset_foundStandard, assign the maximum matching error errorMax_tmp to the maximum matching error errorMax, assign the average matching error errorAvg_tmp to the average matching error errorAvg, and set the current surface reconstruction CT threshold. thres_tmp Assign a value to the CT threshold for surface reconstruction thres , Next, check if n equals 10. If so, output the sphere center point set Pset_extracted, the standard sphere center point set Pset_foundStandard, the maximum matching error errorMax, the average matching error errorAvg, and the surface reconstruction CT threshold. thres , Otherwise, increment the value of n by 1, return to step S11 to determine whether the number of points contained in the standard sphere center point set Pset_standard is equal to m, and repeat the above steps; S23: Initialize the matching number threshold t to a variable threshold ball center filtering module, and return to the step S11 to copy a set of ball center points to be filtered, Pset_extracted_g, named Pset_tmp; S24: If the threshold for the number of matching points t is equal to m-1 or n-1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module ends its operation; otherwise, continue to execute the subsequent step S24. S25: Compare the number of points s_d contained in Pset_selected_g with the threshold t for the number of matching points. If s_d = 0, reduce the matching number threshold t by 1; If s_d = t+1, output the ball center point set Pset_selected_g as the final filtered ball center point set, and output the ball center point set Pset_foundStandard_g as the final standard ball center point set corresponding to the filtered ball center point set Pset_selected_g. The variable threshold ball center filtering module operation ends. If s_d > t+1, increase the matching number threshold t by 1 and return to step S23.
5. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 4, characterized in that: Compare the number of matches threshold t with 2; If the number of matches threshold t > 2, copy Pset_extracted_g, name it Pset_tmp, and use the single threshold sphere filtering module to filter and obtain Pset_selected_g and Pset_foundStandard_g.
6. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 5, characterized in that: Step S2 further includes step S26: The standard center point set Pset_foundStandard, which is input into the center point matching and sorting module, contains a points, and the center point set Pset_selected_g contains b points, where a ≤ b; If the number of points in the standard center point set Pset_foundStandard_g is a = 0, output an empty point set as the sorted center point set Pset_extracted_tmp, and output the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp. If both the maximum matching error value errorMax_tmp and the average matching error value errorAvg_tmp are 100, the center point matching and sorting module ends; otherwise, proceed to the next step. Iterate through all permutations of the sphere center point set Pset_selected_g by continuously changing the order of the internal points. When Pset_selected_g, after adding similar points, is in each permutation... Assign the first a elements of Pset_selected_g after adding similar points to the empty point set Pset_tmp_e_; Set Pset_foundStandard_g after adding similar points as the target point set, and set Pset_tmp_e_ after assigning elements as the source point set. Calculate the optimal affine transformation matrix T for the target point set and the source point set. Apply the transformation matrix T to the source point set Pset_tmp_e_, calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g, and denote the maximum value of these distances as maxError_tmp_e, and the average value of all distances as avgError_tmp_e. If the maximum value `maxError_tmp_e` is less than the maximum matching error value `errorMax_tmp`, and the average value `avgError_tmp_e` is less than the average matching error value `errorAvg_tmp`, then assign the value of the maximum value `maxError_tmp_e` to the maximum matching error value `errorMax_tmp`, and the value of the average value `avgError_tmp_e` to the average matching error value `errorAvg_tmp`. Clear the ball center point set `Pset_selected_g`, and assign the contents of the first `a` elements of the current unsorted point set `Pset_selected_g` to the best unsorted point set `Pset_extracted_tmp`. If the maximum matching error value errorMax_tmp is less than the set value, the iteration ends; otherwise, the iteration continues. After the traversal is complete, the final unsorted point set Pset_extracted_tmp is the set of center points of the spheres that need to be output after matching and sorting. At this time, the standard center point set Pset_foundStandard_g and the optimal sorted point set Pset_extracted_tmp contain the same number of points. Output the optimal sorted point set Pset_extracted_tmp, the maximum matching error value errorMax_tmp, and the average matching error value errorAvg_tmp.
7. The method for extracting the center of a metallic sphere from an oral CBCT image as described in claim 1, characterized in that: Step S4 also includes, S41: Use the feature array generation module to generate the feature array Array_standard of Pset_standard. ; And use the feature array generation module to generate the feature array Array_toSelect for Pset_tmp , Iterate through each row of Array_standard from top to bottom. For the i-th row of Array_standard, traverse each row of Array_toSelect from top to bottom: If there are t elements a1, a2…at in the i-th row of Array_standard, and there are t elements b1, b2…bt in the j-th row of Array_toSelect, then the following condition is met: , Then, the i-th point in Pset_standard and the j-th point in Pset_tmp are called similar points, and the i-th point in Pset_standard is added to Pset_foundStandard_g, and the j-th point in Pset_tmp is added to Pset_selected_g. After adding similar points, reorganize Pset_selected_g and remove duplicate points. After adding similar points, reorganize Pset_foundStandard_g and remove duplicate points. Compare the number of points contained in Pset_selected_g and Pset_tmp after adding similar points: If the number of points in Pset_selected_g after adding similar points is less than the number of points in Pset_tmp, then clear the points in Pset_tmp, assign the contents of Pset_selected_g after adding similar points to Pset_tmp, and return to step S3. If the number of points in Pset_selected_g after adding similar points is equal to the number of points in Pset_tmp, output Pset_selected_g as the final set of center points obtained by filtering, and output Pset_foundStandard_g as the standard set of center points corresponding to the final Pset_selected_g.
8. An apparatus for extracting the center of a metallic sphere from a CBCT image of the oral cavity as described in any one of claims 1-7, characterized in that, include: The variable CT threshold sphere core extraction module extracts the sphere core set Pset_extracted containing the metallic sphere image from CBCT images, as well as the corresponding standard sphere core set Pset_foundStandard. It then initializes the sphere core set Pset_extracted to an empty set Pset_extracted_h. The CBCT ROI cropping module takes the CBCT image (image) and the sphere center point set (Pset_extracted) as inputs, and obtains the cropped CBCT image (image_cropped). The single CT threshold centering fine extraction module uses the centering coarse extraction module within the single CT threshold centering fine extraction module to reconstruct the CT threshold of image_cropped based on the current surface. thres_tmp The surface data surface_tmp is obtained by reconstructing the surface of the metal sphere. The center point coordinates of each unconnected sub-part of the surface data surface_tmp are added to Pset_extracted_h as the center of the metal sphere to obtain the candidate center point set Pset_extracted_g. The variable threshold ball center filtering module initializes the matching number threshold t, and uses the variable threshold ball center filtering module to retrieve the standard ball center point set Pset_standard and the candidate ball center point set Pset_extracted_g for filtering to obtain the ball center point set Pset_selected_g and the standard ball center point set Pset_foundStandard_g corresponding to the ball center point set Pset_selected_g. The ball center matching and sorting module uses the standard ball center point set Pset_foundStandard_g and the ball center point set Pset_selected_g to obtain the best sorted point set Pset_extracted_tmp after matching and sorting, and the standard ball center point set Pset_foundStandard_tmp corresponding to the best sorted point set Pset_extracted_tmp. The single-threshold ball center filtering module retrieves the standard ball center point set Pset_standard, the candidate ball center point set Pset_extracted_g, and the matching number threshold t, and filters to obtain Pset_selected_g and Pset_foundStandard_g corresponding to Pset_selected_g. The feature array generation module generates the feature array Array_standard for Pset_standard and the feature array Array_toSelect for Pset_tmp. The t similar points from the feature arrays Array_standard and Array_toSelect are then added to Pset_foundStandard_g and Pset_selected_g, respectively. The process iterates through all permutations of Pset_selected_g after adding similar points, continuously changing the order of the internal points. When Pset_selected_g with added similar points is in each permutation... Initialize an empty point set Pset_tmp_e_, and assign the first 'a' elements of Pset_selected_g (after adding similar points) to the empty point set Pset_tmp_e_. Set Pset_foundStandard_g (after adding similar points) as the target point set, and Pset_tmp_e_ (after assigning elements) as the source point set. Calculate the optimal affine transformation matrix T for the target and source point sets. The transformation matrix T is applied to the source point set Pset_tmp_e_ to calculate the distance between each point in the source point set Pset_tmp_e_ and the corresponding point in the target point set Pset_foundStandard_g after adding similar points.
9. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed on the processor, performs the method for extracting the core of a metal sphere from an oral CBCT image as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for extracting position of metal ball for positioning in CBCT image
CN115423789A
Method for reconstructing a 3D image from 2D X-ray images
EP2868277A1