A robot registration method, device, control apparatus, and storage medium
By acquiring the target magnetic resonance image of the imaging marker, and using the adaptive thresholding algorithm and point cloud registration algorithm to calculate the homogeneous transformation matrix, the difficulty of robot registration in the magnetic resonance environment is solved, the registration accuracy and efficiency are improved, and the precision of the surgery is ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
- Filing Date
- 2023-10-31
- Publication Date
- 2026-06-23
Smart Images

Figure CN119908843B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of magnetic resonance technology, and in particular relates to a robot registration method, apparatus, control device and storage medium. Background Technology
[0002] With the continuous development of medical technology, the use of surgical robots in assisted surgeries is becoming increasingly common. For example, surgical robots are used to assist in puncture procedures. To improve the accuracy of these surgeries, it is usually necessary to calibrate the coordinates of the surgical robot and the operating table.
[0003] However, due to the unique characteristics of the magnetic resonance environment, traditional robot registration methods, such as optical registration and magnetic navigation registration, which register the robot's coordinates with the operating table, cannot be used in the magnetic resonance environment. Summary of the Invention
[0004] This application provides a robot registration method, apparatus, control device, and storage medium, which realizes robot registration in a magnetic resonance environment and improves the registration accuracy of the robot.
[0005] In a first aspect, embodiments of this application provide a robot registration method, including:
[0006] Acquire target magnetic resonance images of imaging markers mounted on a robot to be registered, the robot being placed on a designated component of a magnetic resonance device used to generate magnetic resonance images;
[0007] Image segmentation processing based on an adaptive threshold algorithm is performed on the target magnetic resonance image to obtain the target point cloud data of the imaging markers;
[0008] Based on the target point cloud data, determine the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance equipment;
[0009] Based on the position information, determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system;
[0010] The robot registration operation is completed using the target homogeneous transformation matrix.
[0011] This application provides a robot registration method that involves acquiring a target magnetic resonance image of a developing marker mounted on a robot to be registered; performing image segmentation processing on the target magnetic resonance image based on an adaptive thresholding algorithm to obtain target point cloud data of the developing marker; determining the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data; determining the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information; and completing the robot registration operation using the target homogeneous transformation matrix. The method provided in this application achieves robot registration in a magnetic resonance environment. Simultaneously, by combining an adaptive thresholding algorithm, it achieves noise reduction processing of the magnetic resonance image, improving the accuracy of determining the point cloud data of the developing marker, thereby improving the registration accuracy of the robot.
[0012] In one possible implementation of the first aspect, acquiring a target magnetic resonance image of a imaging marker mounted on a robot to be registered includes:
[0013] The robot is controlled to move the developing marker into the magnetic resonance coil of the magnetic resonance equipment;
[0014] Acquire multiple initial magnetic resonance images generated by magnetic resonance scanning of the imaging marker using a magnetic resonance device;
[0015] From multiple initial magnetic resonance images, the image in which the imaging marker is located in the central region is selected as the target magnetic resonance image.
[0016] In the above embodiments, since the display marker is located in the central region of the target magnetic resonance image, the subsequent control device only needs to use the adaptive threshold algorithm to perform image segmentation processing on the central region of the target magnetic resonance image, thereby improving processing efficiency.
[0017] In one embodiment of the first aspect, determining the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data includes:
[0018] Determine the first centroid of the target point cloud data;
[0019] Subtract the coordinates of the first centroid from the coordinates of each point in the target point cloud data to obtain the first point cloud data;
[0020] The location information is calculated based on the first point cloud data and the second point cloud data. The second point cloud data is the point cloud data obtained by subtracting the coordinates of the second centroid from the coordinates of each point contained in the reference point cloud data. The reference point cloud data is the point cloud data of the pre-calibrated developing marker in the magnetic resonance coordinate system, and the second centroid is the centroid of the reference point cloud data in the magnetic resonance coordinate system.
[0021] In the above embodiments, the final location information of the developing marker is determined by combining the first point cloud data obtained from the target point cloud data and the second point cloud data obtained from the reference point cloud data, thereby improving the accuracy of determining the location information of the developing marker.
[0022] In one embodiment of the first aspect, determining the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on position information includes:
[0023] Obtain information about the robot's environment;
[0024] Based on the scene information, determine the calculation method for the target homogeneous transformation matrix;
[0025] Based on the location information, the homogeneous transformation matrix of the target is calculated.
[0026] In the above implementation, the calculation method of the target homogeneous transformation matrix is flexibly determined by combining the scene information of the robot, thereby improving the accuracy of determining the target homogeneous transformation matrix, so as to achieve robot registration that matches the scene information in the future.
[0027] In one implementation of the first aspect, determining the calculation method of the target homogeneous transformation matrix based on scene information includes:
[0028] Based on the scenario information, determine whether the robot should be placed on the designated component for an extended period of time;
[0029] If the robot is placed on the designated component for a long period of time, the calculation method is determined to be the first method of performing multiple magnetic resonance scans on the developing markers;
[0030] If the robot is not placed on the designated component for an extended period, the calculation method is determined to be the second method, which involves performing a single magnetic resonance scan on the developing marker.
[0031] In the above embodiments, the method for flexibly determining the calculation of the target homogeneous transformation matrix based on whether the robot is placed on a designated component of the magnetic resonance device for a long period of time further improves the accuracy of determining the target homogeneous transformation matrix.
[0032] In one embodiment of the first aspect, the target homogeneous transformation matrix is calculated based on the location information using a computational method, including:
[0033] If the calculation method is the first method, then count the number of magnetic resonance scans of the imaging markers;
[0034] If the number of magnetic resonance scans is greater than the set number, the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system is calculated based on the position information obtained from the last magnetic resonance scan of the developing marker.
[0035] Based on the robot's forward kinematics, coordinate transformation is performed on the first homogeneous transformation matrix to obtain the target homogeneous transformation matrix.
[0036] In the above embodiments, when the robot needs to be placed on a designated component for a long period of time, the control device can control the magnetic resonance equipment to scan the developing marker multiple times to improve the registration accuracy of the robot.
[0037] In one embodiment of the first aspect, the target homogeneous transformation matrix is calculated based on the location information using a computational method, including:
[0038] If the calculation method is the second method, then the attitude information of the developing marker is obtained;
[0039] Based on the position and orientation information, determine the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system;
[0040] Based on the robot's forward kinematics, coordinate transformation is performed on the second homogeneous transformation matrix to obtain the target homogeneous transformation matrix.
[0041] In the above embodiments, when the robot does not need to be placed on the designated component for a long time, the control device can control the magnetic resonance equipment to perform a single scan of the developing marker, so as to improve the registration rate of the robot.
[0042] Secondly, embodiments of this application provide a robot registration device, comprising:
[0043] The first acquisition unit is used to acquire the target magnetic resonance image of the developing marker installed on the robot to be registered, wherein the robot is placed on a designated component of the magnetic resonance device used to generate the magnetic resonance image;
[0044] The processing unit is used to perform image segmentation processing on the target magnetic resonance image based on an adaptive threshold algorithm to obtain the target point cloud data of the developing markers;
[0045] The first position determination unit is used to determine the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data.
[0046] The first matrix determination unit is used to determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information.
[0047] The registration unit is used to complete the registration operation of the robot using the target homogeneous transformation matrix.
[0048] In one embodiment of the second aspect, the first acquisition unit specifically includes:
[0049] The control unit is used to control the robot to move the developing marker into the magnetic resonance coil of the magnetic resonance equipment;
[0050] The second acquisition unit is used to acquire multiple initial magnetic resonance images generated by magnetic resonance scanning of the developing marker using a magnetic resonance device.
[0051] The selection unit is used to select the image in which the imaging marker is located in the central region from multiple initial magnetic resonance images as the target magnetic resonance image.
[0052] In one embodiment of the second aspect, the first position determining unit specifically includes:
[0053] Centroid determination unit, used to determine the first centroid of the target point cloud data;
[0054] The subtraction unit is used to subtract the coordinates of the first centroid from the coordinates of each point in the target point cloud data to obtain the first point cloud data.
[0055] The second position determination unit is used to calculate position information based on the first point cloud data and the second point cloud data. The second point cloud data is the point cloud data obtained by subtracting the coordinates of the second centroid from the coordinates of each point contained in the reference point cloud data. The reference point cloud data is the point cloud data of the pre-calibrated developing marker in the magnetic resonance coordinate system, and the second centroid is the centroid of the reference point cloud data in the magnetic resonance coordinate system.
[0056] In one embodiment of the second aspect, the first matrix determining unit specifically includes:
[0057] The third acquisition unit is used to acquire scene information where the robot is located;
[0058] The first method determines the unit, which is used to determine the calculation method of the target homogeneous transformation matrix based on the scene information;
[0059] The second matrix determination unit is used to calculate the target homogeneous transformation matrix based on the position information.
[0060] In one embodiment of the second aspect, the first method determining unit specifically includes:
[0061] The robot determination unit is used to determine whether the robot should be placed on a designated component for an extended period of time, based on scene information.
[0062] The second method determination unit is used to determine the calculation method as the first method of performing multiple magnetic resonance scans on the developing marker if the robot is placed on the designated component for a long period of time.
[0063] The third method determination unit is used to determine the calculation method as the second method of performing a single magnetic resonance scan on the developing marker if the robot is not placed on the designated component for a long period of time.
[0064] In one embodiment of the second aspect, the second matrix determining unit specifically includes:
[0065] The statistical unit is used to count the number of magnetic resonance scans of the imaging markers if the calculation method is the first method.
[0066] The calculation unit is used to calculate the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system based on the position information obtained from the last magnetic resonance scan of the imaging marker if the number of magnetic resonance scans is greater than a set number.
[0067] The first transformation unit is used to perform coordinate transformation on the first homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix.
[0068] In one embodiment of the second aspect, the second matrix determining unit specifically includes:
[0069] The fourth acquisition unit is used to acquire the attitude information of the developing marker if the calculation method is the second method.
[0070] The third matrix determination unit is used to determine the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system based on the position information and attitude information.
[0071] The second transformation unit is used to perform coordinate transformation on the second homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix.
[0072] Thirdly, embodiments of this application provide a control device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the robot registration method as described in any one of the first aspects above.
[0073] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robot registration method as described in any one of the first aspects above.
[0074] Fifthly, embodiments of this application provide a computer program product that, when run on a control device, enables the control device to execute the robot registration method described in any one of the first aspects. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a schematic diagram of the structure of a robot registration system provided in an embodiment of this application;
[0077] Figure 2 This is a schematic diagram of the installation of a developing marker provided in one embodiment of this application;
[0078] Figure 3 This is a schematic diagram of the structure of a developing marker provided in an embodiment of this application;
[0079] Figure 4 This is a flowchart illustrating the implementation of a robot registration method provided in an embodiment of this application;
[0080] Figure 5 This is a flowchart illustrating the implementation of a robot registration method provided in another embodiment of this application;
[0081] Figure 6 This is a flowchart illustrating the implementation of a robot registration method provided in another embodiment of this application;
[0082] Figure 7 This is a flowchart illustrating the implementation of a robot registration method according to another embodiment of this application;
[0083] Figure 8 This is a flowchart illustrating the implementation of a robot registration method according to another embodiment of this application;
[0084] Figure 9 This is a flowchart illustrating the overall implementation of a robot registration method provided in an embodiment of this application.
[0085] Figure 10 This is a schematic diagram of the structure of a robot registration device provided in one embodiment of this application;
[0086] Figure 11 This is a schematic diagram of the structure of a control device provided in an embodiment of this application. Detailed Implementation
[0087] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0088] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0089] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0090] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0091] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0092] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0093] In practical applications, with the continuous development of medical technology, the use of surgical robots for assisted surgery is becoming increasingly common. For example, surgical robots are used for assisted puncture procedures. To improve the accuracy of these surgeries, it is usually necessary to register the surgical robot with the operating table coordinates. However, due to the special nature of the magnetic resonance environment, traditional robot registration methods, such as optical registration and magnetic navigation registration, cannot be used in a magnetic resonance environment. Therefore, to achieve robot registration in a magnetic resonance environment, in all embodiments of this application, the control device can acquire the target magnetic resonance image of the imaging marker mounted on the robot to be registered, and achieve robot registration based on the target magnetic resonance image of the imaging marker.
[0094] It should be noted that the specific details of how the control device achieves robot registration using the target magnetic resonance image of the aforementioned display markers can be found in the detailed explanation of the robot registration method shown in the figure below, and will not be elaborated upon here.
[0095] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a robot registration system provided in one embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. Figure 1 As shown, the robot registration system 1 includes a robot 10, a registration base 20, multiple display markers 30 (only four are shown in the figure), a magnetic resonance imaging (MRI) device 40, and a control device 50. The control device 50 is communicatively connected to both the robot 10 and the MRI device 40. This communication connection can be wired or wireless. The control device 50 includes a central processing unit (CPU).
[0096] In this embodiment, the robot 10 is mounted on a designated component of the magnetic resonance imaging (MRI) device 40. The designated component includes, but is not limited to, the MRI bed plate or the main magnet.
[0097] It should be noted that, in order to avoid movement after robot registration, which could lead to registration errors, the robot needs to be fixed to the aforementioned designated components.
[0098] The registration base 20 has multiple mounting holes and multiple mounting positions. Each mounting hole is used to connect with a mounting position in a designated area of the robot 10, that is, the registration base 20 is installed onto the designated area of the robot through the multiple mounting holes. The designated area can be determined according to actual needs and is not limited here. For example, the designated area can be the joint base of the robot 10.
[0099] Each mounting position is used to mount one developer marker 30.
[0100] In this embodiment, the control device 50 controls the robot 10 to insert a predetermined number of developing markers 30 mounted on the registration base 20 into the magnetic resonance coil of the magnetic resonance device 40, so as to enable the magnetic resonance device 40 to perform magnetic resonance scanning on the predetermined number of developing markers 30 and obtain a target magnetic resonance image containing the developing markers 30. The predetermined number can be determined according to actual needs and is not limited here.
[0101] In some possible embodiments, the number can be set to four in order to improve the registration accuracy of the robot.
[0102] Then, the control device 50 can register the robot in a magnetic resonance environment based on the target magnetic resonance image obtained above.
[0103] Please see Figure 2 , Figure 2 This is a schematic diagram of the installation of a developing marker provided in one embodiment of this application. Figure 2 As shown, the registration base 20 includes multiple mounting holes 21 (only six are shown in the figure) and multiple mounting positions 22 (only eight are shown in the figure). It should be noted that... Figure 2 There are four mounting positions 22 located on the back of the registration base 20. The back of the registration base 20 refers to the side opposite to the front of the registration base 20, and the front of the registration base 20 refers to... Figure 2 The registration base 20 has a side with multiple mounting holes 21.
[0104] In one embodiment of this application, to further improve the registration accuracy of the robot, the plurality of developing markers 30 mounted on the registration base 20 need to form a cubic structure (e.g., Figure 2 As shown in the figure, multiple developing markers 30 need to be on at least two planes.
[0105] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a developing marker provided in an embodiment of this application. For example... Figure 3 As shown, the developing marker 30 includes: a bottle cap 31, a sealing ring 32, and a spherical bottle 33.
[0106] In this embodiment, the bottle cap 31 includes a first structure 311 and a second structure 312. The diameter of the first structure 311 is larger than the diameter of the second structure 312.
[0107] The first structure 311 is provided with a first external thread 3111 for screwing into the mounting hole on the registration base 20.
[0108] The second structure 312 is provided with a second external thread 312 for screwing into the opening of the spherical bottle 33.
[0109] In practical applications, the bottle cap 31 can be a bottle cap made of plastic.
[0110] The sealing ring 32 is located between the bottle cap 31 and the spherical bottle 33 to seal the bottle cap 31 and the spherical bottle 33, preventing the fluid or solidified fluid inside the spherical bottle 33 from leaking out.
[0111] In practical applications, the sealing ring 32 can be a sealing ring made of rubber.
[0112] The spherical bottle 33 is used to hold a fluid or solidified fluid that can be clearly seen under magnetic resonance imaging, so that the imaging marker 30 can form a spherical bright area in magnetic resonance imaging for robotic registration. The fluid or solidified fluid includes, but is not limited to, water, hydrolyzed salt solutions such as copper sulfate, silicone oil, or gels.
[0113] In practical applications, the spherical bottle 33 can be a hollow spherical container made of plastic.
[0114] In one embodiment of this application, the outer surface of the spherical bottle 33 is provided with a reflective coating, so that the control device 50 can acquire an image containing the developing marker 30 through a photographic device wirelessly connected to it, and perform assisted positioning of the developing marker 30 based on the image. The photographic device includes, but is not limited to, a camera.
[0115] Please see Figure 4 , Figure 4 This is a flowchart illustrating the implementation of a robot registration method according to an embodiment of this application. In this embodiment, the execution entity of the robot registration method is a control device 50. The control device can be a desktop computer, a computer, or other device equipped with a central processing unit.
[0116] like Figure 4 As shown, a robot registration method provided in one embodiment of this application may include S101 to S105, which are described in detail below:
[0117] In S101, a target magnetic resonance image of a developing marker mounted on a robot to be registered is acquired. The robot is placed on a designated component of a magnetic resonance device used to generate the magnetic resonance image.
[0118] In practical applications, the use of surgical robots for assisted surgery is becoming increasingly common. For example, surgical robots are used to assist in puncture procedures. Therefore, in an MRI environment, before surgical deployment, the user can trigger robot registration commands for the control equipment. These robot registration commands instruct the control equipment to register the robot with a specified component mounted on the MRI machine.
[0119] In this embodiment, the detection of a robot registration instruction by the control device may include detecting the execution of a preset operation. The preset operation can be determined according to actual needs and is not limited here. For example, the preset operation may be: a preset control on the control device is clicked; that is, if the control device detects that a preset control on itself is clicked, it considers that a preset operation has been executed. Of course, the preset operation can also be a time-triggered operation. The control device may have a corresponding workflow during operation, which includes trigger nodes for multiple key events. These key events include events related to robot registration. In this case, if the control device detects that a trigger node associated with the robot registration event has been reached, it executes steps S101 to S105 to perform the robot registration operation.
[0120] Based on this, after detecting the robot registration command, the control device can acquire the target magnetic resonance image of the imaging marker installed on the robot to be registered.
[0121] It should be noted that the target magnetic resonance image mentioned above can be a magnetic resonance image that includes all imaging markers mounted on the registration base.
[0122] In one embodiment of this application, the control device can acquire the target magnetic resonance image of the developing marker in real time through a magnetic resonance device that is communicatively connected to it.
[0123] In another embodiment of this application, in order to improve the processing efficiency of the subsequent control device in image segmentation of the target magnetic resonance image, the control device can specifically obtain the target magnetic resonance image according to the following steps, detailed below:
[0124] The robot is controlled to move the developing marker into the magnetic resonance coil of the magnetic resonance equipment;
[0125] Acquire multiple initial magnetic resonance images generated by magnetic resonance scanning of the imaging marker using a magnetic resonance device;
[0126] From multiple initial magnetic resonance images, the image in which the imaging marker is located in the central region is selected as the target magnetic resonance image.
[0127] In this embodiment, in order to ensure that the developing marker is completely scanned and developed by magnetic resonance, the control device can control the robot to move the developing marker into the magnetic resonance coil of the magnetic resonance device.
[0128] Afterward, the control equipment can acquire multiple initial magnetic resonance images containing the imaging markers.
[0129] In practical applications, when the high-signal image of the developing marker is concentrated in the central region of the magnetic resonance image, the control device can directly discard the pixels in the magnetic resonance image other than the central region and directly use the adaptive threshold algorithm to perform image segmentation on the image in the central region to improve processing efficiency. Therefore, in this embodiment, the control device can select the image in the central region of the developing marker as the target magnetic resonance image from multiple initial magnetic resonance images.
[0130] It should be noted that the target magnetic resonance image can be a single image or multiple images.
[0131] In S102, the target magnetic resonance image is processed by image segmentation based on an adaptive threshold algorithm to obtain the target point cloud data of the developing marker.
[0132] In this embodiment of the application, after obtaining the target magnetic resonance image, the control device can perform image segmentation processing on the target magnetic resonance image based on an adaptive threshold algorithm to obtain the target point cloud data of the developing marker.
[0133] In practical applications, adaptive thresholding algorithms can automatically adjust the threshold based on the features of an image, thereby achieving image binarization.
[0134] Specifically, after obtaining the target magnetic resonance image, the control device can perform a linear transformation on all pixel values in the target magnetic resonance image, that is, convert all pixel values in the target magnetic resonance image into an array of pixel values from 0 to 255, so as to subsequently determine the threshold of each pixel value.
[0135] After the control device normalizes the pixel value array, the imaging markers in the target magnetic resonance image are located in the central region of the image. Therefore, the control device can discard the outermost pixels in the target magnetic resonance image and directly determine the threshold of each pixel value in the central region by using the multiple pixel values surrounding each pixel value in the central region.
[0136] For example, suppose the pixel matrix has m rows and n columns, the pixel array is P(i,j), i∈(0,m), j∈(0,n), and the threshold array is T(i,j), i∈(0,m), j∈(0,n). Since the target magnetic resonance image contains low-signal regions except for the central region, the control device can determine that the threshold for the above low-signal regions is 0, as shown below:
[0137]
[0138] In one embodiment of this application, the control device may specifically determine the threshold values of each pixel in the central region of the target magnetic resonance image according to the following formula:
[0139]
[0140] Where P(i,j) represents the pixel value in the i-th row and j-th column of the target magnetic resonance image, T(i+1,j+1) represents the threshold value of the pixel value in the (i+1)-th row and j+1-th column of the target magnetic resonance image, and a represents a constant. The constant a can be determined according to actual needs and is not restricted here.
[0141] In this embodiment, after obtaining the threshold values of each pixel value in the central region of the target magnetic resonance image, the control device can segment the pixel values in the central region according to the threshold values, and construct a target pixel matrix from the target pixel values whose pixel values are greater than the set threshold. The target pixel matrix is then transformed to obtain the target point cloud data of the developing marker. The set threshold can be determined according to actual needs and is not limited here.
[0142] In one embodiment of this application, the control device can specifically segment the pixel values of the central region according to the following formula:
[0143] P(i,j)=255, P(i,j)≥T(i,j)
[0144] P(i,j)=0,P(i,j) <T(i,j);
[0145] Where P(i,j) represents the pixel value in the i-th row and j-th column of the target magnetic resonance image, and T(i,j) represents the threshold value of the pixel value in the i-th row and j-th column of the target magnetic resonance image.
[0146] Based on this, the control device can perform point cloud conversion on the target pixel matrix composed of multiple pixel values equal to 255 to obtain the target point cloud data of the developing marker.
[0147] In S103, the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance equipment is determined based on the target point cloud data.
[0148] In this embodiment of the application, after obtaining the target point cloud data, the control device can acquire the reference point cloud data and use a point cloud registration algorithm to process the target point cloud data and the reference point cloud data to obtain the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device.
[0149] It should be noted that the reference point cloud data is the point cloud data of the pre-calibrated developing markers.
[0150] In practical applications, the Point Cloud Registration (PCR) algorithm refers to taking two sets of point cloud data Ps (source) and Pt (target) as input and outputting a transformation T (i.e., rotation R and translation t) such that T(Ps) and Pt have the highest possible overlap. Here, Ps is the target point cloud data in this embodiment, and Pt is the reference point cloud data. Point cloud registration algorithms include, but are not limited to, the Iterative Closest Point (ICP) algorithm. The ICP algorithm can be solved based on Singular Value Decomposition (SVD).
[0151] Based on this, in one embodiment of this application, in order to improve the accuracy of determining the location information of the developing markers, the control device can specifically achieve the following: Figure 5 Steps S201 to S203, which determine the location information of the developing markers, are described in detail below:
[0152] In S201, the first centroid of the target point cloud data is determined.
[0153] In S202, the coordinates of the first centroid are subtracted from the coordinates of each point in the target point cloud data to obtain the first point cloud data.
[0154] In S203, position information is calculated based on the first point cloud data and the second point cloud data. The second point cloud data is the point cloud data obtained by subtracting the coordinates of the second centroid from the coordinates of each point contained in the reference point cloud data. The reference point cloud data is the point cloud data of the pre-calibrated developing marker, and the second centroid is the centroid of the reference point cloud data.
[0155] In this embodiment, since each point in the target point cloud data has coordinates and a weight (usually 1), the control device can obtain the first centroid of the target point cloud data by calculating the weighted average of all points in the target point cloud data.
[0156] In practical applications, by removing the centroid of point cloud data, multiple sets of point cloud data can be transformed to the same coordinate system, thereby achieving data alignment. Therefore, in this embodiment, the control device can subtract the coordinates of the first centroid from the coordinates of each point contained in the target point cloud data to obtain the first point cloud data.
[0157] In this embodiment, the control device can also perform centroid removal processing on the reference point cloud data according to the above-described method for obtaining the first point cloud data, so as to obtain the second point cloud data corresponding to the reference point cloud data.
[0158] Based on this, the control device can process the first point cloud data and the second point cloud data using the iterative nearest point algorithm to obtain the location information of the developing marker.
[0159] Specifically, the control device can calculate the first rotation matrix based on the first point cloud data and the second point cloud data, as shown below:
[0160]
[0161] We can get:
[0162]
[0163] Since the first term in the above equation is independent of the first rotation matrix, the second term is due to R T R = I, which is also independent of the first rotation matrix. Therefore, the control device can simplify the above equation to:
[0164]
[0165] Then, matrix W is defined as:
[0166]
[0167] Then, the control device performs singular value decomposition on W, obtaining:
[0168] [U,S,V]=SVD(W);
[0169] Finally, the control device calculates the first rotation matrix using the left singular matrix U and the right singular matrix V:
[0170] R1 = UV T ;
[0171] Where R1 represents the first rotation matrix, q i Let q represent the coordinates of the i-th point in the first point cloud data. i ′ represents the coordinates of the i-th point in the second point cloud data.
[0172] In this embodiment, the first rotation matrix is used to characterize the orientation information of the developing marker.
[0173] Based on this, the control device can calculate the first position matrix of the developing marker according to the first rotation matrix, the first centroid, and the second centroid, thus obtaining the position information of the developing marker.
[0174] In this embodiment, the first position matrix is used to characterize the position information of the developing markers.
[0175] In one embodiment of this application, the control device can specifically calculate the first position matrix of the developing markers according to the following formula:
[0176] t = p - R1p ′ ;
[0177] Where t1 represents the first position matrix, R1 represents the first rotation matrix, and p represents the first centroid. ′ This represents the second centroid.
[0178] In S104, based on the position information, the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system is determined.
[0179] In this embodiment of the application, after obtaining the position information of the developing marker, the control device can determine the homogeneous transformation matrix of the robot base coordinate system in the magnetic resonance coordinate system based on the position information, and then determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the homogeneous transformation matrix.
[0180] In one embodiment of this application, in order to meet the registration requirements of the robot in different scenarios and obtain target homogeneous transformation matrices that match each scenario, thereby improving the accuracy of determining the target homogeneous transformation matrix, the control device can specifically achieve the following: Figure 6 Steps S301 to S303, which determine the target homogeneous transformation matrix, are described in detail below:
[0181] In S301, the scene information of the robot is obtained.
[0182] In this embodiment, scene information is used to characterize the specific usage scenario of the robot. Specific usage scenarios include, but are not limited to: surgical scenarios requiring routine deployment and scenarios requiring non-routine deployment and emergency surgery.
[0183] In one implementation of this embodiment, the control device can acquire real-time scene information of the robot's location through a shooting device wirelessly connected to it. The shooting device includes, but is not limited to, cameras and video cameras.
[0184] In S302, the calculation method of the target homogeneous transformation matrix is determined based on the scene information.
[0185] In this embodiment, after obtaining the scene information of the robot, the control device can determine whether the robot needs to be placed on a designated location for a long time, and then determine the calculation method of the homogeneous transformation matrix of the target based on whether the robot needs to be placed on a designated location for a long time.
[0186] It should be noted that the calculation methods include, but are not limited to, the first method of performing multiple magnetic resonance scans on the developing marker and the second method of performing a single magnetic resonance scan on the developing marker.
[0187] Based on this, in one embodiment of this application, in order to further improve the accuracy of determining the target homogeneous transformation matrix, the control device can specifically determine the calculation method of the target homogeneous transformation matrix according to the following steps, detailed below:
[0188] Based on the scenario information, determine whether the robot is to be placed on the designated component for an extended period of time;
[0189] If the robot is placed on the designated component for a long period of time, then the calculation method is determined to be the first method of performing multiple magnetic resonance scans on the imaging marker;
[0190] If the robot is not placed on the designated component for an extended period, then the calculation method is determined to be the second method of performing a single magnetic resonance scan on the imaging marker.
[0191] In this embodiment, when the control device detects that the robot needs to be placed on a designated component for a long period of time, it indicates that the robot is in a surgical scenario with normal deployment. In other words, the registration requirement for the robot at this time is registration accuracy. Therefore, the control device can determine the first method for calculating the homogeneous transformation matrix of the target.
[0192] When the control device detects that the robot does not need to be placed on the designated component for a long time, it indicates that the robot is in an abnormal deployment and needs to be operated on urgently. In other words, the registration requirement for the robot at this time is the registration rate. Therefore, the control device can determine that the calculation method for the homogeneous transformation matrix of the target is the second method.
[0193] In S303, the target homogeneous transformation matrix is calculated based on the position information.
[0194] In this embodiment, in conjunction with S302, based on different registration requirements for the robot, the control device can process the position information of the developing markers using different calculation methods to obtain a target homogeneous transformation matrix that meets different registration requirements.
[0195] In one embodiment of this application, when the calculation method is the first method, in order to improve the registration accuracy of the robot, the control device can specifically achieve the following: Figure 7 Steps S401 to S403 shown above yield the target homogeneous transformation matrix, which is detailed below:
[0196] In S401, if the calculation method is the first method, the number of magnetic resonance scans of the imaging markers is counted.
[0197] In S402, if the number of magnetic resonance scans is greater than the set number, the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system is calculated based on the position information obtained from the last magnetic resonance scan of the developing marker.
[0198] In S403, based on the robot's forward kinematics, the first homogeneous transformation matrix is processed by coordinate transformation to obtain the target homogeneous transformation matrix.
[0199] In this embodiment, when the control device determines that the calculation method is the first method, it indicates that the registration requirement for the robot is the registration accuracy. Therefore, the control device needs to count the number of magnetic resonance scans of the developing marker at this time.
[0200] It should be noted that after each magnetic resonance scan of the developing marker, the control equipment needs to determine the position information of the developing marker under this magnetic resonance scan according to steps S101 to S103. This position information can be represented using Cartesian coordinates.
[0201] Based on this, after obtaining the number of magnetic resonance scans, the control device can compare this number with a preset number. The preset number can be determined according to actual needs and is not limited here.
[0202] In one embodiment of this application, when the control device detects that the number of magnetic resonance scans is less than or equal to the set number, it indicates that the number of magnetic resonance scans on the developing marker does not meet the scanning requirements. Therefore, the control device needs to continue to control the magnetic resonance device to perform magnetic resonance scans on the developing marker and continue to execute steps S101 to S103 until the number of magnetic resonance scans is greater than the set number.
[0203] In another embodiment of this application, when the control device detects that the number of magnetic resonance scans is greater than the set number, it indicates that the number of magnetic resonance scans on the developing marker meets the scanning requirements. Therefore, the control device calculates the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system based on the position information obtained from the last magnetic resonance scan of the developing marker.
[0204] Specifically, the control device can determine the first centroid of the target point cloud data and the third centroid of the developing marker in the robot's base coordinate system.
[0205] Then, the control device can subtract the coordinates of the first centroid from the coordinates of each point in the target point cloud data to obtain the first point cloud data, and subtract the coordinates of the third centroid from the coordinates of each point in the third point cloud data to obtain the fourth point cloud data. Based on the first and fourth point cloud data, the target matrix is then obtained.
[0206]
[0207] Where H represents the target matrix, This indicates the first point of cloud data. This refers to the third point, cloud data, Centroid. Bed Centroid represents the first centroid. Base This represents the third centroid.
[0208] Then, the control device can perform singular value decomposition on the target matrix H to obtain the left singular matrix U and the right singular matrix V:
[0209] [U,S,V]=SVD(H);
[0210] The control device can calculate the second rotation matrix using matrices U and V:
[0211] R2 = UV T ;
[0212] Subsequently, the control device can calculate the second position matrix based on the second rotation matrix, the first centroid, and the third centroid:
[0213] t2 = -R2·centroid Base +centroid MRI ;
[0214] Subsequently, the control device can combine the second rotation matrix and the second position matrix to obtain the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system:
[0215]
[0216] Finally, the control device can perform coordinate transformation on the first homogeneous transformation matrix using the robot's forward kinematics to obtain the target homogeneous transformation matrix:
[0217]
[0218] Where R2 represents the second rotation matrix, and t2 represents the second position matrix. Let the first homogeneous transformation matrix be represented. This represents the third homogeneous transformation matrix of the robot's end-effector coordinate system in the robot's base coordinate system. This represents the target homogeneous transformation matrix.
[0219] In another embodiment of this application, when the calculation method is the second method, in order to improve the registration efficiency of the robot, the control device can specifically be configured as follows: Figure 8 Steps S501 to S503 shown above yield the target homogeneous transformation matrix, which is detailed below:
[0220] In S501, if the calculation method is the second method, the orientation information of the developing marker is obtained.
[0221] In S502, the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system is determined based on the position and attitude information.
[0222] In S503, based on the robot's forward kinematics, coordinate transformation is performed on the second homogeneous transformation matrix to obtain the target homogeneous transformation matrix.
[0223] In this embodiment, when the control device determines that the calculation method is the first method, it indicates that the registration requirement for the robot is the registration rate. Therefore, the control device can determine the second homogeneous transformation matrix of the developed marker in the magnetic resonance coordinate system based on the position information of the developed marker obtained after this magnetic resonance scan and the attitude information of the developed marker.
[0224] In one implementation of this embodiment, by combining S201 to S203, the control device can calculate the first rotation matrix of the developing marker based on the first point cloud data and the second point cloud data, thereby obtaining the attitude information of the developing marker.
[0225] In this embodiment, the first rotation matrix is used to characterize the orientation information of the developing marker.
[0226] Then, the control equipment can calculate the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system according to the following formula:
[0227]
[0228] in, Let R1 denote the second homogeneous transformation matrix, R1 denote the first rotation matrix, and t1 denote the first position matrix.
[0229] Based on this, the control device can use the robot's forward kinematics to perform coordinate transformation on the second homogeneous transformation matrix to obtain the target homogeneous transformation matrix:
[0230]
[0231] in, Represents the target homogeneous transformation matrix. Let represent the first transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system. This represents the third homogeneous transformation matrix of the robot's end-effector coordinate system in the robot's base coordinate system. This represents the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system. This indicates that the robot's base coordinate system is transformed into the fourth homogeneous transformation matrix under the developing marker.
[0232] In S105, the registration operation of the robot is completed using the target homogeneous transformation matrix.
[0233] In this embodiment, after obtaining the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system, the control device can determine the position of the robot's end-effector based on the target homogeneous transformation matrix to complete the robot's registration operation.
[0234] As can be seen from the above, the robot registration method provided in this application involves acquiring a target magnetic resonance image of a developing marker mounted on a robot to be registered; performing image segmentation processing on the target magnetic resonance image based on an adaptive threshold algorithm to obtain target point cloud data of the developing marker; determining the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data; determining the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information; and completing the robot registration operation using the target homogeneous transformation matrix. The method provided in this application achieves robot registration in a magnetic resonance environment. Simultaneously, by combining an adaptive threshold algorithm, it achieves noise reduction processing of the magnetic resonance image, improving the accuracy of determining the point cloud data of the developing marker, thereby improving the registration accuracy of the robot.
[0235] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0236] Please see Figure 9 , Figure 9 This is an overall flowchart of a robot registration method provided in an embodiment of this application. Figure 9 As shown, after detecting the robot registration command and confirming that the robot has been placed on the magnetic resonance imaging (MRI) bed, i.e., after executing step S601, the control device can continue to execute step S602, which involves controlling the robot to insert the developing marker into the MRI coil of the MRI device. Then, the control device can execute step S603, which involves controlling the MRI device to perform MRI scanning on the developing marker to obtain a target MRI image. Next, the control device can execute step S603, which involves performing image segmentation processing on the target MRI image based on an adaptive thresholding algorithm to obtain the target point cloud data of the developing marker. Afterward, the control device can continue to execute step S605, which involves processing the target point cloud data and the reference point cloud data using a point cloud registration algorithm (such as the ICP algorithm) to obtain the position information of the developing marker.
[0237] After obtaining the location information of the developing marker, the control device can execute step S606, which is to detect whether the robot needs to be placed on the designated component for a long period of time.
[0238] In one embodiment of this application, when the control device detects that the robot needs to be placed on a designated component for an extended period, the control device can use a multiple registration method, such as... Figure 7 The first method corresponding to the embodiment shown is used to register the robot.
[0239] Specifically, the control device can execute step S607, which is to count the number of magnetic resonance scans of the developing markers; then, the control device can execute step S608, which is to detect whether the number of magnetic resonance scans is greater than the set number.
[0240] On the one hand, when the control device detects that the number of magnetic resonance scans is less than or equal to the set number, the control device can return to the execution steps S603 to S608 until the number of magnetic resonance scans is greater than the set number.
[0241] On the other hand, when the control device detects that the number of magnetic resonance scans exceeds a set value, the control device can execute step S609, which calculates the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system based on the position information obtained from the last magnetic resonance scan of the imaging marker. Then, the control device can execute step S6010, which performs coordinate transformation processing on the first homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix. Finally, the control device can execute step S6014, which uses the target homogeneous transformation matrix to complete the robot's registration operation.
[0242] In another embodiment of this application, when the control device detects that the robot does not need to be placed on the designated component for an extended period, the control device can use a single registration method, i.e., as... Figure 8 The second method corresponding to the embodiment shown is used to register the robot.
[0243] Specifically, the control device can execute step S6011, which is to acquire the orientation information of the developing marker; then, the control device can execute step S6012, which is to determine the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system based on the position and orientation information of the developing marker; then, the control device can execute step S6013, which is to perform coordinate transformation processing on the second homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix; finally, the control device can execute step S6014, which is to complete the robot's registration operation using the target homogeneous transformation matrix.
[0244] Corresponding to the robot registration method described in the above embodiments, Figure 10A schematic diagram of a robot registration device according to an embodiment of this application is shown. For ease of explanation, only the parts relevant to the embodiment of this application are shown. (Refer to...) Figure 10 The robot registration device 700 includes: a first acquisition unit 71, a processing unit 72, a first position determination unit 73, a first matrix determination unit 74, and a registration unit 75. Wherein:
[0245] The first acquisition unit 71 is used to acquire the target magnetic resonance image of the developing marker installed on the robot to be registered, wherein the robot is placed on a designated component of the magnetic resonance device used to generate the magnetic resonance image.
[0246] The processing unit 72 is used to perform image segmentation processing on the target magnetic resonance image based on an adaptive threshold algorithm to obtain the target point cloud data of the developing marker.
[0247] The first position determination unit 73 is used to determine the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data.
[0248] The first matrix determination unit 74 is used to determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information.
[0249] The registration unit 75 is used to complete the registration operation of the robot using the target homogeneous transformation matrix.
[0250] In one embodiment of this application, the first acquisition unit 71 specifically includes: a control unit, a second acquisition unit, and a selection unit. Wherein:
[0251] The control unit is used to control the robot to move the developing marker into the magnetic resonance coil of the magnetic resonance equipment.
[0252] The second acquisition unit is used to acquire multiple initial magnetic resonance images generated by magnetic resonance scanning of the developing marker using a magnetic resonance device.
[0253] The selection unit is used to select the image in which the imaging marker is located in the central region from multiple initial magnetic resonance images as the target magnetic resonance image.
[0254] In one embodiment of this application, the first position determination unit 73 specifically includes: a centroid point determination unit, a subtraction unit, and a second position determination unit. Wherein:
[0255] The centroid determination unit is used to determine the first centroid of the target point cloud data.
[0256] The subtraction unit is used to subtract the coordinates of the first centroid from the coordinates of each point in the target point cloud data to obtain the first point cloud data.
[0257] The second position determination unit is used to calculate position information based on the first point cloud data and the second point cloud data. The second point cloud data is the point cloud data obtained by subtracting the coordinates of the second centroid from the coordinates of each point contained in the reference point cloud data. The reference point cloud data is the point cloud data of the pre-calibrated developing marker in the magnetic resonance coordinate system, and the second centroid is the centroid of the reference point cloud data in the magnetic resonance coordinate system.
[0258] In one embodiment of this application, the first matrix determination unit specifically includes: a third acquisition unit, a first mode determination unit, and a second matrix determination unit. Wherein:
[0259] The third acquisition unit is used to acquire scene information where the robot is located.
[0260] The first method determination unit is used to determine the calculation method of the target homogeneous transformation matrix based on scene information.
[0261] The second matrix determination unit is used to calculate the target homogeneous transformation matrix based on the position information.
[0262] In one embodiment of this application, the first mode determination unit specifically includes: a robot determination unit, a second mode determination unit, and a third mode determination unit. Wherein:
[0263] The robot determination unit is used to determine whether the robot should be placed on a designated component for an extended period of time, based on scene information.
[0264] The second method determination unit is used to determine the calculation method as the first method of performing multiple magnetic resonance scans on the developing marker if the robot is placed on the designated component for a long period of time.
[0265] The third method determination unit is used to determine the calculation method as the second method of performing a single magnetic resonance scan on the developing marker if the robot is not placed on the designated component for a long period of time.
[0266] In one embodiment of this application, the second matrix determination unit specifically includes: a statistical unit, a calculation unit, and a first transformation unit. Wherein:
[0267] The statistical unit is used to count the number of magnetic resonance scans of the imaging markers if the calculation method is the first method.
[0268] The calculation unit is used to calculate the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system based on the position information obtained from the last magnetic resonance scan of the developing marker if the number of magnetic resonance scans is greater than a set number.
[0269] The first transformation unit is used to perform coordinate transformation on the first homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix.
[0270] In one embodiment of this application, the second matrix determination unit specifically includes: a fourth acquisition unit, a third matrix determination unit, and a second conversion unit. Wherein:
[0271] The fourth acquisition unit is used to acquire the orientation information of the developing marker if the calculation method is the second method.
[0272] The third matrix determination unit is used to determine the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system based on the position and attitude information.
[0273] The second transformation unit is used to perform coordinate transformation on the second homogeneous transformation matrix based on the robot's forward kinematics to obtain the target homogeneous transformation matrix.
[0274] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0275] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0276] Figure 11 This is a schematic diagram of the structure of a control device provided in one embodiment of this application. Figure 11 As shown, the control device 8 of this embodiment includes: at least one processor 80 ( Figure 11 (Only one is shown) a processor, a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, which, when executing the computer program 82, implements the steps in any of the robot registration method embodiments described above.
[0277] The control device may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that... Figure 11 This is merely an example of control device 8 and does not constitute a limitation on control device 8. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0278] The processor 80 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0279] In some embodiments, the memory 81 may be an internal storage unit of the control device 8, such as the RAM of the control device 8. In other embodiments, the memory 81 may be an external storage device of the control device 8, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the control device 8. Furthermore, the memory 81 may include both internal and external storage units of the control device 8. The memory 81 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 81 can also be used to temporarily store data that has been output or will be output.
[0280] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0281] This application provides a computer program product that, when run on a control device, enables the control device to perform the steps described in the above-described method embodiments.
[0282] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a control device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0283] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0284] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A robot registration method, characterized in that, include: Acquire a target magnetic resonance image of a development marker mounted on a robot to be registered, the robot being placed on a designated component of a magnetic resonance apparatus for generating the magnetic resonance image; the development marker comprises a plurality of markers, the plurality of markers forming a cubic structure such that the plurality of markers are positioned on at least two planes; The target magnetic resonance image is subjected to image segmentation processing based on an adaptive threshold algorithm to obtain the target point cloud data of the imaging marker; The developing marker is located in the central region of the target magnetic resonance image; The image segmentation process based on the adaptive threshold algorithm includes: performing a linear transformation on all pixel values in the target magnetic resonance image to obtain a pixel value array; normalizing the pixel value array, discarding the outermost pixels in the target magnetic resonance image, and determining the threshold of each pixel value in the central region based on multiple pixel values surrounding each pixel value in the central region; and segmenting each pixel value in the central region according to the threshold of each pixel value in the central region. Based on the target point cloud data, determine the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device; Based on the position information, determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system; The registration operation of the robot is completed using the target homogeneous transformation matrix.
2. The robot registration method as described in claim 1, characterized in that, The acquisition of the target magnetic resonance image of the imaging marker mounted on the robot to be registered includes: The robot is controlled to move the imaging marker into the magnetic resonance coil of the magnetic resonance device; Multiple initial magnetic resonance images are obtained by performing magnetic resonance scanning on the imaging marker using the magnetic resonance device; From the multiple initial magnetic resonance images, the image in which the imaging marker is located in the central region is selected as the target magnetic resonance image.
3. The robot registration method as described in claim 1, characterized in that, The step of determining the position information of the imaging marker in the magnetic resonance coordinate system corresponding to the magnetic resonance equipment based on the target point cloud data includes: Determine the first centroid of the target point cloud data; Subtract the coordinates of the first centroid from the coordinates of each point in the target point cloud data to obtain the first point cloud data. The location information is calculated based on the first point cloud data and the second point cloud data; the second point cloud data is the point cloud data obtained by subtracting the coordinates of the second centroid from the coordinates of each point contained in the reference point cloud data, the reference point cloud data is the point cloud data of the developing marker obtained by pre-calibration, and the second centroid is the centroid of the reference point cloud data.
4. The robot registration method according to any one of claims 1-3, characterized in that, Determining the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information includes: Obtain the scene information where the robot is located; Based on the scene information, determine the calculation method for the target homogeneous transformation matrix; The target homogeneous transformation matrix is calculated using the aforementioned calculation method based on the location information.
5. The robot registration method as described in claim 4, characterized in that, The step of determining the calculation method of the target homogeneous transformation matrix based on the scene information includes: Based on the scenario information, determine whether the robot is to be placed on the designated component for an extended period of time; If the robot is placed on the designated component for a long period of time, then the calculation method is determined to be the first method of performing multiple magnetic resonance scans on the imaging marker; If the robot is not placed on the designated component for an extended period, then the calculation method is determined to be the second method of performing a single magnetic resonance scan on the imaging marker.
6. The robot registration method as described in claim 5, characterized in that, The step of calculating the target homogeneous transformation matrix using the calculation method based on the location information includes: If the calculation method is the first method, then the number of magnetic resonance scans of the imaging marker is counted; If the number of magnetic resonance scans is greater than the set number, then the first homogeneous transformation matrix of the robot's base coordinate system in the magnetic resonance coordinate system is calculated based on the position information obtained from the last magnetic resonance scan of the imaging marker. Based on the robot's forward kinematics, the first homogeneous transformation matrix is subjected to coordinate transformation to obtain the target homogeneous transformation matrix.
7. The robot registration method as described in claim 5, characterized in that, The step of calculating the target homogeneous transformation matrix using the calculation method based on the location information includes: If the calculation method is the second method, then the attitude information of the developing marker is obtained; Based on the position information and the attitude information, determine the second homogeneous transformation matrix of the developing marker in the magnetic resonance coordinate system; Based on the robot's forward kinematics, the second homogeneous transformation matrix is subjected to coordinate transformation to obtain the target homogeneous transformation matrix.
8. A robot registration device, characterized in that, include: The first acquisition unit is used to acquire a target magnetic resonance image of a development marker mounted on a robot to be registered, wherein the robot is placed on a designated component of a magnetic resonance device for generating the magnetic resonance image; the development marker includes a plurality of development markers, which constitute a cubic structure such that the plurality of development markers are located on at least two planes. The processing unit is used to perform image segmentation processing on the target magnetic resonance image based on an adaptive threshold algorithm to obtain the target point cloud data of the imaging marker; The developing marker is located in the central region of the target magnetic resonance image; The image segmentation process based on the adaptive threshold algorithm includes: performing a linear transformation on all pixel values in the target magnetic resonance image to obtain a pixel value array; normalizing the pixel value array, discarding the outermost pixels in the target magnetic resonance image, and determining the threshold of each pixel value in the central region based on multiple pixel values surrounding each pixel value in the central region; and segmenting each pixel value in the central region according to the threshold of each pixel value in the central region. The first position determination unit is used to determine the position information of the developing marker in the magnetic resonance coordinate system corresponding to the magnetic resonance device based on the target point cloud data. The first matrix determination unit is used to determine the target homogeneous transformation matrix of the robot's end-effector coordinate system in the magnetic resonance coordinate system based on the position information. The registration unit is used to complete the registration operation of the robot using the target homogeneous transformation matrix.
9. A control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the robot registration method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the robot registration method as described in any one of claims 1 to 7.