技术领域Technical field
本申请实施例涉及医学影像注册配准领域,具体而言,涉及一种配准方法及装置、存储介质及电子设备。Embodiments of the present application relate to the field of medical image registration and registration, specifically, to a registration method and device, storage media and electronic equipment.
背景技术Background technique
近年来,随着人工智能技术的快速发展,各种用于医疗辅助的导航机器人层出不穷,但是,要在现代化导航机器人的帮助下进行表面髋关节置换手术,良好的注册配准是必不可少的。如果没有有效的注册配准,术中跟踪以及测量数据的偏差可能会对手术结果产生负面影响。当前在表面髋关节置换手术的配准过程中,主要存在以下两个难点:(1)、术中暴露区域少。在实际手术过程中,暴露在医生视线内的区域是有限的。(2)、股骨头部分具有高度对称性。这种对称性使得使用传统的迭代最近点(ICP)算法时极易陷入局部最优,难以达到理想的注册配准效果。In recent years, with the rapid development of artificial intelligence technology, various navigation robots for medical assistance have emerged one after another. However, to perform surface hip replacement surgery with the help of modern navigation robots, good registration and registration are essential. . Without effective registration, deviations in intraoperative tracking and measurement data may negatively impact surgical outcomes. Currently, there are two main difficulties in the registration process of surface hip replacement surgery: (1) There is little intraoperative exposure area. During the actual surgery, the area exposed to the doctor's sight is limited. (2) The femoral head is highly symmetrical. This symmetry makes it easy to fall into a local optimum when using the traditional iterative closest point (ICP) algorithm, making it difficult to achieve ideal registration results.
因此,对于表面髋关节置换手术,现有技术的配准无法实现高精度的配准,且配准流程中的初步要求高,配准结果全局优化性差等问题。Therefore, for surface hip replacement surgeries, the existing registration technology cannot achieve high-precision registration, and the preliminary requirements in the registration process are high, and the global optimization of the registration results is poor.
针对相关技术中,存在的问题尚未提出有效的解决方案。No effective solutions have been proposed for existing problems in related technologies.
发明内容Contents of the invention
本申请实施例提供了一种配准方法及装置、存储介质及电子设备,以至少解决相关技术中的配准无法实现高精度的配准,且配准流程中的初步要求高,配准结果全局优化性差的问题。Embodiments of the present application provide a registration method and device, storage media and electronic equipment, to at least solve the problem that registration in related technologies cannot achieve high-precision registration, and the preliminary requirements in the registration process are high, and the registration results The problem of poor global optimization.
根据本申请的一个实施例,提供了一种配准方法,包括:使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。According to an embodiment of the present application, a registration method is provided, including: using a first matrix to align distal points on a bone object, multiple fine registration points on the bone object, and coarse registration points on the bone object and the indicator model. The collection point set corresponding to the registration indication point undergoes affine transformation to obtain the transformation result; when multiple sub-chains corresponding to the transformation result are determined, the multiple sub-chains are optimized through the target algorithm to obtain multiple optimization results; from multiple Determine the target result that satisfies the preset iteration exit conditions from the optimization results, and obtain the second matrix corresponding to the target result; determine the registration matrix corresponding to the bone object based on the first matrix and the second matrix, so as to use the registration matrix to align the bone object The target operation performed on the target is registered.
根据本申请的又一个实施例,提供了一种配准装置,包括:变换单元,用于使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;优化单元,用于在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;获取单元,用于从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;第一确定单元,用于基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。According to yet another embodiment of the present application, a registration device is provided, including: a transformation unit configured to use a first matrix to align a distal point on a bone object, a plurality of fine registration points on the bone object, The collection point set corresponding to the coarse registration indication point on the indication model is subjected to affine transformation to obtain the transformation result; the optimization unit is used to perform multiple sub-chains through the target algorithm when multiple sub-chains corresponding to the transformation result are determined. Optimize to obtain multiple optimization results; the acquisition unit is used to determine the target result that satisfies the preset iteration exit conditions from the multiple optimization results, and obtain the second matrix corresponding to the target result; the first determination unit is used to determine based on the first The first matrix and the second matrix determine a registration matrix corresponding to the bone object to use the registration matrix to register a target operation performed on the bone object.
根据本申请的又一个实施例,还提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,其中,计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present application, a computer-readable storage medium is also provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any one of the above method embodiments when running. step.
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present application, an electronic device is also provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments. .
通过本申请实施例,使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。由此,在使用第一矩阵和第二矩阵构成的骨对象对应的配准矩阵,可以解决相关技术中的配准无法实现高精度的配准,且配准流程中的初步要求高,配准结果全局优化性差的问题,达到了对骨对象进行高精度的注册配准的技术效果。Through the embodiment of the present application, the first matrix is used to perform affine affine on the distal point on the bone object, multiple fine registration points on the bone object, and the acquisition point set on the bone object corresponding to the coarse registration indication point on the indication model. Transform to obtain the transformation result; in the case of determining multiple sub-chains corresponding to the transformation result, optimize the multiple sub-chains through the target algorithm to obtain multiple optimization results; determine from the multiple optimization results the one that satisfies the preset iteration exit conditions The target result is obtained, and a second matrix corresponding to the target result is obtained; a registration matrix corresponding to the bone object is determined based on the first matrix and the second matrix, so as to use the registration matrix to register the target operation performed on the bone object. Therefore, using the registration matrix corresponding to the bone object composed of the first matrix and the second matrix can solve the problem that the registration in the related technology cannot achieve high-precision registration, and the preliminary requirements in the registration process are high, and the registration process As a result, the problem of poor global optimization was achieved, and the technical effect of high-precision registration and registration of bone objects was achieved.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the attached picture:
图1是本申请实施例的一种模型部署方法的移动终端的硬件结构框图;Figure 1 is a hardware structure block diagram of a mobile terminal of a model deployment method according to an embodiment of the present application;
图2是本申请实施例的配准方法的流程示意图;Figure 2 is a schematic flow chart of the registration method according to the embodiment of the present application;
图3是本申请实施例提供的一种可选的电子设备的结构示意图;Figure 3 is a schematic structural diagram of an optional electronic device provided by an embodiment of the present application;
图4为本申请实施例中表面髋关节置换手术中股骨侧的暴露区域的示意图;Figure 4 is a schematic diagram of the exposed area on the femoral side during surface hip replacement surgery in an embodiment of the present application;
图5为本申请实施例中股骨头三个不同视角的图片;Figure 5 is a picture of the femoral head from three different views in the embodiment of the present application;
图6为本申请实施例的粗配准过程流程图;Figure 6 is a flow chart of the rough registration process according to the embodiment of the present application;
图7为本申请实施例的一种粗配准指示点的选择示意图;Figure 7 is a schematic diagram of selecting coarse registration indication points according to an embodiment of the present application;
图8为本申请实施例的一种指示点集和采集点集进行排序后的效果示意图;Figure 8 is a schematic diagram of the sorting effect of an indication point set and a collection point set according to an embodiment of the present application;
图9为本申请实施例的精配准过程流程图;Figure 9 is a flow chart of the fine registration process according to the embodiment of the present application;
图10是本申请实施例的一种附着点的标记示意图;Figure 10 is a schematic diagram of marking an attachment point according to an embodiment of the present application;
图11是本申请实施例的一种配准装置的结构框图;Figure 11 is a structural block diagram of a registration device according to an embodiment of the present application;
图12是本申请实施例的一种可选的电子设备的计算机系统的结构框图。Figure 12 is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those in the technical field to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only These are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of this application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
本申请实施例一所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本申请实施例的一种模型部署方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输设备106和输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,移动终端还可以包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a model deployment method according to an embodiment of the present application. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), A memory 104 for storing data, and a transmission device 106 and an input-output device 108 for communication functions. Persons of ordinary skill in the art can understand that the structure shown in FIG. 1 is only illustrative, and it does not limit the structure of the above-mentioned electronic device. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 .
存储器104可用于存储应用软件的软件程序以及模块,如本申请实施例中的模型部署方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可以包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步可以包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例可以包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the model deployment method in the embodiment of the present application. The processor 102 executes various software programs and modules stored in the memory 104 by running them. Functional application and data processing are the methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely relative to the processor 102, and these remote memories may be connected to the mobile terminal 10 through a network. Examples of the above-mentioned network may include but are not limited to the Internet, intranet, local area network, mobile communication network and combinations thereof.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可以包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输设备106可以包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 is used to receive or send data via a network. The above-mentioned specific example of the network may include a wireless network provided by the communication provider of the mobile terminal 10 . In one example, the transmission device 106 may include a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
在本实施例中提供了一种配准方法,图2是本申请实施例的配准方法的流程示意图,如图2所示,该流程可以包括,但不限于如下步骤:This embodiment provides a registration method. Figure 2 is a schematic flow chart of the registration method in this embodiment of the present application. As shown in Figure 2, the process may include, but is not limited to, the following steps:
步骤S202、使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;Step S202: Use the first matrix to perform affine transformation on the distal point on the bone object, multiple fine registration points on the bone object, and the collection point set corresponding to the coarse registration indication point on the bone object and the indication model, to obtain transformation result;
可选的,上述第一矩阵是通过粗配准指示点和采集点集确定出的粗配准仿射矩阵,主要用于定位骨对象的大致位置。Optionally, the above-mentioned first matrix is a coarse registration affine matrix determined by coarse registration indicator points and collection point sets, and is mainly used to locate the approximate position of the bone object.
需要说明的是,上述粗配准指示点可以是操作对象根据实际需求在指示模型上选取的多个参照点,该粗配准指示点的数量可以灵活确定,可选的,上述粗配准指示点可以为3个点。It should be noted that the above-mentioned rough registration indication points can be multiple reference points selected by the operating object on the indication model according to actual needs. The number of the rough registration indication points can be determined flexibly. Optionally, the above-mentioned rough registration indications The points can be 3 points.
步骤S204、在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;Step S204: When multiple sub-chains corresponding to the transformation results are determined, optimize the multiple sub-chains through the target algorithm to obtain multiple optimization results;
可选的,上述多个子链通过在变换结果中存在的多个初始链中添加扰动矩阵确定。上述扰动矩阵可以用标准正态分布对骨对象对应的X,Y,Z轴上的平移量和旋转量进行随机采样,生成m组随机旋转矩阵和平移矩阵,以基于m组随机旋转矩阵和平移矩阵构成,其中,m为大于或等于1的正整数。Optionally, the above multiple sub-chains are determined by adding perturbation matrices to multiple initial chains existing in the transformation result. The above-mentioned perturbation matrix can use the standard normal distribution to randomly sample the translation and rotation amounts on the X, Y, and Z axes corresponding to the bone object, and generate m sets of random rotation matrices and translation matrices, based on m sets of random rotation matrices and translation Matrix formation, where m is a positive integer greater than or equal to 1.
步骤S206、从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;Step S206: Determine the target result that satisfies the preset iteration exit condition from the multiple optimization results, and obtain the second matrix corresponding to the target result;
可以理解的是,为了避免对每一个优化结果进行持续的优化导致计算资源的浪费,还可以设定对子链进行优化的最大迭代步长,进而在达到最大迭代步长的情况下,停止对该个子链的优化。It is understandable that in order to avoid the waste of computing resources caused by continuous optimization of each optimization result, you can also set the maximum iteration step size for optimizing the sub-chain, and then stop optimizing when the maximum iteration step size is reached. Optimization of this sub-chain.
步骤S208、基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。Step S208: Determine a registration matrix corresponding to the bone object based on the first matrix and the second matrix, so as to use the registration matrix to register the target operation performed on the bone object.
通过上述步骤,使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。由此,在使用第一矩阵和第二矩阵构成的骨对象对应的配准矩阵,可以解决相关技术中的配准无法实现高精度的配准,且配准流程中的初步要求高,配准结果全局优化性差的问题,达到了对骨对象进行高精度的注册配准的技术效果。Through the above steps, the first matrix is used to perform affine transformation on the distal point on the bone object, multiple fine registration points on the bone object, and the collection point set corresponding to the coarse registration indication point on the bone object and the indication model, Obtain the transformation result; when multiple sub-chains corresponding to the transformation result are determined, optimize the multiple sub-chains through the target algorithm to obtain multiple optimization results; determine the target result that satisfies the preset iteration exit conditions from the multiple optimization results , and obtain the second matrix corresponding to the target result; determine the registration matrix corresponding to the bone object based on the first matrix and the second matrix, so as to use the registration matrix to register the target operation performed on the bone object. Therefore, using the registration matrix corresponding to the bone object composed of the first matrix and the second matrix can solve the problem that the registration in the related technology cannot achieve high-precision registration, and the preliminary requirements in the registration process are high, and the registration process As a result, the problem of poor global optimization was achieved, and the technical effect of high-precision registration and registration of bone objects was achieved.
在一个可选的实施例中,使用第一矩阵对骨对象上的远端点、所述骨对象上的多个精配准点、所述骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换之前,所述方法还包括:获取所述指示模型上已选取的用于初步定位所述骨对象的粗配准指示点对应的粗配准指示点集;通过所述粗配准指示点集指示骨探针在骨对象上进行位置信息的采集;根据采集结果确定出所述骨对象上与指示模型上的粗配准指示点对应的采集点集;基于所述采集点集和所述粗配准指示点集确定所述骨对象对应的第一矩阵。In an optional embodiment, a first matrix is used to correspond to a distal point on the bone object, a plurality of fine registration points on the bone object, and a coarse registration indicator point on the bone object and the indicator model. Before performing affine transformation on the collection point set, the method further includes: obtaining a coarse registration indicator point set corresponding to the coarse registration indicator point selected on the indicator model for preliminary positioning of the bone object; The coarse registration indication point set instructs the bone probe to collect position information on the bone object; and determines the collection point set on the bone object corresponding to the coarse registration indication point on the indication model based on the acquisition results; based on the The collection point set and the coarse registration indication point set determine a first matrix corresponding to the bone object.
在一个可选的实施例中,基于所述采集点集和所述粗配准指示点集确定所述骨对象对应的第一矩阵之前,上述方法还包括:确定所述粗配准指示点集中不同粗配准指示点之间的距离特征,并根据所述距离特征生成所述粗配准指示点集的定义信息;计算所述采集点集中不同采集点之间的欧式距离,得到多个欧式距离;使用所述定义信息对所述多个欧式距离中每一个欧式距离对应的两个采集点设置目标距离特征,以使用所述目标距离特征对所述不同采集点进行排序。In an optional embodiment, before determining the first matrix corresponding to the bone object based on the collection point set and the coarse registration indicator point set, the above method further includes: determining the coarse registration indicator point set distance characteristics between different coarse registration indication points, and generate definition information of the coarse registration indication point set based on the distance characteristics; calculate the Euclidean distance between different collection points in the collection point set, and obtain multiple Euclidean distances Distance: use the definition information to set a target distance feature for two collection points corresponding to each Euclidean distance in the plurality of Euclidean distances, so as to use the target distance feature to sort the different collection points.
可以理解的是,由于在实际操作中对粗配准指示点对应的采集点的顺序不固定,因此,在获取粗配准指示点后,需要根据粗配准指示点之间的关系对指示点集和采集点集进行排序,使得对应的点在两个点集内具有相同的定义。It can be understood that since the order of the collection points corresponding to the coarse registration indication points is not fixed in actual operations, after obtaining the coarse registration indication points, it is necessary to compare the indication points according to the relationship between the coarse registration indication points. The set and collection point set are sorted so that the corresponding points have the same definition in both point sets.
在一个可选的实施例中,基于所述采集点集和所述粗配准指示点集确定所述骨对象对应的第一矩阵,包括:确定所述粗配准指示点集中不同粗配准指示点之间的第一单位向量,得到第一向量组,以及确定所述采集点集中不同采集点之间的第二单位向量,得到第二向量组;将所述第一向量组和所述第二向量组使用预设协方差矩阵进行计算,生成目标协方差矩阵;对所述目标协方差矩阵进行奇异值分解,确定所述目标协方差矩阵对应的旋转矩阵,并基于所述旋转矩阵确定所述粗配准指示点集对应的平移矩阵;将所述旋转矩阵和所述平移矩阵的合并矩阵确定为所述骨对象对应的第一矩阵。In an optional embodiment, determining the first matrix corresponding to the bone object based on the collection point set and the coarse registration indication point set includes: determining different coarse registrations in the coarse registration indication point set Indicate the first unit vector between points to obtain a first vector group, and determine the second unit vector between different collection points in the collection point set to obtain a second vector group; combine the first vector group and the The second vector group is calculated using a preset covariance matrix to generate a target covariance matrix; perform singular value decomposition on the target covariance matrix, determine the rotation matrix corresponding to the target covariance matrix, and determine based on the rotation matrix The coarse registration indicates the translation matrix corresponding to the point set; the combined matrix of the rotation matrix and the translation matrix is determined as the first matrix corresponding to the bone object.
在一个可选的实施例中,基于所述旋转矩阵确定所述粗配准指示点集对应的平移矩阵,包括:计算所述粗配准指示点集中不同粗配准指示点之间对应的第一中点,以及所述采集点集中不同采集点之间对应的第二中点;使用所述旋转矩阵对所述第二中点进行旋转,得到目标点;确定所述目标点与所述第一中点之间的平移量,以得到所述采集点集对应的平移矩阵。In an optional embodiment, determining the translation matrix corresponding to the set of coarse registration indication points based on the rotation matrix includes: calculating the corresponding third value between different coarse registration indication points in the set of coarse registration indication points. A midpoint, and a corresponding second midpoint between different collection points in the collection point set; use the rotation matrix to rotate the second midpoint to obtain a target point; determine the relationship between the target point and the third The amount of translation between midpoints to obtain the translation matrix corresponding to the collection point set.
可选的,可以在指示模型中任选三点作为粗配准指示点,例如,A点、B点、C点,为了更好的通过粗配准指示点定位指示模型的方向,可以将A、C两点间的距离在选择时确定为最大,且A、B两点间的距离大于BC两点间的距离,并保证这三个点位于绿色或黄色区域,继而根据指示模型在患者骨骼上按任意顺序识别并采集粗配准指示点对应的实际采集点,并对指示点集和采集点集进行排序,在排序后,确定指示点集和采集点集之间的最优旋转矩阵,以及确定粗配准指示点集中点与采集点集的中点通过最优旋转矩阵进行旋转后的确定的目标点之间的平移矩阵,从而合并最优旋转矩阵和平移矩阵,并写为齐次形式,得到粗配准的仿射矩阵,即第一矩阵。Optionally, you can select any three points in the indication model as coarse registration indication points, for example, point A, point B, and point C. In order to better position the direction of the indication model through the coarse registration indication points, you can add A to , the distance between the two points C is determined to be the largest during selection, and the distance between the two points A and B is greater than the distance between the two points BC, and ensure that these three points are located in the green or yellow area, and then based on the instruction model on the patient's skeleton Identify and collect the actual collection points corresponding to the coarse registration indicator points in any order, and sort the indicator point set and collection point set. After sorting, determine the optimal rotation matrix between the indicator point set and the collection point set. And determine the translation matrix between the determined target point after the coarse registration indicator point concentration point and the midpoint of the collection point set are rotated through the optimal rotation matrix, thereby merging the optimal rotation matrix and the translation matrix, and writing it as homogeneous In the form, the coarsely registered affine matrix is obtained, that is, the first matrix.
在一个可选的实施例中,通过目标算法对所述多个子链进行优化,得到多个优化结果之后,所述方法还包括:从所述指示模型上的粗配准指示点中选择第一指示点;确定所述第一指示点与第二中点连线对应的第三向量,并获取预所述第一指示点对应的第一采集点与第一中点的第四向量,其中,所述第一中点用于指示在所述骨对象对应的皮肤区域采集的至少两个实际点之间的中点,所述第二中点用于指示所述指示模型中预先标记的至少两个附着点之间的中点,所述至少两个实际点与所述至少两个附着点存在对应关系;获取所述多个优化结果对应的多个优化矩阵,使用所述多个优化矩阵分别对所述第四向量进行仿射变换,得到所述第四向量的状态向量群;计算所述第三向量与所述状态向量群中每一个状态向量的夹角。In an optional embodiment, after optimizing the plurality of sub-chains through a target algorithm and obtaining multiple optimization results, the method further includes: selecting a first first indication point from the coarse registration indication points on the indication model. Indicating point; determine the third vector corresponding to the line connecting the first indicating point and the second midpoint, and obtain the fourth vector of the first collection point and the first midpoint corresponding to the first indicating point, where, The first midpoint is used to indicate the midpoint between at least two actual points collected in the skin area corresponding to the bone object, and the second midpoint is used to indicate at least two pre-marked points in the indication model. The midpoint between the attachment points, the at least two actual points have a corresponding relationship with the at least two attachment points; obtain multiple optimization matrices corresponding to the multiple optimization results, and use the multiple optimization matrices to respectively Perform affine transformation on the fourth vector to obtain a state vector group of the fourth vector; calculate the angle between the third vector and each state vector in the state vector group.
在一个可选的实施例中,计算所述第三向量与所述状态向量群中每一个状态向量的夹角之后,所述方法还包括:在所述夹角大于预设夹角的情况下,从所述多个子链中删除当前夹角对应的第一子链;在所有夹角均大于预设夹角的情况下,对所述所有夹角进行排序,并删除所述所有夹角中一半较大的夹角对应的第二子链。In an optional embodiment, after calculating the angle between the third vector and each state vector in the state vector group, the method further includes: when the angle is greater than a preset angle , delete the first sub-chain corresponding to the current included angle from the multiple sub-chains; when all included angles are greater than the preset included angle, sort all included angles, and delete all included angles Half of the larger included angle corresponds to the second sub-chain.
在一个可选的实施例中,在确定所述变换结果对应的多个子链的情况下,通过目标算法对所述多个子链进行优化,得到多个优化结果之前,所述方法还包括:使用所述多个优化结果对应的多个优化矩阵分别对所述多个精配准点进行仿射变换,得到所述多个精配准点对应的移动点集;计算所述移动点集中所有移动点之间的误差,将所述误差小于预设误差的至少两个移动点对应目标精配准点关联的第三子链进行合并。In an optional embodiment, when multiple sub-chains corresponding to the transformation result are determined, the multiple sub-chains are optimized through a target algorithm, and before multiple optimization results are obtained, the method further includes: using Multiple optimization matrices corresponding to the multiple optimization results perform affine transformation on the multiple fine registration points respectively to obtain a set of moving points corresponding to the multiple fine registration points; calculate the sum of all moving points in the set of moving points The errors between at least two moving points whose errors are smaller than the preset error are merged into the third sub-chain associated with the target fine registration point.
在一个可选的实施例中,从所述多个优化结果中确定出满足预设迭代退出条件的目标结果,包括:确定完成后的多个子链对应的剩余精配准位置,计算所述剩余精配准位置与所述指示模型表面的均方根误差,得到误差集合;从所述误差集合中确定出最小误差,并获取所述最小误差对应的目标子链以及确定所述目标子链的目标优化结果对应的迭代次数;在所述迭代次数和所述最小误差满足所述预设迭代退出条件的情况下,将所述目标子链确定为所述目标结果。In an optional embodiment, determining the target result that satisfies the preset iteration exit conditions from the multiple optimization results includes: determining the remaining precise registration positions corresponding to the multiple sub-chains after completion, and calculating the remaining The root mean square error between the precise registration position and the surface of the indicator model is obtained to obtain an error set; the minimum error is determined from the error set, and the target sub-chain corresponding to the minimum error is obtained and the target sub-chain is determined. The number of iterations corresponding to the target optimization result; when the number of iterations and the minimum error satisfy the preset iteration exit condition, the target sub-chain is determined as the target result.
作为一种可选的实施方式,确定骨对象的远端点,并获取骨对象上的多个精配准点,其中,远端点包括根据指示模型中预先标记的至少两个附着点的位置信息在骨对象对应的皮肤区域采集的至少两个实际点之间的第一中点 和基于位置信息确定的至少两个附着点之间的第二中点;使用第一矩阵对远端点、多个精配准点、采集点集进行仿射变换,得到变换结果,其中,采集点集用于指示根据指示模型上已选取的粗配准指示点通过骨探针在骨对象对应获取到的采集点的集合,第一矩阵用于指示根据粗配准指示点和采集点集确定出的粗配准仿射矩阵;在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果,其中,多个子链通过在变换结果中存在的多个初始链中添加扰动矩阵确定;从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵,以基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵。As an optional implementation, a distal point of the bone object is determined, and a plurality of fine registration points on the bone object are obtained, wherein the distal point includes position information based on at least two pre-marked attachment points in the indication model. A first midpoint between at least two actual points collected in the skin area corresponding to the bone object and a second midpoint between at least two attachment points determined based on the position information; use the first matrix to calculate the distal point, multiple A fine registration point and collection point set are subjected to affine transformation to obtain the transformation result. The collection point set is used to indicate the collection point corresponding to the bone object obtained through the bone probe according to the coarse registration indication point selected on the indication model. A set of Optimize and obtain multiple optimization results, in which multiple sub-chains are determined by adding perturbation matrices to multiple initial chains that exist in the transformation results; determine the target result that satisfies the preset iteration exit conditions from the multiple optimization results, and obtain A second matrix corresponding to the target result is used to determine a registration matrix corresponding to the bone object based on the first matrix and the second matrix.
可选地,在本实施例中,上述配准方法可以是由如图3所示的电子设备执行的。如图3所示,电子设备200可以包括:至少一个处理器201、至少一个网络接口202、总线系统203和存储器204。电子设备200中的各个组件通过总线系统203耦合在一起。可理解,总线系统203用于实现这些组件之间的连接通信。总线系统203除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图3中将各种总线都标为总线系统203。Optionally, in this embodiment, the above registration method may be performed by an electronic device as shown in FIG. 3 . As shown in FIG. 3 , the electronic device 200 may include: at least one processor 201 , at least one network interface 202 , a bus system 203 and a memory 204 . The various components in electronic device 200 are coupled together by bus system 203 . It can be understood that the bus system 203 is used to implement connection communication between these components. In addition to the data bus, the bus system 203 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 203 in FIG. 3 .
处理器201可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。The processor 201 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware. Components, etc., wherein the general processor can be a microprocessor or any conventional processor, etc.
存储器204可以是可移除的,不可移除的或其组合。示例性的硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器204可选地包括在物理位置上远离处理器201的一个或多个存储设备。Memory 204 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, etc. Memory 204 optionally includes one or more storage devices physically located remotely from processor 201 .
存储器204包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器204旨在包括任意适合类型的存储器。Memory 204 includes volatile memory or non-volatile memory, and may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM, Read Only Memory), and volatile memory can be random-access memory (RAM, Random Access Memory). The memory 204 described in the embodiments of this application is intended to include any suitable type of memory.
在一些实施例中,存储器204能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。In some embodiments, the memory 204 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplarily described below.
操作系统2041,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;The operating system 2041 includes system programs used to process various basic system services and perform hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., which are used to implement various basic services and process hardware-based tasks;
网络通信模块2402,用于经由一个或多个(有线或无线)网络接口202到达其他计算设备,示例性的网络接口202包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等;Network communication module 2402 for reaching other computing devices via one or more (wired or wireless) network interfaces 202. Exemplary network interfaces 202 include: Bluetooth, Wireless Compliance Certification (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.;
在一些实施例中,本申请实施例提供的装置可以采用软件方式实现,图3示出了存储在存储器204中的配准装置2043,其可以是程序和插件等形式的软件,包括以下软件单元:变换单元、优化单元、获取单元、第一确定单元,这些单元是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。将在下文中说明各个单元的功能。In some embodiments, the device provided by the embodiment of the present application can be implemented in software. Figure 3 shows the registration device 2043 stored in the memory 204, which can be software in the form of programs, plug-ins, etc., including the following software units : Transformation unit, optimization unit, acquisition unit, first determination unit, these units are logical, so they can be combined or further divided according to the functions implemented. The functions of each unit are explained below.
作为一种可选的实施方式,图4为本申请实施例中表面髋关节置换手术中股骨侧的暴露区域的示意图。图中的绿色区域为可以通过骨探针直接采集数据的区域;黄色区域为被软组织覆盖的区域,可以通过骨探针等工具采集到骨面上的数据,但由于无法直接看到骨面区域,因此采集得到的数据会存在较大的偏差;红色区域为被软组织深度包裹的区域,该区域无法通过如骨探针等方法采集得到骨面数据。As an optional implementation, FIG. 4 is a schematic diagram of the exposed area on the femoral side during surface hip replacement surgery in an embodiment of the present application. The green area in the picture is the area where data can be collected directly through the bone probe; the yellow area is the area covered by soft tissue. Data on the bone surface can be collected through tools such as bone probes, but the bone surface area cannot be directly seen. , so there will be a large deviation in the collected data; the red area is an area deeply wrapped by soft tissue, and bone surface data cannot be collected in this area through methods such as bone probes.
可选的,图5为本申请实施例中股骨头三个不同视角的图片,通过图5可以直观的看出股骨头和股骨颈部分,具有显著的对称性。这种对称性使得使用传统的迭代最近点(ICP)算法时极易陷入局部最优,难以达到理想的注册配准效果。因此,对于表面髋关节置换手术,需要一种更为精确的配准方法,以应对股骨侧暴露面小、股骨头与股骨颈部分对称性强等问题。Optionally, Figure 5 is a picture of the femoral head from three different views in the embodiment of the present application. Through Figure 5, it can be intuitively seen that the femoral head and femoral neck have significant symmetry. This symmetry makes it easy to fall into a local optimum when using the traditional iterative closest point (ICP) algorithm, making it difficult to achieve ideal registration results. Therefore, for surface hip replacement surgery, a more precise registration method is needed to deal with problems such as small exposure on the femoral side and strong symmetry between the femoral head and femoral neck.
对此,可以通过自适应角度矫正的用于粗配准部分的第一矩阵,以及在股骨远端中点的约束条件下,通过引入多链并行优化策略确定的用于精配准部分的第二矩阵,继而利用粗配准结果和精配准结果生成的配准矩阵对表面髋关节置换手术提供更加精确的配准精度,从而避免表面髋关节置换手术中暴露区域少,以及股骨头部分具有高度对称性等问题。In this regard, the first matrix for the coarse registration part can be corrected by the adaptive angle, and the third matrix for the fine registration part can be determined by introducing a multi-chain parallel optimization strategy under the constraint of the midpoint of the distal femur. two matrices, and then use the registration matrix generated by the coarse registration result and the fine registration result to provide more precise registration accuracy for surface hip replacement surgery, thereby avoiding the small exposed area and the femoral head part in surface hip replacement surgery. High symmetry and other issues.
进一步的,上述确定第一矩阵的粗配准阶段允许采样点与指示点间存在较大误差,且无需考虑采样点顺序;确定第二矩阵的精配准阶段充分探索解空间,在粗配准结果的基础上,通过迭代优化解决高对称性问题并实现高精度配准,具体的,采用股骨远端约束的方法,并利用“多链并行优化”的策略进行迭代优化和链筛选,以快速收敛生成高精度的配准矩阵,从而大大降低操作者的操作难度,提升手术效果和患者满意度。Furthermore, the above-mentioned coarse registration stage of determining the first matrix allows large errors between sampling points and indicator points without considering the order of sampling points; the fine registration stage of determining the second matrix fully explores the solution space, and in the coarse registration On the basis of the results, high symmetry problems are solved and high-precision registration is achieved through iterative optimization. Specifically, the distal femoral constraint method is used, and the "multi-chain parallel optimization" strategy is used to perform iterative optimization and chain screening to quickly Convergence generates a high-precision registration matrix, thereby greatly reducing the difficulty of the operator's operation and improving surgical results and patient satisfaction.
为了更好的理解本申请实施例以及可选实施例的技术方案,以下结合示例对上述配准方法的流程进行解释说明,但不用于限定本申请实施例的技术方案。In order to better understand the technical solutions of the embodiments and optional embodiments of the present application, the flow of the above registration method is explained below with examples, but is not used to limit the technical solutions of the embodiments of the present application.
针对相关技术中存在的问题,本申请可选实施例提出一种基于多链优化策略的股骨侧注册配准方法,主要由粗配准部分和精配准部分组成。粗配准部分采用了自适应角度矫正方法,该方法主要用于计算患者骨骼的大致位置。精配准部分则在股骨远端中点的约束条件下,通过引入多链并行优化策略,从而实现高精度的注册配准。In view of the problems existing in related technologies, an optional embodiment of the present application proposes a femoral side registration method based on a multi-chain optimization strategy, which mainly consists of a coarse registration part and a fine registration part. The coarse registration part uses an adaptive angle correction method, which is mainly used to calculate the approximate position of the patient's bones. The fine registration part achieves high-precision registration by introducing a multi-chain parallel optimization strategy under the constraints of the midpoint of the distal femur.
可选的,图6为本申请实施例的粗配准过程流程图,需要说明的是,对于粗配准部分,由于股骨头部分具有强对称性和暴露区域小的特点,由于股骨头部分具有强对称性和暴露区域小的特点,粗配准阶段的要求相对较低。这个阶段的目标是确定患者骨骼的大致朝向,使其与指示模型的朝向基本一致。具体而言,允许二者之间存在的夹角不高于30°。此外,在计算平移矩阵时,允许一定程度的平移误差。Optionally, Figure 6 is a flow chart of the rough registration process according to the embodiment of the present application. It should be noted that for the rough registration part, since the femoral head part has the characteristics of strong symmetry and small exposed area, since the femoral head part has Due to the strong symmetry and small exposed area, the requirements for the coarse registration stage are relatively low. The goal of this phase is to determine the general orientation of the patient's bones so that they are roughly consistent with the orientation of the indicator model. Specifically, the angle between the two is allowed to be no higher than 30°. Additionally, a certain degree of translation error is allowed when calculating the translation matrix.
具体的,粗配准过程包括以下步骤:Specifically, the rough registration process includes the following steps:
步骤S602、在指示模型中任选三点作为粗配准指示点。在选择粗配准指示点时,需要保证AC两点间的距离最大,AB两点间的距离大于BC两点间的距离,且这三个点位于绿色或黄色区域,不得位于红色区域(参考图4),并尽量选择易于识别的点。Step S602: Select any three points in the indication model as coarse registration indication points. When selecting coarse registration indicator points, it is necessary to ensure that the distance between two points AC is the largest, the distance between two points AB is greater than the distance between two points BC, and these three points are located in the green or yellow area and must not be located in the red area (reference Figure 4), and try to choose points that are easy to identify.
可选的,图7为本申请实施例的一种粗配准指示点的选择示意图。Optionally, FIG. 7 is a schematic diagram of selecting coarse registration indication points according to an embodiment of the present application.
步骤S604、根据指示模型,在患者骨骼(相当于上述实施例中的骨对象)上按任意顺序识别并采集粗配准点。采集时,操作者仅需在大致区域内采集即可。具体采集方式不限,可根据实际系统选用如红外追踪等方法,只需确保采集得到的特征点坐标已经过处理,位于正确的位置即可。Step S604: According to the instruction model, identify and collect rough registration points in any order on the patient's skeleton (equivalent to the bone object in the above embodiment). When collecting, the operator only needs to collect within a general area. The specific collection method is not limited, and methods such as infrared tracking can be selected according to the actual system. Just ensure that the coordinates of the collected feature points have been processed and are located at the correct location.
步骤S606、对指示点集和采集点集进行排序。Step S606: Sort the indication point set and the collection point set.
需要说明的是,由于采集顺序不固定,在获取粗配准点后,需要对指示点集和采集点集进行排序,使得ABC三个点在两个点集内具有相同的定义。具体方法如下:It should be noted that since the collection order is not fixed, after obtaining the rough registration points, the indicator point set and the collection point set need to be sorted so that the three ABC points have the same definition in the two point sets. The specific method is as follows:
步骤一、计算三个点中的欧式距离,令距离最大的两个点作为A、C备选点,剩余点为B点。Step 1: Calculate the Euclidean distance among the three points, let the two points with the largest distance be used as candidate points A and C, and the remaining points are point B.
步骤二、A、C备选点中距离B点较远的点为A,较近的点为C,完成排序过程。Step 2: Among the candidate points A and C, the point farther from point B is A, and the closer point is C, completing the sorting process.
可选的,图8为本申请实施例的一种指示点集和采集点集进行排序后的效果示意图。Optionally, FIG. 8 is a schematic diagram of the sorting effect of an indication point set and a collection point set according to an embodiment of the present application.
步骤S608、使用kabsch算法联合评估最优旋转矩阵。Step S608: Use the kabsch algorithm to jointly evaluate the optimal rotation matrix.
可选的,本申请所使用的条件与kabsch算法有所不同,因此,此处对计算过程进行说明。具体计算过程如下:Optionally, the conditions used in this application are different from the Kabsch algorithm, so the calculation process is explained here. The specific calculation process is as follows:
步骤A、构造单位向量。令指示点集中由A点出发指向C点的向量为VAC,由A点出发指向B点的向量为VAB;令采集点集中的对应向量为V'AC和V'AB;按式1所示对上述四个向量进行单位化:Vnorm=V/║V║(1);Step A. Construct the unit vector. Let the vector from point A to point C in the indicator point set be VAC , and the vector from point A to point B be VAB ; let the corresponding vectors in the collection point set be V'AC and V'AB; according to Equation 1 Indicates the unitization of the above four vectors: Vnorm =V/║V║(1);
步骤B、构造协方差矩阵H。将单位化后的VAC和VAB构成向量组A=[VAC,VAB],对应的将采集点集中的向量构造为向量组B=[V'AC, V'AB]。则协方差矩阵H可被表示为:H=A·BT (2);Step B. Construct the covariance matrix H. The unitized VAC and VAB form a vector group A=[VAC , VAB ], and correspondingly the vectors in the collection point set are constructed as a vector group B=[V'AC , V'AB ]. Then the covariance matrix H can be expressed as: H=A·BT (2);
步骤C、对协方差矩阵进行奇异值分解,并构造旋转矩阵R。在得到协方差矩阵后,使用奇异值分解(SVD)得到U,L,Vt:U,L,Vt=SVD(H) (3);其中,U为左奇异矩阵,V为右奇异矩阵,L为奇异值;进而,可以得到旋转矩阵R:R= VtT·UT (4);Step C. Perform singular value decomposition on the covariance matrix and construct the rotation matrix R. After obtaining the covariance matrix, use singular value decomposition (SVD) to obtain U, L, Vt : U, L, Vt =SVD(H) (3); where U is the left singular matrix and V is the right singular matrix , L is a singular value; further, the rotation matrix R can be obtained: R= VtT ·UT (4);
步骤D、验证旋转矩阵R的行列式并修正R的结果。得到R后需要确其行列式为正,利用式5所示的拉普拉斯展开法计算得到行列式的值DetR:DetR=a11c11+…+ a1nc1n(5);Step D. Verify the determinant of the rotation matrix R and correct the result of R. After obtaining R, you need to confirm that its determinant is positive. Use the Laplace expansion method shown in Equation 5 to calculate the value of the determinant DetR: DetR=a11 c11 +…+ a1n c1n (5);
若DetR<0,Vt最后一行乘以-1,并重新按式4计算旋转矩阵以保证得到的旋转矩阵R为正交矩阵。If DetR<0, multiply the last row of Vt by -1, and recalculate the rotation matrix according to Equation 4 to ensure that the obtained rotation matrix R is an orthogonal matrix.
步骤S610、计算平移矩阵。令粗配准指示点集中点为P,采集点集的中点为P'。使用R对P'旋转得到新的位置P'R,并计算P与P'R之间的距离作为平移量M: M=P-P'R=P-R·P'(6);上式中:P'R = R·P';Step S610: Calculate the translation matrix. Let the coarse registration indicator point concentration point be P, and the midpoint of the collection point set be P'. Use R to rotate P' to obtain a new position P'R , and calculate the distance between P and P'R as the translation amount M: M=P-P'R =PR·P'(6); in the above formula: P'R = R·P';
步骤S612、构造粗配准仿射矩阵。将步骤(4)和步骤(5)得到的旋转矩阵和平移矩阵合并,并写为齐次形式,得到粗配准的仿射矩阵TRough;Step S612: Construct a coarse registration affine matrix. Combine the rotation matrix and translation matrix obtained in steps (4) and (5) and write them in homogeneous form to obtain the coarsely registered affine matrix TRough ;
TRough= (7);TRough = (7);
具体的,图9为本申请实施例的精配准过程流程图,精配准过程包括以下步骤:Specifically, Figure 9 is a flow chart of the fine registration process according to the embodiment of the present application. The fine registration process includes the following steps:
步骤S702、采集股骨远端点。在模型中预先标记股骨内外侧髁的韧带附着点AIN和AOUT,标记位置如图10所示。图10是本申请实施例的一种附着点的标记示意图,在手术中,操作人员在患者皮肤表面粗略收集附着点位置,得到A'IN和A'OUT,然后分别计算模型中附着点连线中点E和内外侧髁采集点连线中点E'。Step S702: Collect the distal point of the femur. The ligament attachment points AIN and AOUT of the medial and lateral femoral condyle are pre-marked in the model, and the marking positions are shown in Figure 10. Figure 10 is a schematic diagram of the marking of attachment points according to an embodiment of the present application. During the operation, the operator roughly collects the attachment point positions on the patient's skin surface, obtains A'IN and A'OUT , and then calculates the connection lines of the attachment points in the model respectively. The midpoint E' of the line connecting the midpoint E and the collection points of the medial and lateral condyles.
步骤S704、采集精配准点。在患者的暴露区域中均匀的采集n个精配准点,其中,n为正整数,(可选的,n≥20),构成精配准点集UP={P1…Pn},其中,Pn为齐次形式的采集坐标点。可选的,采集点应均匀分布,例如,部分点需分布在图4中的黄色区域,且空间距离至少为3mm。为了速度考虑,在使用过程中,精配准点数量不超过60个,上述仅仅是一种示例,并不对本申请的方案起到限定作用。Step S704: Collect fine registration points. Collect n precise registration points uniformly in the patient's exposed area, where n is a positive integer, (optional, n≥20), forming a precise registration point set UP ={P1 ...Pn }, where, Pn is the collection coordinate point in homogeneous form. Optionally, the collection points should be evenly distributed. For example, some points need to be distributed in the yellow area in Figure 4, and the spatial distance should be at least 3mm. For the sake of speed, the number of fine registration points does not exceed 60 during use. The above is just an example and does not limit the solution of this application.
步骤S706、移动采样点。使用粗配准仿射变换矩阵将内外侧髁采集点、粗配准采集点及精配准采集点进行仿射变换,使得所有点都靠近指示模型。Step S706: Move the sampling point. Use the coarse registration affine transformation matrix to perform affine transformation on the medial and lateral condyle collection points, coarse registration collection points and fine registration collection points, so that all points are close to the indicator model.
步骤S708、设置迭代退出条件。令最大迭代次数为βmax,退出迭代阈值为δ。Step S708: Set iteration exit conditions. Let the maximum number of iterations be βmax and the exit iteration threshold be δ.
步骤S710、生成多链并行优化的初始状态:用标准正态分布对X,Y,Z轴上的平移量和旋转量进行随机采样,生成m组随机旋转矩阵和平移矩阵,构成对应的扰动仿射矩阵。Step S710: Generate the initial state of multi-chain parallel optimization: Use standard normal distribution to randomly sample the translation and rotation amounts on the X, Y, and Z axes, and generate m sets of random rotation matrices and translation matrices to form the corresponding disturbance simulation. radial matrix.
设扰动矩阵为TDi,则每个优化链的初始状态为Ti=TDi·U,对应得到子链集合USC={ S1…Sm }。Assuming that the perturbation matrix is TDi , the initial state of each optimization chain isTi =TDi ·U, corresponding to the sub-chain set USC ={ S1 ...Sm }.
需要说明的是,本申请可选实施例并不规定初始链的个数以及采样方法,其他使用者可根据需要自行增减初始链个数和扰动矩阵生成方法,仅需保证初始链个数不少于10个即可。此外,虽然更多的初始链能够赋予迭代方法更多的可能性,但出于计算速率的考虑,本申请可选实施例不建议初始链个数超过50个。It should be noted that the optional embodiments of this application do not stipulate the number of initial chains and the sampling method. Other users can increase or decrease the number of initial chains and the perturbation matrix generation method according to their needs. They only need to ensure that the number of initial chains does not Less than 10 is fine. In addition, although more initial chains can give the iterative method more possibilities, for the sake of calculation speed, the optional embodiment of the present application does not recommend that the number of initial chains exceed 50.
步骤S712、使用ICP算法(相当于上述实施例中的目标算法)优化每一项子链。可选的,以移动后的精配准点作为源数据,以指示模型作为目标数据,令每个链中的当前状态Ti为ICP算法的初始仿射矩阵,设定最大迭代步长为N,分别对每个子链进行优化,并得到优化后的仿射矩阵群GT={ T1…Tm }。Step S712: Use the ICP algorithm (equivalent to the target algorithm in the above embodiment) to optimize each item chain. Optionally, use the moved precise registration point as the source data and the indicator model as the target data, let the current stateTi in each chain be the initial affine matrix of the ICP algorithm, and set the maximum iteration step size to N, Each sub-chain is optimized separately, and the optimized affine matrix group GT ={ T1 ...Tm } is obtained.
步骤S714、使用股骨远端点进行约束。具体的,分别取指示模型中的粗配准指示点A和附着点连线的中点E,作向量VA→E,以及取实际采集得到的A'和E',确定作向量VA'→E',并分别按照GT的仿射矩阵对平移后的A'和 E'进行仿射变换,并得到每个状态下的向量群VT=[V1A'→E' …VmA'→E']。使用如式8所示的方法计算VA→E与VT中每一个向量的夹角,得到夹角群AnlgueT=[θ1…θm] 。Step S714: Use the distal end point of the femur for constraint. Specifically, take the rough registration indicator point A in the indicator model and the midpoint E of the line connecting the attachment points to make the vector VA→E , and take the actual collected A' and E' to determine the vector VA'→E' , and perform affine transformation on the translated A' and E' according to the affine matrix of GT respectively, and obtain the vector group VT =[V1A'→E' ...Vm in each stateA'→E' ]. Use the method shown in Equation 8 to calculate the angle between each vector in VA→E and VT , and obtain the angle group AnlgueT =[θ1 ...θm ].
θi=arccos() (8);θi =arccos( ) (8);
进一步的,逐一比较AnlgeT中的θi从子链集合USC中删除子链Si若所有子链对应的θi均大于10°,则在USC中删去一半θi较大的子链。Further, compare θi in AnlgeT one by one and delete sub-chain Si from the sub-chain set USC . If the θi corresponding to all sub-chains are greater than 10°, delete half of the sub-chains with larger θi in USC . chain.
步骤S716、合并具有相近结果的子链。使用GT中的仿射矩阵逐一对精配准点集Up进行仿射变换,得到移动后的仿射点集UTP={UT1 …UTn}。随后,对UTP中的UTi进行逐一比较,若两个仿射点子集UTi和UTk所有移动后的精配准点的误差小于1mm,则认为两个点集为相近点集,此时可删除子链Sk,留Si并UTP中剔除具有相同编号的精配准点集。Step S716: Merge sub-chains with similar results. Use the affine matrix in GT to perform affine transformation on the fine registration point set Up one by one, and obtain the moved affine point set UTP ={UT1 ...UTn }. Then, UTi in UTP are compared one by one. If the error of all moved precise registration points of the two affine point subsets UTi and UTk is less than 1 mm, the two point sets are considered to be similar point sets. At this time The sub-chainSk can be deleted, leaving Si and eliminating the precise point set with the same number from UTP .
步骤S718、计算最小误差。利用KdTree等快速索引方法对UTP中剩余精配准位置计算其距指示模型表面的均方根误差(RMSE)。Step S718: Calculate the minimum error. Use fast indexing methods such as KdTree to calculate the root mean square error (RMSE) of the remaining fine registration positions in UTP from the surface of the indicated model.
RMSE = (9);RMSE = (9);
其中,上式中,d为每个点距骨面的距离,n为待计算的点的数量。通过上式,计算得到剩余子链的RMSE集合URMSE={R1…Rn},令具有最小误差的子链Smin作为本次迭代的最优子链Si,本次迭代的最小误差δimin=min(URMSE)。Among them, in the above formula, d is the distance from each point to the bone surface, and n is the number of points to be calculated. Through the above formula, the RMSE set of remaining sub-chains URMSE = {R1 ...Rn } is calculated, and the sub-chain Smin with the minimum error is regarded as the optimal sub-chainSi for this iteration, and the minimum error for this iteration is δimin =min(URMSE ).
步骤S720、判断是否达到终止迭代的条件。若δimin<δ,则满足终止迭代条件,令本次精配准的最优配准矩阵Tfine为最优子链Si的优化后的仿射矩阵GTi。若不满足终止迭代条件则继续判断是否达到最大迭代次数上限βmax,若已达到最大迭代次数上限βmax则仍以本次最优子链Si的优化后的仿射矩阵GTi作为最优配准矩阵Tfine。Step S720: Determine whether the conditions for terminating the iteration are met. If δimin <δ, then the termination iteration condition is met, and the optimal registration matrix Tfine of this fine registration is the optimized affine matrix GTi of the optimal sub-chainSi . If the termination iteration conditions are not met, continue to determine whether the maximum iteration limit βmax has been reached. If the maximum iteration limit βmax has been reached, the optimized affine matrix GTi of the optimal sub-chainSi will still be used as the optimal Registration matrix Tfine .
需要说明的是,若未达到最大迭代次数上限则根据步骤S708中的方法对剩余的子链添加随机扰动以生成新的子链,使子链数量重新增加到m条,并重复步骤S710到S718直至达到终止迭代条件。It should be noted that if the upper limit of the maximum number of iterations is not reached, random perturbations are added to the remaining sub-chains according to the method in step S708 to generate new sub-chains, so that the number of sub-chains is increased to m again, and steps S710 to S718 are repeated. Until the termination iteration condition is reached.
步骤S722、计算配准仿射矩阵。由于本配准过程中精配准部分与粗配准部分的点云位置和姿态不一,无法直接合并精配准矩阵和粗配准矩阵。在GTi所对应的UTPi中任意选三点PT1PT2PT3,并精配准点集Up中提取得到对应的PU1PU2PU3,并使用上述实施例中提出的粗配准方法计算得到配准矩阵Tfinal。Step S722: Calculate the registration affine matrix. Since the point cloud positions and postures of the fine registration part and the coarse registration part in this registration process are different, the fine registration matrix and the coarse registration matrix cannot be directly merged. Randomly select three points PT1 PT2 PT3 in the UTPi corresponding to GTi , and extract the corresponding PU1 PU2 PU3 from the fine registration point set Up , and use the coarse registration proposed in the above embodiment. The method calculates the registration matrix Tfinal .
综上,通过上述实施方式,由粗配准部分和精配准部分综合确定的配准矩阵为表面髋关节置换手术提供数据处理支持,解决了手术中暴露区域少,以及股骨头部分具有高度对称性等具有挑战性的问题,并且上述实施方式中不要求粗配准具有极高的精确性。容许粗配准结果与真实骨骼在旋转分量和平移分量上均存在较大的误差,大大降低了配准过程的初步要求,提升了方法的适用性。进一步的,还在精配准过程中采用并行的多链优化策略,有效地探索解空间,使得配准结果更具有全局优化的特性,提供高精度的手术定位,在使用过程中,通过股骨远端约束,可以结合手术前规划和术中实时数据,避免因为股骨头高对称性而导致的出现较大的旋转误差,提高手术的准确性和安全性。In summary, through the above implementation, the registration matrix comprehensively determined by the coarse registration part and the fine registration part provides data processing support for surface hip replacement surgery, solving the problem of small exposed area during the operation and high symmetry of the femoral head part. challenging problems such as accuracy, and the above implementation does not require extremely high accuracy in coarse registration. It allows large errors in both rotation and translation components between the coarse registration result and the real skeleton, which greatly reduces the initial requirements of the registration process and improves the applicability of the method. Furthermore, a parallel multi-chain optimization strategy is used in the precise registration process to effectively explore the solution space, making the registration results more globally optimized and providing high-precision surgical positioning. During use, the distal femur is used to End restraint can combine pre-operative planning and intra-operative real-time data to avoid large rotation errors caused by the high symmetry of the femoral head and improve the accuracy and safety of the surgery.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the sake of simple description, the foregoing method embodiments are expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with this application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily necessary for this application.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or those that contribute to the existing technology. The computer software products are stored in a storage medium (such as ROM/RAM, magnetic disc, optical disk), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present application.
根据本申请实施例的又一方面,还提供了一种配准装置,该装置用于实现上述实施例中所提供的配准方法,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。According to yet another aspect of the embodiment of the present application, a registration device is also provided. The device is used to implement the registration method provided in the above embodiment. What has been described will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
图11是本申请实施例的一种配准装置的结构框图,如图11所示,该装置包括:Figure 11 is a structural block diagram of a registration device according to an embodiment of the present application. As shown in Figure 11, the device includes:
变换单元101,用于使用第一矩阵对骨对象上的远端点、所述骨对象上的多个精配准点、所述骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;The transformation unit 101 is configured to use the first matrix to compare the distal point on the bone object, the multiple fine registration points on the bone object, and the acquisition points on the bone object corresponding to the coarse registration indication point on the indication model. Perform affine transformation on the set to obtain the transformation result;
优化单元103,用于在确定所述变换结果对应的多个子链的情况下,通过目标算法对所述多个子链进行优化,得到多个优化结果;The optimization unit 103 is configured to, when multiple sub-chains corresponding to the transformation result are determined, optimize the multiple sub-chains through a target algorithm to obtain multiple optimization results;
获取单元105,用于从所述多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取所述目标结果对应的第二矩阵;The acquisition unit 105 is configured to determine the target result that satisfies the preset iteration exit condition from the multiple optimization results, and obtain the second matrix corresponding to the target result;
第一确定单元107,用于基于所述第一矩阵和所述第二矩阵确定所述骨对象对应的配准矩阵,以使用所述配准矩阵对所述骨对象上执行的目标操作进行配准。The first determination unit 107 is configured to determine the registration matrix corresponding to the bone object based on the first matrix and the second matrix, so as to use the registration matrix to coordinate the target operation performed on the bone object. allow.
通过本申请提供的实施例,使用第一矩阵对骨对象上的远端点、骨对象上的多个精配准点、骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换,得到变换结果;在确定变换结果对应的多个子链的情况下,通过目标算法对多个子链进行优化,得到多个优化结果;从多个优化结果中确定出满足预设迭代退出条件的目标结果,并获取目标结果对应的第二矩阵;基于第一矩阵和第二矩阵确定骨对象对应的配准矩阵,以使用配准矩阵对骨对象上执行的目标操作进行配准。由此,在使用第一矩阵和第二矩阵构成的骨对象对应的配准矩阵,可以解决相关技术中的配准无法实现高精度的配准,且配准流程中的初步要求高,配准结果全局优化性差的问题,达到了对骨对象进行高精度的注册配准的技术效果。Through the embodiments provided by this application, the first matrix is used to collect the distal point on the bone object, multiple fine registration points on the bone object, and the collection point set corresponding to the coarse registration indication point on the bone object and the indication model. Affine transformation is used to obtain the transformation result; when multiple sub-chains corresponding to the transformation result are determined, the multiple sub-chains are optimized through the target algorithm to obtain multiple optimization results; from the multiple optimization results, it is determined that the preset iteration exit is satisfied The target result of the condition is obtained, and a second matrix corresponding to the target result is obtained; a registration matrix corresponding to the bone object is determined based on the first matrix and the second matrix, so as to use the registration matrix to register the target operation performed on the bone object. Therefore, using the registration matrix corresponding to the bone object composed of the first matrix and the second matrix can solve the problem that the registration in the related technology cannot achieve high-precision registration, and the preliminary requirements in the registration process are high, and the registration process As a result, the problem of poor global optimization was achieved, and the technical effect of high-precision registration and registration of bone objects was achieved.
在一个可选的实施例中,上述配准装置还包括:第二确定单元,用于使用第一矩阵对骨对象上的远端点、所述骨对象上的多个精配准点、所述骨对象上与指示模型上的粗配准指示点对应的采集点集进行仿射变换之前,获取所述指示模型上已选取的用于初步定位所述骨对象的粗配准指示点对应的粗配准指示点集;通过所述粗配准指示点集指示骨探针在骨对象上进行位置信息的采集;根据采集结果确定出所述骨对象上与指示模型上的粗配准指示点对应的采集点集;基于所述采集点集和所述粗配准指示点集确定所述骨对象对应的第一矩阵。In an optional embodiment, the above-mentioned registration device further includes: a second determination unit for using the first matrix to determine the distal point on the bone object, a plurality of fine registration points on the bone object, the Before the collection point set on the bone object corresponding to the coarse registration indicator point on the indicator model undergoes affine transformation, the coarse registration indicator point corresponding to the selected coarse registration indicator point on the indicator model for preliminary positioning of the bone object is obtained. A set of registration indication points; the bone probe is instructed to collect position information on the bone object through the set of coarse registration indication points; and the corresponding coarse registration indication points on the bone object and the indication model are determined according to the acquisition results. a collection point set; determining a first matrix corresponding to the bone object based on the collection point set and the coarse registration indication point set.
在一个可选的实施例中,上述配准装置还包括:排序单元,用于基于所述采集点集和所述粗配准指示点集确定所述骨对象对应的第一矩阵之前,确定所述粗配准指示点集中不同粗配准指示点之间的距离特征,并根据所述距离特征生成所述粗配准指示点集的定义信息;计算所述采集点集中不同采集点之间的欧式距离,得到多个欧式距离;使用所述定义信息对所述多个欧式距离中每一个欧式距离对应的两个采集点设置目标距离特征,以使用所述目标距离特征对所述不同采集点进行排序。In an optional embodiment, the above-mentioned registration device further includes: a sorting unit, configured to determine the first matrix corresponding to the bone object based on the collection point set and the coarse registration indicator point set. distance characteristics between different coarse registration indication points in the coarse registration indication point set, and generate definition information of the coarse registration indication point set according to the distance characteristics; calculate the distance between different collection points in the collection point set Euclidean distance, obtain multiple Euclidean distances; use the definition information to set target distance characteristics for the two collection points corresponding to each Euclidean distance in the multiple Euclidean distances, so as to use the target distance characteristics to compare the different collection points Sort.
在一个可选的实施例中,上述第二确定单元,还用于确定所述粗配准指示点集中不同粗配准指示点之间的第一单位向量,得到第一向量组,以及确定所述采集点集中不同采集点之间的第二单位向量,得到第二向量组;将所述第一向量组和所述第二向量组使用预设协方差矩阵进行计算,生成目标协方差矩阵;对所述目标协方差矩阵进行奇异值分解,确定所述目标协方差矩阵对应的旋转矩阵,并基于所述旋转矩阵确定所述粗配准指示点集对应的平移矩阵;将所述旋转矩阵和所述平移矩阵的合并矩阵确定为所述骨对象对应的第一矩阵。In an optional embodiment, the above-mentioned second determination unit is also used to determine the first unit vector between different coarse registration indication points in the set of coarse registration indication points, obtain the first vector group, and determine the The second unit vector between different collection points in the collection point set is used to obtain a second vector group; the first vector group and the second vector group are calculated using a preset covariance matrix to generate a target covariance matrix; Perform singular value decomposition on the target covariance matrix, determine the rotation matrix corresponding to the target covariance matrix, and determine the translation matrix corresponding to the coarse registration indication point set based on the rotation matrix; combine the rotation matrix and The merging matrix of the translation matrix is determined as the first matrix corresponding to the bone object.
在一个可选的实施例中,上述第二确定单元,还用于计算所述粗配准指示点集中不同粗配准指示点之间对应的第一中点,以及所述采集点集中不同采集点之间对应的第二中点;使用所述旋转矩阵对所述第二中点进行旋转,得到目标点;确定所述目标点与所述第一中点之间的平移量,以得到所述采集点集对应的平移矩阵。In an optional embodiment, the above-mentioned second determination unit is also used to calculate the corresponding first midpoint between different coarse registration indication points in the set of coarse registration indication points, and the corresponding first midpoint between different acquisition points in the set of collection points. The corresponding second midpoint between the points; use the rotation matrix to rotate the second midpoint to obtain the target point; determine the translation amount between the target point and the first midpoint to obtain the The translation matrix corresponding to the collection point set is described above.
在一个可选的实施例中,上述配准装置还包括:向量单元,用于通过目标算法对所述多个子链进行优化,得到多个优化结果之后,从所述指示模型上的粗配准指示点中选择第一指示点;确定所述第一指示点与第二中点连线对应的第三向量,并获取预所述第一指示点对应的第一采集点与第一中点的第四向量,其中,所述第一中点用于指示在所述骨对象对应的皮肤区域采集的至少两个实际点之间的中点,所述第二中点用于指示所述指示模型中预先标记的至少两个附着点之间的中点,所述至少两个实际点与所述至少两个附着点存在对应关系;获取所述多个优化结果对应的多个优化矩阵,使用所述多个优化矩阵分别对所述第四向量进行仿射变换,得到所述第四向量的状态向量群;计算所述第三向量与所述状态向量群中每一个状态向量的夹角。In an optional embodiment, the above-mentioned registration device further includes: a vector unit for optimizing the multiple sub-chains through a target algorithm. After obtaining multiple optimization results, the coarse registration on the indication model is Select the first indication point among the indication points; determine the third vector corresponding to the line connecting the first indication point and the second midpoint, and obtain the first acquisition point and the first midpoint corresponding to the first indication point. A fourth vector, wherein the first midpoint is used to indicate the midpoint between at least two actual points collected in the skin area corresponding to the bone object, and the second midpoint is used to indicate the indication model The midpoint between at least two pre-marked attachment points, the at least two actual points have a corresponding relationship with the at least two attachment points; obtain multiple optimization matrices corresponding to the multiple optimization results, and use the The plurality of optimization matrices respectively perform affine transformation on the fourth vector to obtain a state vector group of the fourth vector; calculate the angle between the third vector and each state vector in the state vector group.
在一个可选的实施例中,上述向量单元,还用于在计算所述第三向量与所述状态向量群中每一个状态向量的夹角之后,在所述夹角大于预设夹角的情况下,从所述多个子链中删除当前夹角对应的第一子链;在所有夹角均大于预设夹角的情况下,对所述所有夹角进行排序,并删除所述所有夹角中一半较大的夹角对应的第二子链。In an optional embodiment, the above-mentioned vector unit is also used to, after calculating the angle between the third vector and each state vector in the state vector group, calculate the angle when the angle is greater than the preset angle. In this case, delete the first sub-chain corresponding to the current included angle from the multiple sub-chains; when all included angles are greater than the preset included angle, sort all included angles and delete all included angles. The second sub-chain corresponding to the larger half of the angle.
在一个可选的实施例中,上述配准装置还包括:合并单元,用于在确定所述变换结果对应的多个子链的情况下,通过目标算法对所述多个子链进行优化,得到多个优化结果之前,使用所述多个优化结果对应的多个优化矩阵分别对所述多个精配准点进行仿射变换,得到所述多个精配准点对应的移动点集;计算所述移动点集中所有移动点之间的误差,将所述误差小于预设误差的至少两个移动点对应目标精配准点关联的第三子链进行合并。In an optional embodiment, the above-mentioned registration device further includes: a merging unit, configured to optimize the multiple sub-chains through a target algorithm when multiple sub-chains corresponding to the transformation result are determined to obtain multiple sub-chains. Before each optimization result, use multiple optimization matrices corresponding to the multiple optimization results to perform affine transformation on the multiple fine registration points respectively to obtain a set of moving points corresponding to the multiple fine registration points; calculate the movement The error between all moving points in the point set is merged into the third sub-chain associated with the target fine registration point of at least two moving points whose errors are smaller than the preset error.
在一个可选的实施例中,上述获取单元,还用于确定完成后的多个子链对应的剩余精配准位置,计算所述剩余精配准位置与所述指示模型表面的均方根误差,得到误差集合;从所述误差集合中确定出最小误差,并获取所述最小误差对应的目标子链以及确定所述目标子链的目标优化结果对应的迭代次数;在所述迭代次数和所述最小误差满足所述预设迭代退出条件的情况下,将所述目标子链确定为所述目标结果。In an optional embodiment, the above-mentioned acquisition unit is also used to determine the remaining precise registration positions corresponding to the multiple sub-chains after completion, and calculate the root mean square error between the remaining precise registration positions and the surface of the indicator model. , obtain an error set; determine the minimum error from the error set, obtain the target sub-chain corresponding to the minimum error, and determine the number of iterations corresponding to the target optimization result of the target sub-chain; when the number of iterations and the required When the minimum error satisfies the preset iteration exit condition, the target sub-chain is determined as the target result.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but is not limited to this: the above modules are all located in the same processor; or the above modules can be implemented in any combination. The forms are located in different processors.
根据本申请实施例的又一方面,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another aspect of the embodiment of the present application, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running. The steps in the example.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the computer-readable storage medium may include but is not limited to: USB flash drive, read-only memory (ROM), random access memory (Random Access Memory, RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序/指令,该计算机程序/指令包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理器801执行时,执行本申请实施例提供的各种功能。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。According to one aspect of the present application, a computer program product is provided, which computer program product includes a computer program/instructions containing program code for executing the method shown in the flowchart. In such embodiments, the computer program may be downloaded and installed from the network via communications portion 809 and/or installed from removable media 811 . When the computer program is executed by the central processor 801, various functions provided by the embodiments of the present application are executed. The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
图12示意性地示出了用于实现本申请实施例的电子设备的计算机系统结构框图。如图12所示,计算机系统800包括中央处理器801(Central Processing Unit,CPU),其可以根据存储在只读存储器802(Read-Only Memory,ROM)中的程序或者从存储部分808加载到随机访问存储器803(Random Access Memory,RAM)中的程序而执行各种适当的动作和处理。在随机访问存储器803中,还存储有系统操作所需的各种程序和数据。中央处理器801、在只读存储器802以及随机访问存储器803通过总线804彼此相连。输入/输出接口805(Input /Output接口,即I/O接口)也连接至总线804。Figure 12 schematically shows a block diagram of a computer system used to implement an electronic device according to an embodiment of the present application. As shown in Figure 12, the computer system 800 includes a central processing unit 801 (Central Processing Unit, CPU), which can be loaded into a random access memory according to a program stored in a read-only memory 802 (Read-Only Memory, ROM) or from a storage part 808. The program in the memory 803 (Random Access Memory, RAM) is accessed to execute various appropriate actions and processes. In the random access memory 803, various programs and data required for system operation are also stored. The central processing unit 801, the read-only memory 802 and the random access memory 803 are connected to each other through a bus 804. The input/output interface 805 (Input/Output interface, ie I/O interface) is also connected to the bus 804.
以下部件连接至输入/输出接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如局域网卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至输入/输出接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。The following components are connected to the input/output interface 805: an input part 806 including a keyboard, a mouse, etc.; an output part 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. ; A storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. Driver 810 is also connected to input/output interface 805 as needed. Removable media 811, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
特别地,根据本申请的实施例,各个方法流程图中所描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理器801执行时,执行本申请的系统中限定的各种功能。In particular, according to embodiments of the present application, the processes described in the respective method flow charts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such embodiments, the computer program may be downloaded and installed from the network via communications portion 809 and/or installed from removable media 811 . When the computer program is executed by the central processor 801, various functions defined in the system of the present application are executed.
需要说明的是,图12示出的电子设备的计算机系统800仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。It should be noted that the computer system 800 of the electronic device shown in FIG. 12 is only an example, and should not impose any restrictions on the functions and scope of use of the embodiments of the present application.
根据本申请实施例的又一方面,还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。According to yet another aspect of the embodiment of the present application, an electronic device is also provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above method embodiments. steps in.
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述输入输出资源池连接,该输入输出设备和上述输入输出资源池连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the input-output resource pool, and the input-output device is connected to the input-output resource pool.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and exemplary implementations, and details will not be described again in this embodiment.
显然,本领域的技术人员应该明白,上述的本申请实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请实施例不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned embodiments of the present application can be implemented with a general-purpose computing device, and they can be concentrated on a single computing device, or distributed among multiple computing devices. over a network, they may be implemented with program code executable by a computing device, such that they may be stored in a storage device for execution by the computing device, and in some cases, may be executed in a sequence different from that described here. The steps shown or described may be implemented by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps among them into a single integrated circuit module. As such, embodiments of the present application are not limited to any specific combination of hardware and software.
以上仅为本申请的优选实施例而已,并不用于限制本申请实施例,对于本领域的技术人员来说,本申请实施例可以有各种更改和变化。凡在本申请实施例的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。The above are only preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, various modifications and changes may be made to the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the embodiments of this application shall be included in the protection scope of the embodiments of this application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310994089.7ACN116721137B (en) | 2023-08-08 | 2023-08-08 | Registration method and device, storage medium and electronic equipment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310994089.7ACN116721137B (en) | 2023-08-08 | 2023-08-08 | Registration method and device, storage medium and electronic equipment |
| Publication Number | Publication Date |
|---|---|
| CN116721137Atrue CN116721137A (en) | 2023-09-08 |
| CN116721137B CN116721137B (en) | 2023-10-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310994089.7AActiveCN116721137B (en) | 2023-08-08 | 2023-08-08 | Registration method and device, storage medium and electronic equipment |
| Country | Link |
|---|---|
| CN (1) | CN116721137B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060159323A1 (en)* | 2005-01-18 | 2006-07-20 | Yiyong Sun | System and method for automatically registering three dimensional cardiac images with electro-anatomical cardiac mapping data |
| CN105976312A (en)* | 2016-05-30 | 2016-09-28 | 北京建筑大学 | Point cloud automatic registering method based on point characteristic histogram |
| US20170278244A1 (en)* | 2016-03-24 | 2017-09-28 | The Chinese University Of Hong Kong | Method and a system for non-rigid image registration |
| CN114305685A (en)* | 2021-12-17 | 2022-04-12 | 杭州键嘉机器人有限公司 | Hip bone registration method used in hip joint replacement surgery |
| CN116058965A (en)* | 2021-11-02 | 2023-05-05 | 杭州素问九州医疗科技有限公司 | Bone registration method for joint replacement surgery and surgery navigation system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060159323A1 (en)* | 2005-01-18 | 2006-07-20 | Yiyong Sun | System and method for automatically registering three dimensional cardiac images with electro-anatomical cardiac mapping data |
| US20170278244A1 (en)* | 2016-03-24 | 2017-09-28 | The Chinese University Of Hong Kong | Method and a system for non-rigid image registration |
| CN105976312A (en)* | 2016-05-30 | 2016-09-28 | 北京建筑大学 | Point cloud automatic registering method based on point characteristic histogram |
| CN116058965A (en)* | 2021-11-02 | 2023-05-05 | 杭州素问九州医疗科技有限公司 | Bone registration method for joint replacement surgery and surgery navigation system |
| CN114305685A (en)* | 2021-12-17 | 2022-04-12 | 杭州键嘉机器人有限公司 | Hip bone registration method used in hip joint replacement surgery |
| Title |
|---|
| 李玉梅 等: "三维重建中点云配准算法研究", 电子测量技术, vol. 43, no. 12* |
| Publication number | Publication date |
|---|---|
| CN116721137B (en) | 2023-10-27 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113616350B (en) | Verification method and device for selected positions of marking points, terminal equipment and storage medium | |
| JP2017511232A (en) | System and method for positioning a bone cutting guide | |
| US11816822B2 (en) | Technologies for determining the accuracy of three-dimensional models for use in an orthopaedic surgical procedure | |
| CN109544536A (en) | The fast automatic analysis method of hip joint x-ray image | |
| CN112382359B (en) | Patient registration method and device, electronic equipment and computer readable medium | |
| CN114305685B (en) | Hip bone registration method for hip joint replacement operation | |
| JP7354280B2 (en) | Prepathological characterization of anatomical objects using statistical shape modeling (SSM) | |
| CN115100258B (en) | Hip joint image registration method, device, equipment and storage medium | |
| AU2020279597B2 (en) | Automated planning of shoulder stability enhancement surgeries | |
| CN115345938B (en) | Global-to-local-based head shadow mark point positioning method, equipment and medium | |
| CN113077499A (en) | Pelvis registration method, pelvis registration device and pelvis registration system | |
| US12272082B2 (en) | Method and system for constructing bone model, medium and device | |
| CN112950600B (en) | Brain identification extraction method, device, computer equipment and storage medium | |
| CN117058197A (en) | Spatial registration method and device for nerve regulation and control | |
| CN119339006B (en) | Orthopedic 3D printing model construction method and device based on intelligent AI | |
| CN116721137B (en) | Registration method and device, storage medium and electronic equipment | |
| WO2025161319A1 (en) | Skeleton registration apparatus and electronic device | |
| CN112562070A (en) | Craniosynostosis operation cutting coordinate generation system based on template matching | |
| CN112381922A (en) | Method, system and terminal for obtaining skeleton model of human skeleton missing part | |
| CN116363093A (en) | Method and device for searching rotation center of acetabulum, operation planning system and storage medium | |
| CN115359017A (en) | Tibial plateau caster angle determining device | |
| CN114376724A (en) | Method, device and equipment for determining target characteristic points and computer storage medium | |
| Morooka et al. | Ancient pelvis reconstruction from collapsed component bones using statistical shape models | |
| CN117976180A (en) | Mark point selection method and device based on improved genetic algorithm and electronic equipment | |
| CN120088300A (en) | Point cloud registration method for tibial surgery |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |