Method, device and storage medium for obtaining coordinates of center of reflective ball

By obtaining the seed point coordinates of the reflective sphere in CT images, performing edge detection and error matrix fitting, the problem of inaccurate transformation relationship of the reflective sphere center coordinates is solved, improving the accuracy and efficiency of CT image registration.

CN116758144BActive Publication Date: 2025-12-23WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310666012.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2025-12-23
Estimated Expiration
2043-06-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately determine the transformation relationship between the coordinates of the center of the reflective sphere, resulting in low accuracy in CT image registration.

Method used

By obtaining the coordinates of seed points near the center of the reflective sphere in the CT image, edge detection is performed to remove abnormal edge points. An error matrix is ​​constructed and fitted using the least squares method to determine the coordinates of the center of the reflective sphere.

Benefits of technology

It improves the accuracy and efficiency of acquiring the center coordinates of the reflective sphere, and realizes accurate conversion between CT images and optical navigation registration devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758144B_ABST
    Figure CN116758144B_ABST
Patent Text Reader

Abstract

The application relates to a method for obtaining the center coordinate of a reflective ball, which comprises the following steps: obtaining the seed point coordinate near the center of a target reflective ball in a CT image; taking the seed point coordinate as a starting point to perform edge detection on the target reflective ball to obtain an edge point set corresponding to the target reflective ball; removing abnormal edge points in the edge point set to obtain an original edge point set; in the case that the residual value of the error matrix of the original edge point set is less than a residual threshold value, obtaining the candidate center coordinate of the target reflective ball based on the fitting result of the error matrix of the original edge point set; determining a target edge point set based on the candidate center coordinate; and if the residual value of the error matrix of the target edge point set is less than the residual threshold value, determining the center coordinate of the target reflective ball based on the fitting result of the error matrix of the target edge point set.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a method and device for obtaining the center coordinates of a reflective sphere, equipment and a storage medium. BACKGROUND

[0002] At present, in a neurosurgery operation using image navigation, an optical navigation registration device provided with a plurality of reflective spheres is usually used to perform registration of CT images, so as to realize positioning of a target operation region. The optical navigation registration device of this type usually needs to obtain the conversion relationship between the image coordinates of the centers of the plurality of reflective spheres in the CT images and the actual center coordinates of the plurality of reflective spheres in the optical navigation registration device, so as to realize registration of the CT images.

[0003] However, it is still difficult to accurately obtain the conversion relationship between the two types of coordinates based on the prior art, which makes the registration result of the CT images obtained based on the prior art also have the problem of low accuracy. SUMMARY

[0004] Therefore, it is necessary to provide a method and device for obtaining the center coordinates of a reflective sphere, equipment and a storage medium in view of the above technical problems.

[0005] In a first aspect, the present application provides a method for obtaining the center coordinates of a reflective sphere, the method comprising:

[0006] obtaining a seed point coordinate in a CT image near the center of a target reflective sphere;

[0007] performing edge detection on the target reflective sphere with the seed point coordinate as a starting point to obtain a set of edge points corresponding to the target reflective sphere;

[0008] removing abnormal edge points in the set of edge points to obtain a set of original edge points;

[0009] in a case where a residual value of an error matrix of the set of original edge points is less than a residual threshold value, obtaining a candidate center coordinate of the target reflective sphere based on a fitting result of the error matrix of the set of original edge points;

[0010] determining a set of target edge points based on the candidate center coordinate; a fitting error value between each target edge point in the set of target edge points and the candidate center coordinate is less than or equal to a fitting error threshold value;

[0011] if a residual value of an error matrix of the set of target edge points is less than the residual threshold value, determining the center coordinates of the target reflective sphere based on a fitting result of the error matrix of the set of target edge points.

[0012] In one of the embodiments, before the candidate center coordinates of the target retroreflective sphere are obtained based on the fitting result of the error matrix of the original edge point set, the method further comprises:

[0013] An error matrix of the original edge point set is constructed, and a least square method is used to solve the error matrix of the original edge point set to obtain a fitting result of the error matrix of the original edge point set.

[0014] In one of the embodiments, the construction of the error matrix of the original edge point set comprises:

[0015] A Jacobian matrix corresponding to the original edge point set is constructed.

[0016] Based on the Jacobian matrix corresponding to the original edge point set, an error matrix corresponding to the original edge point set is obtained.

[0017] In one of the embodiments, the removal of the abnormal edge points in the edge point set to obtain the original edge point set comprises:

[0018] According to the CT value corresponding to each edge point in the edge point set and the distance between each edge point in the edge point set and the center of the target retroreflective sphere, an abnormal edge point screening condition is determined.

[0019] Based on the abnormal edge point screening condition, the abnormal edge points in the edge point set are removed to obtain the original edge point set.

[0020] In one of the embodiments, the determination of the target edge point set based on the candidate center coordinates comprises:

[0021] In the case where the fitting error value is greater than the fitting error threshold, the original edge point corresponding to the maximum fitting error value is removed from the original edge point set to obtain an updated original edge point set; if the fitting error value between each original edge point in the updated original edge point set and the candidate center coordinates is less than or equal to the fitting error threshold, the updated original edge point set is determined as the target edge point set.

[0022] In one of the embodiments, the obtaining of the seed point coordinates in the CT image near the center of the target retroreflective sphere comprises:

[0023] Based on the monitoring of the selection event in the CT image, the seed point coordinates in the CT image near the center of the target retroreflective sphere are obtained.

[0024] In a second aspect, the application further provides a center coordinate acquisition device of a retroreflective sphere, the device comprising:

[0025] A seed point coordinate acquisition module is configured to acquire a seed point coordinate near a center of a target retroreflector sphere in a CT image.

[0026] A first set acquisition module is configured to perform edge detection on the target retroreflector sphere with the seed point coordinate as a starting point, and obtain an edge point set corresponding to the target retroreflector sphere.

[0027] A second set acquisition module is configured to remove abnormal edge points in the edge point set, and obtain an original edge point set.

[0028] A candidate center coordinate acquisition module is configured to acquire a candidate center coordinate of the target retroreflector sphere based on a fitting result of an error matrix of the original edge point set, in a case where a residual value of the error matrix of the original edge point set is less than a residual threshold.

[0029] A third set acquisition module is configured to determine a target edge point set based on the candidate center coordinate, wherein a fitting error value between each target edge point in the target edge point set and the candidate center coordinate is less than or equal to a fitting error threshold.

[0030] A center coordinate determination module is configured to determine a center coordinate of the target retroreflector sphere based on a fitting result of an error matrix of the target edge point set, in a case where a residual value of the error matrix of the target edge point set is less than the residual threshold.

[0031] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0032] A seed point coordinate near a center of a target retroreflector sphere in a CT image is acquired. Edge detection is performed on the target retroreflector sphere with the seed point coordinate as a starting point, and an edge point set corresponding to the target retroreflector sphere is obtained. Abnormal edge points in the edge point set are removed, and an original edge point set is obtained. A candidate center coordinate of the target retroreflector sphere is acquired based on a fitting result of an error matrix of the original edge point set, in a case where a residual value of the error matrix of the original edge point set is less than a residual threshold. A target edge point set is determined based on the candidate center coordinate, wherein a fitting error value between each target edge point in the target edge point set and the candidate center coordinate is less than or equal to a fitting error threshold. A center coordinate of the target retroreflector sphere is determined based on a fitting result of an error matrix of the target edge point set, in a case where a residual value of the error matrix of the target edge point set is less than the residual threshold.

[0033] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0034] obtaining a seed point coordinate in the CT image near the center of the target reflective sphere; performing edge detection on the target reflective sphere with the seed point coordinate as a starting point to obtain a set of edge points corresponding to the target reflective sphere; removing abnormal edge points in the set of edge points to obtain a set of original edge points; in a case where a residual value of an error matrix of the set of original edge points is less than a residual threshold, obtaining a candidate center coordinate of the target reflective sphere based on a fitting result of the error matrix of the set of original edge points; determining a set of target edge points based on the candidate center coordinate; a fitting error value between each target edge point in the set of target edge points and the candidate center coordinate is less than or equal to a fitting error threshold; and determining the center coordinate of the target reflective sphere based on a fitting result of an error matrix of the set of target edge points if the residual value of the error matrix of the set of target edge points is less than the residual threshold.

[0035] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, which, when executed by a processor, implements the following steps:

[0036] obtaining a seed point coordinate in the CT image near the center of the target reflective sphere; performing edge detection on the target reflective sphere with the seed point coordinate as a starting point to obtain a set of edge points corresponding to the target reflective sphere; removing abnormal edge points in the set of edge points to obtain a set of original edge points; in a case where a residual value of an error matrix of the set of original edge points is less than a residual threshold, obtaining a candidate center coordinate of the target reflective sphere based on a fitting result of the error matrix of the set of original edge points; determining a set of target edge points based on the candidate center coordinate; a fitting error value between each target edge point in the set of target edge points and the candidate center coordinate is less than or equal to a fitting error threshold; and determining the center coordinate of the target reflective sphere based on a fitting result of an error matrix of the set of target edge points if the residual value of the error matrix of the set of target edge points is less than the residual threshold.

[0037] The aforementioned method, apparatus, device, and storage medium for obtaining the center coordinates of a reflective sphere first acquires the coordinates of seed points located near the center of the target reflective sphere in a CT image. Then, using the seed point coordinates as starting points, edge detection is performed on the target reflective sphere to obtain a set of edge points corresponding to the target reflective sphere. Next, abnormal edge points in the edge point set are removed to obtain the original edge point set. Then, if the residual value of the error matrix of the original edge point set is less than a residual threshold, candidate center coordinates of the target reflective sphere are obtained based on the fitting result of the error matrix of the original edge point set. Next, the target edge point set is determined based on the candidate center coordinates. Finally, if the residual value of the error matrix of the target edge point set is less than a residual threshold, the center coordinates of the target reflective sphere are determined based on the fitting result of the error matrix of the target edge point set. This application performs edge detection on the target reflective sphere based on the coordinates of seed points near the center of the target reflective sphere, obtaining a set of edge point coordinates of the target reflective sphere. Then, it uses the least squares method to iterate the set of edge point coordinates multiple times, realizing the conversion relationship between the image coordinate position of the reflective sphere in the CT image and the actual center coordinates of the reflective sphere in the optical navigation registration device. This not only improves the accuracy of obtaining the center coordinates of the reflective sphere in the CT image, but also effectively improves the efficiency of obtaining the center coordinates of the reflective sphere in the CT image. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating a method for obtaining the center coordinates of a reflective sphere according to one embodiment.

[0039] Figure 2 This is a flowchart illustrating a specific method for obtaining the fitting result of the error matrix of the original edge point set in one embodiment.

[0040] Figure 3 This is a flowchart illustrating a specific method for obtaining the error matrix corresponding to the original set of edge points in one embodiment;

[0041] Figure 4 This is a flowchart illustrating a specific method for obtaining an original set of edge points in one embodiment;

[0042] Figure 5 This is a flowchart illustrating a specific method for obtaining a set of target edge points in one embodiment;

[0043] Figure 6 This is a structural block diagram of a device for obtaining the center coordinates of a reflective sphere according to one embodiment;

[0044] Figure 7 This is a schematic diagram of a CT image with several reflective spheres provided in one embodiment;

[0045] Figure 8 Fig. 1 is a schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] For the purpose of the present application, technical solutions and advantages, the following will be further described in detail in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0047] The method for obtaining the coordinates of the center of the reflective ball provided by the embodiments of the present application can be executed by a terminal or a server. The terminal can communicate with the server through a network. The data storage system can store data required to be processed by the server. The data storage system can be integrated on the server, or can be placed on a cloud or other network servers. The terminal can be, but is not limited to, various personal computers, notebook computers. The server can be implemented by an independent server or a server cluster composed of multiple servers.

[0048] In one embodiment, as shown in Figure 1 A method for obtaining the coordinates of the center of the reflective ball is provided, which comprises the following steps:

[0049] In step S110, the coordinates of a seed point near the center of a target reflective ball in a CT image are obtained.

[0050] In this step, the CT image can be a CT image with a plurality of reflective balls. The target reflective ball refers to a target reflective ball in the CT image, which can be one of the reflective balls in the CT image with a plurality of reflective balls. The coordinates of the seed point near the center of the target reflective ball can be the coordinates of a seed point near the center of one of the reflective balls in the CT image with a plurality of reflective balls. The coordinates of the seed point can be three-dimensional coordinates.

[0051] Specifically, the distance between the coordinates of the seed point near the center of the target reflective ball and the center of the target reflective ball should be less than or equal to the seed point distance target threshold.

[0052] In one embodiment, the seed point is 0.9 times the radius of the target reflective sphere (i.e., the distance between the seed point coordinates and the center of the target reflective sphere should be between 0 and 0.9 times the radius of the target reflective sphere). For example, the distance between the seed point coordinates near the center of the target reflective sphere and the center of the target reflective sphere can be equal to 0.2 times, 0.3 times, 0.4 times, 0.5 times, 0.6 times, 0.7 times, or 0.8 times the radius of the target reflective sphere.

[0053] In practical applications, the specific manifestations of CT images with several reflective spheres can be as follows: Figure 7 The form shown; the specific representation of the seed point coordinates near the center of the target reflective sphere, which can be (x i ,y i ,z i ).

[0054] Step S120: Using the seed point coordinates as the starting point, perform edge detection on the target reflective sphere to obtain the set of edge points corresponding to the target reflective sphere.

[0055] In this step, the seed point coordinates are the coordinates of the seed point located near the center of the target reflective sphere; the target reflective sphere is the target reflective sphere in the CT image; the specific method for edge detection of the target reflective sphere can be to use an edge detection algorithm to perform edge detection on the target reflective sphere in the CT image; the set of edge points corresponding to the target reflective sphere refers to the set of edge points obtained by performing edge detection on the target reflective sphere, which is composed of several edge points corresponding to the target reflective sphere, and each edge point in this set of edge points can be represented in the form of three-dimensional coordinates.

[0056] Step S130: Remove abnormal edge points from the edge point set to obtain the original edge point set.

[0057] In this step, the edge point set refers to the set of edge points corresponding to the target reflective sphere; the specific method for removing abnormal edge points from the edge point set can be to remove abnormal edge points from the edge point set containing several edge points; the original edge point set refers to the original edge point set obtained by removing abnormal edge points from the edge point set.

[0058] In practical applications, abnormal edge points in the edge point set can be edge points with abnormal CT values ​​(or HU values) in the edge point set, or edge points with abnormal distances from the center of the target reflective sphere; HU value is the HU (Hounsfield Unit, HU) value.

[0059] Step S140, in the case that the residual value of the error matrix of the original edge point set is less than the residual threshold, obtaining the candidate center coordinates of the target retroreflective sphere based on the fitting result of the error matrix of the original edge point set.

[0060] In this step, the original edge point set refers to the original edge point set obtained by removing the abnormal edge points in the edge point set; the residual value of the error matrix of the original edge point set can be the modulus value of the error matrix of the original edge point set; the target retroreflective sphere refers to the target retroreflective sphere in the CT image; the candidate center coordinates of the target retroreflective sphere refer to the candidate center coordinates of the target retroreflective sphere obtained based on the fitting result of the error matrix of the original edge point set in the case that the residual value of the error matrix of the original edge point set is less than the residual threshold.

[0061] Step S150, determining the target edge point set based on the candidate center coordinates; the fitting error value between each target edge point in the target edge point set and the candidate center coordinates is less than or equal to the fitting error threshold.

[0062] In this step, the candidate center coordinates, i.e. the candidate center coordinates of the target retroreflective sphere, refer to the candidate center coordinates of the target retroreflective sphere obtained based on the fitting result of the error matrix of the original edge point set in the case that the residual value of the error matrix of the original edge point set is less than the residual threshold; the specific way of determining the target edge point set based on the candidate center coordinates can be to select each target edge point from the original edge point set, which has a fitting error value less than or equal to the fitting error threshold with the candidate center coordinates, and combine the selected each target edge point into the target edge point set.

[0063] Step S160, if the residual value of the error matrix of the target edge point set is less than the residual threshold, determining the center coordinates of the target retroreflective sphere based on the fitting result of the error matrix of the target edge point set.

[0064] In this step, the target edge point set refers to the target edge point set determined based on the original edge candidate center coordinates; the residual value of the error matrix of the target edge point set can be the modulus value of the error matrix of the target edge point set; the center coordinates of the target retroreflective sphere refer to the center coordinates of the target retroreflective sphere determined based on the fitting result of the error matrix of the target edge point set in the case that the residual value of the error matrix of the target edge point set is less than the residual threshold.

[0065] The method for obtaining the center coordinates of the reflective sphere first obtains seed point coordinates near the center of the target reflective sphere in the CT image. Then, the seed point coordinates are taken as the starting point to perform edge detection on the target reflective sphere to obtain an edge point set corresponding to the target reflective sphere. Next, abnormal edge points in the edge point set are removed to obtain an original edge point set. Subsequently, in a case where a residual value of an error matrix of the original edge point set is less than a residual threshold, a fitting result of the error matrix of the original edge point set is used to obtain candidate center coordinates of the target reflective sphere. Then, the target edge point set is determined based on the candidate center coordinates. Finally, in a case where the residual value of the error matrix of the target edge point set is less than the residual threshold, the fitting result of the error matrix of the target edge point set is used to determine the center coordinates of the target reflective sphere. The present application performs edge detection on the target reflective sphere based on the seed point coordinates near the center of the target reflective sphere to obtain an edge point coordinate set of the target reflective sphere, and iterates the edge point coordinate set multiple times by using the least square method, thereby realizing the conversion relationship between the image coordinate position of the reflective sphere in the CT image and the actual center coordinates of the reflective sphere in the optical navigation registration device. The present application can not only improve the accuracy of the center coordinates of the reflective sphere in the CT image, but also effectively improve the efficiency of obtaining the center coordinates of the reflective sphere in the CT image.

[0066] For the specific way of obtaining the fitting result of the error matrix of the original edge point set, in one embodiment, as shown in FIG. 13, before step S140, the method further includes: Figure 2

[0067] Step S210: constructing an error matrix of the original edge point set.

[0068] In this step, the original edge point set refers to the original edge point set obtained by removing the abnormal edge points in the edge point set; the edge point set refers to the edge point set composed of a plurality of edge points corresponding to the target reflective sphere, which is obtained by performing edge detection on the target reflective sphere; and the error matrix of the original edge point set refers to the error matrix corresponding to the original edge point set, which is constructed for each original edge point in the original edge point set.

[0069] Step S220: solving the error matrix of the original edge point set by using the least square method to obtain a fitting result of the error matrix of the original edge point set.

[0070] In this step, the fitting result of the error matrix of the original edge point set refers to the fitting result of the error matrix of the original edge point set obtained by solving the error matrix of the original edge point set by using the least square method.

[0071] ​The embodiment described above effectively improves the accuracy of the center coordinates of the reflective sphere in the CT image obtained by solving the error matrix of the original edge point set by using the least square method and obtaining the fitting result of the error matrix of the original edge point set.

[0072] For the specific manner of obtaining the error matrix corresponding to the original edge point set, in one embodiment, as shown in Figure 3 The step S210 specifically includes the following steps.

[0073] In step S310, the Jacobian matrix corresponding to the original edge point set is constructed.

[0074] In this step, the original edge point set refers to the original edge point set obtained by removing the abnormal edge points in the edge point set; the edge point set, i.e., the edge point set corresponding to the target reflective sphere, refers to the edge point set composed of a plurality of edge points corresponding to the target reflective sphere obtained by performing edge detection on the target reflective sphere; and the Jacobian matrix corresponding to the original edge point set refers to the Jacobian matrix corresponding to the original edge point set constructed for each original edge point in the original edge point set.

[0075] In step S320, the error matrix corresponding to the original edge point set is obtained based on the Jacobian matrix corresponding to the original edge point set.

[0076] In this step, the Jacobian matrix corresponding to the original edge point set refers to the Jacobian matrix corresponding to the original edge point set constructed for each original edge point in the original edge point set; and the error matrix corresponding to the original edge point set refers to the error matrix corresponding to the original edge point set obtained based on the Jacobian matrix corresponding to the original edge point set.

[0077] The embodiment described above effectively improves the efficiency of obtaining the center coordinates of the reflective sphere in the CT image by obtaining the error matrix corresponding to the original edge point set based on the Jacobian matrix corresponding to the original edge point set.

[0078] For the specific manner of obtaining the original edge point set, in one embodiment, as shown in Figure 4 The step S130 specifically includes the following steps.

[0079] In step S410, the abnormal edge point screening condition is determined according to the CT value corresponding to each edge point in the edge point set and the distance between each edge point in the edge point set and the center of the target reflective sphere.

[0080] In this step, the edge point set, i.e., the edge point set corresponding to the target reflective sphere, refers to an edge point set composed of a plurality of edge points corresponding to the target reflective sphere obtained by performing edge detection on the target reflective sphere; the CT value corresponding to each edge point in the edge point set is also referred to as the HU value corresponding to each edge point in the edge point set; and the abnormal edge point screening condition refers to a screening condition for screening each abnormal edge point with an abnormal CT value and an abnormal distance from the center of the target reflective sphere from the edge point set.

[0081] In actual applications, the specific manner of determining the abnormal edge point screening condition according to the CT value corresponding to each edge point in the edge point set and the distance between each edge point in the edge point set and the center of the target reflective sphere can be to respectively set a judgment threshold that can be used to determine the CT value of some edge points as an abnormal CT value and a judgment threshold that can be used to determine the distance between some edge points and the center of the target reflective sphere as an abnormal distance (i.e., set the corresponding numerical value as the judgment threshold of the abnormal CT value and the abnormal distance).

[0082] Step S420: removing the abnormal edge points in the edge point set based on the abnormal edge point screening condition to obtain an original edge point set.

[0083] In this step, the abnormal edge point screening condition refers to a screening condition for screening each abnormal edge point with an abnormal CT value and an abnormal distance from the center of the target reflective sphere from the edge point set; removing the abnormal edge points in the edge point set refers to removing each abnormal edge point with an abnormal CT value and an abnormal distance from the center of the target reflective sphere in the edge point set based on the abnormal edge point screening condition; and the original edge point set refers to an original edge point set obtained after removing the abnormal edge points in the edge point set based on the abnormal edge point screening condition.

[0084] The above embodiment improves the efficiency of obtaining the center coordinate of the reflective sphere in the CT image and effectively guarantees the accuracy of the obtained center coordinate of the reflective sphere in the CT image by removing the abnormal edge points in the edge point set based on the abnormal edge point screening condition to obtain the original edge point set.

[0085] For the specific manner of obtaining the target edge point set, in one embodiment, as shown in Figure 5 the above step S150 specifically includes:

[0086] Step S510: in the case where the fitting error value is greater than the fitting error threshold, removing the original edge point corresponding to the maximum fitting error value in the original edge point set to obtain an updated original edge point set.

[0087] In this step, the fitting error value refers to the fitting error value between each original edge point in the original edge point set and the candidate sphere center coordinate; the original edge point set refers to the original edge point set obtained by removing the abnormal edge points in the edge point set; the edge point set refers to the edge point set corresponding to the target reflective sphere; the updated original edge point set refers to the updated original edge point set obtained by removing the original edge point with the largest fitting error value in the original edge point set in the case that the fitting error value is greater than the fitting error threshold.

[0088] In step S520, if the fitting error value between each original edge point in the updated original edge point set and the candidate sphere center coordinate is less than or equal to the fitting error threshold, the updated original edge point set is determined as the target edge point set.

[0089] In this step, the updated original edge point set refers to the updated original edge point set obtained by removing the original edge point with the largest fitting error value in the original edge point set in the case that the fitting error value is greater than the fitting error threshold; the target edge point set refers to the target edge point set determined according to the updated original edge point set in the case that the fitting error value between each original edge point in the updated original edge point set and the candidate sphere center coordinate is less than or equal to the fitting error threshold.

[0090] The above embodiment effectively improves the efficiency of obtaining the sphere center coordinate of the reflective sphere in the CT image by determining the updated original edge point set as the target edge point set in the case that the fitting error value between each original edge point in the updated original edge point set and the candidate sphere center coordinate is less than or equal to the fitting error threshold.

[0091] For the specific way of obtaining the seed point coordinate near the sphere center of the target reflective sphere in the CT image, in one embodiment, the above step S110 specifically includes:

[0092] Based on the monitoring of the selection event in the CT image, the seed point coordinate near the sphere center of the target reflective sphere in the CT image is obtained.

[0093] The CT image can be a CT image with a plurality of reflective balls. The selection event in the CT image can be a selection event of clicking any point near the center of one of the reflective balls by a screen pointer in navigation software displaying the CT image with the plurality of reflective balls. The target reflective ball can be a reflective ball clicked by the screen pointer in the navigation software displaying the CT image with the plurality of reflective balls. The seed point coordinate near the center of the target reflective ball can be a coordinate corresponding to any point near the center of the reflective ball clicked by the screen pointer in the navigation software displaying the CT image with the plurality of reflective balls.

[0094] In actual applications, the screen pointer can be a mouse pointer. The seed point coordinate near the center of the target reflective ball can be a three-dimensional coordinate corresponding to the seed point near the center of the target reflective ball.

[0095] The above embodiment reduces the operation difficulty of obtaining the seed point coordinate near the center of the target reflective ball in the CT image by obtaining the seed point coordinate near the center of the target reflective ball in the CT image based on the monitoring of the selection event in the CT image, thereby effectively improving the efficiency of obtaining the center coordinate of the reflective ball in the CT image.

[0096] In one embodiment, the specific way of obtaining the center coordinate of the reflective ball by using the above method in actual applications is described as a whole in combination with each step in each method embodiment.

[0097] First, it is assumed that the spherical equation of the target reflective ball can be represented by the following formula:

[0098] (x-x0) 2 +(y-y0) 2 +(z-z0) 2 =r 2 ;

[0099] wherein r is the radius of the target reflective ball, [x0, y0, z0] T is the center coordinate of the target reflective ball.

[0100] In the navigation software displaying the CT image with a plurality of reflective balls, the seed point coordinate (x i , y i , z i ) near the center of the target reflective ball is obtained by clicking any point near the center of one of the reflective balls by a screen pointer. The relationship between the center coordinate of the target reflective ball and the seed point coordinate can be represented by the following formula:

[0101] (xi - x0) 2 + (y i - y0) 2 + (z i - z0) 2 = r 2 .

[0102] On this basis, the constraint function f i (p) can be expressed as follows:

[0103] f i (p) = (x i - x0) 2 + (y i - y0) 2 + (z i - z0) 2 - r 2 .

[0104] Wherein, the parameter p = [x0, y0, z0, r] T . It can be seen that the Jacobian matrix of f i (p) about the parameter p can be expressed as follows:

[0105]

[0106] Expanding the formula, we can get:

[0107]

[0108]

[0109]

[0110]

[0111] Based on this, the constraint function f i (p) can also be expressed as follows:

[0112]

[0113] Further, the first-order differential formula of the constraint function f i (p) is:

[0114] J i ΔP = f i .

[0115] Then, the seed point coordinates (x i , y i , z iUsing as the starting point, edge detection is performed on the target reflective sphere to obtain the set of edge points corresponding to the target reflective sphere.

[0116] Next, remove each abnormal edge point from the edge point set that has an abnormal CT value or an abnormal distance from the center of the target reflective sphere, to obtain the original edge point set corresponding to the target reflective sphere.

[0117] Next, for the original set of edge points corresponding to the target reflective sphere, the following Jacobian matrix is ​​constructed:

[0118]

[0119] Based on the Jacobian matrix above, the error matrix corresponding to the original set of edge points can be obtained in the following form:

[0120]

[0121] Next, the least squares method is used to calculate the residual value ΔP of the error matrix corresponding to the original edge point set (i.e., the magnitude ΔP of the error matrix corresponding to the original edge point set), and the fitting result P of the error matrix corresponding to the original edge point set is obtained. iter :

[0122]

[0123] P iter =P + ΔP;

[0124] Specifically, when the residual value ΔP of the error matrix of the original edge point set is less than the residual threshold, the fitting result P based on the error matrix of the original edge point set... iter The process involves obtaining the candidate center coordinates of the target reflective sphere, and based on these candidate center coordinates, determining each target edge point whose corresponding fitting error value is less than or equal to a fitting error threshold (the fitting error threshold can be set to a distance of less than 0.005 mm between each target edge point and the candidate center coordinates, or a fitting error between each target edge point and the candidate center coordinates being less than half a pixel, etc.), thus obtaining a target edge point set. If the residual value ΔP of the error matrix of the original edge point set is greater than the residual threshold, the original edge point with the largest corresponding fitting error value is removed from the original edge point set to obtain an updated original edge point set. If the fitting error value between each original edge point in the updated original edge point set and the candidate center coordinates is less than or equal to the fitting error threshold, then the updated original edge point set is determined as the target edge point set.

[0125] Finally, in a case where a residual value of an error matrix of the target edge point set (i.e., a modulus value of the error matrix of the target edge point set) is less than a residual threshold value, a fitting result P of the error matrix of the target edge point set is determined iter , and a ball center coordinate of the target reflector ball is determined.

[0126] It should be understood that, although each step in the flowchart involved in each of the above embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0127] Based on the same inventive concept, the present embodiment also provides a ball center coordinate acquisition device for a reflector ball, which is used to implement the above-mentioned ball center coordinate acquisition method for a reflector ball. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more ball center coordinate acquisition device embodiments for a reflector ball provided below can refer to the limitations of the ball center coordinate acquisition method for a reflector ball described above, which will not be repeated here.

[0128] In one embodiment, as shown in Figure 6 , a ball center coordinate acquisition device for a reflector ball is provided, and the device 600 includes:

[0129] A seed point coordinate acquisition module 610 is configured to acquire a seed point coordinate near a ball center of a target reflector ball in a CT image.

[0130] A first set acquisition module 620 is configured to perform edge detection on the target reflector ball by taking the seed point coordinate as a starting point, to obtain an edge point set corresponding to the target reflector ball.

[0131] A second set acquisition module 630 is configured to remove abnormal edge points in the edge point set, to obtain an original edge point set.

[0132] A candidate ball center coordinate acquisition module 640 is configured to, in a case where a residual value of an error matrix of the original edge point set is less than a residual threshold value, acquire a candidate ball center coordinate of the target reflector ball based on a fitting result of the error matrix of the original edge point set.

[0133] The third set obtaining module 650 is configured to determine a target edge point set based on the candidate sphere center coordinate, wherein a fitting error value between each target edge point in the target edge point set and the candidate sphere center coordinate is less than or equal to a fitting error threshold value.

[0134] The sphere center coordinate determining module 660 is configured to determine the sphere center coordinate of the target reflector ball based on a fitting result of an error matrix of the target edge point set if a residual value of the error matrix of the target edge point set is less than the residual threshold value.

[0135] In one of the embodiments, the device further includes an original edge point fitting module configured to construct an error matrix of the original edge point set, and solve the error matrix of the original edge point set by using a least square method to obtain a fitting result of the error matrix of the original edge point set.

[0136] In one of the embodiments, the original edge point fitting module is specifically configured to construct a Jacobian matrix corresponding to the original edge point set, and obtain the error matrix corresponding to the original edge point set based on the Jacobian matrix corresponding to the original edge point set.

[0137] In one of the embodiments, the second set obtaining module 630 is specifically configured to determine an abnormal edge point screening condition according to a CT value corresponding to each edge point in the edge point set and a distance between each edge point in the edge point set and the sphere center of the target reflector ball, and remove abnormal edge points in the edge point set based on the abnormal edge point screening condition to obtain the original edge point set.

[0138] In one of the embodiments, the third set obtaining module 650 is specifically configured to remove an original edge point corresponding to a maximum fitting error value from the original edge point set to obtain an updated original edge point set in a case where the fitting error value is greater than the fitting error threshold value, and determine the updated original edge point set as the target edge point set if the fitting error value between each original edge point in the updated original edge point set and the candidate sphere center coordinate is less than or equal to the fitting error threshold value.

[0139] In one of the embodiments, the seed point coordinate obtaining module 610 is specifically configured to obtain a seed point coordinate near the sphere center of the target reflector ball in the CT image based on a listening condition of a selection event in the CT image.

[0140] The modules in the ball center coordinate acquisition device of the reflective ball can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the modules.

[0141] In one embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (near field communication), or other technologies. The computer program is executed by the processor to implement a ball center coordinate acquisition method of a reflective ball. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0142] Those skilled in the art can understand that Figure 8 The structure shown in the above embodiment is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] In one embodiment, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0144] In one embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0145] In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.

[0146] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0147] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned method embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned method embodiments. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0148] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, as long as the combinations do not conflict with each other, they should be considered to be within the scope of the present disclosure.

[0149] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for obtaining the coordinates of the center of a reflective sphere, characterized in that, The method includes: Obtain the coordinates of the seed point located near the center of the target reflective sphere in the CT image; Using the seed point coordinates as the starting point, edge detection is performed on the target reflective sphere to obtain the set of edge points corresponding to the target reflective sphere; Remove abnormal edge points from the edge point set to obtain the original edge point set; If the residual value of the error matrix of the original edge point set is less than the residual threshold, the candidate center coordinates of the target reflective sphere are obtained based on the fitting result of the error matrix of the original edge point set. Based on the candidate sphere center coordinates, a set of target edge points is determined; the fitting error value between each target edge point in the set of target edge points and the candidate sphere center coordinates is less than or equal to the fitting error threshold. If the residual value of the error matrix of the target edge point set is less than the residual threshold, the center coordinates of the target reflective sphere are determined based on the fitting result of the error matrix of the target edge point set.

2. The method according to claim 1, characterized in that, Before obtaining the candidate center coordinates of the target reflective sphere based on the fitting result of the error matrix of the original edge point set, the method further includes: Construct the error matrix of the original set of edge points; The error matrix of the original edge point set is solved using the least squares method to obtain the fitting result of the error matrix of the original edge point set.

3. The method according to claim 2, characterized in that, The construction of the error matrix for the original set of edge points includes: Construct the Jacobian matrix corresponding to the original set of edge points; Based on the Jacobian matrix corresponding to the original set of edge points, obtain the error matrix corresponding to the original set of edge points.

4. The method according to claim 1, characterized in that, The process of removing abnormal edge points from the edge point set to obtain the original edge point set includes: Based on the CT value corresponding to each edge point in the edge point set, and the distance between each edge point in the edge point set and the center of the target reflective sphere, the abnormal edge point screening conditions are determined. Based on the abnormal edge point filtering conditions, abnormal edge points in the edge point set are removed to obtain the original edge point set.

5. The method according to claim 1, characterized in that, The determination of the target edge point set based on the candidate sphere center coordinates includes: If the fitting error value is greater than the fitting error threshold, the original edge point with the largest fitting error value is removed from the original edge point set to obtain an updated original edge point set. If the fitting error between each original edge point in the updated original edge point set and the candidate sphere center coordinates is less than or equal to the fitting error threshold, then the updated original edge point set is determined as the target edge point set.

6. The method according to any one of claims 1 to 5, characterized in that, The acquisition of the seed point coordinates located near the center of the target reflective sphere in the CT image includes: Based on the monitoring of selection events in the CT image, the coordinates of the seed point located near the center of the target reflective sphere in the CT image are obtained.

7. A device for obtaining the center coordinates of a reflective sphere, characterized in that, The device includes: The seed point coordinate acquisition module is used to acquire the coordinates of seed points located near the center of the target reflective sphere in the CT image; The first set acquisition module is used to take the seed point coordinates as the starting point, perform edge detection on the target reflective sphere, and obtain the edge point set corresponding to the target reflective sphere; The second set acquisition module is used to remove abnormal edge points from the edge point set to obtain the original edge point set; The candidate sphere center coordinate acquisition module is used to acquire the candidate sphere center coordinates of the target reflective sphere based on the fitting result of the error matrix of the original edge point set when the residual value of the error matrix of the original edge point set is less than the residual threshold. The third set acquisition module is used to determine the target edge point set based on the candidate sphere center coordinates; the fitting error value between each target edge point in the target edge point set and the candidate sphere center coordinates is less than or equal to the fitting error threshold. The sphere center coordinate determination module is used to determine the sphere center coordinates of the target reflective sphere based on the fitting result of the error matrix of the target edge point set if the residual value of the error matrix of the target edge point set is less than the residual threshold.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Positioning guiding method and device, electronic equipment and storage medium

    CN115930965A

  • Dynamic reference frame for surgical navigation system

    US20170020621A1