An ultrasonic image denoising method, an electronic device, and a storage medium
By performing gradient image analysis and region segmentation on multiple ultrasound images, combined with Gaussian filtering and bilateral filtering, the problem of information loss caused by noise in ultrasound images was solved, and image quality improvement and edge enhancement were achieved.
Patent Information
- Application Number
- CN202310197095.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-03-03
AI Technical Summary
In the existing technology, medical ultrasound images have a lot of speckle noise due to the imaging mechanism, which leads to a decrease in image quality and loss of information.
By acquiring multiple consecutive ultrasound images, registration and average stacking are performed to extract gradient images. The pixel type is determined by the gradient amplitude and direction. Gaussian filtering and bilateral filtering are applied to tissue and non-tissue regions respectively, and image fusion is performed to restore image resolution.
It effectively reduces the loss of image information, avoids edge blurring, and achieves image edge enhancement effect.
Smart Images

Figure CN116188312B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to an ultrasound image denoising method, electronic device, and storage medium. Background Technology
[0002] Medical ultrasound imaging technology has been widely used in medical auxiliary diagnosis due to its non-invasive, radiation-free, real-time, and cost-effective characteristics. However, due to the inherent imaging mechanism of medical ultrasound, there is a large amount of speckle noise in the images, which affects the image quality.
[0003] Existing patent document CN113538299A discloses an ultrasound image denoising method, which employs an adaptive segmentation threshold calculated based on pixel intensity. The method determines whether the current pixel belongs to a tissue region in the ultrasound image based on the segmentation threshold. If it is a tissue region, smoothing filtering is applied; otherwise, low-pass filtering is applied. This threshold segmentation method based on the intensity of the current pixel is prone to causing loss of image information. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an ultrasound image denoising method, electronic device and storage medium that can reduce the loss of image information.
[0005] The technical solution adopted by this invention to solve its technical problem is: to provide an ultrasound image denoising method, comprising the following steps:
[0006] (1) Acquire multiple consecutive ultrasound images;
[0007] (2) Register adjacent ultrasound images and stack the average values of the registered ultrasound images to obtain a stacked image;
[0008] (3) Perform downsampling on the stacked image, extract the gradient image of the downsampled image, and calculate the gradient magnitude and gradient direction of the pixel based on the gradient image;
[0009] (4) Generate a template marking matrix by using the gradient magnitude and gradient direction of the pixel as matrix elements, and determine the type of the pixel according to the gradient magnitude and gradient direction of the pixel. When the pixel is an organized region, set the corresponding position of the template marking matrix to 1, and when the pixel is an unorganized region, set the corresponding position of the template marking matrix to 0.
[0010] (5) Select the non-tissue region and tissue region in the downsampled image using the template marking matrix, perform Gaussian filtering on the non-tissue region to obtain the non-tissue region filtered image, and perform bilateral filtering on the tissue region image to obtain the tissue region filtered image.
[0011] (6) The non-tissue region filtered image and the tissue region filtered image are fused together, and the fused image is upsampled to obtain a restored image, the restored image having the same resolution as the stacked image.
[0012] Step (2) specifically involves: performing Fourier transform on adjacent ultrasound images, calculating the cross power spectrum of the two transformed images, performing inverse Fourier transform on the cross power spectrum to obtain the Dirac function, using the coordinates of the peak value of the Dirac function as the offset of adjacent ultrasound images, adjusting the position of the two adjacent images according to the offset, and stacking the average values to obtain a stacked image.
[0013] Step (3) specifically includes:
[0014] The odd-numbered rows and columns of the stacked image are extracted to form a first sub-image; the odd-numbered rows and even-numbered columns of the stacked image are extracted to form a second sub-image; the even-numbered rows and odd-numbered columns of the stacked image are extracted to form a third sub-image; and the even-numbered rows and even-numbered columns of the stacked image are extracted to form a fourth sub-image.
[0015] Edge detection is performed on the first, second, third, and fourth sub-images respectively, and gradient images at 0° and 90° are detected for each sub-image;
[0016] The gradient magnitude and gradient direction of each pixel in each sub-image are calculated using gradient images at 0° and 90°.
[0017] In step (4), the type of a pixel is determined based on its gradient magnitude and gradient direction. Specifically, the mean square error of the gradient magnitude and the mean square error of the gradient direction are calculated based on the gradient magnitude and gradient direction of the pixel in each sub-image. If the mean square error of the gradient magnitude of a pixel is less than the gradient magnitude threshold and the mean square error of the gradient direction is less than the gradient direction threshold, then the pixel is determined to be an organized region; otherwise, it is a non-organized region.
[0018] In step (6), a pixel-weighted average fusion method is used to fuse the filtered image of the non-tissue region and the filtered image of the tissue region.
[0019] The ultrasound image denoising method further includes: extracting edges from the ultrasound image to obtain an edge portion image; and fusing the edge portion image with the restored image.
[0020] When the edge portion image is fused with the restored image, a pixel-weighted average fusion method is used.
[0021] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned ultrasound image denoising method.
[0022] The technical solution adopted by the present invention to solve its technical problem is: to provide a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned ultrasound image denoising method.
[0023] Beneficial effects
[0024] By employing the above-mentioned technical solutions, this invention has the following advantages and positive effects compared with existing technologies: This invention uses gradient images and gradient directions to divide pixels into tissue regions and non-tissue regions, reducing the loss of image information caused by segmenting tissue regions and non-tissue regions solely based on pixel intensity. This invention uses edge extraction results and denoising effects to perform image overlay and fusion, avoiding edge blurring caused by denoising. This invention applies Gaussian filtering to the non-tissue region portion of the image and bilateral filtering to the tissue region portion of the image, achieving image edge enhancement effects. Attached Figure Description
[0025] Figure 1 This is a flowchart of the ultrasound image denoising method according to the first embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of the downsampling process in the first embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of the image resolution restoration process in the first embodiment of the present invention. Detailed Implementation
[0028] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0029] The first embodiment of this invention relates to an ultrasonic image denoising method, wherein the ultrasonic image is acquired by an ultrasonic imaging system, which mainly includes an ultrasonic transducer, a transmitter, a receiver, a display, a recorder, and a power supply. The transducer is a key component of the ultrasonic imaging system, and its performance affects the sensitivity, resolution, and anti-interference capability of the entire system. The transducer's function is to utilize the piezoelectric effect to transmit ultrasonic waves and receive echo signals, and to calculate the depth of the target based on the time difference between the transmitted and received sound waves. Figure 1 As shown, the specific steps include:
[0030] Step 1: Use an ultrasound imaging system to acquire multiple consecutive ultrasound images, denoted as Pi, where Pi represents the ultrasound images acquired at adjacent time points.
[0031] Step 2: Register adjacent ultrasound images and then stack the average values of the registered ultrasound images to obtain a stacked image. Specifically, perform Fourier transform on adjacent ultrasound images, calculate the cross-power spectrum of the two transformed images, perform inverse Fourier transform on the cross-power spectrum to obtain the Dirac function, and use the coordinates of the peak value of the Dirac function as the offset of the adjacent ultrasound images (i.e., the offset (X, Y) of image Pi+1 relative to image Pi). Adjust the positions of the two adjacent images according to the offset (X, Y). For example, the offset of image Pi+1 can be directly adjusted to align image Pi+1 with image Pi. Stack the average values of the aligned images to suppress speckle noise and obtain the stacked image P1.
[0032] Step 3: Perform Canny edge extraction on the ultrasound image Pi, and denote the extracted edge portion as P2.
[0033] Step 4, downsample the stacked image P1, as follows: Figure 2 As shown, the specific downsampling process is as follows: odd rows and odd columns are extracted from the stacked image P1 to form the first sub-image P10; odd rows and even columns are extracted from the stacked image P1 to form the second sub-image P11; even rows and odd columns are extracted from the stacked image P1 to form the third sub-image P12; and even rows and even columns are extracted from the stacked image P1 to form the fourth sub-image P13.
[0034] Step 5: Perform edge detection on the first sub-image P10, the second sub-image P11, the third sub-image P12, and the fourth sub-image P13 respectively. The edge detection algorithm can be the Canny algorithm, which detects two gradient images in the 0° and 90° directions for each sub-image.
[0035] Step 6: Perform point-by-point analysis and calculation for each detection direction: Calculate the gradient magnitude and gradient direction of each pixel using the gradient images in the 0° and 90° directions. Record the gradient magnitude image A10 and gradient direction image D10 formed by the first sub-image P10, the gradient magnitude image A11 and gradient direction image D11 formed by the second sub-image P11, the gradient magnitude image A12 and gradient direction image D12 formed by the third sub-image P12, and the gradient magnitude image A13 and gradient direction image D13 formed by the fourth sub-image P13.
[0036] Step 7: Generate a template marker matrix mask1 using the gradient magnitude and gradient direction of each pixel as matrix elements. Determine the pixel type based on the gradient magnitude and gradient direction. When the pixel is a tissue region, set the corresponding position in the template marker matrix to 1; when the pixel is a non-tissue region, set the corresponding position in the template marker matrix to 0. Specifically, in determining the pixel type, calculate the root mean square error of the gradient magnitude and the root mean square error of the gradient direction based on the gradient magnitude and gradient direction of each pixel in each sub-image. If the root mean square error of the gradient magnitude is less than the gradient magnitude threshold and the root mean square error of the gradient direction is less than the gradient direction threshold, then the pixel is determined to be a tissue region; otherwise, the pixel is determined to be a non-tissue region.
[0037] Step 8: Select the non-organic region in the downsampled image using the template marker matrix, and apply Gaussian filtering to the non-organic region to obtain images P20, P21, P22, and P23. Image P20 is the effect of Gaussian filtering on the first sub-image P10*(1-mask1), image P21 is the effect of Gaussian filtering on the second sub-image P11*(1-mask1), image P22 is the effect of Gaussian filtering on the third sub-image P12*(1-mask1), and image P23 is the effect of Gaussian filtering on the fourth sub-image P13*(1-mask1).
[0038] Step 9: Select the tissue region portion in the downsampled image using the template marker matrix, and perform bilateral filtering on the tissue region portion image to obtain images P30, P31, P32, and P33. Image P30 is the effect of bilateral filtering on the first sub-image P10*(mask1), image P31 is the effect of bilateral filtering on the second sub-image P11*(mask1), image P32 is the effect of bilateral filtering on the third sub-image P12*(mask1), and image P33 is the effect of bilateral filtering on the fourth sub-image P13*(mask1).
[0039] Step 10: Fuse the non-tissue region filtered image and the tissue region filtered image to obtain images P40, P41, P42, and P43. Image P40 is obtained by performing a pixel-weighted average fusion method on images P20 and P30, where P40 = αP20 + βP30 (where α is the weight of image P20 and β is the weight of image P30). Image P41 is obtained by performing a pixel-weighted average fusion method on images P21 and P31, where P41 = αP21 + βP31. Image P42 is obtained by performing a pixel-weighted average fusion method on images P22 and P32, where P42 = αP22 + βP32. Image P43 is obtained by performing a pixel-weighted average fusion method on images P23 and P33, where P43 = αP23 + βP33.
[0040] Step 11: Perform upsampling processing (i.e., image resolution restoration processing) on the fused image, such as... Figure 3 As shown, specifically: according to the downsampling process in step 4, the reverse processing is performed to obtain image P3 with twice the resolution using images P40, P41, P42 and P43.
[0041] Step 12: Perform image fusion on the edge portion image P2 and image P3 to achieve denoising of the non-organic region image and enhancement of the organized region image. The image fusion method can be the pixel-weighted average fusion method.
[0042] It is easy to see that this invention uses gradient images and gradient directions to divide pixels into tissue regions and non-tissue regions, reducing the loss of image information caused by segmenting tissue regions and non-tissue regions solely based on pixel intensity. This invention uses edge extraction results and denoising effects to perform image overlay and fusion, avoiding edge blurring caused by denoising. This invention applies Gaussian filtering to the non-tissue region portion of the image and bilateral filtering to the tissue region portion, achieving image edge enhancement.
[0043] A second embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the ultrasound image denoising method of the first embodiment.
[0044] The third embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the ultrasound image denoising method of the first embodiment.
[0045] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0046] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0047] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0048] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0049] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0050] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for denoising ultrasound images, characterized in that, Includes the following steps: (1) Acquire multiple consecutive ultrasound images; (2) Register adjacent ultrasound images and stack the average values of the registered ultrasound images to obtain a stacked image; (3) Perform downsampling on the stacked image, extract the gradient image of the downsampled image, and calculate the gradient magnitude and gradient direction of the pixel based on the gradient image; (4) Generate a template marking matrix by using the gradient magnitude and gradient direction of the pixel as matrix elements, and determine the type of the pixel according to the gradient magnitude and gradient direction of the pixel. When the pixel is an organized region, set the corresponding position of the template marking matrix to 1, and when the pixel is an unorganized region, set the corresponding position of the template marking matrix to 0. (5) Select the non-tissue region and tissue region in the downsampled image using the template marking matrix, perform Gaussian filtering on the non-tissue region to obtain the non-tissue region filtered image, and perform bilateral filtering on the tissue region image to obtain the tissue region filtered image. (6) The non-tissue region filtered image and the tissue region filtered image are fused together, and the fused image is upsampled to obtain a restored image, the restored image having the same resolution as the stacked image.
2. The ultrasound image denoising method according to claim 1, characterized in that, Step (2) specifically involves: performing Fourier transform on adjacent ultrasound images, calculating the cross power spectrum of the two transformed images, performing inverse Fourier transform on the cross power spectrum to obtain the Dirac function, using the coordinates of the peak value of the Dirac function as the offset of adjacent ultrasound images, adjusting the position of the two adjacent images according to the offset, and stacking the average values to obtain a stacked image.
3. The ultrasound image denoising method according to claim 1, characterized in that, Step (3) specifically includes: The odd-numbered rows and columns of the stacked image are extracted to form a first sub-image; the odd-numbered rows and even-numbered columns of the stacked image are extracted to form a second sub-image; the even-numbered rows and odd-numbered columns of the stacked image are extracted to form a third sub-image; and the even-numbered rows and even-numbered columns of the stacked image are extracted to form a fourth sub-image. Edge detection is performed on the first, second, third, and fourth sub-images respectively, and gradient images at 0° and 90° are detected for each sub-image; The gradient magnitude and gradient direction of each pixel in each sub-image are calculated using gradient images at 0° and 90°.
4. The ultrasound image denoising method according to claim 3, characterized in that, In step (4), the type of a pixel is determined based on its gradient magnitude and gradient direction. Specifically, the mean square error of the gradient magnitude and the mean square error of the gradient direction are calculated based on the gradient magnitude and gradient direction of the pixel in each sub-image. If the mean square error of the gradient magnitude of a pixel is less than the gradient magnitude threshold and the mean square error of the gradient direction is less than the gradient direction threshold, then the pixel is determined to be an organized region; otherwise, it is a non-organized region.
5. The ultrasound image denoising method according to claim 1, characterized in that, In step (6), a pixel-weighted average fusion method is used to fuse the filtered image of the non-tissue region and the filtered image of the tissue region.
6. The ultrasound image denoising method according to claim 1, characterized in that, Also includes: Edges are extracted from the ultrasound image to obtain an edge portion image; the edge portion image is then fused with the restored image.
7. The ultrasound image denoising method according to claim 6, characterized in that, When the edge portion image is fused with the restored image, a pixel-weighted average fusion method is used.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the ultrasound image denoising method as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the ultrasound image denoising method as described in any one of claims 1-7.
Citation Information
Patent Citations
Real-time medical video image denoising method
CN102014240A
Ultrasonic image denoising method, device and equipment and computer readable storage medium
CN113538299A