A tracking display method, device, equipment and medium of a surgical instrument
Patent Information
- Application Number
- CN202611226729.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]基础外科手术器械(如手术刀、剪、钳、镊夹和针等)具有精密纤细的特点,且运动模式复杂,包括单体刚性运动、局部机械运动和非刚性复合运动,这对手术器械的精准三维跟踪展示提出了巨大挑战
[0027]本发明实施例通过获取多视图的深度图与 RGB 图并融合得到融合点云,结合三维模型的元数据区分不同手术器械的运动模式;针对复合机械运动模式,根据手术器械的树形父子层级关系,以根构件位姿和子构件相对转动角度为参数替代手术器械的整体刚体拟合;贴合手术器械的真实关节运动约束,避免无约束拟合导致的结构错位,同时依托多视图融合数据提升观测维度,最终提高复合机械运动类的手术器械的跟踪展示的精度与结构合理性。
Smart Images

Figure CN123015598A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of instrument tracking and display technology, and in particular to a method, device, equipment and medium for tracking and displaying surgical instruments. Background Technology
[0002] Three-dimensional tracking and display technology for surgical instruments is of great significance in improving surgical precision, accurate surgical navigation, optimizing surgical path planning, reducing surgical risks, as well as medical training and surgical simulation research.
[0003] Basic surgical instruments (such as scalpels, scissors, forceps, tweezers, and needles) are characterized by their precision and delicacy, and their motion patterns are complex, including single rigid motion, local mechanical motion, and non-rigid composite motion. This poses a great challenge to the accurate three-dimensional tracking and display of surgical instruments. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for tracking and displaying surgical instruments, in order to improve the accuracy and robustness of tracking and displaying surgical instruments.
[0005] In a first aspect, embodiments of the present invention provide a method for tracking and displaying surgical instruments, comprising:
[0006] Obtain the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model;
[0007] The depth map and RGB map of each view are fused to obtain a fused point cloud;
[0008] Based on the metadata of the three-dimensional model, determine the motion pattern of the surgical instrument;
[0009] If the motion mode is a composite mechanical motion mode, then at least one component model in the three-dimensional model is identified, as well as the tree-like parent-child hierarchical relationship between the component models;
[0010] The pose of the root component model and the relative rotation angle of each sub-component model are determined as the first parameter; the root component model is a component model that does not have a parent component model; the sub-component models are component models that have a parent component model; the relative rotation angle is the rotation angle of the sub-component model relative to its parent component model.
[0011] Based on the component models and the fused point cloud, the first parameter matching the fused point cloud is solved to obtain the target parameter;
[0012] Based on the component models and the target parameters, render and display an image of the surgical instrument.
[0013] Secondly, embodiments of the present invention also provide a tracking and display device for surgical instruments, comprising:
[0014] The acquisition module is used to acquire the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model;
[0015] The fusion module is used to fuse the depth map and RGB map of each view to obtain a fused point cloud;
[0016] The mode determination module is used to determine the motion mode of the surgical instrument based on the metadata of the three-dimensional model;
[0017] The identification module is used to identify at least one component model in the three-dimensional model and the tree-shaped parent-child hierarchical relationship between the component models if the motion mode is a composite mechanical motion mode.
[0018] The parameter determination module is used to determine the pose of the root component model and the relative rotation angle of each sub-component model as the first parameter; the root component model is a component model without a parent component model; the sub-component models are component models with a parent component model; the relative rotation angle is the rotation angle of the sub-component model relative to its parent component model.
[0019] The solution module is used to solve for the first parameter matching the fused point cloud based on each component model and the fused point cloud, and obtain the target parameter.
[0020] The display module is used to render and display images of the surgical instruments based on the component models and the target parameters.
[0021] Thirdly, embodiments of the present invention also provide an electronic device, comprising:
[0022] At least one processor; and
[0023] A memory that is communicatively connected to at least one processor; wherein
[0024] The memory stores instructions that can be executed by at least one processor, such that the at least one processor is able to perform the tracking and display method of surgical instruments provided in any embodiment of the present invention.
[0025] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the surgical instrument tracking and display method of any embodiment of the present invention.
[0026] Fifthly, embodiments of the present invention also provide a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the surgical instrument tracking and display method of any embodiment of the present invention.
[0027] This invention obtains a fused point cloud by acquiring depth maps and RGB images from multiple views and fusing them. It then uses the metadata of the 3D model to distinguish the motion modes of different surgical instruments. For composite mechanical motion modes, based on the tree-like parent-child hierarchical relationship of the surgical instruments, the overall rigid body fitting of the surgical instruments is replaced by the pose of the root component and the relative rotation angle of the child components. This fits the actual joint motion constraints of the surgical instruments, avoiding structural misalignment caused by unconstrained fitting. At the same time, it relies on multi-view fusion data to improve the observation dimension, ultimately improving the accuracy and structural rationality of tracking and displaying composite mechanical motion surgical instruments.
[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a method for tracking and displaying surgical instruments according to Embodiment 1 of the present invention;
[0031] Figure 2 This is a flowchart of a method for tracking and displaying surgical instruments according to Embodiment 2 of the present invention;
[0032] Figure 3 This is a schematic diagram of the structure of a surgical instrument tracking and display device according to Embodiment 3 of the present invention;
[0033] Figure 4 This is a structural diagram of an electronic device that implements a method for tracking and displaying surgical instruments according to an embodiment of the present invention. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0036] The acquisition, storage, and application of depth maps and RGB images involved in the technical solutions of this invention comply with relevant laws and regulations and do not violate public order and good morals.
[0037] Example 1
[0038] Figure 1 This is a flowchart of a method for tracking and displaying surgical instruments according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the position and orientation of surgical instruments are determined and images of surgical instruments are rendered and displayed. This method can be executed by a surgical instrument tracking and display device, which can be implemented in hardware and / or software and specifically configured in an electronic device.
[0039] See Figure 1 The method for tracking and demonstrating the surgical instruments shown includes:
[0040] S101. Obtain the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model.
[0041] S102. The depth map and RGB map of each view are fused to obtain a fused point cloud.
[0042] S103. Determine the motion mode of the surgical instrument based on the metadata of the three-dimensional model.
[0043] S104. If the motion mode is a composite mechanical motion mode, then identify at least one component model in the three-dimensional model, and the tree-like parent-child hierarchical relationship between each component model.
[0044] S105. The pose of the root component model and the relative rotation angle of each sub-component model are determined as the first parameter.
[0045] S106. Based on the component models and the fused point cloud, solve for the first parameter that matches the fused point cloud to obtain the target parameter.
[0046] S107. Render and display an image of the surgical instrument based on the component models and the target parameters.
[0047] In this embodiment, surgical instruments may include, but are not limited to, scalpels, forceps, scissors, surgical clamps, and needles; the view can refer to the view of the surgical instrument, which can be obtained from various views of the surgical instrument by sensors placed at different locations. The depth map can be obtained through a depth sensor; the RGB image can be obtained through a camera.
[0048] In one alternative embodiment, a multi-angle multi-sensor array system with multiple sets of high-resolution RGB cameras and depth sensors can be used to capture the depth map and RGB map of surgical instruments in real time; sub-microsecond time synchronization can be achieved through an IEEE 1588 synchronization control system to ensure the consistency of the depth map and RGB map of multiple views.
[0049] In this embodiment, the three-dimensional model can be a digital simulation model. The component model can be the corresponding model of the surgical instrument's components in the three-dimensional model. Taking a scalpel's three-dimensional model as an example, the component models can include, but are not limited to, the right-blade model and the left-blade model. The pose can be a six-degree-of-freedom pose.
[0050] Metadata for a 3D model can include topological metadata, including but not limited to rigid body mesh identifiers, movable part identifiers, flexible mesh identifiers, kinematic tree configuration data, and motion degree-of-freedom parameters. Rigid body mesh identifiers can identify independent geometric meshes in a 3D model that are non-deformable and capable of translation and rotation. Movable part identifiers can identify components in a 3D model that can move independently. Flexible mesh identifiers can identify geometric meshes in a 3D model that can undergo deformations such as stretching and bending. Kinematic tree configuration data can record the hierarchical relationships, connection positions, and associated objects between components in the 3D model. Motion degree-of-freedom parameters can include, but are not limited to, the translation axes, rotation axes, and constraint variation ranges of each component.
[0051] The motion mode can include, but is not limited to, composite mechanical motion mode, single rigid motion mode, and non-rigid motion mode. The composite mechanical motion mode can be a motion mode in which multiple components work together in a coordinated manner; the single rigid motion mode can be a motion mode in which a rigid mesh is translated or rotated as a whole, with no relative displacement between the components, and the components themselves do not deform; the non-rigid motion mode can be a motion mode in which the surgical instrument itself undergoes deformations such as stretching, bending, and twisting.
[0052] The hierarchical tree relationship between component models can be determined by the component connection tree configuration data, which is used to characterize the connection relationship between each component. The root component model can be a component model without a parent component model; the child component model can be a component model with a parent component model; the relative rotation angle is the 1-DOF rotation angle of the child component model relative to its parent component model; the target parameter can be the first parameter that matches the fused point cloud.
[0053] Specifically, the process involves acquiring the depth map and RGB image of the surgical instrument in at least one view, as well as the 3D model of the surgical instrument and its metadata; extracting feature points and descriptors from the RGB images of each view, and establishing a cross-view feature point correspondence using a bidirectional matching algorithm; backprojecting the depth maps of each view to generate a 3D point cloud, and extracting point cloud edge features, as well as extracting 2D contour edge features from the RGB images of each view; using the feature point correspondence as initial values, aligning the point clouds of multiple views using an iterative nearest-point algorithm; using Kalman filtering to perform temporal smoothing of extrinsic parameters, and updating the extrinsic parameter matrices of each sensor to the global coordinate system; mapping the 2D contours and 3D point clouds of each view to the global coordinate system through the extrinsic parameter matrices to obtain a fused point cloud; reading the topological metadata of the 3D model; if the metadata is only a single rigid mesh identifier and has no movable part identifier or flexible mesh identifier, the motion mode is determined to be a single rigid motion mode; if the metadata contains component connection tree (Kinematic Tree) configuration data and motion degree of freedom parameters, the motion mode is determined to be a composite mechanical motion mode; if the metadata contains flexible mesh identifiers, the motion mode is determined to be a non-rigid motion mode.
[0054] In an optional embodiment, before fusing the depth maps and RGB images of each view to obtain a fused point cloud, depth completion processing can be performed on the depth maps of each view. Depth completion processing is performed on the original depth maps of multiple views, and interpolation and filtering algorithms are used to repair depth gaps caused by metallic reflections or occlusions. Feature enhancement processing is performed on the RGB images of each view, and contrast-limited adaptive histogram equalization or filtering operations are used to enhance the edge and contour features of the textureless surgical instruments.
[0055] This invention obtains a fused point cloud by acquiring depth maps and RGB images from multiple views and fusing them. It then uses the metadata of the 3D model to distinguish the motion modes of different surgical instruments. For composite mechanical motion modes, based on the tree-like parent-child hierarchical relationship of the surgical instruments, the overall rigid body fitting of the surgical instruments is replaced by the pose of the root component and the relative rotation angle of the child components. This fits the actual joint motion constraints of the surgical instruments, avoiding structural misalignment caused by unconstrained fitting. At the same time, it relies on multi-view fusion data to improve the observation dimension, ultimately improving the accuracy and structural rationality of tracking and displaying composite mechanical motion surgical instruments.
[0056] Example 2
[0057] Figure 2 This is a flowchart of a method for tracking and displaying surgical instruments according to Embodiment 2 of the present invention. The present invention is an optimization and improvement based on the technical solution of the above embodiments.
[0058] Furthermore, the phrase "based on each component model and the fused point cloud, solve for the first parameter matching the fused point cloud to obtain the target parameter" is refined to: "For each component model, based on the fused point cloud and the component model, determine the degree of projection contour matching of the component model in each view; based on the degree of projection contour matching of each view, solve for the first matching pose of the component model and the fused point cloud, and obtain the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose; based on the first matching pose of each component model and the tree-like parent-child hierarchical relationship between each component model..." The iterative value of the first parameter is determined; the iterative pose of each component model is determined based on the iterative value of the first parameter; for each component model, the kinematic Jacobian matrix of the iterative pose of the component model with respect to the first parameter is determined; based on the kinematic Jacobian matrix of each component model, the global gradient matrix and global Hessian matrix of each component model are mapped to the manifold space of the first parameter to obtain the joint gradient matrix and the joint Hessian matrix; based on the joint gradient matrix and the joint Hessian matrix, the Newton iterative equation of the component model is constructed, and the first parameter matching the fused point cloud is solved to obtain the target parameter.
[0059] It should be noted that for any parts not described in detail in the embodiments of the present invention, please refer to the description in the foregoing embodiments.
[0060] See Figure 2 The method for tracking and demonstrating the surgical instruments shown includes:
[0061] S201. Obtain the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model.
[0062] S202. Determine the motion mode of the surgical instrument based on the metadata of the three-dimensional model.
[0063] S203. If the motion mode is a composite mechanical motion mode, then identify at least one component model in the three-dimensional model, and the tree-like parent-child hierarchical relationship between each component model.
[0064] S204. The pose of the root component model and the relative rotation angle of each sub-component model are determined as the first parameter.
[0065] S205. For each component model, determine the degree of projection contour matching of the component model in each view based on the fused point cloud and the component model.
[0066] S206. Based on the degree of matching of the projected contours of each view, solve the first matching pose of the component model and the fused point cloud, and obtain the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose.
[0067] S207. Determine the iterative value of the first parameter based on the first matching pose of each component model and the tree-like parent-child hierarchical relationship between each component model.
[0068] S208. Determine the iterative pose of each component model based on the iterative value of the first parameter.
[0069] S209. For each component model, determine the kinematic Jacobian matrix of the iterative pose of the component model with respect to the first parameter.
[0070] S210. Based on the kinematic Jacobian matrix of each component model, map the global gradient matrix and global Hessian matrix of each component model to the manifold space of the first parameter to obtain the joint gradient matrix and joint Hessian matrix.
[0071] S211. Based on the joint gradient matrix and the joint Hessian matrix, construct the Newton-style iterative equation of the component model, solve for the first parameter that matches the fused point cloud, and obtain the target parameter.
[0072] S212. Render and display an image of the surgical instrument based on the component models and the target parameters.
[0073] In this embodiment, the projection contour matching degree can be used to characterize the degree of matching between the projected contour of the component model on the view plane and the true contour of the component model. The individual gradient matrix can be the gradient matrix of a single view with respect to the pose of the component model; the individual Hessian matrix can be the Hessian matrix of the projection contour matching degree of a single view with respect to the pose of the component model. The global gradient matrix can be the fusion result of the gradient matrices of all views; the global Hessian matrix can be the fusion result of the Hessian matrices of all views.
[0074] Specifically, using a certain algorithm, for each component model, based on the fused point cloud and the component model, the degree of projection contour matching of the component model in each view is determined; using a certain algorithm, based on the degree of projection contour matching of each view, the pose of the component model is solved, and the solution result and the global gradient matrix and global Hessian matrix of the component model corresponding to the solution result are obtained.
[0075] For two component models with a tree-like parent-child hierarchical relationship, based on the first matching pose of the parent component model and the first matching pose of the child component model, the auxiliary local rotation matrix of the child component model relative to the parent component model is determined; the auxiliary relative rotation angle of the child component model relative to the parent component model is then solved from the auxiliary local rotation matrix; for example, the auxiliary local rotation matrix of the child component model relative to the parent component model can be determined by the following formula:
[0076] ;
[0077] in, The auxiliary local rotation matrix represents the sub-component model Z; This represents the first matching pose of the parent component model of the child component model Z; This represents the first matched pose of the sub-component model Z; This represents the auxiliary relative rotation angle of the sub-component model.
[0078] The first matching pose of the root component model and the auxiliary relative rotation angle of the sub-component model are determined as the initial value of the first parameter, and the initial value of the first parameter is used as the iterative value of the first parameter; the iterative value of the first parameter includes the iterative pose of the root component model and the iterative relative rotation angle of each sub-component model.
[0079] For the root component model, the iterative pose of the root component model can be determined from the iterative value of the first parameter; for each sub-component model, the iterative pose of the sub-component model can be determined based on the iterative relative rotation angle of the sub-component model and the iterative pose of the parent component model of the sub-component model; for example, the iterative pose of the sub-component model can be determined by the following formula:
[0080] ;
[0081] in, Represents the iterative pose of the sub-component model Z; This represents the iterative pose of the parent component model of the child component model Z; This represents the iterative relative rotation angle of the sub-component model Z; express The corresponding local rotation transformation matrix.
[0082] It should be noted that in the initial process of the solution, that is, when the iteration value is the initial value, the step of determining the iterative pose of each component model based on the iteration value of the first parameter can be executed, and the first matching pose of each component model can be used as the iterative pose; in the subsequent iterative solution process, the step of determining the iterative pose of each component model based on the iteration value of the first parameter can be executed, so as to obtain the iterative pose of each component model during the iteration of the first parameter.
[0083] For each component model, determine the kinematic Jacobian matrix of the iterative pose of the component model with respect to the first parameter; for example, the kinematic Jacobian matrix can be determined by the following formula:
[0084] ;
[0085] ;
[0086] in, The kinematic Jacobian matrix of component model k; This represents the iterative pose for constructing model k; Indicates the first parameter; Represents the iterative pose of the root component model; This represents the iterative relative rotation angle of the first child component model relative to its parent component model; This represents the iterative relative rotation angle of the second sub-component model relative to its parent component model; This represents the iterative relative rotation angle of the nth child component model relative to its parent component model.
[0087] Based on the kinematic Jacobian matrix of each component model, the global gradient matrix and global Hessian matrix of each component model are mapped onto the manifold space of the first parameter to be determined, respectively, to obtain the joint gradient matrix and joint Hessian matrix; for example, the joint gradient matrix can be determined by the following formula:
[0088] ;
[0089] in, Represents the joint gradient matrix; This represents the global gradient matrix of component model k.
[0090] For example, the joint Hessian matrix can be determined by the following formula:
[0091] ;
[0092] in, Represents the joint Hessian matrix; This represents the global Hessian matrix of component model k.
[0093] Based on the joint gradient matrix and the joint Hessian matrix, a Newton-style iterative equation for the component model is constructed. A constrained damped Newton-style algorithm is used, with physical joint limitations between components (e.g., the range of scissor opening angles) as constraints. The increment of the first parameter is solved until it converges. The converged increment of the first parameter is then fused with the iterative value of the first parameter in a single solution process corresponding to the converged increment to obtain the target parameter. For example, the Newton-style iterative equation can be determined by the following formula:
[0094] ;
[0095] in, This indicates the increment of the first parameter.
[0096] If the increment of the first parameter does not converge, the non-convergent increment of the first parameter is merged with the iterative value of the first parameter in a single solution process corresponding to the non-convergent increment of the first parameter to update the iterative value of the first parameter. Based on the updated iterative value of the first parameter, the iterative pose of each component model is re-determined. For each component model, the component model is projected into each view according to the iterative pose of the component model, and the projection contour matching degree of the component model in each view is re-determined. Based on the re-determined projection contour matching degree of each view, the first and second derivatives with respect to the iterative pose are calculated, and the iterative pose is re-determined. The global gradient matrix and global Hessian matrix of the component model corresponding to the pose are obtained; for each component model, the kinematic Jacobian matrix of the iterative pose of the component model with respect to the first parameter is redefined; based on the redefined kinematic Jacobian matrix of each component model, the global gradient matrix and global Hessian matrix of each component model are remapped into the manifold space of the first parameter to obtain the joint gradient matrix and joint Hessian matrix; based on the redefined joint gradient matrix and joint Hessian matrix, the Newton iterative equation of the component model is constructed, and the increment of the first parameter is solved until the increment of the first parameter converges.
[0097] Optionally, determining the projection contour matching degree of the component model in each view based on the fused point cloud and the component model for each component model includes: performing point cloud registration on the component model based on the fused point cloud to obtain the projection pose; determining the projection contour of the component model projected onto the view under the projection pose of the component model for each view; sampling at least one auxiliary point on the projection contour; for each auxiliary point, determining the pixel search line segment corresponding to the auxiliary point in the normal direction corresponding to the tangent of the auxiliary point; for each pixel on the pixel search line segment, determining the foreground probability and background probability of the pixel based on the depth value and RGB value of the pixel; and determining the foreground probability and background probability of the pixel based on the depth value and RGB value of the pixel. The foreground posterior probability of a pixel is determined by considering the foreground probability, background probability, foreground prior ratio, and background prior ratio. For each pixel search line segment, the edge probability density distribution of the pixel search line segment is determined based on the foreground posterior probability of each pixel on the pixel search line segment. Using the offset position of the projected contour of the component model on the pixel search line segment under the projected pose as a parameter, the edge probability density value corresponding to the offset position is determined based on the edge probability density distribution of the pixel search line segment, and used as the projection contour matching likelihood value of the pixel search line segment. The projection contour matching likelihood values of each pixel search line segment under the view are fused to obtain the overall matching degree of the projection contour of the component model under the view.
[0098] Among them, the projection pose can be the pose of the component model when projection is performed; the foreground probability can be the probability that a pixel is a point on the surgical instrument; the background probability can be the probability that a pixel is a point in the surgical background; the projection contour matching degree can be used to characterize the matching degree between the projection contour of the component model on the view plane and the segmentation contour between the foreground and background of the view plane.
[0099] Specifically, using the ICP algorithm, the component model is registered based on the fused point cloud to obtain a projection pose; for each view, a planar view of the fused point cloud is determined in that view; according to the projection pose, the vertices of the 3D model are projected onto the planar view to obtain the projection contour of the component model projected onto the view in the projection pose; at least one pixel is sampled on the projection contour as an auxiliary point according to a set sampling point interval; for each auxiliary point, a fixed number of pixels are extended outwards from the auxiliary point as the center in the direction corresponding to the tangent of the auxiliary point, to obtain a pixel search line segment corresponding to the auxiliary point; the center of the pixel search line segment is the auxiliary point, and the length is the set number of pixels; for the pixel search line segment... For each pixel, the depth value and RGB value of the pixel are input into a Gaussian mixture model of the surgical instrument foreground, which is pre-trained based on historical samples, to obtain the foreground probability predicted by the Gaussian mixture model of the surgical instrument foreground. Similarly, the depth value and RGB value of the pixel are input into a Gaussian mixture model of the surgical background, which is pre-trained based on historical samples, to obtain the background probability predicted by the Gaussian mixture model of the surgical background. The Gaussian mixture model can be represented by the weights, mean vector, and covariance matrix of multiple Gaussian components. Based on the foreground probability and background probability of the pixel, as well as the foreground prior ratio and background prior ratio, the foreground posterior probability of the pixel is determined. For example, the foreground posterior probability of the pixel can be expressed by the following formula:
[0100] ;
[0101] in, This represents the foreground posterior probability of pixel j; This represents the foreground probability of pixel k; This represents the background probability of pixel j; Indicates the proportion of the foreground prior; Indicates the background prior proportion.
[0102] For each pixel search line segment, the foreground posterior probability of each pixel on the pixel search line segment is continuously modeled to obtain the edge probability density distribution of the pixel search line segment. Using the offset position of the projected contour of the component model under the projected pose on the pixel search line segment as a parameter, the offset position is substituted into the edge probability density distribution of the pixel search line segment to obtain the edge probability density value corresponding to the offset position, which is used as the projection contour matching likelihood value of the pixel search line segment. The projection contour matching likelihood values of each pixel search line segment under the view are fused to obtain the overall matching degree of the projection contour of the component model under the view. For example, the projection contour matching degree can be determined by the following formula:
[0103] ;
[0104] in, Indicates the degree of matching of the projected contours; Represents the projected pose of the constructed model; This represents the set of pixel search line segments under the view; This indicates the number of pixel search lines in the view. This represents the likelihood value of the projected contour matching; Indicates the offset position; This represents the scaling domain of the i-th pixel search segment, which can be used to control the bandwidth and smoothness of the edge probability density distribution on the i-th pixel search segment; This represents the search line segment for the i-th pixel.
[0105] Understandably, by adopting the above technical solution, a 3D model can be projected, and pixel search segments can be generated along the tangents of the sampled auxiliary points on the projected contour, corresponding to the normals. The foreground probability and background probability of each pixel on the pixel search segment can be determined, thereby constructing an edge probability density distribution as the contour matching likelihood. This can resist interference from metallic reflections, local occlusion, and lighting fluctuations, overcome the incompatibility of traditional pure vision algorithms with surgical instruments that are textureless, reflective, occluded, and motion-blurred, and improve accuracy.
[0106] Optionally, the step of solving the first matching pose of the component model and the fused point cloud based on the projection contour matching degree of each of the views, and obtaining the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose, includes: for each view, determining the confidence weight corresponding to each view based on the foreground posterior probability of the pixel point on the search line segment corresponding to each of the auxiliary points in the view; determining the individual gradient matrix and individual Hessian matrix of the projection contour matching degree of the component model in the view with respect to the projection pose; fusing the individual gradient matrices of the view according to the confidence weights corresponding to each view to obtain an intermediate gradient matrix; and fusing the individual Hessian matrices of the view according to the confidence weights corresponding to the view to obtain an intermediate Hessian matrix. Based on the intermediate gradient matrix and the intermediate Hessian matrix, a Newton-style iterative equation is constructed to solve for the pose increment of the component model, and it is determined whether the solution result of the pose increment is less than a preset threshold. If the solution result is greater than or equal to the preset threshold, the projection pose is updated to the sum of the projection pose and the pose increment, and the process is repeated for each view to determine the projection contour of the component model projected onto the view under the projection pose of the component model, until the solution result of the pose increment is less than the preset threshold. If the solution result is less than the preset threshold, the sum of the pose increment and the intermediate pose is determined as the first matching pose, the intermediate gradient matrix is determined as the global gradient matrix, and the intermediate Hessian matrix is determined as the global Hessian matrix.
[0107] Specifically, for each view, a certain algorithm is used to determine the confidence weight corresponding to each view based on the foreground posterior probability of pixels on the search line segment corresponding to each auxiliary point in the view; the first derivative of the projection contour matching degree of the component model in the view with respect to the projection pose is obtained to obtain the individual gradient matrix, and the second derivative of the projection contour matching degree of the component model in the view with respect to the projection pose is obtained to obtain the individual Hessian matrix; according to the confidence weight corresponding to each view, the individual gradient matrices of the view are weighted and summed to obtain the intermediate gradient matrix, and the individual Hessian matrices of the view are weighted and summed to obtain the intermediate Hessian matrix; based on the intermediate gradient matrix and the intermediate Hessian matrix, a second-order Newton optimization algorithm with Tikhonov regularization is used to construct a Newton iteration equation to solve for the pose increment of the component model, and it is determined whether the solution result of the pose increment is less than a preset threshold; for example, the pose increment can be determined by the following formula:
[0108] ;
[0109] in, This represents the pose increment corresponding to the projected pose. This represents the intermediate Hessian matrix corresponding to the projected pose; This represents the intermediate gradient matrix corresponding to the projected pose. Represents the Tikhonov regularization matrix; Represents the rotational regularization coefficient; This represents the translation regularization coefficient; Represents a 3x3 identity matrix.
[0110] If the solution result is greater than or equal to the preset threshold, the projection pose is updated to the sum of the projection pose and the pose increment, and the process returns to perform the step of determining the projection contour of the component model projected onto the view under the projection pose of the component model for each view, until the solution result of the pose increment is less than the preset threshold; if the solution result is less than the preset threshold, the sum of the pose increment and the intermediate pose is determined as the first matching pose, the intermediate gradient matrix is determined as the global gradient matrix, and the intermediate Hessian matrix is determined as the global Hessian matrix.
[0111] Understandably, by adopting the above technical solution, the confidence weight of each view is calculated based on the probability density distribution of pixels in each view, thereby weighting and fusing the individual view gradients and individual Hessian matrices of each view separately. This dynamic weighting suppresses the interference of low-quality views. By constructing Newton's iterative equations to solve for the pose increment, and if it does not converge, the pose is updated and the projected contour is recalculated. This iterative reprojection method ensures that the pose of the single component model converges to the optimal fitting value and the corresponding global gradient matrix and global Hessian matrix, ensuring the accuracy of the first matching pose of the root component model and the accuracy of the global gradient matrix and global Hessian matrix of each component model. This improves the accuracy of subsequent solutions for the optimal pose of the root component and the optimal relative rotation angle of each component.
[0112] Optionally, determining the confidence weight for each view based on the foreground posterior probability of the pixels on the search line segment corresponding to each auxiliary point in the view includes: determining the standard deviation of the probability distribution corresponding to the view based on the foreground posterior probability of the pixels on the search line segment corresponding to each auxiliary point in the view; and determining the confidence weight for each view based on the standard deviation of the probability distribution corresponding to each view.
[0113] Specifically, for each pixel search line segment, the mean of the foreground posterior probabilities of each pixel on the pixel search line segment is determined and used as the average foreground posterior probability of the pixel search line segment; for each view, the standard deviation of the average foreground posterior probabilities of each pixel search line segment in the view is calculated and used as the standard deviation of the probability distribution corresponding to the view; based on the standard deviation of the probability distribution corresponding to each view, the confidence weight corresponding to each view is determined; for example, the confidence weight can be determined by the following formula:
[0114] ;
[0115] in, This represents the confidence weight of the i-th view; Let represent the standard deviation of the probability distribution of the i-th view; Let represent the standard deviation of the probability distribution of the j-th view; Indicates the number of views.
[0116] Understandably, by adopting the above technical solution, the standard deviation of the distribution of the foreground posterior probability of pixels on the search line segment in each view can be used to calculate the confidence weight of each view: the more concentrated the probability distribution, the smaller the standard deviation, indicating that the view edge is clearer and the quality is higher, and the corresponding weight is greater; conversely, the weight of views with diffuse distribution due to occlusion or blurring is reduced; adaptive weighting of view quality is realized, which can effectively suppress the negative impact of local occlusion and reflection on the global solution, and significantly improve the robustness and anti-interference ability of the tracking process.
[0117] Optionally, the method further includes: if the motion mode is a single rigid motion mode, then, based on the fused point cloud and the three-dimensional model, determining the degree of projection contour matching of the three-dimensional model in each view; based on the degree of projection contour matching of each view, solving the second matching pose of the three-dimensional model and the fused point cloud; and rendering and displaying an image of the surgical instrument based on the three-dimensional model and the second matching pose.
[0118] The second matching pose can be the pose of the 3D model that matches the fused point cloud. It should be noted that the process for determining the second matching pose is similar to that for determining the first matching pose, and will not be repeated here.
[0119] Understandably, by adopting the above technical solution, for surgical instruments with a single rigid motion mode, multi-view projection contour matching is directly performed on the overall 3D model, and the second matching pose is solved before rendering and displaying. There is no need to disassemble the components and apply parent-child hierarchical constraints between multiple components, thus realizing the adaptation and tracking of surgical instruments with different motion modes.
[0120] Optionally, the method further includes: if the motion mode is a non-rigid motion mode, acquiring two images of adjacent frames of the surgical instrument; extracting key vertices on the 3D model; wherein, key vertices can be pointed points, such as the two ends of tweezers or clips used to pick up objects; projecting the key vertices on the 3D model into 2D image pixels through coordinate transformation; combining sparse optical flow and dense optical flow algorithms to calculate the 2D movement vector of the key vertex pixels between adjacent frames, and back-projecting it back to the 3D object coordinate system to obtain updated 3D key points; matching the updated 3D key points with their corresponding key vertices of the 3D model to construct a deformation constraint energy function based on maximum rigidity; minimizing the rigidity distortion of local regions while allowing global bending deformation of the model. The deformation constraint adopts maximum rigidity (As-Rigid-As-Possible, ARAP), which requires the aforementioned 3D offset as the boundary driving condition for deformation solution, i.e., hard constraint / control point target. Both the model and the solution method adopt the original ARAP method.
[0121] In one optional embodiment, for basic surgical instruments listed in the "Medical Device Classification Catalog," this embodiment provides a standardized method for constructing a dataset: High-precision 3D modeling of the basic surgical instruments is performed, and their corresponding rigid, composite, or non-rigid motion modes are set; third-party digital authoring tools (such as Blender) and Python scripts are used to drive the 3D model to execute preset trajectories; camera trajectories are customized and occlusions are added; using HDRI lighting and a realistic physical simulation rendering engine, RGB and depth image sequences containing highly realistic lighting, materials, motion blur, and shadow interference are generated; all pose data is automatically saved as ground truth (GT) using a script; optical markers (such as NDI Plaslas reflective spheres) are installed on key parts of the real surgical instruments; under different lighting conditions, occlusion ratios, and different movement speeds, a simulated real surgical environment is used for actual filming; a reference rigid pose is recorded through an optical positioning system, and image sequences are acquired synchronously by an RGB camera and a depth sensor. The acquired data is combined with the 3D model containing motion modes to complete high-precision pose acquisition and calculation for composite or non-rigid motion.
[0122] This invention first solves the first matching pose and the corresponding global gradient matrix and global Hessian matrix for each component model independently. Then, it maps the global gradient matrix and global Hessian matrix of the component model to a unified parameter space using the kinematic Jacobian matrix, and constructs a joint Newton iterative equation for solving. While preserving the fitting accuracy between the fused point cloud obtained from actual observation, it satisfies the tree-like parent-child hierarchical constraints between each component model. It can converge to the global optimal solution within the physically feasible range, further improving the accuracy and structural consistency of the surgical instrument tracking results of composite mechanical motion.
[0123] Example 3
[0124] Figure 3 This is a schematic diagram of a surgical instrument tracking and display device provided in Embodiment 3 of the present invention. This embodiment of the invention is applicable to situations where the position and orientation of surgical instruments are determined and images of surgical instruments are rendered and displayed. The device can execute a surgical instrument tracking and display method. This surgical instrument tracking and display device can be implemented in hardware and / or software, and can be configured in an electronic device.
[0125] See Figure 3 The surgical instrument tracking and display device shown includes an acquisition module 301, a fusion module 302, a pattern determination module 303, a recognition module 304, a parameter determination module 305, a solution module 306, and a display module 307, wherein...
[0126] The acquisition module 301 is used to acquire the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model;
[0127] The fusion module 302 is used to fuse the depth map and RGB map of each view to obtain a fused point cloud;
[0128] The mode determination module 303 is used to determine the motion mode of the surgical instrument based on the metadata of the three-dimensional model;
[0129] The identification module 304 is used to identify at least one component model in the three-dimensional model and the tree-shaped parent-child hierarchical relationship between the component models if the motion mode is a composite mechanical motion mode.
[0130] The parameter determination module 305 is used to determine the pose of the root component model and the relative rotation angle of each sub-component model as the first parameter; the root component model is a component model without a parent component model; the sub-component models are component models with a parent component model; the relative rotation angle is the rotation angle of the sub-component model relative to its parent component model.
[0131] Solving module 306 is used to solve for the first parameter matching the fused point cloud based on each component model and the fused point cloud, and obtain the target parameter;
[0132] The display module 307 is used to render and display images of the surgical instruments based on the component models and the target parameters.
[0133] The embodiments of the present invention are passed through
[0134] Optionally, solver module 306 includes:
[0135] The first determining unit is used to determine the degree of projection contour matching of the component model in each view, based on the fused point cloud and the component model.
[0136] The first solving unit is used to solve the first matching pose of the component model and the fused point cloud based on the degree of matching of the projected contours of each view, and to obtain the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose.
[0137] The second determining unit is used to determine the iterative value of the first parameter based on the first matching pose of each component model and the tree-like parent-child hierarchical relationship between each component model.
[0138] The third determining unit is used to determine the iterative pose of each of the component models based on the iterative value of the first parameter;
[0139] The fourth determining unit is used to determine the kinematic Jacobian matrix of the iterative pose of each component model with respect to the first parameter for each component model.
[0140] The mapping unit is used to map the global gradient matrix and global Hessian matrix of each component model to the manifold space of the first parameter according to the kinematic Jacobian matrix of each component model, so as to obtain the joint gradient matrix and the joint Hessian matrix.
[0141] The second solution module is used to construct the Newton-based iterative equation of the component model based on the joint gradient matrix and the joint Hessian matrix, solve for the first parameter that matches the fused point cloud, and obtain the target parameter.
[0142] Optionally, the first determining unit is specifically used for:
[0143] Based on the fused point cloud, point cloud registration is performed on the component model to obtain the projection pose;
[0144] For each view, determine the projection profile of the component model projected onto the view under the projection pose of the component model;
[0145] At least one auxiliary point is sampled on the projected contour;
[0146] For each auxiliary point, a pixel search line segment corresponding to the auxiliary point is determined in the direction of the normal corresponding to the tangent of the auxiliary point.
[0147] For each pixel on the pixel search line segment, the foreground probability and background probability of the pixel are determined based on the depth value and RGB value of the pixel.
[0148] The foreground posterior probability of a pixel is determined based on the foreground probability and background probability of the pixel, as well as the foreground prior ratio and background prior ratio.
[0149] For each pixel search line segment, the edge probability density distribution of the pixel search line segment is determined based on the foreground posterior probability of each pixel on the pixel search line segment.
[0150] Using the offset position of the projected contour of the component model under the projected pose on the pixel search line segment as a parameter, the edge probability density value corresponding to the offset position is determined according to the edge probability density distribution of the pixel search line segment, and used as the projection contour matching likelihood value of the pixel search line segment.
[0151] The projection contour matching likelihood values of the search line segments of each pixel under the view are fused to obtain the overall matching degree of the projection contour of the component model under the view.
[0152] Optionally, the first solution element includes:
[0153] The weight determination subunit is used to determine the confidence weight corresponding to each view based on the foreground posterior probability of the pixel point on the search line segment corresponding to each auxiliary point in the view.
[0154] The matrix determines the sub-unit, which is used to determine the individual gradient matrix and the individual Hessian matrix of the component model in the view with respect to the projection pose, representing the degree of matching of the projection contour of the component model in the view.
[0155] The fusion subunit is used to fuse the individual gradient matrices of the views according to the confidence weights corresponding to each view to obtain an intermediate gradient matrix, and to fuse the individual Hessian matrices of the views according to the confidence weights corresponding to each view to obtain an intermediate Hessian matrix.
[0156] The incremental solution subunit is used to construct a Newton iteration equation based on the intermediate gradient matrix and the intermediate Hessian matrix to solve the pose increment of the component model, and to determine whether the solution result of the pose increment is less than a preset threshold.
[0157] The update subunit is used to update the projection pose to the sum of the projection pose and the pose increment if the solution result is greater than or equal to the preset threshold, and return to execute the step of determining the projection contour of the component model projected on the view under the projection pose of the component model for each view, until the solution result of the pose increment is less than the preset threshold.
[0158] The first pose determination subunit is used to determine the sum of the pose increment and the intermediate pose as the first matching pose, and to determine the intermediate gradient matrix as the global gradient matrix and the intermediate Hessian matrix as the global Hessian matrix if the solution result is less than the preset threshold.
[0159] Optional, weight determination unit, specifically used for:
[0160] For each view, the standard deviation of the probability distribution corresponding to the view is determined based on the foreground posterior probability of the pixel points on the search line segment corresponding to each auxiliary point in the view.
[0161] The confidence weights for each view are determined based on the standard deviation of the probability distribution corresponding to each view.
[0162] Optionally, the device may also include:
[0163] The determination module is used to determine the degree of projection contour matching of the three-dimensional model in each view based on the fused point cloud and the three-dimensional model if the motion mode is a single rigid motion mode.
[0164] The pose solving module is used to solve the second matching pose of the 3D model and the fused point cloud based on the degree of matching of the projected contours of each view.
[0165] The image display module is used to render and display an image of the surgical instrument based on the 3D model and the second matching pose.
[0166] The surgical instrument tracking and display device provided in this embodiment of the invention can execute the surgical instrument tracking and display method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the surgical instrument tracking and display method.
[0167] Example 4
[0168] Figure 4 A schematic diagram of a surgical instrument tracking and display device 410, which can be used to implement embodiments of the present invention, is shown. The surgical instrument tracking and display device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The surgical instrument tracking and display device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0169] like Figure 4 As shown, the surgical instrument tracking and display device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412 or a random access memory (RAM) 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 can also store various programs and data required for the operation of the surgical instrument tracking and display device 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0170] Multiple components in the surgical instrument tracking and display device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, optical disk, etc.; and a communication unit 419, such as a network card, modem, wireless transceiver, etc. The communication unit 419 allows the surgical instrument tracking and display device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0171] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as the tracking and display method of surgical instruments.
[0172] In some embodiments, the surgical instrument tracking and display method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the surgical instrument tracking and display device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the surgical instrument tracking and display method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to perform the surgical instrument tracking and display method by any other suitable means (e.g., by means of firmware).
[0173] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0174] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable surgical instrument tracking display device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0175] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0176] To provide user interaction, the systems and techniques described herein can be implemented on a surgical instrument tracking display device, which includes: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the surgical instrument tracking display device. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0177] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0178] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.
[0179] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0180] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for tracking and displaying surgical instruments, characterized in that, The method includes: Obtain the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model; The depth map and RGB map of each view are fused to obtain a fused point cloud; Based on the metadata of the three-dimensional model, determine the motion pattern of the surgical instrument; If the motion mode is a composite mechanical motion mode, then at least one component model in the three-dimensional model is identified, as well as the tree-like parent-child hierarchical relationship between the component models; The pose of the root component model and the relative rotation angle of each sub-component model are determined as the first parameter; the root component model is a component model that does not have a parent component model; the sub-component models are component models that have a parent component model; the relative rotation angle is the rotation angle of the sub-component model relative to its parent component model. Based on the component models and the fused point cloud, the first parameter matching the fused point cloud is solved to obtain the target parameter; Based on the component models and the target parameters, render and display an image of the surgical instrument.
2. The method according to claim 1, characterized in that, The step of solving for the first parameter matching the fused point cloud based on each component model and the fused point cloud to obtain the target parameter includes: For each component model, the degree of projection contour matching of the component model in each view is determined based on the fused point cloud and the component model. Based on the degree of matching of the projected contours of each view, the first matching pose of the component model and the fused point cloud is solved, and the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose are obtained. The iterative value of the first parameter is determined based on the first matching pose of each component model and the tree-like parent-child hierarchical relationship between each component model; The iterative pose of each component model is determined based on the iterative value of the first parameter; For each component model, determine the kinematic Jacobian matrix of the iterative pose of the component model with respect to the first parameter; Based on the kinematic Jacobian matrix of each component model, the global gradient matrix and global Hessian matrix of each component model are mapped to the manifold space of the first parameter to obtain the joint gradient matrix and joint Hessian matrix. Based on the joint gradient matrix and the joint Hessian matrix, the Newton-style iterative equation of the component model is constructed, and the first parameter matching the fused point cloud is solved to obtain the target parameter.
3. The method according to claim 2, characterized in that, For each component model, determining the degree of projection contour matching of the component model in each view based on the fused point cloud and the component model includes: Based on the fused point cloud, point cloud registration is performed on the component model to obtain the projection pose; For each view, determine the projection profile of the component model projected onto the view under the projection pose of the component model; At least one auxiliary point is sampled on the projected contour; For each auxiliary point, a pixel search line segment corresponding to the auxiliary point is determined in the direction of the normal corresponding to the tangent of the auxiliary point. For each pixel on the pixel search line segment, the foreground probability and background probability of the pixel are determined based on the depth value and RGB value of the pixel. The foreground posterior probability of a pixel is determined based on the foreground probability and background probability of the pixel, as well as the foreground prior ratio and background prior ratio. For each pixel search line segment, the edge probability density distribution of the pixel search line segment is determined based on the foreground posterior probability of each pixel on the pixel search line segment. Using the offset position of the projected contour of the component model under the projected pose on the pixel search line segment as a parameter, the edge probability density value corresponding to the offset position is determined according to the edge probability density distribution of the pixel search line segment, and used as the projection contour matching likelihood value of the pixel search line segment. The projection contour matching likelihood values of the search line segments of each pixel under the view are fused to obtain the overall matching degree of the projection contour of the component model under the view.
4. The method according to claim 3, characterized in that, The step of solving the first matching pose of the component model and the fused point cloud based on the matching degree of the projected contours of each view, and obtaining the global gradient matrix and global Hessian matrix of the component model corresponding to the first matching pose, includes: For each view, the confidence weight corresponding to each view is determined based on the foreground posterior probability of the pixel point on the search line segment corresponding to each auxiliary point in the view. Determine the individual gradient matrix and individual Hessian matrix of the component model in the view with respect to the projection pose to determine the degree of matching of the projected contour of the component model in the view; Based on the confidence weights corresponding to each view, the individual gradient matrices of the view are fused to obtain an intermediate gradient matrix; and based on the confidence weights corresponding to the view, the individual Hessian matrices of the view are fused to obtain an intermediate Hessian matrix. Based on the intermediate gradient matrix and the intermediate Hessian matrix, a Newton iterative equation is constructed to solve for the pose increment of the component model, and it is determined whether the solution result of the pose increment is less than a preset threshold. If the solution result is greater than or equal to the preset threshold, the projection pose is updated to the sum of the projection pose and the pose increment, and the process returns to execute the step of determining the projection contour of the component model projected on the view under the projection pose of the component model for each view, until the solution result of the pose increment is less than the preset threshold. If the solution result is less than the preset threshold, the sum of the pose increment and the intermediate pose is determined as the first matching pose, the intermediate gradient matrix is determined as the global gradient matrix, and the intermediate Hessian matrix is determined as the global Hessian matrix.
5. The method according to claim 4, characterized in that, For each view, the confidence weight corresponding to each view is determined based on the foreground posterior probability of pixels on the search line segment corresponding to each auxiliary point in the view, including: For each view, the standard deviation of the probability distribution corresponding to the view is determined based on the foreground posterior probability of the pixel points on the search line segment corresponding to each auxiliary point in the view. The confidence weights for each view are determined based on the standard deviation of the probability distribution corresponding to each view.
6. The method according to claim 1, characterized in that, The method further includes: If the motion mode is a single rigid motion mode, then the degree of matching of the projected contour of the three-dimensional model in each view is determined based on the fused point cloud and the three-dimensional model. Based on the degree of matching of the projected contours of each view, the second matching pose of the 3D model and the fused point cloud is solved; Based on the 3D model and the second matching pose, an image of the surgical instrument is rendered and displayed.
7. A tracking and display device for surgical instruments, characterized in that, The device includes: The acquisition module is used to acquire the depth map and RGB map of the surgical instrument in at least one view, as well as the three-dimensional model of the surgical instrument and the metadata of the three-dimensional model; The fusion module is used to fuse the depth map and RGB map of each view to obtain a fused point cloud; The mode determination module is used to determine the motion mode of the surgical instrument based on the metadata of the three-dimensional model; The identification module is used to identify at least one component model in the three-dimensional model and the tree-shaped parent-child hierarchical relationship between the component models if the motion mode is a composite mechanical motion mode. The parameter determination module is used to determine the pose of the root component model and the relative rotation angle of each sub-component model as the first parameter; the root component model is a component model without a parent component model; the sub-component models are component models with a parent component model; the relative rotation angle is the rotation angle of the sub-component model relative to its parent component model. The solution module is used to solve for the first parameter matching the fused point cloud based on each component model and the fused point cloud, and obtain the target parameter. The display module is used to render and display images of the surgical instruments based on the component models and the target parameters.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform a method for tracking and displaying a surgical instrument according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for tracking and displaying surgical instruments as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method for tracking and displaying surgical instruments as described in any one of claims 1-6.
