Lung ventilation, air trapping determination method and apparatus, electronic device, and medium
By registering and thresholding DR lung images, combined with neural network segmentation, accurate analysis of lung ventilation and air retention in patients with chronic obstructive pulmonary disease was achieved, improving the level of intelligent assistance in diagnosis and management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN BLUE SHADOW MEDICAL TECH CO LTD
- Filing Date
- 2023-07-03
- Publication Date
- 2026-06-26
Smart Images

Figure CN116843646B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of DR image processing technology, and in particular to a method and apparatus for determining lung ventilation and air retention, an electronic device, and a storage medium. Background Technology
[0002] Digital X-ray (DR) imaging can provide high-resolution and real-time X-ray images and has been widely used in examinations of the skeletal system, chest, and dentistry, such as fracture diagnosis, lung disease screening, and dental X-rays.
[0003] Currently, DR imaging has become an important imaging tool in the diagnosis and analysis of respiratory diseases. Pulmonary ventilation is the gas exchange between the lungs and the external environment. Through the respiratory tract—nose, pharynx, larynx, trachea, bronchi, and alveoli—the lungs inhale fresh air from the outside and expel carbon dioxide after metabolism, maintaining normal oxygen supply. During pulmonary ventilation, the driving force is the contraction of the diaphragm, utilizing the pressure difference (the pressure difference between alveolar air and the external atmosphere) for gas exchange. Specifically, during inspiration, the intrapulmonary pressure is lower than atmospheric pressure; during expiration, the intrapulmonary pressure is higher than atmospheric pressure. Pulmonary ventilation is particularly important for patients with dyspnea, such as those with chronic obstructive pulmonary disease (COPD) or acute respiratory distress syndrome (ARDS). Especially for COPD patients, effectively locating areas of air retention is of paramount importance for medication and clinical management.
[0004] Therefore, it is necessary to determine lung ventilation and air retention based on DR lung images during the respiratory process, in order to solve the problem that current DR lung images cannot provide corresponding quantitative analysis of lung ventilation and air retention for patients with chronic obstructive pulmonary disease or respiratory distress syndrome, thereby improving the level of intelligent assisted diagnosis or assessment based on DR lung images. Summary of the Invention
[0005] This disclosure presents a method and apparatus for determining lung ventilation and air retention, as well as an electronic device and storage medium.
[0006] According to one aspect of this disclosure, a method for determining lung ventilation is provided, comprising:
[0007] Acquire left and right lung images corresponding to multiple DR lung images during the breathing process, multiple registration transformation matrices during the breathing process, and preset air threshold ranges;
[0008] Using multiple registration transformation matrices during the breathing process, registration operations are performed on the left and right lung images corresponding to the multiple DR lung images respectively, to obtain the left and right lung registration images corresponding to the multiple DR lung images;
[0009] Based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, the lung ventilation areas corresponding to the multiple DR lung images at multiple moments during the breathing process are determined.
[0010] Preferably, the method for determining the plurality of registration transformation matrices before acquiring the plurality of registration transformation matrices during the breathing process includes:
[0011] Register adjacent DR lung images from multiple DR lung images during the respiratory process to obtain multiple registration transformation matrices corresponding to the respiratory process; or,
[0012] The adjacent left and right lung images corresponding to multiple DR lung images during the breathing process are registered respectively to obtain multiple registration transformation matrices corresponding to the left lung image and the right lung image during the breathing process.
[0013] Then, using multiple registration transformation matrices corresponding to the left lung image during the breathing process and multiple registration transformation matrices corresponding to the right lung image during the breathing process, registration operations are performed on the left lung image and right lung image corresponding to the multiple DR lung images respectively, to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
[0014] Preferably, the method of using multiple registration transformation matrices during the breathing process to perform registration operations on the left and right lung images corresponding to the multiple DR lung images, respectively, to obtain the registered left lung image and the registered right lung image corresponding to the multiple DR lung images, includes:
[0015] The DR lung image at the first moment during the breathing process is configured as a fixed image, and the DR lung image at the second moment corresponding to the next moment adjacent to the first moment is configured as a floating image;
[0016] Using multiple registration transformation matrices during the breathing process, registration operations are performed on the fixed image and the floating image, or on the left lung image and the right lung image corresponding to the fixed image and the left lung image and the right lung image corresponding to the floating image, respectively, to obtain the left lung registration image and the right lung registration image corresponding to the multiple DR lung images.
[0017] Preferably, the method for determining the preset air threshold range before obtaining the preset air threshold range includes:
[0018] Determine the minimum preset air threshold for the left and right lung images corresponding to multiple DR lung images during the breathing process;
[0019] Based on the minimum preset air threshold and the set threshold step size, determine the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process; and / or,
[0020] The method for determining the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process, based on the minimum preset air threshold and a set threshold step size, includes:
[0021] The left and right lung images corresponding to multiple DR lung images during the breathing process are displayed respectively.
[0022] Based on the minimum preset air threshold and the set threshold step size, air is marked on the left and right lung images corresponding to the multiple displayed DR lung images;
[0023] Based on the air markers in the left and right lung images corresponding to the multiple DR lung images, determine the maximum preset air thresholds corresponding to the left and right lung images corresponding to the multiple DR lung images during the breathing process; and / or,
[0024] The method for marking air in the left and right lung images corresponding to the multiple displayed DR lung images based on the minimum preset air threshold and the set threshold step size includes:
[0025] Based on the minimum preset air threshold and the set threshold step size, the air threshold range to be displayed is determined;
[0026] Based on the air threshold range to be displayed, air labels are applied to the left and right lung images corresponding to the multiple DR lung images to be displayed; and / or,
[0027] The method for determining the air threshold range to be displayed based on the minimum preset air threshold and the set threshold step size includes:
[0028] Determine the maximum pixel thresholds for the left and right lung images corresponding to multiple DR lung images during the breathing process;
[0029] Displays the threshold sliders corresponding to the minimum preset air threshold and the maximum pixel threshold;
[0030] Based on the set threshold step size, adjust the threshold value on the threshold slider to determine the air threshold range to be displayed; and / or
[0031] The method for marking air in the left and right lung images corresponding to the multiple displayed DR lung images includes:
[0032] Obtain the first configured color and / or the first configured transparency corresponding to the air icon;
[0033] Based on the first configured color and / or the first configured transparency, air markings are applied to the left and right lung images corresponding to the multiple displayed DR lung images; and / or,
[0034] The method for determining the lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process, based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, includes:
[0035] Based on the preset air threshold range, the air marker regions corresponding to the multiple DR lung images are determined respectively;
[0036] Based on the air marker regions corresponding to the multiple DR lung images, determine the lung ventilation regions corresponding to the multiple DR lung images at multiple time points during the breathing process; and / or,
[0037] The method for displaying the lung ventilation regions corresponding to multiple DR lung images at multiple times during the respiratory process includes:
[0038] Obtain the first configured color and / or the first configured transparency corresponding to the air identification area;
[0039] Based on the first configured color and / or the first configured transparency, the air marker areas in the left and right lung images corresponding to the multiple DR lung images are displayed.
[0040] Preferably, before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the multiple DR lung images during the breathing process are segmented into left and right lungs to obtain the left and right lung images corresponding to the multiple DR lung images during the breathing process; and / or,
[0041] The method for segmenting the left and right lungs from multiple DR lung images during the breathing process to obtain the corresponding left and right lung images from the multiple DR lung images during the breathing process includes:
[0042] The method for segmenting the left and right lungs in DR lung images at multiple time points during the respiratory process to obtain DR left lung images and DR right lung images at multiple time points includes: detecting the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges in the left and right chest images of the DR lung images at multiple time points during the respiratory process, respectively, to obtain DR left lung images and DR right lung images at multiple time points; or,
[0043] Obtain a pre-defined convolutional neural network segmentation model and DR lung region label images used to train the segmentation model; train the segmentation model using the DR lung region label images used to train the segmentation model; based on the trained segmentation model, segment the left and right lungs of multiple DR lung images at multiple time points during the breathing process, obtaining DR left lung images and DR right lung images at multiple time points; and / or, the method for determining the DR lung region label images used to train the segmentation model includes: performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of the multiple DR lung region images, respectively, to obtain DR lung region label images corresponding to the multiple DR lung region images; and / or,
[0044] Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, rib suppression or rib reduction is performed on the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0045] According to one aspect of this disclosure, a method for determining air retention is provided, comprising: including or applying the lung ventilation determination method described above to obtain lung ventilation regions corresponding to multiple DR lung images at multiple times during the respiratory process;
[0046] Based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple moments during the breathing process, the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process are determined; and / or,
[0047] The method for determining the air retention area in the left and right lung images corresponding to multiple DR lung images during the breathing process, based on the left and right lung images corresponding to multiple DR lung images at multiple moments during the breathing process and the lung ventilation area corresponding to multiple DR lung images at multiple moments during the breathing process, includes:
[0048] Based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process, the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process are determined.
[0049] Based on the preset air threshold range and the non-ventilated lung region, determine the air retention regions in the left and right lung images corresponding to multiple DR lung images during the breathing process; and / or,
[0050] The method for determining the non-ventilated lung regions corresponding to multiple DR lung images at multiple times during the respiratory process, based on the left and right lung images corresponding to multiple DR lung images during the respiratory process and the lung ventilation regions corresponding to multiple DR lung images at multiple times during the respiratory process, includes:
[0051] The left and right lung images corresponding to multiple DR lung images during the breathing process are subtracted from the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process to obtain the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process; and / or,
[0052] It also includes: displaying the air retention areas in the left and right lung images corresponding to multiple DR lung images during the breathing process, including:
[0053] Obtain the second configuration color and / or second configuration transparency corresponding to the air retention area;
[0054] Based on the second configuration color and / or the second configuration transparency, the air retention areas of the left and right lung images corresponding to the multiple DR lung images are displayed.
[0055] According to one aspect of this disclosure, a lung ventilation determination device is provided, comprising: an acquisition unit, configured to acquire left lung images and right lung images corresponding to multiple DR lung images during the breathing process, multiple registration transformation matrices during the breathing process, and a preset air threshold range;
[0056] The registration unit is used to perform registration operations on the left lung image and right lung image corresponding to the multiple DR lung images respectively using multiple registration transformation matrices in the breathing process, so as to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
[0057] The determining unit is configured to determine, based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, the lung ventilation regions corresponding to the multiple DR lung images at multiple time points during the breathing process; and / or,
[0058] It also includes: a registration transformation matrix determination unit;
[0059] The registration transformation matrix determination unit is used to determine the plurality of registration transformation matrices before acquiring the plurality of registration transformation matrices during the breathing process; and / or,
[0060] The registration transformation matrix determination unit includes: a first registration unit and a second registration unit;
[0061] The first registration unit is used to register adjacent DR lung images of multiple DR lung images during the respiratory process, respectively, to obtain multiple registration transformation matrices corresponding to the respiratory process; or,
[0062] The first registration unit is used to register adjacent left lung images and right lung images corresponding to multiple DR lung images during the breathing process, respectively, to obtain multiple registration transformation matrices corresponding to the left lung images and multiple registration transformation matrices corresponding to the right lung images during the breathing process.
[0063] Furthermore, the second registration unit is used to perform registration operations on the left and right lung images corresponding to the multiple DR lung images respectively using multiple registration transformation matrices corresponding to the left lung image and the right lung image corresponding to the multiple DR lung images, to obtain the left lung registration image and the right lung registration image corresponding to the multiple DR lung images; and / or,
[0064] The second registration unit includes: an image configuration unit and a registration image generation unit;
[0065] The image configuration unit is used to configure the DR lung image at the first moment during the breathing process as a fixed image, and to configure the DR lung image at the second moment corresponding to the next moment adjacent to the first moment as a floating image;
[0066] The registration image generation unit is used to perform registration operations on the fixed image and the floating image, or the left lung image and right lung image corresponding to the fixed image and the left lung image and right lung image corresponding to the floating image, respectively, using multiple registration transformation matrices during the breathing process, to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images; and / or
[0067] It also includes: a preset air threshold range determination unit;
[0068] The preset air threshold range determining unit is used to determine the preset air threshold range before obtaining the preset air threshold range; and / or,
[0069] The preset air threshold range determination unit includes: a minimum preset air threshold determination unit and a maximum preset air threshold determination unit;
[0070] The minimum preset air threshold determination unit is used to determine the minimum preset air threshold corresponding to the left lung image and the right lung image corresponding to multiple DR lung images during the breathing process, respectively.
[0071] The maximum preset air threshold determination unit is used to determine, based on the minimum preset air threshold and a set threshold step size, the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process; and / or,
[0072] The maximum preset air threshold determination unit includes: a lung image display unit, an air identification unit, and a first threshold determination unit;
[0073] The lung image display unit is used to display the left lung image and right lung image corresponding to multiple DR lung images during the breathing process, respectively.
[0074] The air labeling unit is used to label the left and right lung images corresponding to the multiple DR lung images displayed based on the minimum preset air threshold and the set threshold step size.
[0075] The first threshold determination unit is configured to determine, based on the air markers in the left and right lung images corresponding to the multiple DR lung images, the maximum preset air threshold corresponding to the left and right lung images during the breathing process; and / or,
[0076] The threshold determination unit includes: a threshold range determination unit for air to be displayed;
[0077] The air threshold range determination unit is used to determine the air threshold range to be displayed based on the minimum preset air threshold and the set threshold step size.
[0078] The air labeling unit is used to label the left and right lung images corresponding to the multiple DR lung images to be displayed based on the air threshold range to be displayed; and / or,
[0079] The unit for determining the air threshold range to be displayed includes: a maximum pixel threshold determination unit, a threshold slider unit, and a second threshold determination unit;
[0080] The maximum pixel threshold determination unit is used to determine the maximum pixel threshold corresponding to the left lung image and the right lung image of multiple DR lung images during the breathing process.
[0081] The threshold slider unit is used to display the threshold sliders corresponding to the minimum preset air threshold and the maximum pixel threshold;
[0082] The second threshold determination unit is used to adjust the threshold value on the threshold slider based on the set threshold step size to determine the air threshold range to be displayed; and / or,
[0083] The air identification unit includes: a configuration acquisition unit and an air identification configuration unit;
[0084] The configuration acquisition unit is used to acquire the first configuration color and / or the first configuration transparency corresponding to the air icon;
[0085] The air labeling configuration unit is used to label the left and right lung images corresponding to the multiple displayed DR lung images based on the first configured color and / or the first configured transparency; and / or,
[0086] It also includes: segmentation units;
[0087] The segmentation unit is configured to acquire DR lung images at multiple moments during the respiratory process, and segment the DR lung images at multiple moments during the respiratory process into left and right lungs, before acquiring DR left lung images and / or DR right lung images at multiple moments during the respiratory process; and / or,
[0088] The segmentation unit includes: a detection unit;
[0089] The detection unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple time points during the breathing process, respectively, to obtain two-dimensional DR left lung images and two-dimensional DR right lung images at multiple time points; or,
[0090] The segmentation unit includes: a model and data acquisition unit, a training unit, and an output unit;
[0091] The model and data acquisition unit are used to acquire a segmentation model of a preset convolutional neural network and DR lung region label images used to train the segmentation model.
[0092] The training unit is used to train the segmentation model using the DR lung region label image used to train the segmentation model.
[0093] The output unit is used to segment the left and right lungs of the two-dimensional DR lung images at multiple time points during the breathing process based on the trained segmentation model, thereby obtaining DR left lung images and DR right lung images at multiple time points; and / or,
[0094] The segmentation unit further includes: a label determination unit;
[0095] The label determination unit is used to perform costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of multiple DR lung region images, respectively, to obtain DR lung region label images corresponding to the multiple DR lung region images; and / or,
[0096] It also includes: rib suppression or rib reduction units;
[0097] The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0098] According to one aspect of this disclosure, an air retention determination device is provided, comprising, or obtained by applying the lung ventilation determination method as described above or the lung ventilation determination device as described above, lung ventilation regions corresponding to multiple DR lung images at multiple times during the respiratory process; and,
[0099] Determining the unit for air retention area;
[0100] The air retention area determination unit is used to determine the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process, based on the left and right lung images corresponding to multiple DR lung images at multiple moments during the breathing process and the lung ventilation areas corresponding to multiple DR lung images during the breathing process; and / or,
[0101] The air retention area determination unit includes: a lung non-ventilated area determination unit and an area determination unit;
[0102] The lung non-ventilation area determination unit is used to determine the lung non-ventilation area corresponding to the multiple DR lung images at multiple times during the breathing process based on the left lung image and right lung image corresponding to the multiple DR lung images at multiple times during the breathing process and the lung ventilation area corresponding to the multiple DR lung images at multiple times during the breathing process.
[0103] The region determination unit is used to determine, based on the preset air threshold range and the non-ventilated lung region, the air retention regions of the left and right lung images corresponding to multiple DR lung images during the breathing process; and / or,
[0104] The region determination unit includes: a subtraction unit;
[0105] The subtraction unit is used to subtract the left and right lung images corresponding to multiple DR lung images during the breathing process from the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process, to obtain the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process; and / or
[0106] It also includes: an air retention area display unit; the air retention area display unit is used to display the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process; and / or,
[0107] The air retention area display unit includes: an air retention area configuration acquisition unit and a configuration display unit;
[0108] The air retention area configuration acquisition unit is used to acquire the second configuration color and / or second configuration transparency corresponding to the air retention area;
[0109] The configuration display unit is used to display the air retention areas of the left and right lung images corresponding to the multiple DR lung images, based on the second configuration color and / or the second configuration transparency.
[0110] According to one aspect of this disclosure, an electronic device is provided, comprising:
[0111] processor;
[0112] Memory used to store processor-executable instructions;
[0113] The processor is configured to execute the above-described lung ventilation determination method and / or air retention determination method.
[0114] According to one aspect of this disclosure, a computer-readable storage medium is provided having computer program instructions stored thereon, which, when executed by a processor, implement the above-described lung ventilation determination method and / or air retention determination method.
[0115] In the embodiments of this disclosure, a method and apparatus, electronic device and storage medium for determining lung ventilation and air retention are proposed to solve the problem that current DR lung images cannot provide corresponding quantitative analysis of lung ventilation and air retention for patients with chronic obstructive pulmonary disease or respiratory distress syndrome, thereby improving the level of intelligent assisted diagnosis or assessment based on DR lung images.
[0116] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0117] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0118] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.
[0119] Figure 1 A flowchart illustrating a method for determining lung ventilation according to an embodiment of the present disclosure is shown;
[0120] Figure 2 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment;
[0121] Figure 3 This is a block diagram illustrating an electronic device 1900 according to an exemplary embodiment. Detailed Implementation
[0122] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0123] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0124] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0125] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0126] It is understood that the various lung ventilation determination methods and air retention determination methods mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further.
[0127] In addition, this disclosure also provides a lung ventilation determination device, an air retention determination device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any of the lung ventilation determination methods or air retention determination methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method, and will not be repeated here.
[0128] Figure 1 A flowchart illustrating a lung ventilation determination method according to an embodiment of the present disclosure is shown, such as... Figure 1As shown, the lung ventilation determination method includes: Step S101: acquiring left and right lung images corresponding to multiple DR lung images during the breathing process, multiple registration transformation matrices during the breathing process, and a preset air threshold interval; Step S102: using the multiple registration transformation matrices during the breathing process, performing registration operations on the left and right lung images corresponding to the multiple DR lung images respectively, to obtain the left and right lung registration images corresponding to the multiple DR lung images; Step S103: determining the lung ventilation region corresponding to the multiple DR lung images at multiple times during the breathing process based on the preset air threshold interval and the left and right lung registration images corresponding to the multiple DR lung images respectively.
[0129] Step S101: Acquire the left and right lung images corresponding to multiple DR lung images during the breathing process, multiple registration transformation matrices during the breathing process, and a preset air threshold range. Wherein, the multiple DR lung images during the breathing process are multiple DR lung images; the left and right lung images corresponding to the multiple DR lung images during the breathing process are two-dimensional DR left lung images and two-dimensional DR right lung images.
[0130] In the embodiments of this disclosure and other possible embodiments, digital X-ray (DR) imaging equipment can provide high-resolution and real-time X-ray images and has been widely used in examinations of the skeletal system, chest, dentistry, etc., such as fracture diagnosis, lung disease screening, and dental X-rays. Therefore, DR imaging equipment can be used to image the skeletal system, chest, dentistry, etc.
[0131] In embodiments of this disclosure, before acquiring multiple 2D DR left lung images and / or 2D DR right lung images at various times during breathing or breath-holding, the multiple 2D DR lung images at various times during breathing or breath-holding are acquired, and the left and right lungs are segmented into multiple 2D DR left lung images and 2D DR right lung images at various times during breathing or breath-holding, to obtain multiple 2D DR left lung images and 2D DR right lung images at various times. For example, the multiple 2D DR lung images at various times during breath-holding can be configured as multiple first DR lung images, and the multiple 2D DR left lung images at various times during breathing can be configured as multiple second DR lung images.
[0132] In embodiments of this disclosure, the method for segmenting the left and right lungs of multiple 2D DR lung images at various time points during the breathing process or breath-holding state to obtain multiple 2D DR left lung images and 2D DR right lung images at various time points includes: performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragm edge detection on the left and right chest images of the multiple 2D DR lung images at various time points during the breathing process or breath-holding state, respectively, to obtain multiple 2D DR left lung images and 2D DR right lung images at various time points; or, the method for segmenting the left and right lungs of the multiple 2D DR lung images at various time points during the breathing process to obtain multiple 2D DR left lung images and 2D DR right lung images at various time points includes: obtaining a preset convolutional neural network... The method comprises: a segmentation model of the network and DR lung region label images used to train the segmentation model; training the segmentation model using the DR lung region label images used to train the segmentation model; segmenting the left and right lungs of the two-dimensional DR lung images at multiple time points during the breathing process based on the trained segmentation model, obtaining two-dimensional DR left lung images and two-dimensional DR right lung images at multiple time points; and / or, the method for determining the DR lung region label images used to train the segmentation model comprises: performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of multiple DR lung region images respectively, to obtain DR lung region label images corresponding to the multiple DR lung region images.
[0133] In the embodiments of this disclosure, before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, rib suppression or rib reduction is performed on the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0134] In the embodiments of this disclosure and other possible embodiments, a DR image to be processed is acquired, and it is determined whether the DR image to be processed is a lung image; wherein, the lung image is configured as a two-dimensional DR lung image at multiple moments during breathing or breath-holding; if it is a lung image, then a thoracic cavity detection is performed on the DR image to be processed to remove information other than the thoracic cavity from the DR image to be processed. The DR image to be processed is configured as a two-dimensional DR left lung image at multiple moments during breathing or breath-holding. More specifically, the two-dimensional DR left lung images at multiple moments during breathing and breath-holding are respectively configured as multiple first DR lung images and multiple second DR lung images.
[0135] In embodiments of this disclosure and other possible embodiments, the method for determining whether a DR image to be processed is a lung image includes: calculating the average grayscale value corresponding to the DR image to be processed, and determining whether it is a lung image based on the average grayscale value and a set grayscale value. Those skilled in the art can configure the set grayscale value according to actual needs. For example, the set grayscale value can be configured to any value or range between -1000HU and 0HU. Alternatively, in embodiments of this disclosure and other possible embodiments, the determination of whether a DR image to be processed is a lung image can also be made by manual judgment of the DR image to be processed.
[0136] In the embodiments of this disclosure and other possible embodiments, the method for determining whether an image is a lung image based on the average gray value and a set gray value includes: if the DR image to be processed has not undergone inversion processing, then if the average gray value is less than or equal to the set gray value, the DR image to be processed is determined to be a lung image; if the DR image to be processed has undergone inversion processing, then if the average gray value is greater than or equal to the set gray value, the DR image to be processed is determined to be a lung image. The principle is that if it is a lung image, the lungs in the lung image will generally be filled with or contain a certain amount of air, and air corresponds to a relatively small gray value (CT value), generally configured as -1000 HU; while the gray value (CT value) of water is generally configured as 0 HU, and the gray value (CT value) of bone is generally configured as 1000 HU or higher; therefore, the above technical solution is used to determine whether the DR image to be processed is a lung image.
[0137] In embodiments of this disclosure, if the image is a lung image, then a thoracic cavity detection is performed on the DR image to be processed to remove information outside the thoracic cavity from the DR image to be processed. In embodiments of this disclosure and other possible embodiments, the information outside the thoracic cavity includes: removing unnecessary information such as arms, heads, and blank backgrounds.
[0138] In the embodiments of this disclosure, before performing thoracic cavity detection on the DR image to be processed (the lung image to be segmented or the two-dimensional DR lung image at multiple moments during breathing or breath-holding), the DR image to be processed is filtered, and the filtered lung image to be segmented is downsampled to a set size.
[0139] In embodiments of this disclosure, image enhancement is performed on the logarithmic transformation of the DR image to be processed, which is of a set size, to obtain an enhanced DR image to be processed.
[0140] (1) Image preprocessing of DR images to be processed (lung images to be segmented or two-dimensional DR lung images at multiple times during breathing or breath-holding).
[0141] In the embodiments of this disclosure and other possible embodiments, a. a DR image (lung image to be segmented) is processed, and a low-pass filter is applied to the DR image (lung image to be segmented). The filtered lung image to be segmented is then downsampled to a set size to speed up image processing. A logarithmic transformation is performed on the downsampled lung image to enhance the image, resulting in an enhanced lung image to be segmented. The low-pass template used is Gaussian filtering or mean filtering, and the set size value can be configured as 3×3 or 5×5. The downsampling range can be configured to 2-6 times. Those skilled in the art can configure the set size value and / or the downsampling range according to actual needs.
[0142] In the embodiments of this disclosure and other possible embodiments, b. the technical solution for detecting the thoracic cavity in the DR image to be processed adopts adaptive determination of the thoracic cavity contour based on the characteristics of the lung image to be segmented, and removes unnecessary information such as arms, head and blank background.
[0143] In the embodiments of this disclosure, step 1) of the method for performing DR image processing on the DR image to be processed includes: calculating a plurality of first gradient magnitudes corresponding to the horizontal direction of each pixel in the DR image to be processed and a plurality of second gradient magnitudes corresponding to the vertical direction of each pixel; determining a plurality of total gradient magnitudes based on the plurality of first gradient magnitudes and the plurality of second gradient magnitudes; integrating the plurality of first gradient magnitudes corresponding to the horizontal direction and the plurality of second gradient magnitudes corresponding to the vertical direction along a direction perpendicular to them to obtain a plurality of first integral values and a plurality of second integral values; and integrating the plurality of total gradient magnitudes. The integral is divided into two directions corresponding to the longitudinal and transverse directions to obtain multiple third integral values and multiple fourth integral values; multiple first local maxima corresponding to the multiple first ratios are calculated, and multiple first local minima and multiple second local minima corresponding to the multiple first ratios and multiple second ratios are calculated; the thoracic profile corresponding to the DR image to be processed is determined based on the multiple first local maxima, the multiple first local minima, the multiple second local minima, and the thoracic profile features; wherein, the thoracic profile features can be configured with a first segmentation position of the neck or shoulder corresponding to the thoracic profile and a second segmentation position on both sides of the thoracic profile.
[0144] In embodiments of this disclosure, the method for calculating multiple first gradient magnitudes in the horizontal direction and multiple second gradient magnitudes in the vertical direction of each pixel in the DR image to be processed includes: obtaining a gradient operator; and using the gradient operator to calculate multiple first gradient magnitudes in the horizontal direction and multiple second gradient magnitudes in the vertical direction of each pixel in the DR image to be processed.
[0145] In embodiments of this disclosure, the method for determining multiple total gradient magnitudes based on the plurality of first gradient magnitudes and the plurality of second gradient magnitudes includes: calculating a plurality of first sums of squares corresponding to the plurality of first gradient magnitudes and a plurality of second sums of squares corresponding to the plurality of second gradient magnitudes, and determining the plurality of total gradient magnitudes based on the plurality of first sums of squares and the plurality of second sums of squares; and / or, the method for determining the plurality of total gradient magnitudes based on the plurality of first sums of squares and the plurality of second sums of squares includes: summing the plurality of first sums of squares and the plurality of second sums of squares, and taking the square root of the sums to obtain the plurality of total gradient magnitudes.
[0146] In embodiments of this disclosure and other possible embodiments, a plurality of first gradient magnitudes corresponding to the horizontal direction of each pixel in the lung image to be segmented and a plurality of second gradient magnitudes corresponding to the vertical direction of each pixel are calculated respectively; and a plurality of total gradient magnitudes are determined based on the plurality of first gradient magnitudes and the plurality of second gradient magnitudes; wherein, the method of determining the plurality of total gradient magnitudes based on the plurality of first gradient magnitudes and the plurality of second gradient magnitudes includes: calculating a plurality of first sums of squares corresponding to the plurality of first gradient magnitudes and a plurality of second sums of squares corresponding to the plurality of second gradient magnitudes respectively, and determining the plurality of total gradient magnitudes based on the plurality of first sums of squares and the plurality of second sums of squares. The method of determining the plurality of total gradient magnitudes based on the plurality of first sums of squares and the plurality of second sums of squares includes: summing the plurality of first sums of squares and the plurality of second sums of squares respectively, and taking the square root of the sums to obtain the plurality of total gradient magnitudes.
[0147] For example, each pixel e in the lung image to be segmented and its eight-neighbor matrix are: Using the Sobel gradient operator Calculate the magnitudes of the first gradient (c + 2*f + ia - 2*dg) in the horizontal direction for each pixel e in the lung image to be segmented, and then use the transpose of the Sobel gradient operator. Calculate the magnitudes of the second gradient in the vertical direction (g + 2*h + ia - 2*bc) for each pixel e in the lung image to be segmented. Additionally, those skilled in the art may choose other gradient operators, such as the Roberts gradient operator or the Laplace gradient operator, depending on the specific needs.
[0148] For example, based on the plurality of first gradient magnitudes (h1, h2, ..., h... n and the plurality of second gradient magnitudes (k1,k2,...,k n Determine multiple total gradient magnitudes.
[0149] Step 2). Integrate the multiple first gradient magnitudes corresponding to the horizontal direction and the multiple second gradient magnitudes corresponding to the vertical direction along the direction perpendicular to them to obtain multiple first integral values and multiple second integral values;
[0150] Specifically, multiple first gradient magnitudes corresponding to the horizontal direction are integrated in the vertical direction to obtain multiple first integral values; and multiple second integral values are obtained by integrating multiple first gradient magnitudes corresponding to the vertical direction in the horizontal direction.
[0151] Step 3). Integrate the multiple total gradient magnitude integrals in the two corresponding directions, the vertical and horizontal directions, respectively, to obtain multiple third integral values and multiple fourth integral values; wherein, integrating the multiple total gradient magnitude integrals in the vertical direction yields multiple third integral values; and integrating the multiple total gradient magnitude integrals in the horizontal direction yields multiple fourth integral values.
[0152] Step 4). (a) When determining multiple first local maxima, calculate the ratio based on the results of Step 2 and Step 3. When the ratio is less than a preset value, the image information at this location is considered noise and needs to be discarded. The noise can be configured to be image information corresponding to unnecessary information such as arms, heads, and blank backgrounds.
[0153] Specifically, based on the plurality of first integral values and the plurality of third integral values, it is determined whether each of the plurality of first ratios corresponding to the plurality of first integral values and the plurality of third integral values in the horizontal direction should be retained.
[0154] The method for determining whether to retain each of the plurality of first ratios corresponding to the plurality of first integral values and the plurality of third integral values in the horizontal direction, based on the plurality of first integral values and the plurality of third integral values, includes: obtaining a first preset value; calculating the plurality of first ratios between the plurality of first integral values and the corresponding plurality of third integral values in the horizontal direction; and discarding the first ratio if it is less than the first preset value. In embodiments of this disclosure and other possible embodiments, those skilled in the art may configure the first preset value as needed.
[0155] (b) When determining multiple first local minima, calculate the ratio based on the results of step 2 and step 3. When the ratio is greater than a preset value, the image information at this location is considered noise and needs to be discarded. The noise can be configured to include image information corresponding to unnecessary information such as arms, heads, and blank backgrounds.
[0156] Specifically, based on the plurality of first integral values and the plurality of third integral values, it is determined whether each of the plurality of first ratios corresponding to the plurality of first integral values and the plurality of third integral values in the horizontal direction should be retained.
[0157] The method for determining whether to retain each of the plurality of first ratios corresponding to the plurality of first integral values and the plurality of third integral values in the horizontal direction, based on the plurality of first integral values and the plurality of third integral values, includes: obtaining a first preset value; calculating the plurality of first ratios between the plurality of first integral values and the corresponding plurality of third integral values in the horizontal direction; and discarding the first ratio if one of the plurality of first ratios is greater than the first preset value.
[0158] Specifically, based on the plurality of second integral values and the plurality of fourth integral values, it is determined whether each of the plurality of second ratios corresponding to the plurality of second integral values and the plurality of fourth integral values in the longitudinal direction should be retained.
[0159] The method for determining whether to retain each of the plurality of second ratios corresponding to the plurality of second integral values and the plurality of fourth integral values in the longitudinal direction, based on the plurality of second integral values and the plurality of fourth integral values, includes: obtaining a second preset value; calculating the plurality of second ratios between the plurality of second integral values and the corresponding plurality of fourth integral values in the longitudinal direction; and discarding a certain second ratio if it is greater than the second preset value. In embodiments of this disclosure and other possible embodiments, those skilled in the art may configure the second preset value as needed.
[0160] In embodiments of this disclosure, before calculating the plurality of first local maxima corresponding to the plurality of first ratios, and calculating the plurality of first local minima and the plurality of second local minima corresponding to the plurality of first ratios and the plurality of second ratios, it is determined, based on the plurality of first integral values and the plurality of third integral values, whether each of the plurality of first ratios corresponding to the plurality of first integral values and the plurality of third integral values in the horizontal direction should be retained; and, based on the plurality of second integral values and the plurality of fourth integral values, it is determined whether each of the plurality of second ratios corresponding to the plurality of second integral values and the plurality of fourth integral values in the vertical direction should be retained; then, the plurality of first local maxima corresponding to the retained plurality of first ratios are calculated, and the plurality of first local minima and the plurality of second local minima corresponding to the retained plurality of first ratios and the retained plurality of second ratios are calculated.
[0161] In embodiments of this disclosure, the differential derivatives of the first curves corresponding to the plurality of first ratios are calculated to obtain the plurality of first local maxima and the plurality of first local minima; and the differential derivatives of the second curves corresponding to the plurality of second ratios are calculated to obtain the plurality of second local minima.
[0162] In embodiments of this disclosure, the method for determining the thoracic map corresponding to the lung image to be segmented based on a plurality of first local maxima, a plurality of first local minima, a plurality of second local minima, and thoracic features includes: determining second segmentation positions on both sides of the thoracic cavity based on the plurality of first local maxima and the thoracic features; determining first segmentation positions of the neck or shoulder based on the plurality of second local minima and the thoracic features; and determining the thoracic map corresponding to the lung image to be segmented based on the first segmentation positions and the first segmentation positions.
[0163] In the embodiments of this disclosure and other possible embodiments, 5) calculate the plurality of first local maxima corresponding to the plurality of first ratios discarded in step 4(a). Similarly, calculate the plurality of first local minima and the plurality of second local minima corresponding to the plurality of first ratios and the plurality of second ratios discarded in step 4(b). Wherein, the plurality of first ratios discarded are the plurality of first ratios retained after discarding; similarly, the plurality of second ratios discarded are the plurality of second ratios retained after discarding.
[0164] The thoracic profile corresponding to the lung image to be segmented is determined based on multiple first local maxima, multiple first local minima, multiple second local minima, and thoracic profile features, removing unnecessary information such as arms, head, and blank background. The thoracic profile features can be configured with a first segmentation position corresponding to the neck or shoulder and second segmentation positions on both sides of the thoracic profile.
[0165] The method for determining the thoracic map corresponding to the lung image to be segmented based on multiple first local maxima, multiple first local minima, multiple second local minima, and thoracic features includes: determining second segmentation positions on both sides of the thoracic cavity based on the multiple first local maxima and the thoracic features; determining first segmentation positions of the neck or shoulder based on the multiple second local minima and the thoracic features; and determining the thoracic map corresponding to the lung image to be segmented based on the first segmentation positions.
[0166] The plurality of first local maxima are obtained by calculating the differential derivatives of the first curves corresponding to the plurality of discarded first ratios; wherein the differential derivatives can be configured as first-order, second-order, or other multi-order differential derivatives. Similarly, the plurality of first local minima are obtained by calculating the differential derivatives of the first curves corresponding to the plurality of discarded first ratios; wherein the differential derivatives can be configured as first-order, second-order, or other multi-order differential derivatives. Similarly, the plurality of second local minima are obtained by calculating the differential derivatives of the second curves corresponding to the plurality of discarded second ratios; wherein the differential derivatives can be configured as first-order, second-order, or other multi-order differential derivatives.
[0167] In embodiments of this disclosure, the method for determining the second segmentation positions on both sides of the thorax based on the plurality of first local maxima and the thorax features includes: determining the maximum value among all the plurality of first local maxima on one side of the centerline of the DR image to be processed, and configuring the position information corresponding to the maximum value as the segmentation position point of the side to be determined corresponding to the side of the thorax; determining the minimum value among all the plurality of first local minima on the other side of the centerline of the DR image to be processed, and configuring the position information corresponding to the minimum value as the segmentation position point of the other side to be determined corresponding to the other side of the thorax.
[0168] In embodiments of this disclosure, a method for determining the first segmentation position of the neck or shoulder based on the plurality of second local minima and the thoracic features includes: configuring the position information corresponding to the minimum value of the plurality of second local minima as the first segmentation position of the neck or shoulder.
[0169] In embodiments of this disclosure and other possible embodiments, the method for determining the second segmentation positions on both sides of the thorax based on the plurality of first local maxima and the thorax features includes: determining the maximum value among all the plurality of first local maxima on one side (right side) of the center line of the image to be segmented, and configuring the position information corresponding to the maximum value as the segmentation position point of the side to be determined corresponding to the side of the thorax; determining the minimum value among all the plurality of first local minima on the other side (left side) of the center line of the image to be segmented, and configuring the position information corresponding to the minimum value as the segmentation position point of the other side to be determined corresponding to the other side of the thorax.
[0170] For example, determine all of the plurality of first local maxima (a1, a2, ..., a) on one side (right side) of the centerline. n The maximum value a in ) mWhere m is less than or equal to n; m is the location information corresponding to the maximum value (e.g., a certain horizontal coordinate), that is, the segmentation point of the side to be determined corresponding to one side of the thorax. Similarly, determine all the plurality of first local minima (b1, b2, ..., b) on the other side (left side) of the centerline. n The minimum value b in ) r , where r is less than or equal to n; r is the location information (e.g., a certain horizontal coordinate) corresponding to the minimum value.
[0171] In embodiments of this disclosure and other possible embodiments, a method for determining a first segmentation position of the neck or shoulder based on the plurality of second local minima and the thoracic features includes: configuring the position information (e.g., a certain ordinate) corresponding to the minimum value of the plurality of second local minima as the first segmentation position of the neck or shoulder.
[0172] (2) Lung field segmentation.
[0173] In the embodiments of this disclosure, the thoracic image obtained by thoracic cavity detection of the DR image to be processed is configured as the lung image to be segmented; and the left and right lungs are segmented based on the lung image to be segmented.
[0174] In embodiments of this disclosure, the lung image to be segmented is segmented into a left chest image and a right chest image; the left lung and right lung are segmented based on the left chest image and the right chest image, respectively.
[0175] In embodiments of this disclosure, the lung image to be segmented is segmented into a left chest image and a right chest image; the left lung and right lung are segmented based on the left chest image and the right chest image, respectively; or, a segmentation model of a preset convolutional neural network, DR lung region label images used to train the segmentation model, and multiple DR lung images (lung images to be segmented) at multiple times during breathing or breath-holding; wherein, the method for determining the DR lung region label images used to train the segmentation model includes: performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left chest image and right chest image of the multiple DR lung region images, respectively, to obtain DR lung region label images corresponding to the multiple DR lung region images; training the segmentation model using the DR lung region label images used to train the segmentation model; and completing the left lung and / or right lung segmentation of the multiple DR lung images to be segmented based on the trained segmentation model.
[0176] In embodiments of this disclosure and other possible embodiments, the segmentation model of the preset convolutional neural network is configured as a Unet convolutional neural network, an nnUnet convolutional neural network, or a convolutional neural network improved based on the Unet convolutional neural network, or a convolutional neural network improved based on the nnUnet convolutional neural network. For example, the convolutional neural network improved based on the Unet convolutional neural network can be configured as a ResUnet convolutional neural network with a residual structure.
[0177] In embodiments of this disclosure and other possible embodiments, the Unet convolutional neural network or nnUnet convolutional neural network or a convolutional neural network improved based on Unet convolutional neural network or a convolutional neural network improved based on nnUnet convolutional neural network includes at least: a downsampling shrinking path, an upsampling expanding path, and a final classification layer.
[0178] In embodiments of this disclosure and other possible embodiments, the multiple DR lung area images are configured to be acquired during deep inspiration or breath-holding.
[0179] In embodiments of this disclosure and other possible embodiments, before training the segmentation model using the DR lung region label image used to train the segmentation model, the DR lung region label image is data augmented to obtain an augmented DR lung region label image; and the segmentation model is trained using the augmented DR lung region label image.
[0180] In embodiments of this disclosure and other possible embodiments, the method for data augmentation of the DR lung region label image to obtain an enhanced DR lung region label image includes: performing spatial geometric transformation and / or flipping and / or rotating and / or cropping and / or scaling and / or image shifting and / or edge filling and / or random erasing and / or random occlusion operations on the DR lung region label image to obtain the enhanced DR lung region label image.
[0181] In embodiments of this disclosure and other possible embodiments, the method for data augmentation of the DR lung region label image to obtain an enhanced DR lung region label image further includes: randomly selecting any two DR lung region label images from the DR lung region label images; performing a configuration operation on the arbitrary two DR lung region label images to obtain a corresponding DR lung region label registration image; and performing a fusion operation on the DR lung region label registration image to obtain the enhanced DR lung region label image.
[0182] In the embodiments of this disclosure and other possible embodiments, the method of performing a fusion operation on the DR lung region label registration image to obtain an enhanced DR lung region label image includes: performing a minimum, maximum, or average operation on the pixel values corresponding to the DR lung region label registration image to obtain the enhanced DR lung region label image.
[0183] c. Based on the chest image corresponding to the lung image to be segmented, the chest image is divided into two parts: a left chest image and a right chest image. Based on this, the left lung field of the left chest image is segmented and the right lung field of the right chest image is segmented.
[0184] In embodiments of this disclosure, a method for segmenting the left and right lungs based on the left chest image and the right chest image respectively includes: detecting the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left chest image and the right chest image respectively; obtaining a segmented image of the left lung based on the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges corresponding to the left chest image; and obtaining a segmented image of the right lung based on the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges corresponding to the right chest image.
[0185] In an embodiment of this disclosure, the method for determining the rib edge boundary of the left chest image includes: constructing a directional derivative template for the left chest image using directional derivatives, and setting a predetermined weighting depth for the directional derivative template; performing template traversal of the directional derivatives on the left chest image using the directional derivative template corresponding to the predetermined weighting depth, and superimposing the result of the template traversal onto the left chest image to obtain a superimposed left chest image; performing binarization processing on the superimposed left chest image to obtain a binary map of the left rib edge; obtaining a rib edge angle map of the left side to be filtered based on the binary map of the left rib edge and the superimposed left chest image; obtaining a filtered left rib edge angle map based on the rib edge angle map of the left side to be filtered and a first predetermined rib edge angle; and performing connected component selection on the left rib edge angle map to obtain the rib edge boundary corresponding to the largest connected component.
[0186] In an embodiment of this disclosure, the method for obtaining the left rib angle map to be screened based on the left rib edge binary image and the overlay image of the left chest includes: performing morphological opening and closing operations and thinning processing on the left rib edge binary image to obtain a morphologically processed left rib edge binary image; performing a bitwise AND operation on the gradient direction angle of each pixel in the morphologically processed left rib edge binary image and the overlay image of the left chest to obtain the left rib angle map to be screened.
[0187] In the embodiments of this disclosure, before constructing the directional derivative template of the left chest image using the directional derivative, the left chest image is subjected to Gaussian blurring at a set scale to obtain a corresponding Gaussian blurred image of the left chest; then, the directional derivative template of the Gaussian blurred image of the left chest is constructed using the directional derivative; during the process of defining the rib edge boundary of the left chest image, the template of the directional derivative corresponding to the set weighted depth is used to perform template traversal of the directional derivative of the Gaussian blurred image of the left chest, and the result of the template traversal is superimposed on the left chest image to obtain a Gaussian blurred superimposed image of the left chest; the Gaussian blurred superimposed image of the left chest is binarized to obtain a binary map of the left rib edge; based on the binary map of the left rib edge and the Gaussian blurred superimposed image of the left chest, the rib edge angle map of the left side to be screened is obtained.
[0188] a. In embodiments of this disclosure and other possible embodiments, the lung field segmentation steps are as follows, taking a left chest image as an example. For example, rib margin boundary detection in a left chest image.
[0189] 1) Apply a Gaussian blur of a predetermined scale to the left chest region (image) to reduce the detail information of this left chest region (image), resulting in a processed Gaussian blurred image of the left chest. The predetermined scale can be configured as 7×7 or 9×9, and those skilled in the art can configure the predetermined scale according to actual needs. The root mean square error of the Gaussian blur algorithm can be configured as a value such as 2, 2.5, or 3, and those skilled in the art can configure the root mean square error σ of the Gaussian blur algorithm according to actual needs.
[0190] 2) Construct a directional derivative template for the processed Gaussian blurred image f(x0,y0) of the left chest using the directional derivative, and set a weighted depth for the directional derivative template. Here, (x0,y0) represent the x-coordinate x0 and y-coordinate y0 of the coordinate point corresponding to the left chest image f(x0,y0), respectively.
[0191] The formula for calculating the directional derivative is as follows:
[0192]
[0193] Where l is a unit vector in the direction, and cosα and cosβ are the cosines of the l direction. The direction can be configured as a horizontal direction, α is the angle formed by the l direction and the horizontal direction, and β is the angle formed by the l direction and the vertical direction.
[0194] The method for constructing a directional derivative template of the processed Gaussian blurred image f(x0,y0) of the left chest using the directional derivative includes: obtaining the first radius in the x0 direction corresponding to the set template radius r. and the second radius in the y0 direction Based on the first radius and the second radius The directional derivative template of the processed Gaussian blurred image f(x0,y0) of the left chest is constructed using the directional derivative.
[0195]
[0196] in,
[0197]
[0198] For example, the set template radius can be configured to 1, 2, 3, 4, 5, etc. Those skilled in the art can configure the set template radius according to actual needs.
[0199] For example, the first radius in the x0 direction When configured as -1, 0, or 1, the second radius in the y0 direction The value range is -1, 0, and 1.
[0200] Those skilled in the art can configure the set weighted depth according to actual needs; for example, the set weighted depth can be configured to 6. Furthermore, the method for setting the set weighted depth of the directional derivative template includes: obtaining the set weighted depth; multiplying the set weighted depth by the directional derivative template to obtain the directional derivative template corresponding to the set weighted depth; and, based on the structural characteristics of the rib region, reasonably setting a range of directional angles and substituting it into the directional derivative calculation formula to obtain a template array.
[0201] 3) Using the directional derivative template corresponding to the weighted depth, perform directional derivative template traversal on the Gaussian blurred image of the left chest after step a.1, and superimpose the result of the template traversal (add the corresponding pixels) onto the Gaussian blurred image of the left chest in step 1 to obtain the Gaussian blurred superimposed image of the left chest.
[0202] For example, in the Gaussian blurred image of the left chest, each pixel e and its eight-neighbor matrix are: Using the directional derivative template corresponding to the weighted depth Calculate the superposition value of e for each pixel (e+w*(c+2*f+ia-2*dg)).
[0203] 4) Perform maximum inter-class variance binarization on the result of step a.3 (the Gaussian blurred image of the left chest) to obtain the rib edge binary image.
[0204] 5) Perform morphological opening and closing operations and thinning on the result of step a.4 (rib edge binary image) to obtain the morphologically processed rib edge binary image.
[0205] 6) Calculate the horizontal and vertical gradients of the results from step a.3 (the Gaussian blurred overlay image of the left chest) to obtain the horizontal gradient map and the vertical gradient map; based on the horizontal gradient map and the vertical gradient map, calculate the gradient direction angle of each pixel in the Gaussian blurred overlay image of the left chest.
[0206] 7) Perform a bitwise AND operation between the result of step a.5 (the morphologically processed binary image of the rib margin) and the result of step a.6 (the gradient direction angle of each pixel in the Gaussian blurred superimposed image of the left chest) to obtain the rib margin angle image to be screened.
[0207] 8) Based on the characteristics of the rib edge tissue, set a reasonable angle range (first set rib edge angle range), and perform angle filtering on the results obtained in step a.7 (rib edge angle diagram to be filtered) to obtain the filtered rib edge angle diagram.
[0208] 9) Based on the results in step a.8 (the filtered rib angle diagram), select the connected components to obtain the largest connected component, which is the rib portion (rib boundary).
[0209] Similarly, in the embodiments of this disclosure, the method for determining the rib edge boundary of the right chest image includes: constructing a directional derivative template of the right chest image using directional derivatives, and setting a predetermined weighting depth for the directional derivative template; performing template traversal of the directional derivatives of the right chest image using the directional derivative template corresponding to the predetermined weighting depth, and superimposing the result of the template traversal onto the right chest image to obtain a right chest overlay image; performing binarization processing on the right chest overlay image to obtain a right rib edge binary image; obtaining a rib edge angle image of the right side to be filtered based on the right rib edge binary image and the right chest overlay image; obtaining a filtered right rib edge angle image based on the rib edge angle image of the right side to be filtered and a second predetermined rib edge angle; and performing connected component selection on the right rib edge angle image to obtain the rib edge boundary corresponding to the largest connected component.
[0210] Similarly, in the embodiments of this disclosure, the method for obtaining the right rib angle map to be screened based on the right rib edge binary image and the right chest superimposed image includes: performing morphological opening and closing operations and thinning processing on the right rib edge binary image to obtain a morphologically processed right rib edge binary image; performing a bitwise AND operation on the gradient direction angle of each pixel in the morphologically processed right rib edge binary image and the right chest superimposed image to obtain the right rib angle map to be screened.
[0211] Similarly, in the embodiments of this disclosure, before constructing the directional derivative template of the right chest image using the directional derivative, the right chest image is subjected to Gaussian blurring at a set scale to obtain a corresponding right chest Gaussian blurred image; then, the directional derivative template of the right chest Gaussian blurred image is constructed using the directional derivative; during the process of defining the rib edge boundary of the right chest image, the directional derivative template corresponding to the set weighted depth is used to perform template traversal of the directional derivative of the right chest Gaussian blurred image, and the result of the template traversal is superimposed on the right chest image to obtain a right chest Gaussian blurred superimposed image; the right chest Gaussian blurred superimposed image is binarized to obtain a right rib edge binary image; based on the right rib edge binary image and the right chest Gaussian blurred superimposed image, the rib edge angle map of the right side to be screened is obtained.
[0212] b. Lung apex boundary detection. In an embodiment of this disclosure, the method for detecting the left lung apex boundary of the left chest image includes: determining a left lung apex detection region based on the left chest image; determining a left lung apex edge binary map based on the left lung apex detection region; and obtaining the fitted left lung apex boundary by fitting a quadratic function based on the left lung apex edge binary map.
[0213] In an embodiment of this disclosure, the method for determining the detection region of the left lung apex based on the left chest image includes: detecting a first coordinate corresponding to the uppermost coordinate point of the costal margin in the left chest image; the region formed by the first coordinate and the coordinate point of the uppermost right corner of the left chest image as the left lung apex detection region.
[0214] In the embodiments of this disclosure and other possible embodiments, 1) the coordinates of the uppermost coordinate point of the costal margin portion of the detected left chest image are used. 2) The rectangular area formed by the hypotenuse of this coordinate point and the coordinate point of the upper right corner of the left chest image is the lung apex detection area. For the lung apex detection area corresponding to the right lung, the rectangular area formed by the hypotenuse of the coordinate point of the uppermost coordinate point of the costal margin portion and the coordinate point of the upper left corner of the right chest image is the lung apex detection area corresponding to the right lung. 3) The lung apex area obtained in step b.2 is subjected to a set-scale Gaussian filter and contrast enhancement to obtain a filtered and enhanced lung apex area image. 4) Based on the angular characteristics of the lung apex edge, the binary image of the left lung apex edge is determined using the same method as steps a.2 to a.5 based on the filtered and enhanced lung apex area image. The angular characteristics of the lung apex edge are configured as a set angle range. 5) Based on the features of the lung apex edge and the binary image of the left lung apex edge, the Hough space parameters of a quadratic function are used for fitting to obtain the fitted lung apex edge (line). The edge of the lung apex is characterized as a quadratic function that opens downwards.
[0215] Similarly, in the embodiments of this disclosure, the method for detecting the right lung apex boundary of the right chest image includes: determining the right lung apex detection region based on the right chest image; determining the right lung apex edge binary map based on the right lung apex detection region; and obtaining the fitted right lung apex boundary by fitting a quadratic function based on the right lung apex edge binary map.
[0216] Similarly, in the embodiments of this disclosure, the method for determining the right lung apex detection region based on the right chest image includes: detecting the second coordinate corresponding to the uppermost coordinate point of the costal margin in the right chest image; the region formed by the second coordinate and the coordinate point of the upper left corner of the left chest image as the right lung apex detection region.
[0217] c. Mediastinal and diaphragmatic edge detection. In embodiments of this disclosure, a method for detecting the left lung mediastinal and diaphragmatic edges on the left chest image includes: binarizing the left chest image to obtain a left chest binary image; performing edge detection on the left chest binary image to obtain a left chest edge binary map; obtaining a left chest edge angle map based on the gradient direction angle of each pixel in the left chest binary image and the left chest edge binary map; obtaining selected left diaphragmatic and mediastinal edge angle maps based on the obtained left chest edge angle maps and setting the edge angle ranges of the diaphragm and mediastinum; and performing connected component selection processing based on the selected left diaphragmatic and mediastinal edge angle maps to obtain the left lung mediastinal and diaphragmatic edges corresponding to the largest connected component.
[0218] In an embodiment of this disclosure, the method for binarizing the left chest image to obtain a left chest binary image includes: performing contrast enhancement processing and maximum inter-class variance processing on the left chest Gaussian blurred image corresponding to the left chest image to obtain a left chest binary image.
[0219] In an embodiment of this disclosure, the method for determining the gradient direction angle of each pixel in the binary image of the left chest edge includes: calculating the horizontal and vertical gradients of the Gaussian blurred image of the left chest corresponding to the left chest image to obtain the horizontal gradient map and the vertical gradient map of the left chest; and obtaining the gradient direction angle of each pixel in the Gaussian blurred image of the left chest based on the horizontal gradient map and the vertical gradient map of the left chest.
[0220] In embodiments of this disclosure and other possible embodiments, a method for detecting the left lung mediastinum and diaphragm edges in the left chest image includes: 1) performing contrast enhancement processing and maximum inter-class variance processing on the processed left chest Gaussian blurred image obtained in step a.1 to obtain a left chest binary image; 2) performing morphological opening and closing operations and Canny edge detection sequentially on the result of step c.1 (left chest binary image) to obtain a left chest edge binary map; 3) calculating the horizontal and vertical gradients of the processed left chest Gaussian blurred image obtained in step a.1 to obtain a horizontal gradient map and a vertical gradient map; and calculating based on the horizontal and vertical gradient maps... 4) Perform an AND operation on the left chest binary image obtained in step c.1 and the left chest edge binary image obtained in step c.2, retaining the angles at the edge pixels to obtain the left chest edge angle map; 5) Select an appropriate angle range based on the edge characteristics of the diaphragm and diaphragm (set the edge angle range of the diaphragm and diaphragm), remove stray tissue edge information in the left chest edge angle map, and obtain the selected left diaphragm and diaphragm edge angle map; 6) Perform connected component selection processing based on the result of c.5 (the selected left diaphragm and diaphragm edge angle map) to obtain the largest connected component, which is the edge region of the diaphragm and diaphragm.
[0221] Similarly, in the embodiments of this disclosure, the method for detecting the right lung mediastinal and diaphragmatic edges of the right chest image includes: binarizing the right chest image to obtain a right chest binary image; performing edge detection on the right chest binary image to obtain a right chest edge binary map; obtaining a right chest edge angle map based on the gradient direction angle of each pixel in the right chest binary image and the right chest edge binary map; obtaining selected right diaphragmatic and mediastinal edge angle maps based on the obtained right chest edge angle maps and setting the edge angle range of the diaphragm and mediastinum; and performing connected component selection processing based on the selected right diaphragmatic and mediastinal edge angle maps to obtain the right lung mediastinal and diaphragmatic edges corresponding to the largest connected component.
[0222] Similarly, in the embodiments of this disclosure, the method of binarizing the right chest image to obtain a right chest binary image includes: performing contrast enhancement processing and maximum inter-class variance processing on the right chest Gaussian blurred image corresponding to the right chest image to obtain a right chest binary image.
[0223] Similarly, in the embodiments of this disclosure, the method for determining the gradient direction angle of each pixel in the binary image of the right chest edge includes: calculating the horizontal and vertical gradients of the right chest Gaussian blurred image corresponding to the right chest image to obtain the horizontal gradient map and the vertical gradient map of the right chest; and obtaining the gradient direction angle of each pixel in the right chest Gaussian blurred image based on the horizontal gradient map and the vertical gradient map of the right chest.
[0224] (3) Connection of the transverse and mediastinal edges, the lung apex and the costal margin. In the embodiments of this disclosure, the method for obtaining a segmented image of the left lung based on the costal margin boundary, lung apex boundary and mediastinal and transverse edges corresponding to the left chest image includes: calculating the first left lung apex edge point and the left lung mediastinal edge point corresponding to the shortest distance between the lung apex boundary and the mediastinal edge in the left chest image; calculating the second left lung apex edge point and the first left lung costal edge point corresponding to the shortest distance between the lung apex boundary and the costal margin edge in the left chest image; calculating the second costal edge point and the diaphragmatic edge point corresponding to the shortest distance between the costal margin boundary and the transverse edge in the left chest image; and obtaining a segmented image of the left lung based on the first left lung apex edge point, the left lung mediastinal edge point, the second left lung apex edge point, the first left lung costal edge point, the second costal edge point and the diaphragmatic edge point.
[0225] Similarly, in the embodiments of this disclosure, the method for obtaining a segmented image of the right lung based on the costal margin boundary, lung apex boundary, and mediastinal and transverse margins corresponding to the right chest image includes: calculating the first right lung apex edge point and the right lung mediastinal edge point corresponding to the shortest distance between the lung apex boundary and the mediastinal margin in the right chest image; calculating the second right lung apex edge point and the first right lung costal margin edge point corresponding to the shortest distance between the lung apex boundary and the costal margin boundary in the right chest image; calculating the second costal margin edge point and the diaphragmatic edge point corresponding to the shortest distance between the costal margin boundary and the transverse margin in the right chest image; and obtaining a segmented image of the right lung based on the first right lung apex edge point, the right lung mediastinal edge point, the second right lung apex edge point, the first right lung costal margin edge point, the second costal margin edge point, and the diaphragmatic edge point.
[0226] In embodiments of this disclosure and other possible embodiments, the method for connecting the transverse and mediastinal edges, the lung apex, and the costal margin includes: a. calculating the two points (the first lung apex edge point and the mediastinal edge point) with the shortest Euclidean distance between the lung apex edge (line) and the mediastinal edge (line), these two points being one of the endpoints of the lung apex and the transverse and mediastinal boundaries, respectively; b. calculating and obtaining the two points (the second lung apex edge point and the first costal edge edge point) with the shortest Euclidean distance between the lung apex edge (line) and the costal margin edge (line), these two points being one of the endpoints of the lung apex and the costal margin, respectively, and the lung apex region boundary can be obtained based on the other lung apex point obtained in step a; c. calculating and obtaining the costal margin (line) and the transverse and mediastinal edges... The two points with the shortest Euclidean distance between the edges (lines) of the diaphragm (the edge of the second costal margin and the edge of the transverse diaphragm) are respectively one of the endpoints of the costal margin and the transverse and mediastinal margins. The transverse and mediastinal margin boundary region can be obtained based on the other endpoint of the transverse and mediastinal margin boundary obtained in step a. The costal margin boundary region can be obtained based on the other endpoint of the costal margin obtained in step b. d. Connect the edge regions of the three parts obtained in steps a, b, and c above to obtain the closed lung field contour. The lung field region can be segmented based on the difference between the tissues inside and outside the contour boundary. e. The right lung field region is processed in the same way as above. Finally, the lung field region is mapped onto the original image to obtain the lung field segmentation of the original image.
[0227] In the embodiments of this disclosure and other possible embodiments, those skilled in the art can configure the preset air threshold range according to actual needs. Meanwhile, this disclosure proposes a method for determining the preset air threshold range. Before obtaining the preset air threshold range, the method for determining the preset air threshold range includes: determining the minimum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process, respectively; and determining the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process based on the minimum preset air threshold and a set threshold step size.
[0228] In the embodiments of this disclosure and other possible embodiments, those skilled in the art can configure the set threshold step size according to actual needs. For example, 2, 3, 5, 10, etc. Simultaneously, the minimum pixel threshold corresponding to the left and right lung images corresponding to multiple DR lung images during the breathing process is configured as the minimum preset air threshold.
[0229] In embodiments of this disclosure, the method for determining the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process based on the minimum preset air threshold and a set threshold step size includes: displaying the left and right lung images of multiple DR lung images during the breathing process respectively; marking the displayed left and right lung images of multiple DR lung images with air based on the minimum preset air threshold and a set threshold step size; and determining the maximum preset air threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process based on the air markings of the left and right lung images of multiple DR lung images.
[0230] In embodiments of this disclosure and other possible embodiments, the method for marking the left and right lung images corresponding to the multiple displayed DR lung images based on the minimum preset air threshold and the set threshold step size includes: obtaining the cumulative number K; wherein the cumulative number K ≥ 1; adding K * the set threshold step size to the minimum preset air threshold to obtain the left and right lung images corresponding to the multiple DR lung images with different cumulative numbers K; so as to mark the left and right lung images corresponding to the multiple displayed DR lung images.
[0231] In an embodiment of this disclosure, the method for marking air in the left and right lung images corresponding to the multiple displayed DR lung images based on the minimum preset air threshold and the set threshold step size includes: determining an air threshold range to be displayed based on the minimum preset air threshold and the set threshold step size; and marking air in the left and right lung images corresponding to the multiple displayed DR lung images based on the air threshold range to be displayed.
[0232] In embodiments of this disclosure and other possible embodiments, the method for determining the air threshold interval to be displayed based on the minimum preset air threshold and the set threshold step size includes: obtaining the number of accumulations K; wherein the number of accumulations K≥1; adding K*the set threshold step size to the minimum preset air threshold to obtain the air threshold interval to be displayed corresponding to different number of accumulations K; and then, based on the air threshold interval to be displayed, marking the left lung image and right lung image corresponding to the multiple DR lung images to be displayed.
[0233] In embodiments of this disclosure, the method for determining an air threshold range to be displayed based on the minimum preset air threshold and a set threshold step size includes: determining the maximum pixel threshold corresponding to the left and right lung images of multiple DR lung images during the breathing process; displaying a threshold slider corresponding to the minimum preset air threshold and the maximum pixel threshold; and adjusting the threshold value on the threshold slider based on the set threshold step size to determine the air threshold range to be displayed. The air threshold range to be displayed is configured as the threshold range between the minimum preset air threshold and the air threshold on the threshold slider after adjustment.
[0234] In embodiments of this disclosure, the method for marking the left and right lung images corresponding to the displayed multiple DR lung images with air marking includes: obtaining a first configuration color and / or a first configuration transparency corresponding to the air marking; and marking the left and right lung images corresponding to the displayed multiple DR lung images with air marking based on the first configuration color and / or the first configuration transparency.
[0235] Step S102: Using the multiple registration transformation matrices in the breathing process, register the left lung image and right lung image corresponding to the multiple DR lung images respectively to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
[0236] In embodiments of this disclosure, the method of using multiple registration transformation matrices during the breathing process to perform registration operations on the left and right lung images corresponding to the multiple DR lung images to obtain the left and right lung registration images corresponding to the multiple DR lung images includes: configuring the DR lung image at a first moment during the breathing process as a fixed image, and configuring the DR lung image at a second moment corresponding to the next moment adjacent to the first moment as a floating image; using the multiple registration transformation matrices during the breathing process to perform registration operations on the fixed image and the floating image, or the left and right lung images corresponding to the fixed image and the left and right lung images corresponding to the floating image, to obtain the left and right lung registration images corresponding to the multiple DR lung images.
[0237] In embodiments of this disclosure, a method for determining the multiple registration transformation matrices before acquiring them during the breathing process includes: registering adjacent DR lung images of multiple DR lung images during the breathing process to obtain corresponding multiple registration transformation matrices during the breathing process. Alternatively, a method for determining the multiple registration transformation matrices before acquiring them during the breathing process includes: registering adjacent left and right lung images corresponding to the multiple DR lung images during the breathing process to obtain multiple registration transformation matrices corresponding to the left lung image and multiple registration transformation matrices corresponding to the right lung image during the breathing process. Then, using the multiple registration transformation matrices corresponding to the left lung image and the multiple registration transformation matrices corresponding to the right lung image during the breathing process, registration operations are performed on the left and right lung images corresponding to the multiple DR lung images to obtain the left and right lung registered images corresponding to the multiple DR lung images.
[0238] In the embodiments and other possible embodiments of this disclosure, the registration method used in this disclosure can employ existing registration algorithms or models, such as one or more of SIFT (Scale-invariant feature transform), SURF (Speeded Up Robust Features), and ORB (Oriented FAST and Rotated BRIEF) registration algorithms or models, or other registration algorithms or models based on convolutional neural networks. For example, a registration algorithm or model based on convolutional neural networks can be configured as a registration algorithm or model based on VGG networks.
[0239] Step S103: Based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, determine the lung ventilation area corresponding to the multiple DR lung images at multiple times during the breathing process.
[0240] In embodiments of this disclosure, the method for determining the lung ventilation region corresponding to multiple DR lung images at multiple moments during the breathing process based on the preset air threshold interval and the left and right lung registration images corresponding to the multiple DR lung images includes: determining the air identification region corresponding to the multiple DR lung images based on the preset air threshold interval; and determining the lung ventilation region corresponding to the multiple DR lung images at multiple moments during the breathing process based on the air identification region corresponding to the multiple DR lung images.
[0241] In embodiments of this disclosure and other possible embodiments, the method for determining the air identification regions corresponding to the multiple DR lung images based on the preset air threshold range includes: if the pixel values corresponding to the multiple DR lung images are within the preset air threshold range, then the region where the pixel values are located within the preset air threshold range is determined as the air identification region corresponding to the multiple DR lung images.
[0242] In embodiments of this disclosure, the method for displaying the lung ventilation regions corresponding to multiple DR lung images at multiple moments during the breathing process includes: obtaining a first configuration color and / or a first configuration transparency corresponding to the air identification region; and displaying the air identification regions in the left lung image and right lung image corresponding to the displayed multiple DR lung images based on the first configuration color and / or the first configuration transparency, respectively.
[0243] In the embodiments of this disclosure and other possible embodiments, those skilled in the art can configure the first configuration color and / or the first configuration transparency according to actual needs. For example, the first configuration color can be configured as a blue tone; and the first configuration transparency can be configured as 50%.
[0244] In addition, embodiments of this disclosure also propose a method for determining air retention, including or applying the lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process obtained by the lung ventilation determination method described above; based on the left and right lung images corresponding to the multiple DR lung images during the breathing process and the lung ventilation region corresponding to the multiple DR lung images at multiple times during the breathing process, determining the air retention region of the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0245] In embodiments of this disclosure, the method for determining the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process, based on the left and right lung images corresponding to multiple DR lung images at multiple times during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process, includes: determining the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process; and determining the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process based on the preset air threshold interval and the lung non-ventilation areas.
[0246] In embodiments of this disclosure, the method for determining the non-ventilated lung regions corresponding to multiple DR lung images at multiple moments during the breathing process, based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the ventilation regions corresponding to multiple DR lung images at multiple moments during the breathing process, includes: subtracting the ventilation regions corresponding to the left and right lung images corresponding to the multiple DR lung images during the breathing process from the ventilation regions corresponding to ...
[0247] In embodiments of this disclosure, the method further includes: displaying the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process, including: obtaining a second configuration color and / or a second configuration transparency corresponding to the air retention areas; and displaying the air retention areas of the left and right lung images corresponding to the displayed multiple DR lung images based on the second configuration color and / or the second configuration transparency.
[0248] In the embodiments of this disclosure and other possible embodiments, those skilled in the art can configure the second configuration color and / or the second configuration transparency according to actual needs. For example, the second configuration color can be configured as a yellow tone; and the second configuration transparency can be configured as 50%.
[0249] In embodiments of this disclosure and other possible embodiments, the lung ventilation determination method and / or air retention determination method further includes: acquiring left lung images and right lung images corresponding to multiple first DR lung images at multiple times during breath-holding; determining pulmonary vascular region images corresponding to the multiple left lung images and right lung images respectively; and performing silhouette processing on the pulmonary vascular region images corresponding to the multiple left lung images and right lung images to obtain pulmonary blood flow images corresponding to heartbeats.
[0250] In the embodiments of this disclosure, before acquiring the two-dimensional DR left lung image and / or two-dimensional DR right lung image at multiple moments during the breathing process or breath-holding state, the two-dimensional DR lung image at multiple moments during the breathing process or breath-holding state is acquired, and the two-dimensional DR lung image at multiple moments during the breathing process or breath-holding state is segmented into left and right lungs to obtain the two-dimensional DR left lung image and two-dimensional DR right lung image at multiple moments.
[0251] The pulmonary vascular region images corresponding to the left and right lung images were determined respectively.
[0252] In embodiments of this disclosure, the method for determining the pulmonary vascular region images corresponding to multiple left lung images and right lung images includes: obtaining a maximum density projection algorithm or a maximum density projection model; and using the maximum density projection algorithm or the maximum density projection model to determine the pulmonary vascular region images corresponding to multiple left lung images and right lung images.
[0253] In the embodiments of this disclosure, before determining the pulmonary vascular region images corresponding to the multiple left and right lung images using the maximum density projection algorithm or the maximum density projection model, a Gaussian blur algorithm or Gaussian blur model is obtained; the Gaussian blur algorithm or Gaussian blur model is used to perform Gaussian blur processing on the left and right lung images corresponding to the multiple first DR lung images to obtain multiple Gaussian blurred left lung images and multiple Gaussian blurred right lung images; the pulmonary vascular region images corresponding to the multiple Gaussian blurred left lung images and multiple Gaussian blurred right lung images are determined using the maximum density projection algorithm or the maximum density projection model.
[0254] In the embodiments of this disclosure and other possible embodiments, Maximum Intensity Projection (MIP) measures the maximum value of pixels at the same location in multiple first DR lung images at multiple time points under breath-holding conditions across different frames. The set of maximum pixel values from all the multiple first DR lung images can determine the pulmonary vascular region images corresponding to the multiple left and right lung images. Therefore, after determining the pulmonary vascular region images corresponding to the multiple left and right lung images, pulmonary blood flow analysis can be further performed based on the blood vessels in the pulmonary vascular region images.
[0255] Step S103: Perform silhouette processing on the pulmonary vascular region images corresponding to the multiple left and right lung images to obtain pulmonary blood flow images corresponding to heartbeats. The pulmonary blood flow images corresponding to heartbeats include one or more of the following: pulmonary blood flow distribution images and / or flow velocity images.
[0256] In the embodiments of this disclosure and other possible embodiments, since multiple first DR lung images are acquired at multiple times during the breath-holding state, it is assumed that the left and right lung areas corresponding to the multiple first DR lung images at multiple times will not change, and the airflow in the left and right lungs corresponding to the multiple first DR lung images at multiple times will not change accordingly. During the breath-holding process, the heart will beat, and the distribution image and / or flow velocity image of the lung blood flow corresponding to the heartbeat can be obtained.
[0257] In embodiments of this disclosure and other possible embodiments, when it is difficult to assess these changes by observing images, image subtraction is a method for identifying minute changes in pixel values. By subtracting images between frames and between specific images from multiple first DR lung images at multiple times, distribution images and / or velocity images of pulmonary blood flow corresponding to heartbeats can be obtained.
[0258] In an embodiment of this disclosure, the method of performing silhouette processing on the pulmonary vascular region images corresponding to the plurality of left lung images and right lung images to obtain pulmonary blood flow images corresponding to heartbeats includes: configuring the pulmonary vascular region image corresponding to the start of diastole after cardiac systole in the plurality of time moments as a first base image, and configuring the pulmonary vascular region images corresponding to other time moments other than the aforementioned time moment as a plurality of first images to be processed; subtracting the first base image from the plurality of first images to be processed to obtain pulmonary blood flow distribution images corresponding to heartbeats.
[0259] In embodiments of this disclosure, the method of performing silhouette processing on the pulmonary vascular region images corresponding to the plurality of left and right lung images to obtain pulmonary blood flow images corresponding to heartbeats further includes: performing silhouette processing on pulmonary vascular region images at adjacent times in the left and right lung images corresponding to the plurality of first DR lung images at multiple times to obtain pulmonary blood flow velocity maps corresponding to heartbeats. Specifically, the method of performing silhouette processing on pulmonary vascular region images at adjacent times in the left and right lung images corresponding to the plurality of first DR lung images at multiple times to obtain pulmonary blood flow velocity maps corresponding to heartbeats includes: subtracting adjacent pulmonary vascular region images in the plurality of left and right lung images to obtain pulmonary blood flow velocity maps corresponding to heartbeats.
[0260] In embodiments of this disclosure, the method of performing silhouette processing on the pulmonary vascular region images corresponding to the plurality of left and right lung images to obtain pulmonary blood flow images corresponding to heartbeats further includes: configuring the pulmonary vascular region image corresponding to any one moment within the cardiac systole or diastole of the plurality of moments as a second base image, and configuring the pulmonary vascular region images corresponding to other moments within the cardiac systole or diastole outside of the arbitrary moment as a plurality of second images to be processed; subtracting the second base image from the plurality of second images to be processed to obtain a pulmonary blood flow distribution image during cardiac systole or a pulmonary blood flow distribution image during cardiac diastole corresponding to heartbeats. The plurality of moments are configured as a complete cardiac cycle formed by the cardiac systole and systole.
[0261] In embodiments of this disclosure, the method further includes: before acquiring the left lung image and right lung image corresponding to multiple first DR lung images at multiple times under the breath-holding state, the method further includes: performing rib suppression or rib reduction on the left lung image and right lung image corresponding to the multiple first DR lung images under the breath-holding state, respectively.
[0262] In embodiments of this disclosure, the method further includes: displaying the blood flow in the pulmonary blood flow image corresponding to the heartbeat with a set color. The method for displaying the blood flow in the pulmonary blood flow image corresponding to the heartbeat with a set color includes: obtaining a configuration corresponding to the set color; and displaying the blood flow in the pulmonary blood flow image corresponding to the heartbeat with the set color based on the configuration corresponding to the set color.
[0263] In the embodiments of this disclosure, the configuration corresponding to the set color includes one or more of hue, saturation, and brightness; and / or, wherein the set color or the hue configuration is in the red family.
[0264] In the embodiments and other possible embodiments disclosed herein, hue refers to the appearance of a color, which is what we usually refer to as various colors, such as red, orange, yellow, green, cyan, blue, and purple. Hue is the best standard for distinguishing different colors. It is unrelated to the intensity or brightness of a color; it simply represents the difference in the appearance of the hue. Saturation, on the other hand, refers to the vividness of a color. It is one of the important attributes affecting the final effect of a color. Saturation is also called the purity of a color, which is the ratio of chromatic components to achromatic components (i.e., gray) in a color. This ratio determines the saturation and vividness of the color. Brightness (or lightness) refers to the lightness or darkness of a color. Brightness depends not only on the intensity of the light source but also on the reflectance of the object's surface.
[0265] This includes, or applies, the pulmonary blood flow image corresponding to heartbeats obtained by the detection method described above; and, acquiring, during the breath-holding state, multiple first DR lung images at multiple times corresponding to multiple second DR lung images at multiple times corresponding to the patient's breathing process, multiple registration transformation matrices during the breathing process, and a preset air threshold range; using the multiple registration transformation matrices during the breathing process, performing registration operations on the left and right lung images corresponding to the multiple second DR lung images respectively, to obtain the left and right lung registration images corresponding to the multiple first DR lung images; determining the pulmonary ventilation images corresponding to the multiple second DR lung images at multiple times during the breathing process based on the preset air threshold range and the left and right lung registration images corresponding to the multiple second DR lung images respectively; and determining the ventilation-perfusion ratio of the patient at multiple times based on the pulmonary blood flow images at multiple times and the pulmonary ventilation images respectively.
[0266] In the embodiments of this disclosure and other possible embodiments, the direction of segmenting the left and right lungs of multiple second DR lung images at multiple moments during the breathing process can be found in the detailed description of the left and right lung segmentation method described above.
[0267] In embodiments of this disclosure, the method for determining the ventilation-perfusion ratio of a patient at multiple time points based on the multiple time-series pulmonary blood flow images and the multiple time-series pulmonary ventilation images includes: determining multiple pulmonary blood flow areas corresponding to the multiple time-series pulmonary blood flow images and multiple pulmonary ventilation areas corresponding to the multiple time-series pulmonary ventilation images; and calculating the ratios of the multiple pulmonary blood flow areas to the corresponding multiple pulmonary ventilation areas to obtain the ventilation-perfusion ratio of the patient at multiple time points.
[0268] In embodiments of this disclosure, the method of calculating the ratios of the plurality of pulmonary blood flow areas to the corresponding plurality of pulmonary ventilation areas to obtain the ventilation-perfusion ratio of the patient at multiple time points includes: determining the cardiac systolic time point and cardiac diastolic time point corresponding to the multiple time points; and calculating the ratios of pulmonary blood flow area to pulmonary ventilation area at the same cardiac systolic time point or cardiac diastolic time point to obtain the ventilation-perfusion ratio of the patient at multiple time points.
[0269] In embodiments of this disclosure, a method for determining the multiple registration transformation matrices before obtaining the multiple registration transformation matrices during the breathing process includes: registering adjacent DR lung images of multiple second DR lung images during the breathing process to obtain corresponding multiple registration transformation matrices during the breathing process; or, registering adjacent left and right lung images corresponding to multiple second DR lung images during the breathing process to obtain multiple registration transformation matrices corresponding to the left lung image and multiple registration transformation matrices corresponding to the right lung image during the breathing process; and then, using the multiple registration transformation matrices corresponding to the left lung image and the multiple registration transformation matrices corresponding to the right lung image during the breathing process, performing registration operations on the left and right lung images corresponding to the multiple second DR lung images to obtain the left lung registered image and right lung registered image corresponding to the multiple second DR lung images.
[0270] In the embodiments and other possible embodiments of this disclosure, the registration method used in this disclosure can employ existing registration algorithms or models, such as one or more of SIFT (Scale-invariant feature transform), SURF (Speeded Up Robust Features), and ORB (Oriented FAST and Rotated BRIEF) registration algorithms or models, or other registration algorithms or models based on convolutional neural networks. For example, a registration algorithm or model based on convolutional neural networks can be configured as a registration algorithm or model based on VGG networks.
[0271] In the embodiments of this disclosure, before acquiring the left and right lung images corresponding to multiple second DR lung images during the breathing process, rib suppression or rib reduction is performed on the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0272] The methods for determining lung ventilation and air retention can be executed by a lung ventilation determination device or an air retention determination device. For example, the lung ventilation determination method or air retention determination method can be executed by a terminal device, a server, or other processing device. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. In some possible implementations, the lung ventilation determination method or air retention determination method can be implemented by a processor calling computer-readable instructions stored in memory.
[0273] Those skilled in the art will understand that in the above-described method for determining lung ventilation in specific embodiments, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0274] This disclosure also proposes a lung ventilation device, the lung ventilation determination device comprising: an acquisition unit, configured to acquire left and right lung images corresponding to multiple DR lung images during respiration, multiple registration transformation matrices during respiration, and a preset air threshold interval; a registration unit, configured to perform registration operations on the left and right lung images corresponding to the multiple DR lung images respectively using the multiple registration transformation matrices during respiration, to obtain left and right lung registration images corresponding to the multiple DR lung images; and a determination unit, configured to determine the lung ventilation region corresponding to the multiple DR lung images at multiple times during respiration based on the preset air threshold interval and the left and right lung registration images corresponding to the multiple DR lung images.
[0275] In embodiments of this disclosure, the system further includes: a registration transformation matrix determination unit; the registration transformation matrix determination unit is used to determine the plurality of registration transformation matrices before acquiring the plurality of registration transformation matrices during the breathing process.
[0276] In embodiments of this disclosure, the registration transformation matrix determination unit includes: a first registration unit and a second registration unit; the first registration unit is configured to register adjacent DR lung images of multiple DR lung images during the breathing process to obtain multiple registration transformation matrices corresponding to the breathing process; or, the first registration unit is configured to register adjacent left lung images and right lung images corresponding to multiple DR lung images during the breathing process to obtain multiple registration transformation matrices corresponding to the left lung image and multiple registration transformation matrices corresponding to the right lung image during the breathing process; furthermore, the second registration unit is configured to use the multiple registration transformation matrices corresponding to the left lung image and the multiple registration transformation matrices corresponding to the right lung image during the breathing process to perform registration operations on the left lung image and right lung image corresponding to the multiple DR lung images to obtain the left lung registered image and right lung registered image corresponding to the multiple DR lung images.
[0277] In embodiments of this disclosure, the second registration unit includes: an image configuration unit and a registration image generation unit; the image configuration unit is configured to configure the DR lung image at a first moment during the breathing process as a fixed image, and configure the DR lung image at a second moment corresponding to the next moment adjacent to the first moment as a floating image; the registration image generation unit is configured to use multiple registration transformation matrices during the breathing process to perform registration operations on the fixed image and the floating image, or the left lung image and right lung image corresponding to the fixed image and the left lung image and right lung image corresponding to the floating image, respectively, to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
[0278] In embodiments of this disclosure, a preset air threshold range determination unit is further included; the preset air threshold range determination unit is used to determine the preset air threshold range before obtaining the preset air threshold range.
[0279] In embodiments of this disclosure, the preset air threshold range determination unit includes: a minimum preset air threshold determination unit and a maximum preset air threshold determination unit; the minimum preset air threshold determination unit is used to determine the minimum preset air threshold corresponding to the left lung image and the right lung image corresponding to multiple DR lung images during the breathing process, respectively; the maximum preset air threshold determination unit is used to determine the maximum preset air threshold corresponding to the left lung image and the right lung image corresponding to multiple DR lung images during the breathing process based on the minimum preset air threshold and a set threshold step size.
[0280] In embodiments of this disclosure, the maximum preset air threshold determination unit includes: a lung image display unit, an air identification unit, and a first threshold determination unit; the lung image display unit is used to display the left lung image and right lung image corresponding to multiple DR lung images during the breathing process, respectively; the air identification unit is used to identify the air in the displayed left lung image and right lung image corresponding to the multiple DR lung images based on the minimum preset air threshold and a set threshold step size; the first threshold determination unit is used to determine the maximum preset air threshold corresponding to the left lung image and right lung image corresponding to the multiple DR lung images during the breathing process based on the air identification of the left lung image and right lung image corresponding to the multiple DR lung images.
[0281] In embodiments of this disclosure, the threshold determination unit includes: a displayable air threshold range determination unit; the displayable air threshold range determination unit is used to determine the displayable air threshold range based on the minimum preset air threshold and a set threshold step size;
[0282] The air labeling unit is used to label the left and right lung images corresponding to the multiple DR lung images to be displayed based on the air threshold range to be displayed.
[0283] In embodiments of this disclosure, the unit for determining the air threshold range to be displayed includes: a maximum pixel threshold determination unit, a threshold slider unit, and a second threshold determination unit; the maximum pixel threshold determination unit is used to determine the maximum pixel threshold corresponding to the left lung image and the right lung image corresponding to multiple DR lung images during the breathing process; the threshold slider unit is used to display the threshold slider corresponding to the minimum preset air threshold and the maximum pixel threshold; the second threshold determination unit is used to adjust the threshold value on the threshold slider based on the set threshold step size to determine the air threshold range to be displayed.
[0284] In embodiments of this disclosure, the air labeling unit includes: a configuration acquisition unit and an air labeling configuration unit; the configuration acquisition unit is used to acquire a first configuration color and / or a first configuration transparency corresponding to the air label; the air labeling configuration unit is used to perform air labeling on the left lung image and right lung image corresponding to the multiple displayed DR lung images based on the first configuration color and / or the first configuration transparency.
[0285] In embodiments of this disclosure, the determining unit includes: an air identification region unit and a lung ventilation region determining unit; the air identification region unit is used to determine the air identification regions corresponding to the multiple DR lung images based on the preset air threshold range; the lung ventilation region determining unit is used to determine the lung ventilation regions corresponding to the multiple DR lung images at multiple times during the breathing process based on the air identification regions corresponding to the multiple DR lung images.
[0286] In embodiments of this disclosure, the lung ventilation region determination unit includes: an air identification region configuration acquisition unit and a lung ventilation region display unit; the air identification region configuration acquisition unit is used to acquire a first configuration color and / or a first configuration transparency corresponding to the air identification region; the lung ventilation region display unit is used to display the air identification regions in the left lung image and right lung image corresponding to the multiple displayed DR lung images based on the first configuration color and / or the first configuration transparency, respectively.
[0287] In embodiments of this disclosure, the system further includes a segmentation unit; the segmentation unit is configured to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
[0288] In embodiments of this disclosure, the segmentation unit includes: a detection unit; the detection unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple time points during the breathing process, respectively, to obtain two-dimensional DR left lung images and two-dimensional DR right lung images at multiple time points; or, the segmentation unit includes: a model and data acquisition unit, a training unit, and an output unit; the model and data acquisition unit is used to acquire a segmentation model of a preset convolutional neural network and DR lung region label images for training the segmentation model; the training unit is used to train the segmentation model using the DR lung region label images used to train the segmentation model; the output unit is used to complete the segmentation of the left and right lungs of the two-dimensional DR lung images at multiple time points during the breathing process based on the trained segmentation model, to obtain DR left lung images and DR right lung images at multiple time points.
[0289] In embodiments of this disclosure, the segmentation unit further includes a label determination unit; the label determination unit is used to perform costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of multiple DR lung area images respectively, to obtain DR lung area label images corresponding to the multiple DR lung area images.
[0290] In embodiments of this disclosure, a rib suppression or rib reduction unit is further included; the rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
[0291] Furthermore, the air retention determination device proposed in this embodiment includes: a lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process obtained by the lung ventilation determination method or the lung ventilation determination device described above, or a lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process obtained by the lung ventilation determination device described above; and an air retention region determination unit; the air retention region determination unit is used to determine the air retention region of the left lung image and the right lung image corresponding to the multiple DR lung images during the breathing process based on the left lung image and the right lung image corresponding to the multiple DR lung images at multiple times during the breathing process and the lung ventilation region corresponding to the multiple DR lung images at multiple times during the breathing process.
[0292] In embodiments of this disclosure, the air retention area determination unit includes: a lung non-ventilation area determination unit and a region determination unit; the lung non-ventilation area determination unit is used to determine the lung non-ventilation area corresponding to the multiple DR lung images at multiple moments during the breathing process based on the left and right lung images corresponding to the multiple DR lung images at multiple moments during the breathing process and the lung ventilation area corresponding to the multiple DR lung images at multiple moments during the breathing process; the region determination unit is used to determine the air retention area of the left and right lung images corresponding to the multiple DR lung images at multiple moments during the breathing process based on the preset air threshold interval and the lung non-ventilation area.
[0293] In an embodiment of this disclosure, the region determination unit includes a subtraction unit; the subtraction unit is used to subtract the left and right lung images corresponding to multiple DR lung images during the breathing process from the lung ventilation regions corresponding to multiple DR lung images at multiple times during the breathing process, to obtain the lung non-ventilation regions corresponding to multiple DR lung images at multiple times during the breathing process.
[0294] In embodiments of this disclosure, an air retention area display unit is further included; the air retention area display unit is used to display the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process. The air retention area display unit includes: an air retention area configuration acquisition unit and a configuration display unit; the air retention area configuration acquisition unit is used to acquire a second configuration color and / or a second configuration transparency corresponding to the air retention area; the configuration display unit is used to display the air retention areas of the left and right lung images corresponding to the displayed multiple DR lung images based on the second configuration color and / or the second configuration transparency.
[0295] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above determination method and / or air retention determination method embodiments. For the sake of brevity, it will not be repeated here.
[0296] This disclosure also proposes a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the above-described determination method and / or air retention determination method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0297] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured for the above-described determination method and / or air retention determination method. The electronic device may be provided as a terminal, a server, or other type of device.
[0298] Figure 2 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, or other terminal.
[0299] Reference Figure 2 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0300] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0301] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0302] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0303] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0304] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0305] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0306] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0307] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0308] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0309] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method.
[0310] Figure 3 This is a block diagram illustrating an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. (Refer to...) Figure 3 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0311] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0312] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0313] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0314] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0315] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0316] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0317] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0318] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0319] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0320] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0321] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for determining lung ventilation, characterized in that, include: The process involves acquiring left and right lung images corresponding to multiple DR lung images during respiration, multiple registration transformation matrices during respiration, and a preset air threshold interval. Before acquiring the preset air threshold interval, determining the preset air threshold interval includes: determining the values of multiple DR lung images during respiration. The process involves: determining the minimum preset air threshold for the left and right lung images corresponding to the lung images; determining the maximum pixel threshold for the left and right lung images corresponding to the multiple DR lung images during the breathing process; displaying threshold sliders corresponding to the minimum preset air threshold and the maximum pixel threshold; adjusting the threshold values on the threshold sliders based on a set threshold step size to determine the air threshold range to be displayed; marking the left and right lung images corresponding to the multiple DR lung images displayed with air based on the air threshold range to be displayed; and determining the maximum preset air threshold for the left and right lung images corresponding to the multiple DR lung images during the breathing process based on the air markings. The step of marking the left and right lung images corresponding to the multiple DR lung images displayed with air includes: obtaining a first configuration color corresponding to the air marking; and marking the left and right lung images corresponding to the multiple DR lung images displayed with air based on the first configuration color. Using multiple registration transformation matrices during the breathing process, registration operations are performed on the left and right lung images corresponding to the multiple DR lung images respectively, to obtain the left and right lung registration images corresponding to the multiple DR lung images; Based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, the lung ventilation region corresponding to the multiple DR lung images at multiple moments during the breathing process is determined, including: if the pixel value corresponding to the multiple DR lung images is within the preset air threshold range, the region where the pixel value is located within the preset air threshold range is determined as the air identification region corresponding to the multiple DR lung images; and based on the air identification region, the lung ventilation region corresponding to the multiple DR lung images at multiple moments during the breathing process is determined.
2. The method for determining lung ventilation according to claim 1, characterized in that, Before acquiring the multiple registration transformation matrices during the respiratory process, the multiple registration transformation matrices are determined, including: The adjacent DR lung images of multiple DR lung images during the breathing process are registered respectively to obtain multiple registration transformation matrices corresponding to the breathing process; or, the adjacent left lung images and right lung images corresponding to multiple DR lung images during the breathing process are registered respectively to obtain multiple registration transformation matrices corresponding to the left lung image and multiple registration transformation matrices corresponding to the right lung image during the breathing process. Then, using multiple registration transformation matrices corresponding to the left lung image during the breathing process and multiple registration transformation matrices corresponding to the right lung image during the breathing process, registration operations are performed on the left lung image and right lung image corresponding to the multiple DR lung images respectively, to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
3. The method for determining lung ventilation according to claim 1, characterized in that, The process involves using multiple registration transformation matrices during the respiratory process to perform registration operations on the left and right lung images corresponding to the multiple DR lung images, respectively, to obtain the left and right lung registration images corresponding to the multiple DR lung images, including: Configure the DR lung image at the first moment during the breathing process as a fixed image; Configure the DR lung image at the second time step, which corresponds to the next time step adjacent to the first time step, as a floating image; Using multiple registration transformation matrices during the breathing process, registration operations are performed on the fixed image and the floating image, or on the left lung image and the right lung image corresponding to the fixed image and the left lung image and the right lung image corresponding to the floating image, respectively, to obtain the left lung registration image and the right lung registration image corresponding to the multiple DR lung images.
4. The method for determining lung ventilation according to any one of claims 1-3, characterized in that, The step of marking the left and right lung images corresponding to the multiple displayed DR lung images with air tags also includes: Obtain the first configuration transparency corresponding to the air icon; Based on the first configured color and the first configured transparency, air markings are applied to the left and right lung images corresponding to the multiple displayed DR lung images.
5. The method for determining lung ventilation according to any one of claims 1-3, characterized in that, Displaying the lung ventilation regions corresponding to multiple DR lung images at multiple moments during the respiratory process includes: Obtain the first configuration transparency corresponding to the air label area; Based on the first configured color and the first configured transparency, the air marker areas in the left and right lung images corresponding to the multiple DR lung images are displayed.
6. The method for determining lung ventilation according to any one of claims 1-3, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the process includes: Multiple DR lung images during the breathing process are segmented into left and right lungs to obtain the left and right lung images corresponding to the multiple DR lung images during the breathing process.
7. The method for determining lung ventilation according to claim 4, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the process includes: Multiple DR lung images during the breathing process are segmented into left and right lungs to obtain the left and right lung images corresponding to the multiple DR lung images during the breathing process.
8. The method for determining lung ventilation according to claim 5, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the process includes: Multiple DR lung images during the breathing process are segmented into left and right lungs to obtain the left and right lung images corresponding to the multiple DR lung images during the breathing process.
9. The method for determining lung ventilation according to claim 6, characterized in that, The step of segmenting multiple DR lung images during the breathing process into the left and right lungs to obtain the corresponding left and right lung images, includes: The costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple time points during the breathing process were detected to obtain the DR left lung image and DR right lung image at multiple time points. The process of detecting the rib edge boundary of the left chest image includes: constructing a directional derivative template for the left chest image using directional derivatives; setting a weighted depth for the directional derivative template; performing template traversal of the directional derivatives on the left chest image using the directional derivative template corresponding to the weighted depth, and superimposing the result of the template traversal onto the left chest image to obtain a superimposed left chest image; performing binarization processing on the superimposed left chest image to obtain a binary map of the left rib edge; obtaining a rib edge angle map of the left side to be filtered based on the binary map of the left rib edge and the superimposed left chest image; obtaining a filtered left rib edge angle map based on the rib edge angle map of the left side to be filtered and a first set rib edge angle; and performing connected component selection on the left rib edge angle map to obtain the rib edge boundary corresponding to the largest connected component.
10. The method for determining lung ventilation according to any one of claims 7 or 8, characterized in that, The step of segmenting multiple DR lung images during the breathing process into the left and right lungs to obtain the corresponding left and right lung images, includes: The costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple time points during the breathing process were detected to obtain the DR left lung image and DR right lung image at multiple time points. The process of detecting the rib edge boundary of the left chest image includes: constructing a directional derivative template for the left chest image using directional derivatives; setting a weighted depth for the directional derivative template; performing template traversal of the directional derivatives on the left chest image using the directional derivative template corresponding to the weighted depth, and superimposing the result of the template traversal onto the left chest image to obtain a superimposed left chest image; performing binarization processing on the superimposed left chest image to obtain a binary map of the left rib edge; obtaining a rib edge angle map of the left side to be filtered based on the binary map of the left rib edge and the superimposed left chest image; obtaining a filtered left rib edge angle map based on the rib edge angle map of the left side to be filtered and a first set rib edge angle; and performing connected component selection on the left rib edge angle map to obtain the rib edge boundary corresponding to the largest connected component.
11. The method for determining lung ventilation according to claim 6, characterized in that, The step of segmenting multiple DR lung images during the breathing process into the left and right lungs to obtain the corresponding left and right lung images, includes: Obtain a segmentation model of a preset convolutional neural network and DR lung region label images used to train the segmentation model; The segmentation model is trained using the DR lung region label images used to train the segmentation model; Based on the trained segmentation model, the left and right lungs of multiple DR lung images at multiple time points during the breathing process are segmented to obtain DR left lung images and DR right lung images at multiple time points.
12. The method for determining lung ventilation according to any one of claims 7 or 8, characterized in that, The step of segmenting multiple DR lung images during the breathing process into the left and right lungs to obtain the corresponding left and right lung images, includes: Obtain a segmentation model of a preset convolutional neural network and DR lung region label images used to train the segmentation model; The segmentation model is trained using the DR lung region label images used to train the segmentation model; Based on the trained segmentation model, the left and right lungs of multiple DR lung images at multiple time points during the breathing process are segmented to obtain DR left lung images and DR right lung images at multiple time points.
13. The method for determining lung ventilation according to claim 11, characterized in that, Determining the DR lung region label image used to train the segmentation model includes: The costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragm edges are detected in the left and right chest images of multiple DR lung area images respectively to obtain DR lung area label images corresponding to the multiple DR lung area images; Specifically, before performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of multiple DR lung area images to obtain the DR lung area label images corresponding to the multiple DR lung area images, a DR image to be processed is obtained, and it is determined whether the DR image to be processed is a lung image; if it is a lung image, then the DR image to be processed is subjected to thoracic cavity detection to remove information outside the thoracic cavity from the DR image to be processed.
14. The method for determining lung ventilation according to claim 12, characterized in that, Determining the DR lung region label image used to train the segmentation model includes: The costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragm edges are detected in the left and right chest images of multiple DR lung area images respectively to obtain DR lung area label images corresponding to the multiple DR lung area images; Specifically, before performing costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edge detection on the left and right chest images of multiple DR lung area images to obtain the DR lung area label images corresponding to the multiple DR lung area images, a DR image to be processed is obtained, and it is determined whether the DR image to be processed is a lung image; if it is a lung image, then the DR image to be processed is subjected to thoracic cavity detection to remove information outside the thoracic cavity from the DR image to be processed.
15. The method for determining lung ventilation according to any one of claims 1-3, 7-9, and 11, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
16. The method for determining lung ventilation according to claim 4, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
17. The method for determining lung ventilation according to claim 5, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
18. The method for determining lung ventilation according to claim 6, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
19. The method for determining lung ventilation according to claim 10, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
20. The method for determining lung ventilation according to claim 12, characterized in that, Before acquiring the left and right lung images corresponding to multiple DR lung images during the breathing process, the method includes: performing rib suppression or rib reduction on the left and right lung images corresponding to the multiple DR lung images during the breathing process, respectively.
21. A method for determining air retention, characterized in that, The lung ventilation region corresponding to multiple DR lung images at multiple times during the respiratory process obtained by applying the lung ventilation determination method as described in any one of claims 1-20; Based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple moments during the breathing process, the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process are determined.
22. The method for determining air retention according to claim 21, characterized in that, The method of determining the air retention areas in the left and right lung images corresponding to multiple DR lung images during the breathing process, and the lung ventilation areas corresponding to multiple DR lung images at multiple moments during the breathing process, includes: Based on the left and right lung images corresponding to multiple DR lung images during the breathing process and the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process, the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process are determined. Based on the preset air threshold range and the non-ventilated lung area, the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process are determined.
23. The method for determining air retention according to claim 22, characterized in that, The determination of the non-ventilated lung regions corresponding to the multiple DR lung images at multiple moments during the respiratory process, based on the left and right lung images corresponding to multiple DR lung images during the respiratory process and the lung ventilation regions corresponding to the multiple DR lung images at multiple moments during the respiratory process, includes: The lung ventilation areas corresponding to the left and right lung images corresponding to multiple DR lung images during the breathing process are subtracted from the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process to obtain the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process.
24. The method for determining air retention according to any one of claims 21-23, characterized in that, Also includes: Displaying the air retention areas in the left and right lung images corresponding to multiple DR lung images during the breathing process, including: Obtain the second configuration color and / or second configuration transparency corresponding to the air retention area; Based on the second configuration color and / or the second configuration transparency, the air retention areas of the left and right lung images corresponding to the multiple DR lung images are displayed.
25. A lung ventilation determination device, characterized in that, include: The acquisition unit is used to acquire left and right lung images corresponding to multiple DR lung images during the breathing process, multiple registration transformation matrices during the breathing process, and a preset air threshold interval. Before acquiring the preset air threshold interval, the unit determines the preset air threshold interval by: determining the minimum preset air threshold corresponding to the left and right lung images corresponding to the multiple DR lung images during the breathing process; determining the maximum pixel threshold corresponding to the left and right lung images corresponding to the multiple DR lung images during the breathing process; displaying threshold sliders corresponding to the minimum preset air threshold and the maximum pixel threshold; adjusting the threshold value on the threshold sliders based on a set threshold step size to determine the air threshold interval to be displayed; and, based on the air threshold interval to be displayed, processing the multiple DR images... Air is labeled on the left and right lung images corresponding to the lung images; based on the air labels, the maximum preset air threshold corresponding to the left and right lung images corresponding to the multiple DR lung images during the breathing process is determined; wherein, the air labeling on the left and right lung images corresponding to the multiple DR lung images displayed includes: obtaining a first configuration color corresponding to the air label; and applying air labels to the left and right lung images corresponding to the multiple DR lung images displayed based on the first configuration color. The registration unit is used to perform registration operations on the left lung image and right lung image corresponding to the multiple DR lung images respectively using multiple registration transformation matrices in the breathing process, so as to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images. The determining unit is configured to determine the lung ventilation region corresponding to the multiple DR lung images at multiple moments during the breathing process based on the preset air threshold range and the left and right lung registration images corresponding to the multiple DR lung images, including: if the pixel values corresponding to the multiple DR lung images are within the preset air threshold range, then the region where the pixel values are located within the preset air threshold range is determined as the air identification region corresponding to the multiple DR lung images; and based on the air identification region, determine the lung ventilation region corresponding to the multiple DR lung images at multiple moments during the breathing process.
26. The lung ventilation determining device according to claim 25, characterized in that, Also includes: Registration transformation matrix determination unit; The registration transformation matrix determination unit is used to determine the multiple registration transformation matrices before acquiring the multiple registration transformation matrices in the breathing process.
27. The lung ventilation determining device according to claim 26, characterized in that, The registration transformation matrix determination unit includes: a first registration unit and a second registration unit; The first registration unit is used to register adjacent DR lung images of multiple DR lung images during the breathing process to obtain multiple registration transformation matrices corresponding to the breathing process; then, the second registration unit is used to use multiple registration transformation matrices corresponding to the left lung image and the right lung image during the breathing process to perform registration operations on the left lung image and the right lung image corresponding to the multiple DR lung images to obtain the left lung registration image and the right lung registration image corresponding to the multiple DR lung images.
28. The lung ventilation determining device according to claim 26, characterized in that, The registration transformation matrix determination unit includes: a first registration unit and a second registration unit; The first registration unit is used to register adjacent left lung images and right lung images corresponding to multiple DR lung images during the breathing process, respectively, to obtain multiple registration transformation matrices corresponding to the left lung images and multiple registration transformation matrices corresponding to the right lung images during the breathing process. Furthermore, the second registration unit is used to perform registration operations on the left lung image and right lung image corresponding to the multiple DR lung images respectively using multiple registration transformation matrices corresponding to the left lung image and the right lung image corresponding to the multiple DR lung images, so as to obtain the left lung registration image and right lung registration image corresponding to the multiple DR lung images.
29. The lung ventilation determining device according to any one of claims 27 or 28, characterized in that, The second registration unit includes: an image configuration unit and a registration image generation unit; The image configuration unit is used to configure the DR lung image at the first moment during the breathing process as a fixed image, and to configure the DR lung image at the second moment corresponding to the next moment adjacent to the first moment as a floating image; The registration image generation unit is used to perform registration operations on the fixed image and the floating image, or the left lung image and the right lung image corresponding to the fixed image and the left lung image and the right lung image corresponding to the floating image, respectively, using multiple registration transformation matrices in the breathing process, to obtain the left lung registration image and the right lung registration image corresponding to the multiple DR lung images.
30. The lung ventilation determining device according to any one of claims 25-28, characterized in that, Also includes: Configuration acquisition unit and air label configuration unit; The configuration acquisition unit is used to acquire the first configuration color and / or the first configuration transparency corresponding to the air icon; The air labeling configuration unit is used to label the left and right lung images corresponding to the multiple displayed DR lung images based on the first configuration color and / or the first configuration transparency.
31. The lung ventilation determining device according to claim 29, characterized in that, Also includes: Configuration acquisition unit and air label configuration unit; The configuration acquisition unit is used to acquire the first configuration color and / or the first configuration transparency corresponding to the air icon; The air labeling configuration unit is used to label the left and right lung images corresponding to the multiple displayed DR lung images based on the first configuration color and / or the first configuration transparency.
32. The lung ventilation determining device according to any one of claims 25-28 and 31, characterized in that, The determining unit includes: an air marking area unit and a lung ventilation area determining unit; The air identification region unit is used to determine the air identification regions corresponding to the multiple DR lung images based on the preset air threshold range. The lung ventilation region determination unit is used to determine the lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process based on the air identification regions corresponding to the multiple DR lung images.
33. The lung ventilation determining device according to claim 29, characterized in that, The determining unit includes: an air marking area unit and a lung ventilation area determining unit; The air identification region unit is used to determine the air identification regions corresponding to the multiple DR lung images based on the preset air threshold range. The lung ventilation region determination unit is used to determine the lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process based on the air identification regions corresponding to the multiple DR lung images.
34. The lung ventilation determining device according to claim 30, characterized in that, The determining unit includes: an air marking area unit and a lung ventilation area determining unit; The air identification region unit is used to determine the air identification regions corresponding to the multiple DR lung images based on the preset air threshold range. The lung ventilation region determination unit is used to determine the lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process based on the air identification regions corresponding to the multiple DR lung images.
35. The lung ventilation determining device according to claim 32, characterized in that, The lung ventilation area determination unit includes: an air identification area configuration acquisition unit and a lung ventilation area display unit; The air identification area configuration acquisition unit is used to acquire the first configuration color and / or the first configuration transparency corresponding to the air identification area; The lung ventilation area display unit is used to display the air marker areas in the left and right lung images corresponding to the multiple DR lung images, respectively, based on the first configured color and / or the first configured transparency.
36. The lung ventilation determining device according to any one of claims 33 or 34, characterized in that, The lung ventilation area determination unit includes: an air identification area configuration acquisition unit and a lung ventilation area display unit; The air identification area configuration acquisition unit is used to acquire the first configuration color and / or the first configuration transparency corresponding to the air identification area; The lung ventilation area display unit is used to display the air marker areas in the left and right lung images corresponding to the multiple DR lung images, respectively, based on the first configured color and / or the first configured transparency.
37. The lung ventilation determining device according to any one of claims 25-28, 31, and 33-35, characterized in that, Also includes: Segmentation unit; The segmentation unit is used to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
38. The lung ventilation determination device according to claim 29, characterized in that, Also includes: Segmentation unit; The segmentation unit is used to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
39. The lung ventilation determining device according to claim 30, characterized in that, Also includes: Segmentation unit; The segmentation unit is used to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
40. The lung ventilation determining device according to claim 32, characterized in that, Also includes: Segmentation unit; The segmentation unit is used to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
41. The lung ventilation determining device according to claim 36, characterized in that, Also includes: Segmentation unit; The segmentation unit is used to acquire DR lung images at multiple moments during the breathing process before acquiring DR left lung images and / or DR right lung images at multiple moments during the breathing process, and to segment the DR lung images at multiple moments during the breathing process into left and right lungs to obtain DR left lung images and DR right lung images at multiple moments.
42. The lung ventilation determining device according to claim 37, characterized in that, The segmentation unit includes: a detection unit; The detection unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple moments during the breathing process, respectively, to obtain two-dimensional DR left lung images and two-dimensional DR right lung images at multiple moments. The process of detecting the left lung apex boundary in the left chest image includes: determining the left lung apex detection region based on the left chest image; determining the left lung apex edge binary map based on the left lung apex detection region; and obtaining the left lung apex boundary by fitting a quadratic function based on the left lung apex edge binary map.
43. The lung ventilation determining device according to any one of claims 38-41, characterized in that, The segmentation unit includes: a detection unit; The detection unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of the DR lung images at multiple moments during the breathing process, respectively, to obtain two-dimensional DR left lung images and two-dimensional DR right lung images at multiple moments. The process of detecting the left lung apex boundary in the left chest image includes: determining the left lung apex detection region based on the left chest image; determining the left lung apex edge binary map based on the left lung apex detection region; and obtaining the left lung apex boundary by fitting a quadratic function based on the left lung apex edge binary map.
44. The lung ventilation determination device according to claim 37, characterized in that, The segmentation unit includes: a model and data acquisition unit, a training unit, and an output unit; The model and data acquisition unit are used to acquire a segmentation model of a preset convolutional neural network and DR lung region label images used to train the segmentation model. The training unit is used to train the segmentation model using the DR lung region label image used to train the segmentation model. The output unit is used to segment the left and right lungs of the two-dimensional DR lung images at multiple moments during the breathing process based on the trained segmentation model, so as to obtain DR left lung images and DR right lung images at multiple moments.
45. The lung ventilation determining device according to any one of claims 38-41, characterized in that, The segmentation unit includes: a model and data acquisition unit, a training unit, and an output unit; The model and data acquisition unit are used to acquire a segmentation model of a preset convolutional neural network and DR lung region label images used to train the segmentation model. The training unit is used to train the segmentation model using the DR lung region label image used to train the segmentation model. The output unit is used to segment the left and right lungs of the two-dimensional DR lung images at multiple moments during the breathing process based on the trained segmentation model, so as to obtain DR left lung images and DR right lung images at multiple moments.
46. The lung ventilation determining device according to claim 44, characterized in that, The segmentation unit further includes: a label determination unit; The label determination unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of multiple DR lung area images respectively, so as to obtain DR lung area label images corresponding to the multiple DR lung area images. The process of detecting the edges of the left lung mediastinum and diaphragm in the left chest image includes: binarizing the left chest image to obtain a left chest binary image; performing edge detection on the left chest binary image to obtain a left chest edge binary map; obtaining a left chest edge angle map based on the gradient direction angle of each pixel in the left chest binary image and the left chest edge binary map; obtaining selected left diaphragm and mediastinum edge angle maps based on the obtained left chest edge angle maps and setting the edge angle range of the diaphragm and mediastinum; and performing connected component selection processing based on the selected left diaphragm and mediastinum edge angle maps to obtain the left lung mediastinum and diaphragm edges corresponding to the largest connected component.
47. The lung ventilation determining device according to claim 45, characterized in that, The segmentation unit further includes: a label determination unit; The label determination unit is used to detect the costal margin boundary, lung apex boundary, and mediastinal and transverse diaphragmatic edges of the left and right chest images of multiple DR lung area images respectively, so as to obtain DR lung area label images corresponding to the multiple DR lung area images. The process of detecting the edges of the left lung mediastinum and diaphragm in the left chest image includes: binarizing the left chest image to obtain a left chest binary image; performing edge detection on the left chest binary image to obtain a left chest edge binary map; obtaining a left chest edge angle map based on the gradient direction angle of each pixel in the left chest binary image and the left chest edge binary map; obtaining selected left diaphragm and mediastinum edge angle maps based on the obtained left chest edge angle maps and setting the edge angle range of the diaphragm and mediastinum; and performing connected component selection processing based on the selected left diaphragm and mediastinum edge angle maps to obtain the left lung mediastinum and diaphragm edges corresponding to the largest connected component.
48. The lung ventilation determining device according to any one of claims 25-28, 31, 33-35, 38-42, 44, 46, and 47, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
49. The lung ventilation determining device according to claim 29, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
50. The lung ventilation determining device according to claim 30, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
51. The lung ventilation determining device according to claim 32, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
52. The lung ventilation determining device according to claim 36, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
53. The lung ventilation determining device according to claim 37, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
54. The lung ventilation determining device according to claim 43, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
55. The lung ventilation determining device according to claim 48, characterized in that, Also includes: Rib suppression or rib reduction unit; The rib suppression or rib reduction unit is used to suppress or reduce the ribs of the left and right lung images corresponding to the multiple DR lung images during the breathing process before acquiring the left and right lung images corresponding to the multiple DR lung images during the breathing process.
56. An air retention determination device, characterized in that, include: The lung ventilation region corresponding to multiple DR lung images at multiple times during the breathing process obtained by the lung ventilation determination device as described in any one of claims 25-55; and, Determining the unit for air retention area; The air retention area determination unit is used to determine the air retention area of the left and right lung images corresponding to multiple DR lung images during the breathing process, based on the left and right lung images corresponding to multiple DR lung images at multiple moments during the breathing process and the lung ventilation area corresponding to multiple DR lung images at multiple moments during the breathing process.
57. The air retention determination device according to claim 56, characterized in that, The air retention area determination unit includes: a lung non-ventilated area determination unit and an area determination unit; The lung non-ventilation area determination unit is used to determine the lung non-ventilation area corresponding to the multiple DR lung images at multiple times during the breathing process based on the left lung image and right lung image corresponding to the multiple DR lung images at multiple times during the breathing process and the lung ventilation area corresponding to the multiple DR lung images at multiple times during the breathing process. The region determination unit is used to determine the air retention regions of the left and right lung images corresponding to multiple DR lung images during the breathing process, based on the preset air threshold range and the non-ventilated lung region.
58. The air retention determination device according to claim 57, characterized in that, The region determination unit includes: a subtraction unit; The subtraction unit is used to subtract the left and right lung images corresponding to multiple DR lung images during the breathing process from the lung ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process, so as to obtain the lung non-ventilation areas corresponding to multiple DR lung images at multiple times during the breathing process.
59. The air retention determination device according to any one of claims 56-58, characterized in that, Also includes: Air retention area display unit; The air retention area display unit is used to display the air retention areas of the left and right lung images corresponding to multiple DR lung images during the breathing process.
60. The air retention determination device according to claim 59, characterized in that, The air retention area display unit includes: an air retention area configuration acquisition unit and a configuration display unit; The air retention area configuration acquisition unit is used to acquire the second configuration color and / or second configuration transparency corresponding to the air retention area; The configuration display unit is used to display the air retention areas of the left and right lung images corresponding to the multiple DR lung images, based on the second configuration color and / or the second configuration transparency.
61. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the lung ventilation determination method according to any one of claims 1 to 20.
62. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the air retention determination method according to any one of claims 21-24.
63. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the lung ventilation determination method according to any one of claims 1 to 20 and the air retention determination method according to any one of claims 21 to 24.
64. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the lung ventilation determination method according to any one of claims 1 to 20.
65. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the air retention determination method according to any one of claims 21-24.
66. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the lung ventilation determination method according to any one of claims 1 to 20 and the air retention determination method according to any one of claims 21 to 24.