Image processing method and system for ultrasonic elastography
By constructing the chromatic difference remarkability and brightness characteristic values, adaptively adjusting the local window size, solving the problems of image smoothness and noise control in ultrasonic elastic imaging, improving image clarity and detail retention, and improving diagnostic accuracy.
Patent Information
- Application Number
- CN202510652484.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-21
AI Technical Summary
During the image enhancement process of existing ultrasonic elastic imaging technology, the fixed local window size makes it difficult to balance image smoothness and noise control, affecting image clarity and diagnostic accuracy.
By analyzing the grayscale value distribution and change trends in edge pixel points and their neighborhoods, we construct chromatic aberration remarkability, detail complexity and brightness characteristic values, adaptively adjust the local window size, and combine the adaptive contrast enhancement algorithm for image enhancement.
It improves the clarity and contrast of the image, retains more detailed information, helps doctors to more accurately evaluate the elastic modulus and strain distribution of the tissue, and improves the accuracy of the diagnosis.
Smart Images

Figure CN120182158B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image enhancement technology, and in particular to an image processing method and system for ultrasonic elastography. Background Art
[0002] The elasticity (or hardness) of biological tissue is closely related to the biological characteristics of the lesion and has important reference value for disease diagnosis. The basic principle of ultrasound elastography is to apply an internal or external, dynamic or static stimulus to the tissue. Under the influence of physical laws such as elasticity and biomechanics, the tissue will produce a response, for example, the distribution of displacement, strain, and velocity will undergo a certain change. After collecting the radio frequency signals before and after the excitation, the response within the tissue can be estimated using ultrasound imaging methods combined with digital signal processing or digital image processing technology, thereby indirectly or directly reflecting the differences in mechanical properties such as the elastic modulus within the tissue, and achieving the differentiation between benign and malignant tumors.
[0003] Ultrasound elastography relies primarily on tissue elasticity for diagnosis, and image clarity and contrast are crucial for accurately determining tissue elastic characteristics. Image enhancement can reduce noise and artifacts, improve image contrast and detail, and enable physicians to more accurately assess tissue elastic modulus and strain distribution. When using the Adaptive Contrast Enhancement (ACE) algorithm to enhance contrast in ultrasound elastography images, the size of the local window for each pixel is fixed. Setting the local window too large results in smoother images and loss of detail, while setting the local window too small increases image noise, compromising the image enhancement effect. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide an image processing method and system for ultrasonic elastography. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides an image processing method for ultrasonic elastography, the method comprising the following steps:
[0006] Obtain each patient's ultrasound elasticity image and its grayscale image and YCrCb image;
[0007] Extract all edge pixels from the grayscale image and segment the grayscale image into multiple superpixel blocks. In each superpixel block, determine the trend change value of each edge pixel based on the extreme distribution and change trend of the grayscale values of all pixels in any direction of its neighborhood. Combined with the extreme distribution of the grayscale values of each edge pixel and all edge pixels in its neighborhood, determine the color difference significance of each pixel.
[0008] In the grayscale image, the coordinates of all edge pixels are clustered to obtain the local density of each edge pixel, and a window is divided with each pixel as the center. The density distribution value of each pixel is determined based on the average distribution of the local density of all edge pixels within the window of each pixel. The detail complexity of each pixel is determined in combination with the color difference significance.
[0009] Determine the brightness characteristic value of each pixel based on the degree of confusion and discreteness of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image, and determine the detail richness of each pixel in combination with the detail complexity;
[0010] Based on the detail richness and the preset window side length, a local window of each pixel point is determined to enhance the YCrCb image of the ultrasonic elastic image.
[0011] Preferably, the expression of the trend change value of each edge pixel point is: Where, Indicates the trend change value of edge pixel point p; 、 They represent the extreme difference of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the extreme difference of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p; 、 They represent the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p; Represents the number of all neighborhood directions of edge pixel point p, where neighborhood direction k is the uniform division of the neighborhood of pixel point p. The kth direction among directions; represents the DTW distance.
[0012] Preferably, the method for determining the color difference significance of each pixel point is:
[0013] Pixels are divided into edge pixels and non-edge pixels. The range of the grayscale values of each edge pixel and all edge pixels in its neighborhood is recorded as the edge range of each edge pixel. The ratio of the trend change value of each edge pixel to the edge range is used as the color difference significance of each edge pixel.
[0014] The result of multiplying the minimum value of the color difference significance of all edge pixels by the preset value is used as the color difference significance of each non-edge pixel.
[0015] Preferably, the density distribution value of each pixel point is the average of the local densities of all edge pixels within the window of each pixel point.
[0016] Preferably, the detail complexity of each pixel is the product of the color difference significance and the density distribution value of each pixel.
[0017] Preferably, the method for determining the brightness characteristic value of each pixel is:
[0018] Calculate the information entropy of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image;
[0019] Calculate the ratio of the maximum to minimum brightness values of all pixels in the YCrCb image within the window of each pixel;
[0020] The brightness characteristic value of each pixel is the product of the discrete degree of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image, the information entropy and the ratio.
[0021] Preferably, the detail richness of each pixel is the product of the detail complexity of each pixel and the brightness characteristic value.
[0022] Preferably, the method for determining the local window of each pixel point is:
[0023] The local window side length of pixel i The expression is: Where, Indicates the preset window side length; Indicates the detail richness of pixel i; It represents the mean value of detail richness of all pixels in the ultrasound elasticity image; Indicates the detail richness of all pixels in the ultrasonic elastic image; e and j represent a preset first value and a preset second value, respectively, where the preset first value is greater than the preset second value; represents an even function; max() represents the maximum value function.
[0024] Preferably, the YCrCb image of the ultrasonic elastic image is enhanced, comprising:
[0025] The brightness values corresponding to all pixels in the YCrCb image of each patient's ultrasound elasticity image are used as the input of the adaptive contrast enhancement algorithm, where the local window of each pixel is used as the window in the adaptive contrast enhancement algorithm. The Y channel image after contrast enhancement is output and merged with the Cr and Cb channels in the YCrCb image. The merged image is converted into RGB format to obtain the enhanced ultrasound elasticity image.
[0026] In a second aspect, an embodiment of the present application also provides an image processing system for ultrasonic elastography, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.
[0027] This application has at least the following beneficial effects:
[0028] This application constructs color difference significance by analyzing the distribution and change trend of the grayscale values of edge pixels and all pixels in their neighborhood. The beneficial effect of color difference significance is that it can reflect the degree of difference in color changes between pixels and their neighborhoods, which helps to highlight important edges or color mutations in ultrasound elasticity images, thereby better understanding the color changes in the pixel neighborhood, and helping to adaptively adjust the local window size to retain more detailed information.
[0029] This application constructs detail complexity by analyzing the distribution concentration of a pixel point and all edge pixels within its window, and combining it with color difference significance. Its beneficial effect is that detail complexity can reflect the richness of detail information within the neighborhood of a pixel point, which helps to highlight important features in ultrasound elasticity images. It can better immediately determine the richness of detail information within the neighborhood of a pixel point, thereby facilitating adaptive adjustment of the local window size and retaining more detail information.
[0030] This application constructs detail richness by analyzing the distribution of brightness values corresponding to pixel points in YCrCb images and combining it with detail complexity. The beneficial effect is that detail richness usually means that there is more detail information in the window where the pixel point is located, which helps to adjust the size of the local window and enhance the detail features.
[0031] This application analyzes the grayscale value distribution, brightness distribution and density distribution of pixels around edge pixels, and adaptively adjusts the local window size of each pixel according to the detail richness of the pixel, thereby retaining more detail information and improving image enhancement quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0033] Figure 1 A flowchart of the steps of an image processing method for ultrasonic elastography provided in one embodiment of the present application;
[0034] Figure 2 A schematic diagram of a color difference significance acquisition process provided in one embodiment of the present application;
[0035] Figure 3 A schematic diagram of the detail richness extraction process provided for one embodiment of the present application. DETAILED DESCRIPTION
[0036] To further illustrate the technical means and effectiveness of this application to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the image processing method and system for ultrasonic elastography proposed in this application, including its specific implementation, structure, features, and effectiveness. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0037] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0038] The specific solutions of the image processing method and system for ultrasonic elastography provided by the present application are described in detail below with reference to the accompanying drawings.
[0039] See also Figure 1 , which shows a flowchart of the steps of an image processing method for ultrasonic elastography provided by an embodiment of the present application, the method comprising the following steps:
[0040] Step S1: Acquire the ultrasonic elasticity image and grayscale image of each patient.
[0041] Different colors in ultrasound elastography represent the varying degrees of softness and hardness of biological tissues: redder colors represent softer tissues, while bluer colors represent harder tissues. Doctors use the color distribution within the elastography image to determine the severity of the lesion. While ultrasound elastography can accurately reflect tissue hardness, in some cases, diagnosis can be difficult due to minimal elasticity differences between tissues or poor image quality. To more clearly reflect these differences in elasticity, ultrasound elastography requires contrast enhancement.
[0042] Therefore, this embodiment first uses ultrasound elastography equipment to acquire an ultrasound elastography image of a specific area of each patient. The acquired ultrasound elastography image is in RGB color format. Since some noise may be present during the acquisition process, a filtering algorithm is used to denoise the ultrasound elastography image to eliminate this noise.
[0043] It should be noted that there are many commonly used filtering algorithms. In this embodiment, a median filtering algorithm is used to reduce the noise of the image. The implementer may also use other filtering algorithms such as mean filtering and Gaussian filtering. Regarding the selection of filtering algorithms, this embodiment does not impose any special restrictions.
[0044] Among them, the median filter algorithm is a well-known technology in the field of noise reduction processing, and the specific process of image denoising is not described in detail.
[0045] Furthermore, the ultrasonic elasticity image of each patient is grayscaled to obtain a grayscale image of the ultrasonic elasticity image of each patient.
[0046] In addition, in this embodiment, an adaptive contrast enhancement algorithm (ACE) is used to enhance the contrast of the ultrasonic elasticity image. However, when using the adaptive contrast enhancement (ACE) algorithm to enhance the contrast of the ultrasonic elasticity image, the three channels of the RGB image cannot be directly enhanced separately because the R (red), G (green), and B (blue) channels represent the three color channels of the image respectively. If the three channels are directly enhanced separately, the original color mode of the image will be changed, so that the color of the enhanced ultrasonic elasticity image cannot accurately reflect the softness and hardness of the tissue.
[0047] Therefore, it is necessary to convert the ultrasound elasticity image of each patient from the RGB color space to the YCrCb color space to obtain the YCrCb image of the ultrasound elasticity image, only perform contrast enhancement on the Y channel representing brightness, and finally merge the Y, Cr and Cb channels.
[0048] At this point, the ultrasonic elasticity image, its grayscale image and YCrCb image of each patient are obtained.
[0049] Step S2: Extract all edge pixels in the grayscale image of each patient's ultrasound elasticity image and divide the grayscale image into multiple superpixel blocks. In each superpixel block, determine the trend change value of each edge pixel based on the extreme distribution and change trend of the grayscale values of all pixels in any direction of its neighborhood. Determine the color difference significance of each pixel based on the extreme distribution of the grayscale values of each edge pixel and all edge pixels in its neighborhood.
[0050] Since some edges in ultrasound elastic images are formed by areas with similar colors, some edges are formed by areas with large color differences, and some edges are formed by areas with multiple colors, if edge pixels have slight color changes in different neighborhood directions, it means that the edge line where the edge pixel is located may be formed by areas with similar colors. Therefore, by analyzing the significance of color difference in different neighborhood directions of edge pixels, the color difference significance of each edge pixel is determined, specifically:
[0051] (1) The grayscale image of each patient's ultrasound elasticity image is used as the input of the edge detection algorithm, and all edge pixels in the grayscale image of each patient's ultrasound elasticity image are output;
[0052] It should be noted that there are many commonly used edge detection methods and clustering methods. In this embodiment, the Canny edge detection algorithm is used to obtain the coordinates of edge pixels. The implementer may also use other edge detection algorithms such as the Sobel operator and the Prewitt operator. Regarding the selection of the edge detection algorithm, this embodiment does not impose any special restrictions.
[0053] Among them, the Canny edge detection algorithm and the DPC density clustering algorithm are both well-known technologies, and the specific process of using the Canny detection algorithm to obtain edge pixels will not be described in detail.
[0054] (2) Furthermore, in order to reduce the computational complexity and better preserve the structural information of the image, the ultrasound elastic grayscale image of each patient is evenly divided into multiple superpixel blocks.
[0055] It should be noted that there are many commonly used image segmentation methods. In this embodiment, the SLIC superpixel segmentation algorithm is used to segment the ultrasound elastic grayscale image. The implementer may also use other image segmentation methods. Regarding the selection of image segmentation methods, this embodiment does not impose any special restrictions.
[0056] The SLIC superpixel segmentation algorithm is a well-known technology in the field of image processing, and its specific principle of image segmentation is not described in detail here.
[0057] (3) Furthermore, in each superpixel block, the trend change value of each edge pixel is determined based on the extreme distribution and change trend of all pixels in any direction of its neighborhood, specifically:
[0058] The expression of the trend change value of the edge pixel point p is: Where, Indicates the trend change value of edge pixel point p; 、 They represent the extreme difference of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the extreme difference of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p; 、 They represent the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p; Represents the number of all neighborhood directions of the edge pixel point p, where the neighborhood direction k is the uniform division of the neighborhood of the pixel point p. The kth direction among the directions, The neighborhood directions include the up, down, left, right, upper left, lower left, upper right, and lower right directions of the neighborhood of pixel point p; represents the DTW distance.
[0059] The method for obtaining the first-order difference sequence and the process for calculating the DTW distance are both well-known technologies, and the specific process for obtaining the first-order difference sequence and the process for calculating the DTW distance are not described in detail here.
[0060] According to the trend change value of each edge pixel point, it can be understood that if the difference in the extreme difference of the gray value of the edge pixel point between the adjacent directions along the neighborhood direction is greater, that is, The larger the value is, the greater the difference in color distribution in different directions is, the smaller the possibility of edge blur is, and the greater the difference in color change trend of pixels between adjacent neighborhood directions is, that is, The larger the value, the more likely the edge is formed by the splicing of areas with large color differences, the less likely the edge is to be blurred, and the greater the trend change value of the edge pixel;
[0061] On the contrary, if the difference in the extreme difference of the grayscale value of the edge pixel points along the adjacent directions of the neighborhood is smaller, that is, The smaller it is, the smaller the difference in color distribution in different directions is, the greater the possibility of edge blur, and the smaller the difference in color change trend of pixels between adjacent neighborhood directions is, that is, The smaller it is, the more likely the edge is formed by the splicing of areas with similar colors, the greater the possibility of edge blur, and the smaller the trend change value of the edge pixel.
[0062] (4) Furthermore, based on the trend change value of each edge pixel and the extreme distribution of the grayscale values of each edge pixel and all edge pixels in its neighborhood, the color difference significance of each pixel is determined, specifically:
[0063] Pixels are divided into edge pixels and non-edge pixels. The extreme difference of the grayscale values of each edge pixel and all edge pixels in its neighborhood is recorded as the edge extreme difference of each edge pixel, and the ratio of the trend change value of each edge pixel to the edge extreme difference is used as the color difference significance of each edge pixel. The minimum value of the color difference significance of all edge pixels is multiplied by a preset value, and the result is used as the color difference significance of each non-edge pixel.
[0064] It should be noted that in order to enhance the edge part in the ultrasonic elastic image and better distinguish the edge part from the non-edge part, a preset value is set so that the color difference significance of the non-edge pixel point is less than the color difference significance of the edge pixel point. Therefore, the preset value in this embodiment is set to 0.5. The implementer can also reasonably set the value of the preset value based on the specific situation. On the premise of ensuring that the color difference significance of the non-edge pixel point is less than the color difference significance of the edge pixel point, the implementer can set it by himself based on the specific situation. This embodiment does not impose any special restrictions.
[0065] Furthermore, according to the color difference significance of each pixel point, it can be understood that if the trend change value of the edge pixel point is larger, it means that the color change at the edge pixel point is drastic, and the range of the edge pixel point and all edge pixels in its neighborhood is smaller, that is, the edge range is smaller, which means that the color change range around the edge pixel point is limited. If the trend change value is larger and the edge range is smaller, the color difference significance of the pixel point is larger, which means that the pixel value changes very quickly, that is, the color change at the pixel point is very drastic, and the pixel point is more likely to be an important edge in the image, and the image enhancement processing is more necessary for it.
[0066] On the contrary, if the trend change value of the edge pixel is smaller, it means that the color change at the edge pixel tends to be gentle, and the range of the edge pixel and all edge pixels in its neighborhood is larger, that is, the larger the edge range, the larger the color change range around the edge pixel. If the trend change value is smaller and the edge range is larger, the color difference significance of the pixel is smaller, which means that the color change at the pixel is not obvious.
[0067] Preferably, the schematic diagram of the color difference significance acquisition process provided in this embodiment is as follows: Figure 2 shown.
[0068] Step S3: In the grayscale image, the coordinates of all edge pixels are clustered to obtain the local density of each edge pixel, and a window is divided with each pixel as the center. Based on the average distribution of the local density of all edge pixels in the window of each pixel, the density distribution value of each pixel is determined, and combined with the color difference significance, the detail complexity of each pixel is determined.
[0069] In the adaptive contrast enhancement algorithm, a local window of the same size is applied to each pixel. If the local window is too large, detail may be lost, resulting in a smoother enhancement effect. If the local window is too small, noise may be increased and insufficient local information may be captured. Therefore, for areas rich in detail, a smaller local window can be selected to preserve more detail; for areas with less detail, a larger local window can be selected to smooth out noise. Because the richness of detail varies across different regions of ultrasound elasticity images, the size of the local window for each pixel needs to be determined based on the characteristics of the region in which it resides.
[0070] Doctors determine the grade of lesions based on the color distribution in ultrasound elastic images. Therefore, to more clearly determine the grade of lesions, it is necessary to enhance the brightness distribution of the various color pixels in the image. Edges in ultrasound elastic images represent the boundaries between two or more tissues of varying hardness, and these pixels better reflect the edge distribution characteristics of tissues of varying hardness in the elastic image.
[0071] Therefore, in order to accurately identify and assess the extent of lesions, the density distribution value of each pixel is determined by analyzing the average distribution of the local density of all edge pixels within the window of each pixel. In combination with the color difference significance, the detail complexity of each pixel is determined. This allows the size of the local window to be adaptively adjusted according to the characteristics of each pixel, thereby retaining detail information and improving the overall image quality. Specifically:
[0072] (1) In the grayscale image of each patient's ultrasound elastic image, a , wherein the value of c is manually set. In this embodiment, the value of c is 55. The implementer can also set it by himself according to the specific situation. This embodiment does not impose any special restrictions.
[0073] (2) Furthermore, in each patient's ultrasound elasticity image, the coordinates of all edge pixels are clustered to obtain the local density of each edge pixel;
[0074] It should be noted that there are many commonly used clustering methods. In this embodiment, the DPC density clustering algorithm is used to cluster the coordinates of all edge pixels. The implementer can also use other clustering methods such as the DBSCAN density clustering algorithm. Regarding the selection of clustering algorithms, this embodiment does not impose any special restrictions.
[0075] The DPC density clustering algorithm is a well-known technology, and the specific process of clustering the coordinates of edge pixels using the DPC density clustering algorithm will not be described in detail.
[0076] (3) Furthermore, the mean of the local density of all edge pixels within the window of each pixel is taken as the density distribution value of each pixel.
[0077] (4) Based on the density distribution value and the color difference significance, determine the detail complexity of each pixel point, specifically:
[0078] The detail complexity of each pixel is the product of the color difference significance and the density distribution value of each pixel.
[0079] According to the detail complexity of each pixel, it can be understood that if the color difference significance of the pixel is greater, the detail complexity is greater, which means that the color difference around the pixel is larger and the edge may have rich detail information, and the larger the density distribution value of the pixel, the denser the edge pixels in the pixel window, that is, the richer the edge information of the pixel, and the greater the detail complexity; conversely, if the color difference significance of the pixel is smaller, the detail complexity is smaller, which means that the color difference around the pixel is smaller and the detail information at the edge is less, and the smaller the density distribution value of the pixel, the sparser the edge pixels in the pixel window, that is, the simpler the edge information of the pixel, and the smaller the detail complexity.
[0080] Step S4: Based on the degree of confusion and discreteness of the corresponding brightness values of all pixels in the window of each pixel point in the YCrCb image, determine the brightness characteristic value of each pixel point, and determine the detail richness of each pixel point in combination with the detail complexity.
[0081] In the Y channel of an ultrasound elasticity image, the richness of detail in a region is not only related to edge information but also to brightness information. The richer the brightness information in a region, the richer the tissues with different hardnesses within the region in the ultrasound elasticity image. Therefore, by analyzing the richness of the brightness information of the pixel points and combining it with the detail complexity, the detail richness of the pixel points is determined. This allows for enhancement processing of detail-rich pixels, amplifying the details in the image. Specifically,
[0082] (1) Analyze the discrete degree of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image;
[0083] It should be noted that there are many commonly used methods for measuring the degree of data dispersion. In this embodiment, the variance of the corresponding brightness values of all pixels in the window of each pixel point in the YCrCb image is calculated to measure the degree of dispersion of the corresponding brightness values of all pixels in the window of each pixel point in the YCrCb image. The implementer may also use other methods for measuring the degree of data dispersion, such as dispersion coefficient or standard deviation. This embodiment does not impose any special restrictions on the selection of methods for measuring data dispersion.
[0084] (2) Further, calculate the information entropy of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image;
[0085] (3) Further, the ratio of the maximum value to the minimum value of the corresponding brightness value of all pixels in the window of each pixel in the YCrCb image is calculated;
[0086] (4) Determine the brightness characteristic value of each pixel based on the information entropy, the degree of dispersion, and the ratio of the maximum value to the minimum value, specifically:
[0087] The brightness characteristic value of each pixel is the product of the discrete degree of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image, the information entropy and the ratio.
[0088] The steps for calculating information entropy are well-known technologies, and the specific calculation process will not be described in detail in this embodiment.
[0089] According to the brightness characteristic value of each pixel point, it can be understood that when the information entropy is larger, it means that all pixels in the pixel point window have richer corresponding brightness information in the YCrCb image. When the discreteness is larger, it means that the brightness value difference in the pixel point window is larger, indicating that the brightness feature is richer. When the ratio of the maximum value to the minimum value is larger, the contrast in the pixel point neighborhood is greater. Therefore, if the information entropy is larger, the discreteness is larger, and the ratio of the maximum value to the minimum value is larger, the brightness characteristic value of the pixel point is larger, indicating that the brightness feature in the pixel point window is richer.
[0090] On the contrary, when the information entropy is smaller, it means that the corresponding brightness information of all pixels in the pixel window in the YCrCb image is relatively simple. When the discrete degree is smaller, it means that the difference in brightness values within the pixel window is smaller, indicating that the brightness feature is relatively simple. When the ratio of the maximum value to the minimum value is smaller, it means that the contrast within the pixel neighborhood is smaller. Therefore, if the information entropy is smaller, the discrete degree is smaller, and the ratio of the maximum value to the minimum value is smaller, the brightness characteristic value of the pixel is smaller, indicating that the brightness feature within the pixel window is relatively simple.
[0091] (5) Further, based on the detail complexity and brightness characteristic value, the detail richness of each pixel is determined, specifically:
[0092] The detail richness of each pixel is the product of the detail complexity of each pixel and the brightness eigenvalue.
[0093] According to the detail richness of each pixel, it can be understood that if the detail complexity of the pixel is greater and the brightness eigenvalue is larger, the detail richness of the pixel is greater, indicating that the detail features in the window where the pixel is located are richer; conversely, if the detail complexity of the pixel is smaller and the brightness eigenvalue is smaller, the detail richness of the pixel is smaller, indicating that the detail features in the window where the pixel is located are simpler.
[0094] Preferably, the detail richness extraction process diagram provided in this embodiment is as follows: Figure 3 shown.
[0095] Step S5: Based on the detail richness of each pixel and the preset window side length, a local window of each pixel is determined to enhance the YCrCb image of the ultrasonic elastic image.
[0096] The richer the edge information and brightness information in a region, the richer the detailed information contained in this region. Therefore, based on the detail richness of each pixel, the local window size of each pixel is determined, specifically:
[0097] The side length of the local window of pixel i The expression is: ; In the formula, represents the preset window side length; represents the detail richness of pixel i; represents the average value of the detail richness of all pixels in the ultrasonic elastogram; represents the detail richness of all pixels in the ultrasonic elastogram; e and j respectively represent the preset first value and the preset second value, where the preset first value is greater than the preset second value, 1 < j < c < e and c, e, j are all odd numbers; represents an even function; max( ) represents the maximum value function.
[0098] It should be noted that represents an even function, which is used to round the input data to the even number closest to it along the direction of increasing absolute value, such as taking 4 for 4.9 and taking 6 for 5.1; in addition, the values of c, e, and j are all artificially set. In this embodiment, the value of c is the value in the above window size That is, 55, and the values of e and j are 101 and 25 respectively. Among them, in order to ensure that the window is large enough when the detailed information is very scarce, the value of e is set to 101. However, it cannot be set too large at the same time. If the value of e is set too large, it will contain too much non-local information and may blur the local features; a smaller window can better capture local detailed information, but if it is too small, it may not contain enough information to accurately evaluate the detail richness, so the value of j is 25; the implementer can also set it according to the actual situation, and this embodiment does not make special restrictions.
[0099] Furthermore, the brightness values corresponding to all pixels in the ultrasonic elastogram of each patient in the YCrCb image are used as the input of the adaptive contrast enhancement algorithm. Among them, the local window of each pixel is used as the window in the adaptive contrast enhancement algorithm, and the image of the enhanced Y channel is output. Then, this image is merged with the Cr and Cb channels in the YCrCb image, and the merged image is converted to the RGB format to obtain the enhanced ultrasonic elastogram.
[0100] Thus, this embodiment adjusts the size of the local window at each pixel based on the detail richness of each pixel. By adaptively adjusting the size of the local window at each pixel, the contrast-enhanced image retains more detailed features, making the edges and colors of the ultrasound elasticity image clearer, facilitating a clearer diagnosis for doctors.
[0101] Based on the same inventive concept as the above-mentioned method, an embodiment of the present application also provides an image processing system for ultrasonic elastography, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned image processing methods for ultrasonic elastography are implemented.
[0102] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0103] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0104] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An image processing method for ultrasonic elastography, characterized in that: The method comprises the following steps: Obtain each patient's ultrasound elasticity image and its grayscale image and YCrCb image; Extract all edge pixels from the grayscale image and segment the grayscale image into multiple superpixel blocks. In each superpixel block, determine the trend change value of each edge pixel based on the extreme distribution and change trend of the grayscale values of all pixels in any direction of its neighborhood. Combined with the extreme distribution of the grayscale values of each edge pixel and all edge pixels in its neighborhood, determine the color difference significance of each pixel. In the grayscale image, the coordinates of all edge pixels are clustered to obtain the local density of each edge pixel, and a window is divided with each pixel as the center. The density distribution value of each pixel is determined based on the average distribution of the local density of all edge pixels within the window of each pixel. The detail complexity of each pixel is determined in combination with the color difference significance. Determine the brightness characteristic value of each pixel based on the degree of confusion and discreteness of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image, and determine the detail richness of each pixel in combination with the detail complexity; Determining a local window of each pixel based on the detail richness and a preset window side length, and enhancing the YCrCb image of the ultrasonic elastic image; The method for determining the brightness characteristic value of each pixel is: Calculate the information entropy of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image; Calculate the ratio of the maximum to minimum brightness values of all pixels in the YCrCb image within the window of each pixel; The brightness characteristic value of each pixel is the product of the discrete degree of the corresponding brightness values of all pixels in the window of each pixel in the YCrCb image, the information entropy and the ratio.
2. The image processing method for ultrasonic elastography according to claim 1, wherein: The expression of the trend change value of each edge pixel point is: Where, Indicates the trend change value of edge pixel point p; 、 They represent the extreme difference of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the extreme difference of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p; 、 They represent the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k of the edge pixel point p in the superpixel block where the edge pixel point p is located, and the first-order difference sequence of the grayscale values of all pixels in the neighborhood direction k-1 of the edge pixel point p; Represents the number of all neighborhood directions of edge pixel point p, where neighborhood direction k is the uniform division of the neighborhood of pixel point p. The kth direction among directions; represents the DTW distance.
3. The image processing method for ultrasonic elastography according to claim 2, wherein: The method for determining the color difference significance of each pixel is as follows: Pixels are divided into edge pixels and non-edge pixels. The range of the grayscale values of each edge pixel and all edge pixels in its neighborhood is recorded as the edge range of each edge pixel. The ratio of the trend change value of each edge pixel to the edge range is used as the color difference significance of each edge pixel. The result of multiplying the minimum value of the color difference significance of all edge pixels by the preset value is used as the color difference significance of each non-edge pixel.
4. The image processing method for ultrasonic elastography according to claim 1, wherein: The density distribution value of each pixel point is the average value of the local density of all edge pixels within the window of each pixel point.
5. The image processing method for ultrasonic elastography according to claim 1, wherein: The detail complexity of each pixel is the product of the color difference significance of each pixel and the density distribution value.
6. The image processing method for ultrasonic elastography according to claim 1, wherein: The detail richness of each pixel is the product of the detail complexity of each pixel and the brightness characteristic value.
7. The image processing method for ultrasonic elastography according to claim 1, wherein: The method for determining the local window of each pixel point is: The local window side length of pixel i The expression is: Where, Indicates the preset window side length; Indicates the detail richness of pixel i; It represents the mean value of detail richness of all pixels in the ultrasound elasticity image; Indicates the detail richness of all pixels in the ultrasonic elastic image; e and j represent a preset first value and a preset second value, respectively, where the preset first value is greater than the preset second value; represents an even function; max() represents the maximum value function.
8. The image processing method for ultrasonic elastography according to claim 1, wherein: The YCrCb image of the ultrasonic elastic image is enhanced, comprising: The brightness values corresponding to all pixels in the YCrCb image of each patient's ultrasound elasticity image are used as the input of the adaptive contrast enhancement algorithm, where the local window of each pixel is used as the window in the adaptive contrast enhancement algorithm. The Y channel image after contrast enhancement is output and merged with the Cr and Cb channels in the YCrCb image. The merged image is converted into RGB format to obtain the enhanced ultrasound elasticity image.
9. An image processing system for ultrasonic elastography, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Ultrasonic image processing method based on image enhancement
CN117649357A
Batch desensitization and format conversion method for echocardiogram DICOM (Digital Imaging and Communications in Medicine) files
CN117951728A