Image processing method and device, computer device and storage medium

By performing structural tensor eigenvalue correction processing on the images from the ultrasound imaging system, combined with speckle noise suppression and edge enhancement methods, the problem of image detail loss in existing technologies is solved, and better image correction results are achieved.

CN115496688BActive Publication Date: 2026-04-28WUHAN UNITED IMAGING HEALTHCARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNITED IMAGING HEALTHCARE CO LTD
Filing Date
2022-09-27
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing ultrasound imaging system image correction methods, while suppressing speckle noise, are prone to causing the loss of image detail information, resulting in poor correction effects.

Method used

By obtaining the initial feature values ​​of the structure tensor of the initial image, and then performing correction processing, the modified feature values ​​are used for speckle noise suppression and edge enhancement. Finally, the speckle noise suppressed image and the enhanced image are fused together.

Benefits of technology

While suppressing speckle noise, it preserves and enhances the edge details of the image, thus improving the correction effect of ultrasound images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496688B_ABST
    Figure CN115496688B_ABST
Patent Text Reader

Abstract

The application relates to an image processing method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining initial eigenvalues of a structure tensor of an initial image; the initial eigenvalues represent diffusion coefficients for diffusion in the direction of an eigen vector of the structure tensor; performing correction processing on the initial eigenvalues of the structure tensor to obtain corrected eigenvalues; performing speckle noise suppression processing on the initial image based on the corrected eigenvalues to obtain a speckle noise suppression image corresponding to the initial image, and performing edge enhancement processing on the initial image to obtain an enhanced image corresponding to the initial image; and performing fusion processing on the speckle noise suppression image and the enhanced image to obtain a processed image corresponding to the initial image. The method can improve the enhancement effect of an ultrasonic imaging image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasound imaging technology, and in particular to an image processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] In the field of ultrasound imaging, the obtained images often contain a lot of speckle noise, which affects the image quality. Therefore, it is necessary to correct the images obtained by the ultrasound imaging system.

[0003] Currently, most methods for correcting images obtained from ultrasound imaging systems involve filtering to suppress speckle noise. These methods typically replace noisy pixels with the mean or median value of the pixel values ​​within the noisy pixel region. However, while this replacement method filters out noise, it also replaces the pixel information of non-noisy pixels, resulting in the loss of some image details.

[0004] Therefore, the correction effect of current ultrasound image enhancement methods is relatively poor. Summary of the Invention

[0005] Therefore, it is necessary to provide an image processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the technical problem that the correction effect of the above-mentioned ultrasound image correction methods is relatively poor.

[0006] Firstly, this application provides an image processing method. The method includes:

[0007] Obtain the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that spread along the direction of the feature vector of the structure tensor.

[0008] The initial eigenvalues ​​of the structure tensor are corrected to obtain the corrected eigenvalues.

[0009] Based on the corrected feature values, the initial image is subjected to speckle noise suppression processing to obtain a speckle noise suppressed image corresponding to the initial image; and the initial image is subjected to edge enhancement processing to obtain an enhanced image corresponding to the initial image.

[0010] The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

[0011] In one embodiment, the step of performing speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain a speckle noise-suppressed image corresponding to the initial image includes:

[0012] Based on the corrected eigenvalues ​​and the eigenvectors, the diffusion tensor of the initial image is determined;

[0013] The image gradient of the initial image is obtained, and the anisotropic diffusion information of the initial image is obtained based on the diffusion tensor and the image gradient; the anisotropic diffusion information represents the rate of change of the image grayscale value of the initial image at a certain moment;

[0014] Based on the anisotropic diffusion information, the initial image is subjected to speckle noise suppression processing to obtain the speckle noise suppressed image corresponding to the initial image.

[0015] In one embodiment, the feature vector is a three-dimensional feature vector, and the corrected feature values ​​include three feature values ​​corresponding to the three-dimensional feature vector;

[0016] In one embodiment, the step of correcting the initial eigenvalues ​​of the structure tensor to obtain corrected eigenvalues ​​includes:

[0017] In the uniformly organized region of the initial image, the three eigenvalues ​​of the corrected feature value are approximately equal, and in the edge region of the initial image, the largest of the three eigenvalues ​​of the corrected feature value will stop spreading as the correction target. The initial feature values ​​of the structure tensor are then corrected to obtain the corrected feature values.

[0018] In one embodiment, the correction formula for correcting the initial eigenvalues ​​of the structure tensor is:

[0019] λ1=c1

[0020] λ2=c1

[0021]

[0022] Where λ1, λ2, and λ3 represent the three corrected eigenvalues, exp represents an exponential function with the natural constant e as the base, α is a constant determining the diffusion amount, β is a positive number determining the edge enhancement amount, and K and c1 are constants; where C = (μ1 - μ3). 2 C represents the square of the difference between the maximum and minimum values ​​among the three initial eigenvalues ​​μ1, μ2, and μ3.

[0023] In one embodiment, performing edge enhancement processing on the initial image to obtain an enhanced image corresponding to the initial image includes:

[0024] Based on the corrected feature values, edge enhancement processing is performed on the initial image to obtain the enhanced image corresponding to the initial image.

[0025] In one embodiment, the step of performing edge enhancement processing on the initial image based on the corrected feature values ​​to obtain an enhanced image corresponding to the initial image includes:

[0026] Based on the corrected feature values, edge extraction processing is performed on the initial image to obtain the image edge region of the initial image;

[0027] Edge enhancement processing is performed on the edge regions of the image to obtain the enhanced image corresponding to the initial image.

[0028] In one embodiment, the corrected feature values ​​include three feature values, and the edge extraction processing of the initial image based on the corrected feature values ​​to obtain the image edge region of the initial image includes:

[0029] For each pixel in the initial image, two target feature values ​​are determined from the three corrected feature values ​​corresponding to the pixel; the two target feature values ​​include the feature value with the largest value and the feature value with the smallest value among the three corrected feature values.

[0030] If the difference between the two target feature values ​​is greater than a threshold, then the pixel is determined to be at the image edge of the initial image;

[0031] Based on the extracted pixels located at the image edges, the image edge region of the initial image is obtained.

[0032] In one embodiment, the step of fusing the noise-suppressed image and the enhanced image to obtain the processed image corresponding to the initial image includes:

[0033] The edge enhancement results of the enhanced image are filtered using a preset filtering method to obtain the filtered enhanced image.

[0034] The noise-suppressed image and the filtered enhanced image are fused to obtain the processed image.

[0035] Secondly, this application also provides an image processing apparatus. The apparatus includes:

[0036] An acquisition module is used to acquire the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that diffuse along the direction of the feature vector of the structure tensor.

[0037] The correction module is used to correct the initial eigenvalues ​​of the structural tensor to obtain the corrected eigenvalues.

[0038] The processing module is used to perform speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain a speckle noise suppressed image corresponding to the initial image, and to perform edge enhancement processing on the initial image to obtain an enhanced image corresponding to the initial image;

[0039] The fusion module is used to fuse the noise-suppressed image and the enhanced image to obtain the processed image corresponding to the initial image.

[0040] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0041] Obtain the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that spread along the direction of the feature vector of the structure tensor.

[0042] The initial eigenvalues ​​of the structure tensor are corrected to obtain the corrected eigenvalues.

[0043] Based on the corrected feature values, the initial image is subjected to speckle noise suppression processing to obtain a speckle noise suppressed image corresponding to the initial image; and the initial image is subjected to edge enhancement processing to obtain an enhanced image corresponding to the initial image.

[0044] The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

[0045] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0046] Obtain the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that spread along the direction of the feature vector of the structure tensor.

[0047] The initial eigenvalues ​​of the structure tensor are corrected to obtain the corrected eigenvalues.

[0048] Based on the corrected feature values, the initial image is subjected to speckle noise suppression processing to obtain a speckle noise suppressed image corresponding to the initial image; and the initial image is subjected to edge enhancement processing to obtain an enhanced image corresponding to the initial image.

[0049] The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

[0050] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0051] Obtain the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that spread along the direction of the feature vector of the structure tensor.

[0052] The initial eigenvalues ​​of the structure tensor are corrected to obtain the corrected eigenvalues.

[0053] Based on the corrected feature values, the initial image is subjected to speckle noise suppression processing to obtain a speckle noise suppressed image corresponding to the initial image; and the initial image is subjected to edge enhancement processing to obtain an enhanced image corresponding to the initial image.

[0054] The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

[0055] The aforementioned image processing method, apparatus, computer equipment, storage medium, and computer program product improve the image quality of the obtained noise-suppressed image and enhanced image by correcting the initial eigenvalues ​​of the structure tensor of the initial image, and then performing speckle noise suppression and edge enhancement processing on the initial image using the corrected eigenvalues. Finally, the noise-suppressed image and enhanced image are fused, so that the edge detail requirements of the image can be met while performing noise suppression, thereby enhancing the correction effect on the ultrasound image. Attached Figure Description

[0056] Figure 1 This is an application environment diagram of an image processing method in one embodiment;

[0057] Figure 2 This is a schematic diagram of the process for performing speckle noise suppression on an initial image in one embodiment;

[0058] Figure 3 This is a schematic diagram of the process of edge enhancement of an initial image in one embodiment;

[0059] Figure 4 This is a schematic diagram of the complete process of an image processing method in one embodiment;

[0060] Figure 5 This is a structural block diagram of an image processing device in one embodiment;

[0061] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0064] In one embodiment, such as Figure 1 As shown, an image processing method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. In this embodiment, the method includes the following steps:

[0065] Step S110: Obtain the initial eigenvalues ​​of the structure tensor of the initial image; the initial eigenvalues ​​represent the diffusion coefficients that spread along the eigenvectors of the structure tensor.

[0066] The initial image can be a three-dimensional ultrasound image.

[0067] The structure tensor is primarily used to distinguish between flat regions, edge regions, and corner regions in an image. The structure tensor of an image can be viewed as a structure matrix of the image.

[0068] The initial eigenvalues ​​of the structure tensor can be understood as the degree of diffusion in the direction of the eigenvector.

[0069] In practice, the initial eigenvalues ​​and eigenvectors of the structure tensor can be obtained by performing feature decomposition on the structure tensor of the initial image. The decomposition formula can be expressed as:

[0070]

[0071]

[0072] Where J(▽I) represents the structure tensor, ▽I represents the image gradient, and I in formula (1) x I y I z The initial image gradients in the x, y, and z directions are respectively represented by μ1, μ2, and μ3 in formula (2), where μ1, μ2, and μ3 represent the initial eigenvalues ​​along the directions of the three eigenvectors v1, v2, and v3, and v1, v2, and v3 represent the three eigenvectors respectively.

[0073] Step S120: Correct the initial eigenvalues ​​of the structure tensor to obtain the corrected eigenvalues.

[0074] Specifically, the initial eigenvalues ​​of the structure tensor are corrected to ensure that the three eigenvalues ​​included in the corrected eigenvalues ​​are approximately equal in the uniformly organized regions of the initial image, and to stop the diffusion of the largest eigenvalue among the three eigenvalues ​​in the edge regions of the initial image. Therefore, the correction targets are to ensure that the three eigenvalues ​​included in the corrected eigenvalues ​​are approximately equal in the uniformly organized regions of the initial image, and that the largest eigenvalue among the three eigenvalues ​​included in the corrected eigenvalues ​​stops spreading in the edge regions of the initial image. This process is then used to correct the initial eigenvalues ​​of the structure tensor, resulting in the corrected eigenvalues.

[0075] Step S130: Perform speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain the speckle noise suppressed image corresponding to the initial image, and perform edge enhancement processing on the initial image to obtain the enhanced image corresponding to the initial image.

[0076] In the specific implementation, the initial image is subjected to speckle noise suppression processing. First, the diffusion tensor of the initial image is determined based on the corrected eigenvalues ​​and eigenvectors of the structure tensor. Based on the diffusion tensor, the anisotropic diffusion information of the initial image is determined. Finally, based on the anisotropic diffusion information of the initial image, the initial image is subjected to speckle noise suppression processing to obtain the speckle noise suppressed image corresponding to the initial image.

[0077] Edge enhancement processing of the initial image can be performed on the entire initial image, or the edge regions of the initial image can be extracted and the edge enhancement processing can be performed only on the edge regions to reduce the scope of edge enhancement processing and improve image processing efficiency.

[0078] Step S140: The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

[0079] In practice, the noise-suppressed image and the enhanced image can be fused using a weighted method. Specifically, a first weight for the noise-suppressed image and a second weight for the enhanced image can be determined separately. The pixel values ​​of each pixel in the noise-suppressed image are weighted using the first weight to obtain a first weighted pixel value. The pixel values ​​of each pixel in the enhanced image are weighted using the second weight to obtain a second weighted pixel value. Finally, the pixel values ​​of pixels at the same position in the noise-suppressed image and the enhanced image are added together to obtain a fused pixel value for each pixel. Based on the fused pixel values ​​of each pixel, the processed image is obtained.

[0080] The image processing method described above modifies the initial feature values ​​of the structural tensor of the initial image, and then applies the modified feature values ​​to the initial image for speckle noise suppression and edge enhancement, thereby improving the image quality of the obtained speckle noise suppressed image and enhanced image. Finally, the speckle noise suppressed image and enhanced image are fused, so that the edge detail requirements of the image can be met while performing speckle noise suppression, thus enhancing the correction effect on the ultrasound image.

[0081] In one exemplary embodiment, such as Figure 2 As shown, in step S130, the initial image is subjected to speckle noise suppression processing based on the corrected feature values ​​to obtain the speckle noise suppressed image corresponding to the initial image. This can be achieved through the following steps:

[0082] Step S210: Determine the diffusion tensor of the initial image based on the corrected eigenvalues ​​and eigenvectors;

[0083] Step S220: Obtain the image gradient of the initial image. Based on the diffusion tensor and the image gradient, obtain the anisotropic diffusion information of the initial image. The anisotropic diffusion information represents the rate of change of the image grayscale value of the initial image at a certain moment.

[0084] Step S230: Based on the anisotropic diffusion information, the initial image is subjected to speckle noise suppression processing to obtain the speckle noise suppressed image corresponding to the initial image.

[0085] The diffusion tensor D controls the diffusion of the image and can be represented by a 3D matrix as follows:

[0086]

[0087] Image gradient is used to calculate the rate of change of an image. If the image is viewed as a two-dimensional discrete function, the image gradient can be understood as the derivative of this two-dimensional discrete function. The image gradient is generally approximated (approximate derivative value) by calculating the difference between pixel values.

[0088] The three-dimensional anisotropic diffusion equation can be expressed as:

[0089] Where ▽I represents the image gradient, D represents the diffusion tensor, and div represents the divergence function. Divergence is a vector operator in vector analysis that maps a vector field in vector space to a scalar field. Divergence describes whether a point in the vector field is a convergence point or a source point. The anisotropic diffusion equation can be understood as the rate of change of the image grayscale value at time t.

[0090] In the specific implementation, the process of determining the diffusion tensor D based on the corrected eigenvalues ​​λ1, λ2, λ3 and eigenvectors v1, v2, v3 can be represented by the following formula (3): the eigenvectors v1, v2, v3 are combined into a 3×1 first matrix, the transpose matrices of the eigenvectors v1, v2, v3 are combined into a 1×3 third matrix, and the corrected eigenvalues ​​λ1, λ2, λ3 are combined into a 3×3 second matrix. The product between the first matrix, the second matrix and the third matrix is ​​calculated to obtain the diffusion tensor D.

[0091]

[0092] After obtaining the diffusion tensor D of the initial image, the image gradient of the initial image is obtained, that is, the derivative of the initial image is calculated. The derivative is the difference between two adjacent pixels in the horizontal or vertical direction. The image gradient ▽I is obtained by the derivative. Furthermore, the diffusion tensor D and the image gradient ▽I can be substituted into the three-dimensional anisotropic diffusion equation to obtain the anisotropic diffusion information of the initial image. The process of determining the anisotropic diffusion information can be represented by the following formula (4).

[0093]

[0094] Among them, in formula (4) It can represent anisotropic diffusion information, div represents the divergence function, and I represents the initial image. These represent the diffusion information of the initial image in the x, y, and z directions, respectively.

[0095] Furthermore, by performing speckle noise suppression processing on the initial image based on anisotropic diffusion information, the product of anisotropic diffusion information and time can be regarded as an increment, which is added to the initial image to obtain the speckle noise-suppressed image, which can be expressed by the formula:

[0096]

[0097] Among them, I * This represents the image with noise suppression, and I represents the initial image. This represents the increment corresponding to anisotropic diffusion information.

[0098] In this embodiment, anisotropic diffusion information is first obtained through the diffusion tensor and image gradient of the initial image. Then, based on the anisotropic diffusion information, the initial image is subjected to speckle noise suppression processing, which can enhance the image edges to a certain extent while preserving image details.

[0099] In an exemplary embodiment, the feature vector is a three-dimensional feature vector, and both the corrected feature value and the initial feature value include three feature values ​​corresponding to the three-dimensional feature vector. In step S120 above, the initial feature value of the structure tensor is corrected to obtain the corrected feature value. Specifically, the correction target is to use the uniformly organized region in the initial image where the three feature values ​​included in the corrected feature value are approximately equal, and the edge region in the initial image where the largest feature value among the three feature values ​​included in the corrected feature value will stop spreading. The initial feature value of the structure tensor is then corrected to obtain the corrected feature value.

[0100] Whether the largest eigenvalue stops diffusion can be determined by whether the largest eigenvalue approaches zero. The smaller the largest eigenvalue, the closer it is to zero, indicating that it is closer to the goal of stopping diffusion.

[0101] Specifically, the correction relation for adjusting the initial eigenvalues ​​can be expressed as:

[0102]

[0103] Where λ1, λ2, and λ3 represent the three corrected eigenvalues, exp represents an exponential function with the natural constant e as the base, α is a constant determining the diffusion amount, β is a negative number determining the edge enhancement amount, and K and c1 are constants. Where C = (μ1 - μ3) 2 C represents the square of the difference between the maximum and minimum values ​​among the three initial eigenvalues ​​μ1, μ2, and μ3.

[0104] In this model, α can be equal to λ1, λ2, and λ3, and α is usually set to 1. The absolute value of β determines the edge enhancement amount; the larger the absolute value, the more blurred the edge. Its value range is [-1, -0.1]. K is a pre-set threshold, which can be determined experimentally; the larger the K value, the more blurred the tissue. c1's value range is [0, 0.5]. It is understandable that in uniform tissue regions, the value of C will be very small, and the diffusion coefficients along the three eigenvector directions will be approximately equal, i.e., the eigenvalues ​​will be approximately equal. In edge regions, the diffusion coefficient will stop spreading and may even enhance the edge, because the corrected eigenvalue λ3 is negative. Since the diffusion coefficient determines the diffusion amount, when the diffusion amount in the edge region is negative, it can enhance the edge to some extent.

[0105] In this embodiment, the initial feature values ​​are corrected by taking advantage of the different characteristics of the uniformly organized region and the edge region, so that the corrected feature values ​​are more consistent with the characteristics of the image, thereby ensuring the accuracy of the anisotropic diffusion information determined subsequently based on the corrected feature values.

[0106] In an exemplary embodiment, step S130, which involves performing edge enhancement processing on the initial image to obtain an enhanced image corresponding to the initial image, specifically includes: performing edge enhancement processing on the initial image based on the corrected feature values ​​to obtain an enhanced image corresponding to the initial image.

[0107] Furthermore, in an exemplary embodiment, such as Figure 3 As shown, based on the corrected feature values, edge enhancement processing is performed on the initial image to obtain the enhanced image corresponding to the initial image. This can be achieved through the following steps:

[0108] Step S310: Based on the corrected feature values, perform edge extraction processing on the initial image to obtain the image edge region of the initial image;

[0109] Step S320: Perform edge enhancement processing on the edge regions of the image to obtain the enhanced image corresponding to the initial image.

[0110] In the specific implementation, each pixel in the initial image corresponds to three feature values, and each feature value corresponds to the direction of a feature vector. Edge extraction of the initial image can be achieved through the three corrected feature values ​​corresponding to each pixel.

[0111] More specifically, for each pixel, the difference between the largest and smallest feature values ​​among the three corrected feature values ​​corresponding to that pixel is calculated, the relationship between the difference and a preset threshold is determined, and the pixels in the image edge region are extracted based on the determination result, thereby obtaining the image edge region of the initial image. Further edge enhancement processing can be performed on the extracted image edge region to obtain the enhanced image corresponding to the initial image.

[0112] Further, in an exemplary embodiment, in step S320, based on the corrected feature values, edge extraction processing is performed on the initial image to obtain the image edge region of the initial image, including:

[0113] Step S3201: For each pixel in the initial image, determine two target feature values ​​of the pixel from the three corrected feature values ​​corresponding to the pixel; the two target feature values ​​include the feature value with the largest value and the feature value with the smallest value among the three corrected feature values.

[0114] Step S3202: If the difference between two target feature values ​​is greater than a threshold, then the pixel is determined to be at the image edge of the initial image;

[0115] Step S3203: Based on the extracted pixels located at the image edges, the image edge region of the initial image is obtained.

[0116] In practical implementation, pixels in uniform regions dominated by speckle noise are isotropic. Therefore, for each pixel in the initial image, if the difference between the largest and smallest eigenvalues ​​corresponding to that pixel is small, the pixel is considered to be speckle noise; if the difference between the largest and smallest eigenvalues ​​is large, the pixel can be considered to be located in the image edge region. Therefore, the edge region of the image can be obtained by setting a threshold or by automatically calculating the threshold. The threshold can be determined by calculating the average difference between two target eigenvalues ​​of each pixel in the initial image. The implementation method of extracting the edge region by threshold can be expressed as follows:

[0117]

[0118] Where M(x,y,z) represents the edge information at pixel (x,y,z), μ1(x,y,z) and μ2(x,y,z) represent the two target feature values ​​corresponding to pixel (x,y,z), and l, m, and n represent the length, width, and height of the initial image, respectively. μ1(i,j,k) and μ2(i,j,k) represent the calculated threshold values, and μ1(i,j,k) and μ2(i,j,k) represent the two target feature values ​​corresponding to pixel (i,j,k).

[0119] The above formula indicates that when the difference between the two target feature values ​​corresponding to a pixel (x, y, z) is greater than the threshold, the value of that pixel is 1, indicating that the pixel is located at the edge of the initial image. Conversely, when the difference between the two target feature values ​​corresponding to a pixel (x, y, z) is less than or equal to the threshold, the value of that pixel is 1, indicating that the pixel is not a pixel in the edge region of the image.

[0120] The above embodiments improve the accuracy of the extracted image edge regions by using the modified feature values ​​of the structure tensor for edge extraction.

[0121] In an exemplary embodiment, step S140 above, which involves fusing the speckle-suppressed image and the enhanced image to obtain a processed image corresponding to the initial image, includes:

[0122] The edge enhancement results of the enhanced image are filtered using a preset filtering method to obtain the filtered enhanced image.

[0123] The noise-suppressed image and the filtered enhanced image are fused together to obtain the processed image.

[0124] In practice, since edge enhancement usually only needs to enhance strong texture regions, in order to avoid introducing too much noise into the edge enhancement process, it is necessary to further filter the edge enhancement results. Specifically, the findContours function can be used to filter the edge enhancement results. There are various filtering methods, such as morphological operations, filtering based on features such as contour area and perimeter, and using machine learning to classify contours. The enhanced image obtained after filtering is fused with the noise-suppressed image to obtain the processed image.

[0125] Further, in an exemplary embodiment, fusing the speckle-suppressed image and the filtered enhanced image to obtain a processed image includes: obtaining a first weight of the filtered enhanced image; determining a second weight of the speckle-suppressed image based on the first weight of the filtered enhanced image; wherein the second weight of the speckle-suppressed image is negatively correlated with the first weight; and fusing the speckle-suppressed image and the filtered enhanced image according to the first weight and the second weight to obtain a processed image.

[0126] Specifically, let the enhanced image obtained after edge enhancement processing be E, and the filtered enhanced image can be represented as findContours(E). Assume that the first weight of the filtered enhanced image is w, the noise suppression image is R, and the second weight of the noise suppression image is negatively correlated with the first weight. Specifically, the second weight can be represented as 1 - d1w. Then, according to the first and second weights, the noise suppression image and the filtered enhanced image are weighted and summed to obtain the processed image, which can be expressed by the following formula:

[0127] (1-d1w)R+w﹒ findContours(E)

[0128] Where d1 is a set coefficient, and d1 and w together determine the weight of the noise-suppressed image R after noise suppression. The weight of noise suppression needs to decrease as the weight of edge enhancement increases.

[0129] In this embodiment, by filtering the edge enhancement results, the image processing efficiency can be improved. By fusing the initial image with the noise-suppressed image and the filtered enhanced image, the edge detail information of the image can be preserved while removing the noise suppression.

[0130] In one exemplary embodiment, such as Figure 4 The diagram shows a complete flowchart of an image processing method, including the following steps:

[0131] Step S410: Obtain the initial eigenvalues ​​of the structure tensor of the initial image; the initial eigenvalues ​​represent the diffusion coefficients along the direction of the eigenvector of the structure tensor; the eigenvector is a three-dimensional eigenvector, and the corrected eigenvalues ​​include three eigenvalues ​​corresponding to the three-dimensional eigenvector;

[0132] Step S420: Correct the initial eigenvalues ​​of the structure tensor to obtain the corrected eigenvalues;

[0133] Step S4301: Determine the diffusion tensor of the initial image based on the corrected eigenvalues ​​and eigenvectors;

[0134] Step S4302: Obtain the image gradient of the initial image. Based on the diffusion tensor and the image gradient, obtain the anisotropic diffusion information of the initial image. The anisotropic diffusion information represents the rate of change of the image grayscale value of the initial image at a certain moment.

[0135] Step S4303: Based on the anisotropic diffusion information, the initial image is subjected to speckle noise suppression processing to obtain the speckle noise suppressed image corresponding to the initial image;

[0136] Step S4401: For each pixel in the initial image, determine two target feature values ​​of the pixel from the three corrected feature values ​​corresponding to the pixel; the two target feature values ​​include the feature value with the largest value and the feature value with the smallest value among the three corrected feature values.

[0137] Step S4402: If the difference between two target feature values ​​is greater than a threshold, then the pixel is determined to be at the image edge of the initial image.

[0138] Step S4403: Based on the extracted pixels located at the image edges, obtain the image edge region of the initial image;

[0139] Step S4404: Perform edge enhancement processing on the image edge region to obtain the enhanced image corresponding to the initial image;

[0140] Step S4405: The edge enhancement results of the enhanced image are filtered using a preset filtering method to obtain the filtered enhanced image;

[0141] Step S450: The noise-suppressed image and the filtered enhanced image are fused to obtain the processed image.

[0142] The image processing method provided in this embodiment corrects the initial feature values ​​of the structure tensor of the initial image, and then performs speckle noise suppression and edge enhancement processing on the initial image using the corrected feature values. This improves the image quality of the obtained speckle noise suppressed image and enhanced image. Finally, the speckle noise suppressed image and enhanced image are fused together, so that the edge detail requirements of the image can be met while performing speckle noise suppression, thereby enhancing the correction effect on the ultrasound image.

[0143] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0144] Based on the same inventive concept, this application also provides an image processing apparatus for implementing the image processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more image processing apparatus embodiments provided below can be found in the limitations of the image processing method described above, and will not be repeated here.

[0145] In one embodiment, such as Figure 5 As shown, an image processing apparatus is provided, comprising:

[0146] The acquisition module 510 is used to acquire the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients that spread along the direction of the feature vector of the structure tensor.

[0147] The correction module 520 is used to correct the initial eigenvalues ​​of the structural tensor to obtain the corrected eigenvalues.

[0148] The processing module 530 is used to perform speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain a speckle noise suppressed image corresponding to the initial image, and to perform edge enhancement processing on the initial image to obtain an enhanced image corresponding to the initial image.

[0149] The fusion module 540 is used to fuse the noise-suppressed image and the enhanced image to obtain the processed image corresponding to the initial image.

[0150] In one embodiment, the processing module 530 includes a speckle noise suppression submodule, configured to determine the diffusion tensor of the initial image based on the corrected feature values ​​and the feature vector; obtain the image gradient of the initial image; and obtain anisotropic diffusion information of the initial image based on the diffusion tensor and the image gradient; the anisotropic diffusion information represents the rate of change of the image grayscale value of the initial image at a certain moment; and perform speckle noise suppression processing on the initial image based on the anisotropic diffusion information to obtain a speckle noise suppressed image corresponding to the initial image.

[0151] In one embodiment, the feature vector is a three-dimensional feature vector, and the corrected feature value includes three feature values ​​corresponding to the three-dimensional feature vector; the correction module 520 is specifically used to correct the initial feature value of the structure tensor by taking a uniformly organized region in the initial image, where the three feature values ​​included in the corrected feature value are approximately equal, and an edge region in the initial image, where the largest feature value among the three feature values ​​included in the corrected feature value will stop spreading as the correction target, to obtain the corrected feature value.

[0152] In one embodiment, the correction formula for correcting the initial eigenvalues ​​of the structure tensor is:

[0153] λ1=c1

[0154] λ2=c1

[0155]

[0156] Where λ1, λ2, and λ3 represent the three corrected eigenvalues, exp represents an exponential function with the natural constant e as the base, α is a constant determining the diffusion amount, β is a negative number determining the edge enhancement amount, and K and c1 are constants; where C = (μ1 - μ3). 2 C represents the square of the difference between the maximum and minimum values ​​among the three initial eigenvalues ​​μ1, μ2, and μ3.

[0157] In one embodiment, the processing module 530 includes an image enhancement submodule for performing edge enhancement processing on the initial image based on the corrected feature values ​​to obtain an enhanced image corresponding to the initial image.

[0158] In one embodiment, the image enhancement submodule is further configured to perform edge extraction processing on the initial image based on the corrected feature values ​​to obtain the image edge region of the initial image; and perform edge enhancement processing on the image edge region to obtain the enhanced image corresponding to the initial image.

[0159] In one embodiment, the image enhancement submodule is further configured to, for each pixel in the initial image, determine two target feature values ​​for the pixel from three corrected feature values ​​corresponding to the pixel; the two target feature values ​​include the feature value with the largest value and the feature value with the smallest value among the three corrected feature values; if the difference between the two target feature values ​​is greater than a threshold, then the pixel is determined to be located at the image edge of the initial image; based on the extracted pixels located at the image edge, the image edge region of the initial image is obtained.

[0160] In one embodiment, the fusion module 540 is used to filter the edge enhancement results of the enhanced image using a preset filtering method to obtain a filtered enhanced image; and to fuse the noise suppression image and the filtered enhanced image to obtain the processed image.

[0161] Each module in the aforementioned image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0162] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an image processing method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0163] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0164] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0165] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0166] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0167] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image processing method, characterized in that, The method includes: Obtain the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients along the direction of the feature vector of the structure tensor, and the feature vector is a three-dimensional feature vector; The initial eigenvalues ​​of the structure tensor are corrected to obtain corrected eigenvalues. The corrected eigenvalues ​​include three eigenvalues ​​corresponding to the three-dimensional eigenvector. When correcting the initial eigenvalues, in a uniformly organized region in the initial image, the three eigenvalues ​​included in the corrected eigenvalues ​​tend to be equal. In the edge region of the initial image, the largest eigenvalue among the three eigenvalues ​​included in the corrected eigenvalues ​​will stop spreading and become the correction target. Based on the corrected feature values, the initial image is subjected to speckle noise suppression processing to obtain a speckle noise suppressed image corresponding to the initial image; and based on the corrected feature values, the initial image is subjected to edge enhancement processing to obtain an enhanced image corresponding to the initial image. The noise-suppressed image and the enhanced image are fused to obtain the processed image corresponding to the initial image.

2. The method according to claim 1, characterized in that, The step of performing speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain a speckle noise suppressed image corresponding to the initial image includes: Based on the corrected eigenvalues ​​and the eigenvectors, the diffusion tensor of the initial image is determined; The image gradient of the initial image is obtained, and the anisotropic diffusion information of the initial image is obtained based on the diffusion tensor and the image gradient; the anisotropic diffusion information represents the rate of change of the image grayscale value of the initial image at a certain moment; Based on the anisotropic diffusion information, the initial image is subjected to speckle noise suppression processing to obtain the speckle noise suppressed image corresponding to the initial image.

3. The method according to claim 1, characterized in that, The correction formula for the initial eigenvalues ​​of the structure tensor is as follows: Where λ1, λ2, and λ3 represent the three corrected eigenvalues, exp represents an exponential function with the natural constant e as the base, α is a constant determining the diffusion amount, β is a negative number determining the edge enhancement amount, and K and c1 are constants; where C = (μ1-μ3). 2 C represents the square of the difference between the maximum and minimum values ​​among the three initial eigenvalues ​​μ1, μ2, and μ3.

4. The method according to claim 1, characterized in that, The step of performing edge enhancement processing on the initial image based on the corrected feature values ​​to obtain the enhanced image corresponding to the initial image includes: Based on the corrected feature values, edge extraction processing is performed on the initial image to obtain the image edge region of the initial image; Edge enhancement processing is performed on the edge regions of the image to obtain the enhanced image corresponding to the initial image.

5. The method according to claim 4, characterized in that, The corrected feature values ​​include three feature values. Based on these corrected feature values, edge extraction processing is performed on the initial image to obtain the image edge region of the initial image, including: For each pixel in the initial image, two target feature values ​​are determined from the three corrected feature values ​​corresponding to the pixel; the two target feature values ​​include the feature value with the largest value and the feature value with the smallest value among the three corrected feature values. If the difference between the two target feature values ​​is greater than a threshold, then the pixel is determined to be at the image edge of the initial image; Based on the extracted pixels located at the image edges, the image edge region of the initial image is obtained.

6. The method according to claim 1, characterized in that, The step of fusing the noise-suppressed image and the enhanced image to obtain the processed image corresponding to the initial image includes: The edge enhancement results of the enhanced image are filtered using a preset filtering method to obtain the filtered enhanced image. The noise-suppressed image and the filtered enhanced image are fused to obtain the processed image.

7. An image processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the initial feature values ​​of the structure tensor of the initial image; the initial feature values ​​represent the diffusion coefficients along the direction of the feature vector of the structure tensor, and the feature vector is a three-dimensional feature vector; The correction module is used to correct the initial eigenvalues ​​of the structural tensor to obtain corrected eigenvalues; the corrected eigenvalues ​​include three eigenvalues ​​corresponding to the three-dimensional eigenvector. The correction module is further configured to uniformly organize regions in the initial image, wherein the three feature values ​​included in the corrected feature values ​​are approximately equal; and in the edge regions of the initial image, the largest feature value among the three feature values ​​included in the corrected feature values ​​will stop spreading as the correction target, thereby correcting the initial feature values. The processing module is configured to perform speckle noise suppression processing on the initial image based on the corrected feature values ​​to obtain a speckle noise suppressed image corresponding to the initial image, and to perform edge enhancement processing on the initial image based on the corrected feature values ​​to obtain an enhanced image corresponding to the initial image. The fusion module is used to fuse the noise-suppressed image and the enhanced image to obtain the processed image corresponding to the initial image.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the image processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the image processing method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for enhancing ultrasonograph quality

    CN101452574A

  • Infrared image noise suppression method for enhancing details

    CN111652809A