Surgical navigation optical positioning system based on ZYNQ and surgical instrument position and attitude calculation method
Through the ZYNQ-based hardware platform and modular design, combined with the synergistic capabilities of FPGA and ARM processor, the problem of insufficient real-time, positioning accuracy and hardware integration of domestic surgical navigation systems is solved, and a high-precision and real-time surgical navigation system is realized, which is suitable for operating room environments and is convenient for maintenance and upgrades.
Patent Information
- Application Number
- CN202510559932.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-01
AI Technical Summary
Domestic surgical navigation systems have shortcomings in real-time, positioning accuracy and hardware integration, which are difficult to meet the needs of high-precision navigation, and lack of scalability and flexibility, resulting in long-term dependence on imported equipment.
The ZYNQ-based hardware platform is adopted, combined with the collaborative capabilities of FPGA and ARM processors, and the image acquisition and preprocessing are realized, and data transmission and display are transmitted and displayed through an embedded Linux system. The modular design and Ethernet communication protocol are adopted, combined with data compression and delay optimization technology, and the position and posture calculation of surgical instruments are performed.
It improves the real-time and positioning accuracy of the surgical navigation system, reduces hardware costs, enhances the scalability and flexibility of the system, ensures stability and high-precision positioning in complex environments, and is suitable for operating room environments, making it easy to maintain and upgrade.
Smart Images

Figure CN120392297A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical devices, and specifically to a surgical navigation optical positioning system based on ZYNQ and a method for calculating the position and attitude of surgical instruments. Background Art
[0002] The surgical navigation system is an important auxiliary technology widely used in complex surgical scenarios in modern medicine, mainly used in the fields of neurosurgery, orthopedics, otolaryngology, etc. This system helps doctors accurately plan and guide the operation path during the surgery by real-time tracking the position and attitude of surgical instruments and combining with the preoperative imaging data of the patient. Especially in minimally invasive surgeries, the surgical navigation system can significantly improve the accuracy of operations, reduce intraoperative risks, and enhance the patient's recovery speed. Therefore, surgical navigation technology has become a key development direction in the field of medical equipment.
[0003] Currently, most of the surgical navigation systems on the market are foreign products, with complex hardware designs and high prices. The core technologies are restricted by patent barriers, and domestic products are at a disadvantage in terms of technological maturity and market share. Domestic surgical navigation systems still have certain limitations in terms of real-time performance, positioning accuracy, and hardware integration, resulting in insufficient performance under high-precision navigation requirements. In addition, the expandability and flexibility of domestic systems are also difficult to meet the ever-changing complex requirements in the medical environment. These deficiencies not only limit the popularization of domestic surgical navigation technology but also lead to a long-term dependence on imported equipment.
[0004] ZYNQ is a high-performance programmable system-on-chip (SoC) that integrates the parallel processing capabilities of FPGA and the flexibility of ARM processors, enabling co-optimization of software and hardware. Compared with traditional architectures, platforms based on ZYNQ have significant advantages such as high real-time performance, high integration, and low power consumption, which are very suitable for high-performance computing requirements in complex scenarios. Utilizing the software and hardware co-operation ability of ZYNQ, high-speed image acquisition and preprocessing can be completed through the parallel processing of FPGA, and positioning algorithms and data transmission functions can be realized through ARM processors. Summary of the Invention
[0005] The purpose of the present invention is to provide a surgical navigation optical positioning system based on ZYNQ that can improve real-time performance, positioning accuracy, and hardware integration.
[0006] Based on the above purpose, the present invention adopts the following technical solutions:
[0007] A surgical navigation optical positioning system based on ZYNQ includes an optical imaging unit. The optical imaging unit is connected to a display and a host computer through a ZYNQ board. There are an FPGA end and an ARM end connected in sequence on the ZYNQ board. The FPGA end is connected to the optical imaging unit, and the ARM end is connected to the display. The FPGA end includes an image acquisition and preprocessing module and a data storage module. The image acquisition and preprocessing module is used to receive the original image data from the optical imaging unit and complete the synchronization, decoding, and preliminary processing of the image data. The data storage module is used to temporarily store the processed data and is connected to the ARM end. The ARM end includes a surgical instrument tracking module, a data transmission module, and a real-time display module. The surgical instrument tracking module is used to execute the positioning algorithm and generate high-precision positioning information. The data transmission module is connected to the host computer and transmits the positioning information to the host computer through Ethernet. The real-time display module is connected to the display and outputs the image information to an external display through an HDMI or DP interface. The host computer receives the positioning information transmitted by the ZYNQ board through the data transmission module and is used to realize the real-time monitoring and feedback of surgical instruments. The display is connected to the real-time display module and displays the video image of the surgical scene in real time to provide visual support for surgical navigation.
[0008] Preferably, the optical imaging unit includes two groups of CMOS cameras. Near-infrared light LED light sources are arranged in front of both groups of CMOS cameras, and filter plates are arranged at the front ends of the near-infrared light LED light sources. The two groups of CMOS cameras are used to collect high-resolution image data of the surgical scene and support RAW10 format output. The near-infrared LED light sources emit near-infrared light in a specific wavelength band to provide directional illumination in the target wavelength band for the surgical scene to optimize the near-infrared imaging quality. The filter plates are arranged in front of each group of cameras and are used to filter out the light in non-target wavelength bands to enhance the image contrast.
[0009] Preferably, the image acquisition and preprocessing module includes two independent units, and each unit includes:
[0010] An MIPI CSI-2 receiving subsystem, which is used to receive the image data from the CMOS camera;
[0011] A sensor demosaicing module, which is used to perform demosaicing processing on the received image data and convert it into RGB format;
[0012] A gamma correction module, which is used to optimize the image brightness and contrast;
[0013] A video processing subsystem, which is used to perform format conversion on the image and output a grayscale image;
[0014] A frame buffer writing module, which is used to store the processed grayscale image data into the data storage module.
[0015] The image acquisition and preprocessing module adopts a time synchronization mechanism to achieve synchronous acquisition of two groups of CMOS cameras, ensuring the temporal consistency of dual-view images and providing high-precision input for subsequent image processing and positioning.
[0016] Preferably, the ARM side runs an embedded Linux system, and the ARM side is connected to the FPGA side through the AXI4 bus; the embedded Linux system combines a modular driver through the V4L2 interface to obtain the grayscale image data in the data storage module in real time.
[0017] Preferably, a data compression module, a transmission queue management module, and a latency optimization module are provided in the data transmission module. The data transmission module transmits the position and attitude matrix of the surgical instrument to the host computer in real time through the Ethernet communication protocol.
[0018] Preferably, the data transmission module transmits the position and attitude matrix of the surgical instrument to the host computer in real time through the Ethernet communication protocol; through data compression, transmission queue management, and latency optimization, this module ensures the fast and stable transmission of positioning information and supports the host computer to display the positioning trajectory of the surgical instrument in real time.
[0019] Preferably, the real-time display module outputs the video image of the surgical scene to an external display in real time through the HDMI or DP interface, helping the operator to view the intraoperative scene in real time and assisting in the navigation and decision-making of the surgical process.
[0020] A method for calculating the position and attitude of a surgical instrument includes the following steps:
[0021] S1. Mark point detection: Read the grayscale image stored in the data storage module, perform binarization processing on the grayscale image, and convert the mark point area into a highlighted area; calculate the circularity of each mark point area, set an appropriate area threshold according to the known size of the mark point to eliminate too small noise points and too large error areas, and perform different processing for mark points with different morphologies;
[0022] S2. Feature point matching: Obtain the left and right camera projection matrices and the fundamental matrix by calibrating the binocular cameras, and perform stereo matching using the epipolar constraint method;
[0023] S3. 3D coordinate reconstruction: Use the triangulation method to reconstruct the 3D coordinates and calculate the position of the retroreflective mark point in the world coordinate system;
[0024] S4. Elimination of false matches: Use a distance constraint method based on geometric distribution to eliminate false matching points by calculating the geometric relationship between mark points;
[0025] S5. Pose solution: Use the singular value decomposition method to calculate the spatial position and attitude matrix of the surgical instrument.
[0026] Preferably, the processing procedures for different forms of marker points in step S1 marker point detection include:
[0027] For slightly occluded marker points: Use the ellipse fitting method to correct; for severely occluded or temporarily lost marker points: Use the trajectory prediction method based on Kalman filter for inter-frame information fusion, estimate the movement trend of the marker points, and compensate for them to improve the continuity and stability of detection; for normal marker points: Calculate the center coordinates of the reflective points based on the centroid calculation method of image moments.
[0028] Preferably, the specific process of step S3 three-dimensional coordinate reconstruction includes:
[0029] Use the triangulation method to reconstruct the three-dimensional coordinates. For the marker points in the world coordinate system, the coordinates (u1, v1) of the imaging point p1 of the left camera and the coordinates (u2, v2) of the imaging point p2 of the right camera are known. At the same time, the projection matrices M1 and M2 of the left and right cameras have been obtained through camera calibration. Based on the projection relationship of the cameras, the following mathematical model can be obtained.
[0030]
[0031] Among them, s1 and s2 are the camera imaging scale factors; after expanding the equations and eliminating s1 and s2, the following four equations can be obtained:
[0032]
[0033] It can be calculated that the position (x w , y w , z w ) of the reflective marker point in the world coordinate system; use the least squares method to optimize and solve this equation, and the three-dimensional coordinates of the marker point can be calculated.
[0034] Preferably, the specific process of step S4 false match elimination includes:
[0035] S41. Construct a distance matrix: Calculate the Euclidean distance between all three-dimensional points to construct a symmetric distance matrix D, where D ij represents the distance between the three-dimensional points P i and P j ;
[0036] S42. Distance constraint based on geometric distribution: Compare with the calculated D ij according to the known geometric distribution of the reflective marker balls on the surgical instrument:
[0037] |D ij -d i | ≤ ε match
[0038] where d i is the actual distance between the two balls, and ε match is a preset tolerance value used to control the matching accuracy. If all adjacent points of a certain point do not meet this condition, then this point is determined to be a mismatched point;
[0039] S43. Remove mismatched points: Remove the points determined to be mismatched from the three-dimensional point set, and the remaining points are used for subsequent pose calculation;
[0040] S44. Optimize the matching result: Count the number of points after removal. If the number of remaining points is less than three, then re-execute the stereo matching step and adjust the parameters to improve the matching success rate.
[0041] Preferably, the specific process of pose solution in step S5 includes:
[0042] Let the set of marked points in the surgical instrument coordinate system be and the corresponding point set in the world coordinate system be The transformation relationship between them can be expressed as:
[0043]
[0044] where R bw is the rotation matrix, and t bw is the translation vector, representing the rigid body transformation parameters from the surgical instrument coordinate system to the world coordinate system. During the solution process, first calculate the centers of the two sets of points, that is:
[0045]
[0046] Then perform a centering process on the marked points to eliminate the influence of overall translation, thereby obtaining a centered point set:
[0047]
[0048] Construct a covariance matrix H to describe the spatial relationship between the two sets of points:
[0049]
[0050] By performing singular value decomposition on H, we can obtain:
[0051] H = U∑V T
[0052] where U and V are the left and right singular vector matrices respectively, and Σ is a diagonal matrix. Using the result of singular value decomposition, the rotation matrix can be directly calculated:
[0053] R bw = VU T
[0054] In some cases, due to numerical errors, the determinant of R bw may be negative, i.e., det(R bw ) < 0. In this case, the sign of matrix V needs to be adjusted to ensure that R bw is an orthogonal matrix; finally, the translation vector can be calculated through the rotated center point:
[0055]
[0056] Based on the obtained R be and t bw , the pose of the surgical instrument in the world coordinate system can be obtained.
[0057] The beneficial effects of the present invention are as follows:
[0058] By integrating the cooperation between the FPGA side and the ARM side in the ZYNQ board, the present invention can utilize the parallel processing ability and high-speed bus of the hardware to realize the real-time performance of data acquisition, processing, and transmission, reduce the data transmission delay in surgical navigation, and improve the safety and accuracy of surgical operations.
[0059] The present invention adopts a modular structure. The modules used include image acquisition and preprocessing, surgical instrument tracking, data transmission and real-time display modules, etc. Each module has a clear division of labor, which is convenient for overall replacement and upgrade, providing sufficient space and convenient interfaces for future system upgrade and expansion to meet diverse medical needs in the future.
[0060] The present invention uses the Ethernet communication protocol as the communication method between devices and combines data compression and delay optimization technologies, which can quickly and stably transmit the positioning information of surgical instruments; since the present invention greatly reduces the information transmission delay, it can also support the real-time display of the trajectory of surgical instruments, greatly improving the operating feel during surgery and being beneficial to improving the quality and safety of surgery.
[0061] The present invention develops a highly integrated hardware platform based on ZYNQ, integrating functions such as data acquisition, processing, storage, transmission, and display required by the surgical navigation system. The device is small and portable, suitable for the operating room environment, and can be carried by medical staff between different operating rooms; the system design of the present invention is simple and efficient, reducing the hardware cost, and improving the convenience of future maintenance and upgrade through modular design, having excellent economic benefits and wide applicability.
[0062] In addition, in the method for calculating the position and posture of the surgical instrument of the present invention, a complete image processing and pose estimation process is constructed. Through steps such as marker point detection, feature point stereo matching, three-dimensional coordinate reconstruction, false match elimination, and pose solution, the accuracy and robustness of the three-dimensional positioning and posture calculation of the instrument are effectively improved. Aiming at problems such as marker point occlusion, image noise, and matching errors that may occur during the operation, a reliability detection based on circularity screening, a trajectory prediction compensation based on Kalman filtering, and a false match elimination mechanism based on geometric distribution are proposed, thereby enhancing the stability and continuity of the system in a complex dynamic environment and ensuring that the surgical navigation system reaches an excellent level in terms of high precision, real-time performance, and anti-interference performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is an architecture diagram of a ZYNQ-based surgical navigation optical positioning system in Embodiment 1 of the present invention;
[0064] Figure 2 It is a schematic structural diagram of the optical imaging unit in Embodiment 1 of the present invention;
[0065] Figure 3 It is a schematic diagram of the image acquisition and preprocessing module in Embodiment 1 of the present invention;
[0066] Figure 4 It is an overall flowchart of the method for calculating the position and posture of the surgical instrument in Embodiment 2 of the present invention;
[0067] Figure 5 It is a schematic diagram of the epipolar constraint in Embodiment 2 of the present invention;
[0068] Figure 6 It is a schematic diagram of the surgical instrument point and distance numbering in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] Embodiment 1
[0070] The following is a further explanatory description of the present invention in combination with specific embodiments. As Figure 1 shown, this embodiment is a ZYNQ-based surgical navigation optical positioning system, including an optical imaging unit. The optical imaging unit is connected to a display and a host computer through a ZYNQ board.
[0071] As Figure 2As shown in the figure, the optical imaging unit includes two groups of CMOS cameras. Near-infrared light LED light sources are arranged in front of both groups of CMOS cameras, and filter plates are arranged at the front ends of the near-infrared light LED light sources; the two groups of CMOS cameras are used to collect high-resolution image data of the surgical scene and support RAW10 format output; the near-infrared LED light sources emit near-infrared light in a specific band to provide directional illumination in the target band for the surgical scene to optimize the near-infrared imaging quality; the filter plates are arranged in front of each group of cameras to filter out light in non-target bands and enhance the image contrast.
[0072] As Figure 1 shown in the figure, an FPGA end and an ARM end are sequentially connected on the ZYNQ board, where:
[0073] The FPGA end is connected to the optical imaging unit. The FPGA end includes an image acquisition and preprocessing module and a data storage module. The image acquisition and preprocessing module is used to receive the original image data from the optical imaging unit and complete the synchronization, decoding, and preliminary processing of the image data; the data storage module is used to temporarily store the processed data and is connected to the ARM end.
[0074] As Figure 3 shown in the figure, the image acquisition and preprocessing module includes two independent units, and each unit includes:
[0075] The MIPI CSI-2 receiving subsystem is used to receive the image data from the CMOS camera;
[0076] The sensor demosaicing module is used to perform demosaicing processing on the received image data and convert it to the RGB format;
[0077] The gamma correction module is used to optimize the image brightness and contrast;
[0078] The video processing subsystem is used to perform format conversion on the image and output a grayscale image;
[0079] The frame buffer writing module is used to store the processed grayscale image data in the data storage module.
[0080] The image acquisition and preprocessing module adopts a time synchronization mechanism to realize the synchronous acquisition of the two groups of CMOS cameras, ensuring the temporal consistency of the dual-view images and providing high-precision input for subsequent image processing and positioning.
[0081] The ARM side runs an embedded Linux system and works in cooperation with the FPGA side; based on the image data provided by the FPGA side, the ARM side integrates a surgical instrument tracking module, a data transmission module, and a real-time display module; the surgical instrument tracking module is used to execute a positioning algorithm and generate high-precision positioning information; the data transmission module is connected to the host computer and transmits the positioning information to the host computer through Ethernet; the real-time display module is connected to a display and outputs image information to an external display through an HDMI or DP interface; the ARM side runs an embedded Linux system and is connected to the FPGA side through an AXI4 bus; the embedded Linux system combines a modular driver through a V4L2 interface to obtain grayscale image data in the data storage module in real time.
[0082] A data compression module, a transmission queue management module, and a latency optimization module are provided in the data transmission module, and the data transmission module transmits the position and attitude matrix of the surgical instrument to the host computer in real time through an Ethernet communication protocol.
[0083] The data transmission module transmits the position and attitude matrix of the surgical instrument to the host computer in real time through an Ethernet communication protocol; through data compression, transmission queue management, and latency optimization, this module ensures the fast and stable transmission of positioning information and at the same time supports the host computer to display the positioning trajectory of the surgical instrument in real time.
[0084] The real-time display module outputs the video image of the surgical scene to an external display in real time through an HDMI or DP interface, helps the operator view the intraoperative scene in real time, and assists in the navigation and decision-making of the surgical process.
[0085] The host computer receives the positioning information transmitted by the ZYNQ board through the data transmission module and is used to realize the real-time monitoring and feedback of the surgical instrument; the display is connected to the real-time display module and displays the video image of the surgical scene in real time, providing visual support for surgical navigation.
[0086] Embodiment 2
[0087] This embodiment is a surgical navigation optical positioning system based on the surgical navigation optical positioning system described in Embodiment 1, and a method for calculating the position and attitude of a surgical instrument using the surgical instrument tracking module on the ARM side, as Figure 4 shown, including the following steps:
[0088] S1. Marking point detection: Read the grayscale image stored in the data storage module, and perform binarization processing on the grayscale image; Eliminate too small noise points and too large error areas, and perform different processing on marking points of different shapes, specifically including the following steps:
[0089] S11. Binarization processing: First, perform binarization processing on the grayscale image obtained after the image acquisition and preprocessing module processes it, convert the marked point area into a highlighted area, and keep the background black to improve the contrast between the marked points and the background;
[0090] S12. Marked point extraction and screening: Combine contour detection to extract possible marked point candidate areas, and set a reasonable area threshold according to the known size of the marked points to eliminate too small noise points and too large error areas.
[0091] Calculate the circularity of each area:
[0092]
[0093] where A is the area of the region and C is the perimeter of the region contour.
[0094] S13. Processing of marked points in different forms:
[0095] For marked points with slight occlusion (0.70 ≤ ξ ≤ 0.85): Use the ellipse fitting method for correction;
[0096] For marked points with severe occlusion (ξ < 0.70) or short-term loss: Use the trajectory prediction method based on Kalman filtering for inter-frame information fusion, estimate the motion trend of the marked points, and compensate for it to improve the continuity and stability of detection;
[0097] For normal (ξ > 0.85) marked points: Calculate the center coordinates (u c , v c ) of the reflective points based on the centroid calculation method of image moments, and the calculation formula is as follows:
[0098]
[0099] where I(u, v) represents the pixel value (0 or 1) of the image at the pixel position (u, v).
[0100] S2. Feature point matching: Obtain the left and right camera projection matrices and the fundamental matrix by calibrating the binocular camera. As Figure 5 shown, use the epipolar constraint method for stereo matching; use the camera fundamental matrix F to limit the search range of the matching points:
[0101] l2 = Fp1
[0102] Once the imaging point p1 of the left camera is known, the epipolar line l2 in the right camera can be deduced through the fundamental matrix.
[0103] S3. Three-dimensional coordinate reconstruction: The triangulation method is used to reconstruct the three-dimensional coordinates. For the marked points in the world coordinate system, the coordinates (u1, v1) of the imaging point p1 of the left camera and the coordinates (u2, v2) of the imaging point p2 of the right camera are known. At the same time, the projection matrices M1 and M2 of the left and right cameras have been obtained through camera calibration. Based on the projection relationship of the cameras, the following mathematical model can be obtained.
[0104]
[0105] Among them, s1 and s2 are the camera imaging scale factors; after expanding the equations and eliminating s1 and s2, the following four equations can be obtained:
[0106] It can be calculated that the position of the reflective marked point in the world coordinate system is (x w , y w , z w ); the least squares method is used to optimize and solve this equation, that is, the three-dimensional coordinates of the marked point can be calculated.
[0107] S4. Elimination of false matches: Since there may be false matching points in the reconstructed three-dimensional coordinates, an effective strategy needs to be adopted to ensure the accuracy of the final result; in this embodiment, the following method is used to eliminate false matching points:
[0108] S41. Construct a distance matrix: Calculate the Euclidean distance between all three-dimensional points to construct a symmetric distance matrix D, where D ij represents the distance between the three-dimensional points P i and P j ;
[0109] S42. Distance constraint based on geometric distribution: As Figure 6 shown, according to the known geometric distribution of the reflective marked balls on the surgical instrument, compare it with the calculated D ij :
[0110] |D ij -d i |≤ε match
[0111] Among them, d i is the actual distance between the two balls, and ε match is the preset tolerance value used to control the matching accuracy; if all adjacent points of a certain point do not meet this condition, then this point is determined as a false matching point;
[0112] S43. Remove false matching points: Remove the points determined as false matches from the three-dimensional point set, and the remaining points are used for subsequent attitude calculation;
[0113] S44. Matching result optimization: Count the number of points after culling. If the number of remaining points is less than three, re - execute the stereo matching step and adjust the parameters to improve the matching success rate.
[0114] S5. Pose solution: Use the singular value decomposition method to calculate the spatial position and attitude matrix of the surgical instrument.
[0115] Let the set of marked points in the surgical instrument coordinate system be The corresponding point set in the world coordinate system be The transformation relationship between them can be expressed as:
[0116]
[0117] where, R bw is the rotation matrix, t bw is the translation vector, representing the rigid - body transformation parameters from the surgical instrument coordinate system to the world coordinate system; During the solution process, first calculate the centers of the two sets of points, that is:
[0118]
[0119] Then, perform a centering process on the marked points to eliminate the influence of the overall translation, thereby obtaining the centered point set:
[0120]
[0121] Construct the covariance matrix H to describe the spatial relationship between the two sets of points:
[0122]
[0123] By performing singular value decomposition on H, we can obtain:
[0124] H = U∑V T
[0125] where, U and V are the left and right singular vector matrices respectively, and Σ is a diagonal matrix; Using the results of singular value decomposition, the rotation matrix can be directly calculated:
[0126] R bw = VU T
[0127] In some cases, due to numerical errors, the determinant of R bw may be negative, that is, det(R bw ) < 0. At this time, the sign of matrix V needs to be adjusted to ensure that R bw is an orthogonal matrix; Finally, the translation vector can be calculated through the rotated center point:
[0128]
[0129] After obtaining R bw and t bw Based on this, the pose of the surgical instrument in the world coordinate system can be obtained.
[0130] As described above, it is only a further explanatory description of the present invention in combination with specific embodiments. All the descriptions made do not represent a limitation on the protection scope of the present invention. Any changes or replacement solutions that can be easily conceived by any person skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A surgical navigation optical positioning system based on ZYNQ, comprising an optical imaging unit, wherein the optical imaging unit is connected to a display and a host computer through a ZYNQ board card, and is characterized in that: The ZYNQ board is provided with an FPGA end and an ARM end connected in sequence. The FPGA end is connected to the optical imaging unit, and the ARM end is connected to the display. The FPGA end includes an image acquisition and preprocessing module and a data storage module. The ARM end includes a surgical instrument tracking module, a data transmission module, and a real-time display module. The data transmission module is connected to the host computer, and the real-time display module is connected to the display.
2. The surgical navigation optical positioning system based on ZYNQ according to claim 1, wherein: The optical imaging unit includes two groups of CMOS cameras. Near-infrared light LED light sources are arranged in front of the two groups of CMOS cameras, and filter plates are arranged at the front ends of the near-infrared light LED light sources.
3. The surgical navigation optical positioning system based on ZYNQ according to claim 2, characterized in that: The image acquisition and preprocessing module includes two independent units, and each unit includes: An MIPI CSI-2 receiving subsystem for receiving image data from the CMOS camera; A sensor demosaicing module for demosaicing the received image data and converting it into RGB format; A gamma correction module for optimizing image brightness and contrast; A video processing subsystem for converting the image format and outputting a grayscale image; A frame buffer writing module for storing the processed grayscale image data into the data storage module.
4. The surgical navigation optical positioning system based on ZYNQ according to claim 3, characterized in that: The ARM end runs an embedded Linux system. The ARM end is connected to the FPGA end through the AXI4 bus. The embedded Linux system combines a modular driver through the V4L2 interface to obtain the grayscale image data in the data storage module in real time.
5. The ZYNQ-based surgical navigation optical positioning system according to claim 4, wherein: The data transmission module is provided with a data compression module, a transmission queue management module, and a delay optimization module. The data transmission module transmits the position and attitude matrix of the surgical instrument to the host computer in real time through the Ethernet communication protocol.
6. The method for calculating the position and attitude of the surgical instrument according to any one of claims 1-5, characterized in that, Including the following steps: S1. Mark point detection: Read the grayscale image stored in the data storage module, perform binarization processing on the grayscale image, and convert the mark point area into a highlighted area; Calculate the circularity of each mark point area, set a suitable area threshold according to the known size of the mark point to eliminate too small noise points and too large error areas, and perform different processing on mark points with different shapes; S2. Feature point matching: Obtain the left and right camera projection matrices and the fundamental matrix by calibrating the binocular cameras, and use the epipolar constraint method for stereo matching; S3. Three-dimensional coordinate reconstruction: Use the triangulation method to reconstruct the three-dimensional coordinates and calculate the position of the retroreflective mark point in the world coordinate system; S4. Elimination of false matches: Use the distance constraint method based on geometric distribution to eliminate false matching points by calculating the geometric relationship between mark points; S5. Pose solution: Use the singular value decomposition method to calculate the spatial position and attitude matrix of the surgical instrument.
7. The method for calculating the position and attitude of a surgical instrument according to claim 6, wherein: The processing process for different-shaped mark points in the mark point detection in step S1 includes: For the marked points with slight occlusion: the ellipse fitting method is used for correction; for the marked points with severe occlusion or short-term loss: the trajectory prediction method based on Kalman filter is used for inter-frame information fusion, estimating the motion trend of the marked points and compensating them to improve the continuity and stability of detection; for the normal marked points: the centroid calculation method based on image moments is used to calculate the center coordinates of the reflective points.
8. The method for calculating the position and attitude of a surgical instrument according to claim 7, wherein: The specific process of the 3D coordinate reconstruction in step S3 includes: The triangulation method is used to reconstruct the 3D coordinates. For the marked points in the world coordinate system, the coordinates (u1, v1) of the imaging point p1 of the left camera and the coordinates (u2, v2) of the imaging point p2 of the right camera are known. At the same time, the projection matrices M1 and M2 of the left and right cameras have been obtained through camera calibration. Based on the projection relationship of the cameras, the following mathematical model can be obtained. Among them, s1 and s2 are the camera imaging scale factors; after expanding the equations and eliminating s1 and s2, the following four equations can be obtained: It can be calculated that the position of the reflective marker point in the world coordinate system is (x w , y w , z w ); By using the least squares method to optimize and solve this equation, the three-dimensional coordinates of the marker point can be calculated.
9. The method for calculating the position and orientation of a surgical instrument according to claim 8, wherein: The specific process of the false match elimination in step S4 includes: S41. Construct a distance matrix: Calculate the Euclidean distance between all three-dimensional points and construct a symmetric distance matrix D, where D ij represents the three-dimensional point P i and P j the distance between them; S42. Distance constraint based on geometric distribution: Compare with the calculated D according to the known geometric distribution of the reflective marker balls on the surgical instrument ij for comparison: |D ij -d i | ≤ ε match where d i is the actual distance between the two balls, and ε match is a preset tolerance value used to control the matching accuracy; if all adjacent points of a certain point do not meet this condition, then this point is determined to be a mis-matched point; S43. Remove the false match points: the points determined to be false matches are removed from the 3D point set, and the remaining points are used for subsequent pose calculation; S44. Optimize the matching result: count the number of points after removal. If the number of remaining points is less than three, the stereo matching step is re-executed, and the parameters are adjusted to improve the matching success rate.
10. The method for calculating the position and attitude of a surgical instrument according to claim 9, wherein: The specific process of the pose solution in step S5 includes: Let the set of marked points in the surgical instrument coordinate system be and the corresponding set of points in the world coordinate system be The transformation relationship between them can be expressed as: where, R bw is the rotation matrix, t bw is the translation vector, representing the rigid body transformation parameters from the surgical instrument coordinate system to the world coordinate system; in the solving process, first calculate the centers of the two sets of points, that is: Then, the marked points are de-centered to eliminate the influence of overall translation, so as to obtain the de-centered point set: Construct the covariance matrix H to describe the spatial relationship between the two groups of points: By performing singular value decomposition on H, the following can be obtained: H = U∑V T Among them, U and V are the left and right singular vector matrices respectively, and Σ is a diagonal matrix; using the result of singular value decomposition, the rotation matrix can be directly calculated: R bw = VU T In some cases, due to numerical errors, the determinant of R bw may be negative, i.e., det(R bw ) < 0. In this case, the sign of the matrix V needs to be adjusted to ensure that R bw is an orthogonal matrix; finally, the translation vector can be calculated from the rotated center point: Based on obtaining R bw and t bw , the pose of the surgical instrument in the world coordinate system can be obtained.