A scanning control method, electronic device, program product, and medium
Patent Information
- Application Number
- CN202610955728.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-08-21
AI Technical Summary
这些畸变图像在后期的拼接算法中难以被完全校正,往往导致拼接错位、边缘不连续等伪影
本申请提供的技术方案通过将畸变控制从后处理环节前移至采集环节,在每帧图像曝光后立即量化其几何畸变程度,并依据该畸变程度动态决定下一步的移动步长,使得后续采集能够主动适应被扫描对象的变化,从而在源头上抑制了锥形束畸变对拼接质量的影响。由于畸变程度与步长之间采用负相关控制,即畸变严重时缩短步长以使下一帧被扫描对象靠近探测器中心、畸变轻微时加大步长以快速推进,因此在被扫描对象弯曲变化剧烈的区域能够保证足够的采样密度以维持拼接精度,在被扫描对象平直的区域则避免了冗余采集,从而同时兼顾了图像质量与扫描效率。
Smart Images

Figure CN122604404A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a scanning control method, electronic device, program product, and medium. Background Technology
[0002] In the field of digital radiography (DR), when clinical needs require imaging of areas such as the spine and lower limbs that exceed the imaging range of a single detector scan, two-dimensional long-scan stitching technology is typically used. This technology involves controlling the X-ray tube and detector to move synchronously along the patient's long axis, exposing the images at multiple preset locations to acquire a series of partially overlapping two-dimensional images. These images are then combined using an image stitching algorithm to create a complete, long-format image. This imaging method can present a large range of anatomical structures with a relatively low radiation dose and is widely used in clinical departments such as orthopedics and spinal surgery.
[0003] In the aforementioned conventional procedure, the equipment typically moves and exposes images at a pre-set fixed step size. The system calculates a sequence of equally spaced exposure positions based on the detector's effective imaging size and a preset overlap rate. Then, the system controls the equipment to move sequentially to each position to trigger exposure. After acquisition, the sequence of images is stitched together using image registration and fusion algorithms. This "fixed-step acquisition, post-processing stitching correction" model has long been used in clinical practice. However, this model has fundamental problems when dealing with the inherent geometric characteristics of cone-beam X-rays. Unlike idealized parallel beams, actual X-ray sources emit cone-shaped beams. The projection of an object onto the detector will produce geometric distortion due to beam divergence. The further the object is from the detector or the closer it is to the edge of the beam, the more severe the distortion. In anatomical locations with physiological curvature, such as the spine, the projection position and angle of the vertebral bodies on the detector plane constantly change along the body's long axis. When the equipment moves at a fixed step size, some exposure positions happen to correspond to sections with greater curvature, where the anatomical structures are far from the detector center, resulting in particularly significant cone-beam distortion in the acquired images. These distorted images are difficult to completely correct in subsequent stitching algorithms, often resulting in artifacts such as stitching misalignment and discontinuous edges. In addition, there are significant differences in body shape and spinal curvature among different patients, and a fixed step size cannot be adjusted for individual differences, further exacerbating the instability of image quality. Summary of the Invention
[0004] In view of the above, this application provides a scanning control method, an electronic device, a program product, and a medium.
[0005] According to a first aspect of the embodiments of this application, a scanning control method is provided, the method comprising: Within the preset scanning range, along a predetermined safety path, the scanning equipment is controlled to move and sequentially perform X-ray exposure at multiple exposure positions to acquire multiple two-dimensional images. After each 2D image is acquired, the degree of distortion of the current 2D image is analyzed in real time. Based on the degree of distortion, the image movement step size from the current exposure position to the next exposure position is calculated, wherein the degree of distortion is negatively correlated with the image movement step size; The image movement step size is converted into the actual movement distance of the scanning device in physical space. Based on the actual movement distance, the scanning device is controlled to move to the next exposure position and acquire the next two-dimensional image. Repeat the above steps until two-dimensional image acquisition of all exposure positions within the preset scanning range is completed; The two-dimensional images captured from all exposure locations are stitched together to obtain a long-size two-dimensional image.
[0006] According to a second aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in the first aspect.
[0007] According to a third aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.
[0008] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.
[0009] The technical solution provided in this application can produce at least the following beneficial effects: The technical solution provided in this application moves distortion control from the post-processing stage to the acquisition stage. Immediately after each frame of image is exposed, the degree of geometric distortion is quantified, and the next step size is dynamically determined based on this distortion degree. This allows subsequent acquisitions to proactively adapt to changes in the scanned object, thereby suppressing the impact of cone-beam distortion on stitching quality at its source. Because a negative correlation is used between the distortion degree and the step size—shortening the step size when distortion is severe to bring the scanned object closer to the detector center in the next frame, and increasing the step size when distortion is slight for rapid advancement—sufficient sampling density is guaranteed in areas where the scanned object undergoes drastic curvature to maintain stitching accuracy, while redundant acquisition is avoided in areas where the scanned object is flat, thus simultaneously balancing image quality and scanning efficiency. Attached Figure Description
[0010] Figure 1This is a schematic flowchart illustrating a scanning control method according to an exemplary embodiment of this application; Figure 2 This is an exemplary embodiment of the present application illustrating the principle of cone beam projection geometry for converting image movement step size into actual physical movement distance; Figure 3 This is a schematic flowchart illustrating another scanning control method according to an exemplary embodiment of this application; Figure 4 This is a flowchart illustrating another scanning control method according to an exemplary embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application. Detailed Implementation
[0011] To address the distortion issues present in current 2D long-scan imaging, the inventors initially attempted to introduce more complex correction algorithms into the image stitching stage, such as nonlinear distortion correction based on feature point matching and registration optimization based on multi-scale fusion. The aim was to compensate for distortion defects left over from the acquisition phase through algorithmic means after image acquisition. However, in practical verification, this approach revealed fundamental technical obstacles. Distortion correction is essentially an ill-posed inverse problem—when the geometric distortion of the original image is too severe, the lost spatial information cannot be fully recovered by any algorithm. Especially when adjacent images exhibit inconsistent magnification in overlapping areas due to the cone-beam effect, even if the stitching algorithm can forcibly register, it will introduce local stretching or compression, thereby altering the true proportional relationship of anatomical structures. In other words, the upper limit of image quality is already limited by the fixed step size during the acquisition phase; post-processing correction can only provide limited improvement and cannot eradicate the distortion. At the same time, fixed step size also implies a loss of acquisition efficiency. In order to ensure the stitching quality in the worst case (where the curvature is greatest), operators are often forced to use smaller step sizes, which leads to unnecessary dense acquisition in sections where the anatomical structure is relatively straight, increasing the number of exposures and scanning time.
[0012] Therefore, a dedicated acquisition and control scheme must be designed to enable the 2D long-scan system to dynamically adjust the subsequent movement step size based on the real-time image quality, transforming distortion control from passive post-processing correction to active acquisition process optimization. This is effectively applicable to clinical imaging scenarios with complex anatomical curvatures, such as the spine and lower limbs. Based on the above analysis, this application proposes the following specific implementation method.
[0013] The specific embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0014] The scanning control method provided in this application embodiment can be executed by an electronic device, which may be an image workstation, a dedicated image processing server, a high-performance computer, or an embedded image processing system integrated into the scanning device, etc., which is connected in communication with the scanning device, and is used to perform real-time distortion analysis on the acquired two-dimensional image and control the movement of the scanning device.
[0015] Figure 1 This is a flowchart illustrating a scanning control method according to an exemplary embodiment of this application. Figure 1 As shown, the method includes steps S101 to S106.
[0016] Step S101: Within the preset scanning range, along a predetermined safe path, the scanning equipment is controlled to move and X-rays are sequentially exposed at multiple exposure positions to acquire multiple two-dimensional images.
[0017] Because the imaging range of a two-dimensional long scan typically exceeds the single-pass coverage width of the detector, the scanning device needs to move along the long axis of the scanned object to obtain sequential images. Therefore, the start and end boundaries of the scan must be predefined, and the scanning device must be able to move along an unobstructed trajectory during its movement. Here, "preset scan range" refers to the physical spatial range of the anatomical region to be imaged, set according to clinical needs. For example, this range is usually set to 80 cm for a full spine scan and 100 cm for a full-length lower limb scan. Different body parts can be selected between 30 cm and 100 cm. "Safe path" refers to the set of spatial trajectories that the scanning device can move freely during the scanning process without physical contact with the patient or bed. In one specific implementation, the safe path can be predetermined as follows: The electronic device controls the scanning equipment to move from the starting point to the ending point of a preset scanning range. During this movement, X-ray exposure is not activated; instead, the anti-collision detection system (such as a distance sensor array or a vision camera) on the scanning equipment monitors the surrounding environment in real time, recording all spatial locations along the entire movement trajectory that are deemed "safe to pass." These locations are then connected to form a verified, collision-free baseline path. Based on this, the electronic device controls the scanning equipment to move along this safe path, triggering X-ray exposures at multiple exposure locations in a specific sequence during the movement, acquiring a series of two-dimensional images covering the entire scanning range. In another implementation, the safe path can also be obtained through manual teaching by the operator. An experienced technician manually pushes the scanning equipment throughout the entire movement, and the electronic device records the angles of each joint and the position encoder readings during this process, using this as a path template for subsequent automatic operation.
[0018] Step S102: After acquiring each two-dimensional image, analyze the distortion degree of the current two-dimensional image in real time.
[0019] Because the X-ray source emits a cone-shaped beam rather than an ideal parallel beam, the projection of anatomical structures onto the detector exhibits increased geometric distortion as the distance between the structure and the detector center increases. Furthermore, this distortion cannot be fully recovered through post-processing after image acquisition. Therefore, it is necessary to quantitatively assess the degree of distortion immediately after each frame's exposure to provide a basis for subsequent step size adjustments. Here, "degree of distortion" is a comprehensive index characterizing the severity of spatial distortion caused by the cone-beam geometric effect in the currently captured image; a higher value indicates more significant geometric deformation and is less conducive to subsequent stitching.
[0020] In practical applications, the distortion level of a current two-dimensional image can be analyzed using various image processing techniques. In one specific implementation, the real-time analysis process can employ at least one of the following methods to quantify the degree of distortion.
[0021] The first approach is based on cortical bone edge sharpness analysis. The electronic device performs image segmentation on the current two-dimensional image to identify the cortical bone edge of the target anatomical structure (e.g., the vertebral body of the spine). Here, "cortical bone edge" refers to the high-density boundary line of the outer layer of dense bone on an X-ray image. Specifically, the Laplacian of Gaussian or Sobel operator can be used to convolve the image, extracting the edge response intensity along the direction of the scanning device's movement, denoted as k1. A larger k1 value indicates a sharper edge, meaning the projection of the anatomical structure onto the detector is closer to the ideal state of parallel projection; conversely, a smaller k1 value indicates more severe distortion. It should be noted that edge blurring may stem from two different factors: first, the physiological curvature of the patient's spine or lying posture causes an angle between the anatomical structure and the detector plane, resulting in a geometric deviation in the projected edge; second, the inherent divergence characteristics of the cone beam cause different degrees of distortion in the X-ray projections received by different rows (along the direction of movement) of the detector, with the distortion being smaller closer to the center of the detector. To comprehensively consider these two factors, the electronic device simultaneously reads the position parameter Ddet of the cortical bone edge on the detector along the direction of motion. This parameter represents the offset of the edge relative to the detector center row, i.e., the distance between the cortical bone edge and the detector center. Since the distortion amplitude of the cone beam increases from the detector center to the edge, the edge intensity and position parameter need to be jointly mapped to the distortion degree G1. The mapping relationship is G1=F1(k1,Ddet), where F1 is a mapping function in which k1 is negatively correlated with G1 (the more blurred the edge, the greater the distortion), and Ddet is positively correlated with G1 (the farther away from the center, the greater the distortion). Furthermore, as k1 decreases, G1 increases rapidly in an exponential manner to reflect the sensitive influence of edge blurring on distortion. It should be clarified that k1 here is only used as an input parameter of the mapping function to calculate the distortion degree component of the current image. This component then participates in the subsequent comprehensive distortion degree calculation, thus indirectly affecting the determination of the step size. k1 itself is not directly used to output the movement distance. In another implementation, boundary extraction can also use a deep learning-based segmentation network (such as U-Net) to directly output the cortical bone region, and statistically analyze the percentile of the edge gradient magnitude as an alternative measure of k1.
[0022] The second approach is image difference analysis based on the stitching position of adjacent frames. The electronic device extracts the visual features of the current 2D image I(i) and the previous 2D image I(i-1) within the overlapping region and calculates the image difference between them at the stitching position. Here, "image difference" measures the degree of geometric consistency between two adjacent frames at the stitching boundary; a larger difference indicates a more severe projection inconsistency caused by cone-beam distortion. In a specific implementation, the Scale Invariant Feature Transform (SIFT) operator can be used to extract feature points from the overlapping region of the two images, match the feature points, and then calculate the mean of the sum of squared Euclidean distances between all matching point pairs as a measure of image difference. Alternatively, mutual information can be used to measure the information correlation of the overlapping region of the two images; the lower the mutual information, the greater the image difference. Specifically, the image difference can be converted into the distortion degree G2=F2(I(i),I(i-1)) via the mapping function F2, where F2 can be a linear or exponential mapping, making the image difference positively correlated with G2. In another implementation, only the straight line structures (such as the vertebral endplate line) within the overlapping area can be extracted, and the angular and displacement deviations of these lines in adjacent frames can be calculated. The weighted sum of these deviations can then be used as a substitute measure of image difference.
[0023] The third approach is based on the projection angle deviation analysis of the transverse processes of the vertebral body. The electronic device uses image recognition algorithms to locate the transverse processes on both sides of the vertebral body in the current two-dimensional image and calculates the deviation angle θ between the transverse processes and the center of the vertebral body. Here, "transverse process" refers to the bony protrusions of the vertebral body that protrude laterally, appearing symmetrically distributed in the X-ray projection. When the vertebral body is in a physiological lateral curvature or the patient is lying down, causing the vertebral body to be non-parallel to the detector plane, the projection of the transverse processes will be deflected relative to the center of the vertebral body. The larger this deflection angle θ, the more severe the deviation of the vertebral body's spatial posture from the ideal alignment at that exposure position, resulting in greater distortion. The electronic device normalizes this angle by dividing it by the maximum possible deviation angle max(θ), obtaining the distortion degree G3 = θ / max(θ). Alternatively, the ratio of the distances from the tips of the transverse processes on both sides to the center of the vertebral body can be directly measured. A greater deviation in this ratio also indicates vertebral rotation or tilting, and this ratio, after mapping, serves as a substitute measure for the degree of distortion.
[0024] When at least two of the above methods are used to determine the degree of distortion, the electronic device can perform a weighted sum of the distortion degrees calculated by each method to obtain the final distortion degree. For example, when all three methods are used together to analyze and determine the degree of distortion, the final distortion degree can be Gtotal = w G1+wb G2+wc G3, where wa, wb, and wc are the weighting coefficients for each method, and their sum is 1. Specifically, each weight can be set according to clinical priority. For example, in scoliosis assessment, a higher sensitivity to transverse process angle deviation is required, so the value of wc can be increased. In one implementation, the default weights can be set to wa=0.3, wb=0.4, and wc=0.3. In another implementation, each weight can also be dynamically and adaptively adjusted based on the overall quality of the currently acquired images. For example, if the value of a certain method is consistently high in the sequence of images, the weight of that method can be appropriately increased to enhance its regulatory effect.
[0025] Step S103: Calculate the image movement step size from the current exposure position to the next exposure position based on the degree of distortion, where the degree of distortion is negatively correlated with the image movement step size.
[0026] After obtaining the distortion level of the current image, the electronic device needs to determine how far the scanning device should move next to ensure that the distortion of the next frame is sufficiently small without significantly increasing the number of exposures and scanning time due to an excessively small step size. Here, the "image movement step size" refers to the pixel distance between two adjacent exposure positions on the image plane. This step size will be converted into the physical movement distance of the scanning device in subsequent steps. The negative correlation between the distortion level and the step size means that if the current image has severe distortion, it indicates that the anatomical structure is far from the detector center at that position. The electronic device should control the scanning device to shorten the movement step size, making the next exposure position as close as possible to the currently verified area with less distortion, thereby ensuring that the anatomical structure in the next frame is closer to the detector center to reduce the cone-beam effect. Conversely, if the current image has slight distortion, it indicates that the anatomical structure is close to the ideal projection posture in that area. The electronic device can control the scanning device to increase the step size and advance quickly to save acquisition time. In one specific implementation, the image movement step size S is calculated as S = Smax - (Smax - Smin). Gtotal, where Smax is the maximum allowed image step size (corresponding to a certain proportion of the effective imaging width of the detector, such as 60% of the imaging width), Smin is the minimum image step size (usually taken as 20% of the imaging width to ensure the minimum overlap requirement), and Gtotal is the distortion degree calculated in step S102. As can be seen from this formula, the larger Gtotal is, the smaller S is, strictly achieving negative correlation control. In another implementation, the mapping between distortion degree and step size can also adopt a piecewise function form. For example, when Gtotal is below the first threshold, the step size is directly taken as Smax; when Gtotal is above the second threshold, the step size is directly taken as Smin, with linear interpolation used in the intermediate interval.
[0027] Step S104: Convert the image movement step size into the actual movement distance of the scanning device in physical space, control the scanning device to move to the next exposure position according to the actual movement distance, and acquire the next two-dimensional image.
[0028] Since the image movement step size S calculated in step S103 is the pixel distance on the image plane, while the motion actuator of the scanning device (such as a motor-driven guide rail or robotic arm) requires the actual movement distance in physical space, a geometric transformation relationship must be established between the two. Here, "actual movement distance" refers to the actual physical distance that the X-ray tube and detector as a whole translate along the long axis of the scanned object. Under cone-beam projection geometry, the relationship between the pixel displacement S on the image plane and the actual movement distance Dpic of the scanning device in physical space can be determined by the spatial positions of the X-ray source (tube), the scanned object, and the detector. Specifically, the transformation formula is Dpic = (P_scanned object - P_ray source). S / (P_detector - P_scanned_object), where P_source is the perpendicular distance from the X-ray source focal point to the detector (i.e., source-image distance), P_scanned_object is the distance from the center plane of the scanned object to the detector, P_detector is the detector's own position parameter in physical space (usually the detector surface is taken as a reference), (P_scanned_object - P_source) is the positional difference between the scanned object and the X-ray source, and (P_detector - P_scanned_object) is the positional difference between the detector and the scanned object. The geometric meaning of this formula is: the image movement step S measured on the detector, based on the similarity ratio of triangles, is used to inversely calculate the physical distance the entire scanning equipment needs to move. For example... Figure 2 As shown, the geometric meaning of this formula can be intuitively understood through the cone beam projection relationship. For example, assuming the distance from the X-ray source to the scanned object is 15cm and the distance from the scanned object to the detector is 30cm, then the scaling factor (P_scanned_object - P_X-ray_source) / (P_detector - P_scanned_object) is 0.5. In this case, the step size of each pixel on the image corresponds to a physical movement of the scanning device of approximately 0.5cm. The electronic device sends a pulse control signal to the motor driver based on the calculated Dpic, driving the scanning device to move precisely along the guide rail to the next exposure position. After reaching the position, it triggers the X-ray generator to expose and acquire the next two-dimensional image. In another implementation, if the scanning device adopts an isocentric scanning geometry (i.e., the X-ray tube and detector move around a fixed rotation center), the electronic device can first convert S into the actual physical offset on the detector, and then calculate the driving amount of each joint through inverse kinematics.
[0029] Step S105: Repeat the above steps until two-dimensional image acquisition of all exposure positions within the preset scanning range is completed.
[0030] After each movement and exposure acquisition in step S104, the electronic device uses the newly acquired image as the current 2D image, returns to step S102 to re-analyze its distortion level, and then executes steps S103 and S104 again in sequence, repeating this cycle iteratively. The cycle terminates when the scanning device reaches the end of the preset scanning range, i.e., the next calculated target exposure position exceeds the pre-defined scanning interval boundary. In one implementation, before each movement of the scanning device, the electronic device first determines whether "current position + actual movement distance" exceeds the endpoint coordinates. If it does, the endpoint position is used as the site for the last exposure, and the cycle ends after acquiring that frame. In another implementation, the cycle can also be forcibly terminated when the number of acquired images reaches a preset maximum frame count or the cumulative radiation dose reaches a preset limit to ensure patient safety.
[0031] Step S106: Stitch together the two-dimensional images acquired from all exposure locations to obtain a long-size two-dimensional image.
[0032] After cyclic acquisition, the electronic device stores a series of two-dimensional images, with a reasonable overlap between each pair of adjacent frames (the overlap rate dynamically changes due to distortion adaptive control, but is never lower than the minimum overlap requirement). The electronic device can invoke an image stitching algorithm to first perform feature point matching on adjacent frames (e.g., using SIFT or the accelerated robust feature SURF algorithm), calculate the spatial transformation matrix between frames (including translation, rotation, and scaling), and then map each frame image to a common coordinate system based on this transformation matrix. In the overlapping area, a weighted average or multi-resolution fusion strategy is used for pixel fusion, ultimately outputting a long-size two-dimensional image covering the entire scan range for clinical diagnosis. Alternatively, template matching or phase correlation methods can be used to calculate the displacement of adjacent frames, which is particularly suitable for X-ray images with clear bone edges.
[0033] After the cyclic processing of steps S101 to S106, the electronic device can dynamically adjust the subsequent movement step size according to the distortion degree of each frame, making the scanning process adaptable to changes in the structure of the scanned object to a certain extent. However, for cases where the stitching difference between adjacent frames is too large, the above step size adjustment mechanism itself has a limitation: when the geometric misalignment between two frames exceeds the tolerance range of the registration algorithm, even if the next movement step size is compressed to the minimum, the existing stitching gap cannot be eliminated, because the root cause of the problem lies in the lack of sufficient intermediate sampling points between the two exposures, rather than the step size. Therefore, before calculating the step size, if... Figure 3As shown, the electronic device can also first compare the image difference between the current 2D image and the previous 2D image at the stitching position with a preset registration error threshold to determine whether the geometric misalignment between the current 2D image and the previous 2D image is within a clinically acceptable range, and then determine whether to proceed to the next step of calculating the step size. Here, the "image difference at the stitching position" can be the same image difference measurement method as the second method in step S102, or it can be different. It characterizes the degree of geometric misalignment between the current 2D image and the previous 2D image in the overlapping area. The "registration error threshold" refers to the maximum allowable geometric misalignment between two adjacent images in the overlapping area. Its value is set according to the clinically acceptable stitching accuracy. For example, when using Euclidean distance as the image difference measurement, this threshold can be set to 5 pixel equivalents.
[0034] Specifically, if the difference between the current 2D image and the previous 2D image at the stitching position is less than or equal to the preset registration error threshold, it indicates that the geometric misalignment between the current image and the preceding image is within a clinically acceptable range, and the adjacent frames have a good foundation for stitching. At this point, the electronic device can calculate the image movement step size to the next exposure position according to the aforementioned scheme based on the degree of distortion, for example, using S=Smax-(Smax-Smin). The step size is calculated using the Gtotal method. Since this step size calculation assumes that the image differences are within a threshold, the calculated step size ensures that the stitching quality between the next frame and the current frame remains within a controllable range.
[0035] On the other hand, if the difference between the current 2D image and the previous 2D image at the stitching position is greater than the preset registration error threshold, it indicates that the geometric misalignment between the current image and the preceding image has exceeded the acceptable range, and the spatial interval between them is too large. In this case, the electronic device does not perform the usual step size calculation and movement operation, but instead controls the scanning device to acquire a supplementary 2D image between the current exposure position and the previous exposure position. Here, "supplementary acquisition" refers to performing an additional X-ray exposure without following the normal step size to acquire an intermediate image located between two existing frames. After the supplementary acquisition is completed, the electronic device can use this supplementary image as the new current 2D image, its acquisition position as the new current exposure position, and then re-execute the distortion analysis and subsequent threshold judgment in step S102. The supplementary acquisition operation halves the anatomical changes between the newly generated adjacent frame pairs (previous frame and supplementary frame, supplementary frame and next frame) by dividing the originally excessively large spatial interval, thus making it highly likely that the image difference will fall back within the threshold. Once it falls back within the threshold, the electronic device can calculate the step size normally and continue scanning as described above. In one implementation, the electronic device can record the previous exposure position P_prev and the current exposure position P_curr, calculate the midpoint P_mid = (P_prev + P_curr) / 2, and then drive the scanning device back to P_mid for re-exposure. In another implementation, if the image difference still exceeds a threshold after two consecutive re-exposures, the electronic device can terminate automatic scanning and issue a prompt, suggesting the operator check for external interference factors such as patient positional movement or respiratory motion. Through the aforementioned threshold comparison and branching mechanism, the electronic device can proactively insert intermediate sampling points for remediation when image differences are too large, and continue scanning normally when image differences are controllable, thus ensuring a balance between stitching quality and scanning efficiency overall.
[0036] Based on the threshold comparison and step length calculation schemes described above, for scanning scenarios where the scanned object changes relatively smoothly along its long axis (e.g., the femur and tibia regions in a full-length lower limb scan, where the bones run relatively straight and the horizontal features of the human body do not change significantly), a simplified extrapolation method can be used to replace the complete distortion analysis after each frame. Specifically, the electronic device can pre-set a cone angle threshold based on the geometric parameters of the scanning device and the patient's body surface position information. This cone angle threshold is used to define the maximum acceptable range of anatomical structure deviation from the detector center. When the actual cone angle (i.e., the angle between the edge of the beam and the central axis) is within this threshold, the corresponding distortion degree is considered to be within the acceptable range. Based on this, the electronic device can directly extrapolate the displacement amount each time based on the spatial position changes of the patient's body contour, without relying on the real-time analysis results of each frame; or, the electronic device can perform a complete distortion analysis and confirm the displacement value only during the acquisition of the first and second frames, and then directly use the confirmed displacement value for subsequent frame acquisitions, without repeating the complete distortion analysis process. This simplified extrapolation method effectively reduces computational resource consumption in imaging areas with gradual changes in anatomical structure. Furthermore, due to the relatively small fluctuations in distortion, its negative impact on image quality is limited. Compared to the aforementioned frame-by-frame adaptive scheme, this alternative method offers advantages in computational efficiency and is suitable for clinical scenarios with high real-time imaging requirements and gradual changes in anatomical structure.
[0037] Through the aforementioned adaptive step-size control process, the electronic device can adjust the acquisition parameters in real time according to image quality, effectively suppressing the impact of cone-beam distortion on stitching quality. However, a prerequisite for the smooth execution of the entire scanning process is that there are no physical obstacles on the movement path of the scanning equipment. In actual clinical environments, when a mobile X-ray scanning device scans the long axis of the subject, the device casing may come into contact with the surface of the subject or the environment, such as the edge of the bed. This is especially true when scanning patients with scoliosis, where the device's movement trajectory often needs to deviate from a straight path. If the operator relies solely on visual observation to determine whether a collision with an obstacle will occur, there is a risk of oversight due to blind spots or lack of experience. Once a collision occurs, it may damage the delicate equipment and potentially harm the patient. Therefore, if... Figure 4 As shown, this solution also provides an "empty detection" method, which is used to pre-determine a verified safe path before performing image acquisition.
[0038] Specifically, the electronic device can control the scanning device to move from a starting point A within a preset scanning range to an ending point B. During this movement, X-ray exposure is not activated; the scanning device operates solely using its onboard collision avoidance detection system. This system can monitor the gap between the scanning device and external obstacles (patient's body surface, bed armrests, bed surface, etc.) in real time based on distance sensors (such as ultrasonic ranging sensors or laser ranging radar), tactile sensors (such as contact anti-collision strips mounted on the scanning device's housing), or a vision system (such as binocular cameras). Throughout the movement from A to B, the electronic device can record all spatial location information determined to be "safe passage" at a fixed sampling frequency (e.g., once per 1 mm movement)—that is, when the scanning device is at that position, none of the sensors trigger a collision warning. The electronic device stores this set of location points as a verified collision-free baseline path, which is the safe path. During this exploration phase, the scanning device's movement speed can be set lower than the normal scanning speed (e.g., the normal scanning speed is 50 mm / s, and the exploration phase speed is 30 mm / s) to ensure that the sensors have sufficient response time to detect potential obstacles.
[0039] After the safe path is determined, the electronic equipment controls the scanning device to start from the termination point B and return to the starting point A along the verified safe path. During this return journey, the scanning device sequentially performs X-ray exposure and image acquisition at each exposure position. Since the safe path has been pre-verified, the movement of the scanning device during the return acquisition process will not trigger unexpected collision events, ensuring patient and equipment safety. In another implementation, collision avoidance detection can also adopt a vision method based on 3D reconstruction: during the exploration process, the scanning device acquires multiple frames of environmental images using a binocular camera, reconstructs a 3D surface model of the patient and bed in real time, and then plans a smooth path offline in the model space that maintains a safety margin of at least 5 cm with respect to obstacle surfaces. Compared with the single-pass method that relies on real-time sensor detection, the above two-stage method (exploration first, acquisition later) allows the scanning device to move continuously along the planned path during the acquisition process without recalculating collisions before each movement, thereby improving the smoothness and efficiency of the acquisition process.
[0040] After completing the pre-exploration of the safe path and the closed-loop acquisition with adaptive step size, the electronic equipment is able to acquire a series of two-dimensional images with controllable distortion. However, one detail still directly affects the integrity of the scan—where should the first exposure position be located? If the first exposure position is too close to the end point of the scan range, the initial segment of the image may not be adequately covered, and important anatomical structures near the end point (such as the sacrum at the end of the spine or the foot bones of the lower limbs) may not be acquired. If the first exposure position is too far from the end point, the overlap rate of the initial segment images will be too large, resulting in unnecessary radiation dose waste and prolonging the scan time. Therefore, this scheme can further limit the specific distance of the first exposure position relative to the end point.
[0041] Specifically, the distance between the first exposure position and the termination point can be set to one-half or one-third of the size of the projected image on the scanned object. Here, "projected image size" refers to the actual physical width of the projection coverage area of the X-ray cone beam on the central layer of the scanned object, and its value is equal to the effective imaging width of the detector divided by the projection magnification of that layer. For example, if the effective width of the detector is 43 cm and the magnification of the central layer of the scanned object is 1.15 (source-image distance 180 cm / object distance 156 cm), then the projected image size is approximately 37.4 cm. Based on this, the electronic equipment can set the first exposure position at one-third of the projected size (approximately 12.5 cm) from the termination point. This ensures that at the beginning of the scan, the anatomical structures near the termination point still fall within the edge area of the image acquired at the first exposure position, and complete coverage is achieved in subsequent stitching through overlap with adjacent images.
[0042] The electronic device can first determine the coordinates of the endpoint B of the preset scanning range, and then backtrack a certain distance along a safe path towards the starting point A. This distance is equal to one-third of the projected image size, and the position reached by the backtracking is set as the first exposure position. After setting, the electronic device controls the scanning device to start executing step S101 from this position, that is, to perform the first exposure at this position. In another implementation, the first exposure position can also be set at half the projected image size from the endpoint. This provides a larger initial coverage margin, but also adds an extra exposure, which is suitable for diagnostic scenarios with higher requirements for boundary coverage (such as full lower limb weight-bearing scans). In addition, if the scanning range is small (for example, scanning only the lumbar spine L1 to L5, with a total range of about 25 cm), the electronic device can also adaptively set the first exposure position to a distance closer to the endpoint (such as one-quarter of the projected size) to avoid insufficient exposure positions due to the small scanning range. By reasonably setting the first exposure position, this solution can ensure that both ends of the scanning range are covered by effective image data, avoiding the need for rescanning due to missing endpoints.
[0043] In summary, to provide a clearer understanding of this application, the following example illustrates the overall flow of the scanning control method provided by this application.
[0044] Imagine a scenario where an adolescent patient with scoliosis requires a full-spine anteroposterior X-ray. The patient lies supine on the examination bed. The technician sets the scanning range of the portable DR device from cervical C7 to sacral S1, a total length of approximately 80 cm, with the starting point A above the patient's shoulder and the ending point B below the patient's buttocks. After starting the scan, the electronic equipment first controls the scanning device to move from point A to point B. During this stage, X-ray exposure is not activated. The laser rangefinder sensor mounted on the device casing works in conjunction with the tactile anti-collision strip to monitor the gap between the device and the patient's body surface and the bed surface in real time. The device moves slowly along the patient's long axis, and the electronic equipment records the coordinates of all non-alarm positions of the sensors at a sampling frequency of once per millimeter. Connecting these coordinate points forms a smooth three-dimensional spatial trajectory, serving as a safe path for subsequent acquisition stages. Because the patient's spine has a significant right lateral convexity, the surface contour of the buttocks area is relatively straight while the thoracolumbar region has a bulge. The safe path recorded during the exploration is not a straight line, but a curve that deviates slightly outward in the thoracolumbar region. This avoids potential collision risks for subsequent acquisition.
[0045] After the exploration is completed, the electronic equipment controls the scanning device to return from the termination point B along the recorded safe path towards the starting point A, officially beginning image acquisition. The first exposure position is set at approximately one-third of the projected image size from the termination point B—the calculated projection coverage width of the device's X-ray cone beam on the patient's body surface is approximately 36 cm, therefore the first exposure position is chosen about 12 cm from point B, ensuring that the sacral region falls precisely within the lower edge of the image frame, guaranteeing complete coverage of the anatomical boundary. The device triggers the first exposure at this position, acquiring the first frame of two-dimensional image, and the electronic equipment immediately performs real-time analysis of the image. Because the anatomical region corresponding to the initial acquisition position is close to the sacrum, where the physiological curvature is relatively gentle, the projection of the vertebral body on the detector is close to the ideal anteroposterior position. The electronic device first uses the Laplacian of Gaussian operator to extract the edge intensity of the vertebral cortex, resulting in a high edge response value. Simultaneously, it uses the SIFT operator to extract matching features of the overlapping region between the current frame and the preceding image (if the first frame has no preceding image, adjacent subsequent frames are used as references), calculating the mean Euclidean distance as the image difference. Furthermore, it identifies the projection positions of the transverse processes on both sides of the sacrum, finding a small deviation angle. The electronic device then fuses the analysis results from these three dimensions using a weighted summation to arrive at a comprehensive distortion level. Since the values of each dimension are low, the comprehensive distortion level is approximately 0.15, falling within the mild distortion range.
[0046] Based on this, the electronic device calculates the next image movement step size according to the negative correlation rule. Assuming the preset maximum image step size is 55% of the detector's effective width and the minimum step size is 20%, substituting these values into the formula yields the current image step size, which is approximately 85% of the maximum step size. The electronic device then converts this pixel step size into the device's physical movement distance using cone-beam projection geometry—with a source-to-image distance of 180 cm and a patient-to-detector distance of 15 cm, the scaling factor is approximately 11, and the actual physical displacement corresponding to the image step size is approximately 8 mm. The electronic device sends a pulse signal to the drive motor, and the device advances 8 mm along a safe path before triggering the next exposure. In subsequent acquisitions, the device encounters the starting point of the thoracolumbar flexure in the lower lumbar region. In this area, the vertebral bodies gradually deviate from the detector center. When analyzing the current frame image, the electronic device finds a decrease in cortical bone edge intensity, an increase in transverse process deviation angle, and an overall distortion degree rising to approximately 0.42. Correspondingly, the calculated physical movement distance is shortened to approximately 5 mm, making the next exposure location more dense to ensure sufficient overlap in the curved segment's image to suppress distortion.
[0047] When the acquisition process reached the region with the most significant curvature in the thoracolumbar spine, the electronic device detected that the image difference between the current image and the previous image at the stitching position exceeded the preset registration error threshold (5 pixels equivalent). This indicated that the spatial interval between two adjacent exposures was too large, resulting in geometric misalignment exceeding the tolerance of the stitching algorithm. At this point, the electronic device did not continue with the usual step size calculation and advancement. Instead, it controlled the scanning device to hover and then drove it back to the midpoint between the current and previous exposure positions to capture an intermediate image. After the re-capture, the electronic device re-analyzed the distortion level of the re-captured image and found that the image difference between it and the previous image had fallen back within the threshold. Therefore, the re-captured image was included in the acquisition sequence, and the acquisition continued to advance according to the adaptive step size. After this re-capture intervention, no further threshold-exceeding situations occurred in subsequent acquisitions. After scanning into the upper and middle thoracic spine, the physiological curvature of this region tended to flatten again, and the overall distortion level gradually decreased to between 0.12 and 0.20. The electronic device then restored the movement step size to a larger value to accelerate the acquisition speed.
[0048] Throughout the entire acquisition process, the electronic device sequentially performed approximately 16 effective exposures (including one retake). The overlap rate between adjacent frames dynamically varied due to distortion adaptive control—approximately 35% to 40% overlap in the curved sections and decreasing to approximately 20% to 25% overlap in the straight sections, both remaining within the minimum overlap requirements for stitching. After acquisition, the electronic device transmitted all images to an image workstation, where a stitching algorithm was invoked to perform feature point matching and multi-resolution fusion on the sequence images, ultimately generating a complete anteroposterior image covering the entire spine. In this image, the vertebral body edges in the thoracolumbar curved areas were clear, and the transverse processes showed good symmetry, without any step-like misalignment or edge blurring artifacts caused by cone tract distortion. Furthermore, the acquisition step size in the straight sections was nearly doubled compared to the traditional fixed small step size scheme, reducing the number of exposures from approximately 25 frames required by the fixed step size scheme to 16 frames, effectively reducing the patient's radiation dose. The entire scanning process, from exploration to stitching completion, took approximately 4 minutes. During the acquisition phase, the equipment moved smoothly without interruption due to manual intervention or unexpected pauses, fully verifying the reliability and practicality of the above-mentioned solution in clinical long-scan scenarios.
[0049] The scanned image reconstruction method provided in this application can be implemented by an electronic device executing a corresponding computer program. Specifically, the electronic device loads the computer program into non-volatile memory, and the processor reads these computer program instructions into memory for execution. Figure 5 As shown, the hardware structure of this electronic device may include a processor 501, a network interface 502, memory 503, and non-volatile memory 504. In addition, the electronic device may include other hardware components according to actual functional requirements, which will not be elaborated here.
[0050] Furthermore, the scanned image reconstruction method provided in this application can also be implemented by a processor executing a computer program contained in a computer program product, or by a processor executing a computer program stored on a computer-readable storage medium.
Claims
1. A scanning control method, characterized in that, include: Within the preset scanning range, along a predetermined safety path, the scanning equipment is controlled to move and sequentially perform X-ray exposure at multiple exposure positions to acquire multiple two-dimensional images. After each 2D image is acquired, the degree of distortion of the current 2D image is analyzed in real time. Based on the degree of distortion, the image movement step size from the current exposure position to the next exposure position is calculated, wherein the degree of distortion is negatively correlated with the image movement step size; The image movement step size is converted into the actual movement distance of the scanning device in physical space. Based on the actual movement distance, the scanning device is controlled to move to the next exposure position and acquire the next two-dimensional image. Until two-dimensional image acquisition of all exposure positions within the preset scanning range is completed; The two-dimensional images captured from all exposure locations are stitched together to obtain a long-size two-dimensional image.
2. The method according to claim 1, characterized in that, Real-time analysis of the distortion degree of the current two-dimensional image, including at least one of the following methods: The cortical bone edge is extracted from the current two-dimensional image, the edge intensity is calculated, and the degree of distortion is determined based on the edge intensity and the position parameters of the cortical bone edge on the detector of the scanning device; wherein, the position parameters are used to characterize the distance between the cortical bone edge on the detector and the center of the detector, the position parameters are positively correlated with the degree of distortion, and the edge intensity is negatively correlated with the degree of distortion; Calculate the image difference between the current 2D image and the previous 2D image at the stitching position, and determine the degree of distortion based on the image difference; wherein the image difference is positively correlated with the degree of distortion; The transverse process structure of the vertebral body in the current two-dimensional image is identified, the deviation angle between the transverse process structure and the center of the vertebral body is calculated, and the degree of distortion is determined based on the deviation angle; wherein, the deviation angle is positively correlated with the degree of distortion. When the distortion degree is determined using at least two of the above methods, the distortion degree is a weighted sum of the distortion degrees determined by each method.
3. The method according to claim 1, characterized in that, Based on the degree of distortion, the image movement step size from the current exposure position to the next exposure position is calculated, including: If the difference between the current two-dimensional image and the previous two-dimensional image at the stitching position is less than or equal to a preset registration error threshold, the image movement step size is calculated based on the degree of distortion.
4. The method according to claim 3, characterized in that, Based on the degree of distortion, the calculation of the image movement step size from the current exposure position to the next exposure position also includes: If the image difference between the current two-dimensional image and the previous two-dimensional image at the stitching position is greater than a preset registration error threshold, the scanning device is controlled to acquire a supplementary two-dimensional image between the current exposure position and the previous exposure position. The supplementary two-dimensional image is used as the current two-dimensional image, and the position of the supplementary two-dimensional image is used as the current exposure position. The distortion degree of the current two-dimensional image is then re-executed in real time.
5. The method according to claim 1, characterized in that, Converting the image movement step size into the actual movement distance of the scanning device in physical space includes: Based on the positional difference between the detector of the scanning device and the scanned object, and the positional difference between the scanned object and the X-ray source of the scanning device, the image movement step size is converted into the actual movement distance according to the cone beam projection geometry.
6. The method according to claim 1, characterized in that, The secure path is determined in the following way: The scanning device is controlled to move from the starting point to the ending point of the preset scanning range without X-ray exposure during the movement. The anti-collision detection system is used to determine the spatial location information where there is no collision within the preset scanning range, and all the spatial location information where there is no collision is used to form the safe path. The two-dimensional image acquisition is performed during the process of the scanning device returning from the termination point to the starting point along the safe path.
7. The method according to claim 6, characterized in that, The distance between the first exposure position and the termination point is one-half or one-third of the size of the image projected by the scanning device onto the scanned object.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.