Noise reduction method for ultrasonic images and electronic device
By setting a filtering window in ultrasonic image processing and selecting an appropriate filtering method according to image quality and window size, the problem in the prior art is solved that it is difficult to simultaneously suppress coherent spot noise and maintain edge information, and a better noise reduction effect is achieved.
Patent Information
- Application Number
- CN202210266801.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-03-17
AI Technical Summary
In the prior art, when filtering ultrasonic images, it is difficult to simultaneously suppress coherent spot noise and maintain edge information.
By setting up a filtering window, an appropriate filtering method is selected according to the image quality and window size: when the image quality is high and the window size is appropriate, the Lee filtering method is used; when the image quality is low or the window size is less than the minimum value, a gradient operator is used for filtering.
Effectively suppress coherent spot noise, while protecting the edge information of the image, improving the noise reduction effect of ultrasonic images.
Smart Images

Figure CN114648456B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ultrasonic technology, and in particular, to a method for reducing noise in ultrasonic images and an electronic device. Background Art
[0002] In the related art, the Lee filtering method is usually used to filter ultrasonic images. The classic Lee filtering denoising algorithm is constructed based on the fully developed multiplicative model of speckle noise points, and the suppression effect on incompletely developed speckle noise is not ideal. The improved Lee filtering denoising can well suppress speckle noise, but the edge information is damaged. Therefore, it is necessary to solve the problem of how to well suppress speckle noise and maintain edge information when filtering images. Summary of the Invention
[0003] This application discloses a method for reducing noise in ultrasonic images and an electronic device, which is used to solve the problem of how to well suppress speckle noise and maintain edge information when filtering images.
[0004] In a first aspect, this application proposes a method for reducing noise in ultrasonic images, and the method includes:
[0005] Obtain the image quality within the filtering window of the ultrasonic image;
[0006] If the image quality is greater than the image quality threshold, use the Lee filtering method to filter the ultrasonic image within the filtering window;
[0007] If the image quality is less than or equal to the image quality threshold, and the size of the filtering window is less than the window minimum value, select a gradient operator for the filtering window, and use the gradient operator to filter the ultrasonic image within the filtering window.
[0008] In one embodiment, the image quality threshold is determined based on the following method:
[0009]
[0010] Where ya represents the set of gray values of all pixel points in the ultrasonic image, yb represents the set of gray values of all pixel points within the window threshold, var is the variance function, and Tw represents the image quality threshold.
[0011] In one embodiment, the selecting a gradient operator for the filtering window includes:
[0012] Divide the ultrasonic image within the filtering window into n*n sub-regions, where n is the order of the candidate gradient operator;
[0013] Construct a preprocessed image using the pixel means of the respective sub-regions;
[0014] Perform convolution operations on the preprocessed image using the respective candidate gradient operators to obtain the filtering results of the candidate gradient operators;
[0015] Select the candidate gradient operator with the optimal filtering result as the gradient operator of the adjusted filtering window.
[0016] In one embodiment, the filtering the ultrasonic image within the filtering window using the Lee filtering method includes:
[0017] Determine the weight coefficients based on the following weight coefficient determination formula:
[0018]
[0019] Based on the weight coefficients, perform Lee filtering on the ultrasonic image within the filtering window.
[0020] In one embodiment, before obtaining the image quality within the filtering window of the ultrasonic image, it further includes:
[0021] Perform equalization processing on the ultrasonic image.
[0022] In one embodiment, the method further includes:
[0023] If the image quality is less than or equal to the image quality threshold and the size of the filtering window is not less than the window minimum value, reduce the size of the filtering window and return to execute the step of obtaining the image quality within the filtering window of the ultrasonic image.
[0024] In one embodiment, the selecting the candidate gradient operator with the optimal filtering result includes:
[0025] Determine the sum value of each element in each filtering result;
[0026] Select the candidate gradient operator with the largest sum value as the candidate gradient operator with the optimal filtering result.
[0027] In one embodiment, the candidate gradient operators include:
[0028] A first candidate gradient operator in the horizontal direction, a second candidate gradient operator in the vertical direction, a third candidate gradient operator offset by forty-five degrees from the horizontal direction, and a fourth candidate gradient operator perpendicular to the direction of the third candidate gradient operator.
[0029] In one embodiment, the obtaining the image quality within the filtering window of the ultrasonic image includes:
[0030] The image quality within the filtering window is determined by sampling the following formula:
[0031]
[0032] where ya represents the grayscale value of a pixel point in the ultrasonic image, yc represents the grayscale value of a pixel point within the filtering window, and var is the variance function.
[0033] In a second aspect, the present application provides an electronic device, including:
[0034] a memory for storing instructions executable by a processor;
[0035] a processor configured to execute the instructions to implement the method according to any one of the first aspect.
[0036] In a third aspect, the present application provides a computer-readable storage medium, which, when the instructions stored therein are executed by a processor of a terminal device, enables the terminal device to execute any method provided in the first aspect of the present application.
[0037] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any method provided in the first aspect of the present application.
[0038] The technical solutions provided by the embodiments of the present application at least bring the following beneficial effects:
[0039] By setting a filtering window, the present application only performs a filtering operation on the image within the window. If the image quality within the window is greater than the image quality threshold, it proves that the image quality is high. At this time, even if the Lee filtering algorithm is used for filtering, the edge information of the image can be guaranteed while suppressing the speckle noise. If the image quality within the window is less than or equal to the image quality threshold, and the size of the filtering window is less than the window minimum value, it proves that the image quality is low. At this time, using a gradient operator for filtering avoids the problem that the speckle noise suppression effect is not ideal and avoids the destruction of edge information.
[0040] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments of the present application. Obviously, the following introduced drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0042] Figure 1 Schematic diagram of the electronic device provided in the embodiment of the present application;
[0043] Figure 2 Flow schematic diagram of the noise reduction method for the ultrasonic image provided in the embodiment of the present application;
[0044] Figure 3 Flow schematic diagram of selecting a candidate gradient operator provided in the embodiment of the present application;
[0045] Figure 4 Schematic diagram of the filtering window provided in the embodiment of the present application. Detailed implementation manners
[0046] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
[0047] Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0048] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.
[0049] For ease of understanding, some terms are first explained in the present application.
[0050] Minimum mean square error: It is a measure reflecting the degree of difference between the estimator and the estimated quantity. When the measured value is the smallest, it is the minimum mean square error.
[0051] Minimum mean square error criterion: Select a group of time-domain sampling values and adopt the minimum mean square error algorithm to minimize the mean square error, so as to achieve the optimal design.
[0052] In the related art, the Lee filtering method is usually adopted to perform filtering operations on ultrasonic images. The classical Lee filtering denoising algorithm is constructed based on the fully developed multiplicative model of speckle noise points, and the suppression effect on incompletely developed speckle noise is not ideal. The improved Lee filtering denoising can well suppress speckle noise, but the edge information is damaged. Therefore, it is necessary to solve the problem of well suppressing speckle noise and well preserving edge information when filtering images.
[0053] In view of this, a noise reduction method for ultrasonic images is proposed in the embodiments of the present application.
[0054] In the present application, by setting a filtering window, filtering operations are only performed on the image within the window. If the image quality within the window is greater than the image quality threshold, it proves that the image quality is high. At this time, even if the Lee filtering algorithm is used for filtering, it can suppress speckle noise while ensuring the edge information of the image. If the image quality within the window is less than or equal to the image quality threshold, and the size of the filtering window is less than the window minimum value, it proves that the image quality is low. At this time, using a gradient operator for filtering avoids the problem that the suppression effect of speckle noise is not ideal and avoids the damage of edge information.
[0055] After introducing the design concept of the embodiments of the present application, the following briefly introduces the application scenarios applicable to the technical solutions of the embodiments of the present application. It should be noted that the following introduced application scenarios are only used to illustrate the embodiments of the present application rather than to limit. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0056] The electronic device in the present application can be an ultrasonic device, or a terminal device connected to the ultrasonic device, or a server. Refer to Figure 1 shown, which is a structural block diagram of an ultrasonic device provided by an embodiment of the present application.
[0057] It should be understood that Figure 1 the ultrasonic device 100 shown is only an example, and the ultrasonic device 100 can have more or fewer components than those shown in Figure 1 It can combine two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0058] Figure 1 An exemplary hardware configuration block diagram of the ultrasonic device 100 according to an exemplary embodiment is shown in
[0059] As shown in Figure 1As shown, the ultrasonic device 100 may include, for example: a processor 110, a memory 120, a display unit 130, and an ultrasonic image acquisition device 140; wherein:
[0060] The ultrasonic image acquisition device 140 is configured to acquire ultrasonic images.
[0061] The display unit 130 is configured to display ultrasonic images.
[0062] The memory 120 is configured to store data required for performing the noise reduction method of ultrasonic images, and may include software programs, application interface data, etc.
[0063] The processor 110 is respectively connected to the ultrasonic image acquisition device 140 and the display unit 130, and is configured to execute the noise reduction method of ultrasonic images provided by the embodiments of the present application.
[0064] To further illustrate the technical solutions provided by the embodiments of the present application, the following will be described in detail with reference to the accompanying drawings and specific implementation manners. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application.
[0065] It should be noted that the noise reduction method of ultrasonic images proposed in the present application is applicable to ultrasonic images of different organs or biological tissues, and the present application does not limit this.
[0066] In the embodiments of the present application, since ultrasonic images have the characteristic of low contrast, which will affect the filtering effect, it is necessary to enhance the low-contrast data to facilitate subsequent noise reduction processing. The present application first performs histogram equalization on the ultrasonic image based on formula (1) before filtering to improve the contrast of the image.
[0067]
[0068] In formula (1), k represents the gray level, which is a total of 256 gray levels from 0 to 255, r j ∈[0, 1], representing the normalized gray level of the pixel point in the image before mapping, W(r k ) represents the mapping relationship, n represents the total number of pixel points in the image, n j represents the number of pixel points in the k-th gray level, p r (r j ) represents the probability of the pixel point in the k-th gray level before mapping, and S k represents the normalized gray level of the pixel point after mapping.
[0069] For example, there are 100 pixel points in an ultrasonic image, and 10 of them are in the seventh gray level. Then the probability of the pixel points in the image being in the 7th gray level is 10%. For the kth gray level, the probabilities of the pixel points in the 0 - kth gray levels are accumulated to obtain an accumulated value. Multiplying the accumulated values of each gray level by the total number of pixel points gives the number of pixel points in each gray level after equalization.
[0070] Due to the defects in the Lee filtering algorithm in the related art, the ability of the image to suppress coherent noise is weakened. Therefore, this application combines Figure 2 the steps shown below to introduce a noise reduction method for ultrasonic images in this application, which improves the ability to suppress coherent noise during filtering by using different filtering methods.
[0071] In step 201, obtain the image quality within the filtering window of the ultrasonic image.
[0072] In step 202, determine whether the image quality is greater than the image quality threshold. If the image quality is greater than the image quality threshold, execute step 203; otherwise, execute step 204.
[0073] In the embodiment of this application, the image quality is used to measure the difference between the gray values of pixel points. The image quality threshold is obtained by comparing the image quality in a preset window with the image quality of the ultrasonic image. The smaller the difference between the gray values of pixel points, the higher the image quality. By comparing the image quality, performing Lee filtering on the ultrasonic image in the filtering window that is higher than the image quality threshold can suppress coherent noise and preserve the image edge information. In order to obtain the image quality threshold in this application, a preset window with a size of W0 is first set, and the image quality threshold is determined based on formula (2).
[0074]
[0075] In formula (2), ya represents the set of gray values of all pixel points in the ultrasonic image, yb represents the set of gray values of all pixel points within the window threshold, var is the variance function, and Tw represents the image quality threshold.
[0076] Similarly, calculate the image quality T in the window based on formula (3):
[0077]
[0078] where ya represents the gray value of a pixel point in the ultrasonic image, yc represents the gray value of a pixel point within the filtering window, and var is the variance function.
[0079] In step 203, perform filtering processing on the ultrasonic image within the filtering window using the Lee filtering method.
[0080] In the embodiments of the present application, Lee filtering is a filtering method that assumes the image is disturbed by noise and then performs linear filtering on the image mixed with noise. The present application assumes that the image is disturbed by a stationary noise with a mean of 1 and a variance of and then uses the Lee filtering method to filter the ultrasonic image within the filtering window.
[0081] The present application mixes the stationary noise N with the image X in the filtering window to obtain the noisy image Y corresponding to the image in the filtering window, that is, Y = XN. Then, the local mean and the local variance
[0082]
[0083] In formula (4), represents the local mean of the stationary noise, δ N represents the standard deviation of the known stationary noise, represents the local variance of the stationary noise, represents the local mean of the noisy image Y, δ Y represents the standard deviation of the noisy image Y, represents the local variance of the noisy image Y.
[0084] At the same time, the weight coefficient k of the Lee filtering method is determined based on formula (5):
[0085]
[0086] In formula (5), C N represents the local variance coefficient of the known stationary noise, C Y represents the local variance coefficient of the noisy image Y, δ N represents the standard deviation of the known stationary noise, δ Y represents the standard deviation of the noisy image Y. Since the mean and variance of the stationary noise need to be known in advance in formula (5), but for a specific ultrasonic image, only by assuming that the ultrasonic image is mixed with stationary noise and determining the mean and variance of the stationary noise. For the convenience of calculation, let where represents the local mean of the ultrasonic image in the filtering window, and u represents the standard deviation of the ultrasonic image in the filtering window.
[0087] Lee filtering uses the Minimum Mean Square Error (MMSE) and unbiased estimation to obtain a linear approximation formula, thereby obtaining the filtered image. Assume is the minimum mean square estimate of the ultrasonic image X in the filtering window. After performing a Taylor expansion on Y and taking the first-order Taylor expansion formula, the Taylor expansion Y' of the noisy image signal Y as shown in formula (6) is obtained.
[0088]
[0089] By using the minimum mean square error criterion, substitute Y' in formula (6), the local mean of the pixel values of the ultrasonic image in the filtering window in formula (4) and formula (5) into the Lee filtering formula shown in formula (7) to obtain the denoised gray value G of the ultrasonic image in the filtering window Lee .
[0090]
[0091] In formula (7), represents the local mean of the pixel values of the ultrasonic image in the filtering window, k represents the weight coefficient of the Lee filter, and Y represents the noisy image.
[0092] Perform Lee filtering on the ultrasonic image within the filtering window based on formula (7).
[0093] In step 204, if the size of the filtering window is smaller than the window minimum value, select a gradient operator for the filtering window and perform filtering on the ultrasonic image within the filtering window using the gradient operator.
[0094] In the embodiment of the present application, since different tissues in the ultrasonic image have different grayscales in the image, and the same algorithm or gradient operator has the same noise reduction effect on pixel points with different grayscales in the image. In order to make the noise reduction processing of pixel points with different grayscales as close as possible to the true grayscale without noise when using the same algorithm or the same gradient operator for filtering, the present application also sets a filtering window, where the variation range of the filtering window is [Wmin, Wmax], the size of the filtering window is within the variation range, the variation amount of each filtering window is value, and the step size of each sliding window is less than Wmin. Since the step size set in the present application is less than Wmin, it is ensured that when selecting a part of the ultrasonic image for filtering by means of a sliding filtering window, the ultrasonic image can be completely covered.
[0095] In the embodiment of the present application, it is also necessary to determine the size relationship between the size of the filtering window and the window minimum value, and further improve the ability of the image to suppress coherent noise by adjusting the size of the filtering window. If the image quality is less than or equal to the image quality threshold and the size of the filtering window is not less than the window minimum value, then reduce the size of the filtering window, and based on the reduced size of the filtering window, return to execute the step of obtaining the image quality within the filtering window of the ultrasonic image until the image quality is greater than Tw or the filtering window is less than or equal to Wmin.
[0096] In another embodiment of the present application, if the image quality is less than or equal to the image quality threshold and the size of the filtering window is less than or equal to the window minimum value, then the candidate gradient operator is selected for the filtering window according to the steps as Figure 3 shown.
[0097] In step 301, the ultrasonic image within the filtering window is divided into n*n sub-regions, where n is the order of the candidate gradient operator.
[0098] In step 302, the preprocessed image is constructed by using the pixel mean values of each sub-region.
[0099] In step 303, each candidate gradient operator is used to perform a convolution operation on the preprocessed image respectively to obtain the filtering results of each candidate gradient operator.
[0100] In step 304, the candidate gradient operator with the optimal filtering result is selected as the gradient operator of the adjusted filtering window.
[0101] In the embodiment of the present application, in order to consider the gray values of the pixel points in all directions, four n*n gradient operators are respectively set in four symmetric directions in the present application, and the filtering window is evenly divided into n*n sub-windows, and different gradient operators are respectively used for gradient convolution calculation to obtain the filtering result Mi of each window.
[0102] The present application exemplarily provides four candidate gradient operators in four directions, namely the first candidate gradient operator in the horizontal direction, the second candidate gradient operator in the vertical direction, the third candidate gradient operator offset by forty-five degrees from the horizontal direction, and the fourth candidate gradient operator perpendicular to the direction of the third candidate gradient operator.
[0103] For example, the four candidate gradient operators are respectively as shown in formula (8), where G1 is the first candidate gradient operator, G2 is the second candidate gradient operator, G3 is the third candidate gradient operator, and G4 is the fourth candidate gradient operator. For the convenience of calculation, each candidate gradient operator is set as a 3×3 matrix.
[0104]
[0105]
[0106] At this time, the order of the gradient operator is 3, the ultrasonic image within the filtering window is divided into 3×3 sub-regions, and the filtering results of each gradient operator are obtained in the manner as shown in formula (9).
[0107]
[0108] In formula (9), Gi represents the i-th gradient operator, represents the ultrasonic image in the filtering window, y1 - y9 represent the ultrasonic images of the divided 3×3 sub - regions, and Mi represents the filtering result obtained by using the i - th gradient operator. Calculate the sum value of each element in each filtering result, select the candidate gradient operator with the largest sum value as the candidate gradient operator with the optimal filtering result, and output the final filtering result.
[0109] After performing noise reduction processing on the current filtering window, translate the filtering window by one step size according to the method as Figure 4 shown. In Figure 4 , the dashed box represents the filtering window. Taking the case where the initial position of the filtering window coincides with the left and upper sides of the ultrasonic image as an example, after completing the noise reduction processing on the image within the window, translate the filtering window one step to the right or down, and continue to perform noise reduction processing on the new image within the filtering window. Taking the case of translating the filtering window to the right as an example, when the right side of the filtering window coincides with the right side of the ultrasonic image, the next position of the filtering window is the position obtained by translating the initial position one step down.
[0110] It should be noted that for the convenience of calculation, the present application determines the candidate gradient operator by calculating the sum value of each element in each filtering result. It is also possible to determine the candidate gradient operator by calculating the modulus of each filtering result, and the present application does not limit this.
[0111] In an exemplary embodiment, the present application also provides a computer - readable storage medium including instructions, such as a memory 120 including instructions. The above - mentioned instructions can be executed by a processor 110 of an electronic device 100 to complete the above - mentioned ultrasonic image processing method. Optionally, the computer - readable storage medium can be a non - temporary computer - readable storage medium. For example, the non - temporary computer - readable storage medium can be ROM, random access memory (RAM), CD - ROM, magnetic tape, floppy disk, and optical data storage devices, etc.
[0112] In an exemplary embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor 110, it implements the ultrasonic image processing method provided by the present application.
[0113] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer - available storage media (including but not limited to disk storage, CD - ROM, optical storage, etc.) containing computer - available program code.
[0114] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0115] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0117] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.
Claims
1. A method for reducing noise in ultrasonic images, characterized in that, The method includes: Obtaining the image quality within the filtering window of the ultrasonic image; wherein, the image quality is determined according to the difference between the gray values of the pixel points of the ultrasonic image; If the image quality is greater than the image quality threshold, the Lee filtering method is used to filter the ultrasonic image within the filtering window; wherein, the image quality threshold is obtained by comparing the image quality in the preset window with the image quality of the ultrasonic image; If the image quality is less than or equal to the image quality threshold and the size of the filtering window is less than the window minimum value, a gradient operator is selected for the filtering window, and the ultrasonic image within the filtering window is filtered using the gradient operator.
2. The method according to claim 1, wherein The image quality threshold is determined based on the following method: Where ya represents the set of gray values of all pixel points in the ultrasonic image, yb represents the set of gray values of all pixel points within the window threshold, var is the variance function, and Tw represents the image quality threshold.
3. The method according to claim 1, wherein The step of selecting a gradient operator for the filtering window includes: Dividing the ultrasonic image within the filtering window into n*n sub-regions, where n is the order of the candidate gradient operator; Constructing a preprocessed image using the pixel mean values of each of the sub-regions; Performing a convolution operation on the preprocessed image using each of the candidate gradient operators to obtain the filtering results of each candidate gradient operator; Selecting the candidate gradient operator with the optimal filtering result as the gradient operator of the adjusted filtering window.
4. The method according to claim 1, characterized in that, The step of filtering the ultrasonic image within the filtering window using the Lee filtering method includes: Determining the weight coefficient based on the following weight coefficient determination formula: Based on the weight coefficient, performing Lee filtering on the ultrasonic image within the filtering window; Among them, C N represents the local variance coefficient of the known stationary noise, and C Y represents the local variance coefficient of the noisy image Y; The step of performing Lee filtering on the ultrasonic image within the filtering window based on the weight coefficient includes: Determining the gray value after noise reduction of the ultrasonic image within the filtering window based on the following Lee filtering formula: Among them, G Lee is the gray value, is the local mean of the pixel values of the ultrasonic image within the filtering window, k is the weight coefficient, and Y is the pixel value of the noisy image.
5. The method according to claim 1, characterized in that Before obtaining the image quality within the filtering window of the ultrasonic image, it further includes: Performing equalization processing on the ultrasonic image.
6. The method according to claim 1, wherein The method further includes: If the image quality is less than or equal to the image quality threshold and the size of the filtering window is not less than the window minimum value, reducing the size of the filtering window and returning to execute the step of obtaining the image quality within the filtering window of the ultrasonic image.
7. The method according to claim 3, wherein The step of selecting the candidate gradient operator with the optimal filtering result includes: Determining the sum value of each element in each of the filtering results; Selecting the candidate gradient operator with the largest sum value as the candidate gradient operator with the optimal filtering result.
8. The method according to claim 3, wherein The candidate gradient operators include: A first candidate gradient operator in the horizontal direction, a second candidate gradient operator in the vertical direction, a third candidate gradient operator offset by forty-five degrees from the horizontal direction, and a fourth candidate gradient operator perpendicular to the direction of the third candidate gradient operator.
9. The method according to claim 1, wherein The step of obtaining the image quality within the filtering window of the ultrasonic image includes: Sampling the following formula to determine the image quality within the filtering window: Where ya represents the gray value of the pixel point in the ultrasonic image, yc represents the gray value of the pixel point within the filtering window, and var is the variance function.
10. An electronic device, characterized in that, It includes: A memory for storing processor-executable instructions; A processor configured to execute the instructions to implement any method provided in claims 1-9.
Citation Information
Patent Citations
Ultrasonic image processing method based on directional weighted median filter
CN102663708A
Multi-angle SAR image filtering method based on super image
CN112927155A