CN118333848B - Space conversion method, device, electronic equipment and medium - Google Patents
Space conversion method, device, electronic equipment and medium Download PDFInfo
- Publication number
- CN118333848B CN118333848B CN202410733825.8A CN202410733825A CN118333848B CN 118333848 B CN118333848 B CN 118333848B CN 202410733825 A CN202410733825 A CN 202410733825A CN 118333848 B CN118333848 B CN 118333848B
- Authority
- CN
- China
- Prior art keywords
- marking
- space
- conversion
- point
- relationship
- 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.)
- Active
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 143
- 238000000034 method Methods 0.000 title claims abstract description 67
- 239000013598 vector Substances 0.000 claims abstract description 116
- 238000010845 search algorithm Methods 0.000 claims abstract description 37
- 239000011159 matrix material Substances 0.000 claims description 115
- 238000013519 translation Methods 0.000 claims description 53
- 239000003550 marker Substances 0.000 claims description 48
- 238000004422 calculation algorithm Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 7
- 230000011218 segmentation Effects 0.000 claims description 6
- 230000001131 transforming effect Effects 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 6
- 238000011156 evaluation Methods 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 32
- 230000009466 transformation Effects 0.000 description 21
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000005457 optimization Methods 0.000 description 8
- 241000746998 Tragus Species 0.000 description 4
- 238000012804 iterative process Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000002591 computed tomography Methods 0.000 description 2
- 238000003709 image segmentation Methods 0.000 description 2
- 238000013421 nuclear magnetic resonance imaging Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000011426 transformation method Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 206010028980 Neoplasm Diseases 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000001575 pathological effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/16—Spatio-temporal transformations, e.g. video cubism
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
本发明涉及图像数据处理领域,公开了一种空间转换方法、装置、电子设备及介质。方法包括:根据第一空间与第二空间之间的空间转换关系将多个第一空间中的待转换标记点转换至第二空间;空间转换关系通过以下步骤获得:获取第一空间的多个第一标记点;获取第二空间中与多个第一标记点对应的多个第二标记点,每个第二标记点所表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同;确定各个第二标记点对应的目标法向量;利用所有目标法向量,基于最近点搜索算法,确定多个第一标记点与多个第二标记点之间的转换关系作为空间转换关系,使得最近点搜索算法纳入了点与平面之间的相对关系的评估,以避免陷入局部最优解。
The present invention relates to the field of image data processing, and discloses a space conversion method, device, electronic device and medium. The method comprises: converting a plurality of to-be-converted marking points in a first space to a second space according to a space conversion relationship between the first space and the second space; the space conversion relationship is obtained by the following steps: obtaining a plurality of first marking points in the first space; obtaining a plurality of second marking points corresponding to the plurality of first marking points in the second space, wherein the features of the object to be converted represented by each second marking point are the same as the features of the object to be converted represented by the corresponding first marking point; determining the target normal vector corresponding to each second marking point; using all target normal vectors, based on a nearest point search algorithm, determining the conversion relationship between the plurality of first marking points and the plurality of second marking points as a space conversion relationship, so that the nearest point search algorithm incorporates the evaluation of the relative relationship between the point and the plane to avoid falling into a local optimal solution.
Description
技术领域Technical Field
本申请属于图像数据处理领域,具体涉及一种空间转换方法、装置、电子设备及介质。The present application belongs to the field of image data processing, and specifically relates to a space conversion method, device, electronic equipment and medium.
背景技术Background Art
在众多需要进行手动实操的行业中,为了实现操作的精准性,需要利用另一空间(多数为虚拟空间)进行在实际空间中的操作导航,这就需要进行两个空间之间坐标转换以配准两个空间之间对应的点。比如,医生在进行手术时,有时需要利用手术导航系统,手术导航系统可以实现病人空间和图像空间之间的转换。In many industries that require manual operations, in order to achieve operational accuracy, it is necessary to use another space (mostly virtual space) to navigate the operation in the actual space, which requires coordinate conversion between the two spaces to align the corresponding points between the two spaces. For example, when doctors perform surgery, they sometimes need to use a surgical navigation system, which can realize the conversion between patient space and image space.
目前,空间转换中常采用最近点搜索(Iterative Closest Point,ICP)算法,但传统的最近点搜索算法只考虑两个点云之间点到点的距离以进行转换关系的寻找,容易导致解决方案陷入局部最优解,从而无法保证转换精度。At present, the Iterative Closest Point (ICP) algorithm is often used in spatial transformation. However, the traditional closest point search algorithm only considers the point-to-point distance between two point clouds to find the transformation relationship, which can easily cause the solution to fall into a local optimal solution, thus failing to guarantee the conversion accuracy.
发明内容Summary of the invention
本申请实施例的目的是旨在提供一种空间转换方法、装置、电子设备及介质,能够在利用最近点搜索算法进行空间转换时,避免陷入局部最优解,以保证转换精度。The purpose of the embodiments of the present application is to provide a spatial conversion method, device, electronic device and medium, which can avoid falling into a local optimal solution when using a nearest point search algorithm for spatial conversion to ensure conversion accuracy.
第一方面,本申请实施例提供了一种转换方法,包括:In a first aspect, an embodiment of the present application provides a conversion method, including:
获取第一空间的多个待转换标记点;Obtain multiple marker points to be converted in the first space;
根据所述第一空间与第二空间之间的空间转换关系将多个所述待转换标记点转换至所述第二空间;Converting the plurality of to-be-converted marking points to the second space according to a spatial conversion relationship between the first space and the second space;
所述空间转换关系通过以下步骤获得:The spatial conversion relationship is obtained by the following steps:
获取所述第一空间的多个第一标记点,其中,多个所述第一标记点表征需转换物的特征;Acquire a plurality of first marking points in the first space, wherein the plurality of first marking points represent characteristics of an object to be converted;
获取所述第二空间中与多个所述第一标记点对应的多个第二标记点,每个所述第二标记点所表征的需转换物的特征与对应的所述第一标记点表征的需转换物的特征相同;Acquire a plurality of second marking points in the second space corresponding to the plurality of first marking points, wherein the feature of the object to be converted represented by each of the second marking points is the same as the feature of the object to be converted represented by the corresponding first marking point;
确定各个所述第二标记点对应的目标法向量,其中,所述目标法向量垂直于所述第二标记点所表征的需转换物的特征所在的平面;Determine a target normal vector corresponding to each of the second marking points, wherein the target normal vector is perpendicular to a plane where a feature of the object to be converted represented by the second marking point is located;
利用多个所述目标法向量,基于最近点搜索算法,确定多个所述第一标记点与多个所述第二标记点之间的转换关系,并将所述转换关系作为所述空间转换关系。Using the plurality of target normal vectors, based on a nearest point search algorithm, a conversion relationship between the plurality of first marking points and the plurality of second marking points is determined, and the conversion relationship is used as the spatial conversion relationship.
第二方面,本申请实施例提供了一种空间转换装置,所述装置包括:In a second aspect, an embodiment of the present application provides a space conversion device, the device comprising:
待标记点获取模块,用于获取第一空间的多个待转换标记点;A to-be-marked point acquisition module, used to acquire a plurality of to-be-converted marked points in the first space;
转换模块,用于根据所述第一空间与第二空间之间的空间转换关系将多个所述待转换标记点转换至所述第二空间;A conversion module, configured to convert the plurality of to-be-converted marking points into the second space according to a spatial conversion relationship between the first space and the second space;
空间转换关系获取模块,用于通过以下步骤获得所述空间转换关系:The space conversion relationship acquisition module is used to obtain the space conversion relationship through the following steps:
第一标记点获取单元,用于获取所述第一空间的多个第一标记点,其中,多个所述第一标记点表征需转换物的特征;A first marking point acquisition unit, configured to acquire a plurality of first marking points in the first space, wherein the plurality of first marking points represent characteristics of an object to be converted;
第二标记点获取单元,用于获取所述第二空间中与多个所述第一标记点对应的多个第二标记点,每个所述第二标记点所表征的需转换物的特征与对应的所述第一标记点表征的需转换物的特征相同;A second marking point acquisition unit, configured to acquire a plurality of second marking points in the second space corresponding to the plurality of first marking points, wherein a feature of an object to be converted represented by each of the second marking points is the same as a feature of an object to be converted represented by a corresponding first marking point;
目标法向量确定单元,用于确定各个所述第二标记点对应的目标法向量,其中,所述目标法向量垂直于所述第二标记点所表征的需转换物的特征所在的平面;A target normal vector determining unit, used to determine a target normal vector corresponding to each of the second marking points, wherein the target normal vector is perpendicular to a plane where a feature of the object to be converted represented by the second marking point is located;
空间转换关系确定单元,用于利用多个所述目标法向量,基于最近点搜索算法,确定多个所述第一标记点与多个所述第二标记点之间的转换关系,并将所述转换关系作为所述空间转换关系。A spatial transformation relationship determination unit is used to use multiple target normal vectors, based on a nearest point search algorithm, to determine the transformation relationship between multiple first marking points and multiple second marking points, and use the transformation relationship as the spatial transformation relationship.
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如本申请实施例第一方面所述的空间转换方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the spatial conversion method described in the first aspect of the embodiment of the present application are implemented.
第四方面,本申请实施例提供了一种机器可读存储介质,所述机器可读存储介质上存储有指令,该指令被处理器执行时使得所述处理器实现根据本申请实施例第一方面所述的空间转换方法。In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor implements the space conversion method described in the first aspect of the embodiment of the present application.
在本申请实施例中,第一空间的多个待转换标记点通过第一空间与第二空间之间的空间转换关系转换至第二空间,该空间转换关系通过多个第一空间中的第一标记点与多个第二空间中的第二标记点确定。多个第一标记点与多个第二标记点一一对应,在基于最近点搜索算法利用多个第一标记点和多个第二标记点确定上述空间转换关系时,引入了目标法向量,目标法向量垂直于所述第二标记点所表征的需转换物的特征所在的平面。如此,在利用最近点搜索算法寻找上述空间转换关系的过程中,不再只考虑两个点云之间点到点的距离以进行空间转换关系的寻找,通过目标法向量在最近点搜索算法中引入了第二标记点所表征的需转换物的特征所在的平面,使得最近点搜索算法在迭代优化的过程中纳入点与平面之间的相对关系的评估,以避免只考虑两个点云之间点到点距离的传统最近点搜索算法所导致的易陷入局部最优解的问题。In an embodiment of the present application, a plurality of to-be-converted marking points in a first space are converted to a second space through a spatial conversion relationship between the first space and the second space, and the spatial conversion relationship is determined by a plurality of first marking points in the first space and a plurality of second marking points in the second space. A plurality of first marking points correspond to a plurality of second marking points one by one, and when the aforementioned spatial conversion relationship is determined using a plurality of first marking points and a plurality of second marking points based on a nearest point search algorithm, a target normal vector is introduced, and the target normal vector is perpendicular to the plane where the features of the object to be converted represented by the second marking point are located. In this way, in the process of finding the aforementioned spatial conversion relationship using the nearest point search algorithm, only the point-to-point distance between the two point clouds is no longer considered to find the spatial conversion relationship. The plane where the features of the object to be converted represented by the second marking point are located is introduced into the nearest point search algorithm through the target normal vector, so that the nearest point search algorithm incorporates the evaluation of the relative relationship between the point and the plane in the iterative optimization process, so as to avoid the problem of being easily trapped in a local optimal solution caused by the traditional nearest point search algorithm which only considers the point-to-point distance between the two point clouds.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的空间转换方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a space conversion method provided in an embodiment of the present application;
图2是本申请实施例提供的空间转换方法中的空间转换关系确定步骤的流程示意图;FIG2 is a schematic flow chart of a step of determining a spatial conversion relationship in a spatial conversion method provided in an embodiment of the present application;
图3是本申请实施例提供的空间转换装置的结构示意图;FIG3 is a schematic diagram of the structure of a space conversion device provided in an embodiment of the present application;
图4是本申请实施例提供的电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的一种空间转换方法、装置、电子设备及介质进行详细地说明。In the following, in combination with the accompanying drawings, a space conversion method, device, electronic device and medium provided by the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
请参见图1,是本申请实施例提供的空间转换方法的流程示意图,本申请实施例第一方面提供了一种空间转换方法,包括如下步骤S010-步骤S020,以及步骤S100-步骤S400:Please refer to FIG. 1 , which is a flow chart of a space conversion method provided in an embodiment of the present application. In a first aspect, an embodiment of the present application provides a space conversion method, comprising the following steps S010 to S020, and steps S100 to S400:
步骤S010:获取第一空间的多个待转换标记点。Step S010: Acquire a plurality of to-be-converted marking points in the first space.
处理器在进行空间转换时,实质上是通过两个空间之间的空间转换关系进行两个坐标系之间的转换。When the processor performs space conversion, it actually converts between two coordinate systems through the space conversion relationship between the two spaces.
具体地,在临床医疗领域的手术导航系统中,手术导航系统需要实现病人空间和图像空间之间的转换(即将病人空间作为第一空间,图像空间作为第二空间),以实现病人空间和图像空间之间的各个点的坐标统一,即将病人空间中的各个点在图像空间中实现投射,保证手术导航过程中的准确性。处理器在进行病人空间与图像空间之间的转换时,首先需要获取病人空间中的待转换标记点,以进行后续的空间转换过程。Specifically, in the surgical navigation system in the clinical medical field, the surgical navigation system needs to realize the conversion between the patient space and the image space (that is, the patient space is used as the first space and the image space is used as the second space) to achieve the coordinate unification of each point between the patient space and the image space, that is, to project each point in the patient space in the image space to ensure the accuracy of the surgical navigation process. When the processor converts between the patient space and the image space, it first needs to obtain the marker points to be converted in the patient space for the subsequent space conversion process.
步骤S020:根据第一空间与第二空间之间的空间转换关系将多个待转换标记点转换至第二空间。Step S020: converting the plurality of to-be-converted marking points into the second space according to the space conversion relationship between the first space and the second space.
处理器在获取到第一空间的多个待转换标记点后,利用第一空间与第二空间之间的空间转换关系,将多个待转换标记点进行坐标转换,以使多个待转换点被投射至第二空间,即获得了多个待转换标记点所表征的特征,在第二空间中的具体坐标。After acquiring multiple marker points to be converted in the first space, the processor uses the spatial conversion relationship between the first space and the second space to perform coordinate conversion on the multiple marker points to be converted so that the multiple points to be converted are projected into the second space, that is, the specific coordinates of the features represented by the multiple marker points to be converted in the second space are obtained.
具体地,在病人空间与图像空间的转换中,多个待转换点可以为病人空间中的表征任意特征的任意点,这些被表征的特征需要在图像空间中获得坐标表征。处理器利用病人空间与图像空间之间的空间转换关系,将上述多个待转换点转换至图像空间,以使多个待转换点所表征的特征可以在图像空间中有对应的坐标。Specifically, in the conversion between the patient space and the image space, the multiple points to be converted can be any points in the patient space that represent any features, and these represented features need to obtain coordinate representation in the image space. The processor uses the spatial conversion relationship between the patient space and the image space to convert the multiple points to be converted into the image space, so that the features represented by the multiple points to be converted can have corresponding coordinates in the image space.
可见,完成上述空间转换步骤S010-步骤S020的关键在于第一空间与第二空间之间的空间转换关系,具体地,在手术导航系统中,病人空间与图像空间之间空间转换关系的获取被称为空间注册。It can be seen that the key to completing the above-mentioned spatial conversion steps S010 to S020 lies in the spatial conversion relationship between the first space and the second space. Specifically, in the surgical navigation system, the acquisition of the spatial conversion relationship between the patient space and the image space is called spatial registration.
请参见图2,图2是本申请实施例提供的空间转换方法中的空间转换关系确定步骤的流程示意图,空间转换关系通过如下所述的步骤S100-步骤S400获得:Please refer to FIG. 2 , which is a flowchart of the step of determining the space conversion relationship in the space conversion method provided in an embodiment of the present application. The space conversion relationship is obtained through steps S100 to S400 as described below:
步骤S100:获取第一空间的多个第一标记点,其中,多个第一标记点表征需转换物的特征。Step S100: Acquire a plurality of first marking points in a first space, wherein the plurality of first marking points represent features of an object to be converted.
第一空间与第二空间之间的空间转换关系的确定过程中,首先需要获取用于进行空间转换关系确定的第一空间的多个第一标记点,每个第一标记点均表征了第一空间中,需转换物的特征。In the process of determining the spatial conversion relationship between the first space and the second space, it is first necessary to obtain multiple first marking points of the first space for determining the spatial conversion relationship, each of which represents the characteristics of the object to be converted in the first space.
具体地,在病人空间中,第一标记点根据手术导航系统需要进行手术导航的区域,即需转换物所在的区域而定。处理器可以利用病人的某些解剖学上的生理特征或某些病理学上的病理特征,如鼻尖、耳屏、眼角或肿瘤区域特征点,作为多个第一标记点,它们各自表征了对应的需转换物在几何上的特征。Specifically, in the patient space, the first marking point is determined according to the area where the surgical navigation system needs to perform surgical navigation, that is, the area where the object to be converted is located. The processor can use certain anatomical physiological features or certain pathological features of the patient, such as feature points of the nose tip, tragus, eye corners or tumor area, as multiple first marking points, each of which represents the geometric features of the corresponding object to be converted.
步骤S200:获取第二空间中与多个第一标记点对应的多个第二标记点,每个第二标记点所表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同。Step S200: Acquire a plurality of second marking points corresponding to the plurality of first marking points in the second space, wherein the feature of the object to be converted represented by each second marking point is the same as the feature of the object to be converted represented by the corresponding first marking point.
空间转换关系的确定还需要第二空间中的多个第二标记点,多个第二标记点与所述多个第一标记点一一对应,也就是,每个第二标记点所表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同。Determination of the spatial conversion relationship also requires multiple second marking points in the second space, and the multiple second marking points correspond one-to-one to the multiple first marking points, that is, the characteristics of the object to be converted represented by each second marking point are the same as the characteristics of the object to be converted represented by the corresponding first marking point.
具体地,在病人空间中,示例性地,多个第一标记点的数量若为3个,分别表征了鼻尖、耳屏、眼角这3个特征,那么,在进行第二标记点的确定时,同样要在图像空间中选择表征了鼻尖、耳屏、眼角这3个特征的点作为与3个第一标记点对应的3个第二标记点。Specifically, in the patient space, for example, if the number of multiple first marking points is 3, which respectively represent the three features of the tip of the nose, the tragus, and the corner of the eye, then when determining the second marking point, it is also necessary to select points in the image space that represent the three features of the tip of the nose, the tragus, and the corner of the eye as the three second marking points corresponding to the three first marking points.
步骤S300:确定各个第二标记点对应的目标法向量,其中,目标法向量垂直于第二标记点所表征的需转换物的特征所在的平面。Step S300: determining a target normal vector corresponding to each second marking point, wherein the target normal vector is perpendicular to a plane where the feature of the object to be converted represented by the second marking point is located.
本申请实施例提供的空间转换方法相较于传统的利用最近点搜索算法进行点云匹配的空间转换方法,引入了第二标记点所表征的需转换物的特征所在的平面(也就是第一标记点与对应的第二标记点之间的转换平面),以使最近点搜索算法在迭代优化转换关系的过程中纳入点与平面之间的相对关系的评估,第二标记点所表征的需转换物的特征所在的平面通过垂直于第二标记点所表征的需转换物的特征所在的平面的法向量引入,处理器将此法向量确定为目标法向量,故需确定每个第二标记点的目标法向量以用于后续的最近点搜索算法的进行。Compared with the traditional spatial transformation method using the nearest point search algorithm for point cloud matching, the spatial transformation method provided in the embodiment of the present application introduces a plane where the features of the object to be converted represented by the second marking point are located (that is, the transformation plane between the first marking point and the corresponding second marking point), so that the nearest point search algorithm can incorporate the evaluation of the relative relationship between the point and the plane in the process of iterative optimization of the transformation relationship. The plane where the features of the object to be converted represented by the second marking point are located is introduced through a normal vector perpendicular to the plane where the features of the object to be converted represented by the second marking point are located. The processor determines this normal vector as the target normal vector, so it is necessary to determine the target normal vector of each second marking point for subsequent nearest point search algorithm.
具体地,图像空间若为病人空间的二维(平面)模型,即图像空间中的点的坐标在某一个方向上恒为0,则所有第二标记点均在同一平面内,那么所有第二标记点的目标法向量可以选择同一向量,该向量垂直于该平面。Specifically, if the image space is a two-dimensional (planar) model of the patient space, that is, the coordinates of the points in the image space are always 0 in a certain direction, then all the second marking points are in the same plane, and the target normal vectors of all the second marking points can select the same vector, which is perpendicular to the plane.
图像空间若为病人空间的三维(立体)模型,则所有第二标记点并不一定在同一平面内,需要确定每个第二标记点表征的需转换物上的特征(鼻尖、耳屏、眼角等)的所在的平面,并确定一个垂直于该平面的法向量作为该第二标记点的目标法向量。If the image space is a three-dimensional (stereoscopic) model of the patient space, all the second marker points are not necessarily in the same plane. It is necessary to determine the plane in which the features on the object to be converted (nose tip, tragus, eye corner, etc.) represented by each second marker point are located, and determine a normal vector perpendicular to the plane as the target normal vector of the second marker point.
步骤S400:利用多个目标法向量,基于最近点搜索算法,确定多个第一标记点与多个第二标记点之间的转换关系,并将多个第一标记点与多个第二标记点之间的转换关系作为上述空间转换关系。Step S400: using multiple target normal vectors, based on the nearest point search algorithm, determine the conversion relationship between the multiple first marking points and the multiple second marking points, and use the conversion relationship between the multiple first marking points and the multiple second marking points as the above-mentioned spatial conversion relationship.
在所有目标法向量确定完成后,即结合利用所有目标法向量,基于最近点搜索算法,确定多个第一标记点与多个第二标记点,也就是两个点云之间的转换关系,并将确定完成的多个第一标记点与多个第二标记点之间的转换关系作为上述第一空间与第二空间之间的空间转换关系,以用于第一空间待转换点的转换。After all target normal vectors are determined, that is, all target normal vectors are combined and utilized to determine the conversion relationship between multiple first marking points and multiple second marking points, that is, two point clouds, based on the nearest point search algorithm, and the conversion relationship between the determined multiple first marking points and the multiple second marking points is used as the spatial conversion relationship between the above-mentioned first space and the second space, so as to be used for the conversion of the points to be converted in the first space.
通过上述步骤S010-步骤S020,以及步骤S100-步骤S400,第一空间的多个待转换标记点通过第一空间与第二空间之间的空间转换关系转换至第二空间,该空间转换关系通过多个第一空间中的第一标记点与多个第二空间中的第二标记点确定。多个第一标记点与多个第二标记点一一对应,在基于最近点搜索算法利用多个第一标记点和多个第二标记点确定上述空间转换关系时,引入了目标法向量,目标法向量垂直于所述第二标记点所表征的需转换物的特征所在的平面。如此,在利用最近点搜索算法寻找上述空间转换关系的过程中,不再只考虑两个点云之间点到点的距离以进行空间转换关系的寻找,通过目标法向量在最近点搜索算法中引入了第二标记点所表征的需转换物的特征所在的平面,使得最近点搜索算法在迭代优化空间转换关系的过程中纳入点与平面之间的相对关系的评估,以避免只考虑两个点云之间点到点距离的传统最近点搜索算法所导致的易陷入局部最优解的问题。Through the above steps S010-S020, and steps S100-S400, a plurality of marker points to be converted in the first space are converted to the second space through the spatial conversion relationship between the first space and the second space, and the spatial conversion relationship is determined by a plurality of first marker points in the first space and a plurality of second marker points in the second space. The plurality of first marker points correspond to the plurality of second marker points one by one. When the spatial conversion relationship is determined by the plurality of first marker points and the plurality of second marker points based on the nearest point search algorithm, a target normal vector is introduced, and the target normal vector is perpendicular to the plane where the features of the object to be converted represented by the second marker point are located. In this way, in the process of finding the above spatial conversion relationship using the nearest point search algorithm, only the point-to-point distance between the two point clouds is no longer considered to find the spatial conversion relationship. The plane where the features of the object to be converted represented by the second marker point are located is introduced into the nearest point search algorithm through the target normal vector, so that the nearest point search algorithm includes the evaluation of the relative relationship between the point and the plane in the process of iteratively optimizing the spatial conversion relationship, so as to avoid the problem of being easily trapped in the local optimal solution caused by the traditional nearest point search algorithm that only considers the point-to-point distance between the two point clouds.
在一些实施方式中,转换关系包括旋转矩阵与平移矩阵,利用多个目标法向量,基于最近点搜索算法,确定多个第一标记点与多个第二标记点之间的转换关系,包括:In some implementations, the transformation relationship includes a rotation matrix and a translation matrix, and the transformation relationship between the plurality of first marking points and the plurality of second marking points is determined based on a nearest point search algorithm using a plurality of target normal vectors, including:
确定每个第一标记点与对应的目标法向量的交叉积;Determining a cross product of each first marker point and the corresponding target normal vector;
根据多个目标法向量,确定每个第一标记点的误差向量,其中,误差向量为第一标记点与对应的第二标记点所在的平面之间的垂直距离;Determine an error vector of each first marking point according to the plurality of target normal vectors, wherein the error vector is a vertical distance between the first marking point and a plane where a corresponding second marking point is located;
根据多个交叉积、多个目标法向量以及多个误差向量,确定旋转矩阵;Determine a rotation matrix based on a plurality of cross products, a plurality of target normal vectors, and a plurality of error vectors;
基于最近点搜索算法,利用旋转矩阵、预平移矩阵、多个交叉积、多个误差向量以及多个目标法向量进行迭代计算,得到平移矩阵。Based on the nearest point search algorithm, the translation matrix is obtained by iterative calculation using the rotation matrix, the pre-translation matrix, multiple cross products, multiple error vectors and multiple target normal vectors.
多个第一标记点与多个第二标记点之间的转换关系可以由旋转矩阵与平移矩阵构成,旋转矩阵用于将由多个第一标记点组成的点云进行旋转,平移矩阵用于将由多个第一标记点组成的点云进行平移,使得由多个第一标记点组成的点云可以与由多个第二标记点组成的点云对齐,实现第一空间与第二空间的转换。The transformation relationship between multiple first marking points and multiple second marking points can be composed of a rotation matrix and a translation matrix. The rotation matrix is used to rotate the point cloud composed of multiple first marking points, and the translation matrix is used to translate the point cloud composed of multiple first marking points, so that the point cloud composed of multiple first marking points can be aligned with the point cloud composed of multiple second marking points, thereby realizing the transformation between the first space and the second space.
具体地,其中,旋转矩阵可以通过构建线性关系求解获得,即后续最近点搜索算法仅用于进行平移矩阵的寻找,以减小利用最近点搜索算法进行迭代优化过程中的优化难度。Specifically, the rotation matrix can be obtained by constructing a linear relationship solution, that is, the subsequent closest point search algorithm is only used to find the translation matrix to reduce the optimization difficulty in the iterative optimization process using the closest point search algorithm.
构建求解旋转矩阵的线性关系需要每个第一标记点与对应的目标法向量之间的交叉积(即第一标记点对应的第二标记点所对应的目标法向量),故处理器先进行每个第一标记点与对应的目标法向量的交叉积的确定,这个交叉积实际表征了第一标记点与对应的目标法向量之间的距离。Constructing the linear relationship for solving the rotation matrix requires the cross product between each first marker point and the corresponding target normal vector (that is, the target normal vector corresponding to the second marker point corresponding to the first marker point). Therefore, the processor first determines the cross product between each first marker point and the corresponding target normal vector. This cross product actually represents the distance between the first marker point and the corresponding target normal vector.
构建求解旋转矩阵的线性关系还需要确定每个第一标记点的误差向量,误差向量是第一标记点与对应的第二标记点所表征的需转换物的特征所在的平面之间的垂直距离,具体地,若第一标记点的坐标为(a,b,c),对应的第二标记点的坐标为(d,e,f),该第一坐标点的误差向量即为(a-d,b-e,c-f)与该第一标记点对应的目标法向量之间的点积。Constructing the linear relationship for solving the rotation matrix also requires determining the error vector of each first marking point. The error vector is the vertical distance between the plane where the features of the object to be converted represented by the first marking point and the corresponding second marking point are located. Specifically, if the coordinates of the first marking point are (a, b, c) and the coordinates of the corresponding second marking point are (d, e, f), the error vector of the first coordinate point is the dot product between (a-d, b-e, c-f) and the target normal vector corresponding to the first marking point.
在所有的交叉积以及所有的误差向量均确定完成后,即可利用所有的交叉积、所有的误差向量以及所有的目标法向量构建求解旋转矩阵的线性关系,求解旋转矩阵。After all cross products and all error vectors are determined, the linear relationship for solving the rotation matrix can be constructed using all cross products, all error vectors and all target normal vectors to solve the rotation matrix.
旋转矩阵确定完成后,基于最近点搜索算法,利用确定完成的旋转矩阵、所有交叉积以及所有误差向量进行迭代计算,在迭代过程中不断进行平移矩阵确定过程中的优化,以得到平移矩阵,至此,多个第一标记点与多个第二标记点之间的转换关系确定完成,该转换关系即为第一空间与第二空间之间的空间转换关系。After the rotation matrix is determined, based on the nearest point search algorithm, iterative calculations are performed using the determined rotation matrix, all cross products and all error vectors. During the iteration, the translation matrix determination process is continuously optimized to obtain the translation matrix. At this point, the transformation relationship between multiple first marking points and multiple second marking points is determined, and the transformation relationship is the spatial transformation relationship between the first space and the second space.
在一些实施方式中,基于最近点搜索算法,利用旋转矩阵、多个交叉积、多个误差向量以及多个目标法向量进行迭代计算,得到平移矩阵,包括:In some implementations, based on a closest point search algorithm, a rotation matrix, multiple cross products, multiple error vectors, and multiple target normal vectors are used for iterative calculation to obtain a translation matrix, including:
利用旋转矩阵与预平移矩阵对多个第一标记点进行转换;Transforming the plurality of first marking points using a rotation matrix and a pre-translation matrix;
根据多个交叉积、多个误差向量、旋转矩阵以及预平移矩阵确定转换后的多个第一标记点与多个第二标记点之间的转换误差;Determine a conversion error between the converted plurality of first marker points and the converted plurality of second marker points according to the plurality of cross products, the plurality of error vectors, the rotation matrix, and the pre-translation matrix;
根据转换误差对预平移矩阵进行迭代更新,并重复上述步骤,直至转换误差或迭代次数满足迭代终止条件;Iteratively update the pre-translation matrix according to the conversion error, and repeat the above steps until the conversion error or the number of iterations meets the iteration termination condition;
将迭代终止后的预平移矩阵作为平移矩阵。The pre-translation matrix after the iteration is terminated is used as the translation matrix.
转换关系中平移矩阵的确定基于多次的迭代过程完成。在未满足迭代终止条件的情况下,每次迭代过程中,利用确定完成的旋转矩阵进行多个第一标记点的旋转过程,利用预平移矩阵进行多个第一标记点的平移过程,一次旋转过程和平移过程完成后,确定转换后的多个第一标记点与多个第二标记点之间的转换误差,以次转换误差作为预平移矩阵迭代更新的参考标准,对预平移矩阵进行迭代更新,作为下一次迭代过程中的预平移矩阵,直至转换误差或迭代次数满足迭代终止条件,将迭代终止后的预平移矩阵作为平移矩阵,至此,转换关系确定完成。The determination of the translation matrix in the conversion relationship is completed based on multiple iterations. In the case that the iteration termination condition is not met, in each iteration process, the rotation process of multiple first marking points is performed using the determined rotation matrix, and the translation process of multiple first marking points is performed using the pre-translation matrix. After one rotation process and translation process are completed, the conversion error between the converted multiple first marking points and the multiple second marking points is determined, and the conversion error is used as the reference standard for iterative update of the pre-translation matrix. The pre-translation matrix is iteratively updated and used as the pre-translation matrix in the next iteration process until the conversion error or the number of iterations meets the iteration termination condition, and the pre-translation matrix after the iteration is terminated is used as the translation matrix. At this point, the conversion relationship is determined.
具体地,在一次迭代过程中,处理器首先利用旋转矩阵和预平移对多个第一标记点进行旋转以及平移,再根据上述的所有交叉积、所有误差向量、旋转矩阵以及所有目标法向量确定转换后的多个第一标记点与多个第二标记点之间的转换误差,以判断转换效果。Specifically, in one iteration process, the processor first rotates and translates multiple first marker points using the rotation matrix and pre-translation, and then determines the conversion errors between the converted multiple first marker points and the multiple second marker points based on all the above-mentioned cross products, all error vectors, rotation matrices and all target normal vectors to judge the conversion effect.
转换误差确定完成后,处理器根据转换误差对预平移矩阵进行迭代更新,处理器可以采用数值优化方法(如梯度下降、最小二乘法等)根据转换误差对预平移矩阵进行迭代更新,将迭代更新后的预平移矩阵作为下一次迭代过程中的预平移矩阵。本领域技术人员可以理解的是,第一次迭代过程中的初始预平移矩阵可以设置为(0,0,0),技术人员也可以根据多个第一标记点构成的点云的几何特征或者已知的变换信息来估计初始的平移矩阵,或根据经验或者先验知识来确定。After the conversion error is determined, the processor iteratively updates the pre-translation matrix according to the conversion error. The processor can use a numerical optimization method (such as gradient descent, least squares method, etc.) to iteratively update the pre-translation matrix according to the conversion error, and use the iteratively updated pre-translation matrix as the pre-translation matrix in the next iteration process. It can be understood by those skilled in the art that the initial pre-translation matrix in the first iteration process can be set to (0,0,0), and the technician can also estimate the initial translation matrix based on the geometric features of the point cloud composed of multiple first marker points or known transformation information, or determine it based on experience or prior knowledge.
当转换误差或迭代次数已满足迭代终止条件时,迭代过程终止,处理器将迭代终止后的预平移矩阵作为优化完成的平移矩阵,多个第一标记点与多个第二标记点之间的转换关系确定完成。When the conversion error or the number of iterations meets the iteration termination condition, the iteration process is terminated, and the processor uses the pre-translation matrix after the iteration termination as the optimized translation matrix, and the conversion relationship between the multiple first marking points and the multiple second marking points is determined to be completed.
在一些实施方式中,迭代终止条件为,转换误差相比于上一次迭代过程中的转换误差没有增加,或迭代次数已达到预设迭代次数。In some implementations, the iteration termination condition is that the conversion error does not increase compared to the conversion error in the previous iteration process, or the number of iterations has reached a preset number of iterations.
在一些实施方式中,转换误差的表达公式为:In some implementations, the conversion error is expressed as:
(1) (1)
其中,为转换误差,为转换后的第一标记点与第二标记点的编码,为转换后的第一标记点的个数,为转换后的第一标记点,为第二标记点,为目标法向量,为旋转矩阵,为平移矩阵,为误差向量,为交叉积。in, is the conversion error, is the encoding of the first marking point and the second marking point after conversion, is the number of the first marker points after conversion, is the first marker point after conversion, is the second marking point, is the target normal vector, is the rotation matrix, is the translation matrix, is the error vector, is the cross product.
转换误差可由上述公式(1)进行确定,从上述公式(1)中可见,转换误差涉及到了交叉积与误差向量,即涉及到了每个第一标记点与对应的目标法向量之间的距离,和每个第一标记点与对应的第二标记点所表征的需转换物的特征所在的平面之间的垂直距离,使得最近点搜索算法在迭代优化预平移矩阵的过程中纳入点与平面之间的相对关系的评估。The conversion error can be determined by the above formula (1). It can be seen from the above formula (1) that the conversion error involves the cross product and the error vector, that is, it involves the distance between each first marker point and the corresponding target normal vector, and the vertical distance between the plane where the feature of the object to be converted represented by each first marker point and the corresponding second marker point is located, so that the nearest point search algorithm incorporates the evaluation of the relative relationship between the point and the plane in the process of iteratively optimizing the pre-translation matrix.
在一些实施方式中,根据多个交叉积、多个目标法向量以及多个误差向量,确定旋转矩阵,包括:In some implementations, determining a rotation matrix based on a plurality of cross products, a plurality of target normal vectors, and a plurality of error vectors includes:
利用多个交叉积与多个目标法向量构建关系矩阵;Construct a relationship matrix using multiple cross products and multiple target normal vectors;
利用多个交叉积、多个目标法向量以及多个误差向量构建关系向量;constructing a relationship vector using multiple cross products, multiple target normal vectors, and multiple error vectors;
根据关系矩阵与关系向量确定旋转矩阵。Determine the rotation matrix based on the relationship matrix and the relationship vector.
在本申请实施例中,迭代优化过程只用于进行预平移矩阵的迭代优化,转换关系中的旋转矩阵通过构建线性关系求解获得。In the embodiment of the present application, the iterative optimization process is only used to perform iterative optimization of the pre-translation matrix, and the rotation matrix in the transformation relationship is obtained by constructing a linear relationship.
在构建线性关系并求解旋转矩阵的过程中,处理器首先利用所有交叉积以及所有目标法向量构建关系矩阵,该关系矩阵反映了每个第一标记点与对应的目标法向量之间的垂直距离以及每个目标法向量的信息。In the process of constructing the linear relationship and solving the rotation matrix, the processor first constructs a relationship matrix using all cross products and all target normal vectors. The relationship matrix reflects the vertical distance between each first marker point and the corresponding target normal vector and the information of each target normal vector.
处理器再利用所有交叉积、所有目标法向量以及所有误差向量构建关系向量,关系向量反映了每个第一标记点与对应的第二标记点所在的平面之间的垂直距离、每个第一标记点与对应的目标法向量之间的垂直距离以及每个目标法向量。The processor then uses all cross products, all target normal vectors and all error vectors to construct a relationship vector, which reflects the vertical distance between each first marker point and the plane where the corresponding second marker point is located, the vertical distance between each first marker point and the corresponding target normal vector, and each target normal vector.
处理器最后再利用确定完成的关系矩阵和关系向量,与旋转矩阵构建线性关系,以求解旋转矩阵,如以下公式所示:Finally, the processor uses the determined relationship matrix and relationship vector to build a linear relationship with the rotation matrix to solve the rotation matrix, as shown in the following formula:
(2) (2)
其中,为旋转矩阵,为关系矩阵,为关系向量。in, is the rotation matrix, is the relationship matrix, is the relationship vector.
具体地,在求解旋转矩阵时,为了便于进行求解,可以将旋转矩阵近似为一个单位矩阵,在求解与使用旋转矩阵时,均可应用该近似的旋转矩阵,即:Specifically, when solving the rotation matrix, in order to facilitate the solution, the rotation matrix can be Approximately an identity matrix , this approximate rotation matrix can be applied when solving and using the rotation matrix ,Right now:
(3) (3)
(4) (4)
其中,为旋转矩阵,为近似的旋转矩阵,、、为中需要通过上述线性关系求解的未知参数。in, is the rotation matrix, is the approximate rotation matrix, , , for The unknown parameters that need to be solved through the above linear relationship.
在一些实施方式中,关系矩阵的表达公式为:In some implementations, the relationship matrix is expressed as:
(5) (5)
关系向量的表达公式为:The expression formula of the relationship vector is:
(6) (6)
其中,为关系矩阵,为关系向量,为第一标记点与第二标记点的编码,为第一标记点的个数,为第一标记点,为第二标记点,为目标法向量,为交叉积,为误差向量。in, is the relationship matrix, is the relationship vector, is the code of the first marking point and the second marking point, is the number of the first marking points, is the first marking point, is the second marking point, is the target normal vector, is the cross product, is the error vector.
关系向量和关系矩阵可根据上述公式(5)与公式(6)进行构建,从上述公式(5)与公式(6)中可见,关系矩阵反映了每个第一标记点与对应的目标法向量之间的垂直距离(通过每个第一标记点与对应的目标法向量的交叉积反映)以及每个目标法向量,关系向量反映了每个第一标记点与对应的第二标记点所在的平面之间的垂直距离(通过每个第一标记点的误差向量反映)、每个第一标记点与对应的目标法向量之间的垂直距离(通过每个第一标记点与对应的目标法向量的交叉积反映)以及每个目标法向量。The relationship vector and the relationship matrix can be constructed according to the above formula (5) and formula (6). It can be seen from the above formula (5) and formula (6) that the relationship matrix reflects the vertical distance between each first marker point and the corresponding target normal vector (reflected by the cross product of each first marker point and the corresponding target normal vector) and each target normal vector, and the relationship vector reflects the vertical distance between each first marker point and the plane where the corresponding second marker point is located (reflected by the error vector of each first marker point), the vertical distance between each first marker point and the corresponding target normal vector (reflected by the cross product of each first marker point and the corresponding target normal vector) and each target normal vector.
如此,利用关系矩阵和关系向量构建求解旋转矩阵的线性关系,求解旋转矩阵,并将求解获得的旋转矩阵应用于后续求解平移矩阵的迭代过程中,即迭代过程中只需要对预平移矩阵进行迭代更新,而不需要对旋转矩阵进行迭代更新,减少了迭代过程中的数值优化任务,使得迭代过程更易完成。In this way, the relationship matrix and relationship vector are used to construct a linear relationship for solving the rotation matrix, the rotation matrix is solved, and the solved rotation matrix is applied to the subsequent iterative process of solving the translation matrix. That is, in the iterative process, only the pre-translation matrix needs to be iteratively updated, and the rotation matrix does not need to be iteratively updated, which reduces the numerical optimization tasks in the iterative process and makes the iterative process easier to complete.
在一些实施方式中,获取第二空间中与多个第一标记点对应的多个第二标记点,包括:In some implementations, obtaining a plurality of second marking points corresponding to the plurality of first marking points in the second space includes:
利用区域生长分割算法对第一空间的图像进行预处理;Preprocessing the image in the first space by using a region growing segmentation algorithm;
利用经过预处理后的图像进行模型转换,以形成与第一空间对应的模型图像,作为第二空间;Performing model conversion using the preprocessed image to form a model image corresponding to the first space as the second space;
根据多个第一标记点在第二空间中选取对应的多个标记点作为多个第二标记点。According to the plurality of first marking points, a plurality of corresponding marking points are selected in the second space as a plurality of second marking points.
处理器在获取第二空间中,与多个第一标记点对应的多个第二标记点的过程中,首先利用区域生长分割算法对第一空间的图像进行预处理,以将第一空间的图像进行分割,利用分割后的第一空间的图像进行模型转换,以获得一个与第一空间中的需转换物对应的模型图像。将该模型图像作为第一空间需要进行标记点投射的第二空间。In the process of acquiring the second marking points corresponding to the first marking points in the second space, the processor firstly pre-processes the image of the first space by using the region growing segmentation algorithm to segment the image of the first space, and performs model conversion by using the segmented image of the first space to obtain a model image corresponding to the object to be converted in the first space. The model image is used as the second space where the marking points of the first space need to be projected.
因在进行模型转换之前使用了区域生长分割算法进行图像分割,使得处理器可以更准确地确定图像中感兴趣区域的边界,在进行模型转换时,确保了只有相关的需转换物的区域结构被包括进模型图像,避免了无关区域的干扰。同时,使用区域生长分割算法进行图像分割也优化了处理器计算资源的使用——通过减少分析和处理的图像数据量,降低了处理器计算负担。Because the region growing segmentation algorithm is used for image segmentation before model conversion, the processor can more accurately determine the boundaries of the region of interest in the image. When performing model conversion, it ensures that only the relevant regional structure of the object to be converted is included in the model image, avoiding interference from irrelevant areas. At the same time, using the region growing segmentation algorithm for image segmentation also optimizes the use of processor computing resources - by reducing the amount of image data analyzed and processed, the processor computing burden is reduced.
处理器再在确定完成的第二空间中,选取与多个第一标记点对应的多个第二标记点,即选取多个表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同的点,作为多个第二标记点。The processor then selects a plurality of second marking points corresponding to the plurality of first marking points in the determined second space, that is, selects a plurality of points whose features of the objects to be converted are the same as the features of the objects to be converted represented by the corresponding first marking points as the plurality of second marking points.
具体地,处理器首先获取病人空间的图像,如计算机体层摄影(ComputedTomography,CT)图像,核磁共振成像(NuclearMagneticResonanceImaging,NMRI)图像等,然后利用区域生长分割算法,将上述图像进行分割。Specifically, the processor first acquires an image of the patient space, such as a Computed Tomography (CT) image, a Nuclear Magnetic Resonance Imaging (NMRI) image, etc., and then segments the above image using a region growing segmentation algorithm.
利用3D重建技术,将分割完成的图像转换为一个3D虚拟模型,该3D虚拟模型与病人空间的需转换物对应,作为第二空间,即图像空间。例如,病人空间中的需转换物为人脑,该3D虚拟模型即为一个3D虚拟脑模型。Using 3D reconstruction technology, the segmented image is converted into a 3D virtual model, which corresponds to the object to be converted in the patient space as the second space, i.e., the image space. For example, if the object to be converted in the patient space is a human brain, the 3D virtual model is a 3D virtual brain model.
处理器再在确定完成的3D虚拟模型中,选取与多个第一标记点对应的多个第二标记点,即选取多个表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同的点,作为多个第二标记点。The processor then selects a plurality of second marking points corresponding to the plurality of first marking points in the determined completed 3D virtual model, that is, selects a plurality of points whose features of the objects to be converted are the same as the features of the objects to be converted represented by the corresponding first marking points as the plurality of second marking points.
请参见图3,是本申请实施例提供的空间转换装置的结构示意图,本申请实施例第二方面提供了一种空间转换装置1000,装置1000包括:Please refer to FIG. 3 , which is a schematic diagram of the structure of a space conversion device provided in an embodiment of the present application. A second aspect of an embodiment of the present application provides a space conversion device 1000, and the device 1000 includes:
待标记点获取模块1100,用于获取第一空间的多个待转换标记点;The to-be-marked point acquisition module 1100 is used to acquire a plurality of to-be-converted marked points in the first space;
转换模块1200,用于根据第一空间与第二空间之间的空间转换关系将多个待转换标记点转换至第二空间;A conversion module 1200, configured to convert a plurality of to-be-converted marking points into the second space according to a space conversion relationship between the first space and the second space;
空间转换关系获取模块1300,用于通过以下步骤获得空间转换关系:The space conversion relationship acquisition module 1300 is used to obtain the space conversion relationship through the following steps:
第一标记点获取单元1310,用于获取第一空间的多个第一标记点,其中,多个第一标记点表征需转换物的特征;A first marking point acquisition unit 1310 is used to acquire a plurality of first marking points in a first space, wherein the plurality of first marking points represent features of an object to be converted;
第二标记点获取单元1320,用于获取第二空间中与多个第一标记点对应的多个第二标记点,每个第二标记点所表征的需转换物的特征与对应的第一标记点表征的需转换物的特征相同;A second marking point acquisition unit 1320 is used to acquire a plurality of second marking points corresponding to the plurality of first marking points in the second space, wherein the feature of the object to be converted represented by each second marking point is the same as the feature of the object to be converted represented by the corresponding first marking point;
目标法向量确定单元1330,用于确定各个第二标记点对应的目标法向量,其中,目标法向量垂直于第二标记点所表征的需转换物的特征所在的平面;A target normal vector determining unit 1330 is used to determine a target normal vector corresponding to each second marking point, wherein the target normal vector is perpendicular to the plane where the feature of the object to be converted represented by the second marking point is located;
空间转换关系确定单元1340,用于利用多个目标法向量,基于最近点搜索算法,确定多个第一标记点与多个第二标记点之间的转换关系,并将转换关系作为空间转换关系。The spatial transformation relationship determining unit 1340 is used to determine the transformation relationship between the plurality of first marking points and the plurality of second marking points based on the nearest point search algorithm using the plurality of target normal vectors, and use the transformation relationship as the spatial transformation relationship.
本申请实施例第二方面提供的空间转换装置1000能够实现上述方法实施例实现的各个过程,并达到相同的有益效果,为避免重复,这里不再赘述。The space conversion device 1000 provided in the second aspect of the embodiment of the present application can implement each process implemented by the above-mentioned method embodiment and achieve the same beneficial effects. To avoid repetition, it will not be described here.
请参见图4,是本申请实施例提供的电子设备的结构示意图,本申请实施例第三方面提供了一种电子设备2000,包括处理器2001和存储器2002,存储器2002存储有能够被处理器2001执行的机器可执行指令,处理器2001可执行机器可执行指令以实现上述的空间转换方法。Please refer to Figure 4, which is a structural diagram of an electronic device provided in an embodiment of the present application. The third aspect of the embodiment of the present application provides an electronic device 2000, including a processor 2001 and a memory 2002, the memory 2002 stores machine executable instructions that can be executed by the processor 2001, and the processor 2001 can execute the machine executable instructions to implement the above-mentioned space conversion method.
本申请实施例第四方面提供了一种机器可读存储介质,机器可读存储介质上存储有指令,该指令被处理器执行时使得所述处理器实现上述的空间转换方法。A fourth aspect of an embodiment of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor implements the above-mentioned space conversion method.
在本申请的一个实施例中,还提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现根据上述实施方式中的空间转换方法。In one embodiment of the present application, a computer program product is further provided, including a computer program, and when the computer program is executed by a processor, the space conversion method according to the above embodiment is implemented.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。The present application is described with reference to the flowchart and/or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each flow and/or box in the flow chart and/or block diagram and the combination of the flow chart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart or multiple flows and/or one box or multiple boxes of the block chart. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which realizes the function specified in one flow chart or multiple flows and/or one box or multiple boxes of the block chart. These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
此外,本发明的各种不同的实施方式之间也可以进行任意组合,只要其不违背本发明的思想,其同样应当视为本发明所公开的内容。In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410733825.8A CN118333848B (en) | 2024-06-07 | 2024-06-07 | Space conversion method, device, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410733825.8A CN118333848B (en) | 2024-06-07 | 2024-06-07 | Space conversion method, device, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118333848A CN118333848A (en) | 2024-07-12 |
CN118333848B true CN118333848B (en) | 2024-09-03 |
Family
ID=91764770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410733825.8A Active CN118333848B (en) | 2024-06-07 | 2024-06-07 | Space conversion method, device, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118333848B (en) |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ITTV20100133A1 (en) * | 2010-10-08 | 2012-04-09 | Teleios Srl | APPARATUS AND METHOD FOR CARRYING OUT THE MAP OF A THREE-DIMENSIONAL SPACE IN MEDICAL APPLICATIONS FOR INTERVENTIONAL OR DIAGNOSTIC PURPOSE |
CN103236064B (en) * | 2013-05-06 | 2016-01-13 | 东南大学 | A kind of some cloud autoegistration method based on normal vector |
US10919149B2 (en) * | 2017-11-24 | 2021-02-16 | Denso Wave Incorporated | Controller for robot and inverse transforming method for robot |
CN110287974A (en) * | 2019-06-24 | 2019-09-27 | 中国矿业大学 | A fast matching method of laser scanning 3D model and GIS model of fully mechanized mining face |
CN112669359B (en) * | 2021-01-14 | 2023-05-26 | 武汉理工大学 | Three-dimensional point cloud registration method, device, equipment and storage medium |
CN112802124B (en) * | 2021-01-29 | 2023-10-31 | 北京罗克维尔斯科技有限公司 | Calibration method and device for multiple stereo cameras, electronic equipment and storage medium |
KR102773846B1 (en) * | 2021-02-03 | 2025-03-04 | 한국전자통신연구원 | Apparatus and Method for Searching Global Minimum of Point Cloud Registration Error |
CN114998103A (en) * | 2022-05-27 | 2022-09-02 | 中国计量大学 | Point cloud cultural relic fragment three-dimensional virtual splicing method based on twin network |
WO2024067753A1 (en) * | 2022-09-29 | 2024-04-04 | 武汉联影智融医疗科技有限公司 | Registration method, registration system, navigation information determination method, and navigation system |
CN116650115A (en) * | 2023-05-16 | 2023-08-29 | 长春理工大学 | Orthopedic surgery navigation registration method based on UWB mark points |
CN117788529B (en) * | 2024-02-26 | 2024-06-18 | 苏州艾吉威机器人有限公司 | Three-dimensional plane point cloud coarse registration method, system, medium and equipment |
-
2024
- 2024-06-07 CN CN202410733825.8A patent/CN118333848B/en active Active
Non-Patent Citations (1)
Title |
---|
基于点云模型的义齿三维图像注册技术研究;舒悦天;《中国期刊硕士学位论文》;20240115;第23页第2.1.2节第4段,第32页第3章第1段,第55页第5.2节第1-2段,第58页第5.4节,图5.4 * |
Also Published As
Publication number | Publication date |
---|---|
CN118333848A (en) | 2024-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9123169B2 (en) | Model generation method and model generation apparatus | |
CN111149128A (en) | Method and device for acquiring marking data, training method and device and medical equipment | |
US11348216B2 (en) | Technologies for determining the accuracy of three-dimensional models for use in an orthopaedic surgical procedure | |
CN111275633A (en) | Point cloud denoising method, system, device and storage medium based on image segmentation | |
US10891787B2 (en) | Apparatus and method for creating biological model | |
Yang et al. | A triangular radial cubic spline deformation model for efficient 3D beating heart tracking | |
US11134908B2 (en) | Technologies for determining the spatial orientation of input imagery for use in an orthopaedic surgical procedure | |
CN112116642B (en) | Registration method of medical image, electronic device and storage medium | |
CN115089303A (en) | Robot positioning method and system | |
CN116012526B (en) | Three-dimensional CT image focus reconstruction method based on two-dimensional image | |
KR101471646B1 (en) | Parallel processing of 3D medical image registration by GP-GPU | |
Jahanshahloo et al. | Reconstruction of 3D shapes with B-spline surface using diagonal approximation BFGS methods | |
CN118333848B (en) | Space conversion method, device, electronic equipment and medium | |
CN114119684B (en) | Marker point registration method based on tetrahedral structure | |
WO2022160731A1 (en) | Image processing method and apparatus, electronic device, storage medium, and program | |
CN113962957A (en) | Medical image processing method, bone image processing method, device and equipment | |
CN113256693A (en) | Multi-view registration method based on K-means and normal distribution transformation | |
CN115908479A (en) | A brain tissue drift correction method and surgical navigation system | |
CN115511935A (en) | Registration method of point cloud with normal distribution transformation based on iterative discretization and linear interpolation | |
KR102731039B1 (en) | Image processing device and system for analyzing calcification including the same | |
US12165301B2 (en) | Technologies for determining the accuracy of three-dimensional models for use in an orthopedic surgical procedure | |
Beyer et al. | Mesh Reduction to Exterior Surface Parts via Random Convex-Edge Affine Features | |
CN119679510A (en) | Medical imaging data generation method, device, electronic equipment and medical system | |
Renner et al. | Deformable image registration with a featurelet algorithm: implementation as a 3D-slicer extension and validation | |
CN119273909A (en) | Method and electronic device for object segmentation of computer tomography image |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |