Ultrasonic image processing method, device, equipment and computer readable storage medium
By performing contrast enhancement processing on ultrasound images and using super-resolution reconstruction models, combined with convolutional layer and other technologies, the problem of difficult to balance imaging quality and timeliness in ultrasound image processing is solved, and high-quality and efficient image processing is achieved.
Patent Information
- Application Number
- CN202410335794.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-03-22
AI Technical Summary
In the process of ultrasound image processing, it is difficult to balance imaging quality and timeliness. High-quality image enhancement processing takes a long time, and the image quality obtained by simple methods is not ideal.
Improve the clarity of ultrasound images through contrast enhancement processing, and determine whether the image clarity meets the preset threshold. If it does not meet the preset threshold, use a super-resolution reconstruction model for image reconstruction, combining the convolution layer, upsampling layer, fusion layer, and residual Techniques such as blocking and activation functions perform image reconstruction based on training on low-resolution images and high-resolution labels.
While ensuring the quality of ultrasound images, it improves the timeliness of processing, avoids unnecessary complex image processing processes, and improves image quality through a super-resolution reconstruction model when the image clarity does not meet the threshold.
Smart Images

Figure CN118261794B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an ultrasonic image processing method, device, equipment and computer-readable storage medium. Background Art
[0002] Ultrasound imaging is widely used in the field of medical imaging as an auxiliary means of medical diagnosis. The imaging quality of ultrasound images has a great impact on the doctor's diagnosis. High-quality ultrasound images can clearly show the lesions and provide doctors with more accurate diagnosis basis; when the image quality is poor, doctors may find it difficult to accurately judge the nature of the lesions.
[0003] In order to solve this problem, image enhancement methods are usually used to process ultrasound images in real time to improve their imaging quality. However, high-quality image enhancement processing is usually more complicated and requires a long processing time, such as image processing through neural network algorithms; while simple enhancement methods have fast processing speeds, but the quality of the ultrasound images obtained may not be ideal, such as image processing through non-neural network algorithms such as filter denoising and filtering. This results in the ultrasound imaging process being unable to take into account both imaging quality and timeliness. Summary of the invention
[0004] The main purpose of the present application is to provide an ultrasound image processing method, device, equipment and computer-readable storage medium, aiming to improve the imaging quality of ultrasound images while ensuring the timeliness of ultrasound images.
[0005] To achieve the above object, the present application provides an ultrasonic image processing method, which comprises the following steps:
[0006] Acquiring an ultrasonic image to be processed, and performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image;
[0007] Determining the image clarity of the processed ultrasound image, and judging whether the image clarity meets a preset clarity threshold;
[0008] If the image clarity meets the clarity threshold, outputting the processed ultrasound image;
[0009] If the image clarity does not meet the clarity threshold, the processed ultrasound image is input into a super-resolution reconstruction model to obtain a reconstructed ultrasound image, and a target ultrasound image is obtained based on the reconstructed ultrasound image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels.
[0010] Optionally, the step of performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image comprises:
[0011] Determine a region of interest and a region of non-interest in the ultrasonic image to be processed, wherein the region of non-interest is an image region of the ultrasonic image to be processed except the region of interest;
[0012] Copying the ultrasonic image to be processed to obtain a copied ultrasonic image;
[0013] Normalizing the grayscale of the ultrasonic image to be processed, determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel value of each pixel of the ultrasonic image to be processed into the image stretching range to obtain a first processed image:
[0014] Performing low-pass filtering and denoising processing on the replicated ultrasound image to obtain a second processed image;
[0015] The region of interest of the first processed image and the region of no interest of the second processed image are combined to obtain a processed ultrasound image.
[0016] Optionally, the step of determining the image clarity of the processed ultrasound image comprises:
[0017] The mean square error of the pixel values of each pixel in the processed ultrasound image is calculated, and the image clarity of the processed ultrasound image is determined based on the mean square error, wherein the mean square error is inversely proportional to the brightness uniformity.
[0018] Optionally, if the image clarity does not meet the clarity threshold, the step of inputting the processed ultrasound image into a super-resolution reconstruction model to obtain a reconstructed ultrasound image comprises:
[0019] If the image clarity does not meet the clarity threshold, acquiring an adjacent frame ultrasound image of the ultrasound image to be processed;
[0020] The adjacent frame ultrasound images and the processed ultrasound image are input into the super-resolution reconstruction model to obtain a reconstructed ultrasound image.
[0021] Optionally, the super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block and an activation function;
[0022] The step of inputting the adjacent frame ultrasound images and the processed ultrasound image into the super-resolution reconstruction model to obtain the reconstructed ultrasound image comprises:
[0023] Inputting the adjacent frame ultrasound images and the processed ultrasound image into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image;
[0024] Inputting the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature;
[0025] Inputting the third feature and the fourth feature into the fusion layer to obtain a fusion feature;
[0026] Inputting the fused features into the residual block to obtain the target features;
[0027] The target feature is input into the activation function to obtain a reconstructed ultrasound image.
[0028] Optionally, the super-resolution reconstruction model further includes an attention mechanism block;
[0029] The step of inputting the third feature and the fourth feature into the fusion layer to obtain a fusion feature includes:
[0030] Inputting the third feature and the fourth feature into the attention mechanism block, and obtaining an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block;
[0031] Performing weighted processing on the fourth feature by using the attention weight to obtain a weighted feature;
[0032] The third feature and the weighted feature are input into the fusion layer to obtain a fusion feature.
[0033] Optionally, the step of obtaining and outputting a target ultrasonic image based on the reconstructed ultrasonic image includes:
[0034] Acquire a first weight corresponding to the processed ultrasonic image and a second weight corresponding to the reconstructed ultrasonic image;
[0035] Performing weighted processing on the processed ultrasound image using the first weight to obtain a first weighted image, and performing weighted processing on the reconstructed ultrasound image using the second weight to obtain a second weighted image;
[0036] The first weighted image and the second weighted image are superimposed to obtain a target ultrasound image, and the target ultrasound image is output.
[0037] To achieve the above object, the present application further provides an ultrasonic image processing device, the ultrasonic image processing device comprising:
[0038] An acquisition module is used to acquire an ultrasonic image to be processed, and perform contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image;
[0039] A judgment module, used to determine the image clarity of the processed ultrasound image, and to judge whether the image clarity meets a preset clarity threshold;
[0040] A first output module, configured to output the processed ultrasound image if the image clarity meets the clarity threshold;
[0041] The second output module is used to input the processed ultrasound image into a super-resolution reconstruction model to obtain a reconstructed ultrasound image if the image clarity does not meet the clarity threshold, and obtain and output a target ultrasound image based on the reconstructed ultrasound image, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels.
[0042] To achieve the above-mentioned purpose, the present application also provides an ultrasonic image processing device, which includes: a memory, a processor, and an ultrasonic image processing program stored in the memory and executable on the processor, and the ultrasonic image processing program implements the steps of the ultrasonic image processing method as described above when executed by the processor.
[0043] In addition, to achieve the above objectives, the present application also proposes a computer-readable storage medium, on which an ultrasound image processing program is stored. When the ultrasound image processing program is executed by a processor, the steps of the ultrasound image processing method as described above are implemented.
[0044] In the present application, an ultrasonic image to be processed is acquired, and contrast enhancement processing is performed on the ultrasonic image to be processed to obtain a processed ultrasonic image; the image clarity of the processed ultrasonic image is determined, and it is judged whether the image clarity meets a preset clarity threshold; if the image clarity meets the clarity threshold, the processed ultrasonic image is output; if the image clarity does not meet the clarity threshold, the processed ultrasonic image is input into a super-resolution reconstruction model to obtain a reconstructed ultrasonic image, and a target ultrasonic image is obtained based on the reconstructed ultrasonic image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasonic images as input data and high-resolution ultrasonic images as training labels.
[0045] Compared with using a neural network algorithm or other complex processing method to process the ultrasonic image to be processed, or using a simple image processing algorithm to process the ultrasonic image, in the present application, the clarity of the ultrasonic image to be processed is quickly improved through contrast enhancement processing, and then the clarity of the processed ultrasonic image is judged, and the processed ultrasonic image is output when the image clarity meets the threshold, thereby avoiding unnecessary complex image processing procedures and improving the timeliness of ultrasonic image processing; when the image clarity does not meet the threshold, super-resolution reconstruction is performed based on a super-resolution reconstruction model, which can ensure the quality of the ultrasonic image finally output. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present application;
[0047] Figure 2 This is a schematic diagram of the flow chart of the first embodiment of the ultrasonic image processing method of the present application;
[0048] Figure 3 This is a schematic diagram of the flow chart of the second embodiment of the ultrasonic image processing method of the present application;
[0049] Figure 4 A schematic diagram of a process of super-resolution reconstruction according to an embodiment of the present application;
[0050] Figure 5 This is a schematic diagram of the functional modules of a preferred embodiment of the ultrasonic image processing device of the present application.
[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0054] It should be noted that the ultrasonic image processing device in the embodiment of the present application may be an ultrasonic imaging device or a device that establishes a communication connection with the ultrasonic imaging device, and no limitation is made here.
[0055] like Figure 1 As shown, the ultrasonic image processing device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0056] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the ultrasonic image processing device, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0057] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an ultrasound image processing program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the ultrasound image processing program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the ultrasound image processing program stored in the memory 1005 and perform the following operations:
[0058] Acquiring an ultrasonic image to be processed, and performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image;
[0059] Determining the image clarity of the processed ultrasound image, and judging whether the image clarity meets a preset clarity threshold;
[0060] If the image clarity meets the clarity threshold, outputting the processed ultrasound image;
[0061] If the image clarity does not meet the clarity threshold, the processed ultrasound image is input into a super-resolution reconstruction model to obtain a reconstructed ultrasound image, and a target ultrasound image is obtained based on the reconstructed ultrasound image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels.
[0062] Furthermore, the step of performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image comprises:
[0063] Determine a region of interest and a region of non-interest in the ultrasonic image to be processed, wherein the region of non-interest is an image region of the ultrasonic image to be processed except the region of interest;
[0064] Copying the ultrasonic image to be processed to obtain a copied ultrasonic image;
[0065] Normalizing the grayscale of the ultrasonic image to be processed, determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel value of each pixel of the ultrasonic image to be processed into the image stretching range to obtain a first processed image:
[0066] Performing low-pass filtering and denoising processing on the replicated ultrasound image to obtain a second processed image;
[0067] The region of interest of the first processed image and the region of no interest of the second processed image are combined to obtain a processed ultrasound image.
[0068] Furthermore, the step of determining the image clarity of the processed ultrasound image comprises:
[0069] The mean square error of the pixel values of each pixel in the processed ultrasound image is calculated, and the image clarity of the processed ultrasound image is determined based on the mean square error, wherein the mean square error is inversely proportional to the brightness uniformity.
[0070] Furthermore, if the image clarity does not meet the clarity threshold, the step of inputting the processed ultrasound image into a super-resolution reconstruction model to obtain a reconstructed ultrasound image comprises:
[0071] If the image clarity does not meet the clarity threshold, acquiring an adjacent frame ultrasound image of the ultrasound image to be processed;
[0072] The adjacent frame ultrasound images and the processed ultrasound image are input into the super-resolution reconstruction model to obtain a reconstructed ultrasound image.
[0073] Furthermore, the super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block and an activation function;
[0074] The step of inputting the adjacent frame ultrasound images and the processed ultrasound image into the super-resolution reconstruction model to obtain the reconstructed ultrasound image comprises:
[0075] Inputting the adjacent frame ultrasound images and the processed ultrasound image into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image;
[0076] Inputting the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature;
[0077] Inputting the third feature and the fourth feature into the fusion layer to obtain a fusion feature;
[0078] Inputting the fused features into the residual block to obtain the target features;
[0079] The target feature is input into the activation function to obtain a reconstructed ultrasound image.
[0080] Furthermore, the super-resolution reconstruction model also includes an attention mechanism block;
[0081] The step of inputting the third feature and the fourth feature into the fusion layer to obtain a fusion feature includes:
[0082] Inputting the third feature and the fourth feature into the attention mechanism block, and obtaining an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block;
[0083] Performing weighted processing on the fourth feature by using the attention weight to obtain a weighted feature;
[0084] The third feature and the weighted feature are input into the fusion layer to obtain a fusion feature.
[0085] Furthermore, the step of obtaining and outputting a target ultrasonic image based on the reconstructed ultrasonic image comprises:
[0086] Acquire a first weight corresponding to the processed ultrasonic image and a second weight corresponding to the reconstructed ultrasonic image;
[0087] Performing weighted processing on the processed ultrasound image using the first weight to obtain a first weighted image, and performing weighted processing on the reconstructed ultrasound image using the second weight to obtain a second weighted image;
[0088] The first weighted image and the second weighted image are superimposed to obtain a target ultrasound image, and the target ultrasound image is output.
[0089] Based on the above structure, various embodiments of an ultrasound image processing method are proposed.
[0090] Reference Figure 2 , Figure 2 This is a flowchart of the first embodiment of the ultrasound image processing method of the present application.
[0091] The embodiment of the present application provides an embodiment of an ultrasonic image processing method. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. In this embodiment, the execution subject of the ultrasonic image processing method may be an ultrasonic imaging device, or a device that establishes a communication connection with the ultrasonic imaging device, which is not limited in this embodiment. For ease of description, the execution subject is omitted below to explain each embodiment. In this embodiment, the ultrasonic image processing method includes steps S10-S40.
[0092] Step S10, obtaining an ultrasonic image to be processed, and performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image.
[0093] In this embodiment, during the ultrasonic imaging process, the ultrasonic image is processed in real time, that is, each time a frame of ultrasonic image is acquired, the frame of ultrasonic image is processed to ensure the clarity of the ultrasonic image. The ultrasonic image that needs to be processed in the current frame is referred to as the ultrasonic image to be processed. It should be noted that the ultrasonic image in this embodiment can be an ultrasonic image of an organ or tissue such as the liver, lung, or heart, and is not specifically limited here.
[0094] In this embodiment, after receiving the ultrasonic image to be processed, contrast enhancement processing is performed on the ultrasonic image to be processed, and the ultrasonic image obtained after the contrast enhancement processing is called a processed ultrasonic image.
[0095] In this embodiment, there is no limitation on the specific method of contrast enhancement processing. For example, in one feasible implementation, it may be a histogram equalization method to adjust the grayscale distribution of the ultrasound image so that the contrast of the image is enhanced; in another feasible implementation, it may be a Laplace operator to detect edges and details in the image and improve the contrast by enhancing the edges; in another feasible implementation, it may be a contrast stretching method.
[0096] Step S20, determining the image clarity of the processed ultrasound image, and judging whether the image clarity meets a preset clarity threshold.
[0097] In this embodiment, after obtaining the processed ultrasound image, the image clarity of the processed ultrasound image is determined, and it is judged whether the image clarity meets the preset clarity threshold, so as to determine whether the imaging quality of the processed ultrasound image meets the doctor's diagnosis requirements. The clarity threshold can be set according to actual needs and is not limited here.
[0098] Specifically, the method of determining the image clarity of the processed ultrasonic image is not limited herein. For example, in one feasible implementation, the clarity may be evaluated by measuring the contrast of the processed ultrasonic image, and the contrast of the image may be quantified by calculating parameters such as the contrast coefficient or contrast expansion factor of the processed ultrasonic image, thereby determining the clarity, wherein the higher the contrast, the higher the clarity. In another feasible implementation, the noise power spectrum or noise standard deviation of the processed ultrasonic image may be calculated to determine the clarity of the processed ultrasonic image, wherein the less the noise, the higher the clarity of the processed ultrasonic image. In another feasible implementation, the image clarity may be determined by measuring the resolution of the processed ultrasonic image, wherein the higher the resolution of the processed ultrasonic image, the higher the image clarity.
[0099] Step S30: if the image clarity meets the clarity threshold, output the processed ultrasound image.
[0100] In this embodiment, if the image clarity meets the clarity threshold, it indicates that the image quality of the processed ultrasound image meets medical needs and can be used for auxiliary diagnosis. At this time, the processed ultrasound image is output to be displayed on the ultrasound imaging device.
[0101] Step S40: If the image clarity does not meet the clarity threshold, the processed ultrasound image is input into a super-resolution reconstruction model to obtain a reconstructed ultrasound image, and a target ultrasound image is obtained based on the reconstructed ultrasound image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels.
[0102] If the image clarity does not meet the clarity threshold, the processed ultrasound image is input into the super-resolution reconstruction model to obtain a reconstructed ultrasound image. It should be noted that there is no restriction on the specific structure of the super-resolution reconstruction model, and it can be set according to actual needs.
[0103] In this embodiment, the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels, and the specific training process is not described here. It should be noted that the ultrasound images used in the model training process are ultrasound images in the public case library.
[0104] Super-resolution reconstruction can obtain a high-resolution ultrasound image based on a low-resolution ultrasound image. In this embodiment, the processed ultrasound image is reconstructed based on the resolution reconstruction model to obtain a reconstructed ultrasound image. It should be noted that the reconstructed ultrasound image can be obtained by reconstructing the processed ultrasound image; or the reconstructed ultrasound image can be obtained by reconstructing the processed ultrasound image and multiple low-resolution images related to the processed ultrasound image. For example, the image reconstruction can be performed based on the processed ultrasound image and ultrasound images of adjacent frames.
[0105] A target ultrasonic image is obtained based on the reconstructed ultrasonic image, and the target ultrasonic image is output. In one feasible implementation, the reconstructed ultrasonic image may be directly used as the target ultrasonic image and output; in another feasible implementation, the target ultrasonic image may be obtained by processing the reconstructed ultrasonic image, for example, by image fusion processing.
[0106] Further, in a feasible implementation manner, step S10: performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image includes steps S101-S105.
[0107] Step S101 : determining a region of interest and a region of no interest in the ultrasound image to be processed, wherein the region of no interest is an image region of the ultrasound image to be processed except the region of interest.
[0108] In this embodiment, the region of the ultrasound image to be processed is divided into a region of interest and a region of no interest. The region of interest (ROI) is the region in the ultrasound image that needs to be focused on or processed, which is the diseased tissue, blood vessel, organ or other structure that needs to be observed in the ultrasound image. The region of no interest is the image area in the ultrasound image to be processed except the region of interest.
[0109] The specific method of extracting the region of interest is not limited here. For example, in one feasible implementation, the region of interest can be identified by using edge features to identify the outline of the region of interest and thus extract it. In another feasible implementation, a region growing method can be used. Specifically, a group of seed points are selected from the pixels of the ultrasound image to be processed, and adjacent pixels with similar properties to the seed points are merged into the region of interest. By continuously expanding the scope of the region, the complete region of interest can be extracted eventually. Edge extraction can also be performed by machine learning, threshold detection method, etc.
[0110] Step S102, copying the ultrasonic image to be processed to obtain a copied ultrasonic image.
[0111] The ultrasonic image to be processed is copied to obtain a copied ultrasonic image. The region of interest and the region of non-interest in the copied ultrasonic image correspond to the region of interest and the region of non-interest in the ultrasonic image to be processed.
[0112] Step S103, normalizing the grayscale of the ultrasonic image to be processed, determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel value of each pixel of the ultrasonic image to be processed into the image stretching range to obtain a first processed image.
[0113] In this embodiment, the contrast of the region of interest is stretched to improve the contrast between the region of interest and the non-region of interest. While improving the contrast of the region of interest, the region of interest is made easier to observe and identify, providing an accurate reference image for the doctor.
[0114] Specifically, in the present embodiment, the grayscale of the ultrasonic image to be processed is normalized, and the image stretching range of the ultrasonic image to be processed is determined, and then the pixel values of each pixel of the ultrasonic image to be processed are mapped to the image stretching range to obtain a first processed image. Among them, the contrast stretching range is the pixel value range used in the contrast stretching process, and the method of determining the image stretching range is not limited here. For example, in a feasible implementation, a histogram describing the grayscale distribution of the image can be obtained, and the minimum and maximum values of the pixel values in the ultrasonic image to be processed are determined based on the grayscale histogram, and the minimum and maximum values are respectively used as the minimum and maximum values of the image stretching range.
[0115] Step S104: performing low-pass filtering and denoising processing on the copied ultrasound image to obtain a second processed image.
[0116] The copied ultrasound image is subjected to low-pass filtering and denoising to obtain a second processed image. In this embodiment, the timeliness of ultrasound image processing is improved by simplifying the image processing operation on non-interested regions.
[0117] Step S105: merging the region of interest of the first processed image and the region of no interest of the second processed image to obtain a processed ultrasound image.
[0118] The region of interest of the first processed image and the region of no interest of the second processed image are combined to obtain a processed ultrasound image.
[0119] In this embodiment, by determining the region of interest and the region of non-interest in the ultrasonic image to be processed, wherein the region of non-interest is the image region other than the region of interest in the ultrasonic image to be processed; copying the ultrasonic image to be processed to obtain a copied ultrasonic image; grayscale normalization of the ultrasonic image to be processed, and determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel values of each pixel of the ultrasonic image to be processed in the image stretching range to obtain a first processed image; low-pass filtering and denoising of the copied ultrasonic image to obtain a second processed image; merging the region of interest of the first processed image and the region of non-interest of the second processed image to obtain a processed ultrasonic image. Compared with performing the same operation on all regions of the ultrasonic image to be processed, in this embodiment, after dividing the region of the ultrasonic image to be processed into the region of interest and the region of non-interest, more detailed image processing and analysis are performed on the region of interest to improve the image quality and accuracy of the region of interest, and simpler image processing is performed on the region of non-interest to save computing resources and time and improve the timeliness of image processing.
[0120] Further, in a feasible implementation manner, step S20: determining the image clarity of the processed ultrasound image includes step S201.
[0121] Step S201, calculating the mean square error of the pixel values of each pixel in the processed ultrasonic image, and determining the image clarity of the processed ultrasonic image based on the mean square error, wherein the mean square error is inversely proportional to the brightness uniformity.
[0122] The mean square error of the pixel values of each pixel in the processed ultrasound image is calculated, and the image clarity of the processed ultrasound image is determined based on the mean square error, wherein the mean square error is inversely proportional to the brightness uniformity. Specifically, the mean square error of the pixel values may be used as the image clarity, or the mean square error of the pixel values may be mapped to the clarity according to a preset mapping relationship, which is not limited here.
[0123] In this implementation, the mean square error of pixel values is a standardized and objective indicator. Evaluating clarity based on the mean square error can ensure the accuracy, objectivity and interpretability of the clarity evaluation.
[0124] In this embodiment, by acquiring an ultrasonic image to be processed, contrast enhancement processing is performed on the ultrasonic image to be processed to obtain a processed ultrasonic image; the image clarity of the processed ultrasonic image is determined, and it is judged whether the image clarity meets a preset clarity threshold; if the image clarity meets the clarity threshold, the processed ultrasonic image is output; if the image clarity does not meet the clarity threshold, the processed ultrasonic image is input into a super-resolution reconstruction model to obtain a reconstructed ultrasonic image, and a target ultrasonic image is obtained based on the reconstructed ultrasonic image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasonic images as input data and high-resolution ultrasonic images as training labels.
[0125] Compared with using a neural network algorithm or other complex processing method to process the ultrasonic image to be processed, or using a simple image processing algorithm to process the ultrasonic image, in the present application, the clarity of the ultrasonic image to be processed is quickly improved through contrast enhancement processing, and then the clarity of the processed ultrasonic image is judged, and the processed ultrasonic image is output when the image clarity meets the threshold, thereby avoiding unnecessary complex image processing procedures and improving the timeliness of ultrasonic image processing; when the image clarity does not meet the threshold, super-resolution reconstruction is performed based on a super-resolution reconstruction model, which can ensure the quality of the ultrasonic image finally output.
[0126] In summary, in this embodiment, by combining efficient contrast enhancement processing, automated judgment process and high-resolution reconstruction model, the quality of ultrasound images is guaranteed and the timeliness of processing is effectively improved.
[0127] Further, based on the above-mentioned first embodiment, a second embodiment of the ultrasonic image processing method of the present application is proposed. In this embodiment, step S40: includes steps S401-S402.
[0128] Step S401: if the image clarity does not meet the clarity threshold, then obtain the adjacent frame ultrasound image of the ultrasound image to be processed.
[0129] In this embodiment, image reconstruction is performed based on the processed ultrasonic image and a plurality of low-resolution images related to the processed ultrasonic image to obtain a reconstructed ultrasonic image, so as to improve the accuracy of the reconstructed ultrasonic image.
[0130] Specifically, if the image clarity does not meet the clarity threshold, adjacent frames of ultrasonic images of the ultrasonic image to be processed are acquired, and subsequent image reconstruction is performed based on the processed ultrasonic image and the adjacent frames of ultrasonic images.
[0131] Step S402: input the adjacent frame ultrasound images and the processed ultrasound image into the super-resolution reconstruction model to obtain a reconstructed ultrasound image.
[0132] Adjacent frame ultrasound images and the processed ultrasound images are input into a super-resolution reconstruction model to obtain a reconstructed ultrasound image.
[0133] Further, in a feasible implementation, the super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block and an activation function. Step S402: Inputting the adjacent frame ultrasound images and the processed ultrasound image into the super-resolution reconstruction model to obtain a reconstructed ultrasound image, including steps S4021-S4025.
[0134] Step S4021: input the adjacent frame ultrasound images and the processed ultrasound image into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image.
[0135] In this embodiment, the super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block and an activation function. Specifically, the adjacent frame ultrasound images and the processed ultrasound image are input into the convolution layer, and the processed ultrasound image and the adjacent frame ultrasound image are subjected to feature extraction through the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image.
[0136] Step S4022: input the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature.
[0137] The first feature and the second feature are input into the upsampling layer, and the resolution of the first feature and the second feature is improved through the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature. In this implementation, upsampling can be specifically achieved through resampling and interpolation, which is not limited here.
[0138] Step S4023: input the third feature and the fourth feature into the fusion layer to obtain a fusion feature.
[0139] The third feature and the fourth feature are input into the fusion layer, and the third feature and the fourth feature are fused to obtain the fusion feature.
[0140] The specific feature fusion method is not limited here. For example, feature fusion can be performed by weighted fusion, feature concatenation, PCA (Principal Component Analysis), kernel-based nonlinear feature fusion method, etc. Exemplarily, in a feasible implementation, a weighted fusion method is used to improve the processing efficiency of feature fusion and improve the timeliness of ultrasound image processing. The specific process can be: determine the fusion weights of the third feature and the fourth feature respectively, and combine the third feature and the fourth feature after multiplying their respective fusion weights to obtain a fused feature. The merging method can be simple addition, multiplication, or use other fusion functions.
[0141] Step S4024: input the fused features into the residual block to obtain target features.
[0142] The fused features are input into the residual block, and the fused features are subjected to nonlinear transformations such as convolution, activation function, and batch normalization through the residual block to enhance the fused features to obtain enhanced features, and then the enhanced features and fused features are added through the residual connection. The residual block enables the super-resolution reconstruction network to better understand and represent the intrinsic structure and characteristics of the fused features, so as to improve the performance of the super-resolution reconstruction model and thus improve the accuracy of the reconstructed ultrasound image.
[0143] Step S4025: input the target feature into the activation function to obtain a reconstructed ultrasound image.
[0144] The target feature is input into the activation function to obtain the reconstructed ultrasound image. After the target feature is input into the activation function, the activation function will perform a nonlinear transformation on the target feature to enhance the representation ability of the feature, so as to improve the performance of the super-resolution reconstruction model and thus improve the accuracy of the reconstructed ultrasound image.
[0145] Furthermore, in a feasible implementation manner, the super-resolution reconstruction model further includes an attention mechanism block. Step S4023: inputting the fusion feature into the residual block to obtain the target feature, including steps S40231-S40233.
[0146] Step S40231: input the third feature and the fourth feature into the attention mechanism block, and obtain an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block.
[0147] In this embodiment, the super-resolution reconstruction model also includes an attention mechanism block, which focuses on the correlation between the processed ultrasonic image and the adjacent frame ultrasonic images, and improves the accuracy of the reconstructed ultrasonic image based on the correlation between the processed ultrasonic image and the adjacent frame ultrasonic images.
[0148] Specifically, the third feature and the fourth feature are input into the attention mechanism block, and the attention weight is obtained based on the similarity between the third feature and the fourth feature through the attention mechanism block.
[0149] In this implementation, the attention mechanism block obtains a weighting coefficient matrix by multiplying the third feature and the fourth feature pixel by pixel; then, the attention mechanism block normalizes the weighting coefficient matrix using the softmax function to obtain the attention weight of each pixel, which reflects the degree of attention of each pixel in the third feature to each pixel in the fourth feature, that is, the relevance. The specific formula of the attention mechanism can be:
[0150] A=softmax(F1·F2)
[0151] Among them, F1 is the third feature, F2 is the fourth feature, and A represents the attention weight.
[0152] Step S40232, weighting the fourth feature using the attention weight to obtain a weighted feature.
[0153] The fourth feature is weighted by the attention weight to obtain the weighted feature.
[0154] Step S40233, input the third feature and the weighted feature into the fusion layer to obtain a fusion feature.
[0155] The third feature and the weighted feature are input into the fusion layer to obtain the fused feature.
[0156] For example, refer to Figure 4 In this implementation, the specific process of super-resolution reconstruction may be:
[0157] The adjacent frame ultrasound images and the processed ultrasound images are input into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image.
[0158] The first feature and the second feature are input into the upsampling layer to obtain the third feature corresponding to the first feature and the fourth feature corresponding to the second feature.
[0159] The third feature and the fourth feature are input into the attention mechanism block, and the attention weight is obtained based on the similarity between the third feature and the fourth feature through the attention mechanism block.
[0160] The fourth feature is weighted by the attention weight to obtain the weighted feature.
[0161] The third feature and the weighted feature are input into the fusion layer to obtain the fused feature.
[0162] The fused features are input into the residual block to obtain the target features.
[0163] The target features are input into the activation function to obtain the reconstructed ultrasound image.
[0164] Further, in a feasible implementation manner, step S40: obtaining and outputting a target ultrasound image based on the reconstructed ultrasound image includes steps S403-S405.
[0165] Step S403: Acquire a first weight corresponding to the processed ultrasonic image and a second weight corresponding to the reconstructed ultrasonic image.
[0166] In this embodiment, the processed ultrasound image and the reconstructed ultrasound image are fused to obtain a target ultrasound image, which can form more comprehensive and richer image information, provide more complete image information for the target ultrasound image, and improve the accuracy of the target ultrasound image.
[0167] Specifically, in this embodiment, a weight pair is pre-set, and the weight corresponding to the processed ultrasonic image in the weight pair is called the first weight, and the weight corresponding to the reconstructed ultrasonic image in the weight pair is called the second weight. Since the proportion of the processed ultrasonic image and the ultrasonic image of the adjacent frame in the target ultrasonic image can be controlled by the first weight and the second weight, thereby controlling the image output effect of the target ultrasonic image, in a specific embodiment, the clarity of the region of interest in the reconstructed ultrasonic image and the processed ultrasonic image can be compared, and a higher weight is given to the image with a higher clarity of the region of interest in the reconstructed ultrasonic image and the processed ultrasonic image, that is, the weight with the largest value in the weight pair is used as the weight of the image with a higher clarity of the region of interest in the reconstructed ultrasonic image and the processed ultrasonic image.
[0168] Step S404: weighting the processed ultrasound image using the first weight to obtain a first weighted image, and weighting the reconstructed ultrasound image using the second weight to obtain a second weighted image.
[0169] The processed ultrasonic image is weighted by the first weight to obtain a first weighted image, and the reconstructed ultrasonic image is weighted by the second weight to obtain a second weighted image.
[0170] Step S405: superimpose the first weighted image and the second weighted image to obtain a target ultrasound image, and output the image.
[0171] The first weighted image and the second weighted image are superimposed to obtain a target ultrasound image, and the image is output.
[0172] In this embodiment, if the image clarity does not meet the clarity threshold, the adjacent frame ultrasound image of the ultrasound image to be processed is obtained; the adjacent frame ultrasound image and the processed ultrasound image are input into the super-resolution reconstruction model to obtain a reconstructed ultrasound image. This embodiment realizes super-resolution reconstruction of ultrasound images, improves the quality of ultrasound images, and thus provides more accurate information for medical diagnosis and treatment.
[0173] In addition, the present application also provides an ultrasonic image processing device, referring to Figure 5 , the ultrasonic image processing device comprises:
[0174] An acquisition module 10 is used to acquire an ultrasonic image to be processed, and perform contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image;
[0175] A judgment module 20, used to determine the image clarity of the processed ultrasound image, and to judge whether the image clarity meets a preset clarity threshold;
[0176] A first output module 30, configured to output the processed ultrasound image if the image clarity meets the clarity threshold;
[0177] The second output module 40 is used to input the processed ultrasound image into a super-resolution reconstruction model to obtain a reconstructed ultrasound image if the image clarity does not meet the clarity threshold, and obtain and output a target ultrasound image based on the reconstructed ultrasound image, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels.
[0178] Furthermore, the acquisition module 10 is also used for:
[0179] Determine a region of interest and a region of non-interest in the ultrasonic image to be processed, wherein the region of non-interest is an image region of the ultrasonic image to be processed except the region of interest;
[0180] Copying the ultrasonic image to be processed to obtain a copied ultrasonic image;
[0181] Normalizing the grayscale of the ultrasonic image to be processed, determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel value of each pixel of the ultrasonic image to be processed into the image stretching range to obtain a first processed image:
[0182] Performing low-pass filtering and denoising processing on the replicated ultrasound image to obtain a second processed image;
[0183] The region of interest of the first processed image and the region of no interest of the second processed image are combined to obtain a processed ultrasound image.
[0184] Furthermore, the judging module 20 is further configured to:
[0185] The mean square error of the pixel values of each pixel in the processed ultrasound image is calculated, and the image clarity of the processed ultrasound image is determined based on the mean square error, wherein the mean square error is inversely proportional to the brightness uniformity.
[0186] Furthermore, the second output module 40 is also used for:
[0187] If the image clarity does not meet the clarity threshold, acquiring an adjacent frame ultrasound image of the ultrasound image to be processed;
[0188] The adjacent frame ultrasound images and the processed ultrasound image are input into the super-resolution reconstruction model to obtain a reconstructed ultrasound image.
[0189] Furthermore, the super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block and an activation function, and the second output module 40 is further used for:
[0190] Inputting the adjacent frame ultrasound images and the processed ultrasound image into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image;
[0191] Inputting the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature;
[0192] Inputting the third feature and the fourth feature into the fusion layer to obtain a fusion feature;
[0193] Inputting the fused features into the residual block to obtain the target features;
[0194] The target feature is input into the activation function to obtain a reconstructed ultrasound image.
[0195] Furthermore, the super-resolution reconstruction model further includes an attention mechanism block, and the second output module 40 is further used for:
[0196] Inputting the third feature and the fourth feature into the attention mechanism block, and obtaining an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block;
[0197] Performing weighted processing on the fourth feature by using the attention weight to obtain a weighted feature;
[0198] The third feature and the weighted feature are input into the fusion layer to obtain a fusion feature.
[0199] Furthermore, the second output module 40 is also used for:
[0200] Acquire a first weight corresponding to the processed ultrasonic image and a second weight corresponding to the reconstructed ultrasonic image;
[0201] Performing weighted processing on the processed ultrasound image using the first weight to obtain a first weighted image, and performing weighted processing on the reconstructed ultrasound image using the second weight to obtain a second weighted image;
[0202] The first weighted image and the second weighted image are superimposed to obtain a target ultrasound image, and the target ultrasound image is output.
[0203] The various embodiments of the ultrasonic image processing device of the present application may refer to the various embodiments of the ultrasonic image processing method of the present application, and will not be described in detail here.
[0204] In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which an ultrasound image processing program is stored. When the ultrasound image processing program is executed by a processor, the steps of the ultrasound image processing method described below are implemented.
[0205] The various embodiments of the ultrasonic image processing device and the computer-readable storage medium of the present application may refer to the various embodiments of the ultrasonic image processing method of the present application, and will not be described in detail here.
[0206] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0207] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0208] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0209] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An ultrasonic image processing method, characterized in that: The ultrasonic image processing method comprises the following steps: Acquiring an ultrasonic image to be processed, and performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image; Determining the image clarity of the processed ultrasound image, and judging whether the image clarity meets a preset clarity threshold; If the image clarity meets the clarity threshold, outputting the processed ultrasound image; If the image clarity does not meet the clarity threshold, then the adjacent frame ultrasound images of the to-be-processed ultrasound image are obtained, the adjacent frame ultrasound images and the processed ultrasound image are input into a super-resolution reconstruction model to obtain a reconstructed ultrasound image, a first weight corresponding to the processed ultrasound image and a second weight corresponding to the reconstructed ultrasound image are obtained, the processed ultrasound image is weighted by the first weight to obtain a first weighted image, the reconstructed ultrasound image is weighted by the second weight to obtain a second weighted image, the first weighted image and the second weighted image are superimposed to obtain a target ultrasound image and output, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels; The super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block, an activation function and an attention mechanism block; the step of inputting the adjacent frame ultrasound images and the processed ultrasound image into the super-resolution reconstruction model to obtain a reconstructed ultrasound image includes: Inputting the adjacent frame ultrasound images and the processed ultrasound images into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image; Inputting the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature; Inputting the third feature and the fourth feature into the attention mechanism block, and obtaining an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block; Performing weighted processing on the fourth feature by using the attention weight to obtain a weighted feature; Inputting the third feature and the weighted feature into the fusion layer to obtain a fusion feature; Inputting the fused features into the residual block to obtain the target features; The target feature is input into the activation function to obtain a reconstructed ultrasound image.
2. The ultrasonic image processing method according to claim 1, characterized in that: The step of performing contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image comprises: Determine a region of interest and a region of non-interest in the ultrasonic image to be processed, wherein the region of non-interest is an image region of the ultrasonic image to be processed except the region of interest; Copying the ultrasonic image to be processed to obtain a copied ultrasonic image; Normalizing the grayscale of the ultrasonic image to be processed, determining the image stretching range of the ultrasonic image to be processed, and mapping the pixel value of each pixel of the ultrasonic image to be processed into the image stretching range to obtain a first processed image: Performing low-pass filtering and denoising processing on the replicated ultrasound image to obtain a second processed image; The region of interest of the first processed image and the region of no interest of the second processed image are combined to obtain a processed ultrasound image.
3. An ultrasonic image processing device, characterized in that: The ultrasonic image processing device comprises: An acquisition module is used to acquire an ultrasonic image to be processed, and perform contrast enhancement processing on the ultrasonic image to be processed to obtain a processed ultrasonic image; A judgment module, used to determine the image clarity of the processed ultrasound image, and to judge whether the image clarity meets a preset clarity threshold; A first output module, configured to output the processed ultrasound image if the image clarity meets the clarity threshold; A second output module is used for obtaining adjacent frame ultrasound images of the ultrasound image to be processed if the image clarity does not meet the clarity threshold, inputting the adjacent frame ultrasound images and the processed ultrasound image into a super-resolution reconstruction model to obtain a reconstructed ultrasound image, obtaining a first weight corresponding to the processed ultrasound image and a second weight corresponding to the reconstructed ultrasound image, performing weighted processing on the processed ultrasound image by the first weight to obtain a first weighted image, performing weighted processing on the reconstructed ultrasound image by the second weight to obtain a second weighted image, superimposing the first weighted image and the second weighted image to obtain a target ultrasound image and outputting the target ultrasound image, wherein the super-resolution reconstruction model is trained using low-resolution ultrasound images as input data and high-resolution ultrasound images as training labels; The super-resolution reconstruction model includes a convolution layer, an upsampling layer, a fusion layer, a residual block, an activation function and an attention mechanism block; the second output module is also used for: Inputting the adjacent frame ultrasound images and the processed ultrasound images into the convolution layer to obtain the first features of the adjacent frame ultrasound images and the second features of the reconstructed ultrasound image; Inputting the first feature and the second feature into the upsampling layer to obtain a third feature corresponding to the first feature and a fourth feature corresponding to the second feature; Inputting the third feature and the fourth feature into the attention mechanism block, and obtaining an attention weight based on the similarity between the third feature and the fourth feature through the attention mechanism block; Performing weighted processing on the fourth feature by using the attention weight to obtain a weighted feature; Inputting the third feature and the weighted feature into the fusion layer to obtain a fusion feature; Inputting the fused features into the residual block to obtain the target features; The target feature is input into the activation function to obtain a reconstructed ultrasound image.
4. An ultrasonic image processing device, characterized in that: The ultrasonic image processing device comprises: a memory, a processor, and an ultrasonic image processing program stored in the memory and executable on the processor. When the ultrasonic image processing program is executed by the processor, the steps of the ultrasonic image processing method according to any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an ultrasonic image processing program, and when the ultrasonic image processing program is executed by the processor, the steps of the ultrasonic image processing method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Intelligent pavement disease extraction method based on deep learning and image processing method
CN111310558A
Text recognition method and device, electronic equipment and storage medium
CN111461070A
Method and system for improving image definition, storage medium and electronic equipment
CN113744145A
