International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
_______________________________________________________________________________________________
Medical Image Compression based on ROI using Integer Wavelet Transform
Sandip Mehta
Department of Electrical and Electronics Engineering
JIET Group of Institutions
Jodhpur, Rajasthan, India
[email protected]
Abstract— Medical imaging refers to techniques and processes used to create images of various parts of the human body for diagnostic and
treatment purposes within digital health. With the increased use of digital images in clinical settings, it has become necessary to use various
compression methods, both lossless and lossy, in order to reduce their cost of storage or transmission. While lossy compression alternatives
allow high compression rates, there are legal limitations that such images including MRI, ultrasound, X-Ray and CT-Scan should be stored in a
format without loss of information. This work proposes a digital image compression mechanism compatible with the Digital Imaging and
Communications in Medicine (DICOM) standard that takes advantage of the IDWT capabilities to preserve the diagnostic quality of the regions
of interest, through lossless encoding, while the rest of the image, composed of zones less relevant, is compressed with for JPEG compression.
The results, in terms of Compression Ratio, MSE and PSNR are found to be quite satisfactory both quantitatively and qualitatively.
Keywords- Compression, JPEG, ROI, Wavelet Transform, Segmentation, DICOM, PSNR.
__________________________________________________*****_________________________________________________
In the present work we analyze these techniques as a whole
I. INTRODUCTION and propose the development of a solution that allows
In the area of medicine, large volumes of information are incorporating the benefits of each one of them and their most
generated annually through the acquisition of digital images, recent extensions. It presents a storage mechanism compatible
such as Computed Tomography (CT) or Magnetic Resonance with the DICOM standard that takes advantage of the
Imaging (MRI), among others. Due to the growing trend capabilities of the IDWT standard to introduce a Region of
towards image digitization and filmless removal within medical Interest (ROI), allowing lossless compression of the area of
institutions, image compression becomes a key aspect of image greatest diagnostic importance within the image and with a loss
storage and communication systems (known as PACS, by moderate the remaining region.
Picture Archiving and Communication Systems) and for
A. Characteristics of Medical Image Compression
teleradiology or telemedicine, among other applications.
Commonly used digital modalities (such as MRI, CT,
In the particular case of the Argentine legislation, according
computerized radiographs, mammograms, etc.) may require a
to the law 26,529 art. 18, "patients' rights in their relationship
high cost of storage and infrastructure. For this reason, these
with health professionals and institutions" establish custody for
types of images become ideal candidates for compression, in
a minimum period of 10 years, "this term is computed from the
order to improve the utilization of existing resources and
last performance recorded in the medical history and expired
increase the capacity of transmission through the network used.
the same, depositary shall dispose of it in the manner and
Some of these modalities, due to their volumetric
manner determined by the regulations. "[1]. This information
characteristics, have a certain similarity between the successive
about the studies of a patient should be stored properly and also
cuts or cross sections that compose each study, similarly to
remain online at all times, since physicians need to be able to
what happens between frames of a video, as well as color
access them easily from anywhere to diagnose and analyze the
properties (gray scale, high contrast), number of homogeneous
evolution of any pathology.
zones and secondary information (context). These
Although there is currently no legislation that establishes characteristics can be exploited in search of compression
standards for medical image compression, health institutions mechanisms especially suitable for this type of images, without
often resort to the use of lossy compression algorithms for the danger of affecting the diagnostic capacity [4].
storage of already diagnosed studies in order to reduce their
Compression techniques are based on reducing the
storage space.
redundancy present in the data. Typically, a lossless
Several technological initiatives have been proposed to compression algorithm can achieve compression factors of no
optimize the handling of this information, such as the design of more than 2: 1, on average. If it is desired to increase the
new compression standards, or the development of DICOM compression rate, then it will be necessary to apply techniques
(Digital Imaging and Communicating Medicine), as a standard that exploit even more the spatial (intraframe redundancy) and
for the transmission and storage of medical images [2-3]. temporal (interframe redundancy) characteristics of the images
with volumetric characteristics [5]. Another strategy with great
compression potential is based on the definition of an ROI, so
174
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
_______________________________________________________________________________________________
that the area of the image belonging to such a region can be of ROI to rectangular binary masks. Therefore, implementation
compressed using a lossless algorithm in order to recover the was developed using the Code Block Selection method, which
original data without alteration and the external area to through is more efficient for this type of regions. This is because the
a lossy or irreversible algorithm, which can equally achieve definition, by means of different geometric or curvilinear
results with visually indistinguishable quality decrease. forms, requires the division into small blocks and can render
the coding inefficient, since a discrete wavelet transform
The MJ2 format is based on efficiency of the JPEG 2000
(DWT) process is applied to each one of them.
still image compression algorithm and consists of one or more
image sequences compressed individually by said encoder The rest of the paper is arranged as follows. The image
compression techniques are discussed in section II wile the
(intraframe coding), allowing random access to any frame and
proposed methodology has been introduced in section III. The
reducing the complexity of the algorithm. This method is
simulations and results are presented in section IV while the
mainly used in environments where scalability, high quality,
conclusion is given in section V.
lossless compression and fault tolerance are needed [6].
B. Characteristics of the DICOM Standard II. IMAGE COMPRESSION TECHNIQUES
The DICOM format is a standard created by the National The compression techniques can be grouped into two large
Electrical Manufacturers Association for the handling, classes: a) Compression techniques without loss of information
transmission, storage and printing of digital medical images and b) Compression techniques with loss of information. In the
[7]. This format also defines which algorithms can be used for first class, the compressed images are regenerated without
image compression, as well as the way in which each one must errors, that is, they are the same as the original. However, in the
be parameterized according to the type of image to be stored (if second, the reconstructed images are more or less different
loss is allowed, ROI, etc.). from the original image.
In each classification there are strategies or compression
The original definition of DICOM consists of 16 parts [8]. algorithms that stand out, which are presented in the following
Among its definitions, part 10 is the most interesting in this subsections along with their characteristics.
work, since it includes both a communication protocol and a I. Techniques of image compression without loss of
file format. information
In this classification, images are considered to be based on
Typically, DICOM files consist of a header (which stores
entropy, a technique that encodes the data without needing to
patient data, methodology used, image dimensions, among
know the nature of these, are general purpose and where the
others) and its contents (which may have one or more data
reconstructed image is exactly the same as the original image.
elements). The data in the file can be compressed in order to
These techniques are notable because they employ statistical
reduce its size. Compressed images can be generated using an
methods, based on Shannon's theory that allows lossless
algorithm without loss or variants with loss of techniques
compression. Some of these techniques are: Run-length
known as JPEG or Run Length Encoding, among others. The
encoding (RLE)[10], Huffman coding, arithmetic coding and
compression format is indicated by the Transfer Syntax Unique
Lempel-Ziv[11].
Identification attribute. This value not only describes the
structure of the data, but also the order in which the bytes are to II. Image compression techniques with loss of information
be interpreted. For example, they can be read in Little Endian In this classification, the reconstructed image or sequence is
or Big Endian format. In order to ensure compatibility with the more or less different from the original image. They are used
standard and with other systems already established, it is mainly when the images have redundant information that can
desirable that the compression algorithms used be supported by be removed or reduced, for example, the color of the sky in a
DICOM. photo is usually uniform and blue. In these techniques, it is
sometimes also interesting to code the brightness level of a
C. Developed Compression Tool sample (luminance or component Y) and the color differences
The objective of this work is to provide a tool through (blue, red and green chrominances, or components Cb, Cr, Cg).
which it is possible to create DICOM files for the storage of The reduction is done using source encoding techniques
MRI, CT and other monochrome modalities, parameterizing [12], which encode the data based on the characteristics and
properties of their images, allow high compression rates and
those attributes that have effect on the compression. These
are generally for specific purposes. Some techniques that stand
attributes may be common to all techniques used, for example
out are: 1) Codification by transformation, 2) Quantization
the number of bits transmitted per bitrate of the resulting or Vector and 3) Fractal Compression.
particular images of the strategy such as the number of frames
per second for MPEG-4 compression , percentage of loss out of
ROI for JPEG-2000, among others. III. PROPOSED METHODOLOGY
With respect to the definition of an ROI, it can be specified The proposed work can be obtained by integer wavelet
through a set of coordinates or as a binary mask of the same transform followed by JPEG algorithm. Fig. 1 shows the
size as the image. If not supplied, the images are completely general architecture of the proposed system.
compressed without loss. There are three alternatives to ROI The proposed image compression and reconstruction
coding: Tiling, CodeBlock Selection and Coefficient Scaling architecture addressed in this paper involves the following
(called the Maxshift algorithm in the JPEG-2000 standard) [9]. steps.
For simplicity reasons, it was decided to restrict the definition 1. Load the Medical image as input.
175
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
_______________________________________________________________________________________________
2. Using a Global thresholding method, apply threshold to are subjected to the Morphological Reconstructions (Mask,
remove background i.e. the ROI & Non-ROI regions are Marker) from which binary image is extracted.
separated from background (BG)
A Noisy MRI Image as Input
3. Select ROI, and separate out ROI and Non-ROI.
4. ROI region is encoded using IWT with high bpp.
5. Non-ROI region is encoded using JPEG compression Filter the Image using High Pass Filter
with low bpp.
6. Merge the two encoded regions (ROI and Non-ROI) to
get the ROI based compressed image. Binarization of image
Medical Image (MRI) Morphological operation
Level set Segmentation
Generate the initial level set function
(LSF)
Tumour region Non-tumour region
ROI Level set Segmentation
Lossless Compression
Via IWT Jpeg Lossy Compression
Via SPIHT
Final LSF
Compressed Image
Detected Brain Tumor
Fig. 1. Flowchart for proposed work
Fig. 2. Flow chart of segmentation for ROI
7. To perform Non-ROI compression i.e. compression
without any particular selection of region, apply SPIHT Algorithm:
on the binary image, obtained in step (2). 1. Acquire image and convert it to gray (if it is not
already) because operations (which are to be used) are
8. Get the Non-ROI based compressed image.
not possible on RGB.
9. Compare the quality of ROI based compressed image
2. High Pass filter the gray scale image for noise
with Non-ROI based compressed image obtained in
removal.
previous steps in terms of PSNR and compression ratio.
3. Enhance image for intensity.
10. Repeat the same process to applying on more images.
4. Convert enhanced image to binary image (tumor
A. Segmentation for ROI and NON-ROI region will have high intensity so it would be binary 1
The first phase is to acquire the MRI image and then apply and other will binary 0 in binary image).
the pre-processing steps. There are various methods which 5. Perform morphological operations on binary image to
come under this step; we will be dealing with only grey scale remove unwanted regions and to identify tumors
image and filters. Basically pre-processing is done to remove regions.
noise and blurring as well as a ringing effect in order to get the
6. Detected regions are not fine-tuned due to
enhanced and much clear image for our purpose. The filter morphological operations. Hence, we use the binary
which has been used is a high pass filter. As the image samples image as level set function and apply level set
are required for medical purpose, the high pass filter has to be evolution on high pass filtered image. This will output
passed with mask for better image. In order to achieve this, a the detected tumor in MRI brain image.
Sobel operator is used.
A compression algorithm of images using the Wavelet
1) Level Set Function Transform is now discussed. The Wavelet transform is a
The Level Set Function [13] is used here to make the image convenient tool for multiresolution analysis of signals and in
under consideration robust towards noise condition, aptitude in particular is naturally adjusted to the compression of images by
extracting curved objects with complex topology and its clean adapting the required bandwidth automatically. This algorithm
numerical framework of multidimensional implementation. studies the characteristics of the images in shades of gray to
With the initialization of level function we generate the initial exploit important aspects of the human visual system. The
region of image as a rectangle. Level set evolution and object human eye is less sensitive to high spatial frequencies (edges of
detection is further divided in three categories i.e. dilate an image) than to low spatial frequencies (textures of an
marker, erode marker and Gradient Magnitude. The first two image). The method used consists in coding with few bits the
176
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
_______________________________________________________________________________________________
coefficients representing high frequencies and with more bits This group has created several standards for image coding, the
the coefficients of low frequencies. most recent being the JPEG2000 that is based on wavelet
transformations, but this chapter will focus on the first one they
B. Compression of Images developed and is commonly referred to as the acronym of the
One of the most widely used algorithms for image group. The formal name of this standard is ITU-T
compression is JPEG. The algorithm divides the image into Recommendation T.81 or ISO / IEC IS 10918-1. This
blocks of 8x8 pixels using in each one the Discrete Cosine compression standard has been the most widely used so far.
Transformation (DCT). The disadvantage of this is that the Uses the discrete cosine transform (DCT) to perform a
compression with losses taking advantage of the deficiencies of
image compressed reveals the blocks and cannot take the human eye. The sequence of operations performed by a
advantage of the correlation between blocks. A compression JPEG compressor are as follows:
algorithm essentially consists of three steps: transformation,
quantification, and coding. Transformation of the color space.
1) Wavelet Transform
For the choice of a particular wavelet, the following Splitting the image into blocks of 8×8 pixels.
properties: Application of the discrete cosine transform (DCT) to
Compact support: Filters must be finite FIR. each block.
Rational coefficients: they allow to avoid the The basic idea in this technique is to use a discrete Fourier
operations of floating point. transform to match the image with a set of transform
Smoothness: if the wavelet is not smooth the error will coefficients. A quantization process is applied on these
be easy to detect visually. coefficients, where a significant number of the coefficients
usually have small values that are insignificant, which can be
Length of filters: short filters are preferable, but there eliminated by a process known as quantization, resulting in the
is a trade-off between these and the softness since it is loss of information, although this does not imply an appreciable
proportional to the length of the filters. distortion of the image. In this way a reduced number of image
Quantification: One problem that impedes efficient data is obtained, to which a lossless coding technique is usually
coding is the fact that the coefficients of the transform applied to improve the results.
can have arbitrary values. The purpose of The discrete cosine transform (known as DCT) is most
quantification is to restrict the values of the
often used for image compression because of its ability to
coefficients to a limited number of possibilities.
package information, as it packs most of the information into
Coding: The coding step involves reversibly replacing the smallest number of coefficients; DCT also minimizes the
the string of input symbols of the quantizer by a bit visibility of the boundaries between sub-pictures. The
stream. coefficients in this technique are calculated from equation 2.
The two main categories are fixed length and variable
length encoding. In a fixed length encoder each symbol is
replaced with the same number of bits. It is therefore essential
to use a good quantifier. An example is the Lloyd-Max
algorithm. A more powerful variant uses variable-length
encoding. The idea is to assign the shortest words to the most
frequent symbols. Suppose a code word has probability
with:
(1) (2)
The content of information or entropy is now given by IV. SIMULATION AND RESULTS
where, . And this is the theoretical minimum
The simulation and results have been presented in this section.
amount of bits required by code word. The problem is that is
Two of the error metrics used to compare the various image
not necessarily a natural number. Variable-length encoders (or compression techniques are the:
entropic encoders) try to approach as much as possible to this
minimum. The two most popular methods are Huffman and Mean Square Error (MSE)
arithmetic coding. It should be borne in mind that these
Peak Signal to Noise Ratio (PSNR)
encoders are only optimal is the case where the probabilities pi
are known. In practice one usually has to estimate obviously, The MSE is the cumulative squared error between the
the position of the coefficients that were set to zero has to be compressed and the original image the mathematical formula
coded as well. This can be done with Run Length coding, is:
which is usually followed by entropic coding of the lengths of (3)
the runs.
2) JPEG Compression The PSNR is a measure of the peak error between the
JPEG stands for Joint Photographic Experts Group. JPEG is compressed and the original image the mathematical formula
a committee of experts ISO / IEC and ITU-T, to share their is:
experience and analyze the problem of digital image coding.
177
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
Enhanced Image
_______________________________________________________________________________________________
(4)
where is the original image, is the
approximated version (which is actually the decompressed
image) and are the dimensions of the images. A lower
value for MSE means lesser error, and as seen from the inverse
relation between the MSE and PSNR, this translates to a high
value of PSNR.
Acquired Image
Fig.Binary Image
5. Enhanced image
Fig. 3. Acquired image
Morphed Image with
Fig. detected
6. Binary image Tumor region
Fig. 4. Filtered image
Fig. 7. Morphed image with detected Tumor region
178
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
Original image with initial tumor region
_______________________________________________________________________________________________
Table 1. Results
S. N. Area (Pixels) Mean Variance
1 1012 211.3 337.1
2 3234 209.5 541.6
3 1528 214.4 270.6
The compression ratio, MSE and PSNR for the two cases i.e.
for the original image with initial tumor region and the original
image with the final achieved tumor region is shown in table 2.
Table 2:
Comparison of efficacy measures for the two cases
Method Original image with
Original image with
Efficacy measures the final achieved
initial tumor region
tumor region
Compression ratio 0.4412 0.2123
Fig. Original
8. Originalimage
imagewith
with tumor
initial tumor region
region MSE 28.4016 4.4816
89.8152
PSNR 81.7960
V. CONCLUSION
This paper represents the medical image compression with
lossy and loss less compression .The segmented region of
Tumor is compressed via IDWT method and non-tumor region
is compressed with JPEG compression. The receiver end
decompress the respective region and further PSNR and MSE
are calculated to evaluate the prototype.
REFERENCES
[1] Erberich, S.G., Silverstein, J.C., Chervenak, A., Schuler, R.,
Nelson, M.D. and Kesselman, C., 2007. Globus MEDICUS-
federation of DICOM medical imaging devices into
healthcare Grids. Studies in Health Technology and
Fig. 9. Original image with final achieved tumor region Informatics, 126, p.269.
Tumour region Non - Tumour region
[2] Zukoski, M.J., Boult, T. and Iyriboz, T., 2006. A novel
approach to medical image compression. International journal
of bioinformatics research and applications, 2(1), pp.89-103.
[3] Pianykh, O.S., 2009. Digital imaging and communications in
medicine (DICOM): a practical introduction and survival
guide. Springer Science & Business Media.
[4] Bharti, P., Gupta, S. and Bhatia, R., 2009, October.
Comparative analysis of image compression techniques: A
case study on medical images. In Advances in Recent
Technologies in Communication and Computing, 2009.
(a) (b) ARTCom'09. International Conference on (pp. 820-822).
Reconstructed Tumour region Reconstructed Non - Tumour region
Fig. 10 (a) Tumor region, (b) Non-Tumor region
IEEE.
[5] Smith, S.M., Jenkinson, M., Woolrich, M.W., Beckmann,
C.F., Behrens, T.E., Johansen-Berg, H., Bannister, P.R., De
Luca, M., Drobnjak, I., Flitney, D.E. and Niazy, R.K., 2004.
Advances in functional and structural MR image analysis and
implementation as FSL. Neuroimage, 23, pp.S208-S219.
[6] Lin, C.Y. and Chang, S.F., 2001. A robust image
authentication method distinguishing JPEG compression from
malicious manipulation. IEEE Transactions on Circuits and
Systems for Video Technology, 11(2), pp.153-168.
(a) (b)
Fig. 11 (a) Reconstructed Tumor region, (b) Reconstructed Non- [7] Mildenberger, P., Eichelberg, M. and Martin, E., 2002.
Tumor region Introduction to the DICOM standard. European radiology,
12(4), pp.920-927.
179
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 174 – 180
_______________________________________________________________________________________________
[8] Mustra, M., Delac, K. and Grgic, M., 2008, September.
Overview of the DICOM standard. In ELMAR, 2008. 50th
International Symposium (Vol. 1, pp. 39-44). IEEE
[9] Skodras, A., Christopoulos, C. and Ebrahimi, T., 2001. The
JPEG 2000 still image compression standard. IEEE Signal
processing magazine, 18(5), pp.36-58.
[10] Hinds, S.C., Fisher, J.L. and D'Amato, D.P., 1990, June. A
document skew detection method using run-length encoding
and the Hough transform. In Pattern Recognition, 1990.
Proceedings., 10th International Conference on (Vol. 1, pp.
464-468). IEEE.
[11] Glover, D.R., The United States Of America As Represented
By The Administrator Of The National Aeronautics, 1995.
Picture data compression coder using subband/transform
coding with a Lempel-Ziv-based coder. U.S. Patent
5,412,429.
[12] Schwartz, J.W. and Barker, R.C., 1966. Bit-plane encoding: a
technique for source encoding. IEEE Transactions on
Aerospace and Electronic Systems, (4), pp
[13] Li, C., Xu, C., Gui, C. and Fox, M.D., 2005, June. Level set
evolution without re-initialization: a new variational
formulation. In Computer Vision and Pattern Recognition,
2005. CVPR 2005. IEEE Computer Society Conference on
(Vol. 1, pp. 430-436). IEEE.
180
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________