A Region-based Compression Technique for Medical Image Compression using Principal Component Analysis (PCA)

Region-based compression technique is particularly useful for radiological archiving system as it allows diagnostically important regions to be compressed with near lossless quality while the non-diagnostically important regions (NROI) to be compressed at lossy quality. In this paper, we present a region-based compression technique tailored for MRI brain scans. In the proposed technique termed as automated arbitrary PCA (AAPCA), an automatic segmentation based on brain symmetrical property is used to separate the ROI from the background. The arbitrary-shape ROI is then compressed by block-to-row PCA algorithm (BTRPCA) based on a factorization approach. The ROI is optimally compressed with lower compression rate while the NROI is compressed with higher compression rate. The proposed technique achieves satisfactory segmentation performance. The subjective and objective evaluation performed confirmed that the proposed technique achieves better performance metrics (PSNR and CoC) and higher overall compression rate. The experimental results also demonstrated that the proposed technique is more superior to various state-of-the-art compression methods. Keywords—Principal component analysis; region-of-interest (ROI); automated segmentation; MRI brain scans; region-based compression


I. INTRODUCTION
Since the technological advancement in medical imaging modalities, medical image processing and image analysis have become the important diagnostic aids for medical diagnostics and healthcare. In order for any diagnostic aids to be reliable, the images acquired from imaging modalities need to be of adequate quality and thus requires high amount of resolution. According to the Diagnostic Imaging Dataset Annual Statistics by England (2020) [1], there were 3.8 million MRI test taken in England in between April 2019 to March 2020. The relatively low figure in year 2020 is impacted by the effect of the COVID-19 pandemic but these test images has already summed up to memory storage of as large as Tera bytes per year. The medical images may be required to be saved in PACS and HIS for over thirty years and an efficient compression algorithm is in need to store and archive the images.
Image compression is a process of efficiently coding digital images to reduce the number of bits required in representing an image [2]. Image compression is generally divided into two categories: lossless and lossy. Images compressed by lossless algorithm are perfectly reconstructed but the compression ratio achieved is low. Some common lossless compression methods include Lempel-Ziv-Welch (LZW), Run-Length Encoded (RLE), JPEG Lossless Compression Standard (JPEG-LS), Arithmetic coding and Huffman coding. These methods can only achieve up to 3:1 compression ratio and hence it is not a feasible solution for bulk medical image storage and high speed transmission. Images compressed by lossy algorithm are irreversible but the compression ratio can be ten times higher than the image compressed by lossless algorithm while maintaining good visual quality [3]. Transform coding, vector quantization and predictive coding are three standard methods for lossy image compression [4]. The transform coding techniques, to name a few are -Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT) and Principal Component Analysis (PCA). The recent research in the field of medical image compression involves the wavelet transform are methods such as embedded zerotree wavelet (EZW), set partitioning in hierarchical trees (SPIHT) and embedded block coding with optimized truncation (EBCOT).
Due to the increasing demand for higher compression ratio while keeping the images "visually lossless", research on region-based image compression in medical community is continuously growing. The rationale of utilizing a region-based image compression algorithm is that it exploits prior knowledge on the input image to focus resources on those regions that are significant for making diagnoses. Indeed, medical images are highly structured; for a given imaging modality and given subject matter (i.e. cranial, retina, lung), there are many predictable features in the images that can be taken into account to improve the compression performance [5]. A compressed image should preserve the clinically important features that may be of concern to the radiologist and in most situations, the Non-ROI (NROI) region can be irreversibly compressed with a high compression ratio as the information retained by compression is important only in a contextual sense, helping the viewer to observe the position of the ROI in the original image [6]. In this way, no loss of diagnostically important information can be achieved [7].
There are reports [8][9][10] that review region-based compression approaches on medical images. Performance evaluation done by Rajkumar and Latte [11] showed that the 234 | P a g e www.ijacsa.thesai.org PSNR values obtained with region-based compression are not so high compared with those compressed with entire image compression. This is probably due to the use of fractal methods which could lead to insufficient data obtained from the detail image of the wavelet transform. Besides, the use of Huffman coding does not always guarantee a high PSNR value. Regionbased image compression was shown to be more suitable for medical images as region-based compression can compress up to 65% while retaining 80% of the original size [12]. In fact, the performance for the region-based image compression could be largely varied based on the ROI selection methods, segmentation goals and compression methods. Previous work in region-based compression mostly focused on compressing different regions with use of different compression schemes while a smaller number of studies on region-based image compression have focused on providing different levels of image quality in different spatial regions. In the work done by Sreenivasulu and Varadarajan [2], wavelet transform and Huffman coding were used to compress the ROI and NROI regions respectively in MRI brain images. Using different segmentation techniques, some researchers [12][13] proposed a Binary Plane Technique to compress the ROI in lossless mode and NROI in lossy mode in MRI brain images. This method offers an advantage in which it is capable of compressing the image both in lossy and lossless mode.
Anastassopoulos and Skodras [14] compared the performance of the general scaling based method and MAXSHIFT method using nephrostogram and reported that MAXSHIFT method achieves better image quality than the general scaling based method. However, both methods may not be suitable for medical images because they do not support lossy-to-lossless compression ROI unless the ROI consists of the whole image [8]. Besides, both methods do not support arbitrary shape for ROI as it is restricted to only support rectangular and circular regions.
The first attempt to compress ROI in medical image using PCA was proposed by Taur and Tau in 1996 [15]. In their research, a simple mean thresholding for blocks of pixels were used to segment the breast tissues. The resulting ROI were either oversegmented or undersegmented and the use of blockby-block PCA algorithm in their work, as proven by our previous research [16], produces very poor image quality. PCA was also employed in study performed in a region-based colour images compression [17] but it was used only to determine the spatio-chromatic information of a colour image so that the existing spatial correlations between the transform coefficients are removed. In region-based compression research performed by Radha [18], foreground of the medical images was identified as the ROI and different compression algorithm such as PCA, EZW, SPIHT and ZTE coding were used to compress the foreground. However, a crude assumption had been made in the research in which ROI is defined as the foreground of the image but a ROI are in fact the area of interest within the foreground. Results comparison performed by Radha show that PCA-based models produce higher compression gain with better PSNR and faster processing speed. The results have also provided a ground base behind the selection of PCA algorithm in this research.
Some of the early studies that applied manual segmentation on region-based compression studies for medical images are reported in [6,[19][20][21]. In general, the reports aforementioned relied on user-defined ROI extracted on a display monitor for different types of medical images. Using the same manual segmentation approach, Seddiki and Guerchi [22] proposed a model that compresses ROI in brain MRI with lossless SPIHT algorithm. Lossy SPIHT compression for NROI has been implemented by Joshi and Rawat [23] and the ROI is selected manually using circular window. Elhannachi et al. [24] extracted the ROI by a rectangular mask and the region is compressed by a lossless EZW coder.
Generally, the existing region-based compression algorithms exhibit a few limitations. Firstly, the ROI is regarded as the whole anatomy without considering the diagnostic values of other portion. Secondly, the ROI is assumed to have a regular shape. Thirdly, most of the automated ROI segmentation is not tailored specifically for brain MRI. Lastly, there is a lack of subjective evaluation towards the efficiency of the schemes. In this context, a regionbased compression that addressed the aforementioned limitations is proposed. This work deals with a block-to-row Principal Component Analysis (BTRPCA), which has been reported in our previous work [25] to be effective in the presence of high dimension data, as in image compression.  The novelty of this work lies in investigating the performance of BTRPCA algorithm coupling with a robust brain segmentation technique in image compression. Fig. 1 depicts the pipeline of our proposed region-based image compression algorithm termed as automated arbitrary PCA (AAPCA). The results of the AAPCA will be subjectively evaluated by a panel of two medical experts and objectively compared with the entire image PCA and state-of-the-art region-based compression algorithms.
The structure of the paper is organized as follows. Section 2 elaborates on AAPCA algorithm for MRI brain images and in Section 3, the objective and subjective evaluation of the proposed methods is verified through experiments. Section 4 concludes the work and finally Section 5 describes future research directions.

II. MATERIALS AND METHODS
The coding part for the proposed algorithm has been done using Matlab (R2009b), particularly using statistical, wavelet and image processing toolboxes. The statistical analysis has been performed using SPSS Statistics 21.0. The general scaling based method and MAXSHIFT were implemented using JJ2000 version 5.1. To test the robustness of AAPCA towards brain images obtained on different machines using different imaging parameters, selected axial brain images from public datasets namely Radiopaedic [26], Cyprus [27] and Figshare [28] are used as the test images in this study. The test images are in the size of 512 × 512 pixels. The test images are selected so that the brain scans consist of only single ROI, regardless of their acquisition parameters. In each database, the selected images are labelled in a sequence of 1 to 20, depending on the database and the corresponding bit rate (bpp = 1 to 0.0625).

A. Automated Brain Segmentation Technique
The detailed description of our proposed automated brain segmentation technique has been extensively discussed in [29]. The algorithm starts with a robust ellipse fitting technique that extracts the mid-sagittal plane (MSP) of the brain. This shapebased method enjoys robustness towards low signal to noise brain images by assuming the skull of the head to be in elliptical shape. Once the MSP has been successfully extracted, the brain images will be tilted either to the left or right to ensure that the brain images can be equally dissected into left and right hemisphere. The Absolute Difference Algorithm (ADM) that involves a series of absolute summation and absolute difference operation are then performed on the left and right hemispheres. In this work, the ADM algorithm was further improved to increase the segmentation rate for smaller ROI. Fig. 2 shows the step-by-step image manipulation for right hemisphere and its flipped-left hemisphere. Although it is not shown, the same operations are performed for left hemisphere and its flipped-right hemisphere to obtain the largest connected component (LCC) in the hemisphere. This method delineates and highlights the differences in both hemispheres.
With this approach, no a prior knowledge is needed on whether the ROI is located at the left hemisphere or right hemisphere and it is relatively simpler to compute than the ADM method proposed by Liu et al. [30]. Thresholding operation is then applied to select only the high intensity region in the image. The threshold value has been determined based on Otsu's thresholding where this method finds a threshold value between the peaks of a histogram. Once each hemisphere is left with the LCC, they will be merged again to form a whole brain image. This is when the morphology fill operator will be applied so that the less significant regions are removed by filling in holes and small pits from the edge. The resulting ROI will then be superimposed on the original brain image and this completes the final segmentation of the ROI. The output image is then ready for subsequent region-based compression.  The proposed ARC is a compression technique where arbitrary-shape ROI are explicitly defined, reshaped, factorized and compressed in a near lossless way whereas the NROI are compressed in a lossy manner. In the present work, the proposed ARC is mainly divided into two parts: (1) Reshaping and factorization of ROI and (2) Selective compression of the ROI and NROI with BTRPCA.
Since the segmented ROI is in arbitrary shape, the regions will be reshaped in this step to form a matrix. In this step, the pixel values of the arbitrary-shape ROI will first be converted into a row, resulting in a vector of 1 q × as shown in equation where q represents the total number of pixel values contained within the regions.
With the objective of constructing a matrix from a row vector, the divisors of q can be obtained using factorization. Assume that the total number of divisors of q is found to be t, the row and column of the new transformed matrix will be selected based on the following statements given 1) If t is even, then i is selected from position of 2 t from the list of divisors.
2) If t is odd, then i is selected from position of ( 1) 2 t + from the list of divisors.
where i is the row and q i the column of the matrix. ( 1, 0) ( 1,1) : The formulated matrix that carries the ROI information by now has the size of ( ) i j × as shown in the equation (2) that is ready to be compressed using block-to-row algorithm. For instance, the segmented arbitrary ROI contains a total of 88 pixels. By factorization, the divisors of q are found to be 1, 2, 4, 22, 44 and 88. The total number of divisor t is thus 6. Since t is an even number, i is selected from the 3rd position from the list of divisors and the number of row in the new matrix is 4. The selected arbitrary ROI will then be reshaped and If the size of the medical image is not a multiple of n, zero paddings will be performed by adding zeros at the borders. The number of blocks b can be determined from block division with the following equation: where N is the number of row and M is the number of columns for the original image.
The resulting feature matrix, Vroi that contains only the chosen k principal components are given as: The ROI data is now compressed as in equation (6): Similarly, the NROI region ( , ) f NR x y will also be fed into block-to-row algorithm where the NROI compressed data is obtained with the reduced feature matrix nroi V and mean transformed matrix nroi D as shown in equation (7). K is the chosen principal components and B is the number of blocks. ( ) At this stage, the dimensionality of the ROI data has been reduced from n to p column. Since the region-based algorithm divides an image into two regions, the compression ratio is related to the size of the ROI and NROI. The compression ratio of the ROI is therefore defined as [ The following steps explain the procedure of the compression scheme: Step 1: The ROI is encoded first on a high priority basis followed by the NROI on a low priority.
Step 2: Restructure the ROI into a matrix in which the size p × q is determined by the divisors obtained.
Step 3: Divide the ROI into a set of blocks, , where the value of n1 used in the current experiment is 8.
Step 4: Perform zero padding to the ROI if the size is not in the multiple of n1.
Step 5: Compress the ROI selectively using block-based PCA algorithm with low CR and high bpp as desired i.e.
where the range of the CRmin and CRmax vary according to the desired quality of reconstruction.
Step 6: Divide the NROI into a set of blocks, , where the value of n2 used in the current experiment is 8 and 16.
Step 7: Perform zero padding to the NROI if the size is not in the multiple of n2.
Step 8: Compress the NROI selectively with the blockbased PCA algorithm with high CR and low bpp as desired i.e. where the range of the CRmin and CRmax vary according to the desired quality of reconstruction.
Step 9: Compare and perform pixel by pixel analysis for original and reconstructed image using CoC analysis. If the CoC is not within satisfactory range between 0.9 and 1.0, adjust the compression rate on ROI and NROI and go to step 8.

III. RESULTS AND DISCUSSION
In this section, we report the quantitative analysis for the segmentation technique, the subjective experiment conducted to assess the quality of images compressed with proposed method and entire image method, and the objective metrics resuls. We also present and compare the proposed AAPCA with the mainstream compression methods using default parameters except as noted. We also present the simulated results for region-based algorithm proposed by Sreenivasulu and Varadarajan [2] (i.e. SV algorithm).

A. Segmentation Performance
The overall ROI segmentation performance are evaluated using segmentation score S as shown in equation (10)  where ( , ) n f x y represents the set of pixels belonging to the nth class found by the algorithm while ( , ) n f x y represents the set of pixels belonging to the nth class in the ground truth segmented image. One participant was requested to use a HUION HS64 drawing tablet to draw the contour of the lesions on the test images displayed directly on a computer screen and the drawn results will be served as the ground truth to compare with the ROI segmented by the proposed method and segmentation algorithm proposed by Liu et al. [30]. Since the proposed segmentation algorithm is to work with a cascading compression algorithm, the whole infrastructure is aimed to be computational efficient. Hence the proposed segmentation has significantly achieved shorter computation time in the study.

B. Subjective Evaluation
To assess image quality to diagnostic utility, image quality for output images compressed at various bpp were evaluated subjectively by a panel of one opthalmologist and one radiologist (A and B). Each panel was presented independently with test images arranged randomly and anonymously. Four MRI brain images from three dataset compressed at five different compression ratio (over the range of bpp = 0.0625 to 1.0) using entire image PCA and the proposed arbitrary methods sum up to a total of 120 test images. These images were shown on the computer screen and the panels were asked to rank the images based on the criteria as shown in Table I. The panels were asked to rank the images in two sessions held at least two weeks apart. Each session consisted of 60 compressed images with randomized order.  Fig. 3 shows the MOS for all tested images for proposed algorithm and its traditional counterpart. As expected, the resulted MOS decreases for images compressed at lower bit rate on our datasets. However, it is observed that the MOS values obtained in the proposed method are higher than that of entire image method except for bpp = 1.0 where image sequences are 1, 6, 11 and 16. For images compressed at bpp = 1.0, both methods unanimously correspond to "Imperceptible distortion" scoring level. It can also be observed that the MOS values for proposed method and entire image algorithm are closer at higher bpp but the MOS decreases more drastically in the case of entire image method as bpp reduces from 1.0 to 0.0625. As shown in the contigency table for both reviewers in Table II, there is a 88.3% of inter-reviewer agreement of scoring for a total of 120 compressed images. The intra-class correlation coefficient for both reviewers is 0.970 [0.957, 0.979] and the mean difference in scores is 0.05 [0.72 -0.62]. The normality test using Komogorov-Sminov and Shapiro-Wilk showed that the distribution of scores are non-normal hence the differences in scores between two methods were compared using a non-parametric test called Wilcoxon's match-pairs signed rank test. The Wilcoxon signed rank test shows that the MOS scores for proposed method at bpp = 0.0625, 0.125, 0.25 and 0.5 differ significantly from the MOS scores for entire image method at p = 0.001, p = 0.002, p = 0.002 and p = 0.001 respectively for a two-tailed test. Wilcoxon signed rank tests did not yield any significant differences between the MOS scores for proposed method and the MOS scores for entire image method at bpp = 1.0 (p = 1.0).

C. Objective Evaluation
This study includes two image quality metrics PSNR and Correlation coefficient (CoC) as shown in equation (12) and (13). Suppose that X is the original image and Y is the compressed/reconstructed image with size of m × n, where ij X and ij Y the values of the ith and jth pixels in X and Y respectively, the MSE is the cumulative squared error between the original and the compressed image: where L is the dynamic range of allowable image pixel intensities and B is number of bits that represent a pixel. PSNR is measured in the unit of decibel (dB) and the metric provides a straightforward notion related to the image fidelity -the higher the PSNR value, the higher the image fidelity and vice versa. The second performance metric is CoC that suggests how closely the reconstructed image is correlated with an original image, on a scale of 0-1. The closer the value of CoC to 1, the higher the correlation of the compressed image to the original image is. The CoC is defined as: The values of PSNR and CoC are plotted against the image sequence as shown in Fig. 4 and Fig.5 respectively for our datasets. It can be observed that across all graphs, the AAPCA clearly outperforms the entire image algorithm in terms of PSNR and CoC. The resulting trend somewhat echoed the MOS-proposed MOS-Entire Image subjective evaluation performance achieved by the proposed method. The average PSNR of AAPCA is compared with JPEG, JPEG2000, EZW, SPIHT and entire image PCA that are applied to the whole image. As shown in Fig. 7, the proposed method performs better than JPEG, EZW and entire image PCA at all tested bit rate. Statistical results demonstrate that the mean PSNR for AAPCA increased significantly with the mean PSNR for the EZW (30.4930 vs. 47.9696, p < 0.001) and JPEG (40.4758 vs. 47.9696, p < 0.001). It is interesting to learn that while EZW performance fell behind the other compression methods, the PSNR performance for entire image PCA and JPEG were close to each other. The AAPCA performs slightly inferior to JPEG2000 at low bpp. The rate-distortion performance for AAPCA is equivalent to that of SPIHT at high bpp but inferior to SPIHT at low bpp. This can probably be explained by the fact that progressive transmission in SPIHT reduces the MSE distortion more significantly for every bitplane sent even though the image is compressed at high compression ratio.
The AAPCA is also compared with the four existing region-based methods and it is observed from Fig. 8 that the proposed method achieves higher PSNR than EBCOT and SV algorithm. The mean PSNR for the AAPCA increased significantly with the mean PSNR for the EBCOT (37.0275 vs. 47.9696, p < 0.001) and SV algorithm (30.9163 vs. 47.9696, p < 0.001). However the average PSNR for AAPCA is seen to be lower than MAXSHIFT towards the higher end (above 0.8 bpp) and lower end (below 0.125 bpp) of the bpp as shown in Fig. 8. Similarly the PSNR of AAPCA is higher than the general scaling based method except at higher end (above 0.8 bpp) and lower end (below 0.125 bpp) of the bpp. A reason for the drop of PSNR compare to general scaling based method and MAXSHIFT is due to the block-based nature of the blockbased PCA algorithm. It should also be noted that while AAPCA needs to encode the shape information of the ROI, it is not necessary with the MAXSHIFT method, enabling lower computational cost.
The original and reconstructed image output of AAPCA for part of the test images at bpp = 1.0, bpp = 0.25 and bpp = 0.0625 are provided in Fig. 6. The ROI automatically segmented using the AAPCA is also included in the figures to illustrate the region selected and extracted by the algorithm. The NROI (not shown on the figures) is the image region void of the ROI region. The same common observation made across all three databases is that reconstructed images suffer little or no visual distortion at bpp = 1.0 and the visual quality is maintained even at lower bit rate, bpp = 0.25. Notice that there are no visible blocking and unnatural noise artifacts. However, the image quality of the reconstructed images compressed at bpp = 0.0625 is slightly deteriorated and the images are seen to be impaired to a certain extent, preserving only the image quality of the ROI. The impairment, if noticeable, are blocking artifacts usually exhibited at the ROI edges and blurring. These artifacts are the reason the proposed method loses PSNR compared to SPIHT, the general scaling based method and MAXSHIFT at low bit rate. Another common observation that can be made is that the arbitrary-shape ROI are faithfully represented using AAPCA compressed at different bit rates.

IV. CONCLUSION
In this work, to provide solutions for an efficient regionbased image compression, we presented an automated segmentation/compression algorithm termed as automated arbitrary Principal Component Analysis (AAPCA), which takes into account of arbitrary shape ROI using principal component analysis as the core compression method. The experimental results demonstrated that this technique is applicable to axial brain scans for which the quality of an arbitrary shape region is desired to be lossless and the brain segmentation is to be automated. We successfully applied AAPCA in the framework of MRI brain image compression from three public databases where the ROI is the lesion.
The objective and subjective evaluation confirmed that the proposed method is capable of extending beyond the compression limits of conventional PCA algorithm. Statistical analysis shows that AAPCA outperforms JPEG, EZW, EBCOT, and technique proposed by [2] both in CR and reconstruction quality. No image noise and blockiness are observed at bpp as low as 0.25. The only limitation is that there is possibility of loss of information at the edge of the ROI at high compression rate. However one may argue that the compression parameter of the image can be optimally adjusted so that the edge of the ROI can be highly preserved without compromising the bit rate. Although the proposed algorithm is markedly tailored to MRI brain images, similar algorithms can be devised for other image modality or anatomy of interest. The main objective is to focus resources on a given medical image modality and exploit the knowledge of its invariant features.

V. FUTURE WORK
While the results gathered in the study are promising, there is room for improvement. One topic that deserves further investigation is that AAPCA is a 2D model. In order to better segment the ROI, the algorithm can be implemented in 3D environment to enable better analysis and detection of ROI in 3D since 3D based models are less susceptible to the disorientation of MSP. On top of that, implementing segmentation in 3D environment allows the segmentation/compression algorithm to compress the whole volume of ROI. Continuation of this study might include suppressing the blocking artifacts with the use of a postprocessing algorithm such as a deblocking filter.
Future work can also include the extraction of multiple ROI regions prior to compression for example in the case of metastatic brain tumors. One may also choose the best suited region-based compression technique for all kinds of telemedicine archiving system based on a specific application. It would be interesting to predict visual quality of other compression technique. The current proposed method is believed to be a probable tool for future research focusing on medical images where arbitrary ROI coding is of concern in multimedia application, and even some telecommunication applications. Along with its value for the specific application, the presented results in this thesis reveal the fact that segmentation/compression published thus far can be improved considerably. The benefits reaped are significant by developing more powerful segmentation technique.