Intraoperative CBCT three-dimensional scanning positioning method based on X-ray anteroposterior perspective
Patent Information
- Application Number
- CN202611123586.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]手动调整方式完全依赖操作者的经验和对影像的主观判断,不同操作者之间的一致性差,且需要多次透视修正,导致辐射剂量增加和手术时间延长
[0014]该方法仅需正位及水平平移后的两次X光透视,通过三角相似关系直接计算病灶目标区域的三维空间位置,无需多次曝光或借助体外标记物进行配准。基于几何解析的定位过程消除了操作者主观经验对靶点判断的依赖,位置解算精度仅受平移距离和源像距参数精度影响,显著提升了病灶对中的重复性与准确性。术中仅两次低剂量透视即可完成精准定位,有效降低了患者与医护人员的累积辐射暴露风险,尤其适用于需要反复扫描验证的复杂骨科或介入手术场景。
Smart Images

Figure CN122827718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical imaging technology, and in particular to an intraoperative CBCT three-dimensional scanning and positioning method based on X-ray anteroposterior and lateral fluoroscopy. Background Technology
[0002] In intraoperative C-arm 3D scanning, it is typically necessary to align the target lesion area with the isocenter of rotation of the C-arm to ensure the quality and accuracy of the reconstructed image. Current routine practices often rely on the operator visually assessing the deviation between the lesion location and the isocenter point using anteroposterior and lateral X-ray fluoroscopy images, and manually adjusting the operating table or C-arm posture, repeatedly verifying the alignment until it is deemed satisfactory. Another common approach is based on the registration of preoperative 3D images (such as CT or MRI) with the intraoperative C-arm, using an optical or electromagnetic navigation system to guide the C-arm to the predetermined position. These methods are widely used in clinical practice, but all have inherent limitations.
[0003] Manual adjustment relies entirely on the operator's experience and subjective judgment of the images, resulting in poor consistency among operators and requiring multiple fluoroscopic corrections, leading to increased radiation dose and prolonged surgical time. When the lesion is located deep or has complex anatomical structures, visual assessment of the offset is often inaccurate, making it difficult to achieve accurate alignment on the first attempt, often requiring repeated attempts and severely affecting the continuity of the surgical procedure. While navigation systems provide quantitative guidance, they require the purchase of expensive tracking equipment and accompanying software, and the preoperative and intraoperative registration process is complex and susceptible to external environmental factors (such as electromagnetic interference and optical obstructions). Registration errors lead to guidance deviations, which in turn reduce positioning accuracy, while also increasing the complexity of system settings and the training requirements for operators.
[0004] Neither of these two methods can directly and efficiently calculate the three-dimensional spatial coordinates of the lesion based on real-time intraoperative X-ray fluoroscopy information, making it difficult to accurately guide the C-arm to the isocenter after a single or limited fluoroscopy session. This makes the intraoperative CBCT three-dimensional scanning positioning a key bottleneck affecting surgical efficiency and imaging quality, especially in minimally invasive interventional surgeries that require rapid and accurate acquisition of three-dimensional images, where the shortcomings of existing technologies are even more pronounced. Summary of the Invention
[0005] This invention provides an intraoperative CBCT three-dimensional scanning and localization method based on X-ray anteroposterior and lateral fluoroscopy, which can solve the problems in the prior art.
[0006] A first aspect of the present invention provides an intraoperative CBCT three-dimensional scanning localization method based on X-ray anteroposterior and lateral fluoroscopy, comprising: Slide the C-arm to the positive position to perform the first X-ray fluoroscopy to obtain the first fluoroscopic image, mark the projection imaging position of the target area of the lesion, and obtain the offset distance of the first projection imaging point relative to the center of the flat plate imaging surface. After the C-arm is translated horizontally by a preset fixed distance, a second X-ray fluoroscopy is performed to obtain a second fluoroscopic image. The corresponding projection imaging point of the lesion target area after translation and its offset distance relative to the center of the flat imaging surface are identified by feature matching. Based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat imaging surface, a system of equations is established and solved. Using the fixed horizontal translation distance, the offset distance of each of the two projection imaging points, and the known source-image distance parameters, the true horizontal distance of the lesion target area from the center of the flat imaging surface and the vertical distance from the focal point of the X-ray source are solved. Based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm sliding motion center to the focal point, determine the horizontal compensation displacement and vertical compensation displacement required to move the lesion target area to the C-arm sliding motion center; The C-arm is driven by a closed-loop control system based on end encoder position feedback to perform the horizontal and vertical compensation displacements, so that the target lesion area coincides with the sliding motion center of the C-arm to complete automatic centering and start three-dimensional scanning reconstruction.
[0007] Identifying the corresponding projected imaging points of the lesion target region after translation and their offset distance relative to the center of the flat imaging surface through feature matching includes: Using the local image block corresponding to the marked lesion target area in the first perspective image as a matching template, multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors; In the second perspective image, the sliding window method is used to traverse window by window. For each window position, the feature description vector of the corresponding local region of the image is extracted, and the normalized similarity measure between the feature description vector of the window position and the template feature vector is calculated. The center coordinates of the windows whose normalized similarity metric values reach the global maximum value and the maximum value exceeds the preset judgment threshold are determined as candidate same-name projection imaging points. The spatial topology distribution of feature points in the neighborhood of the candidate same-name projection imaging point is compared with the spatial topology distribution of feature points in the matching template. If the preset geometric constraints are met, the candidate same-name projection imaging point is confirmed as the same-name projection imaging point. The pixel distance difference between the corresponding projection imaging point and the center pixel of the flat plate imaging surface in the second perspective image pixel coordinate system is obtained, and the pixel distance difference is converted into a physical offset distance using the calibration mapping relationship between the unit pixel of the flat plate imaging surface and the actual physical size.
[0008] Multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors, including: The matching template is downsampled at various sampling intervals to generate a set of image layers with different resolutions. Each layer image is filtered by two-dimensional convolution kernels with different smoothing intensities. The difference response map between adjacent layers is calculated. Local response extreme points are detected in the difference response map of each layer as preliminary candidate points. For each preliminary candidate point, interpolation is performed using the response values of neighboring pixels to obtain sub-pixel precision coordinates. Points with response intensity below the contrast threshold and points with a single response direction located at the image edge are removed. The remaining points are used as the final candidate feature points. Centered on each final candidate feature point, a square region covering its neighborhood is defined. This square region is divided into several equally sized rectangular sub-regions. The gradient magnitude and gradient direction of each pixel in each rectangular sub-region are calculated. The direction distribution vector of each sub-region is obtained by weighting the direction with the magnitude. The direction distribution vectors of all sub-regions are concatenated in the order of spatial arrangement of the sub-regions to form the local feature description vector corresponding to the candidate feature point. The local feature description vectors corresponding to all the final candidate feature points within the matching template are aggregated into a template feature vector.
[0009] Based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat plate imaging surface, a system of equations is established and solved, including: A perpendicular line is drawn from the focal point of the X-ray source to the imaging surface of the flat plate, and the perpendicular point is used as the reference point. The focal point of the X-ray source, the first perspective projection imaging point, and the reference point are used as vertices. The distance from the first perspective projection imaging point along the direction of the imaging surface of the flat plate to the reference point is used as the first imaging offset, the vertical distance from the focal point of the X-ray source to the imaging surface of the flat plate is used as the known imaging distance, and the horizontal and vertical positions of the target area in space are used as unknowns to be determined. A geometric correspondence based on similar proportions is established. Using the focal point of the X-ray source, the corresponding projection imaging point of the secondary perspective, and the reference point as vertices, and using the distance from the corresponding projection imaging point of the secondary perspective to the reference point as the imaging offset after translation, a second set of geometric correspondences based on similar proportions is established. Using the fixed horizontal translation distance as the displacement constraint generated by the horizontal movement of the lesion target area from the initial position to the translated position, the two sets of geometric correspondences are combined. With the conditions that the initial imaging offset and the subsequent imaging offset are known, and the fixed horizontal translation distance is known, the vertical distance is first solved, and then the actual horizontal distance of the lesion target area from the center of the flat plate imaging surface in the horizontal direction after translation is obtained by substituting back.
[0010] Based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm sliding motion center to the focal point, determine the horizontal and vertical compensation displacements required to move the target lesion region to the C-arm sliding motion center, including: Based on the pixel coordinates of the corresponding projection imaging point on the flat plate imaging surface in the secondary perspective, the pixel distance between the corresponding projection imaging point and the inner edge of the flat plate and the pixel distance between the corresponding projection imaging point and the outer edge of the flat plate are calculated respectively. The values of the two pixel distances are compared. If the pixel distance with the outer edge of the flat plate is smaller, it is determined that the lesion target area is located in the outer half of the flat plate and the horizontal compensation direction is to move the target area towards the inner side of the flat plate. The value of the horizontal compensation displacement is the value of the actual horizontal distance. If the pixel distance to the inner edge of the tablet is smaller, it is determined that the lesion target area is located in the inner half of the tablet and the horizontal compensation direction is to move the target area to the outer side of the tablet. The value of the horizontal compensation displacement is the value of the actual horizontal distance. The vertical distance is compared with the known fixed distance from the center of the C-arm's sliding motion to the focal point of the X-ray source. If the vertical distance is greater than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move downward in the vertical direction to reduce the distance between the target area and the focal point. If the vertical distance is less than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move upward in the vertical direction.
[0011] The C-arm is driven to perform the horizontal and vertical compensation displacements by a closed-loop control system based on end encoder position feedback, including: The motion control unit receives the horizontal compensation displacement and the vertical compensation displacement as motion target values, reads the current horizontal position real-time value and the current vertical position real-time value from the linear displacement sensor mechanically fixed to the load end of the C-arm, and uses the difference between the motion target value and the corresponding current position real-time value as the position deviation in the horizontal and vertical directions, respectively. The position deviation in each direction is assigned corresponding control weight parameters according to the deviation amplitude component, the deviation cumulative integral component, and the deviation change rate component, and then the weighted sum is calculated. The weighted sum is then converted into the incremental value of the motor drive signal in that direction. The motor is driven to perform motion in a segmented speed change manner. In the initial stage, the horizontal and vertical motors are driven at a preset initial speed. When the remaining moving distance fed back by the sensor enters the first adjacent interval, the current speed is reduced to half of the initial speed. When the remaining moving distance enters the second adjacent interval closer to the target, the speed is reduced by half again. The absolute value of the difference between the sensor feedback position and the moving target value is continuously compared with the preset positioning tolerance value. When the absolute value of the deviation in each of the two directions is less than or equal to the preset positioning tolerance value, the motor drive signal output is stopped, thus completing the closed-loop execution of the compensation motion.
[0012] A second aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0013] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0014] This method requires only two X-ray fluoroscopy scans, one in the anteroposterior position and the other after horizontal translation. It directly calculates the three-dimensional spatial position of the lesion target area using triangular similarity relationships, eliminating the need for multiple exposures or registration with external markers. The geometrically analytical localization process eliminates the operator's reliance on subjective experience in target point judgment. The accuracy of the position calculation is only affected by the accuracy of the translation distance and source-image distance parameters, significantly improving the repeatability and accuracy of lesion alignment. Precise localization can be achieved with only two low-dose fluoroscopy scans during the procedure, effectively reducing the cumulative radiation exposure risk for patients and medical staff. It is particularly suitable for complex orthopedic or interventional surgical scenarios requiring repeated scanning verification.
[0015] The closed-loop control system, combined with end-effector position feedback, automatically calculates and compensates for horizontal and vertical displacements, ensuring precise alignment of the lesion area with the C-arm's rotation center. The entire alignment process eliminates the need for manual adjustment of the robotic arm or reliance on intraoperative ultrasound or other auxiliary equipment, significantly simplifying the procedure and shortening surgical preparation time. Immediately after automatic alignment, a 3D scan reconstruction is triggered, achieving seamless integration from positioning to imaging. This reduces positioning deviations caused by patient movement or tissue deformation, ensuring the reconstructed image fully covers the target area with optimal spatial resolution.
[0016] This method has no special requirements for the size of the flat panel detector, the model of the C-arm, or the position of the scanning bed. It only requires a standard C-arm device with translational motion capabilities, thus possessing broad clinical compatibility. Through optimized combination of preset fixed translation distance and source-image distance parameters, it can adapt to positioning needs in different anatomical locations, from the spine to the limbs, without requiring hardware changes or adjustments to the core algorithm logic during surgery. While ensuring positioning accuracy, this method avoids the complex calibration process of traditional image template matching or inertial navigation, enabling even medical personnel without extensive operational experience to quickly master and efficiently complete autonomous centering operations for intraoperative 3D scanning. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the intraoperative CBCT three-dimensional scanning and localization method based on X-ray anteroposterior and lateral fluoroscopy according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the C-arm machine structure and its lifting, translation, and sliding degrees of freedom according to an embodiment of the present invention; Figure 3 This is a diagram showing the relationship between the X-ray source focal spot and the C-arm rotation center in an embodiment of the present invention. Figure 4 This is a diagram showing the relative positions of the patient and the C-arm machine during orthopedic positioning according to an embodiment of the present invention. Figure 5 This is a diagram showing the patient and device positions during lateral positioning according to an embodiment of the present invention; Figure 6 This is a triangular geometric relationship diagram of the perspective imaging of the target point in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0020] Figure 1 This is a schematic diagram of the intraoperative CBCT three-dimensional scanning and positioning method based on X-ray anteroposterior and lateral fluoroscopy according to an embodiment of the present invention.
[0021] Intraoperative CBCT three-dimensional scanning localization methods based on X-ray anteroposterior and lateral fluoroscopy include: Slide the C-arm to the positive position to perform the first X-ray fluoroscopy to obtain the first fluoroscopic image, mark the projection imaging position of the target area of the lesion, and obtain the offset distance of the first projection imaging point relative to the center of the flat plate imaging surface. After the C-arm is translated horizontally by a preset fixed distance, a second X-ray fluoroscopy is performed to obtain a second fluoroscopic image. The corresponding projection imaging point of the lesion target area after translation and its offset distance relative to the center of the flat imaging surface are identified by feature matching. Based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat imaging surface, a system of equations is established and solved. Using the fixed horizontal translation distance, the offset distance of each of the two projection imaging points, and the known source-image distance parameters, the true horizontal distance of the lesion target area from the center of the flat imaging surface and the vertical distance from the focal point of the X-ray source are solved. Based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm sliding motion center to the focal point, determine the horizontal compensation displacement and vertical compensation displacement required to move the lesion target area to the C-arm sliding motion center; The C-arm is driven by a closed-loop control system based on end encoder position feedback to perform the horizontal and vertical compensation displacements, so that the target lesion area coincides with the sliding motion center of the C-arm to complete automatic centering and start three-dimensional scanning reconstruction.
[0022] In one optional implementation, identifying the corresponding projected imaging point of the lesion target region after translation and its offset distance relative to the center of the flat imaging surface through feature matching includes: Using the local image block corresponding to the marked lesion target area in the first perspective image as a matching template, multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors; In the second perspective image, the sliding window method is used to traverse window by window. For each window position, the feature description vector of the corresponding local region of the image is extracted, and the normalized similarity measure between the feature description vector of the window position and the template feature vector is calculated. The center coordinates of the windows whose normalized similarity metric values reach the global maximum value and the maximum value exceeds the preset judgment threshold are determined as candidate same-name projection imaging points. The spatial topology distribution of feature points in the neighborhood of the candidate same-name projection imaging point is compared with the spatial topology distribution of feature points in the matching template. If the preset geometric constraints are met, the candidate same-name projection imaging point is confirmed as the same-name projection imaging point. The pixel distance difference between the corresponding projection imaging point and the center pixel of the flat plate imaging surface in the second perspective image pixel coordinate system is obtained, and the pixel distance difference is converted into a physical offset distance using the calibration mapping relationship between the unit pixel of the flat plate imaging surface and the actual physical size.
[0023] After the initial anteroposterior fluoroscopy, the target lesion region, manually marked or automatically identified in the first fluoroscopic image, is used as a baseline. A local image block corresponding to this region is extracted as a template image for subsequent matching. The size of this local block should balance the integrity of texture information and computational efficiency, typically based on the bounding rectangle of the target lesion region, extended outward by a certain margin to ensure sufficient anatomical texture features are included. Multi-scale feature point detection is performed on this matching template, i.e., response calculations are performed on corner points, edges, and spots at different image pyramid levels, so that the final detected feature point set is robust to slight scaling, contrast changes, and local deformations that occur during image translation. For each detected feature point, a local image patch centered on that point is extracted. A fixed-dimensional feature description vector is generated based on the normalized gradient direction histogram statistics. The feature description vectors corresponding to all feature points within the matching template are aggregated to form a template feature vector set, which serves as a reference for retrieving corresponding projection imaging points in the second fluoroscopic image.
[0024] After the C-arm completes a predetermined fixed horizontal translation, a second perspective image is acquired. Since the horizontal translation of the C-arm is known and the imaging geometry is determined, the displacement direction and magnitude of the projected imaging points of the lesion target region in the second perspective image are predictable. This provides a reasonable prior constraint for the subsequent sliding window search range. A full image traversal is performed in the second perspective image using a sliding window. The window size is consistent with the matching template image block, and the sliding step size can be flexibly configured according to accuracy and speed requirements. For the local image region corresponding to each window position, the same multi-scale feature point detection and feature descriptor vector extraction process as the template is performed. Then, the feature descriptor vector set of the window position is compared with the template feature vector set. The overall similarity metric is calculated through cosine similarity or normalized cross-correlation between feature vectors, and this metric is normalized and mapped to... The interval is used to obtain the normalized similarity metric value corresponding to the window position. .
[0025] After traversal, calculate the normalized similarity metric for all window positions. Find the global maximum value. .Will Compared with the preset judgment threshold Comparison: If If the center coordinates of the corresponding window are determined as candidate projection imaging points of the same name; if If the match fails to find a reliable corresponding point, an abnormal alarm process should be triggered, prompting the operator to re-perform the perspective or adjust the marked area. Judgment threshold. The settings need to comprehensively consider factors such as the signal-to-noise ratio of X-ray images and the complexity of lesion texture. In clinical practice, empirical pre-calibration can be performed for different anatomical sites to balance the relationship between false match rate and false miss rate. When the window position corresponding to the global maximum value is unique and there is a significant difference between it and the second highest value, the reliability of the candidate point is further guaranteed.
[0026] Relying solely on global optimality based on similarity metrics still carries the risk of mismatches due to background regions with similar image grayscale distributions. To address this, spatial topological distribution analysis is performed on the feature point set within the neighborhood of the candidate corresponding projection imaging point. Specifically, the relative spatial positional relationships between feature points within the candidate region are calculated, including the distance ratio and azimuth angle between adjacent feature point pairs, forming a spatial topological descriptor for the candidate region. This spatial topological descriptor is then compared with the spatial topological descriptor of the feature point set in the matching template to determine whether they satisfy preset geometric constraints after considering the projection transformation introduced by the C-arm horizontal translation. The preset geometric constraints typically use the spatial arrangement consistency ratio of feature point pairs as a metric. When the consistency ratio exceeds a preset lower limit, the candidate corresponding projection imaging point is deemed to have passed the geometric consistency verification and is confirmed as a valid corresponding projection imaging point. If a candidate point fails the geometric constraint verification, it is considered a mismatch, and the search neighborhood is further expanded or the step size is reduced to re-execute the fine matching process.
[0027] After confirming the corresponding projection imaging point, obtain its pixel coordinates in the second perspective image pixel coordinate system. Simultaneously, obtain the reference coordinates of the center point of the flat panel imaging surface in the pixel coordinate system. The center pixel coordinates of the flat panel imaging surface are precisely measured and stored in the device parameter file during the factory calibration stage, and typically correspond to the geometric center of the effective imaging area of the flat panel detector. The pixel distance difference between the corresponding projected imaging point and the center of the flat panel imaging surface is calculated, i.e., the horizontal pixel difference. and vertical pixel difference .
[0028] When converting pixel distance differences to physical offset distances, it is necessary to refer to the calibration mapping relationship between the actual physical size of a unit pixel on the flat panel imaging surface. This calibration mapping relationship uses calibration coefficients. This indicates that the unit is millimeters per pixel, and its value is determined by the manufacturer through standard calibration phantom measurements before shipment, and can be periodically verified and updated in the device's routine quality control process. Horizontal physical offset distance. and vertical physical offset distance They are determined by the following relationships respectively: , .in, This refers to the horizontal physical offset distance of the corresponding projected imaging point in the second fluoroscopic image relative to the center of the flat imaging surface. This value, along with the offset distance obtained from the first fluoroscopy, is substituted into the subsequent triangular similarity equations to solve for the three-dimensional spatial coordinates of the lesion target area. This provides accurate geometric input for the subsequent calculation of the C-arm automatic centering compensation displacement. The entire feature matching process is executed fully automatically after image acquisition, without requiring manual intervention from the operator to identify point coordinates. This effectively reduces the impact of human error on positioning accuracy, while also reducing the operator's cognitive burden and improving the efficiency and safety of the intraoperative workflow.
[0029] In one optional implementation, multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors, including: The matching template is downsampled at various sampling intervals to generate a set of image layers with different resolutions. Each layer image is filtered by two-dimensional convolution kernels with different smoothing intensities. The difference response map between adjacent layers is calculated. Local response extreme points are detected in the difference response map of each layer as preliminary candidate points. For each preliminary candidate point, interpolation is performed using the response values of neighboring pixels to obtain sub-pixel precision coordinates. Points with response intensity below the contrast threshold and points with a single response direction located at the image edge are removed. The remaining points are used as the final candidate feature points. Centered on each final candidate feature point, a square region covering its neighborhood is defined. This square region is divided into several equally sized rectangular sub-regions. The gradient magnitude and gradient direction of each pixel in each rectangular sub-region are calculated. The direction distribution vector of each sub-region is obtained by weighting the direction with the magnitude. The direction distribution vectors of all sub-regions are concatenated in the order of spatial arrangement of the sub-regions to form the local feature description vector corresponding to the candidate feature point. The local feature description vectors corresponding to all the final candidate feature points within the matching template are aggregated into a template feature vector.
[0030] After obtaining the matching template, multi-scale feature point detection and description are required to generate a template feature vector set that can robustly represent the visual features of the lesion target region. Since the projected appearance of the lesion target region in X-ray fluoroscopy images undergoes slight scale and viewpoint changes with C-arm translation, the matching stability of feature points extracted at a single resolution in secondary fluoroscopy images is poor. Therefore, it is necessary to construct a multi-scale image space to cover the response extrema at different scales.
[0031] The matching template is downsampled at various sampling intervals to generate a set of image layers with different resolutions arranged from coarse to fine. The resolution reduction ratio between adjacent layers is usually set to a fixed factor, for example, each layer's resolution is reduced to half of the previous layer, thus forming an image pyramid structure. At each layer, the image of that layer is smoothed sequentially with a set of two-dimensional Gaussian convolution kernels with different standard deviation parameters, resulting in multiple filtered images with different degrees of blur within the same layer. By performing a difference operation on adjacent blurry images, a Gaussian difference response map is obtained within that layer. This difference response map approximates the response of the Laplacian Gaussian operator in terms of numerical distribution, and can simultaneously locate image structures with significant changes in spatial and scale dimensions. For the Gaussian difference response map of each layer, local response extrema are searched in the three-dimensional neighborhood (two spatial dimensions plus scale dimension), that is, the response value of the point is simultaneously greater than or less than the response values of the corresponding positions of all its spatial and scale neighboring pixels. These points are recorded as preliminary candidate points, recording their positions in the current layer's coordinate system and their corresponding scale parameters.
[0032] The coordinates of the initial candidate points are limited by the discrete pixel grid of the image, resulting in a localization accuracy of only integer pixels, which is insufficient for subsequent precise matching. Therefore, for each initial candidate point, a quadratic polynomial surface is constructed within its neighborhood using the response values of neighboring pixels for interpolation fitting. By solving for the stationary point coordinates of this polynomial, the extreme value position estimate at sub-pixel accuracy is obtained, thereby improving the feature point coordinate accuracy from the integer pixel level to the sub-pixel level. Two rounds of quality screening are then performed on the candidate points after sub-pixel refinement: the first round filters based on response intensity, eliminating those with absolute response values below a preset contrast threshold. Candidate points are selected based on their distribution characteristics in the response direction. These points are typically located in flat areas of the image, contributing very little to the image content description and being highly sensitive to noise. The second round filters based on the distribution characteristics of the response direction, calculating the Hessian matrix formed by the second-order partial derivatives within the neighborhood of each candidate point. The ratio of the trace to the determinant of the Hessian matrix is then used to determine the optimal candidate point. To measure the degree of principal curvature anisotropy of the response, when Exceeding the preset edge suppression threshold If a point is located at the edge of the image, and its response is highly concentrated along the edge direction, lacking a unique localization basis, it is discarded. After the above two rounds of screening, the remaining candidate points have sufficient response intensity and significant changes in all directions. These points are determined as the final candidate feature points for subsequent feature description vector calculation.
[0033] Before constructing local feature description vectors for each final candidate feature point, it is necessary to establish a rotation-invariant local coordinate system orientation for that feature point to ensure that description vectors extracted from the same physical location in different images have a consistent reference orientation. Centered on the feature point, the gradient directions of each pixel are statistically analyzed within a neighborhood determined by its scale parameter. Histograms of these orientations are accumulated using gradient magnitude as weights, and the dominant direction with the strongest response in the histogram is taken as the dominant feature direction of that feature point. All subsequent descriptions and operations are in the format of... It is performed in a local coordinate system after rotation from the reference direction, so that the description vector is invariant to image rotation changes.
[0034] Centered on each final candidate feature point, a square region covering its neighborhood is defined in the rotated and aligned local coordinate system. The side length of this square region is positively correlated with the scale parameter of the feature point, allowing the coverage to adapt to different scales. This square region is then uniformly divided into... Each square region is divided into three equal-sized rectangular sub-regions, each spatially covering a certain number of pixels. For each pixel within a square region, the gray-level difference in the horizontal and vertical directions is calculated to obtain the gradient magnitude at that pixel. and gradient direction .by As weight, The cumulative votes are added to the orientation histogram of the rectangular sub-region to which the pixel belongs. The orientation histogram divides the 360-degree orientation space into equal parts. There are 3 orientation bins, and the cumulative value of each bin represents the gradient energy distribution in the corresponding direction within that sub-region. After performing gradient magnitude weighted statistics on all pixels within the square region, each rectangular sub-region obtains a dimension of 1. The directional distribution vector. (The rest of the text appears to be incomplete and lacks context.) The directional distribution vectors corresponding to each sub-region are concatenated and spliced sequentially according to the spatial arrangement order of the sub-regions within the square region from left to right and from top to bottom, forming a total dimension of [dimensional value missing]. The local feature description vector. In practical applications, it is usually taken as... , This yields a 128-dimensional description vector. To suppress the influence of nonlinear illumination variations on the description vector, L2 normalization is applied to the concatenated description vector, and then the vector exceeding the amplitude truncation threshold is removed. The components are truncated to this threshold, and then L2 normalization is performed again to obtain the final local feature description vector.
[0035] After the above processing, each final candidate feature point within the matching template corresponds to a normalized local feature description vector. The local feature description vectors corresponding to all final candidate feature points within the matching template are aggregated to form the template feature vector set, i.e., the template feature vector. Each description vector in this set, along with its corresponding feature point's sub-pixel precision coordinates and scale parameters, is stored for subsequent retrieval and comparison during feature matching in the second perspective image. Because the multi-scale detection and orientation normalization processes ensure the invariance of the description vectors to scale and rotation changes, even if the lesion target area in the projected image undergoes slight deformation after C-arm translation, reliable corresponding point identification can still be achieved through description vector comparison, providing a stable image correspondence basis for subsequent 3D localization calculations.
[0036] In one optional implementation, a system of equations is established and solved based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat plate imaging surface, including: A perpendicular line is drawn from the focal point of the X-ray source to the imaging surface of the flat plate, and the perpendicular point is used as the reference point. The focal point of the X-ray source, the first perspective projection imaging point, and the reference point are used as vertices. The distance from the first perspective projection imaging point along the direction of the imaging surface of the flat plate to the reference point is used as the first imaging offset, the vertical distance from the focal point of the X-ray source to the imaging surface of the flat plate is used as the known imaging distance, and the horizontal and vertical positions of the target area in space are used as unknowns to be determined. A geometric correspondence based on similar proportions is established. Using the focal point of the X-ray source, the corresponding projection imaging point of the secondary perspective, and the reference point as vertices, and using the distance from the corresponding projection imaging point of the secondary perspective to the reference point as the imaging offset after translation, a second set of geometric correspondences based on similar proportions is established. Using the fixed horizontal translation distance as the displacement constraint generated by the horizontal movement of the lesion target area from the initial position to the translated position, the two sets of geometric correspondences are combined. With the conditions that the initial imaging offset and the subsequent imaging offset are known, and the fixed horizontal translation distance is known, the vertical distance is first solved, and then the actual horizontal distance of the lesion target area from the center of the flat plate imaging surface in the horizontal direction after translation is obtained by substituting back.
[0037] After identifying the projected imaging points and extracting the offset distances of the lesion target area, it is necessary to convert the imaging offset information obtained from two perspectives into the true position coordinates of the target area in three-dimensional space through geometric derivation. The entire derivation process is based on the perspective geometry of X-ray cone beam projection. The core idea is to utilize the proportional relationship of similar triangles between the X-ray source focal point, the projected imaging point, and the flat imaging surface, and solve the constraint equations generated by two independent perspectives simultaneously to eliminate redundant degrees of freedom in the unknowns, and finally determine the true spatial coordinates of the target area relative to the center of the flat imaging surface.
[0038] When establishing the geometric model, a perpendicular line is drawn from the focal point of the X-ray source to the imaging surface of the flat plate. The foot of this perpendicular is the reference point, which corresponds to the geometric center of the imaging surface of the flat plate in the direction of focal projection, and is also the zero point of the entire coordinate system. The vertical distance from the focal point of the X-ray source to the imaging surface of the flat plate is the source-image distance, denoted as . This value is calibrated at the factory and is a known inherent geometric parameter. A first right triangle is formed with the X-ray source focal point as the vertex, the projected image point of the lesion target area in the initial fluoroscopy as the endpoint of the base, and the reference point as the endpoint of the other base. In this triangle, the distance from the focal point to the reference point is... The distance from the reference point to the first perspective projection imaging point is the first imaging offset, denoted as . This value is derived from the horizontal physical offset distance of the marker point relative to the center of the flat imaging surface in the first perspective image, and has been calculated by converting pixel coordinates and calibration coefficients.
[0039] The target area is located in a spatial position within the patient's body, not on the flat imaging surface. Let the horizontal position of the target area relative to the reference point during the first fluoroscopy be... The vertical distance from the target area to the focal point of the radiation source is Since X-ray projection is a central projection, the target area, the focal point of the X-ray source, and the projection imaging point are collinear. Therefore, the small triangle containing the target area and the large triangle on the flat imaging surface satisfy a similarity relationship. Based on the proportional properties of similar triangles... and The ratio equals and The ratio, that is , sorted out At this point, the equation contains two unknowns. and A single perspective cannot uniquely determine the three-dimensional position of the target area, so constraints generated by a second perspective must be introduced.
[0040] Move the C-arm horizontally by a predetermined fixed distance. A second fluoroscopy is then performed. During this second fluoroscopy, the focal point of the X-ray source shifts horizontally, while the target lesion area within the patient remains stationary in space. A second right triangle is formed, with the focal point of the X-ray source during the second fluoroscopy as the vertex, the corresponding projected image point during the second fluoroscopy as the endpoint of the base, and the reference point as the endpoint of the other base. The horizontal physical distance from the corresponding projected image point during the second fluoroscopy to the reference point is the image offset after translation, denoted as [missing information]. Similarly, it has been obtained by converting pixel coordinates and calibration coefficients.
[0041] Because the C-arm has been horizontally translated The horizontal position of the focal spot relative to the patient coordinate system changes, while the spatial position of the target area remains unchanged. In the patient coordinate system, the horizontal relative position of the target area to the focal spot of the X-ray source during the second fluoroscopy becomes... However, the vertical distance from the target area to the flat imaging surface is still [missing information]. (Assuming the vertical distance from the focal point to the imaging plane of the flat plate remains constant during the C-arm translation, i.e., the source-image distance is...) (Unchanged). Based on the proportional relationship of similar triangles in the second perspective, and The ratio equals and The ratio, that is , sorted out .
[0042] Thus, we have obtained two variables containing the same unknown quantity. and The equation. Subtract the two equations to eliminate the... We can obtain: ; Therefore, the perpendicular distance can be directly calculated: ; in , , , All are known quantities, therefore It can be calculated directly. This represents the difference in the offset of the projected image point between the two perspective views. This difference is not zero when the C-arm undergoes horizontal translation, ensuring the validity of the solution. If the two offsets are equal, it means that the target area is exactly located on the translation axis of the C-arm, and the horizontal displacement is... It has no effect on the offset of the imaging point, but the constraint needs to be supplemented by the vertical auxiliary perspective, but this situation is extremely rare in normal use cases.
[0043] The solution obtained Substituting back into the first proportional equation, we obtain the horizontal position of the target area in the initial perspective coordinate system: ; Considering that actual positioning is more concerned with the true horizontal distance of the target area relative to the center of the current flat-panel imaging surface after secondary perspective, Substituting back into the second equation, we can directly obtain the true horizontal distance of the target area relative to the center of the flat imaging surface in the secondary perspective coordinate system: ; This is the reference value required for subsequent horizontal compensation displacement, representing the actual physical distance in the horizontal direction of the target area relative to the center of the flat imaging surface after the C-arm horizontal translation is completed, in millimeters.
[0044] In the vertical direction, the vertical offset of the target area relative to the flat imaging surface is also derived using similar triangles. This is expressed as the projection offset in the vertical direction. (That is, the vertical physical offset distance of the corresponding projected imaging point in the second perspective image relative to the center of the flat plate imaging surface, which comes from the calculation results of the previous step.) Substituting the same similarity ratio, the true vertical offset distance of the target area from the center of the flat plate imaging surface can be obtained. : ; Thus, by simultaneously solving two sets of proportional equations for similar triangles and progressively eliminating variables, the true physical coordinates of the target region relative to the center of the flat imaging surface in the horizontal and vertical directions were fully determined, providing accurate positioning input for subsequent calculations of the compensation displacement. The entire derivation process requires no additional markers or auxiliary tools, relying solely on the imaging offset information from two perspective views and the inherent geometric parameters of the C-arm, demonstrating strong practicality and feasibility.
[0045] In one optional implementation, based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm rotation center to the focal point, the horizontal and vertical compensation displacements required to move the lesion target area to the C-arm rotation center are determined, including: Based on the pixel coordinates of the corresponding projection imaging point on the flat plate imaging surface in the secondary perspective, the pixel distance between the corresponding projection imaging point and the inner edge of the flat plate and the pixel distance between the corresponding projection imaging point and the outer edge of the flat plate are calculated respectively. The values of the two pixel distances are compared. If the pixel distance with the outer edge of the flat plate is smaller, it is determined that the lesion target area is located in the outer half of the flat plate and the horizontal compensation direction is to move the target area towards the inner side of the flat plate. The value of the horizontal compensation displacement is the value of the actual horizontal distance. If the pixel distance to the inner edge of the tablet is smaller, it is determined that the lesion target area is located in the inner half of the tablet and the horizontal compensation direction is to move the target area to the outer side of the tablet. The value of the horizontal compensation displacement is the value of the actual horizontal distance. The vertical distance is compared with the known fixed distance from the center of the C-arm's sliding motion to the focal point of the X-ray source. If the vertical distance is greater than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move downward in the vertical direction to reduce the distance between the target area and the focal point. If the vertical distance is less than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move upward in the vertical direction.
[0046] After obtaining the actual horizontal and vertical distances of the target lesion area, these two spatial position parameters need to be further converted into compensation displacements that can be directly driven by the C-arm actuator, including two components in the horizontal and vertical directions. Each component needs to be accompanied by a clear motion direction judgment in order to drive the C-arm to accurately move the target lesion area to the sliding motion center to complete the centering.
[0047] The determination of the horizontal compensation direction depends on the positional relationship of the corresponding projection imaging points on the flat plate imaging surface. In the pixel coordinate system of the second-perspective image, the flat plate imaging surface has a fixed horizontal pixel width range, and its inner and outer edges have known fixed values in pixel coordinates. The inner edge refers to the edge of the flat plate closer to the C-arm's sliding motion center, and the outer edge refers to the edge of the flat plate farther from the C-arm's sliding motion center. After obtaining the horizontal coordinates of the corresponding projection imaging points in the pixel coordinate system of the second-perspective image, the pixel distances between these points and the inner and outer edges of the flat plate are calculated, denoted as . and All units are pixels.
[0048] when This indicates that the corresponding projection point is closer to the outer side of the flat panel in the horizontal direction, meaning the projection of the lesion target area is biased outwards. Therefore, it is determined that the lesion target area is actually located in the outer half of the flat panel. In perspective imaging geometry, the projection point being biased outwards means that the target area is also located lateral to the center of the C-arm in actual space. Therefore, it is necessary to move the target area (i.e., the operating table or patient position) inwards towards the flat panel, bringing the target area closer to the center of the C-arm's rotation. At this time, the horizontal compensation displacement... The value of is the true horizontal distance obtained from the solution in the second perspective. The direction is to move inwards towards the inside of the flat plate.
[0049] when This indicates that the corresponding projection imaging point is closer to the inner side of the plate in the horizontal direction, meaning the projection of the lesion target area is biased inward. Therefore, it is determined that the lesion target area is actually located in the inner half of the plate, and in actual space, it is located inside the center of the C-arm. At this point, it is necessary to move the target area outward towards the plate, bringing it closer to the C-arm's sliding motion center, and compensate for the horizontal displacement. Similarly, the value is taken as the actual horizontal distance. The direction is to move outwards from the plate. The above judgment logic ensures that the correct compensation direction instruction can be given regardless of which side the lesion is biased towards, avoiding further deviation of the target area from the center due to misjudgment of direction.
[0050] It is worth noting that the determination of the horizontal compensation direction mentioned above is based on inferring the actual offset of the target area in space from the offset side of the projection point relative to the center of the plate in imaging geometry. This inference holds under the approximate condition of parallel projection in orthogonal perspective. When the C-arm is in orthogonal position, the focal point of the ray source is located directly above the plate, and the projection direction is approximately perpendicular to the plate surface. Therefore, the outward bias of the imaging point directly corresponds to the conclusion that the target area is actually biased outward in space.
[0051] Determining the vertical compensation amount involves the deviation of the target area from the center of motion of the C-arm in the height direction. The distance from the center of motion of the C-arm to the focal point of the X-ray source is a fixed parameter of the mechanical structure, denoted as... The unit is millimeters, determined by the equipment's factory calibration. The vertical distance from the target area to the focal point of the X-ray source, obtained from secondary perspective analysis, is... The unit is millimeters. and By comparing numerical values, it can be determined whether the target area is at the same height as the center of the C-arm's sliding motion in the vertical direction, and the direction of the deviation.
[0052] when This indicates that the distance from the target area to the focal point is greater than the distance from the C-arm's sliding motion center to the focal point, meaning the target area is located below the C-arm's sliding motion center (further from the focal point). To raise the target area to the same height as the C-arm's sliding motion center, the distance between the target area and the focal point needs to be reduced. This means driving the entire C-arm downwards, or equivalently moving the operating table upwards, bringing the target area closer to the focal point. The vertical compensation displacement at this time... Pick and The absolute value of the difference, i.e. The driving direction is that the C-arm moves downwards in the vertical direction.
[0053] when This indicates that the distance from the target area to the focal point is less than the distance from the C-arm's sliding motion center to the focal point, meaning the target area is above the C-arm's sliding motion center (closer to the focal point). To lower the target area to the same height as the C-arm's sliding motion center, the distance between the target area and the focal point needs to be increased, i.e., driving the C-arm upwards, or equivalently, moving the operating table downwards. The vertical compensation displacement at this time... Take the same and The absolute value of the difference, i.e. The driving direction is that the C-arm moves upward in the vertical direction.
[0054] when At that time, the target area is exactly located within the height plane of the C-arm's sliding motion center, so no vertical compensation is needed, and the vertical compensation displacement is... The value is zero. In practice, this can be handled by setting a tolerance range. When the vertical alignment tolerance is less than the preset tolerance, the vertical alignment requirement can be considered met, and there is no need to perform vertical drive.
[0055] In actual implementation, the horizontal compensation displacement and vertical compensation displacement All measurements are in millimeters, converted by the control system into target pulse counts or servo position commands for the corresponding motors. A closed-loop control system, using position feedback from the end encoder, precisely drives the C-arm to complete the displacement. Compensation in both directions can be performed sequentially or in parallel, provided the system allows, to improve alignment efficiency. After alignment, the control system confirms that the deviation between the actual encoder position and the target position is within acceptable limits, and then issues a command to initiate 3D scanning reconstruction, starting CBCT data acquisition. The entire compensation and alignment process requires no manual intervention, achieving the goal of automatically guiding the C-arm to precise positioning based on two planar perspective images.
[0056] In one optional implementation, the C-arm is driven to perform the horizontal and vertical compensation displacements via a closed-loop control system based on end encoder position feedback, including: The motion control unit receives the horizontal compensation displacement and the vertical compensation displacement as motion target values, reads the current horizontal position real-time value and the current vertical position real-time value from the linear displacement sensor mechanically fixed to the load end of the C-arm, and uses the difference between the motion target value and the corresponding current position real-time value as the position deviation in the horizontal and vertical directions, respectively. The position deviation in each direction is assigned corresponding control weight parameters according to the deviation amplitude component, the deviation cumulative integral component, and the deviation change rate component, and then the weighted sum is calculated. The weighted sum is then converted into the incremental value of the motor drive signal in that direction. The motor is driven to perform motion in a segmented speed change manner. In the initial stage, the horizontal and vertical motors are driven at a preset initial speed. When the remaining moving distance fed back by the sensor enters the first adjacent interval, the current speed is reduced to half of the initial speed. When the remaining moving distance enters the second adjacent interval closer to the target, the speed is reduced by half again. The absolute value of the difference between the sensor feedback position and the moving target value is continuously compared with the preset positioning tolerance value. When the absolute value of the deviation in each of the two directions is less than or equal to the preset positioning tolerance value, the motor drive signal output is stopped, thus completing the closed-loop execution of the compensation motion.
[0057] The motion control unit receives the horizontal compensation displacement. Vertical compensation displacement Subsequently, the two values are stored in the control register as the horizontal and vertical motion target values, respectively. Simultaneously, a linear displacement sensor mounted on the load end of the C-arm continuously reports its current position information to the control unit. Since the sensor is fixed to the C-arm's mechanical structure at the load end, the read position value directly reflects the actual physical displacement of the C-arm's end effector, rather than the rotor-side angle conversion value of the drive motor. Therefore, it effectively eliminates the influence of mechanical nonlinear factors such as transmission chain backlash and lead screw pitch error on positioning accuracy. The difference between the horizontal motion target value and the real-time horizontal position value fed back by the sensor is defined as the horizontal position deviation. The difference between the vertical moving target value and the real-time value of the current vertical position fed back by the sensor is defined as the vertical position deviation. Both enter their respective closed-loop control loops and independently calculate drive commands.
[0058] For each direction, the position deviation is decomposed into three components for control quantity calculation: the deviation amplitude component is directly taken as the position deviation value at the current moment, reflecting the current distance from the target position; the cumulative integral component is the sum of deviations within each control cycle, used to eliminate static position residuals; and the deviation rate of change component is the difference between the deviation values of two adjacent control cycles, reflecting the dynamic trend of position deviation, and playing a role in predicting overshoot and suppressing it in advance. The three components are multiplied by their corresponding control weight parameters and then summed to obtain the control output increment for the current direction within that control cycle. Taking the horizontal direction as an example, let the deviation for the current control cycle be... The deviation in the previous period was The cumulative historical deviation is The horizontal deviation amplitude weight is The integral weight is The differential weight is Then the horizontal direction controls the output increment. satisfy: ; This incremental value, superimposed on the reference value of the motor drive signal from the previous cycle, forms the final drive command transmitted to the horizontal motor driver in the current cycle. The vertical control output increment is calculated using the same structure. The corresponding deviation amplitude weight is The integral weight is The differential weight is The three sets of control weight parameters are determined through step response tuning experiments before the system leaves the factory, and a set of parameter tables is stored for each C-arm under different load conditions. During actual operation, the corresponding parameter set is automatically selected according to the weight level of the currently installed accessories to ensure the consistency of control response.
[0059] The motor motion is executed using a segmented speed-changing strategy. At the start of the motion, both the horizontal and vertical motors start at a preset initial speed. During operation, the positional deviation is relatively large, and the remaining movement distance reported by the sensors is relatively long. Driving at a higher speed can shorten the overall movement time and improve the efficiency of the surgical procedure. When the remaining movement distance reported by the sensors enters the first adjacent interval, the control unit reduces the current speed command to... The motor enters the medium-speed deceleration phase. The boundary distance of the first adjacent interval is calibrated based on the mechanical inertia of the C-arm and the maximum permissible braking acceleration to ensure that the motor dissipates its main kinetic energy before entering the fine positioning area, avoiding overshoot due to inertial overshoot. When the remaining travel distance enters the second adjacent interval, which is closer to the target than the first adjacent interval, the speed is halved again. During this phase, the movement is extremely slow, and the impact of sensor signal noise on position determination is negligible. The positioning accuracy is mainly determined by the low-speed crawling capability during this phase. The segmented speed-changing strategy effectively suppresses mechanical vibration and overshoot at the endpoint while ensuring rapid response, allowing the C-arm to smoothly stop near the target position.
[0060] Throughout the entire motion process, the closed-loop decision logic runs continuously with a fixed control cycle. Within each control cycle, the absolute value of the difference between the sensor feedback position and the corresponding direction of the target motion value is calculated and compared with a preset positioning tolerance value. Compare. Only when the absolute value of the horizontal positional deviation is... absolute value of vertical position deviation Simultaneously satisfying that each is less than or equal to Only when the absolute value of the deviation in either direction exceeds a certain threshold will the control unit issue a stop command to the motor drivers in both directions, cutting off the drive signal output and marking the end of the motion execution phase. The control loop continues to operate and continuously outputs corrective drive increments; premature shutdown is not permitted. Positioning tolerance value. The value needs to be determined by balancing the repeatability of mechanical positioning with the accuracy requirements of CBCT three-dimensional reconstruction center alignment. It is usually set to the sub-millimeter level to meet the clinical requirements of precise intraoperative positioning.
[0061] For handling abnormal situations, the motion control unit also monitors the continuity and rationality of sensor signals in each control cycle. If the sensor output value remains unchanged for several consecutive cycles and the drive signal is non-zero, it is determined that the sensor is disconnected or stuck, the drive signal is immediately stopped, and an alarm is triggered to protect the equipment. If the actual movement direction is detected to be opposite to the target deviation direction (i.e., the sensor feedback display position drifts away from the target), the protection shutdown procedure is also triggered. In addition, there are software travel limits in the horizontal and vertical directions. When the sensor feedback value exceeds the preset safe movement range boundary, the drive output in that direction is forcibly cut off to prevent damage to the mechanical structure caused by excessive movement. The above multiple protection mechanisms operate in parallel with the main closed-loop control logic, ensuring the reliability of the surgical equipment and patient safety without affecting normal positioning performance.
[0062] Once the shutdown conditions are met in both directions, the target lesion area has been moved in physical space to a position that coincides with the center of motion of the C-arm, completing the automatic alignment process. This triggers the start command for CBCT three-dimensional scanning reconstruction, and the subsequent cone-beam CT acquisition process begins.
[0063] like Figures 2-6 As shown, the method further includes: like Figure 2 As shown: This figure illustrates the mechanical structure of the C-arm of a CBCT scanner during surgery and its three electrically controlled degrees of freedom. The C-arm is arc-shaped, with X-ray source components and flat panel detector components mounted at both ends, and connected to the support column via a sliding mechanism in the middle. The figure clearly labels the "lifting" degree of freedom, which refers to the vertical movement of the C-arm along the column, used to adapt to patients of different body sizes and surgical areas of different heights; the "translation" degree of freedom refers to the horizontal movement of the C-arm, used to roughly align the X-ray beam center with the lesion area; and the "sliding" degree of freedom refers to the rotational movement of the C-arm around the geometric center of its arc-shaped guide rail, used to switch between anteroposterior and lateral fluoroscopy and to provide a rotational trajectory for 3D scanning acquisition. All three degrees of freedom are equipped with position detection sensors, which can feed back the real-time position of the end effector to the control system. The figure also shows point C, the center of rotation of the sliding motion, which is the rotation axis of the arc-shaped guide rail and the target reference point for subsequent alignment operations.
[0064] like Figure 3 As shown: This diagram illustrates the fixed geometric relationship between the X-ray source focus S and the C-arm's rotation center C. Focus S is located inside the X-ray source assembly at one end of the C-arm and is the emission point of the X-ray cone beam. Point C is located at the geometric center of the arc-shaped rotating guide rail and is also the isocenter of the beam's rotation in space. The distance from focus S to the rotation center C is a fixed value SC, determined by the equipment's machining and assembly precision, and stored as a system constant after factory calibration. The diagram shows that the X-ray beam's centerline passes through points S and C and is perpendicular to the flat imaging surface. When the C-arm rotates around point C, the trajectory of focus S is an arc centered at point C, while the beam centerline always passes through point C. Therefore, point C is the location with the optimal spatial resolution in 3D reconstruction. The precise value of SC is a core known condition for subsequent vertical compensation calculations; its accuracy directly affects the accuracy of resolving the spatial coordinates of the lesion target point. The equipment needs to be geometrically calibrated periodically to ensure the validity of this parameter.
[0065] like Figure 4 As shown: This figure illustrates the spatial arrangement of the patient and C-arm device in the anteroposterior fluoroscopic position. In this position, the C-arm slides to bring the flat panel detector horizontal, with the X-ray source directly above the panel. The X-ray beam's centerline passes vertically through the sliding center C and then irradiates the center of the flat panel's imaging plane. The patient lies supine on the operating table, with the target lesion area roughly positioned within the vertical projection path of the X-ray beam. During anteroposterior positioning, the operator first visually inspects or uses laser-assisted methods to coarsely adjust the C-arm to the vicinity of the surgical area using translational and vertical degrees of freedom, ensuring the lesion falls within the effective imaging range of the flat panel detector. The fluoroscopic image acquired in this position provides two-dimensional projection information of the lesion in the horizontal plane. The positional offset of the lesion's projection point relative to the center of the panel can be quantitatively extracted through subsequent image processing steps. The anteroposterior positioning is suitable for intraoperative imaging of areas such as the abdomen, pelvis, and distal extremities. Its advantages include patient comfort and alignment with most conventional surgical approaches, making it a commonly used position for obtaining baseline offset data during initial fluoroscopy.
[0066] like Figure 5 As shown: This figure illustrates the relative positions of the patient and the C-arm device in a lateral fluoroscopic view. In this position, the C-arm is rotated approximately 90°, placing the flat panel detector in a vertical position. The X-ray source is located on one side of the flat panel, and the X-ray beam centerline passes horizontally through the rotation center C and then vertically onto the flat panel imaging surface. The patient remains supine or, depending on the surgical needs, is positioned on their side, with the target lesion area located within the horizontal X-ray beam path. The fluoroscopic images acquired in the lateral position provide projection information of the lesion in the sagittal or coronal planes, forming a spatially orthogonal complementary relationship with the anteroposterior image. Lateral fluoroscopy is particularly important in surgical scenarios such as scoliosis correction and vertebroplasty, where the anterior and posterior depth of the lesion needs to be assessed. If the initial intraoperative positioning is lateral, the subsequent horizontal translation direction is adjusted accordingly to follow the patient's head-to-foot direction. The remaining geometric calculation process based on the spatial coordinates obtained from the two fluoroscopic views is exactly the same as in the anteroposterior positioning. In the figure, the flat panel and the X-ray source are positioned on either side of the patient, forming a horizontal projection chain. During operation, it is necessary to ensure that the patient's position does not obstruct the X-ray beam and that the lesion area is roughly located in the center of the imaging field of view.
[0067] like Figure 6 As shown: Figure 6 This is a schematic diagram of the core geometric analysis, clearly illustrating the triangular similarity relationships between the projection points and the spatial target points in two perspective views. (The diagram is shown in the image.) As the focal point of the X-ray source, The geometric center of the flat plate's imaging surface is located at a known distance below the focal point. (i.e., source-image distance) (Location). Target markers for the lesion during the initial fluoroscopy. Image points are formed on the flat plate by central projection. , arrive The distance is denoted as Then, the C-arm is translated horizontally a fixed distance. At this point, the target point remains relatively stationary due to the movement of the equipment; the spatial position of this target point is denoted as... Its projection on the flat panel becomes , arrive The distance is denoted as The diagram also marks the inner and outer edges of the plate to help determine the projection point's orientation and thus the horizontal compensation direction. Based on the rectilinear propagation characteristics of X-rays, the focal point... Target point With projection point Three points are collinear. , and The three points are also collinear. This can be deduced from the principle of similar triangles. and ,in The perpendicular distance from the target point to the focus. and These are the horizontal distances from the target point to the center line of the ray beam during the two fluoroscopic examinations. and The difference is equal to the equipment translation distance. ,Right now By combining the above proportional equations, the unknown intermediate quantities can be eliminated, and the vertical height of the target point can be directly calculated. and horizontal offset This provides precise numerical data for the horizontal and vertical compensation motion of the C-arm.
[0068] In the engineering implementation of the intraoperative CBCT three-dimensional scanning automatic centering and positioning method, the device completes anteroposterior and lateral calibration and the inner and outer sides of the flat panel in its initial state. During anteroposterior calibration, the horizontal angle gauge is placed on the C-arm flat panel imaging surface, and the sliding angle is adjusted to make the angle gauge reading [value missing]. At this point, the center of the X-ray beam coincides with the vertical direction, and the current reading of the sliding encoder is recorded as the positive reference value. During lateral calibration, continue sliding the C-arm until the angle meter reading is... Record the corresponding encoder value as the side reference value. The inner and outer calibration of the flat plate uses a physical marking method, selecting a side length not less than... The metal block is fixed to the outer edge of the flat plate. After perspective imaging, the edge of the metal block closest to the body is marked as the inner baseline of the flat plate, and the opposite edge is marked as the outer baseline of the flat plate. The pixel coordinates of the baseline are stored in the configuration file for later use.
[0069] After the patient is positioned for surgery, the operator moves the C-arm device to the vicinity of the surgical area, visually ensuring the lesion area is roughly within the fluoroscopic field of view. Upon receiving the start command, the control module reads the current position of the sliding encoder, calculates the deviation from the positivity reference value, and drives the sliding motor at a speed of [number] seconds. The angular velocity of the motion reaches a deviation of less than Stop at the designated time to complete the alignment. After alignment, trigger the X-ray generator for the first fluoroscopic exposure, with the exposure parameters being the tube voltage. tube current Exposure time The flat panel detector collects raw image data and transmits it to the image processing module.
[0070] After receiving the raw image, the image processing module performs grayscale normalization, mapping pixel values to the range of 0 to 255. The user interface displays the processed image for the physician to mark regions of interest. The physician uses the mouse to draw rectangular or elliptical areas on the image, and the system extracts the coordinates of the region boundaries and calculates the geometric center point. The pixel coordinates of this center point are designated as the initial marking point. Projection position on the imaging plane The physical dimensions of the flat panel detector are... correspond Pixels Pixels, each pixel corresponds to .calculate Tap the center of the tablet The actual distance is obtained by multiplying the pixel distance by the pixel physical size. The unit is millimeters.
[0071] System Comparison If the x-coordinate of the point and the x-coordinate of the center of the plate are... If the x-coordinate of a point is less than the x-coordinate of the center, the projection point is determined to be closer to the inside of the plate; otherwise, it is closer to the outside. When the projection point is closer to the inside, the motion control module calculates the fixed distance that the translational degree of freedom needs to move outward. The value is set to the width of the flat plate. Right now This ensures that the projected points remain within the imaging area during the second perspective view. The translational degree of freedom is achieved by a stepper motor driving a ball screw, with a screw lead of [value missing]. / Revolution, motor microstepping set Steps / revolutions, theoretical resolution is / Step. The controller reads the current position of the translation encoder; the encoder is an absolute linear encoder with high precision. The target position is calculated as the current position plus... Value, drive motor with Move quickly to the target location Decelerate to ,distance Then slow down to The absolute value of the deviation between the encoder feedback position and the target position is less than Stop moving.
[0072] After translation is complete, the system automatically triggers a second perspective exposure, with the same exposure parameters as the first. Upon receiving the second image, the image processing module initiates a feature recognition algorithm. This algorithm extracts keypoint descriptors within the initially marked region based on scale-invariant feature transformation. The descriptor dimension is [missing information]. A 3D floating-point vector. Search in the second image for the matching point with the smallest Euclidean distance to the initial descriptor. When the number of matching points exceeds... And the matching confidence is greater than 1. Successful identification is considered achieved at this point. The centroid coordinates of all matching points in the second image are calculated as the projected positions of the moved marker points. Calculate the same To the tablet center actual distance .
[0073] get and After considering the two distance values, combine them with the known distance values. Value and translation distance Perform triangular relationship calculations. This is the vertical distance from the focal point of the X-ray source to the flat imaging surface; this value is specified in the device configuration file. According to the principle of similar triangles, the distance from the marker point to the center line of the ray beam is proportional to the distance from its projection onto the center of the plate, and the proportionality constant is the perpendicular distance from the marker point to the focal point. and The ratio. Marked points during initial perspective. horizontal distance and The ratio equals and The ratio, the marked points during the second perspective. horizontal distance and The ratio is also equal to and The ratio. Because the marker point from Move to The actual distance is equal to the equipment translation distance. Establish an equation Substituting the above proportional relationships into the equation and eliminating... and get Further calculations Simplify to get .
[0074] The calculation process is illustrated using actual data as an example. Assume the initial perspective marker projection distance is... for Equipment translation Second perspective projection distance for for Substitute into the formula to calculate. ,get Further calculations ,get The calculation results show that the marked points The horizontal offset relative to the beam centerline is The vertical distance from the marker point to the focus is .
[0075] get and After setting the value, the system needs to determine the marker point relative to the C-arm's sliding center. Spatial location. The point is located on the center line of the ray beam, the focal point arrive fixed distance of points This value is stored in the device configuration parameters. Comparing the second perspective view The distance between the point and the inner and outer reference lines of the plate, if If the x-coordinate is greater than the x-coordinate of the plate center, the marker point is located outside the ray beam centerline, and the motion control module needs to move the translational degree of freedom outward. Distance. Comparison Value and Value, if Greater than This indicates that the marker point is below the center of rotation. The lifting degree of freedom needs to be moved downwards. The distance, in this example, the downward movement distance is .like Less than Then the lifting degree of freedom moves upward. The distance.
[0076] Both translational and lifting movements employ a closed-loop control strategy, with the controller operating according to positional control principles. The algorithm calculates the output. The proportionality coefficient in the parameters is set to The integral coefficient is set to The differential coefficients are set as follows: The sampling period is The controller reads the encoder's current position each cycle, calculates the deviation from the target position, and when the absolute value of the deviation is greater than... The motor runs at maximum speed Movement, deviation in arrive The speed decreases to the interval The deviation is arrive The speed decreases to the interval The deviation is less than The speed decreased to The integral term accumulates the deviation and multiplies it by the integral coefficient, with an upper limit of 20% of the total output to prevent integral saturation. The derivative term calculates the difference between the current deviation and the deviation of the previous cycle, divides it by the sampling period, and then multiplies it by the derivative coefficient. The sum of the three outputs is then limited to the maximum driving capacity range of the motor and converted into the stepper motor pulse frequency, which is then sent to the driver. When continuous... The absolute value of the deviation within each sampling period is less than Once the target position is determined, the movement stops and a completion signal is sent.
[0077] The lifting freedom is driven by an AC servo motor with a rated speed of [missing information]. In conjunction with the reduction ratio Planetary reducer and lead The trapezoidal lead screw has a theoretical output speed of The lifting encoder is an incremental rotary encoder mounted on the motor shaft, with a resolution of [missing information]. The linear resolution, calculated using the reduction ratio and lead screw, is [pulse / revolution]. The controller employs a dual-loop structure consisting of a speed loop and a position loop, with the outer loop of the position loop having a period of... Speed loop inner cycle During the lifting and lowering process, the load current needs to be monitored in real time. If the current exceeds 120% of the rated value for an extended period, the load current will be flagged. The overload protection is triggered, stopping the movement and triggering an alarm.
[0078] After the centering motion is completed, the system verifies whether the marker point has accurately moved to the sliding center position. It then drives the C-arm to slide to the side for verification fluoroscopy, keeping the exposure parameters constant. The image processing module automatically identifies the marker point position in the verification image and calculates its projection distance to the center of the flat plate. If the distance is less than... If the alignment is successful, the offset is recalculated and a compensation movement is executed. The compensation movement adjusts only the translation and elevation degrees of freedom, and the movement distance is the offset measured during perspective verification. The control precision requirement is the same as the initial alignment. Perspective verification can be performed a maximum of three times. If the offset is still greater than [a certain value] after three attempts, [further action will be taken]. This prompts for manual intervention to check for gaps in the mechanical transmission chain or whether the encoder is inaccurate.
[0079] After successful alignment verification, the C-arm slides to the set scanning start angle, which is commonly used as follows: The tablet is located on the left side of the device. The sliding motor switches to constant speed mode, and the speed is set to [speed value missing]. During the scanning process, the X-ray generator continuously exposes the light, with a pulse frequency of [missing information]. frame Exposure time per frame tube voltage tube current The flat panel detector synchronously acquires image sequences with an image resolution of [missing information]. Pixels Pixels, grayscale depth Position. Slide angle from arrive common The total number of images collected is approximately Frame. Image data is transmitted to the reconstruction workstation in real time, using... Cone bundle Reconstruction algorithm, voxel resolution Reconstruction time is approximately .
[0080] When initially selecting the lateral view, the C-arm is slid to the lateral reference angle during the calibration process. Subsequent fluoroscopy and translation directions are adjusted to follow the patient's head-to-foot direction. The remaining calculation steps and parameter configurations are exactly the same as for the anteroposterior view. The lateral view is suitable for spinal surgery scenarios, avoiding the impact of surgical instruments on fluoroscopic imaging quality.
[0081] A second aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0082] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0083] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intraoperative CBCT three-dimensional scanning localization based on X-ray anteroposterior and lateral fluoroscopy, characterized in that, include: Slide the C-arm to the positive position to perform the first X-ray fluoroscopy to obtain the first fluoroscopic image, mark the projection imaging position of the target area of the lesion, and obtain the offset distance of the first projection imaging point relative to the center of the flat plate imaging surface. After the C-arm is translated horizontally by a preset fixed distance, a second X-ray fluoroscopy is performed to obtain a second fluoroscopic image. The corresponding projection imaging point of the lesion target area after translation and its offset distance relative to the center of the flat imaging surface are identified by feature matching. Based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat imaging surface, a system of equations is established and solved. Using the fixed horizontal translation distance, the offset distance of each of the two projection imaging points, and the known source-image distance parameters, the true horizontal distance of the lesion target area from the center of the flat imaging surface and the vertical distance from the focal point of the X-ray source are solved. Based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm sliding motion center to the focal point, determine the horizontal compensation displacement and vertical compensation displacement required to move the lesion target area to the C-arm sliding motion center; The C-arm is driven by a closed-loop control system based on end encoder position feedback to perform the horizontal and vertical compensation displacements, so that the target lesion area coincides with the sliding motion center of the C-arm to complete automatic centering and start three-dimensional scanning reconstruction.
2. The method according to claim 1, characterized in that, Identifying the corresponding projected imaging points of the lesion target region after translation and their offset distance relative to the center of the flat imaging surface through feature matching includes: Using the local image block corresponding to the marked lesion target area in the first perspective image as a matching template, multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors; In the second perspective image, the sliding window method is used to traverse window by window. For each window position, the feature description vector of the corresponding local region of the image is extracted, and the normalized similarity measure between the feature description vector of the window position and the template feature vector is calculated. The center coordinates of the windows whose normalized similarity metric values reach the global maximum value and the maximum value exceeds the preset judgment threshold are determined as candidate same-name projection imaging points. The spatial topology distribution of feature points in the neighborhood of the candidate same-name projection imaging point is compared with the spatial topology distribution of feature points in the matching template. If the preset geometric constraints are met, the candidate same-name projection imaging point is confirmed as the same-name projection imaging point. The pixel distance difference between the corresponding projection imaging point and the center pixel of the flat plate imaging surface in the second perspective image pixel coordinate system is obtained, and the pixel distance difference is converted into a physical offset distance using the calibration mapping relationship between the unit pixel of the flat plate imaging surface and the actual physical size.
3. The method according to claim 2, characterized in that, Multi-scale feature point detection and description are performed on the matching template to generate a set of feature description vectors corresponding to the matching template as template feature vectors, including: The matching template is downsampled at various sampling intervals to generate a set of image layers with different resolutions. Each layer image is filtered by two-dimensional convolution kernels with different smoothing intensities. The difference response map between adjacent layers is calculated. Local response extreme points are detected in the difference response map of each layer as preliminary candidate points. For each preliminary candidate point, interpolation is performed using the response values of neighboring pixels to obtain sub-pixel precision coordinates. Points with response intensity below the contrast threshold and points with a single response direction located at the image edge are removed. The remaining points are used as the final candidate feature points. Centered on each final candidate feature point, a square region covering its neighborhood is defined. This square region is divided into several equally sized rectangular sub-regions. The gradient magnitude and gradient direction of each pixel in each rectangular sub-region are calculated. The direction distribution vector of each sub-region is obtained by weighting the direction with the magnitude. The direction distribution vectors of all sub-regions are concatenated in the order of spatial arrangement of the sub-regions to form the local feature description vector corresponding to the candidate feature point. The local feature description vectors corresponding to all the final candidate feature points within the matching template are aggregated into a template feature vector.
4. The method according to claim 1, characterized in that, Based on the triangular similarity relationship formed by the two projection imaging points, the focal point of the X-ray source, and the center of the flat plate imaging surface, a system of equations is established and solved, including: A perpendicular line is drawn from the focal point of the X-ray source to the imaging surface of the flat plate, and the perpendicular point is used as the reference point. The focal point of the X-ray source, the first perspective projection imaging point, and the reference point are used as vertices. The distance from the first perspective projection imaging point along the direction of the imaging surface of the flat plate to the reference point is used as the first imaging offset, the vertical distance from the focal point of the X-ray source to the imaging surface of the flat plate is used as the known imaging distance, and the horizontal and vertical positions of the target area in space are used as unknowns to be determined. A geometric correspondence based on similar proportions is established. Using the focal point of the X-ray source, the corresponding projection imaging point of the secondary perspective, and the reference point as vertices, and using the distance from the corresponding projection imaging point of the secondary perspective to the reference point as the imaging offset after translation, a second set of geometric correspondences based on similar proportions is established. Using the fixed horizontal translation distance as the displacement constraint generated by the horizontal movement of the lesion target area from the initial position to the translated position, the two sets of geometric correspondences are combined. With the conditions that the initial imaging offset and the subsequent imaging offset are known, and the fixed horizontal translation distance is known, the vertical distance is first solved, and then the actual horizontal distance of the lesion target area from the center of the flat plate imaging surface in the horizontal direction after translation is obtained by substituting back.
5. The method according to claim 1, characterized in that, Based on the difference between the actual horizontal distance, the vertical distance, and the distance from the C-arm sliding motion center to the focal point, determine the horizontal and vertical compensation displacements required to move the target lesion region to the C-arm sliding motion center, including: Based on the pixel coordinates of the corresponding projection imaging point on the flat plate imaging surface in the secondary perspective, the pixel distance between the corresponding projection imaging point and the inner edge of the flat plate and the pixel distance between the corresponding projection imaging point and the outer edge of the flat plate are calculated respectively. The values of the two pixel distances are compared. If the pixel distance with the outer edge of the flat plate is smaller, it is determined that the lesion target area is located in the outer half of the flat plate and the horizontal compensation direction is to move the target area towards the inner side of the flat plate. The value of the horizontal compensation displacement is the value of the actual horizontal distance. If the pixel distance to the inner edge of the tablet is smaller, it is determined that the lesion target area is located in the inner half of the tablet and the horizontal compensation direction is to move the target area to the outer side of the tablet. The value of the horizontal compensation displacement is the value of the actual horizontal distance. The vertical distance is compared with the known fixed distance from the center of the C-arm's sliding motion to the focal point of the X-ray source. If the vertical distance is greater than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move downward in the vertical direction to reduce the distance between the target area and the focal point. If the vertical distance is less than the known fixed distance, the vertical compensation displacement is taken as the absolute value of the difference between the two, and the C-arm is driven to move upward in the vertical direction.
6. The method according to claim 1, characterized in that, The C-arm is driven to perform the horizontal and vertical compensation displacements by a closed-loop control system based on end encoder position feedback, including: The motion control unit receives the horizontal compensation displacement and the vertical compensation displacement as motion target values, reads the current horizontal position real-time value and the current vertical position real-time value from the linear displacement sensor mechanically fixed to the load end of the C-arm, and uses the difference between the motion target value and the corresponding current position real-time value as the position deviation in the horizontal and vertical directions, respectively. The position deviation in each direction is assigned corresponding control weight parameters according to the deviation amplitude component, the deviation cumulative integral component, and the deviation change rate component, and then the weighted sum is calculated. The weighted sum is then converted into the incremental value of the motor drive signal in that direction. The motor is driven to perform motion in a segmented speed change manner. In the initial stage, the horizontal and vertical motors are driven at a preset initial speed. When the remaining moving distance fed back by the sensor enters the first adjacent interval, the current speed is reduced to half of the initial speed. When the remaining moving distance enters the second adjacent interval closer to the target, the speed is reduced by half again. The absolute value of the difference between the sensor feedback position and the moving target value is continuously compared with the preset positioning tolerance value. When the absolute value of the deviation in each of the two directions is less than or equal to the preset positioning tolerance value, the motor drive signal output is stopped, thus completing the closed-loop execution of the compensation motion.
7. An intraoperative CBCT three-dimensional scanning and positioning system based on X-ray anteroposterior and lateral fluoroscopy, used to implement the method as described in any one of claims 1-6, characterized in that, include: The first fluoroscopic unit is used to slide the C-arm to the positive position to perform the first X-ray fluoroscopy to obtain the first fluoroscopic image, mark the projection imaging position of the target area of the lesion, and obtain the offset distance of the first projection imaging point relative to the center of the flat plate imaging surface. The translation matching unit is used to translate the C-arm horizontally by a preset fixed distance and then perform a second X-ray fluoroscopy to obtain a second fluoroscopic image. It identifies the same-name projection imaging point of the lesion target area after translation and its offset distance relative to the center of the flat plate imaging surface through feature matching. The triangulation unit is used to establish and solve a system of equations based on the triangular similarity relationship between the two projection imaging points, the focal point of the X-ray source, and the center of the flat imaging surface. It uses a fixed horizontal translation distance, the offset distance of each of the two projection imaging points, and the known source-image distance parameters to solve for the true horizontal distance of the lesion target area from the center of the flat imaging surface and the vertical distance from the focal point of the X-ray source. The compensation calculation unit is used to determine the horizontal compensation displacement and vertical compensation displacement required to move the lesion target area to the C-arm sliding motion center based on the difference between the actual horizontal distance, the vertical distance and the distance from the C-arm sliding motion center to the focal point. The automatic centering unit is used to drive the C-arm to perform the horizontal compensation displacement and the vertical compensation displacement through a closed-loop control system based on the position feedback of the end encoder, so that the target area of the lesion coincides with the sliding motion center of the C-arm to complete the automatic centering and start the three-dimensional scanning reconstruction.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.