Tracer identification positioning method, electronic device, storage medium and apparatus
By automatically adjusting the image segmentation threshold and using rigid registration technology, the problems of increased time and low accuracy caused by manual adjustment in existing tracer positioning methods are solved, achieving efficient and accurate tracer positioning and reducing surgical time.
Patent Information
- Application Number
- CN202310458268.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-26
AI Technical Summary
Existing tracer positioning methods rely on manual adjustment of image display parameters, which increases surgical time and is susceptible to metal artifacts, resulting in low positioning accuracy.
By automatically adjusting the image segmentation threshold and utilizing the positional relationship of the tracer steel balls, a rigid registration and iterative threshold segmentation method is adopted to identify and locate the tracer steel balls, eliminating the influence of metal artifacts and improving the positioning accuracy.
It enables automatic positioning of the tracer in 3D images, reducing positioning operation time and improving the accuracy and efficiency of surgery.
Smart Images

Figure CN116630600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of image processing, and more particularly, relates to a tracer identification and positioning method, an electronic device, a storage medium and an apparatus. BACKGROUND
[0002] When a robot performs a three-dimensional image navigation surgery, an optical tracking device (for example, NDI) and an intraoperative three-dimensional radiographic image (for example, CBCT) are used for positioning, and a coordinate mapping relationship between the three-dimensional image and the surgical space is established. The positioning process requires the installation of a tracer on the patient. One end of the tracer is provided with a small reflective ball to facilitate positioning by the optical tracking device and establish the positional relationship between the tracer and the surgical space; the other end of the tracer is provided with n steel balls (usually n = 4) so that it can be observed and accurately positioned in the three-dimensional radiographic image to establish the positional relationship between the tracer and the three-dimensional image, and then calculate the positional relationship between the three-dimensional image and the surgical space for surgical navigation. Therefore, efficiently and accurately identifying the position of the steel balls of the tracer in the three-dimensional image is a key factor affecting the length of the surgery and the quality of the surgery.
[0003] The existing methods are mainly pure manual positioning methods and semi-automatic positioning methods; the pure manual positioning method adjusts the gray value window width and window level of the image display as much as possible to exclude the influence of other structures and metal artifacts in the image to observe the n steel balls, and then manually adjusts the layer cutting position in three perpendicular directions and performs position point selection to interactively position the steel balls; the semi-automatic positioning method first roughly positions the steel balls by the above method, and then establishes a square bounding box around the selected points as a region of interest, and calculates the center of gravity in the region as the ball center to complete the positioning.
[0004] The existing methods rely on manual adjustment of the window width and window level of the image display and point selection on the slices of the three-dimensional image to position the steel balls, or first manually perform rough positioning and then automatically calculate the ball center position in the local region of the image. These manual methods increase the length of the positioning operation, and thus increase the time of the entire surgery; in addition, the existing methods position each steel ball point separately without using the prior information of the positional relationship between the steel ball points, which is easily affected by the metal artifacts in the CBCT image, limits the accuracy of the steel ball positioning, and ultimately affects the accuracy of the surgical robot assisted surgery.
[0005] The information disclosed in the background section of this application is only intended to deepen the understanding of the general background of the application, and should not be regarded as acknowledging or implying in any form that this information constitutes prior art known to those skilled in the art. SUMMARY
[0006] The application aims to provide a tracer identification positioning method, an electronic device, a storage medium and an apparatus, realize automatic positioning of a tracer in a three-dimensional image, improve positioning accuracy, reduce positioning operation time, and further reduce operation time.
[0007] To achieve the above-mentioned purpose, the application provides a tracer identification positioning method, an electronic device, a storage medium and an apparatus.
[0008] According to a first aspect of the application, a tracer identification positioning method is provided, comprising:
[0009] S1, acquiring an intraoperative three-dimensional image containing images of all tracer spheres of a tracer, three-dimensional coordinates of all the tracer spheres in an actual coordinate system, a number of the tracer spheres and radii of the tracer spheres;
[0010] S2, segmenting the intraoperative three-dimensional image with a set image segmentation threshold to identify all connected regions meeting a set identification condition as suspected tracer spheres;
[0011] S3, all the tracer spheres form an actual point set in the actual coordinate system, a number of the suspected tracer spheres equal to the number of the tracer spheres are selected to form a plurality of to-be-registered point sets, and the actual point set is rigidly registered with the to-be-registered point sets, and a to-be-registered point set with the minimum mean square error is selected as a candidate point set;
[0012] S4, adjusting the set image segmentation threshold, and cyclically executing the S2 and the S3;
[0013] S5, traversing all the candidate point sets, and selecting a candidate point set with the minimum mean square error as a final positioning point set;
[0014] S6, outputting coordinates of all the suspected tracer spheres in the final positioning point set and a corresponding coordinate transformation matrix.
[0015] Optionally, the tracer includes at least three coplanar and non-collinear tracer spheres, and all the tracer spheres are steel balls, and the radii of all the tracer spheres are the same.
[0016] Optionally, the method further comprises:
[0017] If the mean square error of the candidate point set or the final positioning point set is greater than the radius of the tracer sphere, a tracer is not identified.
[0018] Optionally, the S2 specifically comprises:
[0019] S201, binarizing and segmenting the intraoperative three-dimensional image with a set image segmentation threshold;
[0020] In the intraoperative three-dimensional image, a region with a gray value greater than the set image segmentation threshold value is a foreground region and is assigned a value of 1; and a region with a gray value less than or equal to the set image segmentation threshold value is a background region and is assigned a value of 0.
[0021] S202, calculate a proportion of the foreground region in the intraoperative three-dimensional image, and determine whether the proportion meets a set first determination condition; if yes, continue to execute downward; and if no, jump to S4;
[0022] S203, detect the foreground region to obtain a number and a shape of all connected regions in the foreground region;
[0023] S204, identify all the connected regions according to a set identification condition, identify a to-be-identified connected region meeting the set identification condition, and obtain a number and a corresponding spherical center coordinate of the to-be-identified connected region;
[0024] S205, determine whether the number of the to-be-identified connected region meets a set second determination condition; if yes, take all the to-be-identified connected regions as suspected tracer balls; and if no, jump to S4.
[0025] Optionally, S3 specifically includes:
[0026] all the tracer balls are combined to form an actual point set in the actual coordinate system, a same number of suspected tracer balls as that of the tracer balls are selected to form a plurality of to-be-registered point sets, coordinates of all the to-be-registered point sets are respectively rigidly registered with coordinates of the actual point set by a least square method, and a to-be-registered point set with a minimum mean square error is selected as a candidate point set.
[0027] Optionally, S4 specifically includes:
[0028] determine whether the set image segmentation threshold value is less than a set termination image segmentation threshold value; if yes, increase the set image segmentation threshold value by a fixed proportion to generate a new image segmentation threshold value; and if no, jump to S5.
[0029] Optionally, the set image segmentation threshold value is 0.3 times an image gray maximum value, the set termination image segmentation threshold value is 0.9 times the image gray maximum value, and the fixed proportion is 0.05 times the image gray maximum value.
[0030] The set first determination condition includes that the proportion of the foreground region in the intraoperative three-dimensional image is less than 3%.
[0031] The second judgment condition comprises: the number of the tracer balls ≦ the number of the pending connected regions ≦ the number of the tracer balls + 5.
[0032] The identification condition comprises: 0.5 times the radius of the tracer ball ≦ the radius of the connected region ≦ 1.5 times the radius of the tracer ball, and the ratio of the incircle radius to the circumcircle radius of the connected region is greater than 0.8.
[0033] According to a second aspect of the present application, a tracer identification positioning device is provided for performing the tracer identification positioning method of any one of the first aspect, comprising:
[0034] An acquisition module is configured to acquire an intraoperative three-dimensional image containing images of all tracer balls of a tracer, three-dimensional coordinates, number and radius of all the tracer balls in an actual coordinate system;
[0035] An image segmentation and identification module is configured to segment the intraoperative three-dimensional image with a set image segmentation threshold, and identify all connected regions meeting a set identification condition as suspected tracer balls;
[0036] A selection and registration module is configured to form an actual point set in the actual coordinate system with all the tracer balls, select a number of pending registration point sets with the same number of suspected tracer balls as the tracer balls, and perform rigid registration with the actual point set, and select the pending registration point set with the smallest mean square error as a candidate point set;
[0037] An adjustment and loop module is configured to adjust the set image segmentation threshold, and the image segmentation and identification module and the selection and registration module are looped to execute;
[0038] A positioning module is configured to traverse all the candidate point sets, and select the candidate point set with the smallest mean square error as a final positioning point set;
[0039] An output module is configured to output the coordinates of all the suspected tracer balls in the final positioning point set and the corresponding coordinate transformation matrix.
[0040] According to a third aspect of the present application, an electronic device is provided, comprising:
[0041] At least one processor; and,
[0042] A memory connected in communication with the at least one processor; wherein,
[0043] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the tracer identification positioning method of any one of the first aspect.
[0044] According to a fourth aspect of the present application, a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of identifying and locating a tracer according to any of the first aspect of the present application is provided.
[0045] The present application has the beneficial effects that: the present application automatically adjusts the image segmentation threshold, segments the three-dimensional image with different image segmentation thresholds respectively, obtains the positioning point set with the minimum mean square error as the positioning point of the tracer ball in the three-dimensional image, and obtains the coordinates of the tracer ball and the corresponding coordinate transformation matrix; the automatic positioning of the tracer in the three-dimensional image is realized, without manual interaction and without manual adjustment of algorithm parameters; the positional relationship of the steel balls measured before the operation (or the positional relationship of the steel balls self-provided when leaving the factory) is utilized, not only the single point position is calculated, but also the fitting of the overall structure is considered, so that the overall error is minimized, and the sorting of the points can be realized, that is, one-to-one correspondence with the order in the read file; in an iterative manner, the steel balls are segmented, screened and fitted under different thresholds, the influence of metal artifacts can be excluded to the greatest extent, the intraoperative three-dimensional image of different devices and parameters is adapted, and the result with the highest structural precision is calculated. The present application realizes the automatic positioning of the tracer in the three-dimensional image, improves the positioning accuracy, reduces the time length of the positioning operation, and further reduces the time length of the operation.
[0046] The system of the present application has other characteristics and advantages, which will be apparent from or set forth in the accompanying drawings and the detailed description incorporated herein, which together serve to explain certain principles of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0047] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like parts throughout the figures, and wherein:
[0048] Figure 1 A flow chart showing the steps of a method of identifying and locating a tracer according to the present application is shown.
[0049] Figure 2 A flow chart showing the steps of a method of identifying and locating a tracer according to embodiment 1 of the present application is shown.
[0050] Figure 3 A schematic diagram of a device for identifying and locating a tracer according to embodiment 2 of the present application is shown. DETAILED DESCRIPTION
[0051] The invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0052] like Figure 1 As shown, a method for identifying and locating a tracer according to the present invention includes:
[0053] S1. Obtain intraoperative 3D images of all tracer spheres containing the tracer, and the 3D coordinates, number, and radius of all tracer spheres in the actual coordinate system;
[0054] S2. The intraoperative three-dimensional image is segmented using the set image segmentation threshold, and all connected regions that meet the set recognition conditions are identified as suspected tracer spheres.
[0055] S3. All tracer spheres form the actual point set in the actual coordinate system. Select the same number of suspected tracer spheres as the tracer spheres to form a number of point sets to be registered. Perform rigid registration with the actual point set and select the point set to be registered with the smallest mean square error as the candidate point set.
[0056] S4. Adjust the set image segmentation threshold and repeat S2 and S3 in a loop;
[0057] S5. Traverse all candidate point sets and select the candidate point set with the smallest mean square error as the final positioning point set;
[0058] S6. Output the coordinates of all suspected tracer spheres in the final positioning point set and the corresponding coordinate transformation matrix.
[0059] Specifically, S1, acquire intraoperative 3D images containing images of all tracer balls in the tracer and the 3D coordinates, number, and radius of all tracer balls in the actual coordinate system. Intraoperative 3D images can be obtained by reading DICOM files, and the 3D coordinates, number, and actual radius of all tracer balls in the actual space can be obtained by reading text files. The positional relationship of all tracer balls in the actual space can be measured in the actual space before surgery or provided by the manufacturer at the time of manufacture.
[0060] S2, binarize the intraoperative three-dimensional image with the initialized image segmentation threshold, for example, the initialized image segmentation threshold is 0.3 times the maximum image gray value, the region with a gray value greater than the image segmentation threshold is the foreground region, and the region with a gray value less than or equal to the image segmentation threshold is the background region; if the proportion of the foreground region in the entire intraoperative three-dimensional image is greater than a set proportion, for example, the set proportion is 3%, then all connected regions in the foreground region are detected, the number and shape of the connected regions are obtained, and the connected regions that meet the set recognition condition are recognized as the to-be-determined connected regions according to the shape of the connected regions, the number of the to-be-determined connected regions and the corresponding spherical center coordinates are obtained, and whether the to-be-determined connected regions meet the set range of the number of missing spheres is determined according to the number of the to-be-determined connected regions, and if yes, the to-be-determined connected regions are regarded as suspected tracer spheres;
[0061] S3, all the tracer spheres form an actual point set in an actual coordinate system in the actual space, a plurality of to-be-registered point sets are selected by selecting suspected tracer spheres with the same number as that of the tracer spheres, rigid registration is performed between each to-be-registered point set and the actual point set, mean square error calculation is performed on the distance between the coordinate points in each registered point set and the corresponding coordinate points in the actual point set, and the registered point set with the minimum mean square error is the candidate point set.
[0062] S4, when the image segmentation threshold of this time is less than the set termination image segmentation threshold, the image segmentation threshold is increased by a fixed proportion, for example, the fixed proportion is 0.05, the image segmentation threshold of this time is 0.4 times the maximum image gray value, and the image segmentation threshold is adjusted to 0.45 times the maximum image gray value in this step; then, S2 and S3 are performed with the increased image segmentation threshold, that is, S2 and S3 are performed once each time the image segmentation threshold is adjusted, and when the increased image segmentation threshold is equal to or greater than the set termination image segmentation threshold, the adjustment of the image segmentation threshold is stopped.
[0063] S5, all the candidate point sets obtained in S3 by adjusting the image segmentation threshold are traversed, and the candidate point set with the minimum mean square error is selected as the final positioning point set.
[0064] S6, the coordinates of all suspected tracer spheres in the final positioning point set and the corresponding coordinate transformation matrix are output.
[0065] In one example, the tracer includes at least 3 coplanar and non-collinear tracer spheres, and all the tracer spheres are steel spheres with the same radius.
[0066] Specifically, the tracer includes at least 3 coplanar and non-collinear tracer spheres, for example, the tracer has 4 tracer spheres; all the tracer spheres have the same radius, and the radius of the tracer sphere can be obtained by preoperative measurement or according to the data provided by the manufacturer.
[0067] In one example, the method further includes:
[0068] If there is no candidate point set or the mean square error of the final positioning point set is greater than the radius of the tracer ball, the tracer is not recognized.
[0069] Specifically, if the candidate point set cannot be obtained through the initialized image segmentation threshold and the image segmentation threshold adjusted each time, or the mean square error of the final positioning point set obtained is greater than the radius of the tracer ball, it indicates that the tracer ball is not detected, and the tracer is not recognized is output.
[0070] In one example, S2 specifically comprises:
[0071] S201, binarizing and segmenting the intraoperative three-dimensional image according to a set image segmentation threshold;
[0072] In the intraoperative three-dimensional image, the region with a gray value greater than the set image segmentation threshold is a foreground region, and is assigned a value of 1; the region with a gray value less than or equal to the set image segmentation threshold is a background region, and is assigned a value of 0;
[0073] S202, calculating the proportion of the foreground region in the intraoperative three-dimensional image, and judging whether the proportion result meets a set first judgment condition, if yes, continuing to execute downward; if no, jumping to S4;
[0074] S203, detecting the foreground region to obtain the number and shape of all connected regions in the foreground region;
[0075] S204, identifying all connected regions according to a set identification condition, identifying the to-be-determined connected regions meeting the set identification condition, and obtaining the number and corresponding ball center coordinates of the to-be-determined connected regions;
[0076] S205, judging whether the number of to-be-determined connected regions meets a set second judgment condition, if yes, taking all to-be-determined connected regions as suspected tracer balls; if no, jumping to S4.
[0077] Specifically, the intraoperative three-dimensional image is binarized and segmented by taking the image gray maximum value as 0.3 times of the image gray maximum value as the image segmentation threshold, wherein the region with a gray value greater than the image segmentation threshold is a foreground region and is assigned a value of 1; the region with a gray value less than or equal to the image segmentation threshold is a background region and is assigned a value of 0; the proportion of the foreground region in the entire intraoperative three-dimensional image is calculated; if the proportion is greater than 3%, the foreground region is detected to obtain the number and shape of all connected regions in the foreground region; if the proportion is less than or equal to 3%, the image segmentation threshold is adjusted, and the intraoperative three-dimensional image is binarized and segmented by taking the adjusted image segmentation threshold as the image segmentation threshold; the connected region with a radius of 0.5-1.5 times of the actual radius of the steel ball and a ratio of the inscribed circle to the circumscribed circle greater than 0.8 is taken as a to-be-determined connected region according to the shape of the connected region; if the number of all to-be-determined connected regions is greater than or equal to the number of all tracer balls and less than or equal to the number of all tracer balls+5, the to-be-determined connected regions are taken as suspected tracer balls; if not, the image segmentation threshold is adjusted, the intraoperative three-dimensional image is binarized and segmented by taking the adjusted image segmentation threshold as the image segmentation threshold, and if the increased image segmentation threshold reaches or exceeds 0.9 times of the image gray maximum value, the adjustment of the image segmentation threshold and the binarization and segmentation of the intraoperative three-dimensional image are stopped.
[0078] In one example, S3 specifically includes:
[0079] All tracer balls form an actual point set in an actual coordinate system, and the same number of suspected tracer balls as the number of tracer balls form a plurality of to-be-registered point sets; coordinates of all to-be-registered point sets are respectively registered with coordinates of the actual point set by a least square method, and a to-be-registered point set with the minimum mean square error is selected as a candidate point set.
[0080] Specifically, coordinates of all tracer balls in the actual space form an actual point set in an actual coordinate system, and the same number of suspected tracer balls as the number of tracer balls form a plurality of to-be-registered point sets; each to-be-registered point set is registered with the actual point set, and the mean square error of the distance between the coordinate points in each registered point set and the corresponding coordinate points in the actual point set is calculated, and the registered point set with the minimum mean square error is the candidate point set.
[0081] In one example, S4 specifically includes:
[0082] It is judged whether the set image segmentation threshold is less than the set termination image segmentation threshold; if so, the set image segmentation threshold is increased by a fixed ratio to generate a new image segmentation threshold; if not, S5 is jumped to.
[0083] Specifically, it is judged whether the image segmentation threshold value this time is less than the set termination image segmentation threshold value, if less than the set termination image segmentation threshold value, the image segmentation threshold value is increased by a fixed proportion, and then S2 and S3 are executed with the increased image segmentation threshold value, that is, S2 and S3 are executed once each time the image segmentation threshold value is adjusted, and if greater than or equal to the set termination image segmentation threshold value, the adjustment of the image segmentation threshold value is stopped, and the step is jumped to S5.
[0084] In one example, the set image segmentation threshold value is 0.3 times the maximum image gray value, the set termination image segmentation threshold value is 0.9 times the maximum image gray value, and the fixed proportion is 0.05 times the maximum image gray value.
[0085] The set first judgment condition includes that the proportion of the foreground region in the intraoperative three-dimensional image is less than 3%;
[0086] The set second judgment condition includes that the number of tracer balls is less than or equal to the number of to-be-determined connected regions, and the number of to-be-determined connected regions is less than or equal to the number of tracer balls plus 5.
[0087] The set recognition condition includes that 0.5 times the radius of the tracer ball is less than or equal to the radius of the connected region, and 1.5 times the radius of the tracer ball is greater than or equal to the radius of the connected region, and the ratio of the inscribed circle radius of the connected region to the circumscribed circle radius is greater than 0.8.
[0088] The application will be further described below in conjunction with the drawings and specific embodiments, but not as a limitation of the application. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict.
[0089] Embodiment 1
[0090] As shown in the figure, the embodiment provides a recognition and positioning method of a tracer, which comprises: Figure 2
[0091] Step 1. Read the DICOM file to obtain the intraoperative three-dimensional image; read the text file to obtain the three-dimensional coordinates of n steel balls on the tracer measured in the actual space, and obtain the actual radius size of the steel balls;
[0092] Step 2. Initialize the image segmentation threshold value to 0.3 times the maximum image gray value;
[0093] Step 3. Perform binary segmentation on the image with the image segmentation threshold value. The region with high gray value is regarded as the foreground and is assigned a value of 1; the region with low gray value is regarded as the background and is assigned a value of 0;
[0094] Step 4. Judge whether the proportion of the foreground region in the entire image is less than 3%. If yes, continue to execute step 5; if not, skip this loop and go to step 9 to prevent slow detection of the connected region;
[0095] Step 5. Detecting connected regions in the binary image, detecting the shape of each connected region;
[0096] Step 6. Keeping connected regions with the ratio of inscribed circle to circumscribed circle greater than 0.8 and the radius between 0.5-1.5 times the actual radius of the steel ball, a total of m, recording the coordinates of the m connected regions;
[0097] Step 7. Determining whether the number of connected regions after screening m is greater than or equal to n and less than or equal to n+5. If so, proceed to Step 8; if not, go to Step 9;
[0098] Step 8. Iterating through all n points in the m points, using least squares to rigidly register them with the actual coordinates of the n steel balls, keeping the result with the smallest mean square error, and recording this error and its corresponding point coordinates and coordinate transformation matrix as a candidate result;
[0099] Step 9. Determining whether the image segmentation threshold is less than 0.9 times the maximum image gray value. If so, increase the image segmentation threshold by 0.05 times the maximum image gray value and jump to Step 3; if not, end the loop and go to Step 10;
[0100] Step 10. Iterating through all recorded candidate results to find the one with the smallest mean square error as the final result; if there are no candidate results or the mean square error of the final result is greater than the actual radius of the steel ball, output "no tracer identified" and end; otherwise, output the point coordinates and coordinate transformation matrix corresponding to the final result and end.
[0101] Example 2
[0102] As shown in the drawings, the present embodiment provides a tracer identification and positioning device for performing the tracer identification and positioning method of any one of the embodiments 1, comprising: Figure 3 An acquisition module for acquiring an intraoperative three-dimensional image containing all steel balls of the tracer and three-dimensional coordinates, number and radius of all steel balls in the actual coordinate system;
[0103] An image segmentation and identification module for segmenting the intraoperative three-dimensional image with a set image segmentation threshold and identifying all connected regions meeting the set identification conditions as suspected steel balls;
[0104] A selection and registration module for forming an actual point set in the actual coordinate system with all steel balls, selecting a number of suspected steel balls equal to the number of steel balls to form a number of registration point sets, and rigidly registering them with the actual point set, and selecting the registration point set with the smallest mean square error as a candidate point set;
[0105]
[0106] An adjusting and circulating module is configured to adjust a set image segmentation threshold, and the image segmentation and recognition module and the selecting and registering module are configured to be executed in a cycle.
[0107] A positioning module is configured to traverse all candidate point sets and select a candidate point set with the minimum mean square error as a final positioning point set.
[0108] An output module is configured to output coordinates of all suspected steel balls in the final positioning point set and a corresponding coordinate transformation matrix.
[0109] Embodiment 3
[0110] The embodiment provides an electronic device, which comprises:
[0111] at least one processor; and
[0112] a memory connected to the at least one processor in communication; wherein
[0113] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the identification and positioning method of the tracer in the embodiment 1.
[0114] The electronic device according to the embodiment of the present disclosure comprises a memory and a processor, the memory is used to store non-transitory computer readable instructions. Specifically, the memory can comprise one or more computer program products, which can comprise various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory, etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0115] The processor can be a central processing unit (CPU) or other forms of processing units with data processing and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions. In an embodiment of the present disclosure, the processor is used to run the computer readable instructions stored in the memory.
[0116] Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience effect, the embodiment can also include well-known structures such as a communication bus, an interface, etc., which should also be included in the protection scope of the present disclosure.
[0117] Detailed descriptions of the embodiment can refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0118] Embodiment 4
[0119] The embodiment provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the identification positioning method of the tracer in the embodiment 1.
[0120] According to the computer readable storage medium of the embodiment of the present disclosure, the non-transitory computer readable instructions are stored thereon. When the non-transitory computer readable instructions are run by a processor, all or part of the steps of the method of the embodiments of the present disclosure are executed.
[0121] The computer readable storage medium described above includes, but is not limited to, an optical storage medium (for example, CD-ROM and DVD), a magneto-optical storage medium (for example, MO), a magnetic storage medium (for example, a magnetic tape or a mobile hard disk), a medium with a built-in rewritable non-volatile memory (for example, a memory card), and a medium with a built-in ROM (for example, a ROM cartridge).
[0122] The above has described the embodiments of the present disclosure, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A method of identifying the location of a tracer, characterized in that, The method comprises the following steps: S1, acquiring an intraoperative three-dimensional image containing images of all tracer balls and three-dimensional coordinates of all the tracer balls in an actual coordinate system, the number of the tracer balls and the radius of the tracer balls; S2, segmenting the intraoperative three-dimensional image with a set image segmentation threshold to identify all connected regions meeting a set identification condition as suspected tracer balls; S3, all the tracer balls form an actual point set in the actual coordinate system, and a number of to-be-registered point sets are selected from the suspected tracer balls, and rigid registration is performed between the actual point set and the to-be-registered point sets, and a to-be-registered point set with the minimum mean square error is selected as a candidate point set; S4, adjusting the set image segmentation threshold, and cyclically executing S2 and S3; S5, selecting a candidate point set with the minimum mean square error from all the candidate point sets as a final positioning point set; S6, outputting coordinates of all the suspected tracer balls in the final positioning point set and a corresponding coordinate transformation matrix; S2 specifically comprises: S201, binarizing and segmenting the intraoperative three-dimensional image with a set image segmentation threshold; In the intraoperative three-dimensional image, a region with a gray value greater than the set image segmentation threshold is a foreground region and is assigned a value of 1, and a region with a gray value less than or equal to the set image segmentation threshold is a background region and is assigned a value of 0; S202, calculating a proportion of the foreground region in the intraoperative three-dimensional image, and judging whether the proportion meets a set first judgment condition, if yes, the method continues to be executed; if no, the method jumps to S4; S203, detecting the foreground region to obtain the number and shape of all connected regions in the foreground region; S204, identifying all the connected regions according to a set identification condition to obtain the number of to-be-determined connected regions and corresponding ball center coordinates; S205, judging whether the number of to-be-determined connected regions meets a set second judgment condition, if yes, the to-be-determined connected regions are all regarded as suspected tracer balls; if no, the method jumps to S4.
2. The method of claim 1, wherein, The tracer comprises at least three coplanar and non-collinear tracer balls, and all the tracer balls are steel balls with the same radius.
3. The method of identifying the location of a tracer according to claim 2, wherein, Further comprising: If there is no candidate point set or the mean square error of the final positioning point set is greater than the radius of the tracer ball, it is output that no tracer is identified.
4. The method of claim 3, wherein, S3 specifically comprises: All the tracer balls form an actual point set in the actual coordinate system, a number of to-be-registered point sets are selected from the suspected tracer balls, and coordinates of all the to-be-registered point sets are rigidly registered with coordinates of the actual point set by a least square method, and a to-be-registered point set with the minimum mean square error is selected as a candidate point set.
5. The method of claim 4, wherein, S4 specifically comprises: Judging whether the set image segmentation threshold is less than a set termination image segmentation threshold, if yes, the set image segmentation threshold is increased by a fixed ratio to generate a new image segmentation threshold; if no, the method jumps to S5.
6. The method of identifying and locating a tracer according to claim 5, wherein, The image segmentation threshold is set as 0.3 times of the maximum image grayscale, the termination image segmentation threshold is set as 0.9 times of the maximum image grayscale, and the fixed proportion is 0.05 times of the maximum image grayscale; The first judgment condition is set as that the proportion of the foreground region in the intraoperative three-dimensional image is less than 3%; The second judgment condition is set as that the number of the tracking balls is less than or equal to the number of the to-be-determined connected regions, and the number of the to-be-determined connected regions is less than or equal to the number of the tracking balls plus 5; The identification condition is set as that 0.5 times of the radius of the tracking ball is less than or equal to the radius of the connected region, 1.5 times of the radius of the tracking ball is greater than or equal to the radius of the connected region, and the ratio of the inscribed circle radius to the circumscribed circle radius of the connected region is greater than 0.
8.
7. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the tracer identification and positioning method of any one of claims 1-6.
8. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions for causing a computer to execute the tracer identification and positioning method of any one of claims 1-6.
9. An identification and location device for a tracer, characterized in that The tracer identification and positioning method of any one of claims 1-6 comprises: an acquisition module for acquiring an intraoperative three-dimensional image containing images of all tracking balls of a tracer, three-dimensional coordinates, number and radius of all the tracking balls in an actual coordinate system; an image segmentation and identification module for segmenting the intraoperative three-dimensional image with a set image segmentation threshold, and identifying all connected regions meeting a set identification condition as suspected tracking balls; a selection and registration module for forming an actual point set in the actual coordinate system with all the tracking balls, selecting a number of to-be-registered point sets with the same number of suspected tracking balls as the number of tracking balls, and performing rigid registration with the actual point set, and selecting a to-be-registered point set with the smallest mean square error as a candidate point set; an adjustment and loop module for adjusting the set image segmentation threshold, and the image segmentation and identification module and the selection and registration module are looped; a positioning module for traversing all the candidate point sets and selecting a candidate point set with the smallest mean square error as a final positioning point set; an output module for outputting coordinates of all suspected tracking balls in the final positioning point set and a corresponding coordinate transformation matrix.
Citation Information
Patent Citations
Marking ball positioning method and application thereof
CN113902707A
Surgical robot navigation and positioning method and apparatus, and device and storage medium
WO2023029362A1