A method, apparatus, computer device, and storage medium for identifying B-line lung lesions.

By using scientific computational methods to identify and correct lung B-lines, the consistency problem of B-line identification in existing technologies has been solved, achieving high-precision B-line assessment and diagnostic support, and improving the diagnosis and treatment of lung diseases.

CN118918355BActive Publication Date: 2026-11-17SHENZHEN COMEN MEDICAL INSTR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410897340.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2026-11-17
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

The identification of lung B-lines in existing technologies lacks consistent technical standards, is highly dependent on operators, and thus limits the accuracy and reliability of diagnosis.

Method used

By identifying pleural lines based on target lung images, an initial B-line peak curve is generated, potential B-lines are screened, the position of pleural lines is corrected, false B-lines are eliminated, and in-depth analysis of the associated data of the target B-line is conducted to evaluate the B-line status.

Benefits of technology

It improves the accuracy and reliability of lung image analysis, ensures the accuracy and reliability of B-line identification, provides detailed data support for medical diagnosis, and enhances the diagnosis and treatment of lung diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918355B_ABST
    Figure CN118918355B_ABST
Patent Text Reader

Abstract

This invention relates to the field of ultrasound equipment technology, and discloses a method, device, computer equipment, and storage medium for identifying lung B-lines. The method includes: identifying pleural lines based on a target lung image to obtain the initial position of the pleural lines; generating an initial B-line peak curve based on the initial position, and screening potential B-lines from multiple B-line peaks of the initial B-line peak curve; correcting the initial position using the potential B-lines to obtain a corrected pleural line, and removing attenuated pseudo-B-lines based on the corrected pleural line to obtain the target B-line; and evaluating the target B-line based on its associated data to obtain an evaluation result. This invention solves the problems of lack of consistent technical standards, strong operator dependence, and limited accuracy and reliability in existing lung B-line measurements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultrasound equipment technology, specifically to a method, device, computer equipment, and storage medium for identifying B-lines in the lungs. Background Technology

[0002] B-lines, as specific ultrasound features in lung ultrasound examinations, are of significant diagnostic value in assessing conditions such as pulmonary ventilation loss, pulmonary edema, pneumonia, and pneumothorax. Their formation mechanism is due to the increased fluid volume in the lung tissue. During ultrasound examination, the difference in acoustic impedance between gas and fluid leads to strong high-echo reverberation, thus producing B-lines. B-lines have specific characteristics, such as a laser-shaped high echo, originating from the pleural line and extending downwards, and their number is related to the air-fluid ratio in the lungs. Particularly during the COVID-19 pandemic, lung B-line measurements have provided physicians with strong diagnostic support.

[0003] However, there is currently no unified technical standard for the identification of B-lines. This leads to potential differences in results when different institutions and operators perform B-line measurements, affecting the accuracy and reliability of the diagnosis. 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, which may further lead to misdiagnosis of lung diseases in patients. 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, in order to solve the problems of lack of consistent technical standards, strong operator dependence, and limited accuracy and reliability in the prior art for lung B-line measurement.

[0005] In a first aspect, embodiments of the present invention provide a method for identifying lung B-lines, the method comprising:

[0006] Based on the target lung image, the pleural line is identified to obtain the initial position of the pleural line;

[0007] An initial B-line peak curve is generated based on the initial position, and potential B-lines are selected from multiple B-line peaks of the initial B-line peak curve.

[0008] The initial position is corrected using the potential B-line to obtain the corrected pleural line, and the attenuated pseudo-B-line is removed based on the corrected pleural line to obtain the target B-line.

[0009] The target line B is evaluated based on the associated data, and the evaluation result is obtained.

[0010] In an optional embodiment of this application, the step of identifying the pleural line based on the target lung image to obtain the initial position of the pleural line includes:

[0011] Obtain the initial near-field threshold;

[0012] From the initial near-field threshold to the preset height of the target lung image, the pixel grayscale values ​​are accumulated row by row. When the pixel grayscale values ​​are accumulated to the maximum value, the horizontal coordinate corresponding to the maximum value is taken as the initial position of the pleural line.

[0013] In an optional embodiment of this application, generating the initial B-line peak curve based on the initial position includes:

[0014] The target lung image is cropped downwards from the initial position of the pleural line to obtain the cropped target lung image;

[0015] The initial peak curve is obtained by accumulating the pixel gray values ​​column by column based on the cropped target lung image;

[0016] The initial peak curve is smoothed by neighboring points to obtain the B-line peak curve.

[0017] In an optional embodiment of this application, the step of screening potential B-lines from multiple B-line peaks of the initial B-line peak curve includes:

[0018] Detect the peak value and valley value in the B-line peak curve;

[0019] The peak values ​​and valley values ​​are sorted in descending order to obtain the sorting results;

[0020] Based on the sorting results, the peak values ​​in the B-line peak curve are filtered to obtain the first set of peak values;

[0021] The corresponding potential B-line is generated based on the first set of peaks.

[0022] In an optional embodiment of this application, generating the corresponding potential B-line based on the first set of peaks includes:

[0023] Detect the number of peaks in the first set of peaks;

[0024] When the number of peaks is a specified number, the prominence of each peak is calculated;

[0025] Peaks with a prominence less than a set threshold in the first set of peaks are removed to obtain potential B-lines.

[0026] In an optional embodiment of this application, the step of correcting the initial position using the potential B-line to obtain a corrected pleural line, and then removing attenuated pseudo-B-lines based on the corrected pleural line to obtain the target B-line, includes:

[0027] Identify the center location of the potential B line;

[0028] Obtain the pre-defined vertical search range and the number of horizontal sums;

[0029] Based on the vertical search range and the number of horizontal sums, multiple sums are obtained by sequentially summing horizontally from top to bottom starting from the initial position;

[0030] The maximum sum among the multiple sums is extracted as the corrected pleural line;

[0031] Based on the corrected pleural line, the attenuated pseudo-B lines in the potential B lines are eliminated to obtain the target B line.

[0032] In an optional embodiment of this application, the step of evaluating the target B line based on the associated data of the target B line to obtain an evaluation result includes:

[0033] Detect the maximum left slope and the maximum right slope of each peak in each B-line of the target B-line;

[0034] Identify the first horizontal coordinate corresponding to the maximum left slope and the second horizontal coordinate corresponding to the maximum right slope;

[0035] The left and right boundaries of each B line are determined based on the first and second abscissas, and the boundary distance between the left and right boundaries is calculated.

[0036] The B-line type of each B-line in the target B-line is determined based on the boundary distance;

[0037] The rib gap indicator contour area is determined based on the gray values ​​between each B line in the target B line;

[0038] Calculate the percentage of the area where the target B line is located relative to the interrib gap indicator contour area, and the spacing between each B line;

[0039] Based on the percentage ratio, the B-line spacing, and the B-line type, the target B-line is evaluated to obtain the evaluation result.

[0040] Secondly, embodiments of the present invention provide a lung B-line identification device, the device comprising:

[0041] The recognition module is used to identify the pleural line based on the target lung image to obtain the initial position of the pleural line;

[0042] The filtering module is used to generate an initial B-line peak curve based on the initial position, and to filter out potential B-lines from multiple B-line peaks of the initial B-line peak curve.

[0043] The correction module is used to correct the initial position using the potential B-line to obtain a corrected pleural line, and to remove the attenuated pseudo-B-line based on the corrected pleural line to obtain the target B-line.

[0044] The evaluation module is used to evaluate the target B line based on the associated data of the target B line and obtain the evaluation result.

[0045] Thirdly, embodiments of the present invention provide a computer device, including: 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 lung B-line identification method described in the first aspect or any corresponding embodiment.

[0046] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to perform the lung B-line identification method described in the first aspect or any corresponding embodiment thereof.

[0047] The method provided in this application has the following beneficial effects:

[0048] The method provided in this application, through pleural line recognition technology, accurately locates the initial position of the pleural line, providing an important foundation for subsequent lung image analysis. Specifically, obtaining an initial near-field threshold ensures that the starting point for recognition is within a reasonable range; accumulating pixel grayscale values ​​line by line effectively utilizes the grayscale information in the image; and by finding the maximum value of the accumulated pixel grayscale values, the position of the pleural line is precisely determined. This process, through scientific calculation methods, achieves accurate identification of the initial position of the pleural line, improving the accuracy and reliability of lung image analysis.

[0049] The method provided in this application provides crucial information for in-depth analysis and diagnosis of lung images by accurately generating initial B-line peak curves and screening potential B-lines. Specifically, cropping the target lung image and generating A-line peak curves ensures the accuracy and specificity of the analysis; neighboring point smoothing further improves data reliability. In screening potential B-lines, detecting peaks and troughs, and then sorting and filtering them, effectively eliminates noise and interference, resulting in more accurate identification. In particular, calculating the prominence of each peak based on the peak set further ensures that the identified B-lines have significant characteristics, thereby improving the accuracy of B-line identification in lung images. This series of processes, through refined processing and analysis, achieves effective extraction of key information from lung images, providing important support for medical diagnosis and treatment.

[0050] The method provided in this application precisely corrects the initial pleural line position using potential B-lines, further improving the accuracy of pleural line localization. Based on the corrected position, it effectively eliminates attenuated pseudo-B-lines, resulting in a more accurate target B-line. Specifically, identifying the center position of potential B-lines provides a reference point for subsequent correction; setting the longitudinal search range and the number of horizontal sums makes the search process more scientific and systematic; determining the corrected pleural line through horizontal summation is both simple and efficient; finally, attenuated pseudo-B-lines are eliminated based on the corrected pleural line, significantly improving 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 this application offers a comprehensive and accurate B-line assessment result through in-depth analysis of various related data of the target B-line. Specifically, it detects the maximum left and right slope values ​​of each peak, providing an accurate basis for subsequently determining the B-line boundary; identifies the horizontal coordinate corresponding to the maximum slope value, ensuring the accuracy of boundary positioning; calculates the boundary distance, further clarifying the physical size of the B-line; determines the B-line type based on the boundary distance, helping to understand the characteristics of the B-line in more detail; determines the intercostal space indicator contour area, providing a reference for assessing the distribution of the B-line in lung images; calculates the percentage proportion and B-line spacing, quantifying the coverage and distribution density of the B-line in the image; finally, it comprehensively evaluates the target B-line based on multiple indicators, yielding an assessment result that fully reflects the state of the B-line. This series of refined analytical steps not only improves the accuracy of B-line assessment but also provides doctors with more detailed diagnostic information, contributing to improving the diagnosis and treatment of lung diseases. Attached Figure Description

[0052] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0053] Figure 1 This is a flowchart illustrating a method for identifying lung B-lines according to some embodiments of the present invention;

[0054] Figure 2 This is a schematic diagram of potential B-line in the lungs after screening, according to an embodiment of the present invention;

[0055] Figure 3 This is a schematic diagram of a fused B-line type according to an embodiment of the present invention;

[0056] Figure 4 This is a structural block diagram of a lung B-line recognition device according to an embodiment of the present invention;

[0057] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] According to embodiments of the present invention, a method, apparatus, computer device, and storage medium for identifying lung B-lines are provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0060] This embodiment provides a method for identifying B-lines in the lungs. Figure 1 This is a flowchart of a lung B-line identification method according to an embodiment of the present invention, as follows: Figure 1 As shown, the process includes the following steps:

[0061] Step S11: Based on the target lung image, perform pleural line recognition to obtain the initial position of the pleural line.

[0062] In this embodiment of the application, step S11 includes: obtaining an initial near-field threshold; accumulating pixel gray values ​​row by row from the initial near-field threshold to a preset height of the target lung image; and when the pixel gray values ​​are accumulated to the 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 performing pleural line recognition, an initial near-field threshold needs to be set to reduce high-echo interference in the near field of the image (which can affect the accurate identification of pleural lines). Here, "near field" refers to the area near the ultrasound probe, and high-echo interference is usually caused by tissue structures or other factors within this area. For example, giving an initial near-field threshold of NearCut = 40 means that 40 rows (or pixel height, depending on the image resolution and units) starting from the top of the image will be ignored to avoid this interference.

[0064] In this embodiment, starting from a set initial near-field threshold (NearCut), the grayscale values ​​of all pixels in each row are accumulated up to a preset height of the target lung image. This process aims to find a significant change in grayscale value, which typically corresponds to the position of the pleural line. During the row-by-row accumulation of pixel grayscale values, the row with the largest accumulated value is searched. This largest accumulated value usually indicates a significant grayscale change in that row, which is very likely due to the presence of the pleural line. Therefore, the horizontal coordinate (or row number, depending on the specific implementation) corresponding to the largest accumulated value is determined as the initial position of the pleural line.

[0065] The method provided in this application, through pleural line recognition technology, accurately locates the initial position of the pleural line, providing an important foundation for subsequent lung image analysis. Specifically, obtaining an initial near-field threshold ensures that the starting point for recognition is within a reasonable range; accumulating pixel grayscale values ​​line by line effectively utilizes the grayscale information in the image; and by finding the maximum value of the accumulated pixel grayscale values, the position of the pleural line is precisely determined. This process, through scientific calculation methods, achieves accurate identification of the initial position of the pleural line, improving the accuracy and reliability of lung image analysis.

[0066] Step S12: Generate an initial B-line peak curve based on the initial position, and filter out potential B-lines from multiple B-line peaks of the initial B-line peak curve.

[0067] In this embodiment of the application, generating the initial A-line peak curve based on the initial position includes the following steps A1-A3:

[0068] Step A1: Cropping the target lung image downwards from the initial position of the pleural line to obtain the cropped target lung image.

[0069] In this embodiment, the initial position y of the pleural line determined in the previous steps is used as the starting point for cropping. This position is the approximate location of the pleural line in the image, and starting cropping from here ensures that the focus is primarily 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 downwards. The specific cropping height may be determined based on specific needs and image characteristics, but it generally ensures that all possible B-line regions are included. The cropped image will serve as the basis for subsequent analysis, primarily used to extract the B-line peak curve.

[0070] Step A2: Based on the cropped target lung image, the pixel gray values ​​are accumulated column by column to obtain the initial peak curve.

[0071] In this embodiment, the cropped image is processed to generate an initial B-line peak curve. Specifically, the grayscale values ​​of all pixels in each column (vertical direction) of the image are accumulated. This results in an accumulated grayscale value for each column. This process transforms two-dimensional image information into one-dimensional curve information, facilitating subsequent analysis and processing. After all columns' grayscale values ​​have been accumulated, a curve composed of these accumulated values ​​is obtained, which is 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, peaks on the curve typically correspond to areas of higher brightness in the image, while troughs correspond to areas of lower brightness. In lung ultrasound images, B-lines are typically high-brightness lines; therefore, the initial peak curve should show a distinct peak in the B-line.

[0072] Step A3: Smooth the initial peak curve by nearby points to obtain the peak curve of line B.

[0073] In this embodiment, due to the low resolution and speckle noise inherent in the ultrasound image itself, small spikes may appear on the initial peak curve. These spikes may be caused by image noise and do not represent the true B-line signal. To remove this noise interference and improve the accuracy of B-line detection, the initial peak curve needs to be smoothed. One smoothing method is the nearest neighbor smoothing method, which involves averaging or weighted averaging the values ​​of several neighboring points (e.g., one point before and one point after, for a total of three points) for each data point 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 better reflects the true B-line signal, which helps in the accurate detection of peaks in subsequent steps. The smoothed curve is called the B-line peak curve, providing a better basis for subsequent screening of potential B-lines from the curve.

[0074] In this embodiment of the application, the process of selecting potential B-lines from multiple B-line peaks of the initial B-line peak curve includes 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; selecting peaks in the B-line peak curve based on the sorting result to obtain a first set of peaks; and generating corresponding potential B-lines based on the first set of peaks.

[0075] In this embodiment, numerical analysis methods, such as the finite difference method or the derivative method, are used to find the local maximum and minimum points on the B-line peak curve. A peak is a local maximum point on the curve, and a valley is a local minimum point, resulting in a series of coordinates or values ​​for peaks and valleys. All detected peaks and valleys are placed into two lists, which are then sorted in descending order of value, resulting in two lists: a peak list and a valley list. According to preset rules, the top N peaks (e.g., the top 10) are selected from the descending peak list, resulting in a set containing the most likely peaks representing the true B-line, i.e., the first peak set. Finally, the number of peaks in the first peak set is detected. When the number of peaks is a specified number (e.g., 2 or 3), special processing is performed: the prominence of each peak is calculated (e.g., the distance from the highest peak to the valley), 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 this embodiment of the application, generating a corresponding potential B-line based on a first set of peaks includes: detecting the number of peaks in the first set of peaks; when the number of peaks is a specified number, calculating the prominence of each peak; and removing peaks in the first set whose prominence is less than a set threshold to obtain a potential B-line.

[0077] In this embodiment, firstly, the number of peaks in the first peak set is detected. This set is obtained in previous steps by sorting and filtering the peaks and troughs 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 equals a specified value (such as 2 or 3, depending on the special B-line peak curve processing section in the process), the "prominence" of each peak is calculated. Prominence is an indicator that measures the significance of a peak relative to its surrounding troughs, and can be obtained by calculating the difference or ratio between the peak and its adjacent troughs. For example, if the number of peaks is 2, the difference between the highest peak and the trough might be calculated as the prominence. Finally, a threshold is set to determine which peaks have sufficiently significant prominence to potentially represent the true B-line. After the above filtering process, the remaining peaks in the first peak set are considered potential B-lines.

[0078] It should be noted that potential B lines, such as Figure 2 As shown, these potential B-lines will be used for subsequent analysis and processing, such as pleural line position correction, screening for attenuated pseudo-B-lines, and classifying fused B-lines and single B-lines. If the prominence of a peak is less than this set threshold, the peak will be considered insufficiently significant and will therefore be removed from the first set of peaks.

[0079] The method provided in this application provides crucial information for in-depth analysis and diagnosis of lung images by accurately generating initial B-line peak curves and screening potential B-lines. Specifically, cropping the target lung image and generating A-line peak curves ensures the accuracy and specificity of the analysis; neighboring point smoothing further improves data reliability. In screening potential B-lines, detecting peaks and troughs, and then sorting and filtering them, effectively eliminates noise and interference, resulting in more accurate identification. In particular, calculating the prominence of each peak based on the peak set further ensures that the identified B-lines have significant characteristics, thereby improving the accuracy of B-line identification in lung images. This series of processes, through refined processing and analysis, achieves effective extraction of key information from lung images, providing important support for medical diagnosis and treatment.

[0080] Step S13: Correct the initial position using the potential B-line to obtain the corrected pleural line, and remove the attenuated pseudo-B-line based on the corrected pleural line to obtain the target B-line.

[0081] In this embodiment of the application, step S13 includes the following steps B1-B5:

[0082] Step B1: Identify the center location of the potential B line.

[0083] In this embodiment, for each potential B-line, the position of its peak value 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 value corresponds to a specific column index, which can be regarded as the center position of the potential B-line.

[0084] Step B2: Obtain the pre-set vertical search range and the number of horizontal sums.

[0085] In this embodiment, the vertical search range (PleuralTh) is a preset value, representing the number of pixels searched above and below the initial position of the pleural line. The horizontal summation count (XRange) is also a preset value, representing the number of pixels involved when accumulating grayscale values ​​horizontally.

[0086] Step B3: Based on the vertical search range and the number of horizontal sums, perform horizontal sums sequentially from top to bottom from the initial position to obtain multiple sum values.

[0087] In this embodiment, the purpose of this step is to find a more precise location of the pleural line by horizontally accumulating grayscale values ​​within a specified range. Starting from the initial position of the pleural line, horizontal grayscale values ​​are accumulated row by row according to the set vertical search range and the number of horizontal sums. This process is performed within a certain range above and below the initial position to account for possible deviations in the pleural line. A series of sums are obtained, each representing the horizontal grayscale accumulation result at a specific vertical position.

[0088] Step B4: Extract the maximum sum from multiple sums as the corrected pleural line.

[0089] In this embodiment of the application, in order to determine the most accurate position of the pleural line, the maximum value is found from the sum obtained in step B3. The longitudinal position corresponding to the maximum value is the corrected position of the pleural line.

[0090] Step B5: Based on the corrected pleural line, remove the attenuated pseudo-B lines from the potential B lines to obtain the target B line.

[0091] In this embodiment, to remove spurious B-lines caused by sound wave attenuation or other reasons and ensure the accuracy of subsequent analysis, a grayscale attenuation curve for each potential B-line is drawn downwards from the corrected pleural line position. If the grayscale value of a potential B-line attenuates to half or less of its peak value, it is considered an attenuated spurious B-line and is discarded. Finally, the filtered and corrected target B-lines are obtained, which will be used for subsequent analysis and evaluation.

[0092] The method provided in this application precisely corrects the initial pleural line position using potential B-lines, further improving the accuracy of pleural line localization. Based on the corrected position, it effectively eliminates attenuated pseudo-B-lines, resulting in a more accurate target B-line. Specifically, identifying the center position of potential B-lines provides a reference point for subsequent correction; setting the longitudinal search range and the number of horizontal sums makes the search process more scientific and systematic; determining the corrected pleural line through horizontal summation is both simple and efficient; finally, attenuated pseudo-B-lines are eliminated based on the corrected pleural line, significantly improving 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: Evaluate the target line B based on the associated data of the target line B, and obtain the evaluation result.

[0094] In this embodiment of the application, step S14 includes the following steps C1-C7:

[0095] Step C1: Detect the maximum left slope and the maximum right slope of each peak in each B-line of the target B-line.

[0096] In this embodiment, for each target B-line, there will be one or more peaks, which represent the intensity of the ultrasound signal at that location. Each peak needs to be analyzed. For each peak, starting from its left side, the slope (i.e., the rate of change of grayscale value) between adjacent points is calculated step by step. The slope can be obtained by dividing the difference in grayscale value between two adjacent points by the difference in their abscissa. The point where the slope changes from negative to positive or from positive to zero is found, and its slope is recorded as the maximum left slope. This point is usually considered the left boundary of the B-line. Similarly, starting from the right side of the peak, the slope is calculated, and the point where the slope changes from positive to negative or from negative to zero is found. The slope at this point is the maximum right slope, and this point is usually considered the right boundary of the B-line. The calculated left and right slope values, along with their corresponding abscissa positions, are recorded. This 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, in step C1, the slope to the left of each peak of line B has been calculated, and the maximum left slope value has been found. Now, it is necessary to determine the abscissa corresponding to this maximum left slope value, i.e., the first abscissa. This coordinate point typically represents the starting position on the left side of line B. Similarly, in step C1, the slope to the right of each peak of line B has also been calculated, and the maximum right slope value has been found. Next, it is necessary to determine the abscissa corresponding to this maximum right slope value, i.e., the second abscissa. This coordinate point typically represents the ending position on the right side of line B.

[0099] Step C3: Determine the left and right boundaries of each B line based on the first and second abscissas, and calculate the boundary distance between the left and right boundaries.

[0100] In this embodiment, the first abscissa (candidate position of the left boundary) corresponding to the maximum left slope of each B-line peak and the second abscissa (candidate position of the right boundary) corresponding to the maximum right slope have been identified. The exact left and right boundaries of each B-line need to be determined based on these two abscissas. This means that the position of the maximum left slope is considered the left boundary of the B-line, and the position of the maximum right slope is considered the right boundary of the B-line. After determining the left and right boundaries, the distance between these two boundaries also 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 merged B-line). The boundary distance can be calculated by subtracting the first abscissa of the left boundary from the second abscissa of the right boundary.

[0101] Step C4: Determine the B-line type of each B-line in the target B-line based on the boundary distance.

[0102] In this embodiment, 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 typically appear as thin, 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, a fused B-line is a broad, bright band formed by multiple closely spaced B-lines, which typically appear as a wide, bright area on an ultrasound image. The classification results for each B-line are recorded, which will be used for subsequent evaluation and analysis.

[0103] Step C5: Determine the rib gap indicator contour area based on the gray values ​​between each B line in the target B line.

[0104] In this embodiment, intercostal spaces are the gaps between ribs. These gaps typically appear as areas with low grayscale values ​​(i.e., relatively dark) on ultrasound images because they are primarily composed of soft tissue and muscle, contrasting with the brightness of the ribs and pleura. After identifying the target B-lines, it is necessary to analyze the regions between these B-lines, paying particular attention to variations in grayscale values. This typically involves image processing techniques, such as thresholding or edge detection, to differentiate between different tissue types. By analyzing the grayscale values, it is possible to determine which pixels or regions are most likely to represent the intercostal spaces. These regions will serve as intercostal space indicator contour areas for subsequent calculations and evaluations. The determination of the intercostal space indicator contour areas is used to subsequently calculate the percentage of the B-line region within the intercostal space indicator contour area.

[0105] Step C6: Calculate the percentage of the area where the target B line is located in the rib gap indicator contour area, and the distance between each B line.

[0106] In this embodiment, the above steps have identified the portion with the lowest grayscale value between B lines as the rib gap indicator contour. Next, it is necessary to calculate the ratio of the area occupied by the target B line (i.e., the filtered and confirmed true B line) to the rib gap indicator contour area. This involves statistically analyzing the pixel area covered by the B line and comparing it with the total number of pixels in the rib gap indicator contour area. The formula for calculating the ratio can be:

[0107] (Pixel area covered by line B / Total number of pixels in the rib gap indicator contour area) * 100%.

[0108] This ratio helps assess the density of B lines and the severity of pulmonary edema.

[0109] In this embodiment, in addition to calculating the percentage, it is also necessary to measure the distance between each B-line, i.e., 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 crucial for assessing lung condition, especially when it is necessary to differentiate between different types of pulmonary edema (such as 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 use this data to assess the patient's lung condition and develop appropriate treatment plans.

[0110] Step C7: Based on the percentage, B-line spacing, and B-line type, evaluate the target B-line to obtain the evaluation result.

[0111] In this embodiment, firstly, a series of assessment criteria are 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); 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 assessment 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 2 mm and multiple lines appear, it may indicate alveolar edema; the appearance of fused B-lines may also be associated with specific pathological conditions. Thirdly, based on the above comparisons, an assessment result is obtained. This result may be a score, a grade, or a descriptive text used to describe the patient's lung condition. For example, the system may give a score of 0 to 3 based on the LUS (Lung Ultrasound Scoring) standard, or describe it as "mild pulmonary edema," "moderate interstitial pulmonary edema," etc. Finally, the assessment results are output and recorded in the patient's medical records for the doctor's reference and further diagnosis. These results can also serve as a basis for treatment plans or to monitor changes in the patient's condition.

[0112] The method provided in this application offers a comprehensive and accurate B-line assessment result through in-depth analysis of various related data of the target B-line. Specifically, it detects the maximum left and right slope values ​​of each peak, providing an accurate basis for subsequently determining the B-line boundary; identifies the horizontal coordinate corresponding to the maximum slope value, ensuring the accuracy of boundary positioning; calculates the boundary distance, further clarifying the physical size of the B-line; determines the B-line type based on the boundary distance, helping to understand the characteristics of the B-line in more detail; determines the intercostal space indicator contour area, providing a reference for assessing the distribution of the B-line in lung images; calculates the percentage proportion and B-line spacing, quantifying the coverage and distribution density of the B-line in the image; finally, it comprehensively evaluates the target B-line based on multiple indicators, yielding an assessment result that fully reflects the state of the B-line. This series of refined analytical steps not only improves the accuracy of B-line assessment but also provides doctors with more detailed diagnostic information, contributing to improving the diagnosis and treatment of lung diseases.

[0113] This embodiment also provides a lung B-line identification device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described previously. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0114] This embodiment provides a device for identifying B-line pulmonary lines, such as... Figure 4 As shown, it includes:

[0115] The recognition module 41 is used to identify the pleural line based on the target lung image to obtain the initial position of the pleural line;

[0116] The filtering module 42 is used to generate an initial B-line peak curve based on the initial position and to filter out potential B-lines from multiple B-line peaks of the initial B-line peak curve.

[0117] The correction module 43 is used to correct the initial position using the potential B-line to obtain the corrected pleural line, and to remove the attenuated pseudo-B-line based on the corrected pleural line to obtain the target B-line.

[0118] Evaluation module 44 is used to evaluate the target line B based on the associated data of the target line B and obtain the evaluation result.

[0119] In an optional embodiment of this application, the recognition 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, the pixel gray values ​​are accumulated row by row; when the pixel gray values ​​are accumulated to the 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 this application, the filtering module 42 is used to crop the target lung image downward from the initial position of the pleural line to obtain the cropped target lung image; to accumulate the pixel gray values ​​column by column based on the cropped target lung image to obtain an initial peak curve; and to perform neighboring point smoothing processing on the initial peak curve to obtain the B-line peak curve.

[0121] In an optional embodiment of this application, the filtering module 42 is used to detect the peak values ​​and valley values ​​in the B-line peak curve; sort the peak values ​​and valley values ​​in descending order to obtain a sorting result; filter the peak values ​​in the B-line peak curve based on the sorting result to obtain a first peak set; and generate the corresponding potential B-line based on the first peak set.

[0122] In an optional embodiment of this 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, the prominence of each peak is calculated; and peaks in the first peak set whose prominence is less than a set threshold are removed to obtain potential B lines.

[0123] In an optional embodiment of this application, the correction module 43 is used to identify the center position of the potential B-line; obtain a pre-set longitudinal search range and a number of horizontal sums; based on the longitudinal search range and the number of horizontal sums, perform horizontal sums sequentially from top to bottom from the initial position to obtain multiple sums; extract the maximum sum among the multiple sums as the corrected pleural line; and based on the corrected pleural line, remove the attenuated pseudo-B-lines from the potential B-lines to obtain the target B-line.

[0124] In an optional embodiment of this 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 abscissa corresponding to the maximum left slope and the second abscissa corresponding to the maximum right slope; determine the left and right boundaries of each B-line based on the first and second abscissas, 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 rib gap indicator contour area based on the gray values ​​between each B-line in the target B-line; calculate the percentage of the area where the target B-line is located in the rib gap indicator contour area, and the B-line spacing between each B-line; evaluate the target B-line based on the percentage, B-line spacing, and B-line type to obtain the evaluation result.

[0125] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in 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 the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).

[0126] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0127] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0128] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0129] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0130] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0131] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0132] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for identifying B-line in the lungs, characterized in that, The method includes: Based on the target lung image, the pleural line is identified to obtain the initial position of the pleural line; An initial B-line peak curve is generated based on the initial position, and potential B-lines are selected from multiple B-line peaks of the initial B-line peak curve. The initial position is corrected using the potential B-line to obtain the corrected pleural line, and the attenuated pseudo-B-line is removed based on the corrected pleural line to obtain the target B-line. The target line B is evaluated based on the associated data, and the evaluation result is obtained. The step of 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: identifying the center position of the potential B-line; obtaining a pre-set vertical search range and a number of horizontal sums; performing horizontal sums sequentially from top to bottom from the initial position based on the vertical search range and the number of horizontal sums to obtain multiple sums; extracting the maximum sum among the multiple sums as the corrected pleural line; and removing attenuated pseudo-B-lines from the potential B-line based on the corrected pleural line to obtain the target B-line.

2. The method according to claim 1, 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: Obtain the initial near-field threshold; From the initial near-field threshold to the preset height of the target lung image, the pixel grayscale values ​​are accumulated row by row. When the pixel grayscale values ​​are accumulated to the maximum value, the horizontal coordinate corresponding to the maximum value is taken as the initial position of the pleural line.

3. The method according to claim 1, characterized in that, The step of generating the initial B-line peak curve based on the initial position includes: The target lung image is cropped downwards from the initial position of the pleural line to obtain the cropped target lung image; The initial peak curve is obtained by accumulating the pixel gray values ​​column by column based on the cropped target lung image; The initial peak curve is smoothed by neighboring points to obtain the B-line peak curve.

4. The method according to claim 1, characterized in that, The step of screening potential B-lines from multiple B-line peaks of the initial B-line peak curve includes: Detect the peak value and valley value in the B-line peak curve; The peak values ​​and valley values ​​are sorted in descending order to obtain the sorting results; Based on the sorting results, the peak values ​​in the B-line peak curve are filtered to obtain the first set of peak values; The corresponding potential B-line is generated based on the first set of peaks.

5. The method according to claim 4, characterized in that, The step of generating the corresponding potential B-line based on the first set of peak values ​​includes... Detect the number of peaks in the first set of peaks; When the number of peaks is a specified number, the prominence of each peak is calculated; Peaks with a prominence less than a set threshold in the first set of peaks are removed to obtain potential B-lines.

6. The method according to claim 1, characterized in that, The step of evaluating the target line B based on the associated data of the target line B to obtain the evaluation result includes: 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; The left and right boundaries of each B line are determined based on the first and second abscissas, and the boundary distance between the left and right boundaries is calculated. The B-line type of each B-line in the target B-line is determined based on the boundary distance; The rib gap indicator contour area is determined based on the gray values ​​between each B line in the target B line; Calculate the percentage of the area where the target B line is located relative to the interrib gap indicator contour area, and the spacing between each B line; Based on the percentage ratio, the B-line spacing, and the B-line type, the target B-line is evaluated to obtain the evaluation result.

7. A device for identifying lung B-lines, characterized in that, The device includes: The recognition module is used to identify the pleural line based on the target lung image to obtain the initial position of the pleural line; The filtering module is used to generate an initial B-line peak curve based on the initial position, and to filter out potential B-lines from multiple B-line peaks of the initial B-line peak curve. The correction module is used to correct the initial position using the potential B-line to obtain a corrected pleural line, and to remove the attenuated pseudo-B-line based on the corrected pleural line to obtain the target B-line. The evaluation module is used to evaluate the target B line based on the associated data of the target B line and obtain the evaluation result; The correction module is specifically used to identify the center position of the potential B-line; obtain a pre-set longitudinal search range and a number of horizontal sums; based on the longitudinal search range and the number of horizontal sums, perform horizontal sums sequentially from top to bottom from the initial position to obtain multiple sums; extract the maximum sum among the multiple sums as the corrected pleural line; and based on the corrected pleural line, remove attenuated pseudo-B-lines from the potential B-lines to obtain the target B-line.

8. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 6.

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