- Research
- Open access
- Published:

# Simultaneous storage of medical images in the spatial and frequency domain: A comparative study

*BioMedical Engineering OnLine*
**volumeÂ 3**, ArticleÂ number:Â 17 (2004)

## Abstract

### Background

Digital watermarking is a technique of hiding specific identification data for copyright authentication. This technique is adapted here for interleaving patient information with medical images, to reduce storage and transmission overheads.

### Methods

The patient information is encrypted before interleaving with images to ensure greater security. The bio-signals are compressed and subsequently interleaved with the image. This interleaving is carried out in the spatial domain and Frequency domain. The performance of interleaving in the spatial, Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT) and Discrete Wavelet Transform (DWT) coefficients is studied. Differential pulse code modulation (DPCM) is employed for data compression as well as encryption and results are tabulated for a specific example.

### Results

It can be seen from results, the process does not affect the picture quality. This is attributed to the fact that the change in LSB of a pixel changes its brightness by 1 part in 256. Spatial and DFT domain interleaving gave very less %NRMSE as compared to DCT and DWT domain.

### Conclusion

The Results show that spatial domain the interleaving, the %NRMSE was less than 0.25% for 8-bit encoded pixel intensity. Among the frequency domain interleaving methods, DFT was found to be very efficient.

## Background

Digital watermarking is a type of data hiding or steganography. It entails inserting some data into a digital image, a sound file or a digital video [4, 12]. This data can be used to verify ownership. A user can extract the data and compare it with the original embedded data to determine ownership of the image. Usually the mere presence of something resembling is the original embedded data is enough to justify for copyright violation purposes. Digital watermarking have several other uses, such as fingerprinting, authentication, integrity verification purposes, content labeling, usage control and content protection [19, 8]. The efficient utilization of bandwidth of communication channel and storage space can be achieved, when the reduction in data size is done. Isolated transmission of image and data requires more bandwidth in transmission and more memory space during storage. The large amount of patient information such as bio signals, word documents and medical images required to be exchanged between hospitals. Interleaving one form of data such as 1-D signal or text file over digital images can combine the advantages of data security with efficient memory utilization [13].

The watermarking techniques are divided into basic categories

**Spatial domain watermarking** [12], in which the Least two significant bits of the image pixel is replaced with that of watermark (1D signal or text). This method of spatial domain interleaving is susceptible to noise. Figure 1 shows the proposed method for interleaving in spatial domain.

**Frequency domain watermarking**, in which the image is first transformed to the frequency domain and then the low frequency components are modified to contain the text or signal. Watermarking can be applied in the frequency domain by applying transforms like Discrete Fourier Transform (DFT), Discrete Cosine Transform Discrete Wavelet Transform (DWT). Since high frequencies will be lost by compression or scaling, the watermark signal is applied to the lower frequencies or applied adaptively to frequencies that contain important information of the original picture. Since watermarks applied to the frequency domain will be dispersed over the entirety of the image upon inverse transformation, this method is not susceptible to defeat by cropping as in the spatial domain.

Many authors have proposed the protecting the ownership rights through the watermarking [7, 10, 13, 15â€“17]. Swanson et al, have proposed the robust data hiding techniques for images [23â€“25]. And also authors have implemented adaptive watermarking in the DCT domain [3, 5, 14, 26]. Many authors have implemented the Wavelet based watermarking techniques in the Wavelet domain [1, 6, 20, 27]. Rajendra et al has interleaved the patient information and heart rate data in the various medical images [21]. Figure 1 shows the scheme for interleaving in the spatial domain. In this work, the interleaving is extended to the DFT, DCT and DWT domain. A gray scale image file (128 Ã— 128 pixels) is used in all the interleaving process.

## Methods

### Encryption of text file

The information to be stored is encrypted before watermarking to enhance the security. Highly secured algorithm called as Advanced Encryption Standard (AES), which is developed by National Institute of standards and Technology, is used for the encryption of text data. This algorithm is also called as Rijndael algorithm, which is designed by John Daemen and Vincent Rijmen. Rijndael's key length is defined to be either 128, or 192 or 256 bits in accordance with the requirements of the AES [9]. Figure 2(a) and 2(b) shows the original patient data and the encrypted data respectively.

### Encryption of bio-signal graph

The Differential Pulse Code Modulation (DPCM) technique is extensively used to reduce the dynamic range of the signal. The DPCM is used here for encrypting the ECG signal. The differential error output (which is random and uncorrelated) is used as the encrypted version of the original signal. The DPCM is a predictive coding technique where in the present sample *x*
_{
n
}in a signal is expressed as a sum of linearly weighted past sample *x*
_{
n-1}and error signal *e*
_{
n
}[11, 22].

*x*
_{
n
}= *px*
_{
n-1}+ *e*
_{
n
}Â Â Â (1)

The predictor coefficient *p* is determined by the least square technique, as

The differential error *e*
_{
n
}is stored along with the first sample *x*
_{0} and the linear predictor coefficient *p*. The ECG signal *x*
_{
n
}can be reconstructed from the error signal by auto-regression technique (Eq. (1)). Thus, the symbol pair (*p*, *x*
_{0}) forms the key for the encrypted ECG signal *e*
_{
n
}. This quantized *e*
_{
n
}is interleaved with the LSB of image DCT/DWTs. As the dynamic range of the error signal *e*
_{
n
}is very small, it is coded with only 4 bits.

### Interleaving in spatial domain

The ASCII code of the encrypted text is swapped with the least significant bit of the pixels in the image. Each bit in the ASCII code of the text is placed at last bit of the pixels in the image. This procedure is repeated for all the ASCII codes of given text. It can be seen that one ASCII code can be hidden in eight pixels of the given image. Similarly the graphic files of bio-signals are also interleaved in the pixels using above said procedure. The graphic file is encrypted using DPCM. In this study ECG is used as a bio-signal which is encrypted as given in the section 3.2 of this paper. Fig. 3(a),3(b) and 3(c) are the original, reconstructed and error signals of the DPCM.

### Interleaving in DFT domain

DFT magnitude is robust to translation or shift attacks in the domain since cyclic translation of image in the spatial domain does not affect DFT amplitude. DFT offers the possibility of interleaving either in the magnitude or the phase of the DFT coefficients. The phase is far more important than the magnitude of the DFT coefficients for the intelligibility of an image. Hence the interleaving is done in the magnitude coefficients of the DFT coefficients. The DFT is taken for the blocks 8 Ã— 8 pixels of the image, selected in raster fashion. All the DFT coefficients are not modified. The low frequency components of the image are perceptually more significant ones and any modification of them deteriorates the image fidelity. Therefore interleaving should be carried out in the high frequency region. The high frequency components are less significant in terms of fidelity. Hence the compression techniques use this property and suppress the high frequency coefficients. Hence the interleaving is done in the bandpass coefficients of the magnitude of the DFT coefficients. Figure 4 shows the interleaving procedure adopted in the DFT domain.

### Interleaving in DCT domain

Blocks of 8 Ã— 8 pixels are selected in a raster fashion from the image to be compressed. This forms the input to the encoder. Applying DCT to these blocks transforms the image from spatial domain to frequency domain. The DCT contains the DC coefficient, which measures the zero frequency, and 63 AC coefficients. The DCT coefficients are quantized according to perceptual criteria. For interleaving the LSB of each DCT coefficient is replaced by the text data (after the quantization and zigzag encoding). The eight bits of ASCII code in the text file will replace the LSB of eight consecutive DCT coefficients of the image from the middle frequency range onwards (from 32 to 63 coefficients). If the data file is a graphic signal having 16-bit word, 16 consecutive DCT coefficients are used for interleaving a single word. The LSB is chosen for data interleaving because, the resulting degradation of image is minimal. In the decoding side, the interleaved text or graphical signal can be obtained by de-interleaving i.e., extracting the LSBs and concatenating the same, before, inverse quantization, zigzag coding and inverse DCT. The Interleaving procedure implemented in DCT domain is shown in figure 5.

### Interleaving in Wavelet domain

Wavelets are the functions defined over a finite interval and having average value zero. The basic idea of the Wavelet transform is to represent any arbitrary function f(t) as a superposition of a set of such wavelets or basis functions. These basis functions are obtained from a single prototype Wavelet called the mother Wavelet, by dilations or contractions (scaling) and translations (shifts). Besides the usage of DCT in JPEG, a new compression technique called JPEG2000 uses Discrete Wavelet Transform. The blocking artifacts of DCT in JPEG are noticeable and annoying. In Wavelet based compression we get higher compression and blocking artifacts are avoided. The Wavelet transform can be implemented using filter banks [Mallat, 1998]. The signal is decomposed into various subbands octave-band decomposition is most widely used. Figure 6 shows the scheme used for DWT domain interleaving process. The Figure 7. shows three level octave band decomposition. The DWT gives three parts of multiresolution representation and one part of multiresolution approximation [Mallat, 1998]. It is similar to hierarchical subband system, where subbands are logarithmically spaced in frequency. The subbands labeled LH1, HL1, HH1 of multiresolution representation represent the finest scale Wavelet coefficients. To obtain next coarser scale of the Wavelet coefficients, the subband LL1 i.e. multiresolution approximation is further decomposed and critically subsampled. We perform three level decomposition of the image and embed the text/Graphic file information into High frequency region band respectively (Starting from the 32^{nd} coefficient to 64^{th} coefficient). The text and graphic file can be extracted from the DWT coefficients before inverse quantization, inverse zigzag coding and taking inverse discrete Wavelet transform and to recover the original image.

## Results

Three types of medical images CT, MRI and Angiogram images of size 128 Ã— 28 pixels are chosen. The text and the error signal (of DPCM) data size is 130 bytes. The ASCII codes of the encrypted text shown in Fig. 2b are broken into bits and interleaved into the DFT coefficients of the pixels of CT image (Fig. 8a). The resulting image is shown in Fig. 8b. The error signal e_{n} obtained from DPCM shown in Fig. 3c, is interleaved into the DCT coefficients of the MRI image (Fig. 9a). The resulting interleaved images are shown in Fig. 9b. The ASCII code of the encrypted text (Fig. 2b) is again interleaved into the DWT coefficients of Angiogram image (Fig. 10a). And the result is shown in Fig. 10b. It can be seen from results, the process does not affect the picture quality. This is attributed to the fact that the change in LSB of a pixel changes its brightness by 1 part in 256. Fig. 11a and 11b show the intensity histograms of the original and interleaved (with encrypted text data of Fig. 2b) Angiogram images. It can be seen that the shape of the histogram bears resemblance to that of the original image. The change in the population of pixels of a specific intensity is definite in nature. There will be change in the pixel value of 1 or 0 depending on the bit used for interleaving. Hence, the modified histogram has the resemblance of the original histogram. A quantitative assessment of the method is obtained by evaluating the normalized root mean square error (NRMSE) as defined below:

where N = Total number of columns; M = Total number of rows in the image.

*f(x, y)* = The original pixel intensity; *f*
_{
w
}(*x*, *y*) = The modified (interleaved) pixel intensity

From the table 1, 2, 3 and 4, we can infer that, the %NMRSE is less for DFT and spatial domain interleaving. In DFT domain, the interleaving is done in the band pass coefficients of the magnitude of the DFT coefficients. In DCT and DWT domain the error is more due to the quantization.

## Conclusion

Interleaving of the patient information such as text documents and physiological signals with medical images in the spatial and frequency domain is presented for efficient storage. Text files are encrypted using Rijndael algorithm and ECG signal is encrypted by DPCM technique, prior to interleaving. In the spatial domain the interleaving, the NRMSE was less than 0.25% for 8-bit encoded pixel intensity. Among the frequency domain interleaving methods, DFT was found to be very efficient. The NRMSE was found to be less than 0.04%. But the quantity of data interleaved will be less. Security of information can be further enhanced by choosing the position of the interleaved bit according to a specific plan known only to the authorized users.

## Author Contribution

JN carried out analysis and implementation. PSB participated in the study and testing of the results.

RAU is coordinated in testing the results. NUC is participated in testing the results.

All authors read and approved the final manuscript.

## References

Antonini M, Barlaud M, Mathieu P, Daubechies I:

**Image Coding using wavelet transform.***IEEE Transactions on Image Processing*1992,**1**(2):205â€“220. 10.1109/83.136597Barni M, Bartolini F, Piva A:

**Copyright protection of digital images by means of frequency domain watermarking.***Mathematics of Data/Image Coding, Compression and Encryption, Proceedings of SPIE*1998,**3456:**25â€“35.Barni M, Bartolini F, Piva A:

**Improved Wavelet-Based Watermarking Through Pixel-Wise Masking.***IEEETransactions on Image Processing*2001,**10**(5):783â€“791. 10.1109/83.918570Bender W, Gruhl D, Morimoto N, Lu A:

**Techniques for data hiding.***IBM System Journal*1996,**35**(3):313â€“336.Bros AG, Pitas I:

**Image Watermarking using DCT domain constraints.***Proceedings of IEEE international Conference on Image Processing*1996,**3:**231â€“234.Cao JG, Fower JE, Younan NH:

**An Image-Adaptive Watermark Based on a Redundant Wavelet Transform.***Proceedings of the International Conference on Image Processing, Greece*2001, 277â€“280.Cox J, Miller ML, Bloom JA:

**Digital Watermarking.**San Fransisco, CA: Morgan Kauffman 2002.Craver , Scott , Boon-Lock , Yeung Minerva:

**Technical Trials and Legal Tribulations.***Communications of ACM*1998,**45**(9):45â€“54. 10.1145/278476.278486Daemen , Rijmen V:

**AES Proposal Rijndael, version 2.**1999. [http://citeseer.nj.nec.com/daemen98aes.html]Fabien AP, Petitcolas , Anderson Ross A, Kuhn Marcus G:

**Information hiding: A Survey.***Proceedings of the IEEE*1999,**85**(7):1062â€“1077.Gonzalez RC, Wintz P:

*Digital Image Processing*Addison-Wesley Publishing Co 1987.Berghel Hal, O' Grossman Lawrence:

**Protecting Ownership Rights Through Watermarking.***IEEE Computer*1996, 101â€“103.Berghel Hal:

**Watermarking Cyberspace.***Communications of the ACM*1997,**40**(11):19â€“24. 10.1145/265684.265687Juan RHMA, Perez-Gonzalez F:

**DCT-Domain Watermarking Techniques for Still images: Detector Performance Analysis and a New Structure.***IEEE Transactions on Image Processing*2000,**9:**55â€“68. 10.1109/83.817598Knopp R, Robert A:

**Detection Theory and Digital Watermarking.***Proceedings of SPIE*2000,**3971:**14â€“23.Langelaar G, Setyawan I, Lagendijk R:

**Watermarking digital image and video data: a state-of-art overview.***IEEE Signal Processing Magazine*2000,**17:**20â€“46. 10.1109/79.879337LIN ET, DELP EJ:

**A review of data hiding in digital images.***Proceedings of the Image Processing, Image Quality, Image Capture Systems Conference, PICS'99, Savannah, Georgia*274â€“278. April 25â€“28, 1999Mallat S:

**A theory of multiresolution signal decomposition.***IEEE Transactions on Pattern Analysis and Machine Intelligence*1989,**11:**674â€“694. 10.1109/34.192463Memon , Nasir , Wong Ping wah:

**Protecting Digital Media Content.***Communications of the ACM*1998,**35**(8):35â€“43. 10.1145/278476.278485Ohnishi J, Matsui K:

**Embedding a seal into a picture under orthogonal wavelet transform.***Proceeding of International Conference on Multimedia Computing and Systems*1996, 514â€“521.Acharya U Rajendra, Anand Deepthi, Bhat P Subbanna, UC Niranjan:

**Compact storage of medical images with patient information.***IEEE Transactions on Information Technology in Biomedicine*2001,**5**(4):320â€“323. 10.1109/4233.966107Haykins Simon:

*Communication Systems*Wiley Eastern 1996.Swanson MD, Zhu B, Tewfik AH:

**Robst data hiding for images.***Proceedings of the IEEE Digital Signal Processing Workshop, Leon, Norway*1996, 37â€“40.Swanson MD, Zhu B, Tewfik AH:

**Data Hiding for Video in Video.***Proceedings of International Conference on Image Processing (ICIP'97)*1997,**II:**676â€“679.Swanson MD, Zhu B, Tewfik AH:

**Transparent robust image watermarking.***Proceedings of IEEE International Conference on Image Processing*1996,**3:**211â€“214. 10.1109/ICIP.1996.560421Tao B, Dickenson B:

**Adaptive Watermarking in the DCT Domain.***Proceedings of International Conference on Accoustics, Speech and Signal Processing (ICASSP'97), Santa Barbara, California*1997,**4:**676â€“679.Tokur Y, Ercelebi E:

**Wavelet-Based Digital Image Watermarking for Copyright Protection.***IJCI Proceedings of International XII, Turkish Symposium on Artificial Intelligence and Neural Networks*2003,**1**(1):47â€“49.

## Author information

### Authors and Affiliations

### Corresponding author

## Authorsâ€™ original submitted files for images

Below are the links to the authorsâ€™ original submitted files for images.

## Rights and permissions

## About this article

### Cite this article

Nayak, J., Bhat, P.S., Acharya U, R. *et al.* Simultaneous storage of medical images in the spatial and frequency domain: A comparative study.
*BioMed Eng OnLine* **3**, 17 (2004). https://doi.org/10.1186/1475-925X-3-17

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/1475-925X-3-17