Compression noise reduction method and device for medical image and computer program product
Through the adaptive sparse decomposition and dictionary learning methods, the problem that the existing traditional Chinese medicine image compression and noise reduction are difficult to achieve simultaneously is solved, efficient data compression and image quality improvement are achieved, and prediction of unscanned layers is supported.
Patent Information
- Application Number
- CN202510006135.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-28
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-30
AI Technical Summary
The existing medical image compression methods cannot achieve significant compression effects and high-quality reconstruction images at the same time, and it is difficult to perform compression and noise reduction processing at the same time.
By preprocessing the medical images, the adaptive measurement matrix is determined, and the image blocks are adaptively sparsely decomposed based on the trained dictionary to remove salt and pepper noise, and then learn to remove continuous noise with the help of the second dictionary.
Simultaneous compression and noise reduction of medical images are achieved, reducing data volume, improving image quality, and supporting prediction of unscanned layers.
Smart Images

Figure CN120070230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a compression and noise reduction method, device, and computer program product for medical images. Background Art
[0002] Medical images play an important role in disease diagnosis. With the continuous progress of imaging technology, more and more medical images with high resolution and large bit depth are captured. These images are usually large in size and need to be archived for a long time, so a large amount of storage space is required. In addition, due to the bandwidth limitation of the transmission system, the efficiency of transmitting these image data is usually very low, which is not conducive to the timely acquisition and sharing of medical images. On the other hand, medical images are prone to contain various types of noise, such as Gaussian noise, salt-and-pepper noise, and white noise. The presence of these noises will seriously affect the interpretability of medical images and the accurate disease diagnosis process. Therefore, the compression and noise reduction of medical images are very important.
[0003] Existing medical image compression methods can be divided into lossy compression methods, near-lossless compression methods, and lossless compression methods. However, only near-lossless compression methods can provide significant compression effects while ensuring high image quality. Common near-lossless compression methods include transform coding, predictive coding, and deep learning-based methods. However, the compression rate based on transform methods is usually low, while the computational complexity of predictive coding and deep learning-based methods is very high, and existing image compression and noise reduction methods can only achieve single compression or noise reduction functions.
[0004] Due to the insignificant compression effect of existing methods and the lack of methods that can simultaneously compress and reduce noise in medical images, it is of great significance to explore a method that can provide excellent compression and noise reduction effects while ensuring high reconstructed image quality for better management and utilization of medical images. Summary of the Invention
[0005] The main objective of the embodiments of the present application is to provide a compression and noise reduction method, device, and computer program product for medical images, aiming to simultaneously compress medical images and remove various noises, thereby improving the storage, transmission, and processing efficiency of medical images and enhancing the quality of medical images, providing accurate and efficient data support for clinical diagnosis.
[0006] To achieve the above object, one aspect of the embodiments of the present application provides a compression and noise reduction method for medical images, including: obtaining a medical image; preprocessing the medical image to obtain image blocks corresponding to the medical image; determining an adaptive measurement matrix based on the positions of salt-and-pepper noise points in the image blocks and the unscanned layer indices in the medical image, wherein elements corresponding to the salt-and-pepper noise points in the image blocks in the adaptive measurement matrix are removed; performing adaptive sparse decomposition on the image blocks based on the adaptive measurement matrix and a trained first dictionary to obtain sparse vectors without salt-and-pepper noise, wherein the first dictionary is trained with noise-free medical images; reconstructing the medical image without salt-and-pepper noise through the sparse vectors without salt-and-pepper noise, and removing continuous noise by means of second dictionary learning to obtain a noise-reduced medical image.
[0007] To achieve the above object, another aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method in the above embodiments are implemented.
[0008] To achieve the above object, yet another aspect of the embodiments of the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by one or more processors, the steps of the method in the above embodiments can be implemented.
[0009] Compared with the prior art, the embodiments involved in the present application have the following advantages, for example:
[0010] The present application provides a method, device, and computer program product for compressing and denoising medical images. In the embodiments of the present application, first, a medical image is obtained; the medical image is preprocessed to obtain image blocks corresponding to the medical image; an adaptive measurement matrix is determined based on the positions of salt-and-pepper noise points in the image blocks and the unscanned layer index in the medical image, wherein the elements in the adaptive measurement matrix corresponding to the salt-and-pepper noise points in the image blocks are removed; the image blocks are adaptively sparsely decomposed based on the adaptive measurement matrix and a trained first dictionary to obtain sparse vectors without salt-and-pepper noise; the medical image is reconstructed through the sparse vectors without salt-and-pepper noise to obtain the medical image without salt-and-pepper noise; then, continuous noise is removed by learning with a second dictionary to obtain the denoised medical image. In the embodiments provided by the present application, the adaptive measurement matrix is determined based on the positions of salt-and-pepper noise points in the image blocks and the unscanned layer index in the medical image. Since the elements in the adaptive measurement matrix corresponding to the salt-and-pepper noise points in the image blocks are removed, by adaptively sparsely decomposing the image blocks with the adaptive measurement matrix and the first dictionary, simultaneous compression and denoising of the image blocks can be achieved, thereby reducing the data volume of the medical image and improving the quality of the medical image.
[0011] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. Description of the Drawings
[0012] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, wherein:
[0013] Figure 1 is a schematic framework diagram of a method for compressing and denoising medical images provided by some embodiments of the present application;
[0014] Figure 2 is a flowchart of a method for compressing and denoising medical images provided by some embodiments of the present application;
[0015] Figure 3 is an image of a female brain CT after compression and reconstruction by the present application and KSVD;
[0016] Figure 4 is a schematic diagram of the denoising effect of the present application and five common denoising methods;
[0017] Figure 5 is another schematic diagram of the denoising effect of the present application and five common denoising methods;
[0018] Figure 6 is a schematic diagram of the prediction of the unscanned layer of a female brain CT according to an embodiment of the present application;
[0019] Figure 7 It is a schematic diagram for predicting the un-scanned layers of a female abdominal CT according to an embodiment of the present application;
[0020] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided by some embodiments of the present application. Detailed implementation manners
[0021] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0022] It can be understood that the terms "first", "second", etc. used in the present application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if", "when" as used herein may be interpreted as "when...", "while...", or "in response to determining".
[0023] The terms "at least one", "a plurality of", "each", "any one", etc. used in the present application, at least one includes one, two or more than two, a plurality includes two or more than two, each refers to each of the corresponding plurality, and any one refers to any one of the plurality.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0025] In order to make the inventive concept of the present application easy to understand, before the embodiments of the present application are described in detail, the English abbreviations (terms) / related concepts involved in the embodiments of the present application are first described. The English abbreviations (terms) / related concepts involved in the embodiments of the present application are applicable to the following explanations.
[0026] CB-PCDL: The full English name of CB-PCDL is clustering-based physics-constrained dictionary learning, which is a clustering-based physics-constrained dictionary learning method proposed in the present application. This method can achieve simultaneous compression, noise reduction and prediction of un-scanned layers of medical images.
[0027] KSVD: The full English name of KSVD is K-Singular Value Decomposition, which is a dictionary learning algorithm. This algorithm learns an over-complete dictionary based on training data, enabling the input signal to be represented as a linear combination of a small number of atoms in the dictionary.
[0028] OMP: The full English name of OMP is orthognal matching prusuit, which is a greedy algorithm for sparse decomposition. This algorithm constructs a sparse representation by gradually selecting the atoms most relevant to the reconstruction error.
[0029] RMSE: The full name of RMSE is root mean squared error, which is used to measure the difference between two data sets.
[0030] PSNR: The full name of PSNR is peak signal-to-noise ratio, which is an evaluation metric for image quality and is used to measure the distortion between the reconstructed image and the original image.
[0031] SSIM: The full name of SSIM is structural similarity index measure, which is an evaluation metric for image quality and is used to measure the similarity level of brightness, contrast, and structural details between two images.
[0032] FSIM: The full name of FSIM is feature similarity index measure, which is an evaluation metric for image quality and is used to measure the feature similarity level between two images.
[0033] 3D-DCT: The full name of 3D-DCT is three-dimensional discrete cosine transform, which is a three-dimensional discrete cosine transform and can be used for data compression.
[0034] PCA: The full name of PCA is principle component analysis, which is a principal component analysis method and can be used for data compression.
[0035] Autoencoder: An autoencoder, which is a data compression method based on neural networks.
[0036] Median: Median filter, which is the abbreviation of the median filter.
[0037] NAMF: The full name of NAMF is non-local adaptive median filter, which is an extended method of median rate wave and can be used to effectively remove salt-and-pepper noise.
[0038] DWM: The full name of DWM is directional-weighted median filter, which is an extended method of median filtering and can be used to effectively remove salt-and-pepper noise.
[0039] Existing medical image compression methods can be divided into lossy compression methods, near-lossless compression methods, and lossless compression methods. However, only near-lossless compression methods can provide significant compression effects while ensuring high reconstructed image quality. Common near-lossless compression methods include transform coding, predictive coding, and deep learning-based methods. However, the compression ratio of transform-based methods is usually relatively low, while the computational complexity of predictive coding and deep learning methods is very high, and existing image compression and noise reduction technologies can only achieve single functions and rarely achieve simultaneous compression and noise reduction.
[0040] The following lists some methods of compression and image noise reduction in related technologies.
[0041] A method of lossy compression and noise reduction of images based on a metanetwork was disclosed in related technologies. This method realizes the mapping between a noisy image and a target image by training a metanetwork, thereby generating a set of hyperparameters. Based on these hyperparameters and the trained network, a noise-free image can be directly reconstructed from a given noisy image. However, the clear image obtained by this method is only an approximation of the target image, and there will be a certain loss of image information. In addition, the image data used in training the network is very small, resulting in low generalization ability of this method.
[0042] A method of image noise reduction based on wavelet transform was also proposed in related technologies. This method decomposes an image into wavelet coefficients of different scales, and then adjusts the wavelet coefficients according to the energy level of each scale. A noise-free image can be reconstructed based on the modified wavelet coefficients. Although the principle of this method is simple, there are certain difficulties in parameter selection, removing complex noise, and preserving image details.
[0043] A method and device for denoising medical images by learning the sparse representation of images using a neural network and an iterative threshold method were also disclosed in related technologies. This method regards the training of each layer of the neural network as an iterative process of the iterative shrinkage algorithm, and independently trains the network through random initialization and block-based methods to learn the sparse representation of the noise-free image. However, this threshold-based method may have the defects of insignificant effect and loss of image details when processing images with a high noise level.
[0044] In view of this, the present application proposes a compression and noise reduction method, device, and computer program product for medical images. The solution preprocesses the acquired medical image to obtain image blocks corresponding to the medical image; determines an adaptive measurement matrix based on the positions of salt-and-pepper noise points in the image blocks and the unscanned layer index in the medical image, where the elements corresponding to the salt-and-pepper noise points in the image blocks in the adaptive measurement matrix are removed; performs adaptive sparse decomposition on the image blocks based on the adaptive measurement matrix and a trained first dictionary to obtain a sparse vector without salt-and-pepper noise; reconstructs a medical image without salt-and-pepper noise through the sparse vector without salt-and-pepper noise, and removes continuous noise by means of second dictionary learning to obtain a noise-reduced medical image. In the embodiments provided by the present application, the adaptive measurement matrix is determined based on the positions of salt-and-pepper noise points in the image blocks and the unscanned layer index in the medical image. Since the elements corresponding to the salt-and-pepper noise points in the image blocks in the adaptive measurement matrix are removed, therefore, by performing adaptive sparse decomposition on the image blocks using the adaptive measurement matrix and the first dictionary, simultaneous compression and noise reduction of the image blocks can be achieved, thereby reducing the data volume of the medical image and improving the quality of the medical image.
[0045] The method provided by the embodiments of the present application can be applied to the electronic device provided by the embodiments of the present application, where the electronic device can be a terminal or a server.
[0046] The terminal can be a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
[0047] The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0048] Before introducing a compression and noise reduction method for medical images provided by the embodiments of the present application, first, an introduction is made to the framework of the compression and noise reduction method for medical images provided by the embodiments of the present application.
[0049] Please refer to Figure 1 , Figure 1 FIG. is a schematic diagram of the framework of a compression and noise reduction method for medical images provided by some embodiments of the present application. In the case where it is necessary to compress and noise reduce a medical image, the type of the target medical image (the medical image to be compressed and noise reduced) can be determined first. For example, if the target medical image is a multi-layer human head CT image, the first dictionary can be trained first through a clear multi-layer human head CT image (offline training), where the training process of the dictionary can refer to the description in the subsequent embodiments of the present application.
[0050] After that, preprocess the target medical image (online), determine an adaptive measurement matrix according to the medical image and the index of the unscanned layer in the medical image, and perform adaptive sparse decomposition on the image blocks obtained after preprocessing according to the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt-and-pepper noise. The sparse vector without salt-and-pepper noise can be stored and transmitted. After that, an image without salt-and-pepper noise can also be reconstructed from the sparse vector without salt-and-pepper noise, and continuous noise can be further removed by KSVD to obtain a noiseless image.
[0051] Since there are usually some information correlations between multi-dimensional medical images. For example, there are correlated information between and within the layers of CT images. The method proposed in the embodiments of the present application can explore the correlations between and within the layers of CT images, which is reflected in the way of image block division. Specifically, in order to explore the correlations within the layer region, blocks of a certain size are randomly extracted in the length and width directions of the three-dimensional image. And in order to explore the inter-layer correlations, at the same length and width position, blocks of every four adjacent layers are taken to form a data vector. Because there is a great correlation between the pixels of consecutive layers, combining the blocks of four adjacent layers into a data vector can retain the correlations between the four layers. In addition, when the first dictionary is trained with the training data generated in this way, the first dictionary can fully capture the correlations between the within-layer regions and between the inter-layer regions, thereby improving the expression ability of the dictionary.
[0052] There are often some phenomena of information discontinuity between adjacent layers of some multi-layer medical images, which are mainly reflected in the differences in detailed structures. Exemplarily, for computer tomography (CT) images, since they use X-ray imaging technology to take tomographic pictures of an object to generate three-dimensional images, and in order to reduce the size of the scanned image data volume and the harm caused by long-term radiation exposure to patients, most CT images are generated by jump scanning. Therefore, adjacent layers of CT images are usually not continuous. However, during pathological diagnosis, the unscanned layers may contain key pathological information, which plays an important role in the diagnostic decision. Therefore, it is necessary to predict the unscanned layers.
[0053] Due to the high correlation between consecutive layers of CT images, the un-scanned layers can be predicted based on the scanned layers. Assume that among every four adjacent layers of the reconstructed complete image, d layers are predicted, and the indices of these d layers can be represented as u (1 ≤ u ≤ 4). Record the index u and then divide the 4 - d scanned layers into blocks. The blocks between different layers at the same length and width positions from the original medical image form a test data vector. During the process of compressing and denoising the medical image, the elements in the ((u - 1)×100 + 1):u×100 rows of the initial adaptive measurement matrix can be removed. Then, based on the positions of the noise points, update the structure of the adaptive measurement matrix. Next, according to the updated adaptive measurement matrix and the sparse decomposition algorithm, solve the sparse vector of the non-noise point pixels in the scanned layers. Finally, a complete image block without salt-and-pepper noise and including the predicted un-scanned layers can be reconstructed, achieving the simultaneous compression, denoising, and prediction of un-scanned layers for CT images.
[0054] Experiments prove that the embodiments provided by this application have good compression and denoising effects.
[0055] The following will describe in detail the implementation steps of a method for compressing and denoising medical images provided by the embodiments of this application in conjunction with the accompanying drawings.
[0056] Please refer to Figure 2 , Figure 2 which is a flowchart of a method for compressing and denoising medical images provided by some embodiments of this application; it should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0057] The method of the embodiments of this application includes the following steps:
[0058] Step 101: Obtain a medical image;
[0059] Step 102: Preprocess the medical image to obtain image blocks corresponding to the medical image;
[0060] Step 103: Determine an adaptive measurement matrix based on the positions of the salt-and-pepper noise points in the image blocks and the indices of the un-scanned layers in the medical image, where the elements in the adaptive measurement matrix corresponding to the salt-and-pepper noise points of the image blocks are removed;
[0061] Step 104: Perform adaptive sparse decomposition on the image blocks based on the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt-and-pepper noise;
[0062] Step 105: Reconstruct the medical image through the sparse vector without salt-and-pepper noise to obtain a medical image without salt-and-pepper noise, and then remove the continuous noise by means of the second dictionary learning to obtain a denoised medical image.
[0063] The medical image involved in this application can be a three-dimensional medical image or a two-dimensional medical image. It should be understood that when the medical image is a two-dimensional medical image, the adaptive measurement matrix can be determined separately by the positions of the salt-and-pepper noise points in the image block, without the need to rely on the index of the un-scanned layer in the medical image.
[0064] After obtaining the medical image, preprocessing of the medical image is required, where the preprocessing can include region growing processing and blocking. The background noise in the acquired image can be removed through the region growing processing, and the medical image after region growing can be converted into multiple image blocks by using the blocking method. If a three-dimensional image is acquired, such as a multi-slice CT scan image, since there may be discontinuities between adjacent layers of the multi-slice CT scan image, then, in order to obtain more accurate diagnostic information, the un-scanned layers can be predicted based on a small number of scanned layers, where the index of the un-scanned layer can be defined according to the prediction needs.
[0065] After defining the index of the un-scanned layer, the adaptive measurement matrix can be determined by the index of the un-scanned layer in the defined medical image and the image blocks converted from the medical image, where the elements corresponding to the salt-and-pepper noise points in the image block in the adaptive measurement matrix are removed. The specific determination method of the adaptive measurement matrix will be introduced in detail later in this application.
[0066] After determining the adaptive measurement matrix, the image blocks converted from the medical image can be adaptively sparsely decomposed by the adaptive measurement matrix and the trained first dictionary, and then a sparse vector without salt-and-pepper noise is obtained. Thus, the medical image with noise is sparsely decomposed into a sparse vector without salt-and-pepper noise based on the adaptive measurement matrix. It should be understood that the characteristic of the sparse vector is that there are only a few non-zero elements, which makes the sparse vector have great advantages in storage and transmission.
[0067] After that, the medical image without salt-and-pepper noise can be reconstructed through the sparse vector without salt-and-pepper noise, and the continuous noise can be further removed by means of the second dictionary learning to obtain a denoised medical image.
[0068] Optionally, the method of the embodiment provided in this application can be divided into an online part and an offline part. Among them, the denoising and compression processing of the medical image including noise can be an online operation, while the training of the first dictionary can be an offline operation.
[0069] Steps 101 to 105 illustrated in the embodiments of the present application determine an adaptive measurement matrix based on the positions of salt-and-pepper noise points in the image block and the unscanned layer index in the medical image. Since the elements corresponding to the salt-and-pepper noise points in the image block in the adaptive measurement matrix are removed, when the image block is adaptively sparsely decomposed by the adaptive measurement matrix and the first dictionary, noise reduction and compression of the image block can be achieved synchronously, thereby reducing the data volume of the medical image and improving the quality of the medical image. The specific implementation manners of the above steps are introduced below.
[0070] In step 101, a medical image is obtained.
[0071] The medical image may be a three-dimensional medical image or a two-dimensional medical image. The medical image may be a multi-slice computed tomography (Multi-slice CT) image, magnetic resonance imaging (MRI), or multi-layer ultrasonic imaging, etc. The present application does not limit the type of the medical image.
[0072] Generally, the corresponding medical image can be obtained through the corresponding medical instrument. For example, magnetic resonance imaging can be obtained through a nuclear magnetic resonance device.
[0073] It can be understood that, on the one hand, there may be noise interference information in these medical images, such as Gaussian noise, salt-and-pepper noise, and white noise, which will bring great difficulties to subsequent diagnoses and thus affect accurate disease diagnosis; on the other hand, for three-dimensional medical images, these images usually have a large data volume, bringing a great burden to the storage and transmission systems.
[0074] In step 102, in order to achieve compression and noise reduction of the medical image, first, the medical image needs to be preprocessed to obtain an image block corresponding to the medical image.
[0075] The preprocessing operations on the medical image may include traditional preprocessing methods. For example, image correction, noise reduction, contrast enhancement, and / or image cropping, etc. Among them, the medical image can be segmented into image blocks through image cropping or image segmentation.
[0076] In some embodiments of the present application, preprocessing the medical image may be performing region growing on the medical image to obtain a binary image and an intermediate-stage medical image. The intermediate-stage medical image is used to represent the medical image after region growing. Then, the edges of the medical image features included in the binary image are detected by a Sobel operator to obtain an edge feature image; squares are respectively selected from the intermediate-stage medical image, the binary image, and the edge feature image to obtain the image block of the medical image.
[0077] Region Growing is an image segmentation technique that divides an image into regions with similar features through certain similarity criteria. This application uses this method to remove noise from the image background.
[0078] After performing region growing on a medical image, a binary image and an intermediate-stage medical image can be obtained. Among them, the intermediate-stage medical image is used to represent the medical image after removing background noise through region growing.
[0079] Optionally, after completing the region growing process on the medical image, the background region and non-background region of the image can be obtained. By replacing the pixel values of the background region with 0 and setting the pixel values of the non-background region to 1, a binary image of the same size as the original medical image can be obtained. Multiplying the binary image and the original medical image point by point can obtain an image without background noise, that is, the intermediate-stage medical image.
[0080] Exemplarily, based on the binary image I obtained from region growing 0 , the Sobel operator can be used to detect the edges of the features of the original image (the acquired medical image), thereby obtaining an edge-only image I of the same size as the original image 2 (edge feature image). Among them, only the pixel points that make up the edges in I 2 have a value of 1, and the remaining pixel points are 0.
[0081] Perform filtering on I using median filtering technology 1 to obtain I 3 ;
[0082] Divide the three-dimensional image I (intermediate-stage medical image) after removing background noise using region growing technology 1 into 10×10×4 blocks for every four adjacent layers (it can be to first divide the images of each layer into 10×10 two-dimensional blocks, and then combine the 10×10 two-dimensional blocks at the same length and width positions in every four adjacent layers to form 10×10×4 three-dimensional blocks). It should be understood that there is no overlap in the length, width, and depth directions between adjacent 10×10×4 blocks.
[0083] For the two-dimensional medical image I 1 , each image needs to be divided into non-overlapping 20×20 two-dimensional blocks. After dividing all the two-dimensional images I of the images 1 into blocks, convert each small block into a column vector;
[0084] Adopt a method synchronized with the process of converting the medical image I 1 into image blocks to convert I 0 (binary image), I 2 (edge feature image) and I 3(The image after median filtering) is converted into squares, and the positions and quantities of the blocks extracted from the four kinds of images are the same.
[0085] Exemplarily, the noise in the background of the noisy image can be removed through the region growing technique in the step of training the first dictionary with a clear medical image below, and the medical image I is obtained. 1 , I 0 and I 2 , wherein, different from the first dictionary training stage in the online compression noise reduction of the medical image and the region growing process in the un-scanned layer, if there is a point with a pixel value of 1 in the neighborhood of the seed point, it is also added to the growing region.
[0086] Exemplarily, all the small squares divided by the three-dimensional image I 1 , the binary image I 0 , the edge feature image I 2 and the image I after median filtering 3 can be converted into column vectors;
[0087] Calculate the variance of the image vectors obtained from I 3 ;
[0088] According to the variance of the image vectors of I 3 and the vectors obtained from I 2 , judge in turn whether each theoretical noise-free image vector of I 1 belongs to the small variance cluster, the medium variance cluster, the large variance cluster, or the edge-containing cluster, and based on this, allocate the first dictionary of the corresponding cluster to perform sparse decomposition on the image vectors of I 1 ;
[0089] Specifically, the variance of the image vectors obtained from I 3 can be used to allocate a dictionary corresponding to the three-dimensional image I 3 ; Exemplarily, the variance of the image vectors obtained from I 1 can be calculated, and this variance is compared with the preset variance threshold in the training of the first dictionary. Through the comparison result, a dictionary of the corresponding cluster can be allocated to the image vectors of I 3 for sparse decomposition of the image vectors of I 3 corresponding to the image vectors; 1 ;
[0090] In step 103, an adaptive measurement matrix can be determined through the positions of the salt-and-pepper noise points in the image block and the un-scanned layer index in the medical image, wherein the elements corresponding to the salt-and-pepper noise points of the image block in the adaptive measurement matrix are removed.
[0091] In medical image analysis, noise may obscure or confuse important diagnostic information, such as lesion areas, thus affecting the accuracy of disease diagnosis. Therefore, it is necessary to remove various noises in medical images to improve the image quality of medical images.
[0092] In the embodiments provided by this application, continuous noise in medical images can be removed based on second dictionary learning.
[0093] Among them, an adaptive measurement matrix is used to perform adaptive sparse decomposition on the noisy image, thereby removing salt-and-pepper noise in the medical image. The adaptive measurement matrix can be determined by the positions of salt-and-pepper noise points in the image block and the un-scanned layer index in the medical image.
[0094] Exemplarily, the initial adaptive matrix can be a 400×400 identity matrix, and then its structure is adaptively changed according to the index of the un-scanned layer and the product characteristics of the un-scanned layer and the image block vector after region growing. That is, the structure of the adaptive measurement matrix can be determined by the positions of salt-and-pepper noise points in each test image block and the index of the un-scanned layer.
[0095] In some embodiments of this application, the image block can be first converted into an image block vector. Then, an intermediate-stage feature matrix is generated through the image block vector and the first measurement matrix, where the first measurement matrix is the measurement matrix updated according to the un-scanned layer index in the medical image. Then, the positions of salt-and-pepper noise points in the image block are determined through the data features in the intermediate-stage feature matrix, and the intermediate-stage feature matrix is updated according to the positions of salt-and-pepper noise points in the image block to obtain the adaptive measurement matrix.
[0096] Exemplarily, the index of the un-scanned layer can be defined according to prediction needs. For example, if it is necessary to predict an un-scanned layer among every three adjacent layers of the original image, and the layer to be predicted is between the second and third layers of the original image, then the index of the un-scanned layer can be set to 3 (the purpose of this is to ensure that the scanned layer and the un-scanned layer are combined into four consecutive layers). The initial measurement matrix can be set as a 400×400 identity matrix, and the elements from its 201st row to 300th row (which can be determined according to the index of the un-scanned layer. That is, assuming the index of the un-scanned layer is u, then the removed rows can be set as ((u - 1)×100 + 1):u×100) are removed to obtain a 300×400 matrix.
[0097] The positions of salt-and-pepper noise points can be judged by the product characteristics of the measurement matrix updated based on the un-scanned layer index and the multiplication of each image block vector. The specific method can be:
[0098] If the elements in the product are only 0 and 1, then the original noise-free image block most likely belongs to the pure background region in the small variance cluster. In this case, the pixels corresponding to the product being 1 are noise points, and the values of these pixel points need to be replaced with 0;
[0099] If there are other types of elements in the product besides 0 and 1, it most likely indicates that the original noise-free image block belongs to the uniform gray region or the medium and large variance regions in the small variance cluster. Then, the elements corresponding to the product being 0 and 1 are very likely to be the positions of salt-and-pepper noise, and the row elements of the corresponding measurement matrix need to be removed;
[0100] For the image vectors in the edge-containing cluster, they need to be judged separately in combination with the I 0 vector (the vector converted from the binary image I 0 ). The judgment method is similar to the described method. If the product corresponds to the background region of the I 0 data vector, then the pixel points corresponding to the product being 1 are noise points, and the pixel values of these points need to be replaced with 0. If the product corresponds to the 0 image feature region of I, then the pixel points corresponding to the product being 1 and 0 are salt-and-pepper noise points, and the row elements of the corresponding measurement matrix need to be removed.
[0101] Based on the above steps, the structure of the measurement matrix can be updated according to the index of the un-scanned layer and the positions of the noise points.
[0102] In step 104, the image block can be adaptively sparsely decomposed based on the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt-and-pepper noise.
[0103] After determining the adaptive measurement matrix, the segmented image block can be adaptively sparsely decomposed by the adaptive measurement matrix and the offline-trained first dictionary. The decomposition result is a sparse vector without salt-and-pepper noise, thereby realizing the simultaneous compression and noise reduction operations on the medical image that may have salt-and-pepper noise. Among them, the first dictionary can be obtained by offline training with noise-free medical images.
[0104] It should be understood that for the medical images used to train the first dictionary, in addition to requiring no noise, they should also contain as complete information as possible about the same type of images as the target medical images to be compressed and denoised. For example, if the task of online compression is to compress the CT images of the human head, then multiple noise-free CT images of male and female heads can be used to train the first dictionary. Preferably, the CT images participating in the training need to contain as many scanned layers as possible.
[0105] For example, clear medical images can be obtained, and the obtained clear medical images are used to train noise-free dictionaries in the offline stage. Therefore, these images need to be clear and noise-free, and belong to the same category as the images to be compressed and denoised. For example, if the image to be processed is a CT image of the human brain, the obtained image must also be a CT image of the human brain, but it can be from a different human body. In addition, if the image to be compressed and denoised is three-dimensional, these acquired images need to contain as many scan layers as possible.
[0106] In some embodiments of the present application, the step of training the first dictionary using clear medical images may be: preprocessing the noise-free medical image to obtain noise-free image blocks, wherein the preprocessing includes region growing and blocking, wherein adjacent image blocks have any overlap in length and width and one or more layers of overlap in depth; clustering the noise-free image blocks and obtaining the first dictionary based on training with different sparsity constraints.
[0107] Optionally, the clear medical image can be segmented layer by layer based on the region growing technique of pixel threshold. The main steps include:
[0108] (1) Select a point with the smallest pixel value in the image as the seed point, and initialize the pixel mean of the growth area to the pixel value of the seed point;
[0109] (2) Find the point whose difference between the pixel point in the 3×3 neighborhood centered on the seed point and the mean value of the pixel in the growth area is less than the threshold value 0.09 and is the smallest, and add the pixel point to the current growth area;
[0110] (3) Update the pixel mean of the growing area to the average pixel value of the growing area;
[0111] (4) Update the added pixel points as new seed points;
[0112] (5) Repeat steps (2) to (4) until no new pixels can be added to the growth area;
[0113] (6) Select the point with the smallest pixel value in other areas of the image and a difference of less than 0.09 from the mean pixel value of the existing growth area as the seed point of the next growth area;
[0114] (7) Repeat steps (5) and (6) until there are no new seed points that meet the requirements in the entire image, and the segmentation of this layer of the image is completed.
[0115] After the region growth of the medical image is completed, the background area and non-background area of the image are obtained. The pixel values of the background area are replaced with 0, and the pixel values of the non-background area are set to 1, and a binary image I with the same size as the original medical image I is obtained. 0 . Will I0 Multiplying with the original medical image \(I\) can obtain the image \(I\) without background noise. 1 .
[0116] After removing the noise in the image background, the image needs to be divided into blocks. In order to accurately find the edge-containing (junction of background and non-background) regions in the image \(I\) 1 during the clustering process, the Sobel operator needs to be used to detect the edges of the image features in the binary image \(I\) 0 to obtain the edge image \(I\) 2 . Among them, only the pixel points forming the edges in \(I\) 2 have a value of 1, and the remaining pixel points are 0. Then, simultaneously divide the image \(I\) 1 and \(I\) 2 into blocks to obtain training data. Among them, there are differences in the block division methods for two-dimensional medical images and three-dimensional medical images:
[0117] For the two-dimensional medical image \(I\) 1 , randomly select 7000 \(20\times20\) blocks from each image, and there is a random overlap amount between the blocks in the length and width directions. After the two-dimensional image \(I\) 1 of all images is divided into blocks, each small block is converted into a column vector;
[0118] For the three-dimensional medical image \(I\) 1 , randomly select 7000 \(10\times10\) blocks in the length and width directions, and there is a random overlap amount between adjacent blocks in the length and width directions. Combine 4 \(10\times10\) blocks at the same length and width positions of adjacent four layers into a \(10\times10\times4\) three-dimensional block, and then convert it into a column vector. It should be noted that in the depth direction of the three-dimensional image, there is an overlap amount of two layers of pixels between adjacent \(10\times10\times4\) three-dimensional blocks. Using this method can more fully explore the correlation between pixels within the same layer and between different layers in the first dictionary learning.
[0119] While extracting blocks from \(I\) 1 , extract blocks of the same size from the same positions of the edge image \(I\) 2 and convert them into column vectors;
[0120] After that, all vectors obtained from \(I\) 1 are divided into four clusters: small variance, medium variance, large variance, and edge-containing according to the texture complexity of the image vectors and whether they contain edges. Among them, the texture complexity is judged by the variance value of the image vectors. The specific process of clustering is as follows:
[0121] Extract from \(I\) 2 the vectors corresponding to the indices of the edge-containing vectors in the vectors obtained from the edge image \(I\) 1Obtain the vectors containing edges in the vector. The reason for dividing the data cluster containing edges is that the external contour of the organism changes continuously. Therefore, there is a great correlation between the edge-containing regions in the image, and the noise reduction processing method for the edge-containing regions is different from that of other regions;
[0122] Calculate the variance value of the elements in the remaining vectors of I 1 and compare it with a predefined variance threshold. When the variance value of the image vector is less than 10 -4 , it is classified into the small variance cluster. The image patches in this cluster are usually uniform gray or pure background regions; when the variance value of the image vector is greater than or equal to 10 -4 and less than 10 -3 , it is classified into the medium variance cluster; the variance of the remaining image vectors is greater than 10 -3 , so it belongs to the large variance cluster.
[0123] It should be noted that the variance thresholds for each cluster are defined based on experience, and the purpose is to distinguish blocks with different texture complexities.
[0124] When dividing the denoised medical image after region growing into patches to generate training data, there needs to be an arbitrary overlap amount between adjacent patches in the length and width directions, and for three-dimensional patches, there needs to be a multi-layer (for example, two layers) overlap amount in the depth direction. This way can alleviate the 'block effect' in the reconstructed image.
[0125] Exemplarily, in the construction of the first dictionary, 8500 data can be randomly selected from the image vectors of the four clusters as training data to train the dictionaries of each cluster respectively. This way can improve the expression ability of the dictionary and retain the differences between the data of different clusters. Randomly select 1300 data from the training data of each cluster as the initial dictionary in turn, and then train the dictionary based on the KSVD algorithm.
[0126] Specifically, cluster the image patches and train to obtain the first dictionary based on different sparsity constraints. Among them, the dictionary can be learned through KSVD (K-Singular Value Decomposition).
[0127] Exemplarily, the objective equation of the training process can be represented by Equation (1):
[0128]
[0129] where, ∥·∥ F represents the Frobenius norm, which is used to calculate the reconstruction error and the measurement error (the first and second terms in Equation (1)). i is the number of clusters, is the training set composed of N training data for the i-th cluster. Each training data Represents a vectorized image block, where M is the number of elements in each image vector. is the basis matrix or dictionary of the i-th cluster, where M < W and W << N to balance computational efficiency and the expressive power of the dictionary. Represents a sparse matrix, which consists of the sparse vectors of N training data The number of non-zero elements in the sparse vector is constrained by Equation (2), where ||·|| 0 represents L 0 norm, which is used to calculate the number of non-zero elements in a vector.
[0130] When using the dictionary learning method for image compression and reconstruction, the number of atoms required for accurate reconstruction of different texture complexity regions is different. Specifically, regions with complex textures require more dictionary atoms to achieve accurate reconstruction. Therefore, different sparsity constraints K need to be set for training dictionaries of different clusters. In the embodiments of the present application, the sparsity values K of the small variance cluster, medium variance cluster, large variance cluster, and edge-containing cluster can be set to 30, 40, 55, and 60 respectively, and these values are obtained through experiments that balance the reconstruction error and computational efficiency in KSVD. Represents a measurement matrix, which is a diagonal matrix, as shown in Equation (3):
[0131]
[0132] Among them, the column index where the "1" element is located represents the position of the data point to be collected. In the training stage, the measurement matrix is a 400×400 identity matrix. α and β are the weights of the reconstruction and measurement errors. In this embodiment, the values of α and β are both 1.
[0133] When updating the dictionary using KSVD, the objective equation in Formula (1) needs to be converted into the form of Equation (4):
[0134]
[0135] Among them, Composite dictionary Sparse vector ζ i and the composite dictionary B i will be iteratively optimized. Among them, when solving the sparse vector ζ i (also known as sparse decomposition), the composite dictionary B i is fixed, and Equation (5) is solved based on the OMP algorithm:
[0136]
[0137] Then, the obtained sparse coefficients are fixed, and each atom in the dictionary is updated in turn based on Formula (6):
[0138]
[0139] Among them, represents the k-th atom of the i-th dictionary, represents the k-th row element of the corresponding i-th sparse matrix, is the reconstruction error excluding the k-th atom.
[0140] During the dictionary training process, each atom in the dictionary is iteratively updated. When the dictionary is trained 20 rounds using all training data, the reconstruction error converges to a lower value, and at this time, the final composite dictionary B is output i , and then the dictionaries for each cluster are calculated according to Equation (7) where I represents the identity matrix.
[0141]
[0142] In the online stage, the corresponding first dictionary can be directly selected according to the cluster to which the noisy image data belongs, and combined with the adaptive measurement matrix for adaptive coefficient decomposition, so as to achieve simultaneous compression and removal of salt-and-pepper noise. Among them, the adaptive sparse decomposition can be achieved by multiplying the adaptive measurement matrix and the data with salt-and-pepper noise to obtain the measurement points without salt-and-pepper noise; through the sparse coding algorithm, combining the adaptive measurement matrix and the first dictionary to perform sparse decomposition on the pixel points without salt-and-pepper noise to obtain the sparse vector without salt-and-pepper noise.
[0143] Exemplarily, the above process can be expressed as:
[0144] Based on Equation (8), the pixel points without salt-and-pepper noise are obtained.
[0145]
[0146] Among them, L represents the number of test image vectors in the i-th cluster, is the adaptive measurement matrix of the j-th test data in the i-th cluster, and its structure is determined according to the index of the unpredicted layer and the position of the salt-and-pepper noise points, is the j-th test data (image vector) in the i-th cluster, is the pixel point without salt-and-pepper noise.
[0147] The index of the un-scanned layers can be defined according to the prediction requirements. Assume that among every four adjacent layers of the reconstructed complete image, d layers are predicted, and the indices of these d layers are denoted as u (1 ≤ u ≤ 4). Record the index u, and then divide the scanned 4 - d layers into 10×10 blocks. Blocks between different layers at the same length and width positions from the original image form a test data vector (the purpose of doing this is to ensure that the scanned layers and the un-scanned layers are combined into continuous four layers). Then, remove the elements in the ((u - 1)×100 + 1):u×100 rows of the initial measurement matrix (the measurement matrix in the training stage) to obtain the updated measurement matrix.
[0148] The positions of the salt-and-pepper noise points in the test data can be judged by the product characteristics of the updated measurement matrix based on the un-scanned layer index and each image block vector, and the structure of the measurement matrix is adaptively updated according to the positions of the salt-and-pepper noise. The specific method is as follows:
[0149] (1) If there are only 0 and 1 elements in the product, it indicates that the noise-free image block of the target belongs to the pure background area in the small variance cluster. Then, the pixel at the position corresponding to the product being 1 is the noise point, and the value of this pixel point needs to be replaced with 0.
[0150] (2) If there are other types of elements in the product besides 0 and 1, it indicates that the noise-free image block of the target belongs to the uniform gray area or the medium and large variance areas in the small variance cluster. Then, the elements at the positions corresponding to the product being 0 and 1 are the positions of the salt-and-pepper noise points, and the row elements of the corresponding measurement matrix need to be removed.
[0151] (3) For the image vectors in the edge-containing cluster, they need to be judged separately in combination with the vector obtained from the binary image (the binary image representing the background and non-background). The judgment method is similar to the above method. If the product corresponds to the background area of the binary image vector, the pixel point corresponding to the product being 1 is the noise point, and the pixel value of this point needs to be replaced with 0; if the product corresponds to the feature area of the binary image, the pixel points corresponding to the product being 1 and 0 are the salt-and-pepper noise points, and the row elements of the corresponding measurement matrix need to be removed.
[0152] After obtaining the updated , by multiplying it with the noisy test data vector, the pixel points without salt-and-pepper noise can be obtained. Then, based on the OMP algorithm, the adaptive sparse decomposition of the pixel points without salt-and-pepper noise is realized to obtain the sparse vector without salt-and-pepper noise. The sparse decomposition of the pixel points without salt-and-pepper noise to obtain the sparse vector can be realized based on formula (9).
[0153]
[0154] Among them, represents the sparse vector without salt-and-pepper noise obtained by sparse decomposition, and this process can be achieved through a sparse coding algorithm. represents the first dictionary, that is, the number of non-zero elements in each sparse vector cannot be greater than K i .
[0155] Optionally, similar to the training stage, different sparsity values K are set for test data belonging to different clusters. In this embodiment, the K value for the small variance cluster is 3, and the K values for the other three clusters are all 100. Because the image texture of the small variance cluster is simple and only a small number of atoms are needed to achieve accurate reconstruction, while the data of the other three clusters need to use more atoms to achieve accurate reconstruction.
[0156] The sparse coding algorithm is an algorithm for signal representation and feature extraction, which aims to find a method that can represent a signal with as few non-zero coefficients as possible.
[0157] The sparse coding algorithm can be Basis Pursuit, Compressive Sensing, Iterative Thresholding, Lasso (Least Absolute Shrinkage and Selection Operator), Orthogonal Matching Pursuit (OMP), etc.
[0158] Among them, OMP is a greedy algorithm that constructs a sparse representation by iteratively selecting the atom most relevant to the current signal residual.
[0159] After compressing and denoising the medical image, only a small number of non-zero elements in the obtained sparse vector need to be stored and transmitted, thus greatly reducing the amount of data that needs to be stored and transmitted.
[0160] It should be understood that the original medical image to be compressed and denoised can be reconstructed through the sparse vector without salt-and-pepper noise. In a sense, the sparse vector without salt-and-pepper noise can completely represent the useful information existing in the medical image. Therefore, after obtaining the sparse vector without salt-and-pepper noise, the storage or transmission of the sparse vector without salt-and-pepper noise can be used to replace the previous storage and transmission of the original medical image, thereby reducing the amount of data, saving storage space, and improving the transmission efficiency of the medical image.
[0161] In step 105, the medical image can be reconstructed through the sparse vector without salt-and-pepper noise to obtain a medical image without salt-and-pepper noise, and then the second dictionary learning can be further used to remove continuous noise to obtain the denoised medical image.
[0162] Reconstructing a medical image through a sparse vector without salt-and-pepper noise may generate image patch information without salt-and-pepper noise through the product of the sparse vector without salt-and-pepper noise and a first dictionary. Then, the image patch information is assembled to obtain a complete medical image without salt-and-pepper noise. The complete medical image includes the predicted medical image of the unscanned layer. Then, the continuous noise in each layer of the medical image without salt-and-pepper noise is successively removed by using a second dictionary learning to obtain a denoised medical image.
[0163] Exemplarily, in the reconstruction stage, a sparse vector without salt-and-pepper noise and a first dictionary without noise are multiplied to restore the image patch information without salt-and-pepper noise. Then, all the reconstructed image patches are assembled to obtain a complete image without salt-and-pepper noise. This process can be expressed as formula (10):
[0164]
[0165] wherein, represents the reconstructed complete noise-free three-dimensional image, t represents the number of clusters, and the number of clusters can be set to 4 according to the above embodiments. J represents the total number of image patches in each reconstructed cluster.
[0166] It should be noted that the above is a process description of the simultaneous compression, salt-and-pepper noise removal, and prediction of the unscanned layer of a three-dimensional image, and the prediction of the unscanned layer is only applicable to three-dimensional medical images. In the process of removing salt-and-pepper noise from a two-dimensional image, the initial measurement matrix and the test data are multiplied, and the structure of the measurement matrix is updated only based on the positions of the salt-and-pepper noise points. The remaining steps are the same as those in the process of removing salt-and-pepper noise from a three-dimensional medical image.
[0167] The physical constraints in this application refer to the positions of the salt-and-pepper noise points and the indexes of the unscanned layers. Based on these physical constraints, the adaptive sparse decomposition of the input image can be realized.
[0168] The reconstructed medical image without salt-and-pepper noise is input layer by layer into the KSVD algorithm, and the removal of continuous noise is realized based on the following formula (10):
[0169]
[0170] wherein, in formula (11), from top to bottom are the objective equation of the KSVD algorithm, the constraints in the process of solving the second dictionary and the sparse coefficients, and the expression of the reconstruction process. S ii is the image of the ii-th layer of the three-dimensional medical image (or the ii-th two-dimensional image), ζ ii is the sparse vector corresponding to S ii , represents the image of the ii-th layer after the removal of continuous noise, D iiFor the second dictionary of the ii-layer image during the noise reduction process, ε is an extremely small value. In the embodiments of the present application, ε is set to 10 -4 .
[0171] It should be understood that the second dictionary is a dictionary retrained based on each layer of pictures. Its training constraints can refer to the description in formula (11).
[0172] It should be noted that due to the region growth process and the clustering-based dictionary limitation in the embodiments of the present application, the above continuous noise removal process can be applied to the removal of continuous noise with an amplitude less than 0.09 and a variance less than 10 -4 .
[0173] The above is a detailed description of the simultaneous compression denoising and un-scanned layer prediction (CB-PCDL) method for medical images proposed in the present application.
[0174] Next, the results of compressing, denoising, and predicting un-scanned layers of human body CT images by the method of the present application will be introduced in combination with the remaining drawings to demonstrate the effectiveness of the CB-PCDL method proposed in the present application.
[0175] When using the CB-PCDL method to compress, denoise, and predict un-scanned layers of human brain CT, male brain CT downloaded from the website of the National Library of Medicine (NLM) is used as training data, and female brain CT images are used as test data. Among them, male brain CT contains 245 scanned tomographies, and female brain CT contains 234 scanned tomographies.
[0176] Figure 3 are the images of the female brain CT after compression and reconstruction by the present application and KSVD.
[0177] The embodiments of the present application first tested the compression effect of the CB-PCDL method on two-dimensional medical images. Therefore, each layer image of the obtained brain CT was compressed as an independent two-dimensional image. A dictionary of four clusters was trained using 20×20 blocks from all layers of male CT Figure 3 Figure (b) in shows the image of the 116th layer of the female brain CT compressed and reconstructed by CB-PCDL at a compression ratio of 113. Figure 3Figure (c) is an image of the 116th layer of female brain CT compressed and reconstructed by the KSVD method, and is compared with the results of the method of the present application. KSVD represents a traditional dictionary learning method, which achieves image representation by training an overcomplete dictionary. In the embodiment of the present application, the training data of KSVD is a mixture of the training data of the four clusters of CB-PCDL, and the sparsity K value in the dictionary training process is set to 46, that is, the average sparsity of the four clusters of CB-PCDL, and the sparsity K value in the OMP of the test phase is set to 100, so the compression ratio of KSVD is 4. From the comparison of the three figures, Figure 3 The image in (b) is closer to the original image, and Figure 3 The feature contour ratio in (b) Figure 3 The figure (c) is more obvious. Figure 3 In (b), the reconstructed block effect (clear boundaries between blocks) mainly appears in the boundary area between simple texture and complex texture, while Figure 3 In (c) of the figure, the blocking effect also exists in the complex texture area. In addition, the peak signal-to-noise ratio (PSNR) and root mean square error (RMSE) of the CB-PCDL reconstructed image are 50.97dB and 0.00283, respectively, while the PSNR and RMSE of KSVD are 48.67dB and 0.00369, respectively. The former is significantly better than the latter. Therefore, the performance of the CB-PCDL method in compressing two-dimensional medical images is better than that of the traditional dictionary learning method.
[0178] Figure 4 It is a schematic diagram of the noise reduction effect of the embodiment of the present application and five common noise reduction methods.
[0179] Specifically, Figure 4 The denoising effect of the embodiment of the present application is compared with five common denoising methods, including a median filter, a directional weighted median (DWM) filter, a non-local adaptive mean filter (NAMF), a Gaussian filter and KSVD, which are effective in removing salt and pepper noise. In order to evaluate the robustness of these denoising methods, noisy images with different noise concentrations (5% to 65%) were used for testing. Figure 4Shows the change curves of the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM) of the denoised images obtained using six denoising methods. It can be seen that as the noise concentration increases, the PSNR and SSIM values of the images obtained by all methods show a downward trend. Among them, the PSNR curve of median filtering and the SSIM curve of the DWM method decline the fastest. This is because at a higher noise density, many noise pixel points are misidentified as pixels of actual image features by these two methods. Although the NAMF method is also based on the median filtering principle, it uses non-local similarity to select adjacent pixel regions and adaptively adjusts the similarity weights. Therefore, it shows better robustness in denoising than median filtering and DWM. The results of the KSVD and Gaussian filtering methods are very similar, and the PSNR and SSIM values are the smallest in the case of low noise density. This is because the traditional KSVD and Gaussian filtering methods are more suitable for removing continuous noise. In contrast, the PSNE and SSIM values of the images obtained by the method (CB-PCDL) provided in the embodiments of the present application are the largest throughout the noise density range. Specifically, the PSNR value of CB-PCDL at 5% noise density is 5.79 dB higher than that of median filtering, and even at a high noise density of 65%, the PSNR value of the CB-PCDL method still reaches 40.21 dB, which is 21.25 dB higher than the second-highest NAMF. In addition, at 5% noise density, the difference in the SSIM values between CB-PCDL and the other three median filtering-based methods is not significant. However, as the noise density increases, the SSIM value of CB-PCDL always remains above 0.99, indicating that the CB-PCDL method can retain the detailed structure and texture information of the image during the denoising process, and this feature is significantly better than the other methods participating in the comparison.
[0180] Figure 5 is another schematic diagram of the denoising effect of the present application and five common denoising methods, where Figure 5 Figure (a) in Figure 5 is the original clear (noise-free) image, Figure 5 Figure (b) in Figure 5Subfigure (g) in it separately shows the noise reduction effects of the median filter, non-local adaptive median filter, directional weighted median (DWM) filter, KSVD, Gaussian filter, and the compression and noise reduction method (CB-PCDL) provided by the embodiments of the present application. The red rectangular frame magnifies and shows the area containing complex textures. It can be seen that the image quality after noise reduction using the median filter and the CB-PCDL method is significantly higher than the other four methods. However, some detailed textures and sharpness in the image denoised by the median filter method are damaged. Obviously, whether considering the overall clarity or the detail retention situation, the image denoised by the CB-PCDL method shows a quality similar to that of the original noise-free image.
[0181] It should be noted that during the simultaneous compression and noise reduction process, the training data of CB-PCDL is the same as that in the pure compression stage. The test data is the female brain CT image without noise with added salt-and-pepper noise. And only the CB-PCDL method realizes simultaneous compression and noise reduction, with a compression ratio of 118. The other five methods participating in the comparison only have noise reduction without an image compression process.
[0182] The embodiments of the present application also tested the effects of CB-PCDL on simultaneous compression, noise reduction, and prediction of un-scanned layers of medical images. The reason for predicting the un-scanned layers is that there are usually some phenomena of information discontinuity between adjacent layers of some three-dimensional medical images. Because in the acquisition process of some medical images, such as computed tomography (CT) images, X-rays need to pass through the human body to generate three-dimensional tomographic images of the human body. In order to reduce the amount of image data and the harm caused by long-term radiation exposure to patients, most CT images are generated by jump scanning, that is, adjacent layers of CT images are usually discontinuous. However, in pathological diagnosis, the un-scanned layers may contain key disease information. Therefore, predicting the un-scanned layers based on a small number of scanned layers is of great significance for improving the efficiency of medical image acquisition and promoting better disease diagnosis.
[0183] Figure 6 The figure shows the prediction result of the 99th layer of the female brain CT by the method (CB-PCDL) proposed in the present application. In this embodiment, it is assumed that the third layer of every four layers of the original female brain CT is un-scanned. Therefore, during the test stage, the images of every three adjacent layers are divided into 10×10 blocks and then converted into column vectors, and the elements from the 201st to 300th rows of the initial measurement matrix are removed. Then, simultaneous compression, noise reduction, and prediction of un-scanned layers are performed. In this embodiment, the compression ratio is set to 118, and the input test image contains 5% concentration of salt-and-pepper noise. Figure 6 Subfigure (a) in it shows the actual 99th layer image of the female brain CT, Figure 6 Subfigure (b) in it is the predicted image. Figure 6The PSNR values of the image shown in Figure (b) and the overall reconstructed image are 37.45 dB and 42.90 dB respectively. It can be seen that this compression process still belongs to the near-lossless compression range. Figure 6 The reconstructed RMSE of (b) in it is 0.0134. Compared with Figure 6 the actual image in (a), the predicted image shows all the detailed structures and the resolution is within an acceptable range. There are obvious block effects in the uniform gray areas of the predicted image because the number of atoms used to reconstruct these areas is only three, which is too small to effectively predict the unknown pixels. Therefore, if the compression ratio is reduced, the quality of the predicted image will be further improved. Figure 6 Figure (c) in it represents Figure 6 the absolute error distribution between Figure (a) in it and Figure (b) in 6. Obviously, the error is larger in the complex texture areas, and the absolute error is about 0.2, while the absolute errors in other areas are all less than 0.1. Therefore, the predicted image has the potential to be used in medical diagnosis.
[0184] To test the generalization ability of the method proposed in this application, the method of this application is also used for simultaneous compression, noise reduction, and prediction of un-scanned layers of female abdominal CT. In this embodiment, the training data is the noiseless male abdominal CT, and the test data is the female abdominal CT with 5% salt-and-pepper noise added. Both male and female abdominal CT images can be downloaded from the National Library of Medicine (NLM). It is also assumed that the third layer in every adjacent four layers of the female CT is the un-scanned layer that needs to be predicted. Since the features of abdominal images are larger than those of head images, the compression ratio for compressing abdominal images is set to 81 to ensure the accuracy of reconstruction. Figure 7 Shown in Figure (a) in it is the 99th layer image of the female abdominal CT, Figure 7 Figure (a) in 7, Figure (b) in 7, and Figure (c) in 7 are the actual image, the predicted image, and the absolute error between the predicted and actual images respectively. Figure 7 The PSNR of Figure (b) in it and the total reconstructed image are 33.09 dB and 37.33 dB respectively, and the corresponding RMSEs are 0.0221 and 0.0136 respectively. The quality of the predicted image is slightly worse than that of the brain image because the female abdominal images used for testing are more complex than the male abdominal images used for training. Figure 7 There are some block effects in the uniform gray areas of the predicted image in Figure (b) in it, which is similar to the case of predicting brain images. However, the overall feature boundaries of the image are very clear. In addition, from Figure 7 Figure (c) in it, it can be seen that the high prediction errors mainly appear in the central and boundary areas of the abdominal image, but they are all less than 0.3. Therefore, the method proposed in this application is applicable to the compression, noise reduction, and prediction of un-scanned layers of various CT images.
[0185] The above is an introduction to the embodiment of the compression and noise reduction method for medical images provided by this application.
[0186] Next, the implementation manner of the electronic device provided by the embodiment of this application will be described in detail with reference to the accompanying drawings.
[0187] As Figure 8 shown, the embodiment of this application also provides an electronic device. The electronic device 800 includes a memory 801, one or more processors 802 ( Figure 8 only one is shown in the figure), and a computer program stored on the memory 801 and executable on the processor 802. Among them: The memory 801 is used to store software programs and units. The processor 802 executes various functional applications and data processing by running the software programs and units stored in the memory 801 to obtain the resources corresponding to the above preset events. Optionally, when the processor 802 runs the above computer program stored in the memory 801, the above compression and noise reduction method for medical images is implemented.
[0188] The memory 801, as a non-transitory computer-readable medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory 801 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some implementation manners, the memory 801 may optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the processor 802 through a network.
[0189] It can be understood that the content in the above method embodiments is applicable to the embodiment of this electronic device. The functions specifically implemented by the embodiment of this electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.
[0190] The embodiment of this application also provides a computer program product. The above computer program product includes a computer program, and when the above computer program is executed by one or more processors, it can implement the steps of the above compression and noise reduction method for medical images.
[0191] It can be understood that the content in the above method embodiments is applicable to the embodiment of this computer program product. The functions specifically implemented by the embodiment of this computer program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.
[0192] The compression and noise reduction method, device, electronic device, and computer program product for medical images provided by the embodiments of the present application can simultaneously compress and reduce noise in medical images. The method provided by the embodiments of the present application adopts an offline dictionary training and an online image synchronous compression and noise reduction strategy. The dictionary is trained using noise-free images. The noisy images in the online stage are sparsely decomposed into noise-free sparse vectors according to an adaptive measurement matrix, and the noise-free images can be reconstructed at a relatively high compression rate. In addition, the embodiments of the present application explore the correlation between and within medical image slices through a clustering-based dictionary learning strategy, retain their differences, and use different sparsity constraints to train different dictionaries according to the complexity of the texture of the training data to achieve a better representation effect. The dictionary learning method based on physical constraints provided by the embodiments of the present application can perform adaptive sampling and sparse decomposition according to the specific features of the image, such as the noise position and the unindexed scanned layer, so as to realize the simultaneous compression, noise reduction, and prediction of the unindexed scanned layer of medical images. In addition, the compression effect of the method provided by the embodiments of the present application is far better than many existing compression methods, and the compression ratio for human brain CT can reach 118. The method provided by the embodiments of the present application also has a better effect on removing salt-and-pepper noise than most existing noise reduction methods.
[0193] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0194] Certain aspects of the present disclosure have been described above with reference to block diagrams and flowcharts of systems, methods, systems, and / or computer program products according to exemplary embodiments. It should be understood that one or more blocks in the block diagrams and flowcharts, as well as combinations of blocks in the block diagrams and flowcharts, can be implemented respectively by executing computer-executable program instructions. Similarly, according to some embodiments, some blocks in the block diagrams and flowcharts may not need to be executed in the order shown, or may not need to be executed at all. In addition, additional components and / or operations beyond those shown in the blocks of the block diagrams and flowcharts may exist in certain embodiments.
[0195] The program modules, applications, etc. described herein may include one or more software components, including, for example, software objects, methods, data structures, etc. Each such software component may include computer-executable instructions that, upon execution, cause at least a portion of the functions described herein (e.g., one or more operations of the exemplary methods described herein) to be performed.
[0196] Software components can be coded in any of a variety of programming languages. An exemplary programming language can be a low-level programming language, such as an assembly language associated with a particular hardware architecture and / or operating system platform. Software components including assembly language instructions may need to be converted by an assembler into executable machine code before being executed by the hardware architecture and / or platform. Another exemplary programming language can be a higher-level programming language, which can be portable across multiple architectures. Software components including a higher-level programming language may need to be converted by an interpreter or compiler into an intermediate representation before execution. Other examples of programming languages include, but are not limited to, macro languages, shell or command languages, job control languages, scripting languages, database query or search languages, or report writing languages. In one or more exemplary embodiments, a software component containing instructions in one of the above examples of programming languages can be directly executed by an operating system or other software component without first being converted into another form.
[0197] Software components can be stored as files or other data storage constructs. Software components with similar types or related functions can be stored together in, for example, a specific directory, folder, or library. Software components can be static (e.g., pre-set or fixed) or dynamic (e.g., created or modified at execution time).
[0198] The embodiments of the present application have been described in detail above with reference to the accompanying drawings. However, the present application is not limited to the above embodiments. Various changes can be made without departing from the spirit of the present application within the knowledge scope of those of ordinary skill in the art.
Claims
1. A compression denoising method for medical images, comprising: Acquiring medical images; Preprocessing the medical image to obtain an image block corresponding to the medical image; determining an adaptive measurement matrix according to the positions of the salt and pepper noise points in the image block and the unscanned layer index in the medical image, wherein the elements in the adaptive measurement matrix corresponding to the salt and pepper noise points in the image block are removed; Performing adaptive sparse decomposition on the image block based on the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt and pepper noise; The medical image without salt and pepper noise is reconstructed by using the sparse vector without salt and pepper noise, and the continuous noise is removed by using the second dictionary learning to obtain the denoised medical image.
2. The compression denoising method for medical images according to claim 1, wherein: The step of determining the adaptive measurement matrix by using the positions of the salt and pepper noise points in the image block and the unscanned layer index in the medical image comprises: Converting the image block into an image block vector; generating an intermediate stage feature matrix through the image block vector and a first measurement matrix, wherein the first measurement matrix is a measurement matrix updated according to an unscanned layer index in the medical image; Determine the position of the salt and pepper noise point in the image block by using the data features in the feature matrix of the intermediate stage; The intermediate stage feature matrix is updated according to the positions of the salt and pepper noise points in the image block to obtain the adaptive measurement matrix.
3. The compression denoising method for medical images according to claim 1, wherein: The first dictionary is obtained by training with clear medical images, and training the first dictionary with the clear medical images includes: Preprocessing the clear medical image to obtain clear image blocks, wherein the preprocessing includes region growing and block segmentation, wherein there is any overlap between adjacent clear image blocks in length and width directions, and there is one or more layers of overlap in depth direction; The clear image blocks are clustered, and the first dictionary is obtained through training based on different sparsity constraints.
4. The compression denoising method for medical images according to claim 3, wherein: The preprocessing of the clear medical image to obtain a clear image block includes: Performing region growing on the clear medical image to obtain a binary image and an intermediate medical image, wherein the intermediate medical image is used to represent the clear medical image without background noise after region growing; Detecting the edges of the clear medical image features included in the binary image by using a Sobel operator to obtain an edge feature image; Blocks are selected from the intermediate stage medical image and the corresponding edge feature image respectively to obtain the clear image block.
5. The compression denoising method for medical images according to claim 3, wherein: After preprocessing the clear medical image to obtain a clear image block, the method further includes: Converting the clear image block into an image block vector, wherein the image block vector includes an intermediate stage medical image block vector and an edge feature image block vector; Determine the variance of the intermediate-stage medical image block vector, and divide the intermediate-stage medical image block vector into a small variance cluster, a medium variance cluster, a large variance cluster, and an edge-containing cluster according to a preset variance threshold and an index of an edge-containing vector in the edge feature image block vector; The magnitude of the variance value of the medical image block vector in the intermediate stage is used to characterize the texture complexity of the image vector.
6. The compression denoising method for medical images according to claim 1, wherein the step of performing adaptive sparse decomposition on the image block based on the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt and pepper noise comprises: Determine the measurement points of non-salt and pepper noise by using the adaptive measurement matrix to obtain the image block after removing the salt and pepper noise points; The image block after the salt and pepper noise points are removed is sparsely decomposed by using a sparse coding algorithm in combination with the adaptive measurement matrix and the first dictionary to obtain the sparse vector without salt and pepper noise.
7. The compression denoising method for medical images according to claim 1, wherein: After performing adaptive sparse decomposition on the image block based on the adaptive measurement matrix and the trained first dictionary to obtain a sparse vector without salt and pepper noise, the method further includes: The sparse vector without salt and pepper noise is stored or the sparse vector without salt and pepper noise is transmitted.
8. The compression denoising method for medical images according to claim 1, wherein: The step of reconstructing the medical image without salt and pepper noise by using the sparse vector without salt and pepper noise, and removing continuous noise by learning a second dictionary to obtain the medical image with reduced noise includes: Generate image block information without salt and pepper noise by multiplying the sparse vector without salt and pepper noise and the first dictionary; Assembling the image block information to obtain a complete medical image without salt and pepper noise, wherein the complete medical image includes the predicted medical image of the unscanned layer; The continuous noise in each layer of the medical image without salt and pepper noise is removed in sequence by using a second dictionary learning to obtain the denoised medical image, wherein the second dictionary is obtained by training the medical image of the corresponding layer.
9. An electronic device, wherein: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the compression and denoising method for medical images as claimed in any one of claims 1 to 8 when executing the computer program.
10. A computer program product, wherein: When the computer program product runs in an electronic device, the electronic device executes the compression and denoising method for medical images according to any one of claims 1 to 8.