Transcranial magnetic stimulation handle navigation positioning method and system based on optical motion capture
By collecting and pre -processing the three -dimensional location data of the handle and head, calculate the global location and adjust the navigation position of the handle in real time, solve the complex and inaccurate problems of manual adjustment in existing technologies, and achieve high -precision navigation positioning and automated adjustment. , Improve the accuracy and efficiency of the treatment of craniotomy magnetic stimulation.
Patent Information
- Application Number
- CN202411371252.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing transcranial magnetic stimulation handle navigation and positioning technology based on optical motion capture is complex and time-consuming to manually adjust, which is easily affected by operating experience and external interference, resulting in inaccurate navigation and lack of a high-precision three-dimensional position data processing mechanism, making it difficult to be accurate. Measure and adjust the angle deviation of the handle from the target area in real time.
Collect data from the three -dimensional location of the handle and head in real time and process it. Calculate the global location of the handle and the head. Based on the angle deviation, the navigation location of the handle is adjusted in real time, and the reality of the visual interface is displayed in real -time display and correction. 3D location data generated.
The degree of automation of the handle navigation positioning has been improved, manual intervention is reduced, the accuracy and efficiency of treatment are improved, and the handle is always pointing to the target treatment area to avoid errors in artificial adjustment.
Smart Images

Figure CN119344866A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of precise surgical navigation, and in particular to a transcranial magnetic stimulation handle navigation positioning method and system based on optical motion capture. Background Art
[0002] With the continuous development of neuroscience and medical technology, non-invasive brain stimulation technology, transcranial magnetic stimulation TMS, has shown significant therapeutic effects in the treatment of depression, neurorehabilitation and other fields. TMS uses magnetic fields to act on the cerebral cortex to regulate neural activity, but its efficacy is closely related to the accuracy of the stimulation site. Traditional TMS handle navigation relies on the operator's experience and preset positions, and there are certain errors, making it difficult to accurately aim at the target area. In recent years, optical motion capture technology has gradually been applied to the positioning of TMS handles. By tracking the three-dimensional position data of the handle and the head, more accurate navigation can be achieved. Optical motion capture technology has become an important part of precision medical equipment with its advantages of non-invasiveness, real-timeness and high precision.
[0003] The existing handle positioning technology based on optical capture still has shortcomings. The process of manually adjusting the navigation position is complicated and time-consuming, and is easily affected by the operator's experience level and external interference factors, resulting in inaccurate navigation. Most existing systems lack high-precision three-dimensional position data processing mechanisms, making it difficult to accurately measure and adjust the angular deviation between the handle and the target area in real time. Summary of the invention
[0004] In view of the problems existing in the above-mentioned existing transcranial magnetic stimulation handle navigation and positioning method and system based on optical motion capture, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is that the process of manually adjusting the navigation position is complicated and time-consuming, and is easily affected by the operator's experience level and external interference factors, resulting in inaccurate navigation. Most existing systems lack a high-precision three-dimensional position data processing mechanism, making it difficult to accurately measure and adjust the angular deviation between the handle and the target area in real time.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture, which includes collecting three-dimensional position data of the handle and the head in real time and preprocessing them, and calculating the global position of the handle and the head based on the preprocessed three-dimensional position data;
[0007] Calculate the angle deviation of the target treatment area based on the global position of the handle and the head, and adjust the handle navigation position in real time based on the angle deviation;
[0008] Construct a visual interface to display the corrected handle navigation position in real time, and store, collect and analyze the generated 3D position data.
[0009] As a preferred solution of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture described in the present invention, wherein: the real-time collection of the three-dimensional position data of the handle and the head and preprocessing thereof refers to installing infrared markers at the center of the patient's forehead, above the left and right ears, at the end of the handle, at the handle in the middle of the handle, at the tail of the handle, and at the midpoint of the side of the handle, respectively, and collecting the three-dimensional position data of the four infrared markers on the handle and the three markers on the patient's head in real time;
[0010] Preprocessing the collected three-dimensional position data;
[0011] The preprocessing includes using Kalman filtering to perform denoising on the three-dimensional position data, and using a Z-score method to identify the three-dimensional position data and delete abnormal values.
[0012] As a preferred solution of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture of the present invention, wherein: the calculation of the global position of the handle and the head based on the preprocessed three-dimensional position data refers to calculating the center point position of the handle and the head through the geometric center of the handle and the head marker position. h , the formula is:
[0013]
[0014] Among them, h is the center point of the handle, P hi is the three-dimensional position data of the infrared marker of the i-th handle, O p is the center point of the head, P pi is the three-dimensional position data of the i-th head infrared marker;
[0015] At the initial position of the handle, the initial three-dimensional position data of the infrared marker is collected. When the handle rotates, the current three-dimensional position data of the infrared marker is collected.
[0016] In the initial state, calculate the initial vector of the handle and the head. The formula is:
[0017]
[0018] in is the initial vector of the handle, and are the three-dimensional position data of marker 1 and marker 2 in the initial state of the handle, is the initial vector of the head, and They are the three-dimensional position data of marker 1 and marker 2 in the initial state of the head;
[0019] After the rotation, calculate the current vector of the handle and the head, the formula is:
[0020] v h =P h2 -P h1 , v p =P p2 -P p1 ,
[0021] where v h1 is the current vector of the handle, P h1 and P h2 are the three-dimensional position data of marker 1 and marker 2 after the handle is rotated, v p1 is the current vector of the head, P p1 and P p2 They are the three-dimensional position data of marker 1 and marker 2 after the head is rotated;
[0022] The rotation angle of the handle and the head is calculated by the angle between the initial vector of the handle and the head and the current vector of the handle and the head. The formula is:
[0023]
[0024] where θ h and φ p are the rotation angles of the handle and head respectively;
[0025] Use the Euler angle formula to calculate the handle and head rotation matrix. The formula is:
[0026]
[0027] Where R h and R p They are the handle and head rotation matrices respectively;
[0028] The global position of the handle and head is calculated by collecting the three-dimensional position data of the handle and head landmarks. The formula is:
[0029] T h =R h ×v h +O h , T p =R p ×v p +O p ,
[0030] Where T h and T p are the global positions of the handle and head respectively.
[0031] As a preferred solution of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture described in the present invention, wherein: the calculation of the angle deviation of the target treatment area based on the global position of the handle and the head refers to collecting the MRI scan data of the patient and setting the three-dimensional position data of the target treatment area based on the coordinate system of the head anatomical structure;
[0032] The three-dimensional position data of the target treatment area is set as the initial position of the target area in the head coordinate system, and the target area is converted from the head coordinate system to the global coordinate system. The formula is:
[0033] T t-global =R p ×(T t -O p )+T p ,
[0034] Where T t-global is the three-dimensional position data of the target treatment area in the global coordinate system, T t is the initial position of the target area in the head coordinate system;
[0035] The Euclidean distance formula is used to calculate the spatial distance between the handle and the target treatment area:
[0036]
[0037] Where D is the spatial distance between the handle and the target area, (T x ,T y ,T z ) is the global three-dimensional position of the target treatment area, (P x ,P y ,P z ) is the current three-dimensional position of the handle;
[0038] The direction vector of the target area is calculated by the head rotation matrix. The formula is:
[0039] V t =R p ×T t-global ,
[0040] Where V t is the direction vector of the target area;
[0041] Normalize the current vector of the handle and the direction vector of the target area. The formula is:
[0042]
[0043] in and They are the normalized current vector and direction vector respectively;
[0044] Calculate the dot product of the current vector and the direction vector The formula is:
[0045]
[0046] Among them (e h ,f h ,g h ) and (e t ,f t ,g t ) are the components of the current vector and the direction vector respectively;
[0047] Use the dot product of the current vector and the direction vector Calculate the angle deviation between the handle and the target treatment area using the formula:
[0048]
[0049] where θ err is the angular deviation between the handle and the target treatment area.
[0050] As a preferred solution of the transcranial magnetic stimulation handle navigation positioning method based on optical motion capture of the present invention, wherein: the real-time adjustment of the handle navigation position based on the angle deviation refers to collecting the patient's historical MRI scan data to set an allowable threshold;
[0051] The allowable threshold is compared with the angle deviation between the handle and the target treatment area. If θ err ≤θ ther , it is judged that the handle is aimed at the target area and the handle does not need to be adjusted;
[0052] If θ err >θ ther When , it is judged as handle deviation, and the handle automatically navigates and adjusts. The correction angle Δθ is calculated based on the allowable threshold and the angle deviation between the handle and the target treatment area. The formula is:
[0053] Δθ=θ err -θ ther ,
[0054] Use the Euler angle formula to calculate the rotation matrix R that correctly aligns the handle to the target area tan , the formula is:
[0055]
[0056] The rotation matrix ΔR of the adjustment handle is automatically calculated by the correction angle and the rotation matrix of the handle to correctly align with the target area h , the formula is:
[0057] ΔRh =R tan -R h ,
[0058] According to the rotation matrix ΔR of the adjustment handle h The handle direction and three-dimensional position are adjusted in real time and the adjusted angle deviation is recalculated until the angle deviation is less than or equal to the allowable threshold.
[0059] As a preferred solution of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture described in the present invention, wherein: the visualization interface constructed using Python displays the three-dimensional position of the patient's head, the target treatment area and the handle in real time, and an early warning panel is designed at the top of the interface to display the currently triggered early warning information;
[0060] Family members who have passed real-time verification are allowed to view the information in real time.
[0061] As a preferred solution of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture described in the present invention, the storage of the three-dimensional position data generated by the collection and analysis refers to storing the three-dimensional position data generated by the collection and analysis in a database, sorting the database in chronological order and marking corresponding tags, synchronously backing up the three-dimensional position data generated by the collection and analysis in the cloud, and regularly performing integrity checks on the backup data.
[0062] Another object of the present invention is to provide a transcranial magnetic stimulation handle navigation and positioning system based on optical motion capture, which comprises:
[0063] A collection and calculation module is used to collect and preprocess the three-dimensional position data of the handle and the head in real time, and calculate the global position of the handle and the head based on the preprocessed three-dimensional position data;
[0064] A deviation navigation module, used to calculate the angle deviation of the target treatment area based on the global position of the handle and the head, and adjust the handle navigation position in real time based on the angle deviation;
[0065] The visualization storage module is used to build a visualization interface to display the corrected handle navigation position in real time, and to store, collect and analyze the generated three-dimensional position data.
[0066] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture when executing the computer program.
[0067] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture.
[0068] The beneficial effects of the present invention are as follows: the present invention collects the three-dimensional position data of the handle and the head in real time and performs preprocessing, calculates the global position of the handle and the head based on the preprocessed three-dimensional position data; calculates the angular deviation of the target treatment area based on the calculated global position of the handle and the head, and adjusts the handle navigation position in real time based on the angular deviation; not only the degree of automation of the handle navigation positioning is improved, but also manual intervention is reduced, thereby improving the accuracy and efficiency of treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0070] Figure 1 Schematic diagram of the process of transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture.
[0071] Figure 2 This is a schematic diagram of the structure of the transcranial magnetic stimulation handle navigation and positioning system based on optical motion capture. DETAILED DESCRIPTION
[0072] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0073] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0074] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0075] Example 1, reference Figure 1 , which is the first embodiment of the present invention, and provides a transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture, and the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture includes,
[0076] S1, collecting and preprocessing the three-dimensional position data of the handle and the head in real time, and calculating the global position of the handle and the head based on the preprocessed three-dimensional position data;
[0077] Specifically, real-time collection of the three-dimensional position data of the handle and the head and preprocessing thereof means installing infrared markers at the center of the patient's forehead, above the left and right ears, at the end of the handle, at the handle in the middle of the handle, at the tail of the handle, and at the midpoint of the side of the handle, respectively, and real-time collection of the three-dimensional position data of the four infrared markers on the handle and the three markers on the patient's head;
[0078] Preprocessing the collected three-dimensional position data;
[0079] The preprocessing includes using Kalman filtering to perform denoising on the three-dimensional position data, and using a Z-score method to identify the three-dimensional position data and delete abnormal values.
[0080] For the handle part, the selection of the marker positions at the end, middle and tail can better capture the overall posture and rotation information of the handle, while the distribution of the head markers is consistent with the anatomical structure of the head, ensuring that the displacement and rotation information of the head can be accurately captured. The design of multi-point markers greatly improves the accuracy of three-dimensional data capture, which is helpful for the stability and accuracy of subsequent navigation and positioning. In data preprocessing, the combined use of Kalman filtering and Z-score methods significantly enhances the system's ability to process position data, which not only improves the accuracy of the system, but also reduces unnecessary interference caused by misoperation or data fluctuations. Through an efficient data processing mechanism, the system can provide accurate navigation and positioning information in real time, greatly improving the automation level of transcranial magnetic stimulation (TMS) operations, which not only reduces the burden on operators, but also reduces errors during the treatment process, improving the safety and effectiveness of patient treatment. Through precise data processing and global position calculation, the system can instantly identify the deviation between the handle and the target treatment area, and make corresponding adjustments when necessary to ensure that the navigation and positioning of the handle always remain within the preset allowable error range. Accurate control of the TMS treatment area is of great significance, especially when the same brain area needs to be stimulated repeatedly for multiple times. Accurate navigation and positioning can ensure the consistency of the treatment effect.
[0081] Further, the global position of the handle and the head is calculated based on the preprocessed three-dimensional position data, which means calculating the center point position of the handle and the head through the geometric center of the handle and the head marker position. h , the formula is:
[0082]
[0083] Among them, h is the center point of the handle, P hiis the three-dimensional position data of the infrared marker of the i-th handle, O p is the center point of the head, P pi is the three-dimensional position data of the i-th head infrared marker;
[0084] At the initial position of the handle, the initial three-dimensional position data of the infrared marker is collected. When the handle rotates, the current three-dimensional position data of the infrared marker is collected.
[0085] In the initial state, calculate the initial vector of the handle and the head. The formula is:
[0086]
[0087] in is the initial vector of the handle, and are the three-dimensional position data of marker 1 and marker 2 in the initial state of the handle, is the initial vector of the head, and They are the three-dimensional position data of marker 1 and marker 2 in the initial state of the head;
[0088] After the rotation, calculate the current vector of the handle and the head, the formula is:
[0089] v h =P h2 -P h1 , v p =P p2 -P p1 ,
[0090] where v h1 is the current vector of the handle, P h1 and P h2 are the three-dimensional position data of marker 1 and marker 2 after the handle is rotated, v p1 is the current vector of the head, P p1 and P p2 They are the three-dimensional position data of marker 1 and marker 2 after the head is rotated;
[0091] The rotation angle of the handle and the head is calculated by the angle between the initial vector of the handle and the head and the current vector of the handle and the head. The formula is:
[0092]
[0093] where θ h and φ p are the rotation angles of the handle and head respectively;
[0094] Use the Euler angle formula to calculate the handle and head rotation matrix. The formula is:
[0095]
[0096] Where R h and R p They are the handle and head rotation matrices respectively;
[0097] The global position of the handle and head is calculated by collecting the three-dimensional position data of the handle and head landmarks. The formula is:
[0098] T h =R h ×v h +O h , T p =R p ×v p +O p ,
[0099] Where T h and T p are the global positions of the handle and head respectively.
[0100] The handle and head may undergo slight displacement and rotation. Using the geometric center as a reference can more stably reflect the overall motion trajectory without being affected by the position deviation of a single marker. For transcranial magnetic stimulation treatment, accurate navigation and positioning are crucial, which not only ensures the accuracy of stimulation, but also reduces the number of repeated operations and improves treatment efficiency. When the handle deviates from the predetermined direction, the system can automatically make navigation adjustments based on the calculated angle information to ensure that the handle always points to the target treatment area, avoiding errors in manual adjustments and making navigation more precise and efficient, especially when multiple repeated stimulations are required, to ensure the consistency and effectiveness of each treatment. Through the Euler angle formula and rotation matrix, the system can quickly and intuitively calculate the rotation angle and direction of the handle and the head, and update the navigation information in real time, which not only reduces the computational burden of the system, but also improves the real-time response speed of the operation, making the posture adjustment of the handle smoother. The precise calculation of the global position improves the navigation stability, allowing the handle to maintain a stable and precise navigation state in a complex treatment environment, avoiding treatment area errors caused by position deviation. Especially in the face of head movement or slight movement of the patient, the system can quickly adjust the handle position to ensure the stability and accuracy of navigation. Automated operation reduces the uncertainty in manual operation and ensures the accuracy and consistency of treatment.
[0101] S2, calculating the angle deviation of the target treatment area based on the global position of the handle and the head, and adjusting the handle navigation position in real time based on the angle deviation;
[0102] Specifically, calculating the angle deviation of the target treatment area based on the global position of the handle and the head refers to collecting MRI scan data of the patient and setting the three-dimensional position data of the target treatment area based on the coordinate system of the head anatomical structure;
[0103] The three-dimensional position data of the target treatment area is set as the initial position of the target area in the head coordinate system, and the target area is converted from the head coordinate system to the global coordinate system. The formula is:
[0104] T t-global =R p ×(T t -O p )+T p ,
[0105] Where T t-global is the three-dimensional position data of the target treatment area in the global coordinate system, T t is the initial position of the target area in the head coordinate system;
[0106] The Euclidean distance formula is used to calculate the spatial distance between the handle and the target treatment area:
[0107]
[0108] Where D is the spatial distance between the handle and the target area, (T x ,T y ,T z ) is the global three-dimensional position of the target treatment area, (P x ,P y ,P z ) is the current three-dimensional position of the handle;
[0109] The direction vector of the target area is calculated by the head rotation matrix. The formula is:
[0110] V t =R p ×T t-global ,
[0111] Where V t is the direction vector of the target area;
[0112] Normalize the current vector of the handle and the direction vector of the target area. The formula is:
[0113]
[0114] in and They are the normalized current vector and direction vector respectively;
[0115] Calculate the dot product of the current vector and the direction vector The formula is:
[0116]
[0117] Among them (e h ,f h ,g h ) and (e t ,f t ,g t ) are the components of the current vector and the direction vector respectively;
[0118] Use the dot product of the current vector and the direction vector Calculate the angle deviation between the handle and the target treatment area using the formula:
[0119]
[0120] where θ err is the angular deviation between the handle and the target treatment area.
[0121] Precise positioning greatly improves the accuracy of TMS treatment, especially when the treatment requires stimulation of a specific brain area. The system can ensure that the handle is aligned with the target brain area. Traditional TMS handle navigation systems usually rely on external markers or empirical estimates, which are prone to deviations. Through precise coordinate conversion based on MRI data, the present invention can significantly reduce the deviation of the handle from the treatment area, ensuring the high efficiency and accuracy of the treatment. By reducing human intervention during the treatment process, the system can maintain higher consistency and reliability. In traditional handle navigation systems, the measurement of angle deviation often relies on the operator's visual judgment or experience, which not only increases the treatment time but also is prone to errors. Through precise mathematical models and vector operations, the angle deviation can be calculated and adjusted in real time, thereby greatly improving the accuracy of navigation, which is crucial to the therapeutic effect of TMS, especially when repeated stimulation of specific brain areas is required. High consistency and accuracy can be guaranteed for each treatment. The automatic adjustment function significantly improves the treatment efficiency, reduces the burden on operators during the treatment process, and ensures that the handle is always kept in the optimal position during the treatment process. The automatic adjustment not only improves the safety of the treatment, but also reduces the uncertainty that may be caused by manual adjustment.
[0122] Further, adjusting the handle navigation position in real time based on the angle deviation refers to collecting the patient's historical MRI scan data to set an allowable threshold;
[0123] The allowable threshold is compared with the angle deviation between the handle and the target treatment area. If θ err ≤θ ther , it is judged that the handle is aimed at the target area and the handle does not need to be adjusted;
[0124] If θerr >θ ther When , it is judged as handle deviation, and the handle automatically navigates and adjusts. The correction angle Δθ is calculated based on the allowable threshold and the angle deviation between the handle and the target treatment area. The formula is:
[0125] Δθ=θ err -θ ther ,
[0126] Use the Euler angle formula to calculate the rotation matrix R that correctly aligns the handle to the target area tan , the formula is:
[0127]
[0128] The rotation matrix ΔR of the adjustment handle is automatically calculated by the correction angle and the rotation matrix of the handle to correctly align with the target area h , the formula is:
[0129] ΔR h =R tan -R h ,
[0130] According to the rotation matrix ΔR of the adjustment handle h The handle direction and three-dimensional position are adjusted in real time and the adjusted angle deviation is recalculated until the angle deviation is less than or equal to the allowable threshold.
[0131] Each patient's head anatomy and target treatment area may be different, so setting a unique allowable threshold for each patient based on historical data can improve the accuracy of handle positioning. Customized threshold settings not only ensure the efficiency and accuracy of the treatment process, but also avoid positioning errors caused by threshold settings that are too wide or too narrow. Real-time angle deviation calculation and dynamic adjustment mechanisms enable the handle to remain in a precise navigation state, reducing errors that may occur during traditional manual adjustments and improving treatment efficiency and accuracy. Automatic calculation of correction angles also provides accurate data support for subsequent navigation adjustments, allowing the entire system to complete adjustments in a short period of time, reducing unnecessary delays during treatment. Improve patient experience. The system can calculate the rotation matrix of the handle to correctly align with the target area through the Euler angle formula. The system can achieve precise posture adjustment and avoid over-adjustment or under-adjustment that is prone to occur in traditional manual adjustment. The use of the rotation matrix also simplifies the complex rotation calculations in three-dimensional space, making the posture adjustment of the handle more flexible and efficient. The automatic adjustment function based on angle deviation can monitor and automatically correct the posture of the handle in real time, avoiding the uncertainty in the manual adjustment process. The automated adjustment function not only improves the accuracy of the treatment, but also significantly improves the efficiency of the treatment. When repeatedly stimulating the same brain area, the system can ensure the consistency of the accuracy of each treatment and avoid differences in treatment effects due to handle deviation.
[0132] S3, construct a visual interface to display the corrected handle navigation position in real time, and store, collect and analyze the generated three-dimensional position data;
[0133] Specifically, Python is used to build a visual interface to display the patient's head, target treatment area, and the three-dimensional position of the handle in real time, and an early warning panel is designed at the top of the interface to display the currently triggered early warning information;
[0134] Family members who have passed real-time verification are allowed to view the information in real time.
[0135] Python is not only used to build three-dimensional models, but also uses its powerful data processing capabilities to accurately display the three-dimensional positions of the handle and the head. The visual display method greatly simplifies the expression of complex three-dimensional spatial relationships, helping operators to better understand the relative position of the handle and the target treatment area during treatment, thereby ensuring the accuracy and safety of treatment. The visual interface displays real-time data during the operation process through dynamic and intuitive three-dimensional graphics, allowing operators to grasp the status and position of the handle at a glance. The intuitive feedback mechanism not only improves operational efficiency, but also effectively reduces the possibility of misoperation. The handle navigation provides safety protection and can promptly prevent treatment errors caused by handle position deviation. The early warning panel not only increases the intelligence of the system, but also improves the safety of the entire treatment process, ensuring that each treatment can be carried out under the safest conditions. It not only improves the safety of the treatment process, but also enhances the credibility of the system, increases the trust of patients and their families in treatment, and improves the quality of medical services and patient experience. Transparency can effectively alleviate the anxiety of family members and bring more peace of mind to patients.
[0136] Furthermore, storing the three-dimensional position data generated by the collection and analysis means storing the three-dimensional position data generated by the collection and analysis in a database, sorting the database in chronological order and marking corresponding tags, synchronously backing up the three-dimensional position data generated by the collection and analysis to the cloud, and regularly performing integrity checks on the backup data.
[0137] By tracing back the three-dimensional position data of the handle and head in different time periods, the operator can analyze the process and results of each treatment in detail, identify potential operational problems, and provide data support for future treatment optimization. Time-sequential storage provides a basis for the system's audit and supervision functions, ensuring the integrity and legality of the data. It not only improves the convenience of data management, but also provides a clear structural support for subsequent data analysis, which helps to better perform data mining and pattern recognition. Through cloud backup, the system can also support multiple operators or devices to access the same data set in real time, which provides technical support for multi-party collaboration and enhances the flexibility and scalability of the system. Through regular testing, the system can promptly detect potential problems in the data and repair them, thereby ensuring the integrity of the data. It not only provides protection for data security in daily operations, but also improves the stability of the system, making data management safer and more reliable. The data-driven optimization method not only improves the accuracy and effectiveness of treatment, but also promotes the intelligent upgrade of the entire treatment system.
[0138] Example 2, reference Figure 2 , which is the second embodiment of the present invention, and which is different from the previous embodiment, provides a transcranial magnetic stimulation handle navigation and positioning system based on optical motion capture, including:
[0139] A collection and calculation module is used to collect and preprocess the three-dimensional position data of the handle and the head in real time, and calculate the global position of the handle and the head based on the preprocessed three-dimensional position data;
[0140] A deviation navigation module, used to calculate the angle deviation of the target treatment area based on the global position of the handle and the head, and adjust the handle navigation position in real time based on the angle deviation;
[0141] The visualization storage module is used to build a visualization interface to display the corrected handle navigation position in real time, and to store, collect and analyze the generated three-dimensional position data.
[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0144] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0145] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Claims
1. A transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture, characterized in that: include, Collect and preprocess the three-dimensional position data of the handle and head in real time, and calculate the global position of the handle and head based on the preprocessed three-dimensional position data; Calculate the angle deviation of the target treatment area based on the global position of the handle and the head, and adjust the handle navigation position in real time based on the angle deviation; Construct a visual interface to display the corrected handle navigation position in real time, and store, collect and analyze the generated 3D position data.
2. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 1, characterized in that: The real-time collection of the three-dimensional position data of the handle and the head and preprocessing thereof refers to installing infrared markers at the center of the patient's forehead, above the left and right ears, at the end of the handle, at the handle in the middle of the handle, at the tail of the handle, and at the midpoint of the side of the handle, respectively, and collecting the three-dimensional position data of the four infrared markers on the handle and the three markers on the patient's head in real time; Preprocessing the collected three-dimensional position data; The preprocessing includes using Kalman filtering to perform denoising on the three-dimensional position data, and using a Z-score method to identify the three-dimensional position data and delete abnormal values.
3. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 2, characterized in that: The calculation of the global position of the handle and the head based on the preprocessed three-dimensional position data refers to calculating the center point position of the handle and the head through the geometric center of the handle and the head marker position. h , the formula is: Among them, h is the center point of the handle, P hi is the three-dimensional position data of the infrared marker of the i-th handle, O p is the center point of the head, P pi is the three-dimensional position data of the i-th head infrared marker; At the initial position of the handle, the initial three-dimensional position data of the infrared marker is collected. When the handle rotates, the current three-dimensional position data of the infrared marker is collected. In the initial state, calculate the initial vector of the handle and the head. The formula is: in is the initial vector of the handle, and are the three-dimensional position data of marker 1 and marker 2 in the initial state of the handle, is the initial vector of the head, and They are the three-dimensional position data of marker 1 and marker 2 in the initial state of the head; After the rotation, calculate the current vector of the handle and the head, the formula is: v h =P h2 -P h1 ,v p =P p2 -P p1 , where v h1 is the current vector of the handle, P h1 and P h2 are the three-dimensional position data of marker 1 and marker 2 after the handle is rotated, v p1 is the current vector of the head, P p1 and P p2 They are the three-dimensional position data of marker 1 and marker 2 after the head is rotated; The rotation angle of the handle and the head is calculated by the angle between the initial vector of the handle and the head and the current vector of the handle and the head. The formula is: where θ h and φ p are the rotation angles of the handle and head respectively; Use the Euler angle formula to calculate the handle and head rotation matrix. The formula is: Where R h and R p They are the handle and head rotation matrices respectively; The global position of the handle and head is calculated by collecting the three-dimensional position data of the handle and head landmarks. The formula is: T h =R h ×v h +O h ,T p =R p ×v p +O p , Where T h and T p are the global positions of the handle and head respectively.
4. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 3, characterized in that: Calculating the angle deviation of the target treatment area based on the global position of the handle and the head refers to collecting MRI scan data of the patient and setting the three-dimensional position data of the target treatment area based on the coordinate system of the head anatomical structure; The three-dimensional position data of the target treatment area is set as the initial position of the target area in the head coordinate system, and the target area is converted from the head coordinate system to the global coordinate system. The formula is: T t-global =R p ×(T t -O p )+T p , Where T t-global is the three-dimensional position data of the target treatment area in the global coordinate system, T t is the initial position of the target area in the head coordinate system; The Euclidean distance formula is used to calculate the spatial distance between the handle and the target treatment area: Where D is the spatial distance between the handle and the target area, (T x ,T y ,T z ) is the global three-dimensional position of the target treatment area, (P x ,P y ,P z ) is the current three-dimensional position of the handle; The direction vector of the target area is calculated by the head rotation matrix. The formula is: V t =R p ×T t-global , Where V t is the direction vector of the target area; Normalize the current vector of the handle and the direction vector of the target area. The formula is: in and They are the normalized current vector and direction vector respectively; Calculate the dot product of the current vector and the direction vector The formula is: Among them (e h ,f h ,g h ) and (e t ,f t ,g t ) are the components of the current vector and the direction vector respectively; Use the dot product of the current vector and the direction vector Calculate the angle deviation between the handle and the target treatment area using the formula: where θ err is the angular deviation between the handle and the target treatment area.
5. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 4, characterized in that: The real-time adjustment of the handle navigation position based on the angle deviation refers to collecting the patient's historical MRI scan data to set an allowable threshold; The allowable threshold is compared with the angle deviation between the handle and the target treatment area. If θ err ≤θ ther , it is judged that the handle is aimed at the target area and the handle does not need to be adjusted; If θ err >θ ther When , it is judged as handle deviation, and the handle automatically navigates and adjusts. The correction angle Δθ is calculated based on the allowable threshold and the angle deviation between the handle and the target treatment area. The formula is: Δθ=θ err -θ ther , Use the Euler angle formula to calculate the rotation matrix R that correctly aligns the handle to the target area tan , the formula is: The rotation matrix ΔR of the adjustment handle is automatically calculated by the correction angle and the rotation matrix of the handle to correctly align with the target area h , the formula is: ΔR h =R tan -R h , According to the rotation matrix ΔR of the adjustment handle h The handle direction and three-dimensional position are adjusted in real time and the adjusted angle deviation is recalculated until the angle deviation is less than or equal to the allowable threshold.
6. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 5, characterized in that: The use of Python to construct a visual interface displays the patient's head, target treatment area, and the three-dimensional position of the handle in real time, and designs an early warning panel at the top of the interface to display the currently triggered early warning information; Family members who have passed real-time verification are allowed to view the information in real time.
7. The method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to claim 6, characterized in that: The storing of the three-dimensional position data generated by the collection and analysis refers to storing the three-dimensional position data generated by the collection and analysis in a database, sorting the database in chronological order and marking corresponding tags, synchronously backing up the three-dimensional position data generated by the collection and analysis in the cloud, and regularly checking the integrity of the backup data.
8. A transcranial magnetic stimulation handle navigation and positioning system based on optical motion capture based on the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture according to any one of claims 1 to 7, characterized in that: include, A collection and calculation module is used to collect and preprocess the three-dimensional position data of the handle and the head in real time, and calculate the global position of the handle and the head based on the preprocessed three-dimensional position data; A deviation navigation module, used to calculate the angle deviation of the target treatment area based on the global position of the handle and the head, and adjust the handle navigation position in real time based on the angle deviation; The visualization storage module is used to build a visualization interface to display the corrected handle navigation position in real time, and to store, collect and analyze the generated three-dimensional position data.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of the transcranial magnetic stimulation handle navigation and positioning method based on optical motion capture described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for navigation and positioning of a transcranial magnetic stimulation handle based on optical motion capture according to any one of claims 1 to 7 are implemented.