Respiratory dynamics analysis method and equipment based on dynamic DR and storage medium
By acquiring and processing X-ray video sequences using dynamic DR equipment, accurate assessment of lung respiratory dynamics under low-radiation conditions was achieved, solving the problems of high radiation, high cost, and poor real-time performance in data acquisition in existing technologies, and providing continuous dynamic capture and visualization analysis of lung tissue movement.
Patent Information
- Application Number
- CN202511413693.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies cannot simultaneously achieve low-radiation and low-cost acquisition of respiratory dynamics data, realize continuous dynamic capture and real-time analysis of the respiratory process, and provide intuitive and visualized lung tissue motion field information.
A dynamic DR device was used to acquire chest X-ray video sequences. The lung field region was segmented and rib interference was eliminated using a pre-trained deep learning model to generate rib-free images. The images were then registered frame by frame and corrected using polynomial fitting to generate real-time velocity and displacement fields, which were then superimposed on the X-ray video sequences for visualization.
It achieves accurate assessment of lung respiratory dynamics with low radiation and high efficiency, reduces the radiation risk to examinees, and can obtain imaging characteristics and functional indicators in a single examination, avoiding repeated examinations with multiple devices.
Smart Images

Figure CN120983065A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of respiratory dynamics imaging assessment, and in particular to a respiratory dynamics analysis method, device, and storage medium based on dynamic DR. Background Technology
[0002] Against the backdrop of a rapidly aging global population and increasingly severe air pollution, the incidence of lung diseases continues to rise, creating an urgent clinical need for efficient and accurate methods for assessing lung function. Respiratory dynamic parameters (such as diaphragmatic movement amplitude and lung tissue displacement field) are key indicators for assessing chronic obstructive pulmonary disease (COPD) and restrictive lung disease. By capturing the motion characteristics of lung structures during respiration, they provide objective evidence for differentiated lung function assessment and postoperative rehabilitation monitoring.
[0003] Currently, the main methods for obtaining respiratory dynamics data in clinical practice include three-dimensional imaging technology and traditional respiratory monitoring methods. While three-dimensional imaging technologies such as dynamic magnetic resonance imaging (MRI) and computed tomography (CT) can extract three-dimensional respiratory dynamics information, they have drawbacks such as the need for high-dose radiation exposure during CT scans, and the lengthy appointment and scanning process, as well as high equipment costs hindering widespread application of MRI. Traditional respiratory monitoring methods, such as plethysmography and static X-ray imaging, either rely on repeated examinations under specific conditions or only provide intermittent static images, neither of which can capture the complete dynamic process of respiration in real time.
[0004] In summary, none of the existing technologies mentioned above can simultaneously meet clinical needs such as acquiring data in a low-radiation, low-cost manner, achieving continuous dynamic capture and real-time analysis of the respiratory process, and providing intuitive and visualized lung tissue motion field information. Summary of the Invention
[0005] This application provides a respiratory dynamics analysis method, device, and storage medium based on dynamic DR. Through real-time acquisition, frame-by-frame registration, and motion field visualization technology of dynamic DR, it achieves accurate assessment of lung respiratory dynamics with low radiation and high efficiency.
[0006] On the one hand, this application provides a respiratory dynamics analysis method based on dynamic DR, the method comprising:
[0007] Dynamic X-ray video sequences of the chest were acquired using a dynamic DR device;
[0008] Each frame of the dynamic X-ray video sequence is preprocessed, namely: a pre-trained deep learning model is used to segment the lung field region and eliminate rib interference to generate a rib-free image.
[0009] An initial grid of points covering the lung field is generated based on the first frame of the ribless image;
[0010] The dynamic X-ray video sequence is registered frame by frame: the template area is cropped with the grid points of the previous frame as the center, the search area is cropped at the corresponding position of the target image, and the grid point displacement is calculated by pixel intensity statistical correlation matching to obtain the grid point displacement data;
[0011] The displacement data of the grid points is corrected by polynomial fitting according to the grid coordinates to obtain the displacement of a single frame.
[0012] The displacement of a single frame is converted into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence, and the displacements are accumulated to generate a displacement field relative to the initial frame.
[0013] The visualization results of velocity or displacement fields are superimposed on the dynamic X-ray video sequence.
[0014] On the other hand, this application provides a respiratory dynamics analysis device based on dynamic DR, the device comprising:
[0015] The acquisition module is used to acquire dynamic X-ray video sequences of the chest using a dynamic DR device;
[0016] The preprocessing module is used to preprocess each frame of the dynamic X-ray video sequence, namely: using a pre-trained deep learning model to segment the lung field region and eliminate rib interference to generate a rib-free image.
[0017] A generation module is used to generate initial grid points covering the lung field based on the first frame image of the ribless image;
[0018] The registration module is used to register the dynamic X-ray video sequence frame by frame: the template area is extracted with the grid points of the previous frame as the center, the search area is extracted at the corresponding position of the target image, and the grid point displacement is calculated by pixel intensity statistical correlation matching to obtain the grid point displacement data;
[0019] The correction module is used to perform polynomial fitting correction on the grid point displacement data according to the grid coordinates to obtain the single frame displacement.
[0020] The analysis module is used to convert the single-frame displacement into a real-time velocity field according to the frame rate of the dynamic X-ray video sequence, and to accumulate the displacement to generate a displacement field relative to the initial frame.
[0021] A visualization module is used to overlay velocity or displacement field visualization results onto the dynamic X-ray video sequence.
[0022] Thirdly, this application provides an electronic device, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for respiratory dynamics analysis based on dynamic DR.
[0023] Fourthly, this application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for respiratory dynamics analysis based on dynamic DR.
[0024] As can be seen from the technical solution provided in this application, on the one hand, since the radiation dose of DR is only 1 / 20 to 1 / 50 of that of CT, the direct generation of continuous video sequences by dynamic DR equipment can significantly reduce the high radiation risk for examinees. Furthermore, DR examinations do not require complex appointments, and the acquisition process can be completed within seconds, achieving immediate examination and analysis with high efficiency. On the other hand, by registering the dynamic X-ray video sequence frame by frame and analyzing the motion field, displacement can be dynamically captured, completely restoring the lung tissue motion trajectory and quantifying the dynamic changes in respiratory processes. Thirdly, by superimposing velocity or displacement field vector arrows on the original DR video in real time, doctors can simultaneously observe anatomical structures and dynamic parameters, obtaining both imaging features and functional indicators in a single examination, avoiding repeated examinations with multiple devices. In summary, the technical solution of this application achieves accurate assessment of lung respiratory dynamics with low radiation and high efficiency. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart of the respiratory dynamics analysis method based on dynamic DR provided in the embodiments of this application;
[0027] Figure 2 This is a mask image of the segmented lung field region provided in the embodiments of this application;
[0028] Figure 3 This is a segmented lung field region image without ribs provided in the embodiments of this application;
[0029] Figure 4 This is a schematic diagram of grid points, template region roi1, and search region roi2 during the frame-by-frame registration process of a dynamic X-ray video sequence provided in an embodiment of this application.
[0030] Figure 5 This is a schematic diagram of the displacement field inside the lung field of a normal person during maximal inspiration, provided in an embodiment of this application.
[0031] Figure 6 This is a schematic diagram of the y-direction velocity vectors of the upper, middle, and lower lung fields over a single frame time according to an embodiment of this application;
[0032] Figure 7 This is a schematic diagram showing the displacement of the upper, middle, and lower lung fields during one respiratory cycle, as provided in the embodiments of this application.
[0033] Figure 8 This is a schematic diagram of the structure of the respiratory dynamics analysis device based on dynamic DR provided in the embodiments of this application;
[0034] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] In this specification, adjectives such as "first" and "second" are used only to distinguish one element or action from another, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element, component, or step (etc.) should not be construed as limited to only one element, component, or step, but may include one or more of the elements, components, or steps, etc.
[0037] For ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn to actual scale.
[0038] Currently, the main methods for obtaining respiratory dynamics data in clinical practice include three-dimensional imaging technology and traditional respiratory monitoring methods. While three-dimensional imaging technologies such as dynamic magnetic resonance imaging (MRI) and computed tomography (CT) can extract three-dimensional respiratory dynamics information, they suffer from drawbacks such as the need for high-dose radiation exposure during CT scans, and the lengthy appointment and scanning process, as well as high equipment costs hindering widespread application of MRI. Traditional respiratory monitoring methods, such as plethysmography and static X-ray imaging, either rely on repeated examinations under specific conditions or only provide intermittent static images, failing to capture the complete respiratory dynamic process in real time. In summary, none of the aforementioned existing technologies can simultaneously meet the clinical needs of acquiring data with low radiation and low cost, achieving continuous dynamic capture and real-time analysis of the respiratory process, and providing intuitive visualization of lung tissue movement field information.
[0039] To address the aforementioned problems in the prior art, this application proposes a respiratory dynamics analysis method based on dynamic DR, the flowchart of which is attached. Figure 1 As shown, the main steps include S101 to S107, which are detailed below:
[0040] Step S101: Acquire dynamic X-ray video sequences of the chest using a dynamic DR device.
[0041] Because static X-ray imaging only provides a snapshot at a single moment and lacks the continuity of the respiratory process, while dynamic MRI scans require a longer time (15-30 minutes), it is difficult for patients to maintain a stable respiratory rhythm. In order to achieve dynamic capture of the entire respiratory process under low radiation dose and acquire data in a short time to ensure data timeliness, this application uses a dynamic DR device to acquire dynamic X-ray video sequences of the chest.
[0042] Step S102: Preprocess each frame of the dynamic X-ray video sequence, that is: use a pre-trained deep learning model to segment the lung field region and eliminate rib interference to generate rib-free images.
[0043] Considering the interference of rib texture with lung tissue motion analysis, dynamic X-ray video sequences acquired by dynamic DR equipment cannot be used directly and require preprocessing. However, on the one hand, if threshold segmentation is used to preprocess the dynamic X-ray video sequences, it cannot adapt to individual differences in lung field shape, resulting in low segmentation accuracy, while traditional filtering to remove ribs blurs lung vascular texture and destroys motion analysis features. On the other hand, since the entire analysis only targets the lung field region, lung field segmentation is required, and ribs will interfere with the motion analysis of the image, so ribs in the image also need to be removed. This application preprocesses each frame of the dynamic X-ray video sequence, mainly by using a pre-trained deep learning model to segment the lung field region and remove rib interference, generating segmented mask images and rib-free images. Alternatively, rib-free images can be obtained by acquiring dual-energy images and using special image processing methods, and mask images can be obtained using threshold segmentation and image morphology processing methods. Figure 2 and 3 The images shown are the masked image and the image without ribs after segmenting the lung field region, respectively. It should be noted that subsequent operations are primarily performed on the image without ribs. This preprocessing method automatically generates high-precision, interference-free lung field images, providing a clean analysis region for registration.
[0044] Step S103: Generate initial grid points covering the lung field based on the first frame image without ribs.
[0045] Registration without a reference datum accumulates displacement errors, and existing uniform grid schemes may ignore lung field morphology, rendering edge region grids ineffective. Therefore, generating initial grid points covering the lung field based on the first frame of the ribless image aims to establish a spatial reference matching the anatomical structure, ensuring the anatomical rationality of displacement tracking. Specifically, generating initial grid points covering the lung field based on the first frame of the ribless image can involve selecting a mask image corresponding to the first frame of the ribless image, setting an appropriate grid size (grideSize), and calculating the initial grid points and corresponding coordinates of the mask image. As the initial grid points covering the lung field.
[0046] Step S104: Frame-by-frame registration of the dynamic X-ray video sequence: The template area is cropped with the grid points of the previous frame as the center, and the search area is cropped at the corresponding position of the target image. The grid point displacement is calculated by statistical correlation matching of pixel intensity to obtain the grid point displacement data.
[0047] In the field of DR imaging, the respiratory movements of the patient cause deformation of the chest and lung tissue, leading to mismatches when directly comparing pixels. Therefore, to capture micro-movements of tissue and balance accuracy and real-time performance, this application can perform frame-by-frame registration of dynamic X-ray video sequences: a template region is extracted centered on the grid points of the previous frame, and a search region is extracted at the corresponding position in the target image. The grid point displacement is calculated using pixel intensity statistical correlation matching to obtain grid point displacement data. Specifically, the calculation of grid point displacement data using pixel intensity statistical correlation can be achieved by: using a zero-mean normalized cross-correlation algorithm to calculate the correlation of each position within the search region; and outputting the offset of the position with the highest correlation from the template center as the grid point displacement data. The following combines... Figure 4 This section provides a detailed explanation of how to register dynamic X-ray video sequences frame by frame.
[0048] First, set the template radius tR, search radius sR, and search step size sP. The two parameters sR and sP need to be adjusted appropriately according to the frame rate of the acquired dynamic X-ray video sequence. When the acquisition frame rate is high, the change between two adjacent frames is relatively slow, and the parameter settings can be smaller. Otherwise, the empirical parameters set in this application are tR>=grideSize, sR=1.2*tR, and sP=1 or 2.
[0049] Secondly, the first frame and the adjacent second frame of the dynamic X-ray video sequence are selected and defined as the reference image and the target image, respectively. An initial grid of points is then applied to the reference image. A rectangular region with a side length of 2*tR+1 is selected as the template region roi1, and a rectangular region with a side length of 2*sR+1 is selected as the search region roi2 on the target image with the corresponding grid point as the center.
[0050] Then, using the template matching method, roi1 is placed in roi2 and slides according to the search step size sP, and the correlation coefficient C of each position during the sliding process is calculated, i.e., formula (1). At the same time, a cross-correlation matrix M is obtained after traversing the search area roi2.
[0051]
[0052] Finally, the relative coordinates of the position of the maximum correlation coefficient in the entire cross-correlation matrix M with the center of the template are calculated to obtain the offset value (dx, dy) of the current grid point in the target image, as shown in the following formula:
[0053]
[0054] Where, x center and y center The coordinates of the center of the correlation coefficient matrix M are given, and (dx, dy) are appended to the coordinates of the current grid point. Complete the update of grid point coordinates:
[0055]
[0056] Repeat the above operation for all grid points to obtain the offset values DX and DY of all grid points in the current target image of the dynamic X-ray video sequence and the grid points of the next frame image. Among them, DX and DY are equivalent to the displacement field data of the second frame relative to the first frame in the x and y directions.
[0057] For the entire dynamic X-ray video sequence, sequentially select the preceding frame (f) and the following frame (f+1), and use the grid points updated after matching with the preceding frame. The above feature registration operation yields offset data DXf, DYf, and grid points.
[0058] Step S105: Perform polynomial fitting correction on the grid point displacement data according to the grid coordinates to obtain the displacement of a single frame.
[0059] Generally, image noise and low-contrast areas can easily cause jumps in grid point displacement data. Specifically, in this application, due to the influence of template selection parameters, image noise, and changes in lung texture features during the frame-by-frame registration of dynamic X-ray video sequences, the calculated offset data may be interfered with, resulting in inconsistent and unstable data. Although median filtering can reduce this influence, its drawback is that it also smooths the true displacement boundary, and linear interpolation cannot actually fit nonlinear respiratory motion. Therefore, in order to suppress noise interference and preserve the continuity of physiological motion (e.g., diaphragmatic arc motion) through a spatial mapping function, this application performs polynomial fitting correction on the grid point displacement data obtained in step S104 according to the grid coordinates to obtain the single-frame displacement. As an embodiment of this application, the polynomial fitting correction of the grid point displacement data according to the grid coordinates can be achieved by using the initial grid coordinates as independent variables, establishing displacement mapping functions in the row and column directions respectively, and solving the fitting coefficients using the least squares method to suppress noise interference. Specifically, for the offset values DXf and DYf of each frame, based on the initial grid point coordinates... The table shows the single-frame displacements (DXf' and DYf') obtained by performing third-order polynomial fitting on both rows and columns, respectively, to correct for the interference of image noise and feature variations on the registration data. It should be noted that the above is based on the initial grid point coordinates. An alternative to fitting the table with third-order polynomials by row and column can be to fit each grid point on the entire dynamic X-ray video sequence according to the frame number of the image. The function used for fitting is not limited to a third-order polynomial; other types of nonlinear functions can also be used, such as fifth-order polynomial functions, second-order exponential functions, and so on.
[0060] Step S106: Convert the displacement of a single frame into a real-time velocity field according to the frame rate of the dynamic X-ray video sequence, and accumulate the displacement to generate a displacement field relative to the initial frame.
[0061] Because the raw displacement data lacks temporal information, respiratory dynamic parameters cannot be quantified. One solution is to display the accumulated displacement, but this ignores the time factor and cannot assess the difference in inspiratory / expiratory rates. A fixed frame rate assumption, if the actual acquisition frame rate is ignored, leads to distorted velocity calculations. To convert spatial displacement into clinically interpretable kinetic indicators, such as the peak diaphragmatic velocity, this application employs motion field analysis. Specifically, it converts the displacement of a single frame into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence, and accumulates the displacements to generate a displacement field relative to the initial frame. The following combines... Figure 5 This will be explained accordingly.
[0062] Because the frame rate of the dynamic X-ray video sequence is fixed, let's say 8 fps / s, for DXf' and DYf', it's equivalent to the velocity field in the x and y directions within a unit time of 0.125s. Simultaneously, accumulating DXf' and DYf' frame by frame yields the displacement field in the x and y directions for each frame relative to the initial frame. Similarly, for a frame rate of 8 fps / s, the displacement field accumulated every 8 frames is the velocity field per unit time. A complete analysis of the acquired dynamic X-ray video sequence yields a video with velocity or displacement field vectors, allowing for a direct observation of the lung structure's movement during the entire breathing process. Figure 5 As shown, this is the displacement field inside the lung field of a normal person during maximum inhalation. The length of the arrow indicates the magnitude of the cumulative displacement, and the direction indicates the trend of motion.
[0063] Because whole-lung-field motion assessment cannot pinpoint regional functional impairments, such as upper lobe fibrosis or lower lobe emphysema, even traditional pulmonary function tests like vital capacity testing only provide global indicators and cannot distinguish functional differences between the upper, middle, and lower lung fields. Therefore, to vertically partition and quantify regional dynamic parameters (e.g., lower lung field displacement attenuation in COPD patients) and achieve precise lesion localization, after obtaining the real-time velocity field and the displacement field relative to the initial frame—that is, the above embodiment converts the single-frame displacement amount into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence and accumulates the displacement amounts to generate a displacement field relative to the initial frame—further includes: vertically dividing the lung field into three equal-area regions: upper, middle, and lower; and calculating the mean velocity field and extreme displacement field of each region in real time within the three equal-area regions. Figure 6 The figure shows the y-direction velocity vectors of the upper, middle, and lower lung fields over a single frame within one respiratory cycle (including breath-holding before inspiration). Figure 7The figure shows the displacement of the upper, middle, and lower lung fields relative to the start of respiration during one respiratory cycle.
[0064] Step S107: Superimpose the velocity field or displacement field visualization results onto the dynamic X-ray video sequence.
[0065] When clinicians switch between imaging systems and data analysis software, their diagnostic efficiency is often very low. Although independent motion field images can improve diagnostic efficiency to some extent, these images are detached from anatomical references, making localization difficult, and static arrow annotations cannot reflect the continuity of the motion process. In order to achieve dynamic fusion of imaging and functional data and assist in the intuitive assessment of the direction and amplitude of lung tissue motion, this application can overlay velocity field or displacement field visualization results on dynamic X-ray video sequences.
[0066] Manual extraction of functional parameters at key points in the respiratory cycle, such as maximal inspiration and mid-expiration, is inefficient and highly subjective. To automate the capture of respiratory phase transition characteristics (e.g., delayed inspiratory velocity in the upper lung field of restrictive lung disease) and aid in rapid diagnostic decision-making, motion data can be extracted as follows when overlaying velocity or displacement field visualizations onto dynamic X-ray video sequences: track the temporal changes of the longitudinal velocity component of the upper lung field at maximal inspiration; record the displacement fluctuation range of the lower lung field during mid-expiration; and dynamically calculate the whole-lung field displacement dispersion index based on the temporal changes of the longitudinal velocity component of the upper lung field at maximal inspiration and the displacement fluctuation range of the lower lung field during mid-expiration.
[0067] From the above appendix Figure 1 As illustrated by the example of a dynamic DR-based respiratory dynamics analysis method, firstly, since the radiation dose of DR is only 1 / 20 to 1 / 50 of that of CT, directly generating continuous video sequences using dynamic DR equipment can significantly reduce the high radiation risk for examinees. Furthermore, DR examinations do not require complex appointments, and the acquisition process can be completed within seconds, achieving immediate analysis and high efficiency. Secondly, by registering the dynamic X-ray video sequence frame by frame and analyzing the motion field, displacement can be dynamically captured, completely reconstructing the lung tissue movement trajectory and quantifying the dynamic changes in the respiratory process. Thirdly, by overlaying velocity or displacement field vector arrows on the original DR video in real time, doctors can simultaneously observe anatomical structures and dynamic parameters, acquiring imaging features and functional indicators in a single examination, avoiding repeated examinations using multiple devices. In summary, the technical solution of this application achieves accurate assessment of lung respiratory dynamics with low radiation and high efficiency.
[0068] Please see the appendix Figure 8This application provides a respiratory dynamics analysis device based on dynamic DR. The device may include an acquisition module 801, a preprocessing module 802, a generation module 803, a registration module 804, a correction module 805, an analysis module 806, and a visualization module 807, as detailed below:
[0069] Acquisition module 801 is used to acquire dynamic X-ray video sequences of the chest through a dynamic DR device;
[0070] The preprocessing module 802 is used to preprocess each frame of the dynamic X-ray video sequence, namely: using a pre-trained deep learning model to segment the lung field region and eliminate rib interference to generate rib-free images.
[0071] The generation module 803 is used to generate initial grid points covering the lung field based on the first frame image without ribs;
[0072] The registration module 804 is used to register the dynamic X-ray video sequence frame by frame: the template area is extracted with the grid points of the previous frame as the center, the search area is extracted at the corresponding position of the target image, and the grid point displacement is calculated by pixel intensity statistical correlation matching to obtain the grid point displacement data;
[0073] The correction module 805 is used to perform polynomial fitting correction on the grid point displacement data according to the grid coordinates to obtain the single frame displacement.
[0074] Analysis module 806 is used to convert the displacement of a single frame into a real-time velocity field according to the frame rate of the dynamic X-ray video sequence, and to accumulate the displacement to generate a displacement field relative to the initial frame.
[0075] The visualization module 807 is used to overlay the visualization results of the velocity field or displacement field onto the dynamic X-ray video sequence.
[0076] From the above appendix Figure 8 As illustrated by the example of a dynamic DR-based respiratory dynamics analysis device, firstly, since the radiation dose of DR is only 1 / 20 to 1 / 50 of that of CT, directly generating continuous video sequences through dynamic DR equipment can significantly reduce the high radiation risk for examinees. Furthermore, DR examinations do not require complex appointments, and the acquisition process can be completed within seconds, achieving immediate examination and analysis with high efficiency. Secondly, by registering the dynamic X-ray video sequence frame by frame and analyzing the motion field, displacement can be dynamically captured, completely reconstructing the lung tissue movement trajectory and quantifying the dynamic changes in the respiratory process. Thirdly, by superimposing velocity or displacement field vector arrows on the original DR video in real time, doctors can simultaneously observe anatomical structures and dynamic parameters, acquiring imaging features and functional indicators in a single examination, avoiding repeated examinations with multiple devices. In summary, the technical solution of this application achieves accurate assessment of lung respiratory dynamics with low radiation and high efficiency.
[0077] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 9 As shown, the electronic device 9 in this embodiment mainly includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90, such as a program for a respiratory dynamics analysis method based on dynamic DR. When the processor 90 executes the computer program 92, it implements the steps in the above-described embodiment of the respiratory dynamics analysis method based on dynamic DR, for example... Figure 1 The steps S101 to S107 are shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 8 The functions of the acquisition module 801, preprocessing module 802, generation module 803, registration module 804, correction module 805, analysis module 806, and visualization module 807 are shown.
[0078] For example, the computer program 92 of the respiratory dynamics analysis method based on dynamic DR mainly includes: acquiring a dynamic X-ray video sequence of the chest through a dynamic DR device; preprocessing each frame of the dynamic X-ray video sequence, namely: segmenting the lung field region and eliminating rib interference using a pre-trained deep learning model to generate a rib-free image; generating initial grid points covering the lung field based on the first frame of the rib-free image; registering the dynamic X-ray video sequence frame by frame: cropping the template region centered on the grid points of the previous frame, cropping the search region at the corresponding position of the target image, calculating the grid point displacement through pixel intensity statistical correlation matching, and obtaining grid point displacement data; performing polynomial fitting correction on the grid point displacement data according to the grid coordinates to obtain the single-frame displacement; converting the single-frame displacement into a real-time velocity field according to the frame rate of the dynamic X-ray video sequence, and accumulating the displacement to generate a displacement field relative to the initial frame; superimposing the velocity field or displacement field visualization results in the dynamic X-ray video sequence. The computer program 92 can be divided into one or more modules / units, one or more modules / units are stored in the memory 91 and executed by the processor 90 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 92 in electronic device 9. For example, computer program 92 can be divided into the functions of acquisition module 801, preprocessing module 802, generation module 803, registration module 804, correction module 805, analysis module 806, and visualization module 807 (a module in a virtual device). The specific functions of each module are as follows: acquisition module 801 is used to acquire dynamic X-ray video sequences of the chest through dynamic DR equipment; preprocessing module 802 is used to preprocess each frame of the dynamic X-ray video sequence, that is, to segment the lung field region and eliminate rib interference using a pre-trained deep learning model to generate a rib-free image; generation module 803 is used to generate an initial image covering the lung field based on the first frame of the rib-free image. The system includes: a grid point registration module 804, used for frame-by-frame registration of the dynamic X-ray video sequence; a template region centered on the grid points of the previous frame; a search region centered at the corresponding position in the target image; and a grid point displacement calculation using pixel intensity statistical correlation matching to obtain grid point displacement data; a correction module 805, used for polynomial fitting correction of the grid point displacement data according to the grid coordinates to obtain the single-frame displacement; an analysis module 806, used for converting the single-frame displacement into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence, and accumulating the displacement to generate a displacement field relative to the initial frame; and a visualization module 807, used for superimposing the velocity field or displacement field visualization results onto the dynamic X-ray video sequence.
[0079] Electronic device 9 may include, but is not limited to, processor 90 and memory 91. Those skilled in the art will understand that... Figure 9This is merely an example of electronic device 9 and does not constitute a limitation on electronic device 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.
[0080] The processor 90 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0081] The memory 91 can be an internal storage unit of the electronic device 9, such as a hard disk or RAM. The memory 91 can also be an external storage device of the electronic device 9, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 91 can include both internal and external storage units of the electronic device 9. The memory 91 is used to store computer programs and other programs and data required by the electronic device. The memory 91 can also be used to temporarily store data that has been output or will be output.
[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed. That is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above-described device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0083] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0085] In the embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0088] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program for the respiratory dynamics analysis method based on dynamic DR can be stored in a storage medium. When executed by a processor, this computer program can implement the steps of the various method embodiments described above, namely, acquiring dynamic X-ray video sequences of the chest through a dynamic DR device; preprocessing each frame of the dynamic X-ray video sequence, namely: segmenting the lung field region and eliminating rib interference using a pre-trained deep learning model to generate a rib-free image; based on the rib-free image... The first frame of the image generates initial grid points covering the lung field. The dynamic X-ray video sequence is registered frame by frame: a template region is cropped centered on the grid points of the previous frame, and a search region is cropped at the corresponding position in the target image. Grid point displacements are calculated through pixel intensity statistical correlation matching to obtain grid point displacement data. The grid point displacement data is corrected by polynomial fitting according to the grid coordinates to obtain the single-frame displacement. Based on the frame rate of the dynamic X-ray video sequence, the single-frame displacement is converted into a real-time velocity field, and the displacements are accumulated to generate a displacement field relative to the initial frame. The velocity field or displacement field visualization result is superimposed on the dynamic X-ray video sequence. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of the storage medium may be appropriately added to or subtracted from the contents according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium may not include electrical carrier signals and telecommunication signals.
[0089] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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 of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application. The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the protection scope of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this invention.
Claims
1. A respiratory dynamics analysis method based on dynamic DR, characterized in that, The method includes: Dynamic X-ray video sequences of the chest were acquired using a dynamic DR device; Each frame of the dynamic X-ray video sequence is preprocessed, namely: a pre-trained deep learning model is used to segment the lung field region and eliminate rib interference to generate a rib-free image. An initial grid of points covering the lung field is generated based on the first frame of the ribless image; The dynamic X-ray video sequence is registered frame by frame: the template area is cropped with the grid points of the previous frame as the center, the search area is cropped at the corresponding position of the target image, and the grid point displacement is calculated by pixel intensity statistical correlation matching to obtain the grid point displacement data; The displacement data of the grid points is corrected by polynomial fitting according to the grid coordinates to obtain the displacement of a single frame. The displacement of a single frame is converted into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence, and the displacements are accumulated to generate a displacement field relative to the initial frame. The visualization results of velocity or displacement fields are superimposed on the dynamic X-ray video sequence.
2. The method according to claim 1, characterized in that, The calculation of grid point displacement through pixel intensity statistical correlation to obtain grid point displacement data includes: The correlation of each location within the search area is calculated using the zero-mean normalized cross-correlation algorithm. The offset between the location of maximum correlation and the center of the template is output as the displacement data of the grid point.
3. The method according to claim 1, characterized in that, The step of performing polynomial fitting correction on the grid point displacement data according to the grid coordinates includes: Using the initial grid coordinates as independent variables, displacement mapping functions are established in the row and column directions respectively, and the fitting coefficients are solved by the least squares method to suppress noise interference.
4. The method according to claim 1, characterized in that, The step of converting the single-frame displacement into a real-time velocity field based on the frame rate of the dynamic X-ray video sequence, and accumulating the displacements to generate a displacement field relative to the initial frame, further includes: The lung field is vertically divided into three equal-area regions: upper, middle, and lower. The mean velocity field and extreme displacement field of each region in the three equal-area regions (upper, middle, and lower) are calculated in real time.
5. The method according to claim 4, characterized in that, When superimposing the velocity field or displacement field visualization results into the dynamic X-ray video sequence, motion data is extracted in the following manner: Track the temporal changes of the longitudinal velocity component in the upper lung field at the moment of maximal inspiration; Record the range of lung field displacement fluctuations during mid-expiration; Based on the temporal variation of the longitudinal velocity component and the range of displacement fluctuation, the displacement dispersion index of the whole lung field is dynamically calculated.
6. The method according to claim 1, characterized in that, The method further includes: Identify the location of the apex of the diaphragm; Based on the position of the diaphragm apex, the trajectory of diaphragm movement during the respiratory cycle is tracked; The range of motion of the diaphragm is calculated based on the diaphragm's movement trajectory during the respiratory cycle.
7. The method according to claim 1, characterized in that, The visualization of the velocity or displacement field superimposed on the dynamic X-ray video sequence is achieved in the following manner: Dynamically superimpose displacement field vector arrows onto DR video frames; The magnitude of displacement in a DR video frame with superimposed displacement field vectors is encoded using a heatmap. The arrow direction indicates the movement trend of lung tissue in real time.
8. A respiratory dynamics analysis device based on dynamic DR, characterized in that, The device includes: The acquisition module is used to acquire dynamic X-ray video sequences of the chest using a dynamic DR device; The preprocessing module is used to preprocess each frame of the dynamic X-ray video sequence, namely: using a pre-trained deep learning model to segment the lung field region and eliminate rib interference to generate a rib-free image. A generation module is used to generate initial grid points covering the lung field based on the first frame image of the ribless image; The registration module is used to register the dynamic X-ray video sequence frame by frame: the template area is extracted with the grid points of the previous frame as the center, the search area is extracted at the corresponding position of the target image, and the grid point displacement is calculated by pixel intensity statistical correlation matching to obtain the grid point displacement data; The correction module is used to perform polynomial fitting correction on the grid point displacement data according to the grid coordinates to obtain the single frame displacement. The analysis module is used to convert the single-frame displacement into a real-time velocity field according to the frame rate of the dynamic X-ray video sequence, and to accumulate the displacement to generate a displacement field relative to the initial frame. A visualization module is used to overlay velocity or displacement field visualization results onto the dynamic X-ray video sequence.
9. An electronic device, the 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 computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.