[go: up one dir, main page]

CN114494602A - Collision detection method, system, computer device and storage medium - Google Patents

Collision detection method, system, computer device and storage medium Download PDF

Info

Publication number
CN114494602A
CN114494602A CN202210124867.2A CN202210124867A CN114494602A CN 114494602 A CN114494602 A CN 114494602A CN 202210124867 A CN202210124867 A CN 202210124867A CN 114494602 A CN114494602 A CN 114494602A
Authority
CN
China
Prior art keywords
target
point cloud
collision detection
processed
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210124867.2A
Other languages
Chinese (zh)
Inventor
何锐
刘鹏飞
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Xiaowei Changxing Robot Co ltd
Original Assignee
Suzhou Xiaowei Changxing Robot Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Xiaowei Changxing Robot Co ltd filed Critical Suzhou Xiaowei Changxing Robot Co ltd
Priority to CN202210124867.2A priority Critical patent/CN114494602A/en
Publication of CN114494602A publication Critical patent/CN114494602A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B34/00Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
    • A61B34/10Computer-aided planning, simulation or modelling of surgical operations
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B34/00Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
    • A61B34/30Surgical robots
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B34/00Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
    • A61B34/10Computer-aided planning, simulation or modelling of surgical operations
    • A61B2034/101Computer-aided simulation of surgical operations
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B34/00Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
    • A61B34/30Surgical robots
    • A61B2034/302Surgical robots specifically adapted for manipulations within body cavities, e.g. within abdominal or thoracic cavities
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Molecular Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Robotics (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Biomedical Technology (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请涉及医疗技术领域,特别是涉及一种碰撞检测方法、系统、计算机设备和存储介质。一种碰撞检测方法包括:获取待处理目标对象的对象实时位置;将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;获取目标器械的器械实时位置;根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。本申请有效提高手术安全性和可靠性,不需要额外的传感器,降低了生产、设计和使用成本,相对于传统非接触式方法提升了机器人的操作空间,提升了与医生一起协作的效率。

Figure 202210124867

The present application relates to the field of medical technology, and in particular, to a collision detection method, system, computer equipment and storage medium. A collision detection method includes: acquiring an object real-time position of a target object to be processed; registering a virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the virtual object model The target position in the target coordinate system where the target object to be processed is located; obtain the real-time position of the target instrument; determine whether the target instrument will collide according to the target position and the real-time position of the instrument. The application effectively improves the safety and reliability of surgery, does not require additional sensors, reduces production, design and use costs, improves the operating space of the robot compared to the traditional non-contact method, and improves the efficiency of collaboration with doctors.

Figure 202210124867

Description

碰撞检测方法、系统、计算机设备和存储介质Collision detection method, system, computer device and storage medium

技术领域technical field

本申请涉及医疗仿真控制和图形处理技术领域,特别是涉及一种碰撞检测方法、系统、计算机设备和存储介质。The present application relates to the technical field of medical simulation control and graphics processing, and in particular, to a collision detection method, system, computer equipment and storage medium.

背景技术Background technique

自从二十一世纪初,手术机器人正在不断改变着传统手术方式,这种改变在如今变得越来越快。几乎在临床的每个领域都出现了各类机器人,尤其是在腹腔镜相关的外科机器人、骨科机器人等。随着手术机器人的广泛应用,其安全性问题日益凸显,其中,碰撞检测是一项很重要的安全功能,尤其是在手术室这种空间有限且人员、设备等位置复杂的环境中。Since the beginning of the 21st century, surgical robots have been changing traditional surgical methods, and this change is getting faster and faster today. Various types of robots have appeared in almost every clinical field, especially in laparoscopic-related surgical robots and orthopedic robots. With the wide application of surgical robots, their safety issues have become increasingly prominent. Among them, collision detection is a very important safety function, especially in the operating room where space is limited and the locations of personnel and equipment are complex.

现有的机器人碰撞检测技术包括接触式和非接触式,这些技术在手术机器人的应用中面临如下几个问题:The existing robot collision detection technologies include contact and non-contact. These technologies face the following problems in the application of surgical robots:

1.接触式技术需要在机械臂关节中使用力矩传感器,而且需要接触来检测碰撞有一定的安全风险。1. The contact technology requires the use of torque sensors in the manipulator joints, and the need for contact to detect collisions has certain safety risks.

2.非接触式技术同样需要使用额外的传感器实现碰撞检测功能,如红外传感器、超声波传感器等,该技术方案需要在机械臂的工作空间外建立一座虚拟的墙,降低了机器人的工作效率,以及缩小了医生的操作空间。2. Non-contact technology also requires the use of additional sensors to achieve collision detection functions, such as infrared sensors, ultrasonic sensors, etc. This technical solution requires the establishment of a virtual wall outside the working space of the robotic arm, which reduces the working efficiency of the robot, and Reduce the doctor's operating space.

这些问题会影响手术机器人的使用体验,增加设计、生成和使用成本,降低了医生和手术机器人协作的效率,甚至产生影响手术安全性的风险。These problems will affect the use experience of surgical robots, increase the cost of design, production and use, reduce the efficiency of collaboration between doctors and surgical robots, and even create risks that affect the safety of surgery.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述技术问题,提供一种碰撞检测方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a collision detection method, apparatus, computer equipment and storage medium for the above technical problems.

第一方面,本申请提供了一种碰撞检测方法,所述碰撞检测方法包括:In a first aspect, the present application provides a collision detection method, the collision detection method includes:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据所述目标位置和所述器械实时位置判断所述目标器械与所述待处理目标对象是否会发生碰撞。According to the target position and the real-time position of the instrument, it is determined whether the target instrument and the target object to be processed will collide.

在其中一个实施例中,所述将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置,包括:In one embodiment, the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed, so as to determine that the virtual object model is located where the target object to be processed is located The target position in the target coordinate system of , including:

获取所述虚拟对象模型上预先标记的多个特征点;acquiring multiple feature points pre-marked on the virtual object model;

将所述多个特征点与所述待处理目标对象的实时位置进行匹配,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置。The multiple feature points are matched with the real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located.

在其中一个实施例中,所述获取目标器械的器械实时位置,包括:In one embodiment, the acquiring the real-time position of the target instrument includes:

获取反光标识器与所述目标器械之间的预设位姿关系;acquiring the preset pose relationship between the reflective marker and the target device;

基于所述预设位姿关系,根据所述反光标识器的实时位姿得到所述目标器械的器械实时位置。Based on the preset pose relationship, the real-time position of the device of the target device is obtained according to the real-time pose of the reflective marker.

在其中一个实施例中,所述将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置之前,还包括:In one embodiment, the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed, so as to determine that the virtual object model is located where the target object to be processed is located Before the target position in the target coordinate system, also include:

扫描得到所述待处理目标对象的医学影像;Scanning to obtain the medical image of the target object to be processed;

根据所述医学影像进行图像重建得到所述待处理目标对象的虚拟对象模型。Perform image reconstruction according to the medical image to obtain the virtual object model of the target object to be processed.

在其中一个实施例中,所述根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞,包括:In one embodiment, the determining whether the target instrument will collide according to the target position and the real-time position of the instrument includes:

采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法,根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。Using the K-dimensional space tree collision detection method and/or the AABB tree collision detection method, it is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

在其中一个实施例中,所述K维空间树碰撞检测方法,包括:In one embodiment, the K-dimensional space tree collision detection method includes:

将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云;using the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据所述被查询点云创建K维空间树;Create a K-dimensional space tree according to the queried point cloud;

遍历所述K维空间树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。Traverse the K-dimensional space tree, and determine whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在其中一个实施例中,所述将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云之前,包括:In one embodiment, before taking the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud, the method includes:

分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点。The point cloud of the target position and the point cloud of the real-time position of the instrument are respectively down-sampled to obtain the sampling points of the target object to be processed and the target instrument.

在其中一个实施例中,所述分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点,包括:In one embodiment, the down-sampling of the point cloud of the target position and the point cloud of the real-time position of the instrument respectively, to obtain the sampling points of the target object to be processed and the target instrument, includes:

计算所述点云的包围盒,将所述包围盒离散成若干个体素;Calculate the bounding box of the point cloud, and discretize the bounding box into several voxels;

将每个所述体素的中心点或离中心点最近的点作为所述采样点。The center point of each voxel or the point closest to the center point is used as the sampling point.

在其中一个实施例中,所述建立K维空间树,包括:In one of the embodiments, the establishment of a K-dimensional space tree includes:

建立根节点;establish root node;

计算所述被查询点云的方差值,将方差值作为分割特征;Calculate the variance value of the queried point cloud, and use the variance value as a segmentation feature;

将所述分割特征的中位数作为分割点;Taking the median of the segmentation feature as the segmentation point;

将所述分割特征小于所述分割点的所述分割特征传递给所述根节点的左节点,大于所述分割点的所述分割特征传递给所述根节点的右节点;Transfer the segmentation feature whose segmentation feature is smaller than the segmentation point to the left node of the root node, and transfer the segmentation feature larger than the segmentation point to the right node of the root node;

递归执行上述步骤直至所有所述分割特征建立到所述K维空间树的所述根节点的左节点、右节点上为止。The above steps are recursively performed until all the segmentation features are established on the left node and the right node of the root node of the K-dimensional space tree.

在其中一个实施例中,所述遍历所述K维空间树,所述遍历所述K维空间树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:In one embodiment, the traversal of the K-dimensional space tree, the traversal of the K-dimensional space tree, and the determination of the target instrument according to the closest distance between the target point cloud and the queried point cloud Whether collisions will occur, including:

获取第一目标点云和第一被查询点云;Obtain the first target point cloud and the first queried point cloud;

遍历每个所述第一被查询点云,找到所述第一被查询点云的点与所述第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离,判断所述第一最近距离是否会发生碰撞。Traverse each of the first queried point clouds, find the two closest points between the first queried point cloud and the first target point cloud, and use the distance between the two points as the first closest point between the point clouds distance, to determine whether a collision will occur at the first closest distance.

在其中一个实施例中,所述AABB树碰撞检测方法,包括:In one embodiment, the AABB tree collision detection method includes:

将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云;using the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据所述被查询点云建立轴对称包围盒树;Build an axisymmetric bounding box tree according to the queried point cloud;

遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。Traverse the axisymmetric bounding box tree, and determine whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在其中一个实施例中,所述建立轴对称包围盒树,包括:In one of the embodiments, the establishing an axis-symmetric bounding box tree includes:

将三角形作为根节点;Take the triangle as the root node;

建立所述被查询点云的叶节点,根据所述叶节点的关联对象分配轴对称包围盒树;establishing a leaf node of the queried point cloud, and assigning an axisymmetric bounding box tree according to the associated object of the leaf node;

在所述轴对称包围盒树中找到预定的现有节点,使新叶子成为所述预定的现有节点的兄弟节点;Find a predetermined existing node in the axisymmetric bounding box tree, and make the new leaf a sibling node of the predetermined existing node;

为所述预定的现有节点和所述新叶子创建分支节点,并为所述分支节点分配两个节点的轴对称包围盒;creating a branch node for the predetermined existing node and the new leaf, and assigning an axisymmetric bounding box of two nodes to the branch node;

将所述新叶子附加到所述两个节点上;attaching the new leaf to the two nodes;

从所述轴对称包围盒树中移除所述现有节点,并将所述现有节点附加到所述两个节点上;removing the existing node from the axisymmetric bounding box tree and appending the existing node to the two nodes;

将所述两个节点附加为所述现有节点的父节点的子节点上;attaching the two nodes as child nodes of the parent node of the existing node;

调整所述父节点的所述轴对称包围盒,以确保所述父节点包含所有所述子节点的所述轴对称包围盒。The axisymmetric bounding box of the parent node is adjusted to ensure that the parent node contains the axisymmetric bounding box of all of the child nodes.

在其中一个实施例中,遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:In one embodiment, traversing the axisymmetric bounding box tree, and judging whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud, includes:

获取第二目标点云和第二被查询点云;Obtain the second target point cloud and the second queried point cloud;

建立所述第二被查询点云的轴对称包围盒树,遍历每个所述第二被查询点云,找到所述第二被查询点云的点与所述第二目标点云的点最近的两点,将两点距离作为点云间的第二最近距离。Build an axisymmetric bounding box tree of the second queried point cloud, traverse each of the second queried point clouds, and find the point of the second queried point cloud that is closest to the point of the second target point cloud The two points of , take the distance between the two points as the second closest distance between the point clouds.

第二方面,本申请还提供了一种碰撞检测系统,所述碰撞检测系统包括:图像处理器以及位置采集器,所述图像处理器用于实现上述所述方法的步骤。In a second aspect, the present application further provides a collision detection system, the collision detection system includes: an image processor and a position collector, where the image processor is used to implement the steps of the above-mentioned method.

第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。It is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the following steps are implemented:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。It is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。It is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

上述碰撞检测方法、装置、计算机设备和存储介质,通过获取待处理目标对象的对象实时位置;将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;获取目标器械的器械实时位置;根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。本申请手术机器人术中碰撞检测方法,解决了现有技术中需要增加额外的传感器,而影响医生和机械臂的操作空间的技术问题。有效提高手术安全性和可靠性,不需要额外的传感器,降低了生产、设计和使用成本,相对于传统非接触式方法提升了机器人的操作空间,提升了与医生一起协作的效率。The above collision detection method, device, computer equipment and storage medium, by acquiring the object real-time position of the target object to be processed; registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed, determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located; obtain the real-time position of the target device; determine whether the target device will Collision. The intraoperative collision detection method for a surgical robot of the present application solves the technical problem in the prior art that additional sensors need to be added, which affects the operating space of the doctor and the robotic arm. It effectively improves the safety and reliability of surgery, does not require additional sensors, reduces the cost of production, design and use, improves the operating space of the robot compared to the traditional non-contact method, and improves the efficiency of collaboration with doctors.

附图说明Description of drawings

为了更清楚地说明本申请实施例或传统技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the traditional technology, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or the traditional technology. Obviously, the drawings in the following description are only the For some embodiments of the application, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为一个实施例中碰撞检测方法的应用环境图;1 is an application environment diagram of a collision detection method in one embodiment;

图2为一个实施例中碰撞检测方法的流程示意图;2 is a schematic flowchart of a collision detection method in one embodiment;

图3为一个实施例中碰撞检测方法步骤的流程示意图;3 is a schematic flowchart of steps of a collision detection method in one embodiment;

图4为一个实施例中碰撞检测方法的实时位置进行配准流程示意图;4 is a schematic flowchart of a real-time position registration process of a collision detection method in one embodiment;

图5为一个实施例中碰撞检测方法的配准应用环境示意图;5 is a schematic diagram of a registration application environment of the collision detection method in one embodiment;

图6为一个实施例中碰撞检测方法的配准步骤流程示意图;6 is a schematic flowchart of a registration step of a collision detection method in one embodiment;

图7为一个实施例中碰撞检测方法的获取目标器械位置流程示意图;FIG. 7 is a schematic diagram of a process flow diagram of obtaining the position of a target device in a collision detection method in one embodiment;

图8为一个实施例中碰撞检测方法的建立虚拟对象模型流程示意图;8 is a schematic flowchart of a method for creating a virtual object model for collision detection in one embodiment;

图9为一个实施例中碰撞检测方法的图像分割示意图;9 is a schematic diagram of image segmentation of a collision detection method in one embodiment;

图10为一个实施例中碰撞检测方法的虚拟对象模型示意图;10 is a schematic diagram of a virtual object model of a collision detection method in one embodiment;

图11为一个实施例中碰撞检测方法的K维空间树碰撞检测流程示意图;11 is a schematic flow chart of a K-dimensional space tree collision detection of a collision detection method in one embodiment;

图12为一个实施例中碰撞检测方法的K维空间树碰撞检测步骤示意图;12 is a schematic diagram of the K-dimensional space tree collision detection steps of the collision detection method in one embodiment;

图13为一个实施例中碰撞检测方法的降采样流程示意图;13 is a schematic diagram of a downsampling flow chart of a collision detection method in one embodiment;

图14为一个实施例中碰撞检测方法的降采样示意图;14 is a schematic diagram of downsampling of a collision detection method in one embodiment;

图15为一个实施例中碰撞检测方法的降采样算法示意图;15 is a schematic diagram of a downsampling algorithm of a collision detection method in one embodiment;

图16为一个实施例中碰撞检测方法的建立K维空间树流程示意图;16 is a schematic flowchart of a method for establishing a K-dimensional space tree for collision detection in one embodiment;

图17为一个实施例中碰撞检测方法的K维空间树示意图;17 is a schematic diagram of a K-dimensional space tree of a collision detection method in one embodiment;

图18为一个实施例中碰撞检测方法的最近邻检索示意图;18 is a schematic diagram of nearest neighbor retrieval of a collision detection method in one embodiment;

图19为一个实施例中碰撞检测方法的距离控制流程示意图;19 is a schematic diagram of a distance control flow chart of a collision detection method in one embodiment;

图20为一个实施例中碰撞检测方法的距离控制步骤流程示意图;20 is a schematic flowchart of a distance control step of a collision detection method in one embodiment;

图21为一个实施例中碰撞检测方法的AABB树碰撞检测流程示意图;Fig. 21 is the AABB tree collision detection flow schematic diagram of collision detection method in one embodiment;

图22为一个实施例中碰撞检测方法的AABB树碰撞检测步骤流程示意图;22 is a schematic flowchart of the AABB tree collision detection steps of the collision detection method in one embodiment;

图23为一个实施例中碰撞检测方法的建立AABB树流程示意图;Figure 23 is a schematic flow chart of the establishment of the AABB tree of the collision detection method in one embodiment;

图24为一个实施例中碰撞检测方法的AABB树距离控制流程示意图;24 is a schematic diagram of the AABB tree distance control flow diagram of the collision detection method in one embodiment;

图25为一个实施例中碰撞检测方法的空间检索示意图;25 is a schematic diagram of spatial retrieval of a collision detection method in one embodiment;

图26为一个实施例中碰撞检测方法的AABB树距离控制步骤流程示意图;26 is a schematic flowchart of the AABB tree distance control steps of the collision detection method in one embodiment;

图27为一个实施例中计算机设备的内部结构图。Figure 27 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本申请实施例提供的一种碰撞检测方法,可以应用于如图1所示的应用环境中。其中,虚拟对象模型应用于计算机,计算机可包括主显示器、键盘以及位于导航台车内的控制器。以下将以本发明的碰撞检测系统用于膝关节置换的骨科手术导航系统为示例进行说明,但在具体实施时,本发明的截骨导向工具不仅限于膝关节置换的骨科导航系统的截骨导向工具,还可应用于其他的手术导航系统中。在膝关节置换的骨科手术导航系统中患者118置于手术床上,在患者118的一侧设有手术台车100,在手术台车100上设有放置用以控制工具靶标104移动的机械臂102以及基座靶标106,工具靶标104上设有截骨导向工具108,医生即可使用摆锯110或电钻通过截骨导向工具的截骨导向槽及导向孔进行截骨及钻孔操作。在患者的另一侧设有设置在导航台车上的主显示器116和副显示器114,在导航台车上还设有NDI导航设备112。其中,NDI即光学跟踪仪,可对跟踪范围内的目标进行实时跟踪,实时获取目标的位姿信息。The collision detection method provided by the embodiment of the present application can be applied to the application environment shown in FIG. 1 . Wherein, the virtual object model is applied to a computer, which may include a main display, a keyboard, and a controller located in the navigation trolley. The following will take the collision detection system of the present invention for an orthopaedic surgery navigation system for knee joint replacement as an example for description, but in specific implementation, the osteotomy guide tool of the present invention is not limited to the osteotomy guidance of the orthopaedic navigation system for knee joint replacement The tool can also be used in other surgical navigation systems. In the orthopaedic surgery navigation system for knee replacement, a patient 118 is placed on an operating bed, an operating trolley 100 is provided on one side of the patient 118, and a robotic arm 102 for controlling the movement of the tool target 104 is placed on the operating trolley 100 As well as the base target 106, the tool target 104 is provided with an osteotomy guide tool 108, and the doctor can use an oscillating saw 110 or an electric drill to perform osteotomy and drilling operations through the osteotomy guide groove and guide hole of the osteotomy guide tool. On the other side of the patient, there are a main display 116 and a secondary display 114 arranged on the navigation trolley, and an NDI navigation device 112 is also arranged on the navigation trolley. Among them, NDI is an optical tracker, which can track the target in the tracking range in real time and obtain the pose information of the target in real time.

如图2和图3所示,在一个实施例中,提供了一种碰撞检测方法,以该方法应用于如图1所示的碰撞检测系统为例进行说明,包括以下步骤:As shown in FIG. 2 and FIG. 3 , in one embodiment, a collision detection method is provided, and the method is applied to the collision detection system shown in FIG. 1 as an example to illustrate, including the following steps:

S202:获取待处理目标对象的对象实时位置。S202: Acquire the object real-time position of the target object to be processed.

其中,目标对象为患者需要外科手术的患处区域,例如,患者的腹腔、骨骼或乳腺甲状腺等。Wherein, the target object is the affected area of the patient requiring surgery, for example, the patient's abdominal cavity, bone or breast and thyroid.

具体地,碰撞检测系统可获取待处理目标对象的实时位置。例如,患者的膝关节置换的骨科手术,需要对膝关节的患处进行外科手术,碰撞检测系统可以获取患者待手术的骨折区域,其中,骨折区域可以以骨折处为中心预设一定范围,形成骨折区域。碰撞检测系统获取目标对象的实时位置,以便后续根据目标对象的实时位置对目标对象进行外科手术。Specifically, the collision detection system can obtain the real-time position of the target object to be processed. For example, the orthopaedic surgery for a patient's knee joint replacement requires surgery on the affected part of the knee joint. The collision detection system can obtain the fracture area of the patient to be operated on. The fracture area can be preset with a certain range centered on the fracture site to form a fracture. area. The collision detection system acquires the real-time position of the target object, so as to subsequently perform surgery on the target object according to the real-time position of the target object.

S204:将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置。S204: Register the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located.

其中,配准为整个手术导航过程中,将患者实际体位和图像空间位置(即患者“地图”)进行配准,这个过程叫做配准。Among them, the registration is the registration of the actual body position of the patient and the image space position (ie, the "map" of the patient) during the entire surgical navigation process, and this process is called registration.

具体的,碰撞检测系统依据待处理目标对象建立虚拟对象模型,再将虚拟对象模型与待处理目标对象实时位置进行配准,其中,虚拟对象模型可为三维模型,可通过CT扫描导入计算机形成。通过虚拟对象模型与待处理目标对象形成配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置,以便后续的手术操作中依据待处理目标对象在坐标系中的坐标,对目标器械下达动作指令。Specifically, the collision detection system establishes a virtual object model according to the target object to be processed, and then registers the virtual object model with the real-time position of the target object to be processed. The virtual object model is registered with the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located, so that subsequent surgical operations can be based on the coordinates of the target object to be processed in the coordinate system. , and issue an action command to the target device.

S206:获取目标器械的器械实时位置。S206: Acquire the real-time position of the target device.

其中,目标器械为用于外科手术中的手术器械,例如,器械可为手术刀,手术锯等。Wherein, the target instrument is a surgical instrument used in a surgical operation, for example, the instrument may be a scalpel, a surgical saw, and the like.

具体地,碰撞检测系统获取目标器械的实时位置,即目标器械在虚拟对象模型中坐标系的位置。Specifically, the collision detection system acquires the real-time position of the target instrument, that is, the position of the target instrument in the coordinate system of the virtual object model.

S208:根据所述目标位置和所述器械实时位置判断所述目标器械与待处理目标对象是否会发生碰撞。S208: Determine whether the target instrument and the target object to be processed will collide according to the target position and the real-time position of the instrument.

具体地,碰撞检测系统获取了目标对象的目标位置以及目标器械在虚拟对象模型坐标系中的位置,获知坐标系中不同目标的位置后,即可判断目标器械是否会发生碰撞,碰撞的依据可根据两个目标在坐标系中的位置存在无限接近和接触等事件的发生。Specifically, the collision detection system obtains the target position of the target object and the position of the target device in the coordinate system of the virtual object model. After knowing the positions of different targets in the coordinate system, it can determine whether the target device will collide. The basis for the collision can be Depending on the position of the two targets in the coordinate system, there are events such as infinite approach and contact.

在该实施例中,碰撞检测系统通过获取待处理目标对象的对象实时位置;再依据待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,来确定待处理目标对象所在虚拟对象模型坐标系中的目标位置;此外,获取目标器械在该坐标系中的位置,对坐标系中的两个位置是否发生碰撞进行判断。通过根据目标对象的目标位置和器械实时位置判断目标器械是否会发生碰撞,解决了现有技术中需要增加额外的传感器,而影响医生和机械臂的操作空间的技术问题。有效提高手术安全性和可靠性,不需要额外的传感器,降低了生产、设计和使用成本,相对于传统非接触式方法提升了机器人的操作空间,提升了与医生一起协作的效率。In this embodiment, the collision detection system obtains the object real-time position of the target object to be processed; and then performs registration according to the virtual object model of the target object to be processed and the real-time position of the target object to be processed to determine the location of the target object to be processed. The target position in the coordinate system of the virtual object model; in addition, the position of the target device in the coordinate system is obtained, and it is judged whether the two positions in the coordinate system collide. By judging whether the target instrument will collide according to the target position of the target object and the real-time position of the instrument, the technical problem that additional sensors need to be added in the prior art and affects the operation space of the doctor and the robot arm is solved. It effectively improves the safety and reliability of surgery, does not require additional sensors, reduces production, design and use costs, improves the operating space of the robot compared to traditional non-contact methods, and improves the efficiency of collaboration with doctors.

如图4、图5和图6所示,在其中一个实施例中,步骤S204将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置,包括:As shown in Figure 4, Figure 5 and Figure 6, in one embodiment, step S204 registers the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine whether the virtual object model is Process the target position in the target coordinate system where the target object is located, including:

S302:获取虚拟对象模型上预先标记的多个特征点。S302: Acquire multiple feature points pre-marked on the virtual object model.

具体地,虚拟对象模型上预先标记用于配准的多个特征点,医生在患者骨部位上操作手术器械,以将多个特征点与骨部位进行注册,使得虚拟对象模型与骨部位配准,完成手术器械注册,以便通过虚拟对象模型获取机械臂末端手术器械的实时位置。例如,将手术台车及导航台车放置在手术床旁边合适的位置,安装股骨靶标、胫骨靶标、基座靶标、截骨导向工具、工具靶标等设备;医生将患者腿部的骨头CT扫描模型导入计算机形成三维模型进行术前规划,规划截骨平面坐标,选择合适型号的假体,规划假体安装方位;医生使用靶标笔点病人的股骨及胫骨的特征点,NDI导航设备以基座靶标为基准,记录患者骨头特征点位置,并将骨头特征点位置发送给计算机。Specifically, the virtual object model is pre-marked with multiple feature points for registration, and the doctor operates the surgical instrument on the patient's bone part to register the multiple feature points with the bone part, so that the virtual object model is registered with the bone part , complete the surgical instrument registration, so as to obtain the real-time position of the surgical instrument at the end of the robotic arm through the virtual object model. For example, place the operating trolley and the navigation trolley at a suitable position beside the operating table, and install the femoral target, tibial target, base target, osteotomy guide tool, tool target and other equipment; the doctor scans the bone CT scan model of the patient's leg. Import the computer to form a 3D model for preoperative planning, plan the coordinates of the osteotomy plane, select the appropriate type of prosthesis, and plan the installation position of the prosthesis; the doctor uses the target pen to point the patient's femur and tibia feature points, and the NDI navigation device uses the base target to target As a benchmark, record the position of the patient's bone feature point and send the bone feature point position to the computer.

S304:将多个特征点与待处理目标对象的实时位置进行匹配,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置。S304: Match the multiple feature points with the real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located.

具体地,待处理目标对象为患者的手术位置,如股骨及胫骨。计算机通过特征点匹配的计算方法得到患者的手术位置的股骨及胫骨实际方位,并将实际方位与股骨及胫骨的CT图像方位相对应,而后,将股骨、胫骨的实际方位与安装在股骨及胫骨上的相应靶标相联系形成配准,从而使股骨靶标和胫骨靶标可以实时跟踪骨头的实际位置,在手术过程中,只要靶标与骨头相对位置固定,骨头移动不会影响手术效果。Specifically, the target object to be processed is the surgical site of the patient, such as the femur and the tibia. The computer obtains the actual orientation of the femur and tibia of the patient's surgical position through the calculation method of feature point matching, and corresponds the actual orientation to the CT image orientation of the femur and tibia. The femoral target and the tibial target can track the actual position of the bone in real time. During the operation, as long as the relative position of the target and the bone is fixed, the movement of the bone will not affect the surgical effect.

在本实施例中,碰撞检测系统通过获取虚拟对象模型上预先标记的多个特征点,再将多个特征点与待处理目标对象的实时位置进行匹配,进而完成配准,实现了在虚拟对象模型中可以实时跟踪待处理目标对象的实际位置,方便后续的手术操作。In this embodiment, the collision detection system obtains multiple feature points pre-marked on the virtual object model, and then matches the multiple feature points with the real-time position of the target object to be processed, and then completes the registration. In the model, the actual position of the target object to be processed can be tracked in real time, which is convenient for subsequent surgical operations.

如图7所示,在其中一个实施例中,步骤S206获取目标器械的器械实时位置,包括:As shown in FIG. 7 , in one embodiment, step S206 acquires the real-time position of the target instrument, including:

S402:获取反光标识器与目标器械之间的预设位姿关系。S402: Acquire a preset pose relationship between the reflective marker and the target device.

具体地,碰撞检测系统获取反光标识器与目标器械之间的位姿关系,例如,碰撞检测系统首先将患者的骨部位虚拟对象模型与患者手术姿态的骨部位进行配准,而后,根据反光标识器获取目标器械(如机械臂)的当前位置和姿态。Specifically, the collision detection system obtains the pose relationship between the reflective marker and the target instrument. For example, the collision detection system first registers the virtual object model of the patient's bone part with the bone part of the patient's surgical posture, and then, according to the reflective marker The controller obtains the current position and attitude of the target instrument (such as a robotic arm).

S404:基于预设位姿关系,根据反光标识器的实时位姿得到目标器械的器械实时位置。S404: Based on the preset pose relationship, obtain the real-time position of the target device according to the real-time pose of the reflective marker.

具体地,碰撞检测系统根据利用反光标识器和经配准确定的手术器械与反光标识器之间的预设位姿关系,获取手术器械的实时位姿,再根据手术器械的位姿和人体组织之间的距离进行碰撞检测。例如,碰撞检测系统根据术前预先规划的机械臂移动路径,控制机械臂移动,并通过反光标识器获取当前机械臂位置和姿态;计算机械臂当前位置和姿态与手术床上的患者的骨骼位置之间的距离,若该距离超出阈值,则机械臂继续移动,并继续执行术前预先规划的机械臂移动路径,控制机械臂移动,反之停止机械臂运行。Specifically, the collision detection system obtains the real-time pose of the surgical instrument according to the reflective marker and the preset pose relationship between the surgical instrument and the reflective marker determined by registration, and then obtains the real-time pose of the surgical instrument according to the pose of the surgical instrument and human tissue. The distance between is used for collision detection. For example, the collision detection system controls the movement of the robot arm according to the pre-planned movement path of the robot arm, and obtains the current position and posture of the robot arm through the reflective marker; calculates the difference between the current position and posture of the robot arm and the bone position of the patient on the operating bed. If the distance exceeds the threshold, the robotic arm will continue to move, and continue to execute the pre-planned robotic arm movement path to control the robotic arm movement, otherwise stop the robotic arm.

在本实施例中,碰撞检测系统通过获取反光标识器与目标器械之间的位姿关系,再根据反光标识器的实时位姿得到目标器械的器械实时位置,机械臂可以通过反光标识器呈现在虚拟对象模型中,方便判断目标器械是否会发生碰撞。In this embodiment, the collision detection system obtains the pose relationship between the reflective marker and the target device, and then obtains the real-time position of the target device according to the real-time pose of the reflective marker. In the virtual object model, it is convenient to judge whether the target device will collide.

如图8和图9所示,在其中一个实施例中,在步骤S2O4将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置之前,还包括:As shown in FIG. 8 and FIG. 9, in one embodiment, in step S2O4, the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed, so as to determine the position of the virtual object model in the target object to be processed. Before the target position in the target coordinate system where the object is located, it also includes:

S502:扫描得到待处理目标对象的医学影像。S502: Scanning to obtain a medical image of the target object to be processed.

具体地,在术前碰撞检测系统通过扫描得到待处理目标对象的医学影像,其中,待处理目标对象可以是患者目标组织,包括不限于关节、皮肤等。例如:碰撞检测系统对膝关节的影像进行分割,获取患者目标组织的分割轮廓,进一步地,分割算法可以使用传统图像处理算法或者深度学习算法。Specifically, the preoperative collision detection system obtains the medical image of the target object to be processed by scanning, wherein the target object to be processed may be the target tissue of the patient, including but not limited to joints, skin, and the like. For example, the collision detection system segments the image of the knee joint to obtain the segmentation contour of the patient's target tissue. Further, the segmentation algorithm may use a traditional image processing algorithm or a deep learning algorithm.

S504:根据医学影像进行图像重建得到待处理目标对象的虚拟对象模型。S504: Perform image reconstruction according to the medical image to obtain a virtual object model of the target object to be processed.

具体地,碰撞检测系统通过已获取的膝关节分割轮廓,重建得到患者膝关节的虚拟对象模型,如图10所示,其中,虚拟对象模型即膝关节的三维模型。Specifically, the collision detection system reconstructs a virtual object model of the patient's knee joint through the acquired knee joint segmentation contour, as shown in FIG. 10 , where the virtual object model is a three-dimensional model of the knee joint.

在本实施例中,碰撞检测系统通过扫描得到待处理目标对象的医学影像,再将医学影像形成虚拟对象模型,便于虚拟对象模型与术中病人目标组织等进行配准。In this embodiment, the collision detection system obtains the medical image of the target object to be processed by scanning, and then forms a virtual object model from the medical image, which facilitates the registration of the virtual object model with the intraoperative patient target tissue.

在其中一个实施例中,步骤S208根据目标位置和器械实时位置判断目标器械是否会发生碰撞,包括:采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法,根据目标位置和器械实时位置判断目标器械是否会发生碰撞。In one embodiment, step S208 determines whether the target instrument will collide according to the target position and the real-time position of the instrument, including: adopting the K-dimensional space tree collision detection method and/or adopting the AABB tree collision detection method, according to the target position and the real-time instrument position. The position determines whether the target instrument will collide.

其中,K维空间树为KD-tree,全称k-dimensional树,是一种对二叉查找树的修改,可以对k维空间中的实例点进行存储以便对其进行快速检索的树形数据结构。AABB树为AABB-tree,全称axis aligned bounding box tree,轴对称包围盒,是一种对二叉搜索树的修改,每个节点包含的是几何图元,AABB树的构造是通过计算整个输入图元集的AABB来初始化的,然后将所有图元沿该框的最长坐标轴排序,并将图元分成两个大小相等的集合,递归地应用此过程,直到AABB包含单个图元。Among them, the K-dimensional space tree is KD-tree, the full name of k-dimensional tree, which is a modification of the binary search tree, which can store the instance points in the k-dimensional space for fast retrieval. . AABB tree is AABB-tree, full name axis aligned bounding box tree, axis-symmetric bounding box, is a modification of binary search tree, each node contains geometric primitives, AABB tree is constructed by calculating the entire input graph is initialized with an AABB of the set of primitives, then all primitives are sorted along the longest axis of the box, and the primitives are divided into two sets of equal size, this process is applied recursively until the AABB contains a single primitive.

具体地,碰撞检测系统根据目标位置和器械实时位置判断目标器械是否会发生碰撞,判断目标器械是否会发生碰撞采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法。Specifically, the collision detection system judges whether the target instrument will collide according to the target position and the real-time position of the instrument, and uses the K-dimensional space tree collision detection method and/or the AABB tree collision detection method to determine whether the target instrument will collide.

在本实施例中,碰撞检测系统通过采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法来判断目标器械是否会发生碰撞,可以实时跟踪目标器械和患者组织的术中的位姿;实现实时检测距离,消除碰撞风险。In this embodiment, the collision detection system uses the K-dimensional space tree collision detection method and/or the AABB tree collision detection method to determine whether the target instrument will collide, and can track the intraoperative pose of the target instrument and patient tissue in real time ; Real-time detection of distance, eliminating the risk of collision.

如图11和图12所示,在其中一个实施例中,K维空间树碰撞检测方法,包括:As shown in FIG. 11 and FIG. 12 , in one embodiment, the K-dimensional space tree collision detection method includes:

S602:将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云。S602: Use the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud.

具体的,碰撞检测系统根据目标位置和器械实时位置判断目标器械是否会发生碰撞,将所述目标位置和所述器械实时位置作为被查询点云和目标点云,或者是将所述目标位置和所述器械实时位置作为目标点云和被查询点云。Specifically, the collision detection system determines whether the target instrument will collide according to the target position and the real-time position of the instrument, and uses the target position and the real-time position of the instrument as the queried point cloud and the target point cloud, or uses the target position and the real-time position of the instrument as the queried point cloud and the target point cloud. The real-time position of the instrument is used as the target point cloud and the queried point cloud.

S604:根据所述被查询点云创建K维空间树。S604: Create a K-dimensional space tree according to the queried point cloud.

具体的,碰撞检测系将所述目标位置或所述器械实时位置作为被查询点云,根据被查询点云创建K维空间树,以便通过K维空间树确定待处理目标对象采样点与目标器械采样点的位置关系。Specifically, the collision detection system takes the target position or the real-time position of the instrument as the queried point cloud, and creates a K-dimensional space tree according to the queried point cloud, so as to determine the sample points of the target object to be processed and the target instrument through the K-dimensional space tree. The location relationship of the sampling points.

S604:遍历所述K维空间树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。S604: Traverse the K-dimensional space tree, and determine whether the target equipment will collide according to the closest distance between the target point cloud and the queried point cloud.

具体的,遍历K维空间树,按照二叉查找查询目标器械采样点与待处理目标对象采样点之间的最近距离,判断其是否小于预设的阈值,以便进行碰撞检测并控制目标器械移动/停止。Specifically, the K-dimensional space tree is traversed, and the closest distance between the sampling point of the target device and the sampling point of the target object to be processed is queried according to binary search, and it is judged whether it is smaller than a preset threshold, so as to perform collision detection and control the movement of the target device// stop.

在本实施例中,碰撞检测系统通过创建K维空间树,将待处理目标对象以及目标器械的采样点导入K维空间树,以获得待处理目标对象以及目标器械之间最近的距离,并判断该距离是否小于阈值,从而控制目标器械的进一步动作。In this embodiment, by creating a K-dimensional space tree, the collision detection system imports the sampling points of the target object to be processed and the target equipment into the K-dimensional space tree to obtain the closest distance between the target object to be processed and the target equipment, and judges Whether the distance is less than a threshold value controls further movement of the target instrument.

在其中一个实施例中,所述将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云之前,包括:In one embodiment, before taking the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud, the method includes:

分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点。The point cloud of the target position and the point cloud of the real-time position of the instrument are respectively down-sampled to obtain the sampling points of the target object to be processed and the target instrument.

其中,点云为物体表面的点集合。降采样为将三维空间体素化,然后在每个体素里采样一个点,通常可用中心点或最靠近中心的点作为采样点。Among them, the point cloud is a collection of points on the surface of the object. Downsampling is to voxelize the three-dimensional space, and then sample a point in each voxel, usually the center point or the point closest to the center can be used as the sampling point.

具体地,碰撞检测系统对目标器械的点云数据和患者位姿的骨骼的点云数据分别降采样。其中,点云降采样采用点云体素降采样算法来进行计算采样,由于碰撞只需要考虑物体的表面,因此,点云只有物体表面的点,仅降采样这些点,得到待处理目标对象和目标器械的采样点。Specifically, the collision detection system downsamples the point cloud data of the target instrument and the point cloud data of the bones of the patient pose respectively. Among them, the point cloud downsampling adopts the point cloud voxel downsampling algorithm for calculation and sampling. Since the collision only needs to consider the surface of the object, the point cloud only has points on the surface of the object, and only these points are downsampled to obtain the target object to be processed and The sampling point of the target device.

在本实施例中,碰撞检测系统通过对待处理目标对象以及目标器械进行点云降采样,可以在减少点数量的同时,保证点云的形状特征,提高碰撞检测的计算速度。In this embodiment, the collision detection system can reduce the number of points while ensuring the shape characteristics of the point cloud and improve the calculation speed of collision detection by down-sampling the point cloud of the target object to be processed and the target equipment.

如图13、14和图15所示,在其中一个实施例中,分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点,包括:As shown in FIGS. 13 , 14 and 15 , in one embodiment, the point cloud of the target position and the point cloud of the real-time position of the instrument are down-sampled to obtain the target object to be processed and the point cloud of the instrument. Sampling points for target devices, including:

S702:计算点云的包围盒,将包围盒离散成若干个体素。S702: Calculate the bounding box of the point cloud, and discretize the bounding box into several voxels.

具体地,碰撞检测系统通过计算点云的包围盒,再把包围盒离散成小体素。其中,体素的包围盒长宽高可以根据需要进行设定,也可以通过设定包围盒三个方向的格点数来求得。Specifically, the collision detection system calculates the bounding box of the point cloud, and then discretizes the bounding box into small voxels. Among them, the length, width and height of the bounding box of the voxel can be set as required, and can also be obtained by setting the number of grid points in the three directions of the bounding box.

S704:将每个体素的中心点或离中心点最近的点作为采样点。S704: Use the center point of each voxel or the point closest to the center point as the sampling point.

具体地,碰撞检测系统创建体素,通过计算点云的包围盒,再把包围盒离散成小体素,在每个小体素中包含了若干个点,碰撞检测系统在体素的包围盒里取出一个最靠近中心点的点作为采样点,其余小体素内点舍弃。Specifically, the collision detection system creates voxels, calculates the bounding box of the point cloud, and then discretizes the bounding box into small voxels. Each small voxel contains several points, and the collision detection system calculates the bounding box of the voxel. A point closest to the center point is taken out as a sampling point, and the remaining points in the small voxels are discarded.

在本实施例中,碰撞检测系统通过获取体素的中心点或离中心最近的点作为采样点,舍弃小体素内点舍弃,减少了实时进行碰撞检测时的计算量。In this embodiment, the collision detection system obtains the center point of the voxel or the point closest to the center as the sampling point, and discards the points in the small voxel, which reduces the amount of calculation when performing collision detection in real time.

如图16所示,在其中一个实施例中,建立K维空间树,包括:As shown in Figure 16, in one embodiment, establishing a K-dimensional space tree includes:

S802:建立根节点。S802: Establish a root node.

具体地,碰撞检测系统建立K维空间树,首先要建立K维空间树的根节点。Specifically, when the collision detection system establishes a K-dimensional space tree, the root node of the K-dimensional space tree must be established first.

S804:计算所述被查询点云的方差值,将方差值作为分割特征。S804: Calculate the variance value of the queried point cloud, and use the variance value as a segmentation feature.

具体地,碰撞检测系统建立K维空间树的根节点后,计算所述被查询点云的方差值,方差计算公式:Specifically, after establishing the root node of the K-dimensional space tree, the collision detection system calculates the variance value of the queried point cloud, and the variance calculation formula is:

Figure BDA0003499973470000071
Figure BDA0003499973470000071

其中,x为算术平均值,相当于对一个点集序列的x轴所有值做方差,y轴所有值做方差,然后比较方差确定特征,n为根节点。将得到的方差值作为分割特征。Among them, x is the arithmetic mean, which is equivalent to doing the variance of all the values of the x-axis of a point set sequence, and doing the variance of all the values of the y-axis, and then comparing the variance to determine the feature, and n is the root node. The obtained variance value is used as the segmentation feature.

S806:将分割特征的中位数作为分割点。S806: Use the median of the segmentation features as the segmentation point.

具体地,碰撞检测系统建立K维空间树的根节点后,计算方差值,将得到的方差值作为分割特征,再将分割特征的中位数作为分割点。Specifically, after the collision detection system establishes the root node of the K-dimensional space tree, the variance value is calculated, the obtained variance value is used as the segmentation feature, and the median of the segmentation feature is used as the segmentation point.

S808:将分割特征小于分割点的分割特征传递给根节点的左节点,大于分割点的分割特征传递给根节点的右节点。S808: Transfer the segmentation feature whose segmentation feature is smaller than the segmentation point to the left node of the root node, and the segmentation feature whose segmentation feature is larger than the segmentation point is transmitted to the right node of the root node.

具体地,碰撞检测系统建立K维空间树的根节点后,将分割特征的中位数作为分割点,将点集序列数据集中小于分割点的传递给根节点的左节点,大于分割点的传递给根节点的右节点。Specifically, after the collision detection system establishes the root node of the K-dimensional space tree, the median of the segmentation features is used as the segmentation point, and the point set sequence data set smaller than the segmentation point is passed to the left node of the root node, and the transmission is greater than the segmentation point. Gives the right node of the root node.

S810:递归执行上述步骤直至所有分割特征建立到K维空间树的根节点的左节点、右节点上为止。S810: Recursively execute the above steps until all segmentation features are established on the left node and the right node of the root node of the K-dimensional space tree.

如图17所示,具体地,碰撞检测系统递归执行步骤S704至S708,直到点集序列中所有数据都被建立到K维空间树的节点上为止。例如:A、B、C、D、E和F六个点组成二维数据集,这六个点的方差最大的特征是x坐标值,取x坐标值为中位数的点A为根节点,将B点分为左子树,将C、D、E和F组成右子树,C、D、E和F的x轴值中值节点为C(70,10),因此C作为A的右节点。C、D、E和F的方差特征最大值是y轴特征,所以D、E和F组成C的右子树,D、E和F的方差最大值为x轴值,因此D点为中值节点做为D、E和F在C子树的右节点,同时E为D的左节点,F为D的右节点。As shown in FIG. 17 , specifically, the collision detection system recursively executes steps S704 to S708 until all data in the point set sequence are established on the nodes of the K-dimensional space tree. For example, six points A, B, C, D, E and F form a two-dimensional data set. The feature with the largest variance of these six points is the x-coordinate value, and the point A whose x-coordinate value is the median is the root node. , Divide point B into the left subtree, and divide C, D, E and F into the right subtree. The median node of the x-axis value of C, D, E and F is C(70,10), so C is used as A’s right node. The maximum variance feature of C, D, E and F is the y-axis feature, so D, E and F form the right subtree of C, and the maximum variance of D, E and F is the x-axis value, so point D is the median value The nodes are the right nodes of D, E, and F in the C subtree, while E is the left node of D, and F is the right node of D.

具体地,在K维空间树中搜索最近邻居的过程如下:从根节点开始,算法递归地向下移动树,与插入搜索点的方式相同,也即向左或向右取决于该点是否小于或大于分割维度中的当前节点。一旦算法到达叶节点,它就会检查该节点,如果距离更好,则将该节点保存为“当前最佳”。该算法展开树的递归,在每个节点执行以下步骤:如果当前节点比当前最佳节点更近,则它成为当前最佳节点。该算法检查在分裂平面的另一侧是否可能存在比当前最佳点更靠近搜索点的任何点。Specifically, the process of searching for nearest neighbors in a K-dimensional space tree is as follows: starting from the root node, the algorithm recursively moves down the tree in the same way as inserting a search point, i.e. to the left or to the right depending on whether the point is smaller than or greater than the current node in the split dimension. Once the algorithm reaches a leaf node, it checks the node and if the distance is better, saves the node as "current best". The algorithm expands the recursion of the tree, performing the following steps at each node: if the current node is closer than the current best node, it becomes the current best node. The algorithm checks if there might be any point on the other side of the split plane that is closer to the search point than the current best point.

如图18所示,需要说明的是,K维空间树是通过将分割超平面与围绕搜索点的超球面相交来完成的,该超球面的半径等于当前最近的距离。由于超平面都是轴对齐的,因此作为一个简单的比较来实现,以查看搜索点的分割坐标与当前节点之间的距离是否小于从搜索点到当前最佳点的距离。如果超球面穿过平面,则平面的另一侧可能有更近的点,因此算法必须从当前节点向下移动树的另一个分支以寻找更近的点,遵循与整个搜索相同的递归过程.如果超球面不与分裂平面相交,则算法继续沿树向上走,并消除该节点另一侧的整个分支。当算法为根节点完成这个过程时,完成搜索。As shown in Figure 18, it should be noted that the K-dimensional space tree is accomplished by intersecting the segmentation hyperplane with a hypersphere surrounding the search point, the radius of the hypersphere being equal to the current closest distance. Since the hyperplanes are all axis-aligned, this is implemented as a simple comparison to see if the distance between the split coordinates of the search point and the current node is less than the distance from the search point to the current best point. If the hypersphere crosses the plane, there may be a closer point on the other side of the plane, so the algorithm must move down another branch of the tree from the current node to find a closer point, following the same recursive process as the entire search. If the hypersphere does not intersect the splitting plane, the algorithm continues up the tree and eliminates the entire branch on the other side of the node. When the algorithm completes this process for the root node, the search is complete.

在本实施例中,碰撞检测系统通过建立根节点;将方差最大的特征作为分割特征;将所述分割特征的中位数作为分割点;将所述分割特征中特征值小于中位数的所述分割特征传递给根节点的左节点,大于中位数的所述分割特征传递给根节点的右节点;递归执行直至所述分割特征中所有特征值被建立到所述K维空间树的所述根节点上为止,完成建立K维空间树。方便确定K维空间树与患者患处最近的节点,方便后续的碰撞检测。In this embodiment, the collision detection system establishes a root node; takes the feature with the largest variance as the segmentation feature; takes the median of the segmentation features as the segmentation point; The segmentation feature is passed to the left node of the root node, and the segmentation feature greater than the median is passed to the right node of the root node; recursively execute until all eigenvalues in the segmentation feature are established to all the K-dimensional space tree. Up to the root node described above, the establishment of the K-dimensional space tree is completed. It is convenient to determine the nearest node of the K-dimensional space tree to the patient's affected area, which is convenient for subsequent collision detection.

如图19和图20所示,在其中一个实施例中,遍历所述K维空间树,根据目标点云与被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:As shown in FIG. 19 and FIG. 20 , in one embodiment, traversing the K-dimensional space tree, and determining whether the target equipment will collide according to the closest distance between the target point cloud and the queried point cloud, including:

S902:获取第一目标点云和第一被查询点云。S902: Obtain the first target point cloud and the first queried point cloud.

其中,目标点云为患者患处的点云,例如,患者膝关节患处的点云;被查询点云为目标器械末端的点云,例如,手术机械臂末端的点云。The target point cloud is the point cloud of the affected part of the patient, for example, the point cloud of the affected part of the patient's knee joint; the queried point cloud is the point cloud of the end of the target instrument, such as the point cloud of the end of the surgical robotic arm.

具体地,碰撞检测系统获取目标点云以及被查询点云,并形成目标点云组以及被查询点云组。Specifically, the collision detection system acquires the target point cloud and the queried point cloud, and forms the target point cloud group and the queried point cloud group.

S904:遍历每个第一被查询点云,找到第一被查询点云的点与第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离,判断所述第一最近距离是否会发生碰撞。S904: Traverse each first queried point cloud, find the two closest points between the point of the first queried point cloud and the point of the first target point cloud, use the distance between the two points as the first closest distance between the point clouds, and determine the Whether a collision will occur at the first closest distance.

具体地,碰撞检测系统遍历被查询点云组的每一个点,找到目标点云组与被查询点云组中最近的点。通过目标点云组与被查询点云组中最接近的点,得到最接近的点的距离最小值,确定目标点云组与被查询点云组的最近距离。例如,在骨科手术中,在配准后,基于得到术中手术机械臂末端的点云为被查询点云,病人膝关节点云为目标点云,对这些点云降采样后,再对被查询点云建立对应K维空间树,然后使用建立的K维空间树,遍历查询K维空间树中每个点与目标点云的最近距离,更新两个点云间的最近距离。Specifically, the collision detection system traverses each point of the queried point cloud group, and finds the closest point in the target point cloud group and the queried point cloud group. Through the closest point between the target point cloud group and the queried point cloud group, the minimum distance of the closest point is obtained, and the closest distance between the target point cloud group and the queried point cloud group is determined. For example, in orthopaedic surgery, after registration, the point cloud at the end of the surgical robotic arm is obtained as the queried point cloud, and the point cloud of the patient's knee joint is the target point cloud. Query the point cloud to establish a corresponding K-dimensional space tree, and then use the established K-dimensional space tree to traverse and query the closest distance between each point in the K-dimensional space tree and the target point cloud, and update the closest distance between the two point clouds.

在本实施例中,碰撞检测系统获取第一目标点云和第一被查询点云,建立被查询点云的K维空间树,并遍历每个第一被查询点云,找到第一被查询点云的点与第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离。通过确定第一最近距离,并在第一最近距离发生变化时,可以实时更新,以便及时获知可能发生的碰撞情况,提高手术安全性和可靠性。In this embodiment, the collision detection system acquires the first target point cloud and the first queried point cloud, establishes a K-dimensional space tree of the queried point cloud, and traverses each first queried point cloud to find the first queried point cloud. The point of the point cloud is the closest two points to the point of the first target point cloud, and the distance between the two points is taken as the first closest distance between the point clouds. By determining the first closest distance, and when the first closest distance changes, it can be updated in real time, so as to know the possible collision situation in time, and improve the safety and reliability of the operation.

如图21和图22所示,在其中一个实施例中,AABB树碰撞检测方法,包括:As shown in Figure 21 and Figure 22, in one embodiment, the AABB tree collision detection method includes:

S1002:将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云。S1002: Use the target position and the real-time position of the instrument as a queried point cloud and/or a target point cloud.

具体的,碰撞检测系统根据目标位置和器械实时位置判断目标器械是否会发生碰撞,将所述目标位置和所述器械实时位置作为被查询点云和目标点云,或者是将所述目标位置和所述器械实时位置作为目标点云和被查询点云。Specifically, the collision detection system determines whether the target instrument will collide according to the target position and the real-time position of the instrument, and uses the target position and the real-time position of the instrument as the queried point cloud and the target point cloud, or uses the target position and the real-time position of the instrument as the queried point cloud and the target point cloud. The real-time position of the instrument is used as the target point cloud and the queried point cloud.

S1004:根据被查询点云建立轴对称包围盒树。S1004: Build an axisymmetric bounding box tree according to the queried point cloud.

具体地,碰撞检测系统根据被查询点云建立轴对称包围盒树,将待处理目标对象和目标器械的采样点导入轴对称包围盒树,以便通过轴对称包围盒树确定待处理目标对象采样点与目标器械的采样点的位置关系。Specifically, the collision detection system establishes an axisymmetric bounding box tree according to the queried point cloud, and imports the sampling points of the target object to be processed and the target instrument into the axisymmetric bounding box tree, so as to determine the sampling points of the target object to be processed through the axisymmetric bounding box tree The positional relationship to the sampling point of the target instrument.

S1006:遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。S1006: Traverse the axisymmetric bounding box tree, and determine whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

具体地,碰撞检测系统遍历轴对称包围盒树,确定待处理目标对象采样点与目标器械采样点中最近的距离,并判断最近的距离是否小于预设的阈值,以便控制目标器械移动/停止。Specifically, the collision detection system traverses the axisymmetric bounding box tree, determines the closest distance between the sampling point of the target object to be processed and the sampling point of the target instrument, and judges whether the closest distance is less than a preset threshold, so as to control the movement/stop of the target instrument.

在本实施例中,碰撞检测系统通过创建轴对称包围盒树,将待处理目标对象以及目标器械的采样点导入轴对称包围盒树,以获得待处理目标对象以及目标器械之间最近的距离,实时跟踪机械臂和病人组织的术中的位姿,实时检测距离,消除碰撞风险。In this embodiment, the collision detection system creates an axisymmetric bounding box tree, and imports the sampling points of the target object to be processed and the target device into the axisymmetric bounding box tree to obtain the closest distance between the target object to be processed and the target device, Real-time tracking of the intraoperative pose of the robotic arm and patient tissue, real-time detection of distance, and elimination of collision risks.

如图23所示,在其中一个实施例中,建立轴对称包围盒树,包括:As shown in Figure 23, in one embodiment, an axisymmetric bounding box tree is established, including:

S1102:将三角形作为根节点。S1102: Use the triangle as the root node.

具体地,根节点为包含的几何图元,例如,根节点包含的是三角形图元。Specifically, the root node contains geometric primitives, for example, the root node contains triangle primitives.

S1104:建立被查询点云的叶节点,根据叶节点的关联对象分配轴对称包围盒树。S1104: Establish leaf nodes of the queried point cloud, and assign an axis-symmetric bounding box tree according to the associated objects of the leaf nodes.

具体地,碰撞检测系统建立所述被查询点云的叶节点,并根据该叶节点的关联对象为其分配一个AABB。导入手术器械点云数据,以使点云数据成为叶节点的关联对象。Specifically, the collision detection system establishes the leaf node of the queried point cloud, and assigns an AABB to the leaf node according to the associated object of the leaf node. Import the surgical instrument point cloud data so that the point cloud data becomes the associated object of the leaf node.

S1106:在轴对称包围盒树中找到预定的现有节点,使新叶子成为预定的现有节点的兄弟节点。S1106: Find a predetermined existing node in the axisymmetric bounding box tree, and make the new leaf a sibling node of the predetermined existing node.

具体地,碰撞检测系统在轴对称包围盒树中找到现有节点,现有节点即除根节点外的一个叶节点或分支,将现有节点和新叶子节点作为兄弟节点,进行比较,判断是否存在交集。Specifically, the collision detection system finds an existing node in the axisymmetric bounding box tree, the existing node is a leaf node or branch except the root node, and compares the existing node and the new leaf node as sibling nodes to determine whether there is intersection.

S1108:为预定的现有节点和新叶子创建分支节点,并为分支节点分配两个节点的轴对称包围盒。S1108: Create branch nodes for predetermined existing nodes and new leaves, and assign axisymmetric bounding boxes of two nodes to the branch nodes.

具体地,碰撞检测系统在轴对称包围盒树中找到现有节点,现有节点即除根节点外的一个叶节点或分支,将现有节点和新叶子节点作为兄弟节点,在各兄弟节点比较后,若没有交集,判断兄弟节点组合后包围盒面积的大小,较小的两个包围盒分别创建新的分支节点,并为另外的节点分配包含两个节点的AABB,其本质上结合了两个用以定位的新的分支节点和新叶子的AABB。Specifically, the collision detection system finds an existing node in the axisymmetric bounding box tree. The existing node is a leaf node or branch except the root node, and the existing node and the new leaf node are regarded as sibling nodes. After comparing each sibling node , if there is no intersection, judge the size of the bounding box area after the combination of sibling nodes, the smaller two bounding boxes create new branch nodes respectively, and assign an AABB containing two nodes to other nodes, which essentially combines two AABBs to locate new branch nodes and new leaves.

S1110:将新叶子附加到两个节点上。S1110: Attach a new leaf to both nodes.

具体地,碰撞检测系统在轴对称包围盒树中找到现有节点,将后加入的新叶子附加到新的分支节点,将现有节点和新叶子节点作为兄弟节点,较小的两个包围盒分别创建新的分支节点,并为另外的节点分配包含两个节点的AABB,其本质上结合了两个用以定位的新的分支节点和新叶子的AABB,将新叶子附加到分支节点。Specifically, the collision detection system finds the existing node in the axisymmetric bounding box tree, attaches the new leaf added later to the new branch node, takes the existing node and the new leaf node as sibling nodes, and the smaller two bounding boxes A new branch node is created separately, and an AABB containing two nodes is assigned to the other node, which essentially combines the two AABBs for the new branch node and the new leaf to locate, and the new leaf is attached to the branch node.

S1112:从轴对称包围盒树中移除现有节点,并将现有节点附加到两个节点上。S1112: Remove the existing node from the axisymmetric bounding box tree and append the existing node to the two nodes.

具体地,碰撞检测系统将轴对称包围盒树中的比较过的现有节点移除,并将移除的现有节点附加到新的分支节点。Specifically, the collision detection system removes the compared existing nodes in the axisymmetric bounding box tree and appends the removed existing nodes to the new branch nodes.

S1114:将两个节点附加为现有节点的父节点的子节点上。S1114: Attach two nodes as child nodes of the parent node of the existing node.

具体地,碰撞检测系统将轴对称包围盒树中的比较过的现有节点移除,并将移除的现有节点附加到新的分支节点,再将新分支节点附加为现有节点上一个父节点的子节点。Specifically, the collision detection system removes the compared existing nodes in the axisymmetric bounding box tree, appends the removed existing nodes to a new branch node, and then appends the new branch node as the previous node on the existing node Child node of parent node.

S1116:调整父节点的轴对称包围盒,以确保父节点包含所有子节点的轴对称包围盒。S1116: Adjust the axisymmetric bounding box of the parent node to ensure that the parent node contains the axisymmetric bounding boxes of all child nodes.

具体地,碰撞检测系统将轴对称包围盒树中的比较过的现有节点移除,并将移除的现有节点附加到新的分支节点,再将新分支节点附加为现有节点上一个父节点的子节点。再回到轴对称包围盒树上,调整所有父节点的轴对称包围盒,以确保父节点包含所有子节点的轴对称包围盒。例如,通过如下过程建立轴对称包围盒树:Specifically, the collision detection system removes the compared existing nodes in the axisymmetric bounding box tree, appends the removed existing nodes to a new branch node, and then appends the new branch node as the previous node on the existing node Child node of parent node. Back on the axisymmetric bounding box tree, adjust the axisymmetric bounding boxes of all parent nodes to ensure that the parent node contains the axisymmetric bounding boxes of all child nodes. For example, an axisymmetric bounding box tree is built by the following process:

将第一三角形加入树中作为根节点,将第二三角形和第三三角形加入树结构中。第二三角形和第三三角形需要与根节点做比较,判断根节点的区域是否跟第一三角形有交集。如果没有交集,比较包含第一三角形和第二三角形、第一三角形和第三三角形的包围盒大小,第一三角形和第二三角形的面积较小,建立B1和B2的父节点B,删除根节点,将B1和B2作为B的左右子节点。The first triangle is added to the tree as the root node, and the second and third triangles are added to the tree structure. The second triangle and the third triangle need to be compared with the root node to determine whether the area of the root node has an intersection with the first triangle. If there is no intersection, compare the size of the bounding box containing the first triangle and the second triangle, the first triangle and the third triangle, the area of the first triangle and the second triangle is smaller, establish the parent node B of B1 and B2, delete the root node , take B1 and B2 as the left and right child nodes of B.

同理,比较B和C,没有交集,建立根节点A,B和C分别作为左右子节点。In the same way, compare B and C, there is no intersection, and establish root nodes A, B and C as left and right child nodes respectively.

进一步地,在建立AABB树后,通过AABB树数据结构检索,查询点云间的最近距离。AABB树中的子几何对象是模型中的三角面片。例如,查询每个点到图中锥形模型的距离,从根节点开始遍历,检索目标点云与根节点的距离,再左右遍历与分支节点,再左右遍历叶节点,以此类推。其中,最小值即为最近距离。Further, after the AABB tree is established, the closest distance between point clouds is queried through the AABB tree data structure retrieval. Sub-geometry objects in the AABB tree are triangular patches in the model. For example, query the distance from each point to the conical model in the graph, traverse from the root node, retrieve the distance between the target point cloud and the root node, then traverse left and right and branch nodes, then traverse left and right leaf nodes, and so on. Among them, the minimum value is the closest distance.

其中,AABB树中包含四面体模型的九个三角面片,通过以上方式检索目标球形点云中每个点与这九个三角面片的距离,其中,最小值则为两者之间的最近距离。Among them, the AABB tree contains nine triangular patches of the tetrahedron model, and the distance between each point in the target spherical point cloud and these nine triangular patches is retrieved by the above method, and the minimum value is the closest between the two. distance.

在本实施例中,碰撞检测系统在建立AABB树后,可以通过图元位姿的更新动态构建父节点的空间位置,进而减少了机械臂运动过程中重新构建树形结构的时间,可以提高碰撞检测的效率。In this embodiment, after the collision detection system establishes the AABB tree, it can dynamically construct the spatial position of the parent node through the update of the primitive pose, thereby reducing the time for rebuilding the tree structure during the movement of the robotic arm, which can improve the collision rate. detection efficiency.

如图24、图25和图26所示,在其中一个实施例中,遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:As shown in Fig. 24, Fig. 25 and Fig. 26, in one embodiment, the axisymmetric bounding box tree is traversed, and the target is determined according to the closest distance between the target point cloud and the queried point cloud Whether the instrument will collide, including:

S1202:获取第二目标点云和第二被查询点云。S1202: Acquire a second target point cloud and a second queried point cloud.

具体地,碰撞检测系统获取第二目标点云和第二被查询点云,并形成第二目标点云组以及第二被查询点云组。Specifically, the collision detection system acquires the second target point cloud and the second queried point cloud, and forms a second target point cloud group and a second queried point cloud group.

S1204:建立第二被查询点云的轴对称包围盒树,遍历每个第二被查询点云,找到第二被查询点云的点与第二目标点云的点最近的两点,将两点距离作为点云间的第二最近距离。S1204: Establish an axis-symmetric bounding box tree of the second queried point cloud, traverse each second queried point cloud, find the two points closest to the point of the second queried point cloud and the point of the second target point cloud, The point distance is used as the second closest distance between point clouds.

具体地,碰撞检测系统获取第二被查询点云,并依据获取到的第二被查询点云组建立AABB树,遍历AABB树上第二被查询点云组的每一个点,找到第二目标点云组与第二被查询点云组中最近的点。通过第二目标点云组与第二被查询点云组中最接近的点,得到最接近的点的距离最小值,即为第二点云间的第二最近距离。Specifically, the collision detection system acquires the second queried point cloud, builds an AABB tree according to the acquired second queried point cloud group, traverses each point of the second queried point cloud group on the AABB tree, and finds the second target The closest point in the point cloud group to the second queried point cloud group. Through the closest point in the second target point cloud group and the second queried point cloud group, the minimum distance of the closest point is obtained, that is, the second closest distance between the second point clouds.

在本实施例中,碰撞检测系统在建立AABB树后,依据第二目标点云和第二被查询点云之间的第二最近距离来消除碰撞风险,并且能够实时跟踪机械臂和病人组织的术中的位姿。In this embodiment, after establishing the AABB tree, the collision detection system eliminates the collision risk according to the second closest distance between the second target point cloud and the second queried point cloud, and can track the collision between the robotic arm and the patient tissue in real time. Intraoperative posture.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flowcharts involved in the above embodiments are sequentially displayed according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but may be performed at different times The execution order of these steps or phases is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or phases in the other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的碰撞检测方法的碰撞检测系统。该碰撞检测系统所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个碰撞检测系统实施例中的具体限定可以参见上文中对于碰撞检测方法的限定,在此不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a collision detection system for implementing the above-mentioned collision detection method. The implementation scheme for solving the problem provided by the collision detection system is similar to the implementation scheme described in the above method, so the specific limitations in one or more collision detection system embodiments provided below can refer to the above for collision detection method. limitations, which are not repeated here.

在其中一个实施例中,提供一种碰撞检测系统,碰撞检测系统包括:图像处理器以及位置采集器,图像处理器用于实现上述方法的步骤。In one of the embodiments, a collision detection system is provided. The collision detection system includes an image processor and a position collector, and the image processor is used to implement the steps of the above method.

具体地,位置采集器利用反光标识器和经注册确定的手术器械与反光标识器之间的位置关系,获取手术器械的实时位置。图像处理器用于控制位置采集器实现上述方法的步骤。Specifically, the position collector acquires the real-time position of the surgical instrument by using the reflective marker and the positional relationship between the surgical instrument and the reflective marker determined by registration. The image processor is used to control the position collector to implement the steps of the above method.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的碰撞检测方法的手术系统。该手术系统所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个手术系统实施例中的具体限定可以参见上文中对于碰撞检测方法的限定,在此不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a surgical system for implementing the above-mentioned collision detection method. The implementation scheme for solving the problem provided by the surgical system is similar to the implementation scheme described in the above method, so the specific limitations in one or more surgical system embodiments provided below can refer to the above limitations on the collision detection method, It is not repeated here.

在其中一个实施例中,提供一种手术系统,包括:机械臂以及导航设备,导航设备将术前规划的坐标发送给所述机械臂,所述机械臂通过工具靶标定位运动到预定位置。In one of the embodiments, a surgical system is provided, comprising: a robotic arm and a navigation device, the navigation device sends the coordinates of the preoperative planning to the robotic arm, and the robotic arm moves to a predetermined position through tool target positioning.

具体地,将手术台车及导航台车放置在病床旁边合适的位置,安装股骨靶标、胫骨靶标、基座靶标、无菌袋、截骨导向工具、工具靶标等。医生将患者骨头CT扫描模型导入计算机进行术前规划,例如:规划截骨平面坐标,并选择合适型号的假体并规划假体安装方位,所述计算机包括主显示器2、键盘以及位于导航台车内的控制器。医生使用靶标笔点病人的股骨及胫骨的特征点,NDI导航设备以基座靶标为基准,记录病人骨头特征点位置,并将骨头特征点位置发送给计算机,然后计算机通过特征匹配算法得到股骨及胫骨的实际方位。并与股骨及胫骨的CT图像方位相对应,随后导航系统将股骨、胫骨的实际方位与安装在股骨及胫骨上的相应靶标相联系,从而使股骨靶标和胫骨靶标可以实时跟踪骨头的实际位置。导航设备将术前规划的截骨平面坐标发送给机械臂,机械臂通过工具靶标定位截骨平面并运动到预定位置,机械臂进入保持状态,医生即可使用摆锯或电钻通过截骨导向工具的截骨导向槽及导向孔进行截骨及钻孔操作。完成截骨及钻孔操作后,医生即可安装假体及进行其他手术操作。Specifically, the operating trolley and the navigation trolley are placed at suitable positions beside the hospital bed, and the femoral target, tibial target, base target, sterile bag, osteotomy guide tool, tool target, etc. are installed. The doctor imports the CT scan model of the patient's bone into the computer for preoperative planning, for example: planning the coordinates of the osteotomy plane, and selecting the appropriate type of prosthesis and planning the installation orientation of the prosthesis. The computer includes the main monitor 2, the keyboard and the navigation trolley. controller inside. The doctor uses the target pen to point the feature points of the patient's femur and tibia. The NDI navigation device uses the base target as a reference to record the position of the patient's bone feature points, and sends the position of the bone feature points to the computer, and then the computer obtains the femur and tibia through the feature matching algorithm. The actual orientation of the tibia. And corresponding to the CT image orientation of the femur and tibia, then the navigation system associates the actual orientation of the femur and tibia with the corresponding targets installed on the femur and tibia, so that the femoral target and the tibial target can track the actual position of the bone in real time. The navigation device sends the coordinates of the preoperatively planned osteotomy plane to the robotic arm. The robotic arm locates the osteotomy plane through the tool target and moves to a predetermined position. The robotic arm enters the holding state, and the doctor can use the oscillating saw or electric drill to guide the tool through the osteotomy. The osteotomy guide groove and guide hole are used for osteotomy and drilling operations. After the osteotomy and drilling are completed, the doctor can install the prosthesis and perform other surgical procedures.

上述碰撞检测系统和手术系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。The various modules in the collision detection system and the surgical system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图27所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储周期任务分配数据,例如配置文件、理论运行参数和理论偏差值范围、任务属性信息等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种碰撞检测方法。In one of the embodiments, a computer device is provided, the computer device may be a server, and the internal structure diagram thereof may be as shown in FIG. 27 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store periodic task assignment data, such as configuration files, theoretical operating parameters and theoretical deviation value ranges, task attribute information, and the like. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by a processor, implements a collision detection method.

本领域技术人员可以理解,图27中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 27 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,该存储器存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置;The virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据目标位置和器械实时位置判断目标器械与待处理目标对象是否会发生碰撞。Determine whether the target instrument and the target object to be processed will collide according to the target position and the real-time position of the instrument.

在一个实施例中,处理器执行计算机程序时实现将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置,包括:In one embodiment, when the processor executes the computer program, the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed, so as to determine the target coordinate system where the virtual object model is located in the target object to be processed target locations in , including:

获取虚拟对象模型上预先标记的多个特征点;Obtain multiple feature points pre-marked on the virtual object model;

将多个特征点与待处理目标对象的实时位置进行匹配,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置。The multiple feature points are matched with the real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located.

在一个实施例中,处理器执行计算机程序时实现获取目标器械的器械实时位置,包括:In one embodiment, when the processor executes the computer program, the real-time position of the instrument of the target instrument is obtained, including:

获取反光标识器与目标器械之间的预设位姿关系;Obtain the preset pose relationship between the reflective marker and the target device;

基于预设位姿关系,根据反光标识器的实时位姿得到目标器械的器械实时位置。Based on the preset pose relationship, the real-time position of the target device is obtained according to the real-time pose of the reflective marker.

在一个实施例中,处理器执行计算机程序时实现将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置之前,还包括:In one embodiment, when the processor executes the computer program, the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed, so as to determine the target coordinate system where the virtual object model is located in the target object to be processed Before the target location in, also include:

扫描得到待处理目标对象的医学影像;Scanning to obtain the medical image of the target object to be processed;

根据医学影像进行图像重建得到待处理目标对象的虚拟对象模型。The virtual object model of the target object to be processed is obtained by image reconstruction according to the medical image.

在一个实施例中,处理器执行计算机程序时实现根据目标位置和器械实时位置判断目标器械是否会发生碰撞,包括:In one embodiment, when the processor executes the computer program, determining whether the target instrument will collide according to the target position and the real-time position of the instrument, including:

采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法,根据目标位置和器械实时位置判断目标器械是否会发生碰撞。Using the K-dimensional space tree collision detection method and/or the AABB tree collision detection method, it is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

在一个实施例中,处理器执行计算机程序时实现K维空间树碰撞检测方法,包括:In one embodiment, a K-dimensional space tree collision detection method is implemented when the processor executes the computer program, including:

将目标位置和器械实时位置作为被查询点云和/或目标点云;Use the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据被查询点云创建K维空间树;Create a K-dimensional space tree based on the queried point cloud;

遍历K维空间树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞。Traverse the K-dimensional space tree, and judge whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在一个实施例中,处理器执行计算机程序时实现将目标位置和器械实时位置作为被查询点云和/或目标点云之前,包括:In one embodiment, before the processor executes the computer program, the target position and the real-time position of the instrument are used as the queried point cloud and/or the target point cloud, including:

分别对目标位置的点云和器械实时位置的点云进行降采样,得到待处理目标对象和目标器械的采样点。The point cloud of the target position and the point cloud of the real-time position of the instrument are down-sampled respectively to obtain the sampling points of the target object to be processed and the target instrument.

在一个实施例中,处理器执行计算机程序时实现分别对目标位置的点云和器械实时位置的点云进行降采样,得到待处理目标对象和目标器械的采样点,包括:In one embodiment, when the processor executes the computer program, down-sampling is performed on the point cloud of the target position and the point cloud of the real-time position of the instrument respectively, so as to obtain the sampling points of the target object to be processed and the target instrument, including:

计算点云的包围盒,将包围盒离散成若干个体素;Calculate the bounding box of the point cloud and discretize the bounding box into several voxels;

将每个体素的中心点或离中心点最近的点作为采样点。Take the center point of each voxel or the point closest to the center point as the sampling point.

在一个实施例中,处理器执行计算机程序时实现建立K维空间树,包括:In one embodiment, when the processor executes the computer program, the establishment of a K-dimensional space tree includes:

建立根节点;establish root node;

计算被查询点云的方差值,将方差值作为分割特征;Calculate the variance value of the queried point cloud, and use the variance value as the segmentation feature;

将分割特征的中位数作为分割点;Take the median of the segmentation feature as the segmentation point;

将分割特征小于分割点的分割特征传递给根节点的左节点,大于分割点的分割特征传递给根节点的右节点;Pass the segmentation feature whose segmentation feature is smaller than the segmentation point to the left node of the root node, and the segmentation feature larger than the segmentation point to the right node of the root node;

递归执行上述步骤直至所有分割特征建立到K维空间树的根节点的左节点、右节点上为止。The above steps are performed recursively until all segmentation features are established on the left and right nodes of the root node of the K-dimensional space tree.

在一个实施例中,处理器执行计算机程序时实现遍历K维空间树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞,包括:In one embodiment, when the processor executes the computer program, it implements traversal of the K-dimensional space tree, and determines whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud, including:

获取第一目标点云和第一被查询点云;Obtain the first target point cloud and the first queried point cloud;

遍历每个第一被查询点云,找到第一被查询点云的点与第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离,判断所述第一最近距离是否会发生碰撞。Traverse each first queried point cloud, find the two closest points between the first queried point cloud and the first target point cloud, take the distance between the two points as the first closest distance between the point clouds, and determine the first Whether a collision will occur at the closest distance.

在一个实施例中,处理器执行计算机程序时实现AABB树碰撞检测方法,包括:In one embodiment, the processor implements the AABB tree collision detection method when executing the computer program, including:

将目标位置和器械实时位置作为被查询点云和/或目标点云;Use the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据被查询点云建立轴对称包围盒树;Build an axisymmetric bounding box tree based on the queried point cloud;

遍历轴对称包围盒树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞。Traverse the axisymmetric bounding box tree, and judge whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在一个实施例中,处理器执行计算机程序时实现建立轴对称包围盒树,包括:In one embodiment, when the processor executes the computer program, the establishment of an axis-symmetric bounding box tree includes:

将三角形作为根节点;Take the triangle as the root node;

建立被查询点云的叶节点,根据叶节点的关联对象分配轴对称包围盒树;Establish leaf nodes of the queried point cloud, and assign axisymmetric bounding box trees according to the associated objects of the leaf nodes;

在轴对称包围盒树中找到预定的现有节点,使新叶子成为预定的现有节点的兄弟节点;Find a predetermined existing node in the axisymmetric bounding box tree, and make the new leaf a sibling node of the predetermined existing node;

为预定的现有节点和新叶子创建分支节点,并为分支节点分配两个节点的轴对称包围盒;Create branch nodes for predetermined existing nodes and new leaves, and assign axisymmetric bounding boxes of two nodes to the branch nodes;

将新叶子附加到两个节点上;Append the new leaf to both nodes;

从轴对称包围盒树中移除现有节点,并将现有节点附加到两个节点上;Remove the existing node from the axisymmetric bounding box tree and append the existing node to two nodes;

将两个节点附加为现有节点的父节点的子节点上;Append two nodes as children of the parent node of the existing node;

调整父节点的轴对称包围盒,以确保父节点包含所有子节点的轴对称包围盒。Adjusts the axisymmetric bounding box of the parent node to ensure that the parent node contains the axisymmetric bounding boxes of all child nodes.

在一个实施例中,处理器执行计算机程序时实现遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:In one embodiment, when the processor executes the computer program, the axisymmetric bounding box tree is traversed, and whether the target instrument will collide is determined according to the closest distance between the target point cloud and the queried point cloud, include:

获取第二目标点云和第二被查询点云;Obtain the second target point cloud and the second queried point cloud;

建立第二被查询点云的轴对称包围盒树,遍历每个第二被查询点云,找到第二被查询点云的点与第二目标点云的点最近的两点,将两点距离作为点云间的第二最近距离。Establish an axis-symmetric bounding box tree of the second queried point cloud, traverse each second queried point cloud, find the two closest points between the second queried point cloud and the second target point cloud, and calculate the distance between the two points. as the second closest distance between point clouds.

在一个实施例中,计算机程序被处理器执行时实现将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置,包括:In one embodiment, when the computer program is executed by the processor, the virtual object model of the target object to be processed is registered with the real-time position of the target object to be processed, so as to determine the target coordinates of the virtual object model where the target object to be processed is located target locations in the system, including:

获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed;

将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置;The virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located;

获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device;

根据目标位置和器械实时位置判断目标器械与所述待处理目标对象是否会发生碰撞。According to the target position and the real-time position of the instrument, it is determined whether the target instrument will collide with the target object to be processed.

在一个实施例中,计算机程序被处理器执行时实现将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置,包括:In one embodiment, when the computer program is executed by the processor, the virtual object model of the target object to be processed is registered with the real-time position of the target object to be processed, so as to determine the target coordinates of the virtual object model where the target object to be processed is located target locations in the system, including:

获取虚拟对象模型上预先标记的多个特征点;Obtain multiple feature points pre-marked on the virtual object model;

将多个特征点与待处理目标对象的实时位置进行匹配,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置。The multiple feature points are matched with the real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located.

在一个实施例中,计算机程序被处理器执行时实现获取目标器械的器械实时位置,包括:In one embodiment, the computer program, when executed by the processor, achieves obtaining the real-time instrument position of the target instrument, including:

获取反光标识器与目标器械之间的预设位姿关系;Obtain the preset pose relationship between the reflective marker and the target device;

基于预设位姿关系,根据反光标识器的实时位姿得到目标器械的器械实时位置。Based on the preset pose relationship, the real-time position of the target device is obtained according to the real-time pose of the reflective marker.

在一个实施例中,计算机程序被处理器执行时实现将待处理目标对象的虚拟对象模型与待处理目标对象的对象实时位置进行配准,以确定虚拟对象模型在待处理目标对象所在的目标坐标系中的目标位置之前,还包括:In one embodiment, when the computer program is executed by the processor, the virtual object model of the target object to be processed is registered with the real-time position of the target object to be processed, so as to determine the target coordinates of the virtual object model where the target object to be processed is located Before the target location in the system, also include:

扫描得到待处理目标对象的医学影像;Scanning to obtain the medical image of the target object to be processed;

根据医学影像进行图像重建得到待处理目标对象的虚拟对象模型。The virtual object model of the target object to be processed is obtained by image reconstruction according to the medical image.

在一个实施例中,计算机程序被处理器执行时实现根据目标位置和器械实时位置判断目标器械是否会发生碰撞,包括:In one embodiment, when the computer program is executed by the processor, it can determine whether the target instrument will collide according to the target position and the real-time position of the instrument, including:

采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法,根据目标位置和器械实时位置判断目标器械是否会发生碰撞。Using the K-dimensional space tree collision detection method and/or the AABB tree collision detection method, it is determined whether the target instrument will collide according to the target position and the real-time position of the instrument.

在一个实施例中,计算机程序被处理器执行时实现K维空间树碰撞检测方法,包括:In one embodiment, when the computer program is executed by the processor, a K-dimensional space tree collision detection method is implemented, including:

将目标位置和器械实时位置作为被查询点云和/或目标点云;Use the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据被查询点云创建K维空间树;Create a K-dimensional space tree based on the queried point cloud;

遍历K维空间树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞。Traverse the K-dimensional space tree, and judge whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在一个实施例中,计算机程序被处理器执行时实现将目标位置和器械实时位置作为被查询点云和/或目标点云之前,包括:In one embodiment, the computer program, when executed by the processor, includes:

分别对目标位置的点云和器械实时位置的点云进行降采样,得到待处理目标对象和目标器械的采样点。The point cloud of the target position and the point cloud of the real-time position of the instrument are down-sampled respectively to obtain the sampling points of the target object to be processed and the target instrument.

在一个实施例中,计算机程序被处理器执行时实现分别对目标位置的点云和器械实时位置的点云进行降采样,得到待处理目标对象和目标器械的采样点,包括:In one embodiment, when the computer program is executed by the processor, down-sampling is performed on the point cloud of the target position and the point cloud of the real-time position of the instrument respectively, so as to obtain the sampling points of the target object to be processed and the target instrument, including:

计算点云的包围盒,将包围盒离散成若干个体素;Calculate the bounding box of the point cloud and discretize the bounding box into several voxels;

将每个体素的中心点或离中心点最近的点作为采样点。Take the center point of each voxel or the point closest to the center point as the sampling point.

在一个实施例中,计算机程序被处理器执行时实现建立K维空间树,包括:In one embodiment, the computer program, when executed by the processor, implements the establishment of a K-dimensional space tree, including:

建立根节点;establish root node;

计算被查询点云的方差值,将方差值作为分割特征;Calculate the variance value of the queried point cloud, and use the variance value as the segmentation feature;

将分割特征的中位数作为分割点;Take the median of the segmentation feature as the segmentation point;

将分割特征小于分割点的分割特征传递给根节点的左节点,大于分割点的分割特征传递给根节点的右节点;Pass the segmentation feature whose segmentation feature is smaller than the segmentation point to the left node of the root node, and the segmentation feature larger than the segmentation point to the right node of the root node;

递归执行上述步骤直至所有分割特征建立到K维空间树的根节点的左节点、右节点上为止。The above steps are performed recursively until all segmentation features are established on the left and right nodes of the root node of the K-dimensional space tree.

在一个实施例中,计算机程序被处理器执行时实现遍历K维空间树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞,包括:In one embodiment, when the computer program is executed by the processor, the K-dimensional space tree is traversed, and whether the target instrument will collide is determined according to the closest distance between the target point cloud and the queried point cloud, including:

获取第一目标点云和第一被查询点云;Obtain the first target point cloud and the first queried point cloud;

遍历每个第一被查询点云,找到第一被查询点云的点与第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离,判断所述第一最近距离是否会发生碰撞。Traverse each first queried point cloud, find the two closest points between the first queried point cloud and the first target point cloud, take the distance between the two points as the first closest distance between the point clouds, and determine the first Whether a collision will occur at the closest distance.

在一个实施例中,计算机程序被处理器执行时实现AABB树碰撞检测方法,包括:In one embodiment, when the computer program is executed by the processor, the AABB tree collision detection method includes:

将目标位置和器械实时位置作为被查询点云和/或目标点云;Use the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud;

根据被查询点云建立轴对称包围盒树;Build an axisymmetric bounding box tree based on the queried point cloud;

遍历轴对称包围盒树,根据目标点云与被查询点云之间的最近距离判断目标器械是否会发生碰撞。Traverse the axisymmetric bounding box tree, and judge whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud.

在一个实施例中,计算机程序被处理器执行时实现建立轴对称包围盒树,包括:In one embodiment, the computer program, when executed by the processor, implements the establishment of an axisymmetric bounding box tree, including:

将三角形作为根节点;Take the triangle as the root node;

建立被查询点云的叶节点,根据叶节点的关联对象分配轴对称包围盒树;Establish leaf nodes of the queried point cloud, and assign axisymmetric bounding box trees according to the associated objects of the leaf nodes;

在轴对称包围盒树中找到预定的现有节点,使新叶子成为预定的现有节点的兄弟节点;Find a predetermined existing node in the axisymmetric bounding box tree, and make the new leaf a sibling node of the predetermined existing node;

为预定的现有节点和新叶子创建分支节点,并为分支节点分配两个节点的轴对称包围盒;Create branch nodes for predetermined existing nodes and new leaves, and assign axisymmetric bounding boxes of two nodes to the branch nodes;

将新叶子附加到两个节点上;Append the new leaf to both nodes;

从轴对称包围盒树中移除现有节点,并将现有节点附加到两个节点上;Remove the existing node from the axisymmetric bounding box tree and append the existing node to two nodes;

将两个节点附加为现有节点的父节点的子节点上;Append two nodes as children of the parent node of the existing node;

调整父节点的轴对称包围盒,以确保父节点包含所有子节点的轴对称包围盒。Adjusts the axisymmetric bounding box of the parent node to ensure that the parent node contains the axisymmetric bounding boxes of all child nodes.

在一个实施例中,计算机程序被处理器执行时实现遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:In one embodiment, the computer program traverses the axisymmetric bounding box tree when executed by the processor, and determines whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud ,include:

获取第二目标点云和第二被查询点云;Obtain the second target point cloud and the second queried point cloud;

建立第二被查询点云的轴对称包围盒树,遍历每个第二被查询点云,找到第二被查询点云的点与第二目标点云的点最近的两点,将两点距离作为点云间的第二最近距离。Establish an axis-symmetric bounding box tree of the second queried point cloud, traverse each second queried point cloud, find the two closest points between the second queried point cloud and the second target point cloud, and calculate the distance between the two points. as the second closest distance between point clouds.

需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据。It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all Information and data authorized by the user or fully authorized by the parties.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to a memory, a database or other media used in the various embodiments provided in this application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Memory) Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration and not limitation, the RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The database involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the present application should be determined by the appended claims.

Claims (17)

1.一种碰撞检测方法,其特征在于,所述碰撞检测方法包括:1. a collision detection method, is characterized in that, described collision detection method comprises: 获取待处理目标对象的对象实时位置;Get the object real-time position of the target object to be processed; 将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置;registering the virtual object model of the target object to be processed and the object real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located; 获取目标器械的器械实时位置;Obtain the real-time position of the device of the target device; 根据所述目标位置和所述器械实时位置判断所述目标器械与所述待处理目标对象是否会发生碰撞。According to the target position and the real-time position of the instrument, it is determined whether the target instrument and the target object to be processed will collide. 2.根据权利要求1所述的碰撞检测方法,其特征在于,所述将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置,包括:2 . The collision detection method according to claim 1 , wherein the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed to determine the virtual object model. 3 . The target position of the object model in the target coordinate system where the target object to be processed is located, including: 获取所述虚拟对象模型上预先标记的多个特征点;acquiring multiple feature points pre-marked on the virtual object model; 将所述多个特征点与所述待处理目标对象的实时位置进行匹配,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置。The multiple feature points are matched with the real-time position of the target object to be processed to determine the target position of the virtual object model in the target coordinate system where the target object to be processed is located. 3.根据权利要求1所述的碰撞检测方法,其特征在于,所述获取目标器械的器械实时位置,包括:3. The collision detection method according to claim 1, wherein the acquiring the real-time position of the device of the target device comprises: 获取反光标识器与所述目标器械之间的预设位姿关系;acquiring the preset pose relationship between the reflective marker and the target device; 基于所述预设位姿关系,根据所述反光标识器的实时位姿得到所述目标器械的器械实时位置。Based on the preset pose relationship, the real-time position of the device of the target device is obtained according to the real-time pose of the reflective marker. 4.根据权利要求1所述的碰撞检测方法,其特征在于,所述将所述待处理目标对象的虚拟对象模型与所述待处理目标对象的对象实时位置进行配准,以确定所述虚拟对象模型在所述待处理目标对象所在的目标坐标系中的目标位置之前,还包括:4 . The collision detection method according to claim 1 , wherein the virtual object model of the target object to be processed is registered with the object real-time position of the target object to be processed to determine the virtual object model of the target object to be processed. 5 . Before the target position in the target coordinate system where the target object to be processed is located, the object model further includes: 扫描得到所述待处理目标对象的医学影像;Scanning to obtain the medical image of the target object to be processed; 根据所述医学影像进行图像重建得到所述待处理目标对象的虚拟对象模型。Perform image reconstruction according to the medical image to obtain the virtual object model of the target object to be processed. 5.根据权利要求1所述的碰撞检测方法,其特征在于,所述根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞,包括:5 . The collision detection method according to claim 1 , wherein determining whether the target device will collide according to the target position and the real-time position of the device comprises: 6 . 采用K维空间树碰撞检测方法和/或采用AABB树碰撞检测方法,根据所述目标位置和所述器械实时位置判断所述目标器械是否会发生碰撞。Using the K-dimensional space tree collision detection method and/or the AABB tree collision detection method, it is determined whether the target instrument will collide according to the target position and the real-time position of the instrument. 6.根据权利要求5所述的碰撞检测方法,其特征在于,所述K维空间树碰撞检测方法,包括:6. The collision detection method according to claim 5, wherein the K-dimensional space tree collision detection method comprises: 将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云;using the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud; 根据所述被查询点云创建K维空间树;Create a K-dimensional space tree according to the queried point cloud; 遍历所述K维空间树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。Traverse the K-dimensional space tree, and determine whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud. 7.根据权利要求6所述的碰撞检测方法,其特征在于,所述将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云之前,包括:7. The collision detection method according to claim 6, characterized in that before taking the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud, the method comprises: 分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点。The point cloud of the target position and the point cloud of the real-time position of the instrument are respectively down-sampled to obtain the sampling points of the target object to be processed and the target instrument. 8.根据权利要求7所述的碰撞检测方法,其特征在于,所述分别对所述目标位置的点云和所述器械实时位置的点云进行降采样,得到所述待处理目标对象和所述目标器械的采样点,包括:8 . The collision detection method according to claim 7 , wherein the point cloud of the target position and the point cloud of the real-time position of the instrument are respectively down-sampled to obtain the target object to be processed and the object to be processed. 9 . Describe the sampling points for the target device, including: 计算所述点云的包围盒,将所述包围盒离散成若干个体素;Calculate the bounding box of the point cloud, and discretize the bounding box into several voxels; 将每个所述体素的中心点或离中心点最近的点作为所述采样点。The center point of each voxel or the point closest to the center point is used as the sampling point. 9.根据权利要求6所述的碰撞检测方法,其特征在于,所述建立K维空间树,包括:9. The collision detection method according to claim 6, wherein the establishing a K-dimensional space tree comprises: 建立根节点;establish root node; 计算所述被查询点云的方差值,将方差值作为分割特征;Calculate the variance value of the queried point cloud, and use the variance value as a segmentation feature; 将所述分割特征的中位数作为分割点;Taking the median of the segmentation feature as the segmentation point; 将所述分割特征小于所述分割点的所述分割特征传递给所述根节点的左节点,大于所述分割点的所述分割特征传递给所述根节点的右节点;Transfer the segmentation feature whose segmentation feature is smaller than the segmentation point to the left node of the root node, and transfer the segmentation feature larger than the segmentation point to the right node of the root node; 递归执行上述步骤直至所有所述分割特征建立到所述K维空间树的所述根节点的左节点、右节点上为止。The above steps are recursively performed until all the segmentation features are established on the left node and the right node of the root node of the K-dimensional space tree. 10.根据权利要求6所述的碰撞检测方法,其特征在于,所述遍历所述K维空间树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:10 . The collision detection method according to claim 6 , wherein the traversal of the K-dimensional space tree is performed, and the target device is judged according to the closest distance between the target point cloud and the queried point cloud. 11 . Whether collisions will occur, including: 获取第一目标点云和第一被查询点云;Obtain the first target point cloud and the first queried point cloud; 遍历每个所述第一被查询点云,找到所述第一被查询点云的点与所述第一目标点云的点最近的两点,将两点距离作为点云间的第一最近距离,判断所述第一最近距离是否会发生碰撞。Traverse each of the first queried point clouds, find the two closest points between the first queried point cloud and the first target point cloud, and use the distance between the two points as the first closest point between the point clouds distance, to determine whether a collision will occur at the first closest distance. 11.根据权利要求5所述的碰撞检测方法,其特征在于,所述AABB树碰撞检测方法,包括:11. The collision detection method according to claim 5, wherein the AABB tree collision detection method comprises: 将所述目标位置和所述器械实时位置作为被查询点云和/或目标点云;using the target position and the real-time position of the instrument as the queried point cloud and/or the target point cloud; 根据所述被查询点云建立轴对称包围盒树;Build an axisymmetric bounding box tree according to the queried point cloud; 遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞。Traverse the axisymmetric bounding box tree, and determine whether the target instrument will collide according to the closest distance between the target point cloud and the queried point cloud. 12.根据权利要求11所述的碰撞检测方法,其特征在于,所述建立轴对称包围盒树,包括:12. The collision detection method according to claim 11, wherein the establishing an axis-symmetric bounding box tree comprises: 将三角形作为根节点;Take the triangle as the root node; 建立所述被查询点云的叶节点,根据所述叶节点的关联对象分配轴对称包围盒树;establishing a leaf node of the queried point cloud, and assigning an axisymmetric bounding box tree according to the associated object of the leaf node; 在所述轴对称包围盒树中找到预定的现有节点,使新叶子成为所述预定的现有节点的兄弟节点;Find a predetermined existing node in the axisymmetric bounding box tree, and make the new leaf a sibling node of the predetermined existing node; 为所述预定的现有节点和所述新叶子创建分支节点,并为所述分支节点分配两个节点的轴对称包围盒;creating a branch node for the predetermined existing node and the new leaf, and assigning an axisymmetric bounding box of two nodes to the branch node; 将所述新叶子附加到所述两个节点上;attaching the new leaf to the two nodes; 从所述轴对称包围盒树中移除所述现有节点,并将所述现有节点附加到所述两个节点上;removing the existing node from the axisymmetric bounding box tree and appending the existing node to the two nodes; 将所述两个节点附加为所述现有节点的父节点的子节点上;attaching the two nodes as child nodes of the parent node of the existing node; 调整所述父节点的所述轴对称包围盒,以确保所述父节点包含所有所述子节点的所述轴对称包围盒。The axisymmetric bounding box of the parent node is adjusted to ensure that the parent node contains the axisymmetric bounding box of all of the child nodes. 13.根据权利要求11所述的碰撞检测方法,其特征在于,遍历所述轴对称包围盒树,根据所述目标点云与所述被查询点云之间的最近距离判断所述目标器械是否会发生碰撞,包括:13 . The collision detection method according to claim 11 , wherein the axisymmetric bounding box tree is traversed, and whether the target device is determined according to the closest distance between the target point cloud and the queried point cloud. 14 . Collision will occur, including: 获取第二目标点云和第二被查询点云;Obtain the second target point cloud and the second queried point cloud; 建立所述第二被查询点云的轴对称包围盒树,遍历每个所述第二被查询点云,找到所述第二被查询点云的点与所述第二目标点云的点最近的两点,将两点距离作为点云间的第二最近距离。Build an axisymmetric bounding box tree of the second queried point cloud, traverse each of the second queried point clouds, and find the point of the second queried point cloud that is closest to the point of the second target point cloud The two points of , take the distance between the two points as the second closest distance between the point clouds. 14.一种碰撞检测系统,其特征在于,所述碰撞检测系统包括:图像处理器以及位置采集器,所述图像处理器用于实现1至13任意一项所述方法的步骤。14. A collision detection system, characterized in that the collision detection system comprises: an image processor and a position collector, the image processor being used to implement the steps of any one of 1 to 13 of the method. 15.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至13中任一项所述的方法的步骤。15. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the method according to any one of claims 1 to 13 when the processor executes the computer program. step. 16.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至13中任一项所述的方法的步骤。16. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented. 17.一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至13中任一项所述的方法的步骤。17. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 13.
CN202210124867.2A 2022-02-10 2022-02-10 Collision detection method, system, computer device and storage medium Pending CN114494602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210124867.2A CN114494602A (en) 2022-02-10 2022-02-10 Collision detection method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210124867.2A CN114494602A (en) 2022-02-10 2022-02-10 Collision detection method, system, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN114494602A true CN114494602A (en) 2022-05-13

Family

ID=81478741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210124867.2A Pending CN114494602A (en) 2022-02-10 2022-02-10 Collision detection method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN114494602A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114972650A (en) * 2022-06-08 2022-08-30 北京百度网讯科技有限公司 Target object adjusting method and device, electronic equipment and storage medium
WO2023065988A1 (en) * 2021-10-21 2023-04-27 上海微创医疗机器人(集团)股份有限公司 Collision detection method and apparatus, device, and readable storage medium
CN116077182A (en) * 2022-12-23 2023-05-09 北京纳通医用机器人科技有限公司 Medical surgical robot control method, device, equipment and medium
CN117671262A (en) * 2023-12-08 2024-03-08 北京长木谷医疗科技股份有限公司 Orthopedic trauma fracture surface segmentation and detection methods, devices and equipment
CN119810243A (en) * 2025-03-13 2025-04-11 深圳泊松软件技术有限公司 A method, system, computer device and computer program product for accelerating intersection of two-dimensional sketches
WO2025202912A1 (en) * 2024-03-29 2025-10-02 Auris Health, Inc. Pose estimation using intensity thresholding and point cloud analysis
WO2025202908A1 (en) * 2024-03-29 2025-10-02 Auris Health, Inc. Pose estimation using machine learning

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106725861A (en) * 2017-02-15 2017-05-31 山东大学 A kind of operating robot end-of-arm tooling position of collision detection method
CN110037768A (en) * 2019-04-23 2019-07-23 雅客智慧(北京)科技有限公司 Joint replacement surgery assisted location method, positioning device and system
WO2019164275A1 (en) * 2018-02-20 2019-08-29 (주)휴톰 Method and device for recognizing position of surgical instrument and camera
CN110253570A (en) * 2019-05-27 2019-09-20 浙江工业大学 Vision-based human-machine safety system for industrial manipulators
CN111243746A (en) * 2020-01-20 2020-06-05 上海奥朋医疗科技有限公司 Operation simulation method and system of vascular intervention operation robot
CN112584789A (en) * 2018-06-19 2021-03-30 托尼尔公司 Mixed reality surgical system with physical markers registering virtual models
CN112618018A (en) * 2020-12-16 2021-04-09 苏州微创畅行机器人有限公司 Navigation operation system, registration method thereof and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106725861A (en) * 2017-02-15 2017-05-31 山东大学 A kind of operating robot end-of-arm tooling position of collision detection method
WO2019164275A1 (en) * 2018-02-20 2019-08-29 (주)휴톰 Method and device for recognizing position of surgical instrument and camera
CN112584789A (en) * 2018-06-19 2021-03-30 托尼尔公司 Mixed reality surgical system with physical markers registering virtual models
CN110037768A (en) * 2019-04-23 2019-07-23 雅客智慧(北京)科技有限公司 Joint replacement surgery assisted location method, positioning device and system
CN110253570A (en) * 2019-05-27 2019-09-20 浙江工业大学 Vision-based human-machine safety system for industrial manipulators
CN111243746A (en) * 2020-01-20 2020-06-05 上海奥朋医疗科技有限公司 Operation simulation method and system of vascular intervention operation robot
CN112618018A (en) * 2020-12-16 2021-04-09 苏州微创畅行机器人有限公司 Navigation operation system, registration method thereof and computer readable storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
王庆栋,孙钰珊,许彪,艾海滨,张力著: "《基于机载LiDAR点云的建筑物语义化三维重建技术研究》", vol. 1, 31 August 2021, 武汉:武汉大学出版社, pages: 48 - 49 *
王张飞;刘春阳;隋新;杨芳;马喜强;陈立海;: "基于深度投影的三维点云目标分割和碰撞检测", 光学精密工程, no. 07, 15 July 2020 (2020-07-15), pages 1600 - 1608 *
王新东主编: "《绿色智能新一代流程钢厂新唐钢设计文集》", vol. 1, 31 December 2021, 北京:冶金工业出版社, pages: 546 - 547 *
陈晓军;舒宽;张建国;钱理为;王成焘;: "八叉树搜索算法在计算机辅助手术中的应用", 计算机工程, no. 22, 20 November 2008 (2008-11-20), pages 16 - 18 *
黄明吉主编: "《数字化成形与数字化成形与先进制造技术》", vol. 1, 31 August 2020, 北京:机械工业出版社, pages: 23 - 24 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023065988A1 (en) * 2021-10-21 2023-04-27 上海微创医疗机器人(集团)股份有限公司 Collision detection method and apparatus, device, and readable storage medium
CN114972650A (en) * 2022-06-08 2022-08-30 北京百度网讯科技有限公司 Target object adjusting method and device, electronic equipment and storage medium
CN114972650B (en) * 2022-06-08 2024-03-19 北京百度网讯科技有限公司 Target object adjusting method and device, electronic equipment and storage medium
US12229882B2 (en) 2022-06-08 2025-02-18 Beijing Baidu Netcom Science Technology Co., Ltd. Method for adjusting target object, electronic device, and storage medium
CN116077182A (en) * 2022-12-23 2023-05-09 北京纳通医用机器人科技有限公司 Medical surgical robot control method, device, equipment and medium
CN116077182B (en) * 2022-12-23 2024-05-28 北京纳通医用机器人科技有限公司 Medical surgical robot control method, device, equipment and medium
CN117671262A (en) * 2023-12-08 2024-03-08 北京长木谷医疗科技股份有限公司 Orthopedic trauma fracture surface segmentation and detection methods, devices and equipment
WO2025202912A1 (en) * 2024-03-29 2025-10-02 Auris Health, Inc. Pose estimation using intensity thresholding and point cloud analysis
WO2025202908A1 (en) * 2024-03-29 2025-10-02 Auris Health, Inc. Pose estimation using machine learning
CN119810243A (en) * 2025-03-13 2025-04-11 深圳泊松软件技术有限公司 A method, system, computer device and computer program product for accelerating intersection of two-dimensional sketches

Similar Documents

Publication Publication Date Title
CN114494602A (en) Collision detection method, system, computer device and storage medium
US12089901B2 (en) Surgical systems and methods for facilitating ad-hoc intraoperative planning of surgical procedures
US12491031B2 (en) Preoperative planning and associated intraoperative registration for a surgical system
US20250166329A1 (en) Systems and Methods for 3D Registration of Curves and Surfaces Using Local Differential Information
CN113781495B (en) Automatic reset track planning method for parallel fracture surgery robot
CN100589775C (en) Method and system for reconstructing three-dimensional surface of human organs
CN109496143B (en) Preoperative planning and related intraoperative registration for surgical systems
WO2023116823A1 (en) Positioning method, system and apparatus, computer device, and storage medium
CN114041878A (en) Three-dimensional reconstruction method and system of CT images of bone and joint replacement surgical robot
WO2021097241A1 (en) Robotic surgery depth detection and modeling
JP2022515359A (en) Techniques for patient-specific morphing of virtual boundaries
Kuntz et al. Planning high-quality motions for concentric tube robots in point clouds via parallel sampling and optimization
CN116452755A (en) Skeleton model construction method, system, medium and equipment
CN115317127A (en) Medical image registration method, system, device, medium, and program product
CN116523975A (en) Six-dimensional transformation-based robot global optimal solution space registration and calibration algorithm
Guo et al. A training system for vascular interventional surgeons based on local path planning
CN118787444B (en) Robot-assisted fracture reduction path planning method and system
CN112932662B (en) Reset position detection method with patient safety protection function
Xu et al. Study on the path planning based on A* algorithm for vascular intervention robots
CN104715485A (en) Fast fusion method for dynamically simulating lung deformation in segmented mode
CN117860381B (en) Puncture path dynamic planning system
CN117137625A (en) A position adjustment method for a robot-assisted surgical system
Gong et al. 3D Surface-Closed Mesh Clipping Based on Polygonal Partitioning for Surgical Planning
Liu et al. A novel marker tracking method based on extended Kalman filter for multi-camera optical tracking systems
Penza et al. Augmented Reality Navigation in Robot-Assisted Surgery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination