Medical Image Compression Based on Wavelets with Particle Swarm Optimization
2021-12-16MonagiAlkinaniZanatyandSherifIbrahim
Monagi H.Alkinani,E.A.Zanaty and Sherif M.Ibrahim
1Department of Computer Science and Artificial Intelligence,Faculty of Computer Science and Engineering,University of Jeddah,Jeddah,Saudi Arabi
2Department of Computer Science,Faculty of Computers and Information,Sohag University,Sohag,Egypt
3Department of Computer Science and Mathematics,Faculty of Science,South Valley University,Qena,Egypt
Abstract:This paper presents a novel method utilizing wavelets with particle swarm optimization(PSO) for medical image compression.Our method utilizes PSO to overcome the wavelets discontinuity which occurs when compressing images using thresholding.It transfers images into subband details and approximations using a modified Haar wavelet(MHW),and then applies a threshold.PSO is applied for selecting a particle assigned to the threshold values for the subbands.Nine positions assigned to particles values are used to represent population.Every particle updates its position depending on the global best position (gbest) (for all details subband) and local best position(pbest)(for a subband).The fitness value is developed to terminate PSO when the difference between two local best (pbest) successors is smaller than a prescribe value.The experiments are applied on five different medical image types,i.e.,MRI,CT,and X-ray.Results show that the proposed algorithm can be more preferably to compress medical images than other existing wavelets techniques from peak signalto noise ratio(PSNR)and compression ratio(CR)points of views.
Keywords:Image compression;wavelets;Haar wavelet;particle swarm algorithm;medical image compression;PSNR and CR
1 Introduction
Compressing patient’s medical images is a rising demand nowadays in medical organizations due to the needs to archive and transfer large numbers of high resolutions images.Indeed,maintaining those images costs organizations powerful servers,wide network bandwidth and backup storage devices.The problem arises here is concerning the nature of these data itself,medical images need special care when performing compression.Losing important medical details in images may affect medical diagnose for patients.Therefore,any improvement in image compression methods would help storing and transferring medical history properly.
Many compressing algorithms have been proposed in this context,some of them utilizes wavelet family transforms.Haar wavelet method is a member of the family,it is considered as a popular image compression method due to its simplicity comparing to others.Nonetheless,the main disadvantages of the Haar wavelet is features discontinuity that leads to difficulties for simulating continuous signals [1-3].
In this paper,a modified Haar wavelet (MHW) algorithm for medical images compression is introduced.The algorithm combines Haar wavelet with PSO as a threshold value selection method.This modification assists in compressing medical image to maintain its purity and preserve fine details while keeping compression ratio high.
The proposed algorithm begins by subdivide the input image into four frequency subbands:one approximation and three detail coefficients.Haar wavelet is modified for this task in order to work with 2×2 matrices instead of whole image and to keep the approximation subband unchanged.We get one approximation of low subbands for row and column filtering (LL),high subbands for row filtering and low subbands for column filtering (HL),low subbands for row filtering and high subbands for columns filtering (LH),and high subbands for row and column filtering (HH).To sum up,nine subbands are obtained by applying MHW on the details (LLHL-LH-HH).
A threshold is utilized for reducing search space of the coefficients while nine thresholds assigned to their positions are selected to represent subbands (one for each subband).We use these thresholds as particle candidates for the PSO algorithm.PSO is updated by the global best position (gbest) for all details subband and local best position (pbest) for a subband.We developed the fitness value to terminate the PSO to reach a target threshold.The proposed algorithm is implemented using various types of medical images with different sizes,and it is compared with other existing wavelets techniques.The algorithm achieved better result from PSNR and CR point of views.
This work is organized into five sections:Section 1 introduced the work.In Section 2,related work is depicted.Section 3 describes the proposed algorithm.The performance evaluation is shown in Section 4.We provided the experimental results in Section 5.Finally,the conclusion is presented in Section 6.
2 Related Work
Medical image compression techniques can be categorized into two main types depending on the redundancy removal way,namely Lossless et al.[4-6].Lossless allows the original image to be reconstructed exactly from the compressed image with low compression rate [7].In contrast,lossy image compression characterized by degrading image quality because it does not reconstruct exactly the original image [8].
Wavelet transform considers a well-known technique that can work as lossy or lossless compression based on calculating thresholds in the details subbands [9].Several wavelet types like Haar,Coiflet,Symlets,Daubechies,Biorthogonal,and (5/3) and (9/7) lifting schemes can be used for medical images compression [10].The performance of these algorithms varies depending on its ability to decompose signal into low and high frequency components where thresholding process takes place for compression.
Rao et al.[11]had evaluated comparison analysis of image compression techniques based on Haar wavelets.Their studies concentrated on relation between compression efficiency and short processing time in case of data transfer over the internet or any channel.Zanaty et al.[12]combined wavelets by a region growing technique for compressing region of interest.Mohamed et al.[13]integrated Haar wavelet with quad tree to enhance mammogram image compression.Umezu et al.[14]introduced Z-map models depending on irreversible compression algorithm using a two-dimensional Haar wavelet transform in order to resolve tight memory situation for an ordinary PC,see [15]for more mathematical theories.Nahar et al.[16]proposed double density wavelets transform (DDW) for image compression based on discrete wavelets transform(DWT) [17].Priya et al.[18]compressed medical image based fuzzy segmentation applying a fuzzy C-means clustering into a region of interest (ROI) and non-region of interest (NROI).ROI is compressed using DWT coding while NROI is compressed using well-known context adaptive variable length decoder.Benyahia et al.[19]used wavelet packet coupled with the progressive coder SPIHT for developing compression techniques for medical images by preserving detailed structures to produce high quality images.Reisenhofer et al.[20]presented Haar wavelet algorithm based on perceptual similarity index.The algorithm uses similarity measures for full reference image to evaluate quality level assessment.Vasanth et al.[21]mixed Haar wavelet with Huffman encoding for image compression.Rao et al.[22]examined the performance of principle component analysis(PCA) and wavelet difference reduction (WDR) techniques when applied to x-ray and CT images.Agarwal et al.[23]reviewed various image compression using wavelet-based methods including subband coding (SBC),decoding for medical pitch (EHT) [24]and transform coding (IATC).More compression technique is stated in [25,26]for combinational hybrid compression algorithm of medical image in [27,28]and to analyzing the relation between resultant image details of different granularities.
From the stated methods,we have noted that there is no universal algorithm for providing an optimal compression.Each algorithm has its own specific drawbacks like compressing ratio,speed,image types,or memory usage.Therefore,effort is needed in order to overcome such drawbacks.
3 Modified Haar Wavelet with PSO
In this section,we describe the proposed algorithm for medical image compression.The novelty of this algorithm is the use of POS for the shrinkage of the transforming coefficients.Fig.1 shows the proposed compression scheme.In the following subsections,the compression steps of the proposed algorithm are described.First,the modified Haar wavelet transform step is explained.Then,the thresholding process is addressed.Finally,using the POS is discussed.
Figure 1:The proposed compression scheme
3.1 Modified Haar Wavelet
Haar wavelet transform is the simplest orthogonal wavelet transform,and it is computed by iterating difference and averaging between odd and even pixels of digital images.Haar wavelet transform can be utilized in various ways for compressing images by decomposing its matrix to sparser one [29-33].In order to preserve more image quality and clarity,we modified Haar wavelet(MHW).MHW introduces a new transformation capable to achieve better compression results than the classical one in [34,35],and to reach better PSNR and CR values.
Instead of performing Haar wavelet levels on rows then perform the same step on resulting matrix (on columns) as what in [36-38],we make the one step transform just one time on all rows follow by one step transform on resulted columns as [39].For that,we use MHW for dividing the original image ofW×Hdimensions into 2×2 matrices and apply the transform as in Eqs.(1)and (2):
where values ofA,B,CandDare calculated as follow:
For reconstruction,we can gaina,b,canddas follow:
Eq.(4) can be reformatted as:
In a similar way,the reconstruction equation:
3.2 Subbands and Thresholding
We use thresholding process in order to reduce searching space of coefficients.First,subbands coefficients are evaluated by applying MHW on the input image to obtain four subbands details(coefficients).This means that the positions in Eq.(1) are replaced by coefficients in Eq.(5)to become:
Redistributing the coefficients of this matrix to be:
wherei=1,2,...,W,andj=1,2,...,H.In the four subbands,one is called approximation and three are called details (approximation LL—horizontal details LH—vertical details HL—diagonal details HH) as shown in Fig.2.
Figure 2:The matrix is subdivided into four subbands
In order to reach optimal PSNR,MHW is applied again to LH,HL and HH subbands to get 12 subbands:three approximation,and nine details.The approximation subbands (LL) includes the important information (approximation) as shown in Fig.3.The details are then employing the thresholding process and arranged to nine subbands (HL1,LH1,HH1,HL2,LH2,HH2,HL3,LH3,HH3) as follows:
Figure 3:The coefficients matrix consists of nine subbands
Secondly,we select an elementxijfor each subband ofN×Ndimensions and compute the corresponding threshold T using the following equation:
where μ is mean of the detailed subband coefficients (consists of nine values) and σ is the coefficients standard deviation.μ is calculated in every detailed subband as:
Also,σ is computed as:
3.3 Particle Swarm Optimization(PSO)
PSO has appeared as a rising algorithm for solving various optimization challenges iteratively [40-44].In PSO,population is called a swarm and individuals are called particles.The movement of swarming particle depends on two components:A deterministic and stochastic component [45,46].
In our methods,the nine positions are the population assigned to particle values (i.e.,a threshold value for a subband) as in Fig.3.PSO estimates best achievable threshold for each subband.This step leads us to get best achievable PSNR for reconstructed image,and to get acceptable CR and MSE values,as well.The resultant nine subband details represent input particles candidates for the PSO algorithm.The largest value in the population is named asgbestglobal best,pbestrepresents local best value for the input subband.The fitness value is evaluated by assigning a value to a particle’s position.rand()is selected randomly from thresholds spaces of a subband,Particles are flying around in the search space and every particle redefines its position depending on the global best positiongbest,local best positionpbestand can be represented by the following formula:
wherev[]andpr[]represent the guided particle’s fitness value and the initial state of the particle(start by 0),respectively,whilec1,c2 are learning factors equal to 2 [47,48].
The population is updated byrand()value for each iteration,and consequentlygbestandpbestare updated ifrand()is greater thanpbest.The process stops if the fitness functionf (pbest)is smaller than a prescribe value where the best threshold is obtained for a subband:
3.4 Overview of the Proposed Algorithm
The proposed algorithm starts by input a given image to MHW transformation.MHW works on detailed subbands instead of approximation subbands.Then,the subbands are reconstructed while thresholding process is completed;particle swarm optimization is used for thresholding details of subbands based on the fitness function.Briefly,the proposed algorithms can be described as the following steps:
1.Step 1.Applies MHW (Eq.(5)) on an original image to get four subbands (approximation LL—horizontal details LH—vertical details HL—diagonal details HH) as shown in Fig.2.
2.Step 2.Applies MHW (Eq.(5)) again only on details of LH,HL,and HH as shown in Fig.3.
3.Step 3.Uses threshold (Eq.(9)) for nine subbands (HL1,LH1,HH1,HL2,LH2,HH2,HL3,LH3,HH3).
4.Step 4.Finds input particles that consist of nine positions assigned to threshold values.
5.Step 5.Applies PSO (Eqs.(12) and (13)) on input particles for a subband.
6.Step 6.Updates the position and velocity (Eqs.(12)) until the result for the fitness function leads to best value.The processes are stop if the fitness functionf (pbest)(Eq.(14)) is smaller than the prescribe value.
7.Step 7.Updates therand()bypbestand select an arbitrary threshold from the next subband.
8.Step 8.Repeats to reach 9th subband.
9.Step 9.Finds the best thresholdpbestfrom the output nine thresholds
10.Step 10.Reconstructs the compressed imagef′(x,y)(threshold matrix) assigned to the original imagef (x,y),wherexandyare coordinates.
4 Performance Evaluation
After reconstructing the subbands (thresholds matrix) by applying the transformation(Eq.(6)).We examine our algorithms performance.Various image similarity indexes were used like PSNR,MSE,CR,and percentage difference in order to prove efficiency of the proposed method.
4.1 Mean Square Error(MSE)
MSE measures the error between two images.Root mean squared error or RMSE calculated using the square root of MSE.MSE can be evaluated for monochrome images by:
whereWandHare dimensions of a reconstruction matrix.f (x,y)andf′(x,y)represent original and compressed image pixels,respectively.Compression methods aim to minimize the MSE.
4.2 Peak Signal to Noise Ratio(PSNR)
PSNR represents the ratio between original signal variance and reconstruction error variance.PSNR is expressed in Decibel scale.The PSNR used as a measure of the reconstruction quality gained during image compression process.Compression methods aim to maximize PSNR values.
Assuming pixels are represented using eight bits while 255 represents the maximum pixel value of the image,PSNR values takes range between zero and infinity,infinity for perfect identical images and 0 for images that have no commonality.
4.3 Peak Signal to Noise Ratio(PSNR)
CR is defined as the ratio between the original image size and compressed image size.
wheref′(x,y)is compressed image,andf (x,y)represent original image.
4.4 Percentage Difference(PD)
The absolute value of the change in method results,divided by the average of them,then multiplied by 100.it is calculated for finding percentage differences between method performances.
5 Experiment Results and Discussion
In this section,various compressing methods are compared aiming to compress medical images.We experimentally study the performance of these methods,where the performance is assessed using a wide number of medical images of different sizes from MRI and CT types.To run this experiment,five different grey-scale medical images were used:MRI forposterior cruciate ligament(1280×1280),CT horizontal view for (937 × 937),CT vertical view forand neck(800×600),X-ray image forchest(1060×1227),and MRI forcirculatory system(024×610).The test images are shown in Fig.4.The images have been chosen carefully to help in distinguishing between the methods.The sharp edges in theposterior cruciate ligamentimage helps in demonstrating how various methods compress edges,whereas the fine details inand neckimage helps in demonstrating how various methods preserve image clarity.The grey gradations inchestimage provide insight into the amount of compressing that has been applied to images.We have implemented our proposed algorithm on a machine has processor Intel Core i7-4510UCPU 2.00 GHz-internal memory 8.00 GB RAM.In the following subsections,the methods are evaluated both quantitatively and qualitatively.
Figure 4:Various testing images (a) horizontal view for the (937×937),(b) vertical view for the and neck (800×600),(c) vertical view for the and neck (800×600),(d) chest view (1060×1227),(e) circulatory system (1024×610)
The images were compressed by existing Haar,Coiflet,Daubechies,Biorthogonal,Dmeyer,Symlets,and the proposed algorithm.Then,the inverse transformation was used to construct the final images (constructed image).All method outputs were compared quantitatively and qualitatively.
5.1 Quantitative Evaluation
In this subsection,we use numerical indicators to evaluate the methods.Eqs.(16)-(18) were exploited for MSE,PSNR and CR,respectively.Various existing wavelets for images compression were compared.The results are computed by measuring the differences between original and compressed images.Tab.1 shows the obtained performance of the methods.
Table 1:Results of using various transformations for the methods
The proposed methods on the sub details (LH-HL-HH) and (LL-LH-HL-HH) gave better results than the existing wavelets like Haar,Coiflet,Daubechies,Biorthogonal,Dmeyer,and Symlets.The proposed methods are the best whether they are used for compressing MRI or CT types.
Figure 5:The performance graph for the methods with various testing images
When we applied the proposed method (LH-HL-HH) to the MRI imagesposterior cruciate ligamentandcirculatory system,the results overcame the second best obtained (Coiflet) results by 17.67%,and 57.22%,respectively-from PSNR point of view.In case of the CT horizontal view forhuman brainandhuman brain and neckimages,the method’s performance significantly exceeded (Coiflet) by 34.31%,and 28.81% respectively-from PSNR point of view.Moreover,when we applied the method to the X-ray image for thechest,it achieved 39.17% better than (Coiflet)-from PSNR point of view.
Similarly,when we applied the proposed method (LL-LH-HL-HH) to the MRI imagesposterior cruciate ligamentandcirculatory system,it overcame second best obtained results (Coiflet)by 7.32%,and 20.36%,respectively-from PSNR point of view.In case of the CT horizontal view forhuman brainandhuman brain and neck,the method’s performance exceeded (Coiflet) by 19.53%,and 27.48% respectively-from PSNR point of view.Moreover,when we applied the method to the X-ray image for thechest,it achieved 19.99% better than (Coiflet)-from PSNR point of view.
When we utilized Eq.(18) for finding the percentage differences among the method we noticed that (LH-HL-HH) achieved generally better percentages than (LL-LH-HL-HH).We believed that (LH-HL-HH) keeps the LL subband constant during the decompositions phase.A chart graph shows results of the various methods when compressing the various images,in Fig.5.
5.2 Qualitative Evaluation
In this subsection,a comparison between reconstructed images of theposterior cruciate ligamentusing various transforms are shown in Fig.6.Reconstructed images of thehuman brainare shown in Fig.7.Fig.8 shows a comparison between reconstructed images ofhuman brain and neck.A comparison between reconstructed images of thechestusing various transforms are shown in Fig.9.Fig.10 shows comparisons between reconstructed images ofcirculatory system.
Figure 6:Reconstructed images of the MRI posterior cruciate ligament image.(a1) (a) Original image,(b) Haar wavelet,(c) Coiflet wavelet,(d) Db wavelet,(e) Bior wavelet,(a2) (a) Symlets wavelet,(b) Dmeyer wavelet,(c) Proposed 1 method 1,(d) Proposed method 2
Figure 7:Reconstructed images of the CT horizontal view for the human brain image.(a1) (a)Original image,(b) Haar wavelet,(c) Coiflet wavelet,(d) Daubechies wavelet,(e) Bior wavelet,(a2) (a) Symlets wavelet,(b) Dmeyer wavelet,(c) Proposed method 1,(d) Proposed method 2
Figure 8:Reconstructed images of the CT vertical view for the and neck.(a1) (a) Original image,(b) Haar wavelet,(c) Coiflet wavelet,(d) Daubechies wavelet,(e) Bior wavelet,(a2) (a) Symlets wavelet,(b) Dmeyer wavelet,(c) Proposed method 1,(d) Proposed method 2
Figure 9:Reconstructed images of the X-ray chest image.(a1) (a) Original image,(b) Haar wavelet,(c) Coiflet wavelet,(d) Daubechies wavelet,(e) Bior wavelet,(a2) (a) Symlets wavelet,(b)Dmeyer wavelet,(c) Proposed method 1,(d) Proposed method 2
Figure 10:Reconstructed images of the MRI Circulatory system image.(a1) (a) Original image,(b) Haar wavelet,(c) Coiflet wavelet,(d) Daubechies wavelet,(e) Bior wavelet,(a2) (a) Symlets wavelet,(b) dmeyer wavelet,(c) Proposed method 1,(d) Proposed method 2
6 Conclusion
In this paper,we have introduced a novel algorithm based on merging wavelets and PSO to overcome the medical image compression problems like trade-off between CR and PSNR.Keeping CR high affects PSNR,and vice versa.The algorithm has been designed to keep the PSNR as high as possible using the PSO.It has been applied to challenging applications like MRI,CT,X-ray images in order to prove its efficiency.The output results were compared with the existing wavelets techniques like Haar,Coiflet,Daubechies,Biorthogonal,Dmeyer and Symlets.Applying the algorithm on (LH-HL-HH) keeps the LL subband constant during the decompositions,and that assists in achieving high compression.
The performance of the proposed algorithm has showed superiority in all tests over the existing wavelets even with high detailed images like circulatory system images,from PSNR point of view.PSNR and CR values were increased for horizontal view for the CT (brain image) and MRI image (posterior cruciate ligament),respectively.Compressing X-ray (chest view) overcame best existing methods by six times.
The PSNR value is enhanced,when applied the proposed algorithm only on the detailed subbands.That can give greater flexibility towards our target either to gain more cleared image(high PSNR value) or saving more space (high CR value).
Future research,it is possible to integrate intelligence techniques with the proposed algorithm to create a learning dictionary that accelerates and helps in the process of compressing images of a convergent nature,which may lead to continuous improvement of the values of image compression,purity and speed up the process as a whole.
Funding Statement:This work was funded by the University of Jeddah,Saudi Arabia,under Grant No.UJ-20-043-DR.The authors,therefore,acknowledge with thanks the University technical and financial support.
Conflicts of Interest:The authors declare that they have no conflicts of interest to report regarding the present study.
杂志排行
Computers Materials&Continua的其它文章
- Recognition and Detection of Diabetic Retinopathy Using Densenet-65 Based Faster-RCNN
- Adaptation of Vehicular Ad hoc Network Clustering Protocol for Smart Transportation
- Computational Microfluidic Channel for Separation of Escherichia coli from Blood-Cells
- A Fractal-Fractional Model for the MHD Flow of Casson Fluid in a Channel
- Simulation,Modeling,and Optimization of Intelligent Kidney Disease Predication Empowered with Computational Intelligence Approaches
- Prediction of Time Series Empowered with a Novel SREKRLS Algorithm