Collision Detection Method and System Based on Hybrid Bounding Box and Lung Anatomical Features

By constructing a wide-level bounding volume of lung anatomical features and using Kalman filter prediction, combined with breadth-first and depth-first traversal algorithms, the computational redundancy and poor real-time performance of collision detection in lung resection surgery in existing technologies are solved, achieving efficient and real-time collision detection.

CN122287259APending Publication Date: 2026-06-26NANJING TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING TECH UNIV
Filing Date
2026-05-09
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing collision detection algorithms rely on object geometric features in their spatial partitioning and traversal strategies, leading to computational redundancy and poor real-time performance. This makes it particularly difficult to achieve high accuracy and real-time performance in lung resection surgery with complex anatomical structures.

Method used

A collision detection method based on hybrid bounding boxes and lung anatomical features is adopted to construct a wide-level bounding box with a three-level structure of lung, lung lobe, lung segment and lung lobule. Combining breadth-first and depth-first traversal algorithms, the position of the surgical instrument proxy ball is predicted by Kalman filter, and potential collision areas are screened and fine detection is performed.

Benefits of technology

It effectively reduces the overlap rate of node bounding boxes, avoids computational redundancy, and improves the real-time performance and accuracy of detection, making it suitable for surgical simulation and auxiliary operation of complex three-dimensional lung structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122287259A_ABST
    Figure CN122287259A_ABST
Patent Text Reader

Abstract

This invention discloses a collision detection method and system based on hybrid bounding boxes and lung anatomical features. The method includes: constructing bounding boxes for the lung, lung lobes, and lung segments based on a three-dimensional finite element model of the lung; determining intersecting lung segment bounding boxes using a breadth-first traversal algorithm; determining intersecting lung lobule bounding boxes using a depth-first traversal algorithm; and accurately detecting the collision position of a surgical instrument proxy ball using fine intersection detection to obtain the collision detection result. The depth-first traversal order is calculated based on the predicted positions of the lung segment bounding boxes and the surgical instrument proxy ball. This invention avoids the problems of computational redundancy and poor real-time performance in collision detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a collision detection method and system based on hybrid bounding boxes and lung anatomical features, belonging to the field of virtual surgery. Background Technology

[0002] Anatomical lung resection is a surgical procedure that precisely removes diseased tissue, along with connecting blood vessels and bronchi, strictly following the anatomical structure of the lung. It maximizes the removal of lesions while preserving healthy lung tissue, making it a core radical treatment for lung diseases such as lung cancer. According to data from the World Health Organization, approximately 500,000 to 800,000 anatomical lung resections are performed globally each year, accounting for about 70% of all lung cancer surgeries. The primary method for assisting anatomical lung resection is through virtual surgery, significantly enhancing surgical outcomes while aiding surgeons in preoperative planning and improving surgical safety. By constructing efficient, real-time collision detection models, surgeons can receive more intuitive spatial feedback and accurately assess the feasibility and risks of different resection pathways in preoperative simulations. Therefore, achieving high-precision, real-time collision detection under complex anatomical structures is a current research focus in anatomical lung resection simulation surgery.

[0003] In traditional collision detection methods, the spatial partitioning strategy of hierarchical bounding boxes simply relies on the geometric features of objects, which cannot reflect the hierarchical relationship of lung structures, resulting in computational redundancy in updating the tree structure.

[0004] In addition, most existing traversal strategies are breadth-first and depth-first unheuristic algorithms, which may lead to a large number of useless traversals, increasing computational costs and affecting the real-time performance of detection.

[0005] In summary, current collision detection algorithms still suffer from problems such as reliance on object geometric features and low bounding box traversal efficiency in terms of spatial partitioning and traversal strategies. To address these issues, a collision detection method and system based on hybrid bounding boxes and lung anatomical features were designed, which improves detection speed and real-time performance, and has promising application prospects. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a collision detection method and system based on hybrid bounding boxes and lung anatomical features. This method can avoid the problems of computational redundancy and poor real-time performance in collision detection.

[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0008] In a first aspect, the present invention provides a collision detection method based on hybrid bounding boxes and lung anatomical features, comprising:

[0009] A three-dimensional finite element model of the lungs is obtained; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures;

[0010] Based on the three-dimensional finite element model of the lung, bounding boxes for the lung, lung lobe, lung segment and lung lobule are constructed respectively, and the bounding boxes for the lung, lung lobe and lung segment are merged into a wide-level bounding body with a three-level structure.

[0011] The position of the surgical instrument surrogate ball is predicted using a Kalman filter, and the predicted position of the surgical instrument surrogate ball is obtained.

[0012] A breadth-first traversal algorithm is used to sequentially perform intersection detection of the bounding boxes of the lung, lung lobe, and lung segment within the wide-level bounding body of the surgical instrument proxy sphere. Only when the surgical instrument proxy sphere intersects with the bounding box of the lung segment is the depth traversal order obtained based on the predicted positions of the bounding box of the lung segment and the surgical instrument proxy sphere. If they do not intersect at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated.

[0013] Filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes, and update the depth traversal order;

[0014] Each of the intersecting lung lobules' bounding boxes is reconstructed into a hierarchical bounding box. Based on the updated depth-first traversal order, a depth-first traversal algorithm is used to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres to obtain collision detection results.

[0015] Optionally, the construction formulas for the bounding boxes of the lung, lung lobe, lung segment, and lung lobule are all expressed as follows:

[0016] ;

[0017] ;

[0018] ;

[0019] ;

[0020] in, This represents the bounding box of the c-th type of lung anatomical structure, where c = 1, 2, 3, 4, corresponding to the four types of lung anatomical structures: lung, lung lobe, lung segment, and lung lobule, respectively. Represents a vector of coordinate points in three-dimensional space. Represents three-dimensional space; This indicates the first [unclear] within the region corresponding to the c-th type of lung anatomical structure. One coordinate point; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The minimum value of the projection onto a unit direction vector; Indicates the first Unit direction vector; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The maximum value of the projection onto a unit direction vector; Indicates the total number of units in each direction; This represents the total number of coordinate points within the region corresponding to the c-th type of lung anatomical structure; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The minimum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The maximum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The magnitude of the projection onto a unit direction vector.

[0021] Optionally, the step of using a Kalman filter to predict the position of the surgical instrument surrogate ball to obtain the predicted position of the surgical instrument surrogate ball includes:

[0022] Obtain the initial state vector and initial covariance matrix of the surgical instrument proxy ball;

[0023] The initial state vector of the surgical instrument proxy ball is iteratively updated at a preset time interval until the iteration update ends, and the updated state vector is obtained; the state vector includes the position coordinates and velocity components of the surgical instrument proxy ball;

[0024] Based on the updated state vector, the predicted position of the surgical instrument agent ball is obtained.

[0025] Optionally, the initial state vector of the surgical instrument proxy ball is iteratively updated at a preset time period to obtain the updated state vector, wherein the k-th iteration update includes:

[0026] Based on the output of the (k-1)th iteration update, predict the prior state vector and prior covariance matrix of the surgical instrument proxy ball in the k-th iteration update; the output of the (k-1)th iteration update includes: the posterior state vector and posterior covariance matrix of the surgical instrument proxy ball in the (k-1)th iteration update.

[0027] Using the prior covariance matrix of the surgical instrument proxy ball updated in the kth iteration and the observation vector updated in the kth iteration, calculate the Kalman gain updated in the kth iteration.

[0028] Combining the Kalman gain, the observation vector of the surgical instrument proxy ball updated in the kth iteration, and the prior state vector of the surgical instrument proxy ball updated in the kth iteration, the output result of the kth iteration update is calculated; the output result of the kth iteration update includes: the posterior state vector and the posterior covariance matrix of the surgical instrument proxy ball updated in the kth iteration.

[0029] When k=1, the posterior state vector and posterior covariance matrix of the surgical instrument agent ball updated in the (k-1)th iteration update are replaced with the initial state vector and initial covariance matrix of the surgical instrument agent ball, respectively.

[0030] When k=k*, the posterior state vector of the surgical instrument agent ball updated in the k-th iteration of the output result of the k-th iteration is used as the updated state vector;

[0031] Where k represents the number of sequences in the iteration update, and k* represents the total number of iteration updates.

[0032] Optionally, the prediction formulas for the prior state vector and prior covariance matrix updated in the k-th iteration are expressed as follows:

[0033] ;

[0034]

[0035] ;

[0036]

[0037] in, This represents the prior state vector updated in the k-th iteration of the Kalman filter; k represents the sequence number of iterations. Representing the state transition matrix: Let represent the posterior state vector updated in the (k-1)th iteration of the Kalman filter; Let represent the prior covariance matrix updated in the k-th iteration of the Kalman filter; Represents the posterior covariance matrix updated in the (k-1)th iteration of the Kalman filter; superscript Indicates the transpose operation; Represents the process noise covariance matrix; Represents a 3×3 identity matrix; Indicates a preset time interval; Represents a 3×3 zero matrix; This represents the noise intensity of the unmodeled ball's motion acceleration.

[0038] Optionally, the formulas for calculating the posterior state vector and posterior covariance matrix updated in the k-th iteration are expressed as follows:

[0039] ;

[0040] ;

[0041] ;

[0042]

[0043]

[0044] in, Let represent the posterior state vector updated in the k-th iteration of the Kalman filter; This represents the Kalman gain updated in the k-th iteration of the Kalman filter; This represents the observation vector updated in the k-th iteration of the Kalman filter; Represents the observation matrix; Let represent the posterior covariance matrix updated in the k-th iteration of the Kalman filter; An identity matrix with the same dimension as the state vector; Let represent the prior covariance matrix updated in the k-th iteration of the Kalman filter; This represents the true state of the surrogate ball theory updated in the k-th iteration of the Kalman filter; Indicates measurement noise; Represents a 3×3 identity matrix; Represents a 3×3 zero matrix; Represents the measurement noise covariance matrix; , , These represent the measurement noise errors of the surgical agent ball in the x, y, and z directions, respectively.

[0045] Optionally, the step of obtaining the depth traversal order based on the predicted positions of the lung segment bounding box and the surgical instrument proxy ball includes:

[0046] Calculate the center position vector of all lobular bounding boxes within the lung segment bounding box;

[0047] Design a cost function, and based on the cost function, the predicted position of the surgical instrument proxy ball, and the center position vector of all lobular bounding boxes, calculate the cost value of each lobular bounding box in the lobular bounding box set.

[0048] Sort the bounding boxes of each lung lobe from smallest to largest to obtain the depth-first traversal order.

[0049] Optionally, the cost function is expressed as:

[0050] ;

[0051] in, Indicates the first segment in the lung segment bounding box The value of a single lung lobe encasing box; The X-axis, Y-axis, and Z-axis coordinates represent the predicted position of the surgical instrument proxy ball, respectively. They represent the first The center position coordinates of the X-axis, Y-axis, and Z-axis in the center position vector of the bounding box of each lung lobe; This indicates the number of lobular bounding box sequences within the lung segment bounding box.

[0052] Optionally, the process involves reconstructing each intersecting lung lobule bounding box into a hierarchical bounding box, and based on the updated depth-first traversal order, performing a fine-grained intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres using a depth-first traversal algorithm to obtain collision detection results, including:

[0053] Starting from the bounding box of the lung lobule, each node is recursively divided into left and right child nodes until the generated child nodes cover a single or a preset number of geometric primitives. The division is completed to obtain the preliminary hierarchical bounding box; the node that covers a single or a preset number of geometric primitives is designated as the leaf node.

[0054] Based on the minimum and maximum values ​​of the left and right child nodes in each coordinate axis direction, update the parent node from bottom to top to reconstruct the initial hierarchical bounding box and obtain the hierarchical bounding box.

[0055] Based on the updated depth-first traversal order, a depth-first traversal algorithm is used for all level bounding boxes. Starting from the root node of the level bounding box, the intersection relationship between the surgical instrument proxy ball and the bounding box of each node is detected layer by layer.

[0056] When an intersecting node is detected as an internal node, continue traversing its child nodes; when an intersecting node is detected as a leaf node, perform precise geometric collision calculations on the geometric primitives within the leaf node to obtain the precise location information and puncture depth of the collision.

[0057] The precise location and penetration depth of the collision are used as the final collision detection result.

[0058] Secondly, the present invention provides a collision detection system based on hybrid bounding boxes and lung anatomical features, comprising:

[0059] The data acquisition module is used to acquire a three-dimensional finite element model of the lungs; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures;

[0060] The wide-level bounding body construction module is used to construct bounding boxes for the lung, lung lobe, lung segment, and lung lobule based on the three-dimensional finite element model of the lung, and merge the bounding boxes of the lung, lung lobe, and lung segment into a three-level structured wide-level bounding body;

[0061] The position prediction module is used to predict the position of the surgical instrument proxy ball using a Kalman filter, and obtain the predicted position of the surgical instrument proxy ball.

[0062] The first intersection detection module is used to perform intersection detection of the bounding boxes of the lung, lung lobe, and lung segment in the wide-level bounding body of the surgical instrument agent ball using a breadth-first traversal algorithm. Only when the surgical instrument agent ball intersects with the bounding box of the lung segment is the depth traversal order obtained according to the predicted positions of the bounding box of the lung segment and the surgical instrument agent ball obtained. If there is no intersection at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated.

[0063] The update module is used to filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes and update the depth traversal order.

[0064] The second intersection detection module is used to reconstruct each of the intersecting lung lobules into a hierarchical bounding box, and based on the updated depth-first traversal order, to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres using a depth-first traversal algorithm to obtain collision detection results.

[0065] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0066] This invention proposes a collision detection method and system based on hybrid bounding boxes and lung anatomical features. The method constructs a wide-level bounding box comprising a three-level structure of the lung, lobes, and segments. Then, it sequentially determines the bounding boxes of lung segments intersecting with the proxy spheres using a breadth-first traversal algorithm, and accurately detects the collision positions of the surgical instrument proxy spheres (at the geometric primitive level) using a depth-first traversal algorithm, obtaining the collision detection results. In terms of spatial partitioning, it utilizes a tree-like structure in the anatomical sense of the lung, effectively reducing the overlap rate of node bounding boxes and avoiding computational redundancy. Simultaneously, it uses a Kalman filter to predict the position of the surgical instrument proxy spheres, providing a depth-first traversal order under the guidance of a cost function, thereby improving traversal efficiency and real-time detection performance. Attached Figure Description

[0067] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the 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, wherein:

[0068] Figure 1 The flowchart shown is a collision detection method based on hybrid bounding boxes and lung anatomical features in an embodiment of the present invention.

[0069] Figure 2 The diagram shown is a schematic diagram of the process for obtaining the predicted position of the surgical instrument proxy ball in an embodiment of the present invention. Detailed Implementation

[0070] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0071] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0072] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0073] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0074] The application principle of the present invention will be described in detail below with reference to the accompanying drawings.

[0075] Example 1

[0076] like Figure 1 As shown, embodiments of the present invention provide a collision detection method based on hybrid bounding boxes and lung anatomical features, comprising the following steps:

[0077] S1: Obtain a three-dimensional finite element model of the lungs; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures;

[0078] S2: Based on the three-dimensional finite element model of the lung, the bounding boxes of the lung, lung lobe, lung segment and lung lobule are constructed respectively, and the bounding boxes of the lung, lung lobe and lung segment are merged into a wide-level bounding body with a three-level structure.

[0079] S3: Use a Kalman filter to predict the position of the surgical instrument surrogate ball and obtain the predicted position of the surgical instrument surrogate ball;

[0080] S4: Using a breadth-first traversal algorithm, the surgical instrument proxy ball is sequentially subjected to intersection detection of the bounding boxes of the lung, lung lobe, and lung segment within the wide-level bounding body; only when the surgical instrument proxy ball intersects with the lung segment bounding box, the depth traversal order is obtained based on the predicted positions of the lung segment bounding box and the surgical instrument proxy ball; if they do not intersect at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated.

[0081] S5: Filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes, and update the depth traversal order;

[0082] S6: Reconstruct each of the intersecting lung lobules' bounding boxes into hierarchical bounding boxes, and based on the updated depth-first traversal order, use the depth-first traversal algorithm to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres to obtain collision detection results.

[0083] This embodiment proposes a collision detection method based on hybrid bounding boxes and lung anatomical features. Based on lung anatomical features, a wide-level bounding volume is constructed to avoid computational redundancy. Furthermore, a Kalman filter is used to predict the position of a surgical instrument proxy ball, providing a heuristic bounding box traversal strategy that improves the real-time performance of collision detection and has good application prospects.

[0084] In this embodiment, step S01: Obtain a three-dimensional finite element model of the lung; the three-dimensional finite element model of the lung includes the lung, lung lobes, lung segments, and lung lobule structures, including:

[0085] S011: Acquire lung CT scan images in DICOM (Digital Imaging and Communications in Medicine) format, and preprocess the lung CT scan images to obtain preprocessed lung CT scan images; the preprocessing includes:

[0086] The lung CT scan images were successively resampled, grayscale value corrected, normalized and denoised to obtain preliminary lung CT scan images;

[0087] The preliminary lung CT scan images are segmented based on threshold segmentation and region growing methods to remove non-lung tissue;

[0088] Morphological processing and boundary smoothing were performed on the segmented preliminary lung CT scan images to obtain preprocessed lung CT scan images.

[0089] S012: Based on the hierarchical structure of lung anatomy, the preprocessed lung CT scan images are divided into regions to obtain multi-slice CT images;

[0090] S013: Extract the contour boundary points of the lungs, lobes, segments, and lobes from each CT image layer;

[0091] S014: Connect the contour boundary points of adjacent layers using an interpolation algorithm, and form a three-dimensional mesh using tetrahedrons and triangles as units to obtain a three-dimensional finite element model of the lung containing lungs, lung lobes, lung segments, and lung lobes.

[0092] In this embodiment, step S2, based on the three-dimensional finite element model of the lung, constructs bounding boxes for the lung, lung lobe, lung segment, and lung lobule, respectively, and merges the bounding boxes for the lung, lung lobe, and lung segment into a wide-level bounding body with a three-tier structure, specifically including:

[0093] S21: Construct bounding boxes for the lungs, lobes, segments, and lobes respectively;

[0094] Specifically, the construction of the lung bounding box, lobe bounding box, segment bounding box, and lobule bounding box all adopt the following formula:

[0095] ;

[0096] ;

[0097] ;

[0098] ;

[0099] in, This represents the bounding box of the c-th type of lung anatomical structure, where c = 1, 2, 3, 4, corresponding to the four types of lung anatomical structures: lung, lung lobe, lung segment, and lung lobule, respectively. Represents a vector of coordinate points in three-dimensional space. Represents three-dimensional space; This indicates the first [unclear] within the region corresponding to the c-th type of lung anatomical structure. One coordinate point; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The minimum value of the projection onto a unit direction vector; Indicates the first Unit direction vector; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The maximum value of the projection onto a unit direction vector; Indicates the total number of units in each direction; This represents the total number of coordinate points within the region corresponding to the c-th type of lung anatomical structure; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The minimum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The maximum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The magnitude of the projection onto a unit direction vector.

[0100] S22: Combine the lung, lung lobe, and lung segment enclosures into a three-level broad-layer enclosure;

[0101] Specifically, the wide-layered enclosing structure is a tree-like structure, with its root node being the lung enclosing box. The lung bounding box, as the parent bounding box, is used to enclose the entire lung structure.

[0102] The next level sub-node of the lung enclosure includes the left lung enclosure. Right lung surround box The next-level child nodes of the left and right lung bounding boxes are the bounding boxes of the corresponding lung lobes. The next level child node of the lung lobe bounding box is the bounding box of the corresponding lung segment. Where m and n are the number of bounding boxes for lobes and segments of the lung, respectively;

[0103] The bounding box of any parent node is obtained by merging the bounding boxes of all its child nodes, satisfying the following relationship:

[0104]

[0105] in, Indicates the bounding box of the parent node; This means merging the bounding boxes of multiple child nodes into a single bounding box of a parent node. Indicates the first Each child node's bounding box; This represents the number of child nodes.

[0106] like Figure 2 As shown, in this embodiment, S3: using a Kalman filter to predict the position of the surgical instrument surrogate ball, the predicted position of the surgical instrument surrogate ball is obtained, specifically including;

[0107] S31: Obtain the initial state vector and initial covariance matrix of the surgical instrument proxy ball;

[0108] S32: Iterate and update the initial state vector of the surgical instrument agent ball at a preset time interval until the iteration ends, and obtain the updated state vector.

[0109] The state vector includes the position coordinates and velocity components of the surgical instrument proxy ball;

[0110] Specifically, the k-th iteration update includes:

[0111] S321: Based on the output of the (k-1)th iteration update, predict the prior state vector and prior covariance matrix of the surgical instrument proxy ball in the k-th iteration update; the output of the (k-1)th iteration update includes: the posterior state vector and posterior covariance matrix of the surgical instrument proxy ball in the (k-1)th iteration update.

[0112] Specifically, the prediction formulas for the prior state vector and prior covariance matrix of the surgical instrument agent ball updated in the k-th iteration are expressed as follows:

[0113] ;

[0114]

[0115] ;

[0116]

[0117] in, Let represent the prior state vector of the surgical instrument agent ball updated in the k-th iteration; k represents the sequence number of iteration updates. Represents the state transition matrix; Let represent the posterior state vector of the surgical instrument agent ball updated in the (k-1)th iteration; Let represent the prior covariance matrix of the surgical instrument agent ball updated in the kth iteration; Let represent the posterior covariance matrix of the surgical instrument proxy ball updated in the (k-1)th iteration; superscript Indicates the transpose operation; Represents the process noise covariance matrix; Represents a 3×3 identity matrix; Indicates a preset time interval; Represents a 3×3 zero matrix; This represents the noise intensity of the unmodeled ball's motion acceleration.

[0118] S322: Calculate the Kalman gain updated in the kth iteration using the prior covariance matrix of the surgical instrument proxy ball updated in the kth iteration and the observation vector of the surgical instrument proxy ball updated in the kth iteration.

[0119] Specifically, the Kalman gain updated in the kth iteration is represented as follows:

[0120] ;

[0121]

[0122] ;

[0123]

[0124] in, This represents the Kalman gain updated in the k-th iteration; The observation matrix representing the surgical instrument proxy ball; Represents a 3×3 identity matrix; Represents a 3×3 zero matrix; Represents the measurement noise covariance matrix; , , These represent the measurement noise errors of the surgical instrument's proxy ball in the x, y, and z directions, respectively.

[0125] S323: Combining the Kalman gain, the observation vector of the surgical instrument proxy ball updated in the kth iteration, and the prior state vector of the surgical instrument proxy ball updated in the kth iteration, calculate the output result of the kth iteration update; the output result of the kth iteration update includes: the posterior state vector and the posterior covariance matrix of the surgical instrument proxy ball updated in the kth iteration; specifically, the calculation formulas for the posterior state vector and the posterior covariance matrix of the surgical instrument proxy ball updated in the kth iteration are expressed as follows:

[0126] ;

[0127] ;

[0128] in, This represents the observation vector of the surgical instrument agent ball updated in the k-th iteration; An identity matrix with the same dimension as the state vector; This represents the theoretically true state of the surgical instrument agent ball during the k-th iteration update; This indicates measurement noise.

[0129] Furthermore, when k=1, the posterior state vector and posterior covariance matrix of the surgical instrument agent ball updated in the (k-1)th iteration update are replaced with the initial state vector and initial covariance matrix of the surgical instrument agent ball, respectively.

[0130] When k=k*, the posterior state vector of the surgical instrument agent ball updated in the k-th iteration of the output result of the k-th iteration is used as the updated state vector;

[0131] Where k represents the number of sequences in the iteration update, and k* represents the total number of iteration updates.

[0132] S33: Based on the updated state vector, obtain the predicted position of the surgical instrument agent ball.

[0133] In this embodiment, step S4 employs a breadth-first traversal algorithm to sequentially perform intersection detection on the bounding boxes of the lung, lung lobe, and lung segment for the surgical instrument proxy sphere within the wide-level bounding volume. Only when the surgical instrument proxy sphere intersects with the lung segment bounding box is the depth-first traversal order determined based on the predicted positions of the lung segment bounding box and the surgical instrument proxy sphere. If there is no intersection at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated. Specifically, this includes:

[0134] S41: Starting from the lung surround box representing the entire lung, check whether the surgical instrument agent ball intersects with it. If they do not intersect, immediately terminate the entire process and determine that there is no risk of collision. If they intersect, proceed to the next level of detection.

[0135] S42: Perform batch intersection detection on all lung lobe bounding boxes in the next layer, select only the lung lobes that intersect with the instrument ball, and lock these lung lobes as target areas for further exploration.

[0136] S43: For each locked lung lobe, perform intersection detection on the bounding boxes of its subordinate lung segments. If intersecting lung segments are found, generate a priority-sorted depth traversal order based on the spatial position of these lung segment bounding boxes and the predicted motion direction of the instrument.

[0137] Specifically, based on the predicted positions of the lung segment bounding box and the surgical instrument proxy ball, the depth traversal order is obtained, including:

[0138] Calculate the center position vector of all lobular bounding boxes within the lung segment bounding box;

[0139] Design a cost function, and based on the cost function, the predicted position of the surgical instrument proxy ball, and the center position vector of all lobular bounding boxes, calculate the cost value of each lobular bounding box in the lobular bounding box set.

[0140] Sort the bounding boxes of each lung lobe from smallest to largest to obtain the depth-first traversal order.

[0141] Specifically, the cost function is expressed as:

[0142] ;

[0143] in, Indicates the first segment in the lung segment bounding box The value of a single lung lobe encasing box; The X-axis, Y-axis, and Z-axis coordinates represent the predicted position of the surgical instrument proxy ball, respectively. They represent the first The center position coordinates of the X-axis, Y-axis, and Z-axis in the center position vector of the bounding box of each lung lobe; This indicates the number of lobular bounding box sequences within the lung segment bounding box.

[0144] In this embodiment, step S5 filters the lobular bounding boxes that intersect with the surgical instrument proxy sphere from the intersecting lung segment bounding boxes and updates the depth traversal order, specifically including:

[0145] S51: Traverse all lobular bounding boxes among the intersecting lung segment bounding boxes and determine whether the surgical instrument proxy ball intersects with any lobular bounding box. If it does not intersect with any lobular bounding box, directly determine that there is no collision risk and terminate the detection. If it partially intersects, obtain all lobular bounding boxes that collide with the surgical instrument proxy ball.

[0146] S52: Remove the bounding boxes of lung lobules that do not intersect with the surgical instrument proxy spheres from the depth-first traversal order to obtain the updated depth-first traversal order.

[0147] In this embodiment, step S6 reconstructs each of the intersecting lung lobule bounding boxes into a hierarchical bounding box, and based on the updated depth-first traversal order, performs fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres using a depth-first traversal algorithm to obtain collision detection results, specifically including:

[0148] S61: Constructing a hierarchical bounding box:

[0149] Starting from the bounding box of the lung lobule, each node is recursively divided into left and right child nodes until the generated child nodes cover a single or a preset number of geometric primitives. The division is completed to obtain the preliminary hierarchical bounding box; the node that covers a single or a preset number of geometric primitives is designated as the leaf node.

[0150] Based on the minimum and maximum values ​​of the left and right child nodes in each coordinate axis direction, update the parent node from bottom to top to reconstruct the initial hierarchical bounding box and obtain the hierarchical bounding box.

[0151] Specifically, the bounding box of the lung lobule is centrally divided to obtain left and right child nodes; for each child node, the division continues recursively until the leaf node covers a single or a small number of primitives. During the division process, the division plane can be determined by calculating the geometric center of the node bounding box along the main coordinate axes.

[0152] Specifically, the minimum and maximum values ​​of the left and right child nodes along the X, Y, and Z coordinate axes are calculated. Then, the extreme values ​​are taken from these minimum and maximum values ​​for each child node along each coordinate axis, and the parent node is updated from bottom to top until a preliminary hierarchical bounding box is reconstructed, resulting in the hierarchical bounding box. The specific formula for updating the parent node is as follows:

[0153]

[0154] in, The updated parent node; This indicates that the minimum and maximum values ​​of two child nodes in the three coordinate axes are calculated and the extreme values ​​are taken. and These represent the left child node and the right child node, respectively.

[0155] S62: Fine Intersection Detection

[0156] Based on the updated depth-first traversal order, a depth-first traversal algorithm is used for all level bounding boxes. Starting from the root node of the level bounding box, the intersection relationship between the surgical instrument proxy ball and the bounding box of each node is detected layer by layer.

[0157] When an intersecting node is detected as an internal node, continue traversing its child nodes; when an intersecting node is detected as a leaf node, perform precise geometric collision calculations on the geometric primitives within the leaf node to obtain the precise location information and puncture depth of the collision.

[0158] The precise location and penetration depth of the collision are used as the final collision detection result.

[0159] Specifically, the Möller algorithm for line segment-triangular patch is used to calculate the coordinates of the intersection point between the surgical instrument proxy ball and the geometric primitive, and the point-tetrahedral invasion distance formula is used to calculate the penetration depth.

[0160] In summary, the collision detection method based on hybrid bounding boxes and lung anatomical features proposed in this invention achieves efficient screening and precise detection of potential collision regions by combining wide-level bounding volumes and recursively partitioned hierarchical bounding boxes. While ensuring geometric collision accuracy, it significantly improves computational real-time performance and is suitable for surgical simulation and auxiliary operations of complex three-dimensional lung structures.

[0161] Example 2

[0162] This embodiment also proposes a collision detection system based on hybrid bounding boxes and lung anatomical features to implement the collision detection method based on hybrid bounding boxes and lung anatomical features proposed in Embodiment 1, including:

[0163] The data acquisition module is used to acquire a three-dimensional finite element model of the lungs; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures;

[0164] The wide-level bounding body construction module is used to construct bounding boxes for the lung, lung lobe, lung segment, and lung lobule based on the three-dimensional finite element model of the lung, and merge the bounding boxes of the lung, lung lobe, and lung segment into a three-level structured wide-level bounding body;

[0165] The position prediction module is used to predict the position of the surgical instrument proxy ball using a Kalman filter, and obtain the predicted position of the surgical instrument proxy ball.

[0166] The first intersection detection module is used to perform intersection detection of the bounding boxes of the lung, lung lobe, and lung segment in the surgical instrument proxy ball in the wide-level bounding volume by using a breadth-first traversal algorithm. Only when the surgical instrument proxy ball intersects with the lung segment bounding box, the depth traversal order is obtained according to the predicted positions of the lung segment bounding box and the surgical instrument proxy ball. If they do not intersect at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated.

[0167] The update module is used to filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes and update the depth traversal order.

[0168] The second intersection detection module is used to reconstruct each intersecting lung lobule bounding box into a hierarchical bounding box. Based on the updated depth-first traversal order, it uses a depth-first traversal algorithm to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres to obtain collision detection results. The specific functional implementation of the above modules refers to the relevant content in the method of Embodiment 1, and will not be repeated here.

[0169] Example 3

[0170] This invention provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the collision detection method based on hybrid bounding boxes and lung anatomical features as described in Embodiment 1.

[0171] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0172] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0173] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0174] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0175] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A collision detection method based on hybrid bounding boxes and lung anatomical features, characterized in that, include: A three-dimensional finite element model of the lungs is obtained; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures; Based on the three-dimensional finite element model of the lung, bounding boxes for the lung, lung lobe, lung segment and lung lobule are constructed respectively, and the bounding boxes for the lung, lung lobe and lung segment are merged into a wide-level bounding body with a three-level structure. The position of the surgical instrument surrogate ball is predicted using a Kalman filter, and the predicted position of the surgical instrument surrogate ball is obtained. A breadth-first traversal algorithm is used to sequentially perform intersection detection of the bounding boxes of the lung, lung lobe, and lung segment within the wide-level bounding body of the surgical instrument proxy sphere. Only when the surgical instrument proxy sphere intersects with the bounding box of the lung segment is the depth traversal order obtained based on the predicted positions of the bounding box of the lung segment and the surgical instrument proxy sphere. If they do not intersect at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated. Filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes, and update the depth traversal order; Each of the intersecting lung lobules' bounding boxes is reconstructed into a hierarchical bounding box. Based on the updated depth-first traversal order, a depth-first traversal algorithm is used to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres to obtain collision detection results.

2. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 1, characterized in that, The construction formulas for the bounding boxes of the lung, lung lobe, lung segment, and lung lobule are all expressed as follows: ; ; ; ; in, This represents the bounding box of the c-th type of lung anatomical structure, where c = 1, 2, 3, 4, corresponding to the four types of lung anatomical structures: lung, lung lobe, lung segment, and lung lobule, respectively. Represents a vector of coordinate points in three-dimensional space. Represents three-dimensional space; This indicates the first [unclear] within the region corresponding to the c-th type of lung anatomical structure. One coordinate point; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The minimum value of the projection onto a unit direction vector; Indicates the first Unit direction vector; This indicates that all coordinate points within the region corresponding to the c-th type of lung anatomical structure are in the th... The maximum value of the projection onto a unit direction vector; Indicates the total number of units in each direction; This represents the total number of coordinate points within the region corresponding to the c-th type of lung anatomical structure; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The minimum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The maximum value of the projection onto a unit direction vector; This indicates the region corresponding to the c-th type of lung anatomical structure. The coordinate point at the th position The magnitude of the projection onto a unit direction vector.

3. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 2, characterized in that, The position of the surgical instrument surrogate ball is predicted using a Kalman filter, resulting in the predicted position of the surgical instrument surrogate ball, including: Obtain the initial state vector and initial covariance matrix of the surgical instrument proxy ball; The initial state vector of the surgical instrument proxy ball is iteratively updated at a preset time interval until the iteration update ends, and the updated state vector is obtained; the state vector includes the position coordinates and velocity components of the surgical instrument proxy ball; Based on the updated state vector, the predicted position of the surgical instrument agent ball is obtained.

4. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 3, characterized in that, The initial state vector of the surgical instrument proxy ball is iteratively updated at a preset time period to obtain the updated state vector, wherein the k-th iteration update includes: Based on the output of the (k-1)th iteration update, predict the prior state vector and prior covariance matrix of the surgical instrument proxy ball in the k-th iteration update; the output of the (k-1)th iteration update includes: the posterior state vector and posterior covariance matrix of the surgical instrument proxy ball in the (k-1)th iteration update. Using the prior covariance matrix of the surgical instrument proxy ball updated in the kth iteration and the observation vector updated in the kth iteration, calculate the Kalman gain updated in the kth iteration. Combining the Kalman gain, the observation vector of the surgical instrument proxy ball updated in the kth iteration, and the prior state vector of the surgical instrument proxy ball updated in the kth iteration, the output result of the kth iteration update is calculated; the output result of the kth iteration update includes: the posterior state vector and the posterior covariance matrix of the surgical instrument proxy ball updated in the kth iteration. When k=1, the posterior state vector and posterior covariance matrix of the surgical instrument agent ball updated in the (k-1)th iteration update are replaced with the initial state vector and initial covariance matrix of the surgical instrument agent ball, respectively. When k=k*, the posterior state vector of the surgical instrument agent ball updated in the k-th iteration of the output result of the k-th iteration is used as the updated state vector; Where k represents the number of sequences in the iteration update, and k* represents the total number of iteration updates.

5. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 4, characterized in that, The prediction formulas for the prior state vector and prior covariance matrix of the surgical instrument agent ball updated in the k-th iteration are expressed as follows: ; ; ; ; in, Let represent the prior state vector of the surgical instrument agent ball updated in the k-th iteration; Represents the state transition matrix; Let represent the posterior state vector of the surgical instrument agent ball updated in the (k-1)th iteration; Let represent the prior covariance matrix of the surgical instrument agent ball updated in the kth iteration; Let represent the posterior covariance matrix of the surgical instrument proxy ball updated in the (k-1)th iteration; superscript Indicates the transpose operation; Represents the process noise covariance matrix; Represents a 3×3 identity matrix; Indicates a preset time interval; Represents a 3×3 zero matrix; This represents the noise intensity of the unmodeled ball's motion acceleration.

6. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 5, characterized in that, The formulas for calculating the posterior state vector and posterior covariance matrix of the surgical instrument proxy ball updated in the k-th iteration are expressed as follows: ; ; ; ; ; in, Let represent the posterior state vector of the surgical instrument agent ball updated in the k-th iteration; This represents the Kalman gain of the surgical instrument agent ball updated in the k-th iteration; This represents the observation vector of the surgical instrument agent ball updated in the k-th iteration; The observation matrix representing the surgical instrument proxy ball; Let represent the posterior covariance matrix of the surgical instrument proxy ball updated in the kth iteration; An identity matrix with the same dimension as the state vector; Let represent the prior covariance matrix of the surgical instrument agent ball updated in the kth iteration; This represents the true state of the surgical instrument proxy ball theory during the k-th iteration update; Indicates measurement noise; Represents a 3×3 identity matrix; Represents a 3×3 zero matrix; Represents the measurement noise covariance matrix; , , These represent the measurement noise errors of the surgical instrument's proxy ball in the x, y, and z directions, respectively.

7. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 6, characterized in that, Based on the predicted positions of the lung segment bounding box and the surgical instrument proxy ball, the depth-first traversal order is obtained, including: Calculate the center position vector of all lobular bounding boxes within the lung segment bounding box; Design a cost function, and based on the cost function, the predicted position of the surgical instrument proxy ball, and the center position vector of all lobular bounding boxes, calculate the cost value of each lobular bounding box in the lobular bounding box set. Sort the bounding boxes of each lung lobe from smallest to largest to obtain the depth-first traversal order.

8. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 7, characterized in that, The cost function is expressed as: ; in, Indicates the first segment in the lung segment bounding box The value of a single lung lobe encasing box; The X-axis, Y-axis, and Z-axis coordinates represent the predicted position of the surgical instrument proxy ball, respectively. They represent the first The center position coordinates of the X-axis, Y-axis, and Z-axis in the center position vector of the bounding box of each lung lobe; This indicates the number of lobular bounding box sequences within the lung segment bounding box.

9. The collision detection method based on hybrid bounding box and lung anatomical features according to claim 8, characterized in that, Each intersecting lung lobe bounding box is reconstructed into a hierarchical bounding box. Based on the updated depth-first traversal order, a fine-grained intersection detection is performed on all hierarchical bounding boxes and surgical instrument proxy spheres using a depth-first traversal algorithm to obtain collision detection results, including: Starting from the bounding box of the lung lobule, each node is recursively divided into left and right child nodes until the generated child nodes cover a single or a preset number of geometric primitives. The division is completed to obtain the preliminary hierarchical bounding box; the node that covers a single or a preset number of geometric primitives is designated as the leaf node. Based on the minimum and maximum values ​​of the left and right child nodes in each coordinate axis direction, update the parent node from bottom to top to reconstruct the initial hierarchical bounding box and obtain the hierarchical bounding box. Based on the updated depth-first traversal order, a depth-first traversal algorithm is used for all level bounding boxes. Starting from the root node of the level bounding box, the intersection relationship between the surgical instrument proxy ball and the bounding box of each node is detected layer by layer. When an intersecting node is detected as an internal node, continue traversing its child nodes; when an intersecting node is detected as a leaf node, perform precise geometric collision calculations on the geometric primitives within the leaf node to obtain the precise location information and puncture depth of the collision. The precise location and penetration depth of the collision are used as the final collision detection result.

10. A collision detection system based on hybrid bounding boxes and lung anatomy features, characterized in that, include: The data acquisition module is used to acquire a three-dimensional finite element model of the lungs; the three-dimensional finite element model of the lungs includes the lung, lung lobes, lung segments and lung lobule structures; The wide-level bounding body construction module is used to construct bounding boxes for the lung, lung lobe, lung segment, and lung lobule based on the three-dimensional finite element model of the lung, and merge the bounding boxes of the lung, lung lobe, and lung segment into a three-level structured wide-level bounding body; The position prediction module is used to predict the position of the surgical instrument proxy ball using a Kalman filter, and obtain the predicted position of the surgical instrument proxy ball. The first intersection detection module is used to perform intersection detection of the bounding boxes of the lung, lung lobe, and lung segment in the wide-level bounding body of the surgical instrument agent ball using a breadth-first traversal algorithm. Only when the surgical instrument agent ball intersects with the bounding box of the lung segment is the depth traversal order obtained according to the predicted positions of the bounding box of the lung segment and the surgical instrument agent ball obtained. If there is no intersection at any intermediate level, it is directly determined that there is no collision risk and the detection is terminated. The update module is used to filter the bounding boxes of lung lobules that intersect with the surgical instrument proxy spheres from the intersecting lung segment bounding boxes and update the depth traversal order. The second intersection detection module is used to reconstruct each of the intersecting lung lobules into a hierarchical bounding box, and based on the updated depth-first traversal order, to perform fine intersection detection on all hierarchical bounding boxes and surgical instrument proxy spheres using a depth-first traversal algorithm to obtain collision detection results.