A pleural line recognition method and system based on lung ultrasound
Through the pleural line recognition method based on lung ultrasound, grayscale and binarization processing combined with connectivity domain analysis, the problems of inefficiency and misidentification in traditional methods are solved, and more efficient and accurate pleural line recognition is achieved.
Patent Information
- Application Number
- CN202111407118.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-11-24
AI Technical Summary
In the prior art, pleural line detection and recognition mainly rely on traditional doctor judgment and visual ultrasound examination, and there are problems such as inefficiency, easy to misidentify and difficult to quantitatively evaluate.
Using the pleural line recognition method based on lung ultrasound, the ultrasound video of the lung area is obtained, and multiple frame images are selected for grayscale and binarization processing. Combined with the connection domain analysis and threshold adjustment, the pleural line area is identified and fused, and the determination rules for the binarization threshold Y are designed to adapt to ultrasound images of different degrees of light and darkness.
It improves the accuracy and efficiency of pleural line recognition, reduces the impact of position floating caused by lung sliding, and is suitable for ultrasound images of various light and dark degrees, with higher universality and automation.
Smart Images

Figure CN114187241B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pleural line recognition, and in particular to a pleural line recognition method and system based on lung ultrasound. Background Art
[0002] The pleura is a thin and smooth serous membrane lining the inner surface of the chest wall and the surface of the lungs. In ultrasound testing, the strong echo reflection formed by the difference in acoustic impedance between the pleura and the lung surface appears as a smooth, clear, regular linear strong echo under ultrasound, which is called the pleural line. During normal respiratory movement, the visceral pleura and the parietal pleura will have relative movement. At this time, a horizontal sliding feeling can be observed from the pleural line, which is called the pleural sliding sign.
[0003] The pleural line plays an important role in lung ultrasound. It is not only the interface between the chest wall and the lungs, but also is related to the diagnosis of many lung diseases, such as pneumothorax, pulmonary consolidation and pleural effusion. Ultrasound diagnosis of lung diseases using the pleural line is applicable to various medical environments, including emergency medicine, respiratory care, surgery, interventional radiology, critical care and anesthesia. In addition, the pleural line and the lung sliding observed from the pleural line are the basis of lung ultrasound.
[0004] The existing technologies for pleural line detection and identification mainly rely on traditional physician judgment and visual ultrasound examination. These technologies have many shortcomings, such as low efficiency, easy misidentification of the pleural line, and difficulty in quantitatively evaluating the pleura. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a pleural line identification method and system based on lung ultrasound.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A pleural line identification method based on lung ultrasound comprises the following steps:
[0008] S1, obtaining an ultrasound video of the lung area, and selecting k frames of ultrasound images in the ultrasound video, where k>1;
[0009] S2, performing grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image;
[0010] S3, performing binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and performing a pleural line positioning operation on each binarized image;
[0011] S4. After the pleural line positioning operation is completed, the k binary images are fused to obtain a fused image, and a global pleural line positioning operation is performed on the fused image to obtain the pleural line region of the lung region in the fused image.
[0012] Furthermore, in step S2, the ultrasound image is grayed based on brightness:
[0013] Gray=W R ×R+W G ×G+W B ×B
[0014] Among them, W R , W G , W B It is the preset weight value, Gray represents the gray value after grayscale processing, and R, G, and B represent the RGB channels of the pixel before grayscale processing.
[0015] Further, step S3 includes the following steps:
[0016] S31, obtaining a grayscale image, where the total number of pixels in the grayscale image is N, counting the number n of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and setting a threshold Y according to the size of n;
[0017]
[0018] S32, binarizing the grayscale image according to a threshold value Y, setting the grayscale of pixels whose grayscale values are greater than Y to a grayscale maximum value of 1, and setting the grayscale of pixels whose grayscale values are less than Y to a grayscale minimum value of 0, to obtain a binary image;
[0019] S33, combining pixels with a gray value of 1 to form a connected domain, obtaining the total number of pixels of each connected domain, and deleting the connected domain with a total number of pixels less than 500;
[0020] S34, obtaining the area of the minimum adjacent rectangle of each remaining connected domain, and deleting the connected domain whose minimum adjacent rectangle area is less than 300;
[0021] S35, combining the pixel points with a gray value of 1 again to form a connected domain, obtaining the number of pixels in each connected domain, retaining the connected domain with the largest number of pixels as the preliminary pleural line region, and deleting other connected domains;
[0022] S36. If the number of pixels in the preliminary pleural line area is less than 800, Y is reduced by 20 and step S32 is executed; otherwise, the pleural line positioning operation is completed.
[0023] Furthermore, the fused image obtained in step S4 is specifically:
[0024] The gray values of pixels at the same position in the k binary images are added to obtain a preliminary fused image, and then the gray values of pixels with gray values greater than or equal to 1 in the preliminary fused image are set to 1 to obtain a fused image.
[0025] Furthermore, in step S4, the global pleural line positioning operation is performed on the fused image as follows:
[0026] The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted;
[0027] The length l and width of the fused pleural line region are obtained, the length L and width of the fused image are obtained, and the fused pleural line region is extended until its length l is equal to the length L of the fused image, thereby obtaining the pleural line region of the lung region.
[0028] A pleural line recognition system based on lung ultrasound, comprising:
[0029] An image acquisition module is used to acquire an ultrasound video of a lung region and select k frames of ultrasound images from the ultrasound video, where k>1;
[0030] An image preprocessing module is used to perform grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image;
[0031] A single image processing module is used to perform binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and perform a pleural line positioning operation on each binarized image;
[0032] The image fusion module is used to fuse k binary images after the pleural line positioning operation to obtain a fused image, perform a global pleural line positioning operation on the fused image, and obtain the pleural line area of the lung area in the fused image.
[0033] Furthermore, the image preprocessing module performs grayscale processing on the ultrasound image based on brightness:
[0034] Gray=W R ×R+W G ×G+W B ×B
[0035] Among them, W R , W G , W B It is the preset weight value, Gray represents the gray value after grayscale processing, and R, G, and B represent the RGB channels of the pixel before grayscale processing.
[0036] Furthermore, the workflow of the single image processing module is as follows:
[0037] A1. Obtain a grayscale image, where the total number of pixels in the grayscale image is N, count the number n of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and set a threshold value Y according to the size of n;
[0038]
[0039] A2. Binarize the grayscale image according to the threshold value Y, set the grayscale of the pixels whose grayscale value is greater than Y to the grayscale maximum value 1, and set the grayscale of the pixels whose grayscale value is less than Y to the grayscale minimum value 0, to obtain a binary image;
[0040] A3, combining pixels with a gray value of 1 to form connected domains, obtaining the total number of pixels in each connected domain, and deleting connected domains with a total number of pixels less than 500;
[0041] A4. Obtain the area of the minimum adjacent rectangle of each remaining connected domain, and delete the connected domain whose minimum adjacent rectangle area is less than 300;
[0042] A5. Pixels with a gray value of 1 are combined again to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is retained as the preliminary pleural line region, and other connected domains are deleted;
[0043] A6. If the number of pixels in the preliminary pleural line area is less than 800, Y is reduced by 20 and step A2 is executed; otherwise, the pleural line positioning operation is completed.
[0044] Furthermore, the image fusion module obtains the fused image as follows:
[0045] The gray values of pixels at the same position in the k binary images are added to obtain a preliminary fused image, and then the gray values of pixels with gray values greater than or equal to 1 in the preliminary fused image are set to 1 to obtain a fused image.
[0046] Furthermore, the image fusion module performs the global pleural line positioning operation on the fused image as follows:
[0047] The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted;
[0048] The length l and width of the fused pleural line region are obtained, the length L and width of the fused image are obtained, and the fused pleural line region is extended until its length l is equal to the length L of the fused image, thereby obtaining the pleural line region of the lung region.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] (1) In lung ultrasound, there is relative lung sliding, which may make the pleural line part unclear. The present application first identifies the pleural line area on each ultrasound image separately, and then fuses the pleural line areas on multiple ultrasound images to identify the fused pleural line area, and obtains the pleural line area of the lung area by extending the image. The present application identifies the pleural line area of multiple images separately and then overlaps them, which can more completely identify the pleural line area of the video, and also reduces the impact of the floating position of the pleural line caused by lung sliding.
[0051] (2) A rule for determining the binarization threshold Y is designed. Considering that when collecting ultrasound videos, the brightness of the collected ultrasound videos may be relatively different due to different situations and instruments. In addition, because the pleural line is always a linear strong echo, that is, a highlight area, in the ultrasound video, the present application determines the threshold Y in a step-by-step manner according to the proportion of pixels with grayscale values greater than or equal to 100. This can play a role in screening the entire image. At the same time, it is also applicable to ultrasound images with different brightness levels, and is more universal.
[0052] (3) When identifying the pleural line region on a single ultrasound image, the noise is first preliminarily removed based on the number of pixels in the connected domain, and then further removed based on the area of the minimum adjacent rectangle of the connected domain, which can reduce the interference of noise. The connected domain is then re-annotated, and the connected domain with the largest number of pixels is found as the preliminary pleural line region. The preliminary pleural line region is also judged. If the number of pixels is too small, it means that the average gray value at the pleural line position in the secondary image is lower than the set binarization threshold and cannot be well identified. Therefore, the binarization threshold is lowered, and noise removal and pleural line positioning are performed again. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Flow chart of the pleural line identification method;
[0054] Figure 2 It is the result of grayscale processing of an arbitrary frame of image in the ultrasound video;
[0055] Figure 3 The results of grayscale and binarization processing of the 5 selected ultrasound images;
[0056] Figure 4 The results of removing the connected domains with a total number of pixels less than 500 from the selected 5 ultrasound images;
[0057] Figure 5 Results after completing the pleural line localization operation for the 5 selected ultrasound images;
[0058] Figure 6 is a schematic diagram of the fused image;
[0059] Figure 7The grayscale result of an arbitrary frame of the ultrasound video is compared with the pleural line area of the lung area in the fused image. DETAILED DESCRIPTION
[0060] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0061] In the drawings, components with the same structure are indicated by the same numerical labels, and components with similar structures or functions are indicated by similar numerical labels. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, some parts in the drawings are appropriately exaggerated.
[0062] Embodiment 1:
[0063] A pleural line identification method based on lung ultrasound comprises the following steps:
[0064] S1, obtaining an ultrasound video of the lung area, and selecting k frames of ultrasound images in the ultrasound video, where k>1;
[0065] During diagnosis, an ultrasound instrument is used to collect raw video data, which is then preprocessed to remove irrelevant images and fragments to obtain an ultrasound video. The main image in the ultrasound video is the lung area. Therefore, the position of the pleural line area in each frame of the ultrasound video is basically the same, with very little change, and is basically within a linear area. Relevant practitioners can understand this and will not repeat it here. For example, in this embodiment, an ultrasound instrument is used to obtain an ultrasound video of the lung area with an ultrasound probe, and it is ensured that there is no large fluctuation of the pleural line in the ultrasound video. All ultrasound videos are edited into videos with a duration of 5 seconds to increase the processing speed.
[0066] In specific implementation, the ultrasound video can be first imported to obtain parameters such as the frame rate and total number of frames of the video, determine the value of k, and randomly or manually select k ultrasound images, such as k=5 in this embodiment. Considering that a single frame in the ultrasound video cannot identify the complete pleural line area, k ultrasound images are selected, and the pleural line is located for each ultrasound image respectively to obtain the pleural line area in each ultrasound image, and then these images are fused to obtain the global pleural line area. In fact, the step of obtaining the ultrasound video can also be skipped, and k ultrasound images that meet the requirements can be directly input.
[0067] S2, performing grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image;
[0068] In step S2, the ultrasound image is grayed based on brightness:
[0069] Gray=W R ×R+W G ×G+W B ×B
[0070] Among them, W R , W G , W B is the preset weight value, Gray represents the gray value after grayscale processing, R, G, B represent the RGB channels of the pixel before grayscale processing, and W R +W G +W B =1, if we can set W R =W G =W B =1 / 3, we can also let W R =0.3,W G =0.59,W B = 0.11, etc. The grayscale ultrasound image of the lung area is as follows Figure 2 shown.
[0071] S3, performing binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and performing a pleural line positioning operation on each binarized image, including the following steps:
[0072] S31, obtaining a grayscale image, the total number of pixels in the grayscale image is N, counting the number n of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and setting a threshold Y according to the size of n;
[0073]
[0074] In this embodiment, each frame of ultrasound image is 648×864, so after simplified calculation, the threshold is determined as:
[0075]
[0076] In traditional image binarization methods, the threshold is generally determined as follows: 1) select the median of 0 and 255, 127, as the threshold; 2) observe the histogram of the grayscale image, where both the foreground and background form peaks, and take the lowest valley between the two peaks as the threshold.
[0077] However, after research, the inventor found that for binarized lung region ultrasound images, due to the different brightness of the ultrasound video to be processed and the different average grayscale values of the pleural line region, the existing threshold determination method is not suitable for pleural line positioning. Therefore, the inventor designed a threshold determination rule, combined with the characteristics of lung region ultrasound images, and determined a grayscale critical value of 100. According to the proportion of pixels with grayscale values greater than or equal to 100 in the entire grayscale image, the binarization threshold is determined in a step-by-step manner. The higher the proportion, the brighter the entire image, the larger the average grayscale value of the pleural line region, and the larger the threshold Y. Such a threshold determination rule can be applied to videos of various brightness levels, better screen the pleural line region, and is more universal.
[0078] S32, binarizing the grayscale image according to the threshold value Y, setting the grayscale of pixels with grayscale values greater than Y to the grayscale maximum value 1, and setting the grayscale of pixels with grayscale values less than Y to the grayscale minimum value 0, to obtain a binary image, in which 0 represents pure black and 1 represents pure white; the ultrasound image of the lung area after binarization is as follows Figure 3 As shown in the figure, the connected domain composed of pixels with a gray value of 1 is a high-brightness connected area in the binary image.
[0079] S33, combine the pixels with gray value 1 to form a connected domain, obtain the total number of pixels in each connected domain, and delete the connected domain with a total number of pixels less than 500; this step preliminarily removes noise, and the effect is as follows: Figure 4 As shown;
[0080] When implementing the code, you can call the bwareaopen function and regionprops function in MATLAB to directly mark the connected domain in the binary image and obtain its centroid coordinates, minimum adjacent rectangle, number of pixels, and length and width of the connected domain.
[0081] In this step, smaller connected domains are directly deleted as noise.
[0082] S34, obtaining the area of the minimum adjacent rectangle of each remaining connected domain, and deleting the connected domain whose minimum adjacent rectangle area is less than 300; this step further removes noise information;
[0083] In this step, the connected domains with smaller areas of the minimum adjacent rectangles are further deleted as noise.
[0084] S35, combining the pixel points with a gray value of 1 again to form a connected domain, obtaining the number of pixels in each connected domain, retaining the connected domain with the largest number of pixels as the preliminary pleural line region, and deleting other connected domains;
[0085] S36, if the number of pixels in the preliminary pleural line area is less than 800, then Y is reduced by 20 and step S32 is executed. Otherwise, the pleural line positioning operation is completed. The effect after the pleural line positioning operation is completed is as follows: Figure 5 As shown;
[0086] In this step, it is determined whether the preliminary pleural line area meets the requirements. If it does not meet the requirements, that is, the number of pixels in the preliminary pleural line area is less than 800, it means that the average grayscale value of the pleural line area in the secondary image is far lower than the set binarization threshold and cannot be well identified. Therefore, Y is reduced and the preliminary pleural line area is relocated. If the reduction of Y is too low, there will still be a situation where the threshold Y is higher than the average grayscale value of the pleural line area. If the reduction of Y is too large, it will cause too many and too scattered high-brightness connected areas to be screened during binarization, which may cause the pleural line area to be divided into multiple connected areas and cannot be accurately identified. Therefore, this application reduces Y by 20.
[0087] S4, fusing the k binary images after the pleural line positioning operation to obtain a fused image, performing a global pleural line positioning operation on the fused image, and obtaining the pleural line region of the lung region in the fused image;
[0088] Among them, the fused image is specifically obtained as follows:
[0089] Add the gray values of pixels at the same position in k binary images to obtain a preliminary fused image. The maximum gray value of the pixels in the preliminary fused image is k and the minimum is 0. Then set the gray value of the pixels with gray values greater than or equal to 1 in the preliminary fused image to 1 to obtain a fused image, such as Figure 6 shown.
[0090] The global pleural line positioning operation on the fused image is specifically as follows:
[0091] The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted;
[0092] The length l and width of the fused pleural line area are obtained, the length L and width of the fused image are obtained, the fused pleural line area is extended until its length l is equal to the length L of the fused image, the pleural line area of the lung area is obtained, and the grayscale processed ultrasound image is compared with the pleural line area of the lung area finally located in the fused image, as shown in FIG. Figure 7 shown.
[0093] In lung ultrasound, there is relative lung sliding, which may cause the pleural line to be partially unclear. The present application first identifies the pleural line area on each ultrasound image separately, then fuses the pleural line areas on multiple ultrasound images to identify the fused pleural line area, and obtains the pleural line area of the lung area by extending the image. By overlapping the pleural line areas of multiple images separately, the pleural line area of the video can be more completely identified, while also reducing the impact of the floating position of the pleural line caused by lung sliding.
[0094] Embodiment 2:
[0095] A pleural line recognition system based on lung ultrasound, comprising:
[0096] An image acquisition module is used to acquire an ultrasound video of a lung region and select k frames of ultrasound images from the ultrasound video, where k>1;
[0097] An image preprocessing module is used to perform grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image;
[0098] A single image processing module is used to perform binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and perform a pleural line positioning operation on each binarized image;
[0099] The image fusion module is used to fuse k binary images after the pleural line positioning operation to obtain a fused image, perform a global pleural line positioning operation on the fused image, and obtain the pleural line area of the lung area in the fused image.
[0100] Among them, the image preprocessing module performs grayscale processing on the ultrasound image based on brightness:
[0101] Gray=W R ×R+W G ×G+W B ×B
[0102] Among them, W R , W G , W B It is the preset weight value, Gray represents the gray value after grayscale processing, and R, G, and B represent the RGB channels of the pixel before grayscale processing.
[0103] Among them, the workflow of the single image processing module is as follows:
[0104] A1. Obtain a grayscale image, the total number of pixels in the grayscale image is N, count the number of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and set a threshold value Y according to the size of n;
[0105]
[0106] A2. Binarize the grayscale image according to the threshold value Y, set the grayscale of the pixels whose grayscale value is greater than Y to the grayscale maximum value 1, and set the grayscale of the pixels whose grayscale value is less than Y to the grayscale minimum value 0, to obtain a binary image;
[0107] A3, combining pixels with a gray value of 1 to form connected domains, obtaining the total number of pixels in each connected domain, and deleting connected domains with a total number of pixels less than 500;
[0108] A4. Obtain the area of the minimum adjacent rectangle of each remaining connected domain, and delete the connected domain whose minimum adjacent rectangle area is less than 300;
[0109] A5. Pixels with a gray value of 1 are combined again to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is retained as the preliminary pleural line region, and other connected domains are deleted;
[0110] A6. If the number of pixels in the preliminary pleural line area is less than 800, Y is reduced by 20 and step A2 is executed; otherwise, the pleural line positioning operation is completed.
[0111] Among them, the image fusion module obtains the fused image specifically as follows:
[0112] The gray values of pixels at the same position in the k binary images are added to obtain a preliminary fused image, and then the gray values of pixels with gray values greater than or equal to 1 in the preliminary fused image are set to 1 to obtain a fused image.
[0113] The image fusion module performs the global pleural line positioning operation on the fused image as follows:
[0114] The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted;
[0115] The length l and width of the fused pleural line region are obtained, the length L and width of the fused image are obtained, and the fused pleural line region is extended until its length l is equal to the length L of the fused image, thereby obtaining the pleural line region of the lung region.
[0116] This application constructs a pleural line recognition system based on lung ultrasound in modules. The modules work together to locate the pleural line area in the ultrasound video. Compared with traditional doctor judgment and visual ultrasound examination, this application is fast, efficient and accurate, which reduces the pressure on medical staff and improves the degree of automation of diagnosis and treatment.
[0117] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A pleural line identification method based on lung ultrasound, characterized in that: The following steps are involved: S1, obtaining an ultrasound video of the lung area, and selecting k frames of ultrasound images in the ultrasound video, where k>1; S2, performing grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image; S3, performing binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and performing a pleural line positioning operation on each binarized image; S4, fusing the k binary images after the pleural line positioning operation to obtain a fused image, performing a global pleural line positioning operation on the fused image, and obtaining the pleural line region of the lung region in the fused image; Step S3 includes the following steps: S31, obtaining a grayscale image, where the total number of pixels in the grayscale image is N, counting the number n of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and setting a threshold Y according to the size of n; S32, binarizing the grayscale image according to a threshold value Y, setting the grayscale of pixels whose grayscale values are greater than Y to a grayscale maximum value of 1, and setting the grayscale of pixels whose grayscale values are less than Y to a grayscale minimum value of 0, to obtain a binary image; S33, combining pixels with a gray value of 1 to form a connected domain, obtaining the total number of pixels of each connected domain, and deleting the connected domain with a total number of pixels less than 500; S34, obtaining the area of the minimum adjacent rectangle of each remaining connected domain, and deleting the connected domain whose minimum adjacent rectangle area is less than 300; S35, combining the pixel points with a gray value of 1 again to form a connected domain, obtaining the number of pixels in each connected domain, retaining the connected domain with the largest number of pixels as the preliminary pleural line region, and deleting other connected domains; S36. If the number of pixels in the preliminary pleural line area is less than 800, Y is reduced by 20 and step S32 is executed; otherwise, the pleural line positioning operation is completed.
2. The pleural line recognition method based on lung ultrasound according to claim 1, characterized in that: In step S2, the ultrasound image is grayed based on brightness: Gray=W R ×R+W G ×G+W B ×B Among them, W R , W G , W B It is the preset weight value, Gray represents the gray value after grayscale processing, and R, G, and B represent the RGB channels of the pixel before grayscale processing.
3. The pleural line identification method based on lung ultrasound according to claim 1, characterized in that: The fused image obtained in step S4 is specifically: The gray values of pixels at the same position in the k binary images are added to obtain a preliminary fused image, and then the gray values of pixels with gray values greater than or equal to 1 in the preliminary fused image are set to 1 to obtain a fused image.
4. The pleural line recognition method based on lung ultrasound according to claim 3, characterized in that: In step S4, the global pleural line positioning operation is performed on the fused image as follows: The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted; The length l and width of the fused pleural line region are obtained, the length L and width of the fused image are obtained, and the fused pleural line region is extended until its length l is equal to the length L of the fused image, thereby obtaining the pleural line region of the lung region.
5. A pleural line recognition system based on lung ultrasound, characterized in that: Based on the pleural line recognition method according to any one of claims 1 to 4, comprising: An image acquisition module is used to acquire an ultrasound video of a lung region and select k frames of ultrasound images from the ultrasound video, where k>1; An image preprocessing module is used to perform grayscale processing on each ultrasonic image to obtain a grayscale image of each ultrasonic image; A single image processing module is used to perform binarization processing on each grayscale image to obtain a binarized image of each ultrasound image, and perform a pleural line positioning operation on each binarized image; The image fusion module is used to fuse k binary images after the pleural line positioning operation to obtain a fused image, perform a global pleural line positioning operation on the fused image, and obtain the pleural line area of the lung area in the fused image.
6. The pleural line recognition system based on lung ultrasound according to claim 5, characterized in that: The image preprocessing module performs grayscale processing on the ultrasound image based on brightness: Gray=W R ×R+W G ×G+W B ×B Among them, W R , W G , W B It is the preset weight value, Gray represents the gray value after grayscale processing, and R, G, and B represent the RGB channels of the pixel before grayscale processing.
7. The pleural line recognition system based on lung ultrasound according to claim 5, characterized in that: The workflow of the single image processing module is as follows: A1. Obtain a grayscale image, where the total number of pixels in the grayscale image is N, count the number n of pixels in the grayscale image whose grayscale values are greater than or equal to 100, and set a threshold value Y according to the size of n; A2. Binarize the grayscale image according to the threshold value Y, set the grayscale of the pixels whose grayscale value is greater than Y to the grayscale maximum value 1, and set the grayscale of the pixels whose grayscale value is less than Y to the grayscale minimum value 0, to obtain a binary image; A3, combining pixels with a gray value of 1 to form connected domains, obtaining the total number of pixels in each connected domain, and deleting connected domains with a total number of pixels less than 500; A4. Obtain the area of the minimum adjacent rectangle of each remaining connected domain, and delete the connected domain whose minimum adjacent rectangle area is less than 300; A5. Pixels with a gray value of 1 are combined again to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is retained as the preliminary pleural line region, and other connected domains are deleted; A6. If the number of pixels in the preliminary pleural line area is less than 800, Y is reduced by 20 and step A2 is executed; otherwise, the pleural line positioning operation is completed.
8. The pleural line recognition system based on lung ultrasound according to claim 5, characterized in that: The image fusion module obtains the fused image as follows: The gray values of pixels at the same position in the k binary images are added to obtain a preliminary fused image, and then the gray values of pixels with gray values greater than or equal to 1 in the preliminary fused image are set to 1 to obtain a fused image.
9. The pleural line recognition system based on lung ultrasound according to claim 5, characterized in that: The image fusion module performs the global pleural line positioning operation on the fused image as follows: The pixels with gray value of 1 in the fused image are combined to form a connected domain, the number of pixels in each connected domain is obtained, the connected domain with the largest number of pixels is used as the fused pleural line area, and other connected domains are deleted; The length l and width of the fused pleural line region are obtained, the length L and width of the fused image are obtained, and the fused pleural line region is extended until its length l is equal to the length L of the fused image, thereby obtaining the pleural line region of the lung region.