Lung B-line identification method and device, computer equipment and storage medium
By identifying the pleural line in lung images, generating B-line peak curves, screening and correcting potential B-lines, and combining with the evaluation of related data, the problem of inconsistent identification standards of lung B-lines is solved, and the accuracy and reliability of diagnosis are improved , providing important support for medicine.
Patent Information
- Application Number
- CN202410897340.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-04
AI Technical Summary
The identification of lung B lines in the prior art lacks unified technical standards, resulting in differences in results in different institutions and operators during measurement, affecting the accuracy and reliability of the diagnosis.
By pleural line recognition based on the target lung image, the initial B-line peak curve was generated, potential B-lines were screened, correction and pseudo-B-line removal were performed, and the correlation data was evaluated to obtain accurate B-line identification results.
It improves the accuracy and reliability of lung image analysis, ensures the accuracy and reliability of B-line recognition, provides a more detailed basis for medical diagnosis, and improves the diagnosis and treatment level of lung diseases.
Smart Images

Figure CN118918355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasound equipment, and in particular to a method and device for identifying lung B-lines, a computer device, and a storage medium. Background Art
[0002] B-lines, as specific ultrasonic characteristic lines in lung ultrasound examinations, have important diagnostic value for evaluating conditions such as pulmonary ventilation loss, pulmonary edema, pneumonia, and pneumothorax. Their formation mechanism is due to the increase in the amount of fluid in the lung tissue. During ultrasound examinations, the difference in acoustic impedance between gas and liquid leads to strong high-echo reverberation, which in turn produces B-lines. B-lines have specific characteristics, such as laser-shaped high echoes, originating from the pleural line and extending downward, and their number is related to the air-fluid ratio in the lungs. Especially during the novel coronavirus infection epidemic, lung B-line measurements have provided doctors with strong diagnostic support.
[0003] However, there is currently no unified technical standard for contrast B-line identification. This results in discrepancies in B-line measurement results between institutions and operators, compromising diagnostic accuracy and reliability. Due to the complexity of B-line identification, users may misjudge the authenticity of B-lines or inaccurately identify the number of intercostal B-lines, potentially leading to misdiagnosis of lung disease. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, computer device, and storage medium for identifying lung B-lines to address the problems in the prior art of lung B-line measurement, such as a lack of consistent technical standards, strong operator dependence, and limited accuracy and reliability.
[0005] In a first aspect, an embodiment of the present invention provides a method for identifying lung B-lines, the method comprising:
[0006] performing pleural line recognition based on the target lung image to obtain an initial position of the pleural line;
[0007] generating an initial B-line peak curve according to the initial position, and screening out potential B-lines from a plurality of B-line peaks of the initial B-line peak curve;
[0008] Correcting the initial position using the potential B-line to obtain a corrected pleural line, and removing attenuated pseudo B-lines based on the corrected pleural line to obtain a target B-line;
[0009] The target B line is evaluated according to the associated data of the target B line to obtain an evaluation result.
[0010] In an optional embodiment of the present application, the identifying the pleural line based on the target lung image to obtain the initial position of the pleural line includes:
[0011] Get the initial near-field threshold;
[0012] From the initial near-field threshold to the preset height of the target lung image, pixel grayscale values are accumulated row by row. When the pixel grayscale values are accumulated to a maximum value, the abscissa corresponding to the maximum value is used as the initial position of the pleural line.
[0013] In an optional embodiment of the present application, generating an initial B-line peak curve according to the initial position includes:
[0014] cropping the target lung image downward from the initial position of the pleural line to obtain a cropped target lung image;
[0015] Accumulating pixel grayscale values column by column based on the cropped target lung image to obtain an initial peak curve;
[0016] The initial peak curve is smoothed at adjacent points to obtain a B-line peak curve.
[0017] In an optional embodiment of the present application, screening out potential B-lines from the multiple B-line peaks of the initial B-line peak curve includes:
[0018] Detecting peak values and valley values in the B-line peak curve;
[0019] Sorting the peak values and the valley values in descending order to obtain a sorting result;
[0020] Filtering peaks in the B-line peak curve based on the sorting result to obtain a first peak set;
[0021] A corresponding potential B-line is generated according to the first peak set.
[0022] In an optional embodiment of the present application, generating corresponding potential B-lines according to the first peak set includes:
[0023] detecting the number of peaks in the first peak set;
[0024] When the number of peaks is a specified number, calculating the prominence of each peak;
[0025] Peaks with protrusions less than a set threshold in the first peak set are eliminated to obtain potential B lines.
[0026] In an optional embodiment of the present application, correcting the initial position using the potential B-line to obtain a corrected pleural line, and removing attenuated pseudo B-lines based on the corrected pleural line to obtain a target B-line includes:
[0027] identifying the center position of the potential B-line;
[0028] Get the preset vertical search range and horizontal summation number;
[0029] Based on the vertical search range and the horizontal summation number, summing up the values horizontally from the initial position from top to bottom to obtain multiple sum values;
[0030] extracting the maximum sum value among the multiple sum values as the corrected pleural line;
[0031] Based on the corrected pleural line, attenuated pseudo B-lines in the potential B-lines are eliminated to obtain target B-lines.
[0032] In an optional embodiment of the present application, evaluating the target B-line according to the associated data of the target B-line to obtain an evaluation result includes:
[0033] Detecting the maximum left slope and the maximum right slope of each peak in each B line of the target B line;
[0034] Identifying a first abscissa corresponding to the maximum left slope value and a second abscissa corresponding to the maximum right slope value;
[0035] determining left and right boundaries of each B line according to the first horizontal coordinate and the second horizontal coordinate, and calculating a boundary distance between the left and right boundaries;
[0036] determining a B-line type of each B-line in the target B-lines based on the boundary distance;
[0037] determining an intercostal space indication contour area according to the grayscale values between each B line in the target B line;
[0038] Calculating the percentage of the target B-line area to the intercostal space indication contour area, and the B-line spacing between each B-line;
[0039] Based on the percentage, the B-line spacing, and the B-line type, the target B-line is evaluated to obtain an evaluation result.
[0040] In a second aspect, an embodiment of the present invention provides a device for identifying lung B lines, the device comprising:
[0041] a recognition module, configured to identify the pleural line based on the target lung image and obtain an initial position of the pleural line;
[0042] a screening module, configured to generate an initial B-line peak curve according to the initial position, and screen out potential B-lines from a plurality of B-line peaks of the initial B-line peak curve;
[0043] a correction module, configured to correct the initial position using the potential B-line to obtain a corrected pleural line, and remove attenuated pseudo B-lines based on the corrected pleural line to obtain a target B-line;
[0044] The evaluation module is configured to evaluate the target B line according to the associated data of the target B line to obtain an evaluation result.
[0045] In a third aspect, an embodiment of the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for identifying pulmonary B lines according to the first aspect or any corresponding embodiment thereof.
[0046] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the lung B-line identification method of the first aspect or any corresponding embodiment thereof.
[0047] The method provided in the embodiments of the present application has the following beneficial effects:
[0048] The method provided in the embodiment of the present application accurately locates the initial position of the pleural line through pleural line recognition technology, providing an important basis for the subsequent analysis of lung images. Among them, the initial near-field threshold is obtained to ensure that the starting point of the recognition is within a reasonable range; the grayscale values of pixels are accumulated row by row, effectively utilizing the grayscale information in the image; and the position of the pleural line is accurately determined by finding the maximum value of the accumulated pixel grayscale values. This process achieves accurate identification of the initial position of the pleural line through scientific calculation methods, improving the accuracy and reliability of lung image analysis.
[0049] The method provided in the embodiment of the present application provides key information for in-depth analysis and diagnosis of lung images by accurately generating the initial B-line peak curve and screening potential B-lines. Among them, cropping the target lung image and generating the A-line peak curve ensures the accuracy and pertinence of the analysis; the smoothing of neighboring points further improves the reliability of the data. In terms of screening potential B-lines, by detecting peaks and valleys, sorting and screening, noise and interference are effectively eliminated, making the recognition results more accurate. In particular, the prominence of each peak is calculated based on the peak set, which further ensures that the identified B-line has significant features, thereby improving the accuracy of B-line recognition in lung images. This series of processes realizes the effective extraction of key information in lung images through refined processing and analysis, providing important support for medical diagnosis and treatment.
[0050] The method provided in the embodiment of the present application accurately corrects the initial pleural line position through potential B-lines, further improving the accuracy of pleural line positioning, and effectively eliminates attenuated pseudo-B-lines based on the corrected position, thereby obtaining a more accurate target B-line. Specifically, identifying the center position of the potential B-line provides a reference point for subsequent correction; setting the longitudinal search range and the number of horizontal summations makes the search process more scientific and systematic; determining the corrected pleural line through horizontal summation is a simple and efficient method; finally, eliminating attenuated pseudo-B-lines based on the corrected pleural line significantly improves the accuracy of B-line identification. This series of refined operational steps not only improves the accuracy of pleural line and B-line identification, but also provides more reliable data support for subsequent medical diagnosis.
[0051] The method provided in the embodiment of the present application provides a comprehensive and accurate B-line evaluation result by deeply analyzing various related data of the target B-line. Specifically, the detection of the maximum left and right slopes of each peak provides an accurate basis for the subsequent determination of the B-line boundary; the identification of the horizontal coordinate corresponding to the maximum slope ensures the accuracy of the boundary positioning; the physical size of the B-line is further clarified by calculating the boundary distance; the determination of the B-line type based on the boundary distance helps to understand the characteristics of the B-line in more detail; the determination of the intercostal space indicator contour area provides a reference for evaluating the distribution of B-lines in lung images; the calculation of the percentage and B-line spacing quantifies the coverage and distribution density of the B-lines in the image; finally, the target B-line is evaluated by combining multiple indicators to obtain an evaluation result that fully reflects the status of the B-line. This series of refined analysis steps not only improves the accuracy of B-line evaluation, but also provides doctors with a more detailed diagnostic basis, which helps to improve the diagnosis and treatment of lung diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 is a flowchart of a method for identifying lung B-lines according to some embodiments of the present invention;
[0054] Figure 2 is a schematic diagram of potential B-lines in the lungs after screening according to an embodiment of the present invention;
[0055] Figure 3 is a schematic diagram of a B-line type of fusion B-line according to an embodiment of the present invention;
[0056] Figure 4 is a structural block diagram of a device for identifying lung B lines according to an embodiment of the present invention;
[0057] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0059] According to an embodiment of the present invention, a method, apparatus, computer device, and storage medium for identifying pulmonary B-lines are provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions. Moreover, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in an order different from that shown.
[0060] In this embodiment, a method for identifying lung B lines is provided. Figure 1 FIG. 1 is a flow chart of a method for identifying lung B-lines according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0061] Step S11 : performing pleural line recognition based on the target lung image to obtain an initial position of the pleural line.
[0062] In an embodiment of the present application, step S11 includes: obtaining an initial near-field threshold; accumulating pixel grayscale values row by row from the initial near-field threshold to a preset height of the target lung image, and when the pixel grayscale values accumulate to a maximum value, using the horizontal coordinate corresponding to the maximum value as the initial position of the pleural line.
[0063] It's important to note that before pleural line identification, an initial near-field threshold must be set to reduce hyperechoic interference in the image's near field (which can affect accurate pleural line identification). The "near field" here refers to the area near the ultrasound probe, where hyperechoic interference is typically caused by tissue structure or other factors within this area. For example, setting an initial near-field threshold of NearCut = 40 means that 40 lines (or pixel height, depending on the image resolution and units) starting from the top of the image will be ignored to avoid these interferences.
[0064] In an embodiment of the present application, starting from a set initial near-field threshold (NearCut) to a preset height of the target lung image, the grayscale values of all pixels in each row are accumulated. This process is to find an obvious grayscale value change, which usually corresponds to the position of the pleural line. In the process of accumulating pixel grayscale values row by row, the row with the largest cumulative value is looked for. This largest cumulative value usually means that there is an obvious grayscale change on this row, which is most likely due to the presence of the pleural line. Therefore, the horizontal coordinate (or row number, depending on the specific implementation) corresponding to the maximum cumulative value is determined as the initial position of the pleural line.
[0065] The method provided in the embodiment of the present application accurately locates the initial position of the pleural line through pleural line recognition technology, providing an important basis for the subsequent analysis of lung images. Among them, the initial near-field threshold is obtained to ensure that the starting point of the recognition is within a reasonable range; the grayscale values of pixels are accumulated row by row, effectively utilizing the grayscale information in the image; and the position of the pleural line is accurately determined by finding the maximum value of the accumulated pixel grayscale values. This process achieves accurate identification of the initial position of the pleural line through scientific calculation methods, improving the accuracy and reliability of lung image analysis.
[0066] Step S12 : generating an initial B-line peak curve according to the initial position, and screening out potential B-lines from the multiple B-line peaks of the initial B-line peak curve.
[0067] In the embodiment of the present application, generating an initial A-line peak curve according to the initial position includes the following steps A1-A3:
[0068] In step A1, the target lung image is cropped downward from the initial position of the pleural line to obtain a cropped target lung image.
[0069] In the embodiment of the present application, the initial position y of the pleural line determined in the previous step is used as the starting point for cropping. This position is the approximate position of the pleural line in the image. Starting cropping from here can ensure that the focus is mainly on the area below the pleural line in the lung image. Starting from the initial position y of the pleural line, the target lung image is cropped downward. The specific height of the crop may be determined according to specific needs and image characteristics, but it is generally necessary to ensure that all possible B-line areas are included. The cropped image will serve as the basis for subsequent analysis, mainly for extracting the B-line peak curve.
[0070] Step A2: Based on the cropped target lung image, pixel grayscale values are accumulated column by column to obtain an initial peak curve.
[0071] In an embodiment of the present application, the cropped image is processed with the aim of generating an initial B-line peak curve. The specific operation is to accumulate the grayscale values of all pixels in each column of the image (that is, in the vertical direction). In this way, each column will obtain an accumulated grayscale value. This process is to convert two-dimensional image information into one-dimensional curve information for the convenience of subsequent analysis and processing. When the grayscale values of all columns are accumulated, a curve composed of these accumulated values is obtained, namely the initial B-line peak curve. Each point on this curve represents the sum of the grayscale values of all pixels in the corresponding column. Therefore, the peak on the curve usually corresponds to the area with higher brightness in the image, while the trough corresponds to the area with lower brightness. In lung ultrasound images, the B line usually appears as a line with higher brightness. Therefore, on the initial peak curve, the B line should form a clear peak.
[0072] Step A3: Perform adjacent point smoothing on the initial peak curve to obtain a B-line peak curve.
[0073] In an embodiment of the present application, due to the low resolution and speckle noise that may exist in the ultrasound image itself, some small spikes may appear on the initial peak curve. These points may be caused by image noise and do not represent the real B-line signal. In order to remove these noise interferences and improve the accuracy of B-line detection, the initial peak curve needs to be smoothed. Among them, the smoothing method can select the neighboring point smoothing method, that is, for each data point, take several neighboring points (for example, 1 point before and after, a total of 3 points) and average or weighted average to smooth the curve. In this process, the value of each point is replaced by the average value of its neighboring points, thereby reducing small fluctuations caused by noise. The smoothed curve can better reflect the real B-line signal and help to accurately detect the peak in the subsequent steps. The smoothed curve is called the B-line peak curve, which provides a better basis for subsequently screening out potential B lines from the curve.
[0074] In an embodiment of the present application, potential B-lines are screened out from multiple B-line peaks of an initial B-line peak curve, comprising the following steps: detecting peaks and valleys in the B-line peak curve; sorting the peaks and valleys in descending order to obtain a sorting result; screening the peaks in the B-line peak curve based on the sorting result to obtain a first peak set; and generating corresponding potential B-lines according to the first peak set.
[0075] In an embodiment of the present application, numerical analysis methods, such as differential or derivative methods, are used to locate local maxima and minima on the B-line peak curve. A peak is a local maximum point on the curve, and a valley is a local minimum point on the curve. A series of peak and valley coordinates or values are obtained. All detected peaks and valleys are placed into two lists, and both lists are sorted in descending order, i.e., arranged from largest to smallest numerical value, resulting in two descending lists: one for peaks and one for valleys. Based on pre-set rules, the top N peaks (e.g., the top 10) are filtered from the descending peak lists to obtain a set of peaks most likely to represent true B-lines, i.e., the first peak set. Finally, the number of peaks in the first peak set is detected. When the number of peaks reaches a specified number (e.g., 2 or 3), special processing is performed: the prominence of each peak (e.g., the distance from the highest peak to the valley) is calculated, and peaks with prominence less than a set threshold are removed. For other numbers of peaks, peaks with lower values can be removed based on the second-largest valley value. The remaining peaks are ultimately considered potential B-lines.
[0076] In an embodiment of the present application, a corresponding potential B line is generated based on the first peak set, including: detecting the number of peaks in the first peak set; when the number of peaks is a specified number, calculating the protrusion of each peak; and eliminating peaks in the first peak set whose protrusion is less than a set threshold to obtain a potential B line.
[0077] In an embodiment of the present application, first, the number of peaks contained in the first peak set is detected. This set is obtained in the previous step by sorting and filtering the peaks and valleys of the B-line peak curve. Knowing the number of peaks is important for subsequent processing because it determines whether special filtering logic needs to be executed. Secondly, if the number of peaks is equal to a specified value (such as 2 or 3, according to the special B-line peak curve processing part in the process), the "prominence" of each peak is calculated. Among them, prominence is an indicator of the significance of a peak relative to its surrounding valleys, which can be obtained by calculating the difference or ratio between the peak and its adjacent valleys. For example, if the number of peaks is 2, the difference between the highest peak and the valley may be calculated as the prominence. Finally, a threshold is set to determine which peaks are prominent enough to represent real B lines. After the above screening process, the remaining peaks in the first peak set will be regarded as potential B lines.
[0078] It should be noted that potential B line Figure 2 As shown in the figure, these potential B-lines will be used for subsequent analysis and processing, such as pleural line position correction, screening out attenuated pseudo B-lines, and classifying fused B-lines and single B-lines. If the prominence of a peak is less than the set threshold, the peak will be considered insufficiently significant and will be removed from the first peak set.
[0079] The method provided in the embodiment of the present application provides key information for in-depth analysis and diagnosis of lung images by accurately generating the initial B-line peak curve and screening potential B-lines. Among them, cropping the target lung image and generating the A-line peak curve ensures the accuracy and pertinence of the analysis; the smoothing of neighboring points further improves the reliability of the data. In terms of screening potential B-lines, by detecting peaks and valleys, sorting and screening, noise and interference are effectively eliminated, making the recognition results more accurate. In particular, the prominence of each peak is calculated based on the peak set, which further ensures that the identified B-line has significant features, thereby improving the accuracy of B-line recognition in lung images. This series of processes realizes the effective extraction of key information in lung images through refined processing and analysis, providing important support for medical diagnosis and treatment.
[0080] In step S13 , the initial position is corrected using the potential B-line to obtain a corrected pleural line, and attenuated pseudo B-lines are removed based on the corrected pleural line to obtain a target B-line.
[0081] In the embodiment of the present application, step S13 includes the following steps B1-B5:
[0082] Step B1, identifying the center position of the potential B line.
[0083] In this embodiment, for each potential B-line, the position of its peak on the B-line peak curve is found. Since the B-line peak curve is obtained by accumulating pixel grayscale values column by column, each peak corresponds to a specific column index, which can be regarded as the center position of the potential B-line.
[0084] Step B2: Obtain a preset vertical search range and a horizontal summed number.
[0085] In the embodiment of the present application, the vertical search range (PleuralTh) is a preset value indicating how many pixels are searched above and below the initial position of the pleural line. The horizontal summation number (XRange) is also a preset value indicating the number of pixels involved in the horizontal grayscale value accumulation.
[0086] Step B3: Based on the vertical search range and the number of horizontal sums, horizontal sums are performed from the initial position from top to bottom to obtain multiple sum values.
[0087] In this embodiment, the purpose of this step is to more precisely locate the pleural line by accumulating grayscale values horizontally within a specified range. Starting from the initial pleural line position, the horizontal grayscale values are accumulated row by row according to the set vertical search range and number of horizontal sums. This process is performed within a certain range above and below the initial position to account for possible deviations from the pleural line. A series of sums are obtained, each representing the result of the horizontal grayscale accumulation at a specific vertical position.
[0088] Step B4: extracting the maximum sum value among the multiple sum values as the corrected pleural line.
[0089] In the embodiment of the present application, in order to determine the most accurate position of the pleural line, the maximum value is found from the sum values obtained in step B3. The longitudinal position corresponding to the maximum value is the corrected pleural line position.
[0090] Step B5: Based on the corrected pleural line, attenuated pseudo B-lines are eliminated from the potential B-lines to obtain the target B-lines.
[0091] In this embodiment, to remove pseudo B-lines caused by acoustic attenuation or other reasons and ensure the accuracy of subsequent analysis, a grayscale decay curve for each potential B-line is drawn downward, starting from the corrected pleural line position. If the grayscale value of a potential B-line decays to half or less of its peak value, it is considered an attenuated pseudo B-line and is eliminated. Ultimately, the resulting filtered and corrected target B-lines are used for subsequent analysis and evaluation.
[0092] The method provided in the embodiment of the present application accurately corrects the initial pleural line position through potential B-lines, further improving the accuracy of pleural line positioning, and effectively eliminates attenuated pseudo-B-lines based on the corrected position, thereby obtaining a more accurate target B-line. Specifically, identifying the center position of the potential B-line provides a reference point for subsequent correction; setting the longitudinal search range and the number of horizontal summations makes the search process more scientific and systematic; determining the corrected pleural line through horizontal summation is a simple and efficient method; finally, eliminating attenuated pseudo-B-lines based on the corrected pleural line significantly improves the accuracy of B-line identification. This series of refined operational steps not only improves the accuracy of pleural line and B-line identification, but also provides more reliable data support for subsequent medical diagnosis.
[0093] Step S14 , evaluating the target B line according to the associated data of the target B line to obtain an evaluation result.
[0094] In the embodiment of the present application, step S14 includes the following steps C1-C7:
[0095] Step C1 , detecting the maximum left slope and the maximum right slope of each peak in each B line of the target B line.
[0096] In an embodiment of the present application, for each target B line, there will be one or more peaks, which represent the intensity of the ultrasonic signal at that position, and each peak needs to be analyzed. For each peak, starting from its left side, the slope between adjacent points (i.e., the rate of change of grayscale value) is calculated step by step. The slope can be obtained by dividing the grayscale value difference between two adjacent points by their horizontal coordinate difference. Find the point where the slope changes from negative to positive or from positive to zero, and record the slope of this point as the maximum left slope. This point is usually considered to be the boundary on the left side of the B line. Similarly, start calculating the slope from the right side of the peak, find the point where the slope changes from positive to negative or from negative to zero, and the slope of this point is the maximum right slope. This point is usually considered to be the boundary on the right side of the B line. Record the calculated maximum left and right slopes, as well as their corresponding horizontal coordinate positions. These data will be used to subsequently determine the left and right boundaries of the B line.
[0097] Step C2: Identify the first horizontal coordinate corresponding to the maximum left slope and the second horizontal coordinate corresponding to the maximum right slope.
[0098] In this embodiment of the present application, in step C1, the slope to the left of each B-line peak has been calculated, and the maximum left slope has been found. Now, it is necessary to determine the horizontal coordinate corresponding to this maximum left slope, i.e., the first horizontal coordinate. This coordinate point generally represents the starting position of the left side of the B-line. Similarly, in step C1, the slope to the right of each B-line peak has been calculated, and the maximum right slope has been found. Next, it is necessary to determine the horizontal coordinate corresponding to this maximum right slope, i.e., the second horizontal coordinate. This coordinate point generally represents the ending position of the right side of the B-line.
[0099] Step C3 : determining the left and right boundaries of each B line according to the first horizontal coordinate and the second horizontal coordinate, and calculating the boundary distance between the left and right boundaries.
[0100] In the embodiment of the present application, the first horizontal coordinate corresponding to the maximum left slope of each B-line peak (candidate position of the left boundary) and the second horizontal coordinate corresponding to the maximum right slope (candidate position of the right boundary) have been identified. It is necessary to determine the exact left and right boundaries of each B-line based on these two horizontal coordinates. This means that the position of the maximum left slope is regarded as the left boundary of the B-line, and the position of the maximum right slope is regarded as the right boundary of the B-line. After the left and right boundaries are determined, the distance between the two boundaries needs to be calculated. This distance represents the width of the B-line and is a key indicator for determining the type of B-line (single B-line or fused B-line). The boundary distance can be calculated by subtracting the first horizontal coordinate of the left boundary from the second horizontal coordinate of the right boundary.
[0101] Step C4 : determining the B-line type of each B-line in the target B-line based on the boundary distance.
[0102] In the embodiment of the present application, the calculated boundary distance is used to determine the type of each B-line. Specifically, if the boundary distance is less than or equal to 2 mm, the B-line is classified as a single B-line. Single B-lines usually appear as thin and bright lines. They are usually isolated on ultrasound images and do not merge with other B-lines. If the boundary distance is greater than 2 mm, the B-line is classified as a fused B-line. Figure 3 As shown in Figure 1, fused B-lines are formed by multiple closely spaced B-lines, forming a wide bright band. They usually appear as a wide, bright area on ultrasound images. The classification results of each B-line are recorded for subsequent evaluation and analysis.
[0103] Step C5: determining the intercostal space indication contour area according to the grayscale values between the target B lines.
[0104] In an embodiment of the present application, the intercostal space is the space between the ribs, and these spaces usually appear as areas with lower grayscale values (i.e., relatively dark) on ultrasound images because they are mainly composed of soft tissue and muscle, which contrasts with the brightness of the ribs and pleura. After identifying the target B-lines, it is necessary to analyze the areas between these B-lines, especially paying attention to changes in grayscale values. This usually involves image processing techniques, such as threshold segmentation or edge detection, to distinguish different tissue types. By analyzing the grayscale values, it is possible to determine which pixels or areas are most likely to represent the intercostal space. These areas will be used as intercostal space indicator contour areas for subsequent calculations and evaluations. The determination of the intercostal space indicator contour area is used for the subsequent calculation of the percentage of the B-line area in the intercostal space indicator contour area.
[0105] Step C6, calculating the percentage of the target B-line area in the intercostal space indication contour area and the B-line spacing between each B-line.
[0106] In the embodiment of the present application, the above steps have been performed by identifying the part with the lowest grayscale value between the B lines as the intercostal space indication contour. Next, it is necessary to calculate the ratio of the area occupied by the target B line (that is, the real B line after screening and confirmation) to the intercostal space indication contour area. This involves counting the pixel area covered by the B line and comparing it with the total number of pixels in the intercostal space indication contour area. Among them, the ratio calculation formula can be:
[0107] (Pixel area covered by B line / total number of pixels in the intercostal space indication outline area)*100%.
[0108] This ratio helps assess the density of B lines and the severity of pulmonary edema.
[0109] In an embodiment of the present application, in addition to calculating the percentage, it is also necessary to measure the distance between each B line, that is, the B line spacing. This can be achieved by calculating the pixel distance between the center positions or boundaries of adjacent B lines. Accurate B-line spacing measurement is very important for judging the condition of the lungs, especially when it is necessary to distinguish between different types of pulmonary edema (such as pulmonary interstitial edema and alveolar edema). The calculated percentage and B-line spacing data are recorded and used for subsequent evaluation and analysis. Doctors or medical professionals can judge the patient's lung condition based on these data and formulate corresponding treatment plans.
[0110] Step C7: Evaluate the target B-line based on the percentage, B-line spacing, and B-line type to obtain an evaluation result.
[0111] In the embodiments of the present application, a series of evaluation criteria are first established based on clinical experience. For example, a percentage threshold may indicate the severity of pulmonary edema; B-line spacing may indicate the type of pulmonary edema (such as interstitial edema or alveolar edema); and the B-line type (single B-line or fused B-line) can also provide additional information about the lung condition. Secondly, the calculated percentage, B-line spacing, and B-line type are compared with the established evaluation criteria. For example, if the percentage exceeds a certain threshold, it may indicate severe pulmonary edema; if the B-line spacing is less than or equal to 2mm and multiple lines appear, it may indicate alveolar edema; and the presence of fused B-lines may also be associated with specific pathological conditions. Thirdly, based on the above comparison, an evaluation result is obtained. This result may be a score, a grade, or a descriptive text to describe the patient's lung condition. For example, the system may assign a score of 0 to 3 based on the LUS (lung ultrasound) score, or describe it as "mild pulmonary edema," "moderate interstitial edema," etc. Finally, the assessment results are output and recorded in the patient's medical record for the doctor's reference and further diagnosis. This result can also serve as the basis for treatment plans or be used to monitor changes in the patient's condition.
[0112] The method provided in the embodiment of the present application provides a comprehensive and accurate B-line evaluation result by deeply analyzing various related data of the target B-line. Specifically, the detection of the maximum left and right slopes of each peak provides an accurate basis for the subsequent determination of the B-line boundary; the identification of the horizontal coordinate corresponding to the maximum slope ensures the accuracy of the boundary positioning; the physical size of the B-line is further clarified by calculating the boundary distance; the determination of the B-line type based on the boundary distance helps to understand the characteristics of the B-line in more detail; the determination of the intercostal space indicator contour area provides a reference for evaluating the distribution of B-lines in lung images; the calculation of the percentage and B-line spacing quantifies the coverage and distribution density of the B-lines in the image; finally, the target B-line is evaluated by combining multiple indicators to obtain an evaluation result that fully reflects the status of the B-line. This series of refined analysis steps not only improves the accuracy of B-line evaluation, but also provides doctors with a more detailed diagnostic basis, which helps to improve the diagnosis and treatment of lung diseases.
[0113] This embodiment also provides a device for identifying lung B lines, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0114] This embodiment provides a device for identifying lung B lines. Figure 4 Shown, including:
[0115] an identification module 41 for identifying the pleural line based on the target lung image and obtaining an initial position of the pleural line;
[0116] a screening module 42 for generating an initial B-line peak curve according to the initial position, and screening potential B-lines from multiple B-line peaks of the initial B-line peak curve;
[0117] a correction module 43 for correcting the initial position using the potential B-line to obtain a corrected pleural line, and removing the attenuated pseudo B-line based on the corrected pleural line to obtain a target B-line;
[0118] The evaluation module 44 is configured to evaluate the target B line according to the associated data of the target B line to obtain an evaluation result.
[0119] In an optional embodiment of the present application, the identification module 41 is used to obtain an initial near-field threshold; from the initial near-field threshold to a preset height of the target lung image, pixel grayscale values are accumulated row by row, and when the pixel grayscale values are accumulated to a maximum value, the horizontal coordinate corresponding to the maximum value is used as the initial position of the pleural line.
[0120] In an optional embodiment of the present application, the screening module 42 is used to crop the target lung image from the initial position of the pleural line downward to obtain a cropped target lung image; accumulate pixel grayscale values column by column based on the cropped target lung image to obtain an initial peak curve; and perform neighboring point smoothing on the initial peak curve to obtain a B-line peak curve.
[0121] In an optional embodiment of the present application, the screening module 42 is used to detect peaks and valleys in the B-line peak curve; sort the peaks and valleys in descending order to obtain a sorting result; filter the peaks in the B-line peak curve based on the sorting result to obtain a first peak set; and generate corresponding potential B lines based on the first peak set.
[0122] In an optional embodiment of the present application, the screening module 42 is used to detect the number of peaks in the first peak set; when the number of peaks is a specified number, calculate the prominence of each peak; and eliminate peaks in the first peak set whose prominence is less than a set threshold to obtain potential B lines.
[0123] In an optional embodiment of the present application, the correction module 43 is used to identify the center position of the potential B-line; obtain a preset longitudinal search range and a number of transverse sums; based on the longitudinal search range and the number of transverse sums, perform transverse sums from the initial position from top to bottom to obtain multiple sum values; extract the maximum sum value among the multiple sum values as the corrected pleural line; based on the corrected pleural line, eliminate the attenuated pseudo B-lines in the potential B-lines to obtain the target B-line.
[0124] In an optional embodiment of the present application, the evaluation module 44 is used to detect the maximum left slope and the maximum right slope of each peak in each B line of the target B line; identify the first horizontal coordinate corresponding to the maximum left slope, and the second horizontal coordinate corresponding to the maximum right slope; determine the left and right boundaries of each B line according to the first horizontal coordinate and the second horizontal coordinate, and calculate the boundary distance between the left and right boundaries; determine the B line type of each B line in the target B line based on the boundary distance; determine the intercostal space indication contour area according to the grayscale value between each B line in the target B line; calculate the percentage of the area where the target B line is located in the intercostal space indication contour area, and the B line spacing between each B line; evaluate the target B line based on the percentage, the B line spacing and the B line type to obtain an evaluation result.
[0125] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0126] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0127] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0128] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0129] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0130] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0131] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0132] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for identifying lung B lines, It is characterized in that The method comprises: Performing pleural line recognition based on the target lung image to obtain an initial position of the pleural line; generating an initial B-line peak curve according to the initial position, and screening out potential B-lines from a plurality of B-line peaks of the initial B-line peak curve; Correcting the initial position using the potential B-line to obtain a corrected pleural line, and removing the attenuated pseudo B-line based on the corrected pleural line to obtain a target B-line; The target B line is evaluated according to the associated data of the target B line to obtain an evaluation result.
2. The method according to claim 1, It is characterized in that The step of identifying the pleural line based on the target lung image to obtain the initial position of the pleural line includes: Obtaining an initial near-field threshold; From the initial near-field threshold to the preset height of the target lung image, pixel grayscale values are accumulated row by row, and when the pixel grayscale values are accumulated to a maximum value, the abscissa corresponding to the maximum value is used as the initial position of the pleural line.
3. The method according to claim 1, It is characterized in that Generating an initial B-line peak curve according to the initial position includes: cropping the target lung image downward from an initial position of the pleural line to obtain a cropped target lung image; Accumulating pixel grayscale values column by column based on the cropped target lung image to obtain an initial peak curve; The initial peak curve is subjected to adjacent point smoothing processing to obtain a B-line peak curve.
4. The method according to claim 1, It is characterized in that The step of screening out potential B-lines from the multiple B-line peaks of the initial B-line peak curve comprises: Detecting peak values and valley values in the B-line peak curve; Sorting the peak values and the valley values in descending order respectively to obtain a sorting result; Based on the sorting result, the peak values in the B-line peak curve are screened to obtain a first peak set; A corresponding potential B-line is generated according to the first peak set.
5. The method according to claim 4, It is characterized in that Generating a corresponding potential B line according to the first peak set includes Detecting the number of peaks in the first peak set; When the number of peaks is a specified number, calculating the prominence of each peak; The peaks whose protrusion is less than a set threshold in the first peak set are eliminated to obtain potential B lines.
6. The method according to claim 1, It is characterized in that The method of correcting the initial position by using the potential B-line to obtain a corrected pleural line, and removing the attenuated pseudo B-line based on the corrected pleural line to obtain a target B-line includes: identifying the center position of the potential B-line; Get the preset vertical search range and horizontal summation number; Based on the vertical search range and the horizontal summed number, horizontal sums are sequentially performed from top to bottom from the initial position to obtain multiple sum values; extracting the maximum sum value among the multiple sum values as the corrected pleural line; Based on the corrected pleural line, the attenuated pseudo B-lines in the potential B-lines are eliminated to obtain the target B-lines.
7. The method according to claim 6, It is characterized in that The step of evaluating the target B line according to the associated data of the target B line to obtain an evaluation result includes: Detecting the maximum left slope and the maximum right slope of each peak in each B line of the target B line; Identify a first abscissa corresponding to the maximum left slope value and a second abscissa corresponding to the maximum right slope value; Determine the left and right boundaries of each B line according to the first horizontal coordinate and the second horizontal coordinate, and calculate the boundary distance between the left and right boundaries; determining a B-line type of each B-line in the target B-lines based on the boundary distance; Determine the intercostal space indication contour area according to the gray value between each B line in the target B line; Calculate the percentage of the target B-line area to the intercostal space indication contour area, and the B-line spacing between each B-line; Based on the percentage, the B-line spacing, and the B-line type, the target B-line is evaluated to obtain an evaluation result.
8. A device for identifying lung B lines, It is characterized in that The device comprises: A recognition module, used for performing pleural line recognition based on the target lung image to obtain an initial position of the pleural line; a screening module, configured to generate an initial B-line peak curve according to the initial position, and screen out potential B-lines from a plurality of B-line peaks of the initial B-line peak curve; a correction module, configured to correct the initial position using the potential B-line to obtain a corrected pleural line, and remove the attenuated pseudo B-line based on the corrected pleural line to obtain a target B-line; The evaluation module is used to evaluate the target B line according to the associated data of the target B line to obtain an evaluation result.
9. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Pleura line identification method and device and storage medium
CN113628156A
Apparatus and method for diagnosing pneumonia by analysis of ultrasound images
CN117529282A
