A method for locating treatment targets of transcranial magnetic therapy device based on Optitrack
By pasting asymmetric infrared marking balls on the treatment instrument and using the Optitrack system to establish a rigid body coordinate system, calculating the transformation matrix and calibrating the treatment direction, high-precision real-time positioning of the transcranial magnetic therapy instrument treatment targets is achieved, and the problem of difficulty in positioning virtual points is solved, providing visual support for treatment.
Patent Information
- Application Number
- CN202210202638.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-03-02
AI Technical Summary
Existing positioning technologies are difficult to accurately locate the therapeutic targets of transcranial magnetic therapy instruments, especially virtual points where sensors or markers cannot be installed, making positioning difficult.
By pasting asymmetric multiple infrared marking balls on the side of the treatment instrument, using the Optitrack system to establish a rigid body coordinate system, calculate the coordinate system conversion matrix, calibrate the treatment source point and direction vector, and combine real-time positioning technology to achieve high-precision real-time positioning of the treatment target.
It realizes high-precision real-time positioning of the therapeutic target of transcranial magnetic therapy instrument, solves the problem of difficulty in positioning virtual points, and provides a visual basis for subsequent treatment.
Smart Images

Figure CN114452539B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of spatial positioning, and in particular relates to a therapeutic instrument target positioning method based on Optitrack. Background Art
[0002] OptiTrack is an optical system that achieves high-precision 3D reconstruction of marker points. Its main hardware is a smart camera equipped with a processor, which has a built-in high-precision marker processing algorithm. The 3D information of a single marker point can be used to create a rigid body and obtain six-degree-of-freedom data. Existing positioning technologies are mainly divided into wireless positioning and visual positioning. Wireless positioning requires wireless sensors, while visual positioning requires markers. When locating the target point, it is necessary to install positioning devices such as sensors or markers at the location of the target. The treatment target of the transcranial magnetic therapy device is a point in the normal direction of the front of the treatment device. It is a virtual point. Sensors or markers cannot be installed. It can only be located indirectly, which makes positioning difficult. Summary of the invention
[0003] In order to overcome the deficiencies in the prior art, the present invention is used for a transcranial magnetic stimulator, and the Optitrack camera group continuously locates the marker ball on the therapeutic instrument, and the real-time positioning of the therapeutic instrument and its therapeutic target is achieved through coordinate system transformation, specifically including:
[0004] (1) Paste the marker ball
[0005] Paste infrared marker balls on the side of the treatment instrument, install the marker balls in an asymmetrical position, and install more than three marker balls;
[0006] (2) Create a rigid body
[0007] In the Optitrack motion capture software, the marker ball on the treatment instrument is established as a rigid body asset, and the three-dimensional non-homogeneous coordinate value of the marker ball on the treatment instrument in the rigid body coordinate system is exported;
[0008] (3) Calculate the coordinate system transformation matrix
[0009] (3a) Fix the treatment instrument and use Optitrack to collect the three-dimensional non-homogeneous coordinate values of the marker ball of the treatment instrument in the world coordinate system;
[0010] (3b) calculating the transformation matrix from the world coordinate system to the rigid body coordinate system according to the coordinate values of the marker ball in the world coordinate system and the coordinate values in the rigid body coordinate system;
[0011] (4) Calibration of treatment source
[0012] (4a) using a collection probe to collect world coordinates twice on the front side of the treatment device, with the positions of the two collection points being symmetrical about the center point of the front side;
[0013] (4b) using a collection probe to collect world coordinates twice on the back side of the treatment instrument, with the positions of the two collection points being symmetrical about the center point of the back side;
[0014] (4c) using the transformation matrix obtained in step (3) to transform the coordinate values of the four acquisition points in the world coordinate system into the coordinate values in the rigid body coordinate system;
[0015] (4d) taking the average of the coordinate values in the four rigid body coordinate systems in step (4c) as the coordinate value of the treatment source point of the treatment instrument in the rigid body coordinate system;
[0016] (5) Calibrate the treatment direction vector
[0017] (5a) using the probe to collect coordinate values in the world coordinate system at any position on the front of the treatment instrument, and the number of collection times is more than three times;
[0018] (5b) using the transformation matrix obtained in step (3) to transform the coordinate values in the world coordinate system collected in step (5a) into coordinate values in the rigid body coordinate system;
[0019] (5c) fitting a three-dimensional plane equation according to the coordinate values in the rigid body coordinate system to obtain a fitting plane;
[0020] (5d) taking the normal vector of the fitting plane as the treatment direction vector of the treatment instrument in the rigid body coordinate system;
[0021] (6) Calculation of therapeutic targets
[0022] In the rigid body coordinate system, the treatment target is calculated according to the coordinate value of the treatment source point of the treatment instrument and the treatment direction vector;
[0023] (7) Real-time positioning
[0024] (7a) Use Optitrack to collect the three-dimensional coordinates and quaternion of the center of mass of the treatment instrument rigid body in real time;
[0025] (7b) construct a transformation matrix from the rigid body coordinate system to the world coordinate system using the rigid body mass center three-dimensional coordinates and quaternion;
[0026] (7c) According to the transformation matrix, the coordinates of the treatment source point and the treatment target point of the treatment instrument in the rigid body coordinate system are transformed into the world coordinate system.
[0027] The beneficial effects of the present invention are:
[0028] The present invention uses rigid body posture to calculate the coordinates of the therapeutic target of the transcranial magnetic therapy instrument, overcoming the disadvantage that the therapeutic target is a virtual point that is difficult to locate. Combined with the rigid body tracking capability of Optitrack, high-precision real-time positioning of the therapeutic target of the transcranial magnetic therapy instrument is achieved. The real-time positioning information of the therapeutic target of the transcranial magnetic therapy instrument is used to lay the foundation for subsequent visualization of transcranial magnetic therapy. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of the present invention;
[0030] Figure 2 Paste the example diagram for the marker ball; DETAILED DESCRIPTION
[0031] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that the following description is only used to explain the present invention and is not used to limit the present invention.
[0032] The flowchart of the present invention is shown in Figure 1 , specifically including:
[0033] Step 1, paste the marker ball.
[0034] As attached Figure 2 As shown, an infrared marker ball is attached to the side of the treatment instrument, the installation position of the marker ball is asymmetrical, and the number of marker balls installed is greater than three. The infrared marker ball refers to a marker ball that can reflect infrared light.
[0035] Step 2: Create a rigid body.
[0036] In the Optitrack motion capture software Motive, the marker ball on the treatment instrument is established as a rigid body asset, and the three-dimensional non-homogeneous coordinate value {X i}, i=0...N-1, N≥3. After a group of infrared marker balls are captured by the camera, they can be established as rigid body assets in the Motive software to generate the rigid body coordinate system of the rigid body and the coordinate values of the marker balls in the rigid body coordinate system, and the position and pose of the rigid body and the coordinate values of the marker balls in the world coordinate system can be obtained in real time.
[0037] Step 3: Calculate the coordinate system transformation matrix.
[0038] 3.1) Fix the treatment instrument and use Optitrack to collect the three-dimensional non-homogeneous coordinates of the treatment instrument marker ball in the world coordinate system {Y i},i=0...N-1,N≥3.
[0039] 3.2) According to the coordinate value of the marker ball in the world coordinate system {Y i} and the coordinate value {X i} Calculate the transformation matrix T from the world coordinate system to the rigid body coordinate system World2Local ; The transformation matrix is obtained by the following algorithm:
[0040] Given two sets of corresponding points {m i} and {d i}, i=0...N-1,N≥3, satisfying:
[0041] d i =Rm i +t+V i (1)
[0042] Among them, R is a 3×3 dimensional rotation matrix, t is a 3×1 dimensional translation vector, V i is the noise vector.
[0043] Construct a 4×4 dimensional coordinate system transformation matrix based on R and t
[0044] The following is the calculation method of R and t:
[0045] According to the minimum mean square error criterion, R and t are the required values when the following formula is the minimum value.
[0046]
[0047] To solve for R, define the following variables,
[0048]
[0049]
[0050] Formula (2) can be rewritten as:
[0051]
[0052] When the last term of formula (5) is maximum, the formula is minimum, which is equivalent to the maximum trace of matrix RH, where H is the correlation matrix defined by the following formula:
[0053]
[0054] Perform singular value decomposition on H and obtain H = UΛV T , then R=VU T , further calculated based on R Where U refers to the matrix composed of the left singular vectors of H, and V refers to the matrix composed of the right singular vectors of H.
[0055] Step 4: Calibrate the treatment source point.
[0056] 4.1) Use the acquisition probe to collect world coordinates twice on the front of the treatment instrument, and the positions of the two acquisition points are symmetrical about the center point of the front;
[0057] 4.2) Use the acquisition probe to collect world coordinates twice on the back side of the treatment instrument, and the positions of the two acquisition points are symmetrical about the center point of the back side;
[0058] 4.3) Use the transformation matrix T obtained in step 3 World2Local Convert the coordinate values of the four acquisition points in the world coordinate system into the coordinate values in the rigid body coordinate system.
[0059] The calculation method is as follows:
[0060] The coordinate of a point in the source coordinate system is X, and the transformation matrix from the source coordinate system to the target coordinate system is T. Then the coordinate Y of the point in the target coordinate system is obtained by the following formula:
[0061] Y=TX.
[0062] 4.4) taking the average of the coordinate values in the four rigid body coordinate systems in step 4.3) as the coordinate value of the treatment source point of the treatment instrument in the rigid body coordinate system;
[0063] Step 5: Calibrate the treatment direction vector.
[0064] 5.1) Use the probe to collect coordinate values in the world coordinate system at any position on the front of the treatment instrument, and the number of collection times is more than three times;
[0065] 5.2) Use the transformation matrix T obtained in step 3 World2Local Convert the coordinate values in the world coordinate system collected in step 5.1) into coordinate values in the rigid body coordinate system;
[0066] 5.3) Fitting the three-dimensional plane equation using the coordinate values in the rigid body coordinate system obtained in 5.2);
[0067] The method for fitting a three-dimensional plane is as follows:
[0068] A series of points {(x i ,y i ,z i )}, i = 0...N-1, N ≥ 3 to fit the plane equation z = a0x + a1y + a2, (a0, a1, a2) is the value to be calculated, according to the minimum mean square error criterion, the value that minimizes the following equation is taken as the result:
[0069]
[0070] To minimize L(a0,a1,a2), Right now:
[0071]
[0072] Arranged:
[0073]
[0074] Solving the above linear equations gives a0, a1, a2, and the fitted plane is z=a0x+a1y+a2.
[0075] 5.4) The normal vector of the fitted plane in 5.3) is used as the treatment direction vector of the treatment instrument in the rigid coordinate system.
[0076] Step 6: Calculate therapeutic targets.
[0077] In the rigid body coordinate system, the treatment target is calculated according to the coordinate value of the treatment source point of the treatment instrument and the treatment direction vector.
[0078] If the coordinates of the treatment source point are P source , the treatment direction vector is The treatment depth is L, then the treatment target P target Determined by the following formula:
[0079]
[0080] Step 7: Real-time positioning.
[0081] 7.1) Use Optitrack to collect the three-dimensional coordinates and quaternion of the center of mass of the treatment instrument rigid body in real time.
[0082] 7.2) Use the world coordinates of the rigid body's center of mass and the quaternion to construct the transformation matrix from the rigid body coordinate system to the world coordinate system.
[0083] Transformation Matrix It consists of R and t, where R is a 3×3 rotation matrix and t is a 3×1 translation vector.
[0084] The rotation matrix R is calculated from the quaternion (w,x,y,z),
[0085]
[0086] The world coordinates of the rigid body's center of mass are P w , since the rigid body coordinates of the rigid body mass center are zero vectors, then
[0087] 7.3) According to the calculation method of step 4.3), the coordinates of the treatment source point and the treatment target point in the rigid body coordinate system of the treatment instrument are converted to the world coordinate system.
[0088] The above content has been introduced in detail to the present invention, but the description of the specific implementation mode is only used to explain the method of the present invention and its core idea, so as to facilitate the technical personnel in this technical field to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation mode. For ordinary technical personnel in this technical field, as long as various changes are within the spirit and scope of the present invention defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A method for locating a target point for a transcranial magnetic therapy device based on Optitrack, characterized in that: The following steps are involved: (1) Paste the marker ball Paste infrared marker balls on the side of the treatment instrument, install the marker balls in an asymmetrical position, and install more than three marker balls; (2) Create a rigid body In the Optitrack motion capture software, the marker ball on the treatment instrument is established as a rigid body asset, and the three-dimensional non-homogeneous coordinate value of the marker ball on the treatment instrument in the rigid body coordinate system is exported; (3) Calculate the coordinate system transformation matrix (3a) Fix the treatment instrument and use Optitrack to collect the three-dimensional non-homogeneous coordinate values of the treatment instrument marker ball in the world coordinate system; (3b) Calculate the transformation matrix from the world coordinate system to the rigid body coordinate system according to the coordinate values of the marker ball in the world coordinate system and the coordinate values of the rigid body coordinate system; (4) Calibration of treatment source (4a) using a collection probe to collect world coordinates twice on the front side of the treatment instrument, the positions of the two collection points are symmetrical about the center point of the front side; (4b) using a collection probe to collect world coordinates twice on the reverse side of the treatment instrument, the positions of the two collection points are symmetrical about the center point of the reverse side; (4c) using the transformation matrix obtained in step (3) to transform the coordinate values of the four acquisition points in the world coordinate system into the coordinate values in the rigid body coordinate system; (4d) taking the average of the coordinate values in the four rigid body coordinate systems in step (4c) as the coordinate value of the treatment source point of the treatment instrument in the rigid body coordinate system; (5) Calibrate the treatment direction vector (5a) Using the probe to collect coordinate values in the world coordinate system at any position on the front of the treatment instrument, the number of collection times is more than three times; (5b) using the transformation matrix obtained in step (3) to transform the coordinate values in the world coordinate system collected in step (5a) into coordinate values in the rigid body coordinate system; (5c) fitting the three-dimensional plane equation according to the coordinate values in the rigid body coordinate system to obtain the fitting plane; (5d) The normal vector of the fitting plane is used as the treatment direction vector of the treatment instrument in the rigid body coordinate system; (6) Calculation of therapeutic targets In the rigid body coordinate system, the treatment target is calculated according to the coordinate value of the treatment source point of the treatment instrument and the treatment direction vector; (7) Real-time positioning (7a) Use Optitrack to collect the three-dimensional coordinates and quaternion of the center of mass of the treatment instrument rigid body in real time; (7b) Use the three-dimensional coordinates of the rigid body's center of mass and quaternions to construct the transformation matrix from the rigid body coordinate system to the world coordinate system; (7c) According to the transformation matrix, the coordinates of the treatment source point and the treatment target point of the treatment instrument in the rigid body coordinate system are transformed into the world coordinate system.
Citation Information
Patent Citations
Cerebral magnetic stimulation navigation system and cerebral magnetic stimulation coil positioning method
CN102814002A
Electromagnetic positioning and navigation device for transcranial magnetic stimulator
CN104740780A