Positioning Method for Marking Balls, Computer-Readable Storage Medium, and Navigation System

By preprocessing the CT image and Hough circle detection, combined with multi-threading and bounding box algorithm, the problem of inaccurate coordinates of the marked ball core is solved, high-precision marked ball positioning is achieved, and the accuracy of surgical navigation is improved.

CN116342860BActive Publication Date: 2025-07-25SHANGHAI SHUHANG ROBOT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310075507.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-16
Publication Date
2025-07-25
Estimated Expiration
2043-01-16

AI Technical Summary

Technical Problem

In the prior art, there are artifacts and layer thickness problems in the CT image, resulting in inaccurate coordinates of the core of the marker ball, affecting the accuracy of image-guided surgical navigation.

Method used

By preprocessing the CT image, multiple two-dimensional images were obtained, Hough circle detection was performed, the center point was analyzed, and the center coordinates of the marked ball were obtained. Multi-threaded and bounding box algorithms were used to remove noise to improve coordinate accuracy.

Benefits of technology

The coordinate accuracy error of the marked ball center in the CT image is not more than 1mm, which improves the accuracy of surgical navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342860B_ABST
    Figure CN116342860B_ABST
Patent Text Reader

Abstract

The present invention provides a positioning method, a readable storage medium, a navigation and a robot system. The positioning method includes the following steps: preprocessing a CT image to obtain a plurality of two-dimensional images, wherein the CT image includes an image of a marker ball; performing Hough circle detection on the plurality of two-dimensional images to obtain a set of center points; performing clustering analysis on the set of center points to obtain a plurality of clusters; obtaining the center point of each cluster; and obtaining the coordinates of the center of the marker ball in the CT image according to the center points of the respective clusters. The deviation of the coordinates of the center of the marker ball obtained by this method in the CT image is less than 1 mm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of surgical navigation, and particularly to a positioning method for a marker ball, a computer-readable storage medium, and a navigation system. Background Art

[0002] In image-guided surgical navigation technology, a marker ball is required. By imaging the marker ball in a CT scan, the coordinates of the center of the marker ball in the CT image can be obtained, and thus the CT spatial coordinates and the world coordinates can be registered using the marker ball.

[0003] In the prior art, there are various methods to obtain the coordinates of the center of the marker ball in the CT image, such as shape detection method, threshold method, etc. However, due to material reasons, some marker balls have artifacts in the CT image, which results in inaccurate coordinates of the center of the marker ball obtained in the CT image. In addition, the CT image has a slice thickness, which also affects the accuracy of the center coordinates of the marker ball. Summary of the Invention

[0004] The purpose of the present invention is to provide a positioning method for a marker ball, a computer-readable storage medium, and a navigation system, aiming to improve the accuracy of the coordinates of the center of the marker ball obtained in the CT image.

[0005] To achieve the above purpose, the present invention provides a positioning method for a marker ball, including the following steps:

[0006] Preprocess the CT image to obtain a plurality of two-dimensional images, where the CT image includes the image of the marker ball;

[0007] Perform Hough circle detection on the plurality of two-dimensional images to obtain a set of center points of the segmented image of the marker ball in the two-dimensional images;

[0008] Perform clustering analysis on the set of center points of the segmented image of the marker ball in the two-dimensional images to obtain a plurality of clusters;

[0009] Obtain the center point of each cluster;

[0010] Obtain the coordinates of the center of the marker ball in the CT image according to the center points of the respective clusters.

[0011] Optionally, the step of preprocessing the CT image includes:

[0012] Perform digital image processing on the CT image;

[0013] Split the CT image after digital image processing from different directions.

[0014] Optionally, perform Hough circle detection on the plurality of two-dimensional images in a multi-threaded manner.

[0015] Optionally, the positioning method further includes performing noise reduction processing on a set of center points of the segmented image of the marker ball in the two-dimensional image.

[0016] Optionally, sphere internal noise is generated during the process of performing Hough circle detection;

[0017] Performing noise reduction processing on the set of center points includes: using a bounding box algorithm to perform clustering analysis on the set of center points of the segmented image of the marker ball in the two-dimensional image and removing the sphere internal noise.

[0018] Optionally, the step of obtaining the center point of each cluster includes:

[0019] Step S441: Calculate the arithmetic mean of the coordinates of all points in the cluster as the coordinates of the standard point;

[0020] Step S442: Calculate the calculated Euclidean distance between the standard point and each point in the cluster;

[0021] Step S443: Calculate a distance coefficient according to the calculated Euclidean distance between the standard point and each point in the cluster;

[0022] Step S444: Use the distance coefficient as a weight to calculate the weighted fitting center point of the cluster;

[0023] Step S445: Calculate the calculated Euclidean distance between the standard point and the weighted fitting center point;

[0024] Step S446: Compare whether the calculated Euclidean distance between the standard point and the weighted fitting center point is greater than a first error value. If not, use the weighted fitting center point as the center point of the cluster. If so, assign the coordinates of the weighted fitting center point to the standard point and return to execute Step S442.

[0025] Optionally, the number of the marker balls is multiple;

[0026] The step of obtaining the coordinates of the center of the marker ball in the CT image according to the center points of each cluster includes:

[0027] Obtain the calculated Euclidean distance between the center points of each cluster;

[0028] Obtain the true Euclidean distance between the centers of each marker ball;

[0029] Obtain the coordinates of the center of the marker ball in the CT image according to the calculated Euclidean distance between the center points of each cluster and the true Euclidean distance between the centers of each marker ball.

[0030] Optionally, the number of the marked balls is at least two;

[0031] The steps of obtaining the coordinates of the centers of the first marked ball and the second marked ball in the CT image according to the center points of the respective clusters include:

[0032] Step S451: Obtain the true Euclidean distance between the center of the first marked ball and the center of the second marked ball;

[0033] Step S452: Take the center point of one cluster as the first point and the center point of another cluster as the second point, and calculate the calculated Euclidean distance between the first point and the second point.

[0034] Step S453: Determine whether the absolute value of the difference between the calculated Euclidean distance between the first point and the second point and the true Euclidean distance between the first marked ball and the second marked ball is greater than the second error value. If not, use the coordinates of the first point as the coordinates of the center of the first marked ball in the CT image, and use the coordinates of the second point as the coordinates of the center of the second marked ball in the CT image. If so, replace the second point and return to execute Step S452;

[0035] If the absolute value of the difference between the calculated Euclidean distance between any first point and the second point and the true Euclidean distance between the first marked ball and the second marked ball is greater than the second error value, replace the first point and return to execute Step S452.

[0036] Optionally, the number of the marked balls is at least three. The steps of obtaining the coordinates of the center of the third marked ball in the CT image include:

[0037] Step S454: Obtain the true Euclidean distance between the center of the second marked ball and the center of the third marked ball;

[0038] Step S455: Select the center point of a cluster from the remaining clusters as the third point, and obtain the calculated Euclidean distance between the center of the second marked ball and the third point in the CT image;

[0039] Determine whether the absolute value of the difference between the true Euclidean distance between the centers of the second and third marker balls and the calculated Euclidean distance between the center of the second marker ball and the third point in the CT image is greater than a second error value; if not, use the coordinates of the center point of the third cluster as the coordinates of the center of the third marker ball in the CT image; if so, replace the third point and return to execute step S455;

[0040] If the absolute value of the difference between the true Euclidean distance between the centers of any second marker ball and the third marker ball and the calculated Euclidean distance between the center of the second marker ball and the third point in the CT image is greater than the second error value, replace the first point and return to execute step S452.

[0041] Optionally, the positioning method further includes: determining the accuracy of the coordinates of the center of the marker ball in the CT image.

[0042] Optionally, the step of determining the accuracy of the coordinates of the center of the marker ball in the CT image includes:

[0043] Sum the absolute values of the differences between the true Euclidean distances between the centers of any two marker balls and the calculated Euclidean distances between the corresponding two marker ball centers in the CT image to obtain an absolute distance deviation;

[0044] Determine whether the absolute distance deviation is less than a third error value; if so, determine that the accuracy of the coordinates of the center of the marker ball in the CT image is high; if not, determine that the accuracy of the coordinates of the center of the marker ball in the CT image is low.

[0045] To achieve the above object, the present invention also provides a computer-readable storage medium, on which a program is stored, and when the program is executed, it executes the marker ball positioning method as described in any one of the preceding items.

[0046] To achieve the above object, the present invention also provides a navigation system, including a marker ball and a control unit. The marker ball is used to be arranged on the robotic arm of a surgical robot, and the control unit is used to obtain a CT image including the image of the marker ball. The control unit is configured to execute the marker ball positioning method as described in any one of the preceding items.

[0047] Compared with the prior art, the positioning method, readable storage medium, electronic device, navigation and robot system of the present invention have the following advantages:

[0048] The foregoing positioning method includes the following steps: preprocessing the CT image to obtain multiple two-dimensional images, where the CT image includes the image of the marker ball; performing Hough circle detection on the multiple two-dimensional images to obtain a set of center points of the segmented image of the marker ball in the two-dimensional images; performing clustering analysis on the set of center points of the segmented image of the marker ball in the two-dimensional images to obtain multiple clusters; obtaining the center point of each cluster; and obtaining the coordinates of the center of the marker ball in the CT image according to the center points of the respective clusters. This method can accurately obtain the center of the marker ball in the CT image, and its precision error does not exceed 1 mm. Description of the Drawings

[0049] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:

[0050] Figure 1 is a schematic diagram of the application scenario of the surgical robot system provided by the present invention according to an embodiment;

[0051] Figure 2 is a schematic diagram of the partial structure of the surgical robot system provided by the present invention according to an embodiment;

[0052] Figure 3 is an overall flowchart of obtaining the coordinates of the center of the marker ball in the CT image before surgery by the surgical robot system provided by the present invention according to an embodiment;

[0053] Figure 4 is an overall flowchart of the positioning method of the marker ball provided by the present invention according to an embodiment;

[0054] Figure 5 is a schematic diagram of setting a threshold when performing binarization on the CT image in the positioning method of the marker ball provided by the present invention according to an embodiment;

[0055] Figure 6 is a schematic diagram of splitting the binarized CT image along the z direction to obtain two-dimensional images in the positioning method of the marker ball provided by the present invention according to an embodiment;

[0056] Figure 7 is a schematic diagram of splitting the binarized CT image along the x direction and along the y direction to obtain two-dimensional images in the positioning method of the marker ball provided by the present invention according to an embodiment;

[0057] Figure 8 is a schematic diagram of performing Hough circle detection on the two-dimensional image in the positioning method of the marker ball provided by the present invention according to an embodiment;

[0058] Figure 9It is a schematic diagram of intermediate results output during the Hough circle detection of a two-dimensional image in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0059] Figure 10 It is the original image of the two-dimensional image in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0060] Figure 11 It is a flowchart of performing Hough circle detection on a two-dimensional image in a multi-threaded manner in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0061] Figure 12 It is a schematic diagram of noise generated during the Hough circle detection in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0062] Figure 13 It is a schematic diagram of setting a bounding box in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0063] Figure 14 It is a schematic diagram of performing clustering analysis on the center point using a bounding box algorithm in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0064] Figure 15 It is a schematic diagram when obtaining the center point of a cluster in the method for positioning a marked ball provided by the present invention according to an embodiment, and a standard point is shown in the figure;

[0065] Figure 16 It is a schematic diagram when obtaining the center point of a cluster in the method for positioning a marked ball provided by the present invention according to an embodiment, and a standard point and the center point of a cluster are shown in the figure;

[0066] Figure 17 It is a schematic diagram of obtaining the coordinates of the center of the marked ball in the CT image in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0067] Figure 18 It is a schematic diagram of the true Euclidean distance of the marked ball in the method for positioning a marked ball provided by the present invention according to an embodiment;

[0068] Figure 19 It is a schematic diagram of the calculated Euclidean distance between the centers of the marked balls in the CT image and between the center of the second marked ball and the third point in the method for positioning a marked ball provided by the present invention according to an embodiment. Detailed implementation manners

[0069] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in this embodiment only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and proportion of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0070] In addition, each of the following described embodiments has one or more technical features. However, this does not mean that those who use the present invention must implement all the technical features in any one embodiment at the same time, or can only separately implement some or all of the technical features in different embodiments. In other words, on the premise that implementation is possible, those skilled in the art can, according to the disclosure of the present invention and depending on design specifications or implementation requirements, selectively implement some or all of the technical features in any one embodiment, or selectively implement the combination of some or all of the technical features in multiple embodiments, thereby increasing the flexibility when implementing the present invention.

[0071] To make the objectives, advantages, and features of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. It should be noted that the drawings are all in a very simplified form and use non-precise scales, only for conveniently and clearly assisting in explaining the objectives of the embodiments of the present invention. The same or similar reference numerals in the drawings represent the same or similar components.

[0072] Figure 1 Fig. shows a schematic diagram of the application scenario of the surgical robot system provided by an embodiment of the present invention. Figure 2 Fig. shows a partial structural schematic diagram of the surgical robot system. As Figure 1 and Figure 2 shown, the surgical robot system includes a robotic arm 100 and a marker ball 200. An end effector 110 is mounted at the end of the robotic arm 100. The marker ball 200 is disposed on the end effector 110. It can be understood that the number of marker balls is usually more than two, for example, three. The marker ball 200 can be a solid ball or a hollow ball, and is fixed to the end effector 110 by any suitable means such as bolts or pins. The material of the marker ball 200 can be a metal such as titanium, or a non-metallic material such as PEEK (polyetheretherketone).

[0073] The surgical robot system can be applied to puncture surgeries, such as lung puncture surgeries. In actual application, the robotic arm 100 is fixedly arranged on the CT table 20, and a target object 10 is carried on the CT table 20. After the CT table 20, the robotic arm 100 thereon, and the target object 10 enter the CT machine 3 together, the CT machine 30 performs tomographic scanning on the target object 10 and the marker ball 200 to obtain a CT image including the image of the target object 10 and the image of the marker ball 200. Then, by identifying the coordinates of the center of the ball of the marker ball 200 in the CT image, the CT space coordinate system and the world coordinate system can be registered using the marker ball 200. This enables navigation of the surgery using the CT image during the subsequent surgical process.

[0074] It should be noted that the target object 10 here can be a person, a human model, or other objects. Therefore, the surgeries mentioned in this article do not specifically refer to surgical operations performed on patients, and can also be simulation training.

[0075] The surgical robot system further includes a control unit 300. The control unit 300 is used to obtain a CT image including the image of the marker ball 200, and the control unit 300 is further configured to execute a positioning method for the marker ball to obtain the coordinates of the center of the ball of the marker ball 200 in the CT image.

[0076] Figure 3 The overall flow diagram shows the process of obtaining the coordinates of the center of the ball of the marker ball 200 in the CT image before the surgery by the surgical robot system. As Figure 3 shown, the overall process of obtaining the coordinates of the center of the ball of the marker ball 200 in the CT image before the surgery by the surgical robot system is as follows:

[0077] Step S100: Position the robotic arm 100 and the target object 10.

[0078] Step S200: Perform tomographic scanning on the target object 10 and the marker ball 200 to obtain a CT image including the image of the target object 10 and the image of the marker ball 200.

[0079] Step S300: The control unit 300 obtains the CT image.

[0080] Step S400: The control unit 300 executes the positioning method for the marker ball 200 to obtain the coordinates of the center of the ball of the marker ball 200 in the CT image.

[0081] Step S500: The control unit 300 outputs the coordinates of the center of the ball of the marker ball 200 in the CT image.

[0082] The specific steps of the positioning method for the marker ball 200 are as Figure 4 shown. Specifically, it includes the following steps:

[0083] Step S410: Preprocess the CT image to obtain multiple two-dimensional images.

[0084] Step S420: Perform Hough circle detection on the multiple two-dimensional images to obtain a set of center points of the segmented images of the marker ball 200 in the two-dimensional images.

[0085] Step S430: Perform clustering analysis on the set of center points of the segmented images of the marker ball 200 in the two-dimensional images to obtain multiple clusters.

[0086] Step S440: Obtain the center point of each cluster.

[0087] Step S450: Obtain the coordinates of the center of the ball of the marker ball 200 in the CT image according to the center points of each cluster.

[0088] Furthermore, the positioning method may further include step S460: Judge the accuracy of the coordinates of the center of the ball of the obtained marker ball 200 in the CT image.

[0089] Among them, the steps of preprocessing the CT image include step S411 and step S412. Step S411 is to perform digital image processing on the CT image. Step S412 is to split the CT image after digital image processing.

[0090] When performing step S411, the image algorithms encapsulated in the medical image processing algorithm library can be directly called. Optional algorithms include but are not limited to any one of binary processing, Gaussian smoothing processing, connected component processing, opening operation processing, and closing operation processing. It can be understood that the CT image is a 3D image, and the CT image after digital image processing is still a 3D image. When performing step S412, the CT image after digital image processing can be split by the slicing method.

[0091] In addition, those skilled in the art know that noise will be generated when performing Hough circle detection to obtain a set of center points of the segmented images of the marker ball 200 in the two-dimensional images. If the noise is not removed, the accuracy of the coordinates of the center of the ball of the obtained marker ball 200 in the CT image will be reduced. Therefore, the positioning method also includes noise reduction processing on the center points of the segmented images of the marker ball 200 in the two-dimensional images. The specific noise types and noise reduction methods will be described in detail later.

[0092] Next, this article will introduce the positioning method of the marker ball 200 in detail with a specific embodiment. It should be noted that the following description is only a feasible implementation manner of the positioning method, but not the only implementation manner, and should not constitute an improper limitation to the present invention.

[0093] In this embodiment, the control unit performs digital image processing on the original CT image using a binarization algorithm. The specific operation process includes: first, setting the binarization threshold, low threshold, and high threshold, as Figure 5 shown. Then, the following formula (1) is used to perform the binarization operation to obtain a black-and-white image. After binarization processing, the data volume in the CT image is greatly reduced, achieving the effect of highlighting the contour of the marker ball 200.

[0094]

[0095] In the formula, hu represents the pixel value at a certain image coordinate, lowerValue represents the low threshold, upperValue represents the high threshold, and threshlod represents the threshold. That is to say, if the hu value of the image is less than the threshold, it is the low threshold; if the hu value of the image is greater than the threshold, it is the high threshold.

[0096] As Figure 6 and Figure 7 shown, the control unit preferably slices the binarized CT image from different directions to obtain two-dimensional images. This operation can increase the circle detection samples and improve the robustness of the Hough circle detection. Optionally, the binarized CT image is sliced in the x direction, y direction, and z direction respectively to obtain multiple two-dimensional images. The specific number of two-dimensional images is determined according to needs. In addition, if a certain two-dimensional image obtained by slicing is not clear, it can be resampled, or the two-dimensional image can be scaled according to the space represented by each pixel to obtain a clear two-dimensional image.

[0097] Next, all the two-dimensional images are traversed, and the Hough circle detection is performed one by one, and a set of center points is obtained. In this article, the set of center points of the segmented image of the marker ball 200 in the two-dimensional image is named centerList. It can be understood that when performing the Hough circle detection, as Figure 8 shown, it is necessary to set the minimum circle diameter of the Hough circle detection, denoted as minRidus, and the maximum circle diameter, denoted as maxRidus, to reduce noise. In this embodiment, the minimum circle diameter minRidus can be (markerRadius - σ1), and the maximum circle diameter maxRidus can be (markerRadius + σ2), where markerRadius is the radius of the marker ball 200, and σ1 and σ2 are parameters defined by the user.

[0098] To monitor the Hough circle detection process to understand the effectiveness of the detection algorithm, the control unit can also output the detection image during the Hough circle detection (as Figure 9 shown), and compare it with the initial image (that is, the two-dimensional image without Hough circle detection, as Figure 10Compare with that shown in [figure], to determine the effectiveness of the detection algorithm.

[0099] Furthermore, as Figure 11 shown, it is preferred to use a multi-threaded approach to perform Hough circle detection on all two-dimensional images, so as to reduce the configuration requirements for the control unit, improve the calculation speed, and shorten the calculation time. The specific method is to encapsulate the Hough circle detection process and put the detection process into a multi-threaded calculation. In this process, the number of threads needs to be set, and the number of two-dimensional images f(i) processed by the Hough circle detection algorithm in each thread needs to be determined.

[0100] The method for determining the number of two-dimensional images processed by the Hough circle detection algorithm in each thread is as follows: If the number of threads can be divided evenly by the total number of two-dimensional images, then the number of two-dimensional images processed by the Hough circle detection algorithm in each thread is f(i) = n / k. If the number of threads cannot be divided evenly by the total number of two-dimensional images, then the number of two-dimensional images processed by the first k - 1 threads is f(i) = n / k + 1, and the number of two-dimensional images processed by the k-th thread is That is, the following formula (2):

[0101]

[0102] In the formula, i represents the serial number of the thread, i = 1, 2... k; n represents the total number of two-dimensional images obtained by splitting the CT image after digital image processing.

[0103] It can be understood that in an alternative implementation, it is also possible to use a single-threaded approach to perform Hough circle detection on all two-dimensional images.

[0104] As mentioned above, noise will be generated during the process of performing Hough circle detection on two-dimensional images to obtain the set of center points of the segmented image of the marker ball 200 in the two-dimensional image. As Figure 12 shown, in the set of center points of the segmented image of the marker ball 200 in the two-dimensional image obtained by Hough circle detection, in addition to the target center 1, it also includes in-sphere noise 2 and out-of-sphere noise 3. The target center here is the point through a series of subsequent processes, the coordinates of the center of the marker ball 200 in the CT image can be obtained. In-sphere noise refers to the points within the circle but not belonging to the target center. In-sphere noise is generally close to the edge of the circle, usually at the part where the marker ball 200 contacts the end of the robotic arm 100, and there is a possibility of detecting a circle at these parts. Out-of-sphere noise is outside the circle and does not belong to the inner part of the circle. Generally, it is some parts of the robotic arm 100 or other hardware, and a circle will also be detected through Hough circle detection.

[0105] Therefore, to improve the positioning accuracy, the positioning method further includes performing noise reduction processing on the set of center points of the segmented image of the marker ball 200 in the two-dimensional image to eliminate the noise inside and outside the ball.

[0106] In this embodiment, it is preferable to eliminate the noise inside the ball while performing clustering analysis on the set of center points of the segmented image of the marker ball 200 in the two-dimensional image. To achieve this purpose, this embodiment uses the bounding box algorithm, that is, the bounding box algorithm, to execute step S430. The bounding box method has the advantages of simplicity, speed, and less computational complexity.

[0107] Step S430 may specifically include the following steps:

[0108] Step S431: Determine the bounding box. As Figure 13 shown, BB x , BB y , BB z are half of the respective side lengths of the bounding box, and there are:

[0109] BB x = markerRadius - σ x

[0110] BB y = markerRadius - σ y

[0111] BB z = markerRadius - σ z

[0112] The σ x , σ y , σ z in the formula are user-defined parameters.

[0113] Step S432: Select a point in centerList as the origin, denoted as pointTemp. Take the origin as the center point of the bounding box, and let the coordinates of the origin be (x0, y0, z0). In this way, the boundary points of the bounding box are as follows:

[0114]

[0115]

[0116]

[0117]

[0118]

[0119]

[0120] Among them, is the minimum value of the bounding box in the x direction, is the maximum value of the bounding box in the x direction, is the minimum value of the bounding box in the y direction, is the maximum value of the bounding box in the y direction, is the minimum value of the bounding box in the z direction, is the maximum value of the bounding box in the z direction.

[0121] Step S433: Iterate through the points in centerList in sequence and determine whether each point is within the bounding box. If so, it is determined that the points within the bounding box are in the same cluster as the origin; if not, it is determined that the points not within the bounding box are in a different cluster from the origin. After the iteration is completed, a cluster centered at the origin is obtained, denoted as cluster-0, as Figure 14 shown.

[0122] After that, steps S432 and S433 are repeatedly executed to obtain cluster-1, cluster-2... cluster-(p-1), where p is the total number of points in centerList.

[0123] Then, step S434 is executed: Select a cluster with the most points from cluster-0, cluster-1... cluster-(p-1), denoted as max-cluster-0, and remove the points in this cluster from centerList.

[0124] Then, steps S432 to S434 are repeatedly executed until the number of points in centerList is 0.

[0125] After step S430 is executed, q clusters are obtained, namely max-cluster-0, max-cluser-1... max-cluser-(q-1), and the in-sphere noise and the target center are divided into different clusters.

[0126] Among them, there are n points in cluster max-cluser-i, which are point 1(x1, y1, z1), point 2(x2, y2, z2)... point n(x n , y n , z n ), where i is any one from 0 to (q-1).

[0127] It can be understood that in other implementation manners, a clustering algorithm related to distance or density can also be used to perform clustering analysis on the set of center points of the segmented image of the marked ball 200 in the two-dimensional image and remove the in-sphere noise.

[0128] Next, calculate the center point of cluster max-cluster-i.

[0129] First, execute step S441: Calculate the average value of the n points in cluster max-cluster-i as the coordinates of the standard point, denoted as centerTemp(x t , y t , z t ), as shown in Figure 15 and there is:

[0130]

[0131]

[0132]

[0133] Then, execute step S442: Calculate the Euclidean distance between the standard point and each of the other points in cluster max-cluster i, denoted as dist i , and there is:

[0134]

[0135] As shown in Figure 15 , dist1, dist2, dist3, dist4, and dist5 are shown in the figure.

[0136] Then, execute step S443: Calculate the distance coefficient q according to the Euclidean distance between the standard point and each of the other points in cluster max-cluster i i , and the calculation formula is as follows formula (3):

[0137]

[0138] Where represents the sum of the Euclidean distances between the standard point and the n points in max-cluster-i.

[0139] Then, execute step S444: Calculate the weighted fitting center point of cluster max-cluster-i with the distance coefficient as the weight, denoted as center(x c , y c , z c ), where:

[0140]

[0141]

[0142]

[0143] Next, perform step S445: Calculate the Euclidean distance dist between the standard point and the center point of the weighted fitting tc as follows:

[0144]

[0145] Next, perform step S446: Compare the Euclidean distance dist between the standard point and the center point of the weighted fitting tc with the first error value. If not, use the center point of the weighted fitting as the center point of cluster max - cluser - i, denoted as center, as Figure 16 shown. If so, assign the coordinates of the center point of the weighted fitting to the standard point to update the standard point, and obtain the center point of cluster max - cluser - i according to the updated standard point. Here, "obtain the center point of cluster max - cluser - i according to the updated standard point" means to return to execute steps S442 to S446 until the center point of cluster max - cluser - i is obtained. The first error value is user - defined.

[0146] Obtain the center points of the other q - 1 clusters in the same way.

[0147] Next, the control unit will obtain the calculated Euclidean distances between the center points of each cluster and the true Euclidean distances between the centers of each marker ball 200, and obtain the coordinates of the centers of the marker balls 200 in the CT image according to the calculated Euclidean distances between the center points of each cluster and the true Euclidean distances of the centers of each marker ball 200.

[0148] Taking the number of marker balls 200 as three as an example, the three marker balls 200 are respectively denoted as the first marker ball, the second marker ball, and the third marker ball. The steps to obtain the coordinates of the centers of the three marker balls 200 in the CT image according to the center points of each cluster specifically include:

[0149] Step S451: Obtain the true Euclidean distance between the center of the first marker ball and the center of the second marker ball, denoted as GTdist12, as Figure 17 shown.

[0150] Step S452: Take the center point of one cluster as the first point and the center point of another cluster as the second point, and calculate the calculated Euclidean distance between the first point and the second point, denoted as dist1i, where i is an integer and 2 ≤ i ≤ q.

[0151] Step S453: Determine whether the absolute value of the difference between the calculated Euclidean distance between the first point and the second point and the true Euclidean distance between the first marker ball and the second marker ball is greater than the second error, that is, determine whether abs(dist1i - GTdist12) is greater than the second error value. abs(dist1i - GTdist12) is the absolute value of the difference between dist1i and GTdist12, and the second error value is user-defined. If so, replace the second point and return to execute step S452. If not, use the coordinates of the first point as the coordinates of the center of the first marker ball in the CT image, and use the second point as the coordinates of the center of the second marker ball in the CT image. That is, use the first point as the center of the first marker ball in the CT image and the second point as the center of the second marker ball in the CT image.

[0152] Specifically, all clusters can be denoted as the first cluster, the second cluster... the qth cluster. First, use the center point of the first cluster as the first point and the center point of the second cluster as the second point. Calculate the calculated Euclidean distance between the first point and the second point as dist12, and determine whether abs(dist12 - GTdist12) is greater than the second error value. If not, use the coordinates of the center point of the first cluster as the coordinates of the center of the first marker ball in the CT image and denote it as center1, and use the center point of the second cluster as the coordinates of the center of the second marker ball in the CT image and denote it as center2. If so, then use the center point of the third cluster as the second point, calculate the Euclidean distance between the first point and the second point as dist13, and determine whether abs(dist13 - GTdist12) is greater than the second error value. If not, use the coordinates of the center point of the first cluster as the coordinates of the center of the first marker ball in the CT image center1, and use the coordinates of the center point of the third cluster as the coordinates of the center of the second marker ball in the CT image center2. If so, then use the center point of the fourth cluster as the second point and calculate dist14, as Figure 18 shown. And so on. If, except for the center point of the first cluster, the center points of the remaining clusters have all been used as the second point for judgment and the coordinates of the center of the first marker ball and the center of the second marker ball in the CT image still cannot be obtained, that is, when any abs(dist1i - GTdist12) is greater than the second error value, replace the first point and return to execute step S452.

[0153] Next, execute step S454: Obtain the true Euclidean distance between the centers of the second marker ball and the third marker ball, denoted as GTdist23 (as Figure 17 shown);

[0154] Step S455: Select the center point of one cluster from the remaining q - 2 clusters as the third point, and obtain the calculated Euclidean distance between the center of the second marker ball in the CT image and the third point, denoted as dist2j (such as Figure 19 dist23 shown in

[0155] ), where j is a positive integer, and j ≠ i, j ≤ q - 2;

[0156] Step S456: Whether the absolute value of the difference between the true Euclidean distance between the center of the second marker ball and the center of the third marker ball and the calculated Euclidean distance between the center of the second marker ball in the CT image and the third point is greater than the second error value, that is, determine whether abs(dist2j - GTdist23) is greater than the second error value. abs(dist2j - GTdist23) is the absolute value of the difference between distij and GTdist23. If not, then use the coordinates of the center point of the third cluster as the coordinates center3 of the center of the third marker ball in the CT image. If so, replace the third point and return to execute Step S455.

[0157] The above process is the process of obtaining the coordinates of the center of the marker ball 200 in the CT image and is also the process of removing the noise outside the ball.

[0158] Finally, calculate the absolute distance deviation, and judge the accuracy of the coordinates of the center of the obtained marker ball 200 in the CT image through the absolute distance deviation.

[0159] In the embodiments of the present invention, the absolute distance deviation can be obtained by summing the absolute values of the differences between the true Euclidean distances between the centers of any two marker balls 200 and the calculated Euclidean distances between the corresponding centers of the two marker balls 200 in the CT image. Specifically, the absolute distance deviation is calculated by the following formula (4). Formula (4) is:

[0160]

[0161] In the formula, error represents the absolute distance deviation, GTdist(ij) represents the true Euclidean distance between the center of the i-th marker ball 200 and the center of the j-th marker ball 200, dist(ij) represents the calculated Euclidean distance between the center of the i-th marker ball and the center of the j-th marker ball in the CT image, and n represents the number of marker balls 200.

[0162] Then, it is determined whether the absolute distance deviation error is less than the third error value, which is user-defined. If so, it is determined that the accuracy of the coordinates of the center of the marker ball 200 obtained in the CT image is high; if not, it is determined that the accuracy of the coordinates of the center of the marker ball 200 obtained in the CT image is low.

[0163] The error of the coordinates of the center of the marker ball 200 obtained by the above method is not greater than 1 mm in the CT image.

[0164] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a program is stored. When the program is executed, the above-mentioned positioning method of the marker ball is performed.

[0165] Still further, an embodiment of the present invention also provides a navigation system. The navigation system includes a marker ball 200 and a control unit 300. The marker ball 200 is used to be arranged on the robotic arm 100 of the surgical robot system. The control unit 300 is configured to obtain a CT image including an image of the marker ball, and the control unit 300 is further configured to perform the above-mentioned positioning method of the marker ball 200.

[0166] Although the present invention is disclosed as above, it is not limited thereto. Those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications.

Claims

1. A positioning method for a marked ball, characterized in that, It includes the following steps: Preprocess the CT image to obtain multiple two-dimensional images, where the CT image includes the image of the marker ball; Perform Hough circle detection on the multiple two-dimensional images to obtain a set of central points of the segmented image of the marker ball in the two-dimensional images; Perform clustering analysis on the set of central points of the segmented image of the marker ball in the two-dimensional images to obtain multiple clusters; Obtain the central point of each cluster; The number of the marker balls is at least two; The steps of obtaining the coordinates of the center of the first marker ball and the center of the second marker ball in the CT image include: Step S451: Obtain the true Euclidean distance between the center of the first marker ball and the center of the second marker ball; Step S452: Take the central point of one cluster as the first point and the central point of another cluster as the second point, and calculate the calculated Euclidean distance between the first point and the second point; Step S453: Determine whether the absolute value of the difference between the calculated Euclidean distance between the first point and the second point and the true Euclidean distance between the first marker ball and the second marker ball is greater than the second error value. If not, take the coordinates of the first point as the coordinates of the center of the first marker ball in the CT image, and take the coordinates of the second point as the coordinates of the center of the second marker ball in the CT image. If so, replace the second point and return to execute step S452.

2. The positioning method of the marked ball according to claim 1, characterized in that The steps of preprocessing the CT image include: Perform digital image processing on the CT image; Split the CT image after digital image processing from different directions.

3. The positioning method of the marked ball according to claim 1, characterized in that, Perform Hough circle detection on the multiple two-dimensional images in a multi-threaded manner.

4. The positioning method of the marked ball according to claim 1, wherein, The positioning method further includes performing noise reduction processing on the set of central points of the segmented image of the marker ball in the two-dimensional images.

5. The positioning method of the marked ball according to claim 4, characterized in that, Intra-sphere noise is generated during the process of performing Hough circle detection; Performing noise reduction processing on the set of central points includes performing clustering analysis on the set of central points of the segmented image of the marker ball in the two-dimensional image by using the bounding box algorithm and removing the intra-sphere noise.

6. The positioning method of the marked ball according to claim 1, characterized in that The steps of obtaining the central point of each cluster include: Step S441: Calculate the arithmetic mean of the coordinates of all points in the cluster as the coordinates of the standard point; Step S442: Calculate the calculated Euclidean distance between the standard point and each point in the cluster; Step S443: Calculate the distance coefficient according to the calculated Euclidean distance between the standard point and each point in the cluster; Step S444: Take the distance coefficient as the weight and calculate the weighted fitting central point of the cluster; Step S445: Calculate the calculated Euclidean distance between the standard point and the weighted fitting central point; Step S446: Compare whether the calculated Euclidean distance between the standard point and the weighted fitting central point is greater than the first error value. If not, take the weighted fitting central point as the central point of the cluster. If so, assign the coordinates of the weighted fitting central point to the standard point and return to execute step S442.

7. The positioning method of the marked ball according to claim 1, wherein if the absolute value of the difference between the calculated Euclidean distance between any one of the first points and the second point and the true Euclidean distance between the first marked ball and the second marked ball is greater than the second error value, then replace the first point and return to execute step S452.

8. The positioning method of the marked ball according to claim 1 or 7, characterized in that, The number of the marked balls is at least three. The step of obtaining the coordinates of the center of the third marked ball in the CT image includes: Step S454: Obtain the true Euclidean distance between the center of the second marked ball and the center of the third marked ball; Step S455: Select the center point of a cluster as the third point from the remaining clusters, and obtain the calculated Euclidean distance between the center of the second marked ball and the third point in the CT image; Judge whether the absolute value of the difference between the true Euclidean distance between the center of the second marked ball and the center of the third marked ball and the calculated Euclidean distance between the center of the second marked ball and the third point in the CT image is greater than the second error value; if not, then use the coordinates of the center point of the third cluster as the coordinates of the center of the third marked ball in the CT image; if so, then replace the third point and return to execute step S455; if the absolute value of the difference between the true Euclidean distance between the center of any second marked ball and the center of the third marked ball and the calculated Euclidean distance between the center of the second marked ball and the third point in the CT image is greater than the second error value, then replace the first point and return to execute step S452.

9. The positioning method of the marked ball according to claim 1, wherein, The positioning method further includes: judging the accuracy of the coordinates of the center of the marked ball in the CT image.

10. The positioning method of the marked ball according to claim 9, wherein, The step of judging the accuracy of the coordinates of the center of the marked ball in the CT image includes: Sum the absolute values of the differences between the true Euclidean distances between the centers of any two marked balls and the calculated Euclidean distances between the corresponding two centers of the marked balls in the CT image to obtain an absolute distance deviation; Judge whether the absolute distance deviation is less than the third error value. If so, it is determined that the accuracy of the coordinates of the center of the marked ball in the CT image is high; if not, it is determined that the accuracy of the coordinates of the center of the marked ball in the CT image is low.

11. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed, execute the positioning method of the marked ball according to any one of claims 1-10.

12. A navigation system, characterized in that, It includes a marked ball and a control unit. The marked ball is used to be arranged on the robotic arm of the surgical robot, and the control unit is used to obtain a CT image including the image of the marked ball. The control unit is configured to execute the positioning method of the marked ball according to any one of claims 1-10.

Citation Information

Patent Citations

  • Parallel robot, system, device and storage medium

    CN114515193A

  • Mixed reality fixed reference frame calibration method based on optical positioning system

    CN114926542A