A liver ultrasound image working area extraction method, system and electronic equipment

By performing grayscale conversion, dynamic threshold binarization, noise reduction and morphological operations on the ultrasound image, combined with connected domain screening and contour fitting, the efficient and accurate extraction of the working area of ​​the liver ultrasound image is achieved, solving the problems in the existing technology. Interference and inefficiency issues.

CN115546232BActive Publication Date: 2024-08-27TEND.AI MEDICAL TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211244801.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2024-08-27
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

It is difficult to effectively remove the interference of ultrasound machine software operating interface, ruler and other image information in ultrasound image processing with the existing technology, resulting in low efficiency of liver ultrasound image analysis. Moreover, the manual rectangular frame method is inefficient and it is difficult to accurately extract the approximate sector-shaped working area.

Method used

By converting the ultrasound image into a grayscale image, determining the dynamic threshold for binarization processing, combining noise reduction, erosion and expansion operations, using connected domain search and contour scanning algorithms, screening the best connected domain, and using convex polygon fitting to complete Detection area to achieve accurate extraction of the liver ultrasound image working area.

Benefits of technology

It improves the reliability and efficiency of liver ultrasound image area extraction, can process a large number of images in a short time, reduces human resource consumption, accurately extracts sector-shaped working areas, and reduces the impact of interference information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115546232B
    Figure CN115546232B
Patent Text Reader

Abstract

The present invention relates to a method, system and electronic device for extracting a liver ultrasound image working area. After converting a liver ultrasound image to be extracted into a grayscale image, the present invention converts the grayscale image into a binary image based on a determined dynamic threshold, and then performs noise reduction, multiple corrosion and expansion operations on the binary image, which can ensure the accuracy of image processing. Then, after obtaining the outer contour edge based on the determined optimal connected domain, the detection area of ​​the liver ultrasound image to be extracted is obtained based on the outer contour edge. Finally, the detection area is filled using convex polygon fitting, and the filled detection area is smoothed to obtain the liver ultrasound image working area, so as to improve the efficiency of liver ultrasound image area extraction while improving the reliability of liver ultrasound image area extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, system and electronic equipment for extracting a working area of ​​a liver ultrasonic image. Background Art

[0002] Ultrasound imaging technology has the advantages of being dynamic, non-invasive, and low-cost, and is the preferred examination method for many liver diseases. Grayscale ultrasound imaging can reveal changes in liver morphology and tissue texture, while Doppler color ultrasound can present local blood flow changes in the liver, providing important information for the diagnosis of cirrhosis and liver tumors. In recent years, with the popularization of ultrasound examinations, the workload of professional ultrasound doctors in analyzing ultrasound images has continued to increase. In order to meet the growing demand for ultrasound image analysis, a variety of computer ultrasound image-assisted analysis and auxiliary diagnosis programs have emerged. It is crucial to quickly preprocess the original ultrasound images and increase the efficiency and accuracy of the analysis software.

[0003] Generally, ultrasound images exported by ultrasound machines, in addition to the actual ultrasound image working area, also include the ultrasound machine software operating interface, ultrasound image acquisition parameters, scales and other image information. Existing image processing technologies such as filtering, Fourier transform, and deep learning require processing and calculation of the entire input image. This information outside the ultrasound working area will cause unnecessary interference to ultrasound image analysis and increase the storage and computing resources required for subsequent processing. As a primary solution, image analysts often manually select rectangular boxes to intercept the analysis range, but such manual operations are inefficient and require a lot of human resources when facing large-scale data. In addition, the imaging range of the probe used for liver ultrasound is generally a fan-shaped working area. Simply using a rectangular box to extract information will inevitably include a lot of interference information outside the working area. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a method, system and electronic equipment for extracting a working area of ​​a liver ultrasound image.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A method for extracting a working area of ​​a liver ultrasound image, comprising:

[0007] Acquiring a liver ultrasound image to be extracted, and converting the liver ultrasound image to be extracted into a grayscale image;

[0008] Determine the intensity value of each pixel in the grayscale image, and obtain a histogram by performing statistics on the intensity values;

[0009] Dividing the histogram into intervals, and determining a dynamic threshold based on the intensity value with the largest number of samples in the first n intervals;

[0010] Binarizing the grayscale image based on the dynamic threshold to obtain a binary image;

[0011] Performing noise reduction processing on the binary image to obtain a binary image after noise reduction;

[0012] Performing multiple erosion operations and dilation operations on the binary image after denoising;

[0013] The connected domain search method is used to determine the connected domain of the image after the erosion and dilation operations;

[0014] Screening the connected domain to obtain the best connected domain;

[0015] Based on the optimal connected domain, a contour scanning algorithm is used to determine the outer contour edge;

[0016] Obtaining a detection area of ​​the liver ultrasound image to be extracted based on the outer contour edge;

[0017] The detection area is completed using convex polygon fitting, and the completed detection area is smoothed to obtain a liver ultrasound image working area.

[0018] Preferably, formula I is used Gray =t R I Red +t G I Green +t B I Blue determining an intensity value of each pixel in the grayscale image;

[0019] Among them, I Gray is the intensity value of the pixel in the grayscale image, I Red is the intensity value of the pixel in the red channel, I Green is the intensity value of the pixel in the green channel, I Blue is the intensity value of the pixel in the blue channel, {t R ,t G ,t B} is the preset red, green and blue channel color conversion coefficient.

[0020] Preferably, the histogram is divided into intervals with 5 intensity values ​​as one interval.

[0021] Preferably, the dynamic threshold is t BI :

[0022] t BI =I max (bin) +1,(0≤bin≤20)

[0023] Among them, I max(bin) is the intensity value with the largest number of samples in the first n intervals, and bin is the histogram interval.

[0024] Preferably, a median filter is used to perform noise reduction processing on the binarized image to obtain a denoised binarized image.

[0025] Preferably, the denoised binary image is subjected to multiple erosion operations and dilation operations, specifically including:

[0026] Using a convolution template to perform an erosion operation on the binary image after denoising;

[0027] A convolution template is used to perform an expansion operation on the binary image after the corrosion operation; the convolution template is a 3×3 square convolution kernel.

[0028] Preferably, the step of using a convolution template to perform an erosion operation on the denoised binary image specifically includes:

[0029] Taking a pixel point in the binary image after denoising as a first center point, selecting 8 pixel points adjacent to the first center point as adjacent points to construct a 3×3 area;

[0030] Use the convolution template to perform a single scan on the pixels in the 3×3 area, and if there are pixels with a value of 0 in the 3×3 area, set the value of the first center point to 0;

[0031] Use the convolution mask to dilate the binary image after the corrosion operation, including:

[0032] Taking a certain pixel point in the binary image after the corrosion operation as a second center point, selecting 8 pixel points adjacent to the second center point as adjacent points to construct a 3×3 area;

[0033] The convolution template is used to perform a single scan on the pixels in the 3×3 area. If there are pixels with a value of 1 in the 3×3 area, the value of the second center point is set to 1.

[0034] Preferably, screening the connected domain to obtain the best connected domain specifically includes:

[0035] Arrange the connected domains in the connected domain in descending order according to their areas, and select the first three connected domains after the arrangement as the middle connected domains;

[0036] Screening out edge connected domains in the intermediate connected domains; the edge connected domains are connected domains whose vertices and center points are both at a preset distance from the edge of the image;

[0037] Forming an image mask according to the intermediate connected domain, and extracting the original image under the image mask area;

[0038] Determining an average intensity value of the original image;

[0039] Determine the connected domain corresponding to the original image in which the average intensity value in the intermediate connected domain is less than a preset value as a low signal connected domain;

[0040] Screening low-signal connected domains in the intermediate connected domains;

[0041] The remaining connected domains in the intermediate connected domains are used as the optimal connected domains.

[0042] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0043] The liver ultrasound image working area extraction method provided by the present invention converts the liver ultrasound image to be extracted into a grayscale image, converts the grayscale image into a binary image based on a determined dynamic threshold, and then performs noise reduction, multiple corrosion and expansion operations on the binary image, so as to ensure the accuracy of image processing. Then, after obtaining the outer contour edge based on the determined optimal connected domain, the detection area of ​​the liver ultrasound image to be extracted is obtained based on the outer contour edge. Finally, the detection area is filled by using convex polygon fitting, and the filled detection area is smoothed to obtain the liver ultrasound image working area, so as to improve the extraction reliability of the liver ultrasound image area and improve the extraction efficiency of the liver ultrasound image area.

[0044] Corresponding to the above-mentioned liver ultrasound image working area extraction method, the present invention also provides the following implementation system:

[0045] One of them is a liver ultrasound image working area extraction system, which includes:

[0046] A grayscale image conversion module, used for acquiring a liver ultrasound image to be extracted, and converting the liver ultrasound image to be extracted into a grayscale image;

[0047] A histogram statistics module, used to determine the intensity value of each pixel in the grayscale image, and obtain a histogram by performing statistics on the intensity values;

[0048] A dynamic threshold determination module, used to divide the histogram into intervals and determine a dynamic threshold based on the intensity value with the largest number of samples in the first n intervals;

[0049] A binarization processing module, used for performing binarization processing on the grayscale image based on the dynamic threshold to obtain a binarized image;

[0050] A noise reduction processing module, used for performing noise reduction processing on the binary image to obtain a binary image after noise reduction;

[0051] An erosion and dilation module, used for performing multiple erosion and dilation operations on the binary image after denoising;

[0052] A connected domain search module, used for determining the connected domain of the image after the erosion operation and the dilation operation by using a connected domain search method;

[0053] An optimal connected domain determination module, used for screening the connected domains to obtain the optimal connected domain;

[0054] An edge line determination module, used to determine the outer contour edge by using a contour scanning algorithm based on the optimal connected domain;

[0055] A detection area determination module, used for obtaining the detection area of ​​the liver ultrasound image to be extracted based on the outer contour edge;

[0056] The working area extraction module is used to fill the detection area with convex polygon fitting and to smooth the filled detection area to obtain the working area of ​​the liver ultrasound image.

[0057] Another is an electronic device, which includes: a memory and a processor;

[0058] The memory is used to store logic instructions; the logic instructions are used to implement the liver ultrasound image working area extraction method according to any one of claims 1 to 8;

[0059] The processor is used to call and execute the logic instructions.

[0060] Since the two implementation systems provided by the present invention achieve the same technical effects as the above-mentioned liver ultrasound image working area extraction method, they will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0062] Figure 1 A flow chart of the method for extracting the working area of ​​a liver ultrasound image provided by the present invention;

[0063] Figure 2 A schematic diagram of the manual division of various regions of a liver ultrasound image provided by an embodiment of the present invention;

[0064] Figure 3 An ultrasonic image grayscale image provided by an embodiment of the present invention;

[0065] Figure 4 A schematic diagram of dynamic threshold determination provided by an embodiment of the present invention;

[0066] Figure 5 A schematic diagram of a binary image of an ultrasound image provided by an embodiment of the present invention;

[0067] Figure 6 A schematic diagram of a binarized image after median filtering provided by an embodiment of the present invention;

[0068] Figure 7 A schematic diagram of an image after corrosion and expansion operations provided by an embodiment of the present invention;

[0069] Figure 8 A schematic diagram of the best connected domain retained after the connected domain screening provided by the embodiment of the present invention;

[0070] Fig. 9 A schematic diagram of an outer contour edge provided by an embodiment of the present invention;

[0071] Fig.10 A schematic diagram of a liver ultrasound image working area provided by an embodiment of the present invention;

[0072] Fig.11 A schematic diagram of a working area of ​​a liver ultrasound image obtained by extraction according to an embodiment of the present invention;

[0073] Fig.12 A schematic diagram of an anti-interference case 1 provided by an embodiment of the present invention; wherein, Fig.12 Part (a) is an example of the original ultrasound image of the liver in the anti-interference case 1; Fig.12 Part (b) is a schematic diagram of the image after binarization in the anti-interference case 1; Fig.12 Part (c) is a schematic diagram of the image after the best connected domain is screened in the anti-interference case 1; Fig.12 Part (d) is a schematic diagram of the working area extracted from anti-interference case one.

[0074] Fig.13 A schematic diagram of a second anti-interference case provided by an embodiment of the present invention; wherein: Fig.13 Part (a) is an example of the original ultrasound image of the liver in the anti-interference case 2; Fig.13 Part (b) is a schematic diagram of the image after binarization in the anti-interference case 2; Fig.13 Part (c) is a schematic diagram of the fan-shaped area found in the original image in the anti-interference case 2; Fig.13 Part (d) is a schematic diagram of the working area extracted from anti-interference case 2.

[0075] Fig.14 This is a framework diagram for implementing the liver ultrasound image working area extraction method provided by the present invention;

[0076] Fig.15 This is a schematic structural diagram of the liver ultrasound image working area extraction system provided by the present invention. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0078] The purpose of the present invention is to provide a method, system and electronic equipment for extracting a working area of ​​a liver ultrasound image, which can improve the reliability of liver ultrasound image area extraction while improving the efficiency of liver ultrasound image area extraction, thereby providing a guarantee for increasing the analysis speed of liver ultrasound images.

[0079] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0080] The present invention provides a method for extracting a working area of ​​a liver ultrasound image. Figure 1 As shown, the method includes:

[0081] Step 100: Acquire the liver ultrasound image to be extracted, and convert the liver ultrasound image to be extracted into a grayscale image. Due to the differences in ultrasound machine acquisition settings, export settings, image encoding format, other preprocessing operations, etc., the background signal strength and interference signal strength of the image actually used for analysis vary from image to image. Based on this, this implementation first converts the input liver ultrasound image into a grayscale image. For example, the following formula is used for each pixel in the liver ultrasound image:

[0082] I Gray =t R I Red +t G I Green +t B I Blue

[0083] Among them, I Red is the intensity value of the pixel in the red channel, I Green is the intensity value of the pixel in the red channel, I Blue is the intensity value of the pixel in the green channel, {t R , tG , t B} is a set of preset red, green and blue channel color conversion coefficients, which are respectively defined as {t R =0.2989, t G =0.5870, t B =0.1140}, I Gray is the final intensity value of the pixel in the grayscale image (such as Figure 3 As shown in FIG. 1 ), the liver ultrasound image used in this embodiment is as shown in FIG. Figure 2 shown.

[0084] Step 101: Determine the intensity value of each pixel in the grayscale image, and obtain a histogram by performing statistics on the intensity values.

[0085] Step 102: Divide the histogram into bins and determine the dynamic threshold based on the intensity value with the largest number of samples in the first n bins. Take 5 signal intensities as the histogram bins, take the bin with the largest number of samples in the first 20 bins, and increase the intensity value of the maximum value in the bin with the largest number of samples by 1 intensity unit as the dynamic threshold (e.g. Figure 4 ),Right now:

[0086] t BI =I max(bin) +1, (0≤bin≤20)

[0087] Among them, I max(bin) is the intensity value with the largest number of samples in the first n intervals, and bin is the histogram interval.

[0088] Step 103: Binarize the grayscale image based on the dynamic threshold to obtain a binary image. Perform binary image conversion, where I(x, y) is the pixel intensity value. The resulting binary image is as follows: Figure 5 shown.

[0089] Step 104: Use a median filter to perform noise reduction processing on the binary image to obtain a binary image after noise reduction. The median filter used in this embodiment is: I(x, y) new =med{I(xk, yl) old , (k, l∈K)}, where I(x, y) new is the intensity value of each pixel in the binary image after denoising, I(xk, yl) old is the corresponding point I(x, y) in the binary image old The intensity values ​​of the surrounding k1 pixels, k1 is within the range of the kernel function K, where the kernel function K uses a 3×3 matrix with all values ​​1, namely:

[0090]

[0091] Median filtering can remove point noise signals and obtain Figure 6 The denoised image shown.

[0092] Step 105: Perform multiple erosion operations and dilation operations on the binary image after denoising. For example, in this embodiment, three erosion operations are performed to remove the influence of the scale line segments and text on the binary image after denoising. The erosion operation process is as follows: 2 The sets X and Y in the formula The essence of this is to use image Y as the convolution template to corrode the binary image (i.e. image X) after denoising. Here, image Y uses a 3×3 square convolution kernel, namely:

[0093]

[0094] Use the convolution kernel to scan the denoised binary image, and perform a single scan on each pixel in the selected denoised binary image and the 3×3 area of ​​8 pixels around the pixel. If there is a pixel with a value of 0 in the 3×3 area, the value of the selected pixel (i.e., the first center point) is set to 0 in the eroded image.

[0095] Then use three expansion operations to restore the size of the working area. The expansion operations are as follows: 2 In the set X and Y, according to the formula The operation is performed, that is, image Y is used as the convolution template to dilate image X (the image X is the image after the corrosion operation). Here, image Y also uses a 3×3 square convolution kernel, namely:

[0096]

[0097] Use the convolution kernel to scan the image after the erosion operation, and perform a single scan on each pixel of the selected image after the erosion operation and the 3×3 area of ​​8 pixels around it. If there is a pixel with a value of 1 in the 3×3 area, the value of this pixel (i.e., the second center point) selected in the expanded image is set to 1. The image after the erosion and expansion operations is shown in the figure. Figure 7 shown.

[0098] Step 106: Use a connected domain search method to determine the connected domain of the image after the erosion operation and the dilation operation.

[0099] Step 107: Screening the connected domains to obtain the best connected domain. For example, in this embodiment, eight connected domains are located in the image after the erosion and dilation operations, and the following screening process is performed on the three connected domains with the largest areas:

[0100] 1) Eliminate edge connected domains, that is, exclude connected domains whose vertices and centers are close to the edge of the image:

[0101]

[0102] Where w is the image width, h is the image height, and t wmin is the lower bound coefficient of width, which is set to 0.1 here, t wmax is the upper limit coefficient of width, which is set to 0.9 here, t hmin is the height lower bound coefficient, which is set to 0.1 here, t hmax is the height upper limit coefficient, which is set to 0.9 here, x centroid is the horizontal coordinate of the center of the connected domain, y centroid is the ordinate of the center of the connected domain.

[0103] And at the same time:

[0104]

[0105] Among them, t emin is the lower bound coefficient, which is set to 0.05 here, x upper is the horizontal coordinate of the corner of the circumscribed rectangle of the connected domain, y upper is the ordinate of the corner of the circumscribed rectangle of the connected domain

[0106] 2) Eliminate low-signal connected domains, that is, exclude connected domains formed by background parts with very low signal intensity:

[0107] First, an image mask is formed according to the connected domain, the original image under the mask area is extracted, and the average intensity value of the original image is calculated. If it is less than a preset value t_CC, it is judged as a background area, and if it is greater than a preset value, it is retained. In this embodiment, t_CC is set to 10.

[0108]

[0109] Among them, mask is the mask area formed by the candidate connected domain, I thresh (x, y) is the pixel intensity value at the (x, y) coordinate position of the binarized image, and R is the conditional result. Among them, the best connected domain retained after connected domain screening is as follows Figure 8 shown.

[0110] Step 108: Based on the optimal connected domain, the outer contour edge is determined using a contour scanning algorithm. In this embodiment, the outer contour edge is determined as follows: Fig. 9 shown.

[0111] Step 109: Obtaining a detection area of ​​the liver ultrasound image to be extracted based on the outer contour edge.

[0112] Step 110: Use convex polygon fitting to fill in the detection area, and perform smoothing on the filled detection area to obtain a liver ultrasound image working area.

[0113] So far, this implementation method can successfully select and extract the sector-shaped working area of ​​liver ultrasound, such as Fig.10 and Fig.11 As shown. Fig.10 The fan-shaped area in the figure is the working area defined in this embodiment. Fig.11 It is the working area of ​​the liver ultrasound image that is finally extracted.

[0114] Based on the above processing, this embodiment has a strong resistance to interference from the position and size of the working area, the background intensity, the presence or absence of a software menu, the presence or absence of ruler text, and the marks connected to the working area, such as Fig.12 As shown in parts (a)-(d), the ultrasound image has no software operation interface, and a line on the right side passes through the working area and connects with the text part. Through the liver ultrasound image working area extraction method provided in this embodiment, the fan-shaped working area can still be accurately extracted.

[0115] like Fig.13 As shown in parts (a)-(d) of FIG. 1 , the overall background of the ultrasound image is relatively bright, and some signals at the edge of the working area have similar strength to the background signal, resulting in an uneven or missing binary image and edge. The liver ultrasound image working area extraction method provided in this embodiment can still extract a complete sector-shaped working area. The implementation framework of the liver ultrasound image working area extraction method provided in this embodiment is as follows: Fig.14 As shown. Figure 2-Figure 14 The text in the liver ultrasound image is blurred because it has no substantial relevance to the solution provided by the present invention.

[0116] Based on the above description, compared with the prior art, the liver ultrasound image working area extraction method provided by the present invention has the following advantages:

[0117] 1. Compared with manual selection, the present invention can extract the sector-shaped working area of ​​ultrasound images more efficiently and accurately. On an ordinary office computer, the working area extraction operation of more than 1,000 liver ultrasound images can be completed within 20 seconds (the actual speed is affected by the computer configuration and the image size). Therefore, the present invention can be used for large-scale ultrasound image preprocessing tasks to reduce the image processing burden of ultrasound physicians. In addition, the present invention can also automatically hide interference information outside the working area, further increasing the efficiency of subsequent analysis.

[0118] 2. The existing segmentation methods directly based on fixed thresholds and connected domains can generally only give the range of the circumscribed rectangle of the working area, but cannot define the sector boundary, and are easily disturbed by the ruler, background noise, and software operation interface, so that the working area cannot be accurately located. The present invention eliminates the interference of rulers, texts, and ultrasonic diagrams on the extraction of the working area through multiple preprocessing operations such as dynamic background intensity estimation, median filtering, erosion, expansion, and connected domain screening, and eliminates interference factors such as irregular boundaries and signal strength close to the background by using boundary search and convex hull fitting methods, so that a more complete and smooth ultrasonic sector working area can be obtained.

[0119] In addition, corresponding to the above-mentioned liver ultrasound image working area extraction method, the present invention also provides the following implementation system:

[0120] One of them is the liver ultrasound image working area extraction system, such as Fig.15 As shown, the system includes:

[0121] The grayscale image conversion module 200 is used to obtain the liver ultrasound image to be extracted and convert the liver ultrasound image to be extracted into a grayscale image.

[0122] The histogram statistics module 201 is used to determine the intensity value of each pixel in the grayscale image and obtain a histogram by performing statistics on the intensity values.

[0123] The dynamic threshold determination module 202 is used to divide the histogram into intervals and determine the dynamic threshold based on the intensity value with the largest number of samples in the first n intervals.

[0124] The binarization processing module 203 is used to perform binarization processing on the grayscale image based on a dynamic threshold to obtain a binarized image.

[0125] The noise reduction processing module 204 is used to perform noise reduction processing on the binary image to obtain a binary image after noise reduction.

[0126] The erosion and dilation module 205 is used to perform multiple erosion operations and dilation operations on the binary image after noise reduction.

[0127] The connected domain search module 206 is used to determine the connected domain of the image after the erosion operation and the dilation operation by using the connected domain search method.

[0128] The best connected domain determining module 207 is used to screen connected domains to obtain the best connected domain.

[0129] The edge line determination module 208 is used to determine the outer contour edge based on the best connected domain by using a contour scanning algorithm.

[0130] The detection region determination module 209 is used to obtain the detection region of the liver ultrasound image to be extracted based on the outer contour edge.

[0131] The working area extraction module 210 is used to fill in the detection area using convex polygon fitting, and to perform smoothing on the filled detection area to obtain the working area of ​​the liver ultrasound image.

[0132] The other is an electronic device, which includes a memory and a processor.

[0133] The memory is used to store logic instructions. The logic instructions are used to implement the liver ultrasound image working area extraction method according to any one of claims 1-8.

[0134] The processor is used to retrieve and execute logical instructions.

[0135] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0136] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for extracting a working area of ​​a liver ultrasound image, characterized in that: include: Acquiring a liver ultrasound image to be extracted, and converting the liver ultrasound image to be extracted into a grayscale image; Determine the intensity value of each pixel in the grayscale image, and obtain a histogram by performing statistics on the intensity values; Dividing the histogram into intervals, and determining a dynamic threshold based on the intensity value with the largest number of samples in the first n intervals; Binarizing the grayscale image based on the dynamic threshold to obtain a binary image; Performing noise reduction processing on the binary image to obtain a binary image after noise reduction; Performing multiple erosion operations and dilation operations on the binary image after denoising; The connected domain search method is used to determine the connected domain of the image after the erosion and dilation operations; Screening the connected domain to obtain the best connected domain; Based on the optimal connected domain, a contour scanning algorithm is used to determine the outer contour edge; Obtaining a detection area of ​​the liver ultrasound image to be extracted based on the outer contour edge; The detection area is completed by using convex polygon fitting, and the completed detection area is smoothed to obtain a liver ultrasound image working area; The step of screening the connected domain to obtain the best connected domain specifically includes: Arrange the connected domains in the connected domain in descending order according to their areas, and select the first three connected domains after the arrangement as the middle connected domains; Screening out edge connected domains in the intermediate connected domains; the edge connected domains are connected domains whose vertices and center points are both at a preset distance from the edge of the image; Forming an image mask according to the intermediate connected domain, and extracting the original image under the image mask area; Determining an average intensity value of the original image; Determine the connected domain corresponding to the original image in which the average intensity value in the intermediate connected domain is less than a preset value as a low signal connected domain; Screening low-signal connected domains in the intermediate connected domains; The remaining connected domains in the intermediate connected domains are used as the optimal connected domains.

2. The method for extracting the working area of ​​a liver ultrasound image according to claim 1, characterized in that: Using formula i Gray =t R I Red +t G I Green +t B I Blue determining an intensity value of each pixel in the grayscale image; Among them, I Gray is the intensity value of the pixel in the grayscale image, I Red is the intensity value of the pixel in the red channel, I Green is the intensity value of the pixel in the green channel, I Blue is the intensity value of the pixel in the blue channel, {t R ,t G ,t B } is the preset red, green and blue channel color conversion coefficient.

3. The method for extracting the working area of ​​liver ultrasound image according to claim 1, characterized in that: The histogram is divided into intervals with 5 intensity values ​​as one interval.

4. The method for extracting the working area of ​​liver ultrasound images according to claim 1, characterized in that: The dynamic threshold is t BI : t BI =I max(bin) +1,(0≤bin≤20) Among them, I max(bin) is the intensity value with the largest number of samples in the first n intervals, and bin is the histogram interval.

5. The method for extracting the working area of ​​liver ultrasound image according to claim 1, characterized in that: A median filter is used to perform noise reduction processing on the binary image to obtain a binary image after noise reduction.

6. The method for extracting the working area of ​​liver ultrasound images according to claim 1, characterized in that: The denoised binary image is subjected to multiple erosion and dilation operations, specifically including: Using a convolution template to perform an erosion operation on the binary image after denoising; A convolution template is used to perform an expansion operation on the binary image after the corrosion operation; the convolution template is a 3×3 square convolution kernel.

7. The method for extracting the working area of ​​liver ultrasound images according to claim 6, characterized in that: The corroding operation on the binary image after noise reduction using a convolution template specifically includes: Taking a pixel point in the binary image after denoising as a first center point, selecting 8 pixel points adjacent to the first center point as adjacent points to construct a 3×3 area; Use the convolution template to perform a single scan on the pixels in the 3×3 area, and if there are pixels with a value of 0 in the 3×3 area, set the value of the first center point to 0; Use the convolution mask to dilate the binary image after the corrosion operation, including: Taking a pixel point in the binary image after the corrosion operation as a second center point, selecting 8 pixel points adjacent to the second center point as adjacent points to construct a 3×3 area; The convolution template is used to perform a single scan on the pixels in the 3×3 area. If there are pixels with a value of 1 in the 3×3 area, the value of the second center point is set to 1.

8. A liver ultrasound image working area extraction system, characterized in that: The system is used to implement the liver ultrasound image working area extraction method according to any one of claims 1 to 7; the system comprises: A grayscale image conversion module, used for acquiring a liver ultrasound image to be extracted, and converting the liver ultrasound image to be extracted into a grayscale image; A histogram statistics module, used to determine the intensity value of each pixel in the grayscale image, and obtain a histogram by performing statistics on the intensity values; A dynamic threshold determination module, used to divide the histogram into intervals and determine a dynamic threshold based on the intensity value with the largest number of samples in the first n intervals; A binarization processing module, used for performing binarization processing on the grayscale image based on the dynamic threshold to obtain a binarized image; A noise reduction processing module, used for performing noise reduction processing on the binary image to obtain a binary image after noise reduction; An erosion and dilation module, used for performing multiple erosion and dilation operations on the binary image after denoising; A connected domain search module, used for determining the connected domain of the image after the erosion operation and the dilation operation by using a connected domain search method; An optimal connected domain determination module, used for screening the connected domains to obtain the optimal connected domain; An edge line determination module, used to determine the outer contour edge by using a contour scanning algorithm based on the optimal connected domain; A detection area determination module, used for obtaining the detection area of ​​the liver ultrasound image to be extracted based on the outer contour edge; The working area extraction module is used to fill the detection area with convex polygon fitting and to smooth the filled detection area to obtain the working area of ​​the liver ultrasound image.

9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store logic instructions; the logic instructions are used to implement the liver ultrasound image working area extraction method according to any one of claims 1 to 7; The processor is used to call and execute the logic instructions.