A method for instrument design recognition for optical surgical navigation
By generating non-coplanar instrument structures that are highly adapted to the recognition algorithm, and utilizing binocular vision and depth-first search recursive matching, the stability and efficiency issues of instrument recognition under non-coplanar structures are solved, enabling fast and accurate instrument recognition in optical surgical navigation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-23
AI Technical Summary
Existing instrument identification methods struggle to establish stable correspondences in non-coplanar structures, leading to matching failures or increased attitude calculation errors, which affect the stability and real-time performance of optical surgical navigation.
The principle of binocular vision is used to calculate the two-dimensional coordinates of the centroid of the bright-colored connected domain. By generating a non-coplanar instrument structure that is highly adapted to the recognition algorithm, the three-dimensional coordinates of the marker points are recursively matched using depth-first search. The template point set is optimized by combining depth-first search recursion and hill-climbing strategy to achieve fast and accurate recognition of the instrument.
It enables rapid and accurate identification of instruments under complex conditions, improves the stability and efficiency of the identification module, reduces potential confusion, and enhances the distinguishability between different instruments.
Smart Images

Figure CN122265394A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for instrument design identification for optical surgical navigation, belonging to the field of optical surgical navigation technology. Background Technology
[0002] In optical surgical navigation, infrared optical 3D positioning systems are most commonly used to determine the spatial relationships of instruments. Instrument identification is a crucial step in achieving spatial positioning and attitude calculation; its accuracy and computational efficiency directly affect the stability and real-time performance of the navigation system. The entire navigation system acquires images from the field of view using two cameras, extracts the positions of several reflective markers fixed to the instruments from the 2D images of each camera, and then calculates the 3D position of each marker using a spatial position calculation method based on binocular vision principles before identifying the instruments.
[0003] However, existing methods for instrument identification and design are mostly based on the assumption of coplanar or near-coplanar marker points, which lack algorithmic adaptability for instruments with non-coplanar structures. When marker points are distributed non-coplanarly in space, the geometric relationship of the point set does not satisfy planar constraints, making it difficult for existing methods to establish stable correspondences, leading to instrument matching failures or increased attitude calculation errors. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a device design identification method for optical surgical navigation, so as to realize the design of highly distinguishable devices and the rapid identification of multiple devices under complex conditions.
[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0006] This invention provides a method for instrument design identification for optical surgical navigation, comprising:
[0007] S1. Obtain the left camera image, the right camera image, and the template point set of multiple instruments;
[0008] S2. Extract several bright connected components from the left camera image and the right camera image respectively, and calculate the two-dimensional coordinates of the centroid of each bright connected component.
[0009] S3. Combine the two-dimensional coordinates of the centroids of the bright connected regions in the left and right camera images in pairs, and use the principle of binocular vision to calculate the three-dimensional coordinates of each combination to form a source point set.
[0010] S4. Select an instrument, calculate the distance between any two marker points based on the template point set of the instrument, and construct the first symmetric distance matrix.
[0011] S5. Calculate the distance between any two three-dimensional coordinates based on the source point set and construct the second symmetric distance matrix;
[0012] S6. Expand the upper triangular parts of the first symmetric distance matrix and the second symmetric distance matrix into a first one-dimensional vector and a second one-dimensional vector, respectively, and calculate the distance difference between all data between the first one-dimensional vector and the second one-dimensional vector.
[0013] S7. Compare the distance difference with the preset tolerance, and take the data in the first one-dimensional vector and the second one-dimensional vector corresponding to the distance difference that is less than the preset tolerance to form multiple distance matching pairs;
[0014] S8. Based on the distance matching pairs, the 3D coordinate layout of the marker points is recursively mapped and matched to the source point set through depth-first search to obtain multiple feasible candidate solutions.
[0015] S9. Select the optimal solution from multiple feasible candidate solutions;
[0016] S10. Repeat S4~S9 to achieve position recognition of all instruments in three-dimensional space.
[0017] Furthermore, both the left and right camera images are obtained by capturing images of the instruments during the surgical procedure.
[0018] Furthermore, the design method for the template point set of the device includes:
[0019] Generate an initial template point set;
[0020] Based on a hill-climbing strategy with random perturbation, the initial template point set is iteratively optimized to obtain the template point set.
[0021] Furthermore, the method for generating the initial template point set includes:
[0022] Set a marker point at the origin of polar coordinates, and use polar coordinates to perform random sampling to determine the remaining marker points;
[0023] Determine whether the remaining marker points meet the constraints. If they do not meet the constraints, resample until the remaining marker points meet the constraints.
[0024] The coordinates of all the marker points are centered to form the initial template point set.
[0025] Furthermore, the random sampling in radius, It is carried out uniformly within the angle range;
[0026] The expression for the centralized processing is:
[0027] ;
[0028] ;
[0029] in, Represents the three-dimensional coordinates of the center point. Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the number of marker points. Indicates the first The three-dimensional coordinates after centering the marker points For the first The three-dimensional coordinates of the marker points.
[0030] Furthermore, the hill-climbing strategy based on random perturbation iteratively optimizes the initial template point set to obtain the template point set, including:
[0031] D1. Construct a distance feature vector from the distance between any two markers within an instrument.
[0032] D2. Calculate the current minimum discrimination of the distinct instrument pair, expressed as:
[0033] ;
[0034] ;
[0035] in, Indicates the minimum distinguishability. Indicates the degree of differentiation. Indicates the first one inside a device 1 eigenvector Indicates the first one inside another device 1 eigenvector Represents the L2 norm;
[0036] D3. Randomly select a marker point and apply a uniform random perturbation to it. The perturbation amplitude is within... Within the range, the disturbed marker points are obtained;
[0037] D4. Determine whether the marker point after the disturbance meets the limiting conditions. If it meets the limiting conditions, recalculate the minimum discrimination of the dissimilar instrument pair. If the minimum discrimination of the dissimilar instrument pair obtained after the recalculation is greater than the current minimum discrimination, modify the coordinates of the marker point to the three-dimensional coordinates after the disturbance.
[0038] D5. Repeat steps D3 to D4 until the maximum number of iterations is reached to obtain the template point set.
[0039] Furthermore, when the number of markers on the instrument is set to 4, the limiting conditions include that the distance between any two markers is between 25 and 150 mm, the difference between any two markers is not less than 3 mm, and the area of the triangle formed by any three markers is not less than 100 mm². 2 The volume of the tetrahedron formed by the four marker points is not less than 1000 mm². 3 .
[0040] Furthermore, the expression for calculating the two-dimensional coordinates of the centroid of the bright-colored connected region is as follows:
[0041] ;
[0042] in, Represent the two-dimensional coordinates of the centroid of the bright-colored connected region. Represents the set of pixels in the bright-colored connected component. Represents pixels grayscale value, Indicates the first 1 pixel of coordinate, Indicates the first 1 pixel of coordinate.
[0043] Furthermore, the expression for calculating the distance difference between the data elements is as follows:
[0044] ;
[0045] in, Represents the first one-dimensional vector. The data value and the second one-dimensional vector. The distance difference between the data values Represents the first one-dimensional vector. One data value, Represents the second one-dimensional vector. One data value;
[0046] The process of recursively mapping the 3D coordinate layout of the marker points to the source point set using a depth-first search based on distance matching pairs yields multiple feasible candidate solutions, including:
[0047] The distance matching pairs are used as the basic units to expand the mapping sequentially. If the mapping satisfies that there is no duplicate assignment, the recursion continues; otherwise, the process is backtracked to obtain multiple feasible candidate solutions.
[0048] Furthermore, the selection of the optimal solution from multiple feasible candidate solutions includes:
[0049] The average point-pair error between the template point set and the source point set in each feasible candidate solution is calculated, and its expression is as follows:
[0050] ;
[0051] in, Indicates the average point error. Indicates the number of marker points within the template point set. The template point set represents the first The coordinates of the marker points Represents the corresponding source point set The three-dimensional coordinates Represents the rotation matrix. Represents the translation matrix;
[0052] The feasible candidate solution with the smallest average point pair error is selected as the optimal solution to realize the position recognition of the instrument in three-dimensional space.
[0053] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0054] This invention comprises two parts: instrument design and instrument recognition. The instrument design focuses on structural optimization to meet recognition requirements. By analyzing the spatial distribution characteristics and geometric distinguishability of reflective markers, a non-coplanar instrument structure highly adapted to the recognition algorithm is generated. This reduces potential confusion during the design phase, improves the distinguishability between different instruments, and enhances the stability and efficiency of the recognition module from the source. The instrument recognition enables rapid and accurate identification of instruments during optical surgical navigation. Even in complex situations such as non-coplanar distribution of reflective markers, partial occlusion of markers, or ambiguity in binocular matching, stable recognition performance is maintained. Attached Figure Description
[0055] Figure 1 This is a schematic diagram illustrating the generation process of a template point set in an efficient instrument identification method for optical surgical navigation according to one embodiment of the present invention.
[0056] Figure 2 This is a schematic diagram of the instrument identification process in an efficient instrument identification method for optical surgical navigation according to one embodiment of the present invention;
[0057] Figure 3 This is a schematic diagram of depth advantage search in an efficient instrument identification method for optical surgical navigation according to one embodiment of the present invention;
[0058] Figure 4 This is a schematic diagram of the instrument marker setting in an efficient instrument identification method for optical surgical navigation according to one embodiment of the present invention. Detailed Implementation
[0059] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0060] Example 1:
[0061] This invention provides a method for instrument design identification for optical surgical navigation, comprising the following steps:
[0062] Step 1: Instrument Design Stage
[0063] like Figure 1 The device design is shown below. During the design phase, at least two devices are required (at least two devices are needed in the design phase, but only one device is needed in the recognition phase because recognition is performed sequentially). In this embodiment, the devices adopt a non-coplanar layout, and each device is equipped with four marker points, such as... Figure 4 As shown, a total of 5 instrument structures are involved.
[0064] The design methodology for the template point set of each instrument includes:
[0065] First, generate the initial template point set:
[0066] Set a marker point at the origin of the polar coordinate system and use polar coordinates. radius, The remaining marker points are determined by uniformly sampling within the angular range.
[0067] Determine whether the remaining marker points meet the constraints. If they do not meet the constraints, resample. The perturbation step size of the marker point coordinates is 8mm each time, until the remaining marker points meet the constraints.
[0068] In this embodiment, the limiting condition includes the distance between any two marker points being within The distance between two marker points is calculated using Euclidean distance, expressed as follows: , Indicates the distance between two marker points. Represents the three-dimensional coordinates of a marker point. Represent the three-dimensional coordinates of another marker point; the distance between any two marker points shall differ by no less than 3 mm to avoid difficulty in distinguishing different instruments due to internal equidistant spacing; the area of the triangle formed by any three marker points shall be no less than 100 mm². 2 The volume of the tetrahedron formed by the four marker points is not less than 1000 mm². 3 This is to eliminate or avoid near-collinear and coplanar situations.
[0069] After centering the coordinates of all marker points, an initial template point set is formed. The expression for the centering process is:
[0070] ;
[0071] ;
[0072] in, Represents the three-dimensional coordinates of the center point. Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the number of marker points. Indicates the first The three-dimensional coordinates after centering the marker points For the first The three-dimensional coordinates of the marker points.
[0073] Then, based on a hill-climbing strategy with random perturbations, the initial template point set is iteratively optimized to obtain the template point set, specifically including:
[0074] S1. Construct a distance feature vector from the distance between any two markers within an instrument. Since each instrument in this embodiment has 4 markers, there are a total of... The distance values are sorted in ascending order to obtain a distance feature vector of length 6. Distance feature vectors are rigidly invariant to instruments and can be used to measure similarity between different instruments.
[0075] S2. To quantify the distinguishability between different instruments, calculate the distinguishability of a pair of dissimilar instruments (two instruments with different structures) as the measure of the difference between the two instruments. The difference measure is used, and the minimum discrimination of all distinct instruments is taken as the overall minimum discrimination index, which is expressed as:
[0076] ;
[0077] ;
[0078] in, Indicates the minimum distinguishability. Indicates the degree of differentiation. Indicates the first one inside a device 1 eigenvector Indicates the first one inside another device 1 eigenvector This represents the L2 norm.
[0079] In this embodiment, the initial template point set of the five instruments This indicates that the initial template point set is relatively close in the feature space, and subsequent iterative optimization is needed to improve discriminability.
[0080] S3. Randomly select a marker point and apply a uniform random perturbation to it, with the perturbation amplitude being within... Within the range, the disturbed marker points are obtained.
[0081] S4. Determine whether the marker point after disturbance meets the limiting conditions (same as the limiting conditions above). If the limiting conditions are met, recalculate the minimum discrimination of the dissimilar instrument pair. If the minimum discrimination of the dissimilar instrument pair obtained by recalculation is greater than the current minimum discrimination, modify the coordinates of the marker point to the three-dimensional coordinates after disturbance.
[0082] S5. Repeat steps S3 to S4 until the maximum number of iterations is reached. In this embodiment, the maximum number of iterations is set to 15,000 times to obtain the template point set.
[0083] In this embodiment, a total of 5 template point sets were obtained, and each template point set contains the coordinate positions of 4 marker points of the corresponding instrument.
[0084] The coordinates of the marker points and the distance feature vectors of the five instruments in this embodiment are shown in Table 1 and Table 2, respectively.
[0085] Table 1: Coordinates of the marker points of the 5 instruments in this embodiment
[0086] Table 2: Distance feature vectors of the five instruments in this embodiment
[0087] As shown in Tables 1 and 2, the minimum discrimination of the optimized instrument reached 115.18 mm, which is significantly higher than that of the initial template point set (26.78 mm). This effectively demonstrates that the feature differences between different instruments are significantly enhanced, and the recognition reliability is improved.
[0088] Step 2, Instrument Identification Stage:
[0089] Next, during the operation, the left and right cameras are used to take pictures of the instruments to obtain left camera images and right camera images respectively. In this embodiment, the left and right cameras are located on one side of the operating table.
[0090] Combination Figure 2 For the left and right camera images, threshold segmentation is first performed to extract multiple bright and colored connected components.
[0091] The two-dimensional coordinates of the centroid of each bright-colored connected region are calculated using the gray-scale centroid algorithm. The calculation expression is as follows:
[0092] ;
[0093] in, Represent the two-dimensional coordinates of the centroid of the bright-colored connected region. Represents the set of pixels in the bright-colored connected component. Represents pixels grayscale value, Indicates the first 1 pixel of coordinate, Indicates the first 1 pixel of coordinate.
[0094] By pairwise combining the two-dimensional coordinates of the centroids of the bright connected regions corresponding to the left and right camera images, and using the principle of binocular vision, the three-dimensional coordinates of each combination are calculated to form a source point set.
[0095] Finally, the instruments are matched with the source point set, and the matching process is performed for each instrument one by one.
[0096] Calculate the distance between any two marker points using a template point set of the instrument, and construct the first symmetric distance matrix. Calculate the distance between any two 3D coordinates using the source point set, and construct the second symmetric distance matrix.
[0097] Expand the upper triangular parts of the first and second symmetric distance matrices into a first one-dimensional vector (equivalent to a distance feature vector) and a second one-dimensional vector, respectively.
[0098] Calculate the distance difference between all data points in the first and second one-dimensional vectors. The expression for calculating the distance difference is:
[0099] ;
[0100] in, Represents the first one-dimensional vector. The data value and the second one-dimensional vector. The distance difference between the data values Represents the first one-dimensional vector. One data value, Represents the second one-dimensional vector. Each data value.
[0101] The distance difference is compared with a preset tolerance. Distance matching pairs are formed by taking the data from the first and second one-dimensional vectors corresponding to distance differences smaller than the preset tolerance. In this embodiment, the preset tolerance is 0.05 mm. This tolerance constraint eliminates impossible matches, significantly reducing the search space.
[0102] Based on the distance matching pairs, a depth-first search recursively maps the 3D coordinate layout of the marker points to the source point set, resulting in multiple feasible candidate solutions, such as... Figure 3 As shown, specifically:
[0103] The distance matching pairs are used as the basic units to expand the mapping sequentially. If the mapping satisfies that there is no duplicate assignment, the recursion continues; otherwise, the process is backtracked to obtain multiple feasible candidate solutions.
[0104] The average point-pair error between the template point set and the source point set in each feasible candidate solution is calculated, and its expression is as follows:
[0105] ;
[0106] in, Indicates the average point error. Indicates the number of marker points within the template point set. The template point set represents the first The coordinates of the marker points Represents the corresponding source point set The three-dimensional coordinates Represents the rotation matrix. Let denote the translation matrix. The rotation matrix and translation matrix are obtained by least-squares solution of the feasible candidate solutions using singular value decomposition (SVD).
[0107] The feasible candidate solution with the smallest average point pair error is selected as the optimal solution. If the maximum permissible error of the optimal solution is less than 0.05mm, the optimal solution is output as the final result. If the maximum permissible error of the optimal solution is greater than 0.05mm, an empty result is output, indicating that a reasonable match could not be obtained under the current tolerance conditions.
[0108] Repeat the identification phase to achieve position identification of all target instruments in three-dimensional space.
[0109] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for instrument design identification for optical surgical navigation, characterized in that, include: S1. Obtain the left camera image, the right camera image, and the template point set of multiple instruments; S2. Extract several bright connected components from the left camera image and the right camera image respectively, and calculate the two-dimensional coordinates of the centroid of each bright connected component. S3. Combine the two-dimensional coordinates of the centroids of the bright connected regions in the left and right camera images in pairs, and use the principle of binocular vision to calculate the three-dimensional coordinates of each combination to form a source point set. S4. Select an instrument, calculate the distance between any two marker points based on the template point set of the instrument, and construct the first symmetric distance matrix. S5. Calculate the distance between any two three-dimensional coordinates based on the source point set and construct the second symmetric distance matrix; S6. Expand the upper triangular parts of the first symmetric distance matrix and the second symmetric distance matrix into a first one-dimensional vector and a second one-dimensional vector, respectively, and calculate the distance difference between all data elements between the first one-dimensional vector and the second one-dimensional vector. S7. Compare the distance difference with the preset tolerance, and take the data elements in the first one-dimensional vector and the second one-dimensional vector corresponding to the distance difference that is less than the preset tolerance to form multiple distance matching pairs; S8. Based on the distance matching pairs, the 3D coordinate layout of the marker points is recursively mapped and matched to the source point set through depth-first search to obtain multiple feasible candidate solutions. S9. Select the optimal solution from multiple feasible candidate solutions; S10. Repeat S4~S9 to achieve position recognition of all instruments in three-dimensional space.
2. The instrument design identification method for optical surgical navigation according to claim 1, characterized in that, Both the left and right camera images were obtained by photographing the instruments during the surgical procedure.
3. The instrument design identification method for optical surgical navigation according to claim 1, characterized in that, The design method for the template point set of the instrument includes: Generate an initial template point set; Based on a hill-climbing strategy with random perturbation, the initial template point set is iteratively optimized to obtain the template point set.
4. The instrument design identification method for optical surgical navigation according to claim 3, characterized in that, The method for generating the initial template point set includes: Set a marker point at the origin of polar coordinates, and use polar coordinates to perform random sampling to determine the remaining marker points; Determine whether the remaining marker points meet the constraints. If they do not meet the constraints, resample until the remaining marker points meet the constraints. The coordinates of all the marker points are centered to form the initial template point set.
5. The instrument design identification method for optical surgical navigation according to claim 4, characterized in that, The random sampling is in radius, It is carried out uniformly within the angle range; The expression for the centralized processing is: ; ; in, Represents the three-dimensional coordinates of the center point. Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the first Marker points Axis coordinates Indicates the number of marker points. Indicates the first The three-dimensional coordinates after centering the marker points For the first The three-dimensional coordinates of the marker points.
6. The instrument design identification method for optical surgical navigation according to claim 3, characterized in that, The hill-climbing strategy based on random perturbation iteratively optimizes the initial template point set to obtain the template point set, including: D1. Construct a distance feature vector from the distance between any two markers within an instrument. D2. Calculate the current minimum discrimination of the distinct instrument pair, expressed as: ; ; in, Indicates the minimum distinguishability. Indicates the degree of differentiation. Indicates the first one inside a device 1 eigenvector Indicates the first one inside another device 1 eigenvector Represents the L2 norm; D3. Randomly select a marker point and apply a uniform random perturbation to it. The perturbation amplitude is within... Within the range, the disturbed marker points are obtained; D4. Determine whether the marker point after the disturbance meets the limiting conditions. If it meets the limiting conditions, recalculate the minimum discrimination of the dissimilar instrument pair. If the minimum discrimination of the dissimilar instrument pair obtained after the recalculation is greater than the current minimum discrimination, modify the coordinates of the marker point to the three-dimensional coordinates after the disturbance. D5. Repeat steps D3 to D4 until the maximum number of iterations is reached to obtain the template point set.
7. The instrument design identification method for optical surgical navigation according to claim 4 or 6, characterized in that, When the number of markers on the instrument is set to 4, the limiting conditions include that the distance between any two markers is between 25 and 150 mm, the difference between any two markers is not less than 3 mm, and the area of the triangle formed by any three markers is not less than 100 mm². 2 The volume of the tetrahedron formed by the four marker points is not less than 1000 mm². 3 .
8. The instrument design identification method for optical surgical navigation according to claim 1, characterized in that, The expression for calculating the two-dimensional coordinates of the centroid of the bright-colored connected region is as follows: ; in, Represent the two-dimensional coordinates of the centroid of the bright-colored connected region. Represents the set of pixels in the bright-colored connected component. Represents pixels grayscale value, Indicates the first 1 pixel of coordinate, Indicates the first 1 pixel of coordinate.
9. The instrument design identification method for optical surgical navigation according to claim 1, characterized in that, The expression for calculating the distance difference between the data elements is: ; in, Represents the first one-dimensional vector. The data value and the second one-dimensional vector. The distance difference between the data values Represents the first one-dimensional vector. One data value, Represents the second one-dimensional vector. One data value; The process of recursively mapping the 3D coordinate layout of the marker points to the source point set using a depth-first search based on distance matching pairs yields multiple feasible candidate solutions, including: The distance matching pairs are used as the basic units to expand the mapping sequentially. If the mapping satisfies that there is no duplicate assignment, the recursion continues; otherwise, the process is backtracked to obtain multiple feasible candidate solutions.
10. The instrument design identification method for optical surgical navigation according to claim 1, characterized in that, The selection of the optimal solution from multiple feasible candidate solutions includes: The average point-pair error between the template point set and the source point set in each feasible candidate solution is calculated, and its expression is as follows: ; in, Indicates the average point error. Indicates the number of marker points within the template point set. The template point set represents the first The coordinates of the marker points Represents the corresponding source point set The three-dimensional coordinates Represents the rotation matrix. Represents the translation matrix; The feasible candidate solution with the smallest average point pair error is selected as the optimal solution.