# RGB Medical Video Compression Using Geometric Wavelet and SPIHT Coding

Yassine Habchi, Mohammed Beladgham, Abdelmalik Taleb-Ahmed

► To cite this version:

Yassine Habchi, Mohammed Beladgham, Abdelmalik Taleb-Ahmed. RGB Medical Video Compression Using Geometric Wavelet and SPIHT Coding. International Journal of Electrical and Computer Engineering, 2016, 6 (4), pp.1627-1636. 10.11591/ijece.v6i4.pp1627-1636. hal-03426987

HAL Id: hal-03426987

https://uphf.hal.science/hal-03426987

Submitted on 18 May 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution - ShareAlike 4.0 International License
<figure><img src="image_2.png" /></figure>

# RGB Medical Video Compression Using Geometric Wavelet and SPIHT Coding

Habchi Yassine<fnref n="1" />, Beladgham Mohammed<fnref n="1" />, Taleb Abdelmalik Ahmed<fnref n="2" />

**Article Info**

**Article history:**

Received Feb 24, 2016

Revised May 26, 2016

Accepted Jun 10, 2016

**Keyword:**

Geometric wavelet

Medical video coding

SPIHT coder

**ABSTRACT**

The compression of medical video represents a big challenge. It gets indispensable solution in field of storage and transmission of medical data. This paper introduces an algorithm for color medical video compression based on geometrical wavelet coupled with SPIHT coding algorithm. In order to prove the efficiency of our algorithm, comparative study is made between other classical transforms. The peak signal- noise Rate (PSNR), it used as an objective parameter to measure the quality of recovred frames. The experimental results show that the proposed algorithm for low bit rate is superior to traditional methods; this is justified with a high valus of PSNR parameter.

Copyright © 2016 Institute of Advanced Engineering and Science.
All rights reserved.

**Corresponding Author:**

Yassine Habchi,

Department of Electrical Engineering, LTIT Laboratory,

Tahri Mohammed University of Bechar,

P.O.Box 417, 08000, Bechar, Algeria.

Email: habchi8jijel@gmail.com

## 1. INTRODUCTION

With the important increasing volumes of data in the field of medical imaging, compression is the major challenges in healthcare services. In telehealth, Magnetic Resonance Imaging (MRI), Ultrasound (US), Computed Tomography (CT), etc need to be transmitted to another medical expert. These huge data cause a high time transmission and storage cost. The problem becomes even more critical with the generalisation of 3D sequence. So it is necessary to use compression in order to reduce the amount of medical data to be stored and transmitted. In the literature many compression schemes by transformation have been proposed, we can cite the standards MPEG for compressing video. All of these standards are based on the discrete cosine transform (DCT) [1].

Over the past ten years, the wavelets (DWT) compression has significantly better performance in terms of objective and subjective parameters at low bit rate. To improve the coding efficiency, this transform is suitable to horizontal vertical and diagonal directions. These characteristics permit a higher coding efficiency in isotropic regularity along various curves. Unfortunately, these separately basis present discontinuities in all recovered frames. In fact, the degradation of quality visual increases tremendously. Several rigorous transforms have been developed and exploit to encapsulate anisotropic regularity in frames. In [2] CANDES and DONOHO introduced ridgelet transform as multidimensional extension of the wavelet transform. In1999, CANDES and DONOHO introduced curvelet transform [3]. In [4] and [5] DO and VETTER have proposed contourlet transform. All these representations are used to exploit the geometric regularity but do not allow to exploit completely. To overcome these limitations, PENNEC and MALLAT introduced geometric wavelet to represent differentes regularity [6] and [7].

<footnote n="1">¹ Department of Electrical Engineering, LTIT Laboratory, Tahri Mohammed University of Bechar, Bechar, Algeria</footnote>

<footnote n="2">² LAMIH UMR CNRS 8530, Le Mont Houy, 59313 Valenciennes, France</footnote>
<figure><img src="image_3.png" /></figure>

To improve the quality of frames in video at high compression rate, several coders have been proposed and reported in the literature. The effectiveness of coding was first demonstrated by Shapiro's Embedded Zero-tree Wavelet (EZW) [8]. Later, research by Said and Pearlman on Set Partitioning in Hierarchical Trees encoder (SPIHT) [9]. SPIHT applied successfully to both lossy and lossless compression of image and improved upon EZW. This paper is organized as follows: Section 2 describes the geometric wavelet. SPIHT coder is discussed in section 3. Section 4 describes steps of proposed algorithm. The performance and the experimental results are shown in section 5. Finally, a conclusion sums up the findings of paper.

## 2. GEOMETRIC WAVELET

Over the past decades, there has been abundant interest on X_Lets family for the compression of image. Pennec and Mallat have proven that geometric wavelet has non separable basis, unlike the wavelet transform, this advantage is very important in many domains. The wavelet bases generates a redundancy, this is translated in the presence of high-magnitude coefficients in the singularities of the image [10]. To maintain the regularity of the frame, each frame is decomposed through wavelet transform. After decomposition we obtain four spatial frequency subbands. The subbands are given as:

$$a_j(x, y) = \langle f(x, y), \phi_j(x) \phi_j(y) \rangle$$

$$d_j^H(x, y) = \langle f(x, y), \psi_j(x) \phi_j(y) \rangle$$

(1)

$$d_j^V(x, y) = \langle f(x, y), \phi_j(x) \psi_j(y) \rangle$$

$$d_j^D(x, y) = \langle f(x, y), \psi_j(x) \psi_j(y) \rangle$$

where

$j$: represent the scale factor.

$\phi_j(x, y)$: scaling function.

$\psi_j(x, y)$: wavelet function.

Due to the redundancy of transform, we can partition each subbands into several blocks with different size to take a best segmentation of each scale. We present the support of the blocks as $S$, and it is divided into small several sub-regions. Such segmentation is represented as quad-tree. The local directions in which frames have regular variations are shown by geometric flow. The relationship between the geometric flow and curve in each region of blocks can be gotten by Equation 2 [11].

$$\tau(x) = \frac{1}{\sqrt{1 + |c'(x)|^2}} \binom{1}{c'(x)}$$

(2)

$c'(x)$: Slope of optical flow.

The optimal geometric flows of each block are determined by minimizing a Lagrange cost

$$L(f, R) = \|f - f_R\|^2 + \frac{3}{28} Q^2 \sum_j (R_{sj} + R_{Gj} + R_{Bj})$$

(3)

To optimize algorithm of quad-tree segmentation, Peyre and Mallat proposed to build the best quad-tree segmentation, this corresponding to minimize the Lagrangian cost of combing the four children together. For a $L \times L$ block $S$, denote its four children as $(s_1, s_2, s_3, s_4)$, the Lagrange cost of combing the four children together is:

$$\tilde{L}(s) = L_0(s_1) + L_0(s_2) + L_0(s_3) + L_0(s_4) + L_0(s) + \frac{3}{28} Q^2$$

(4)
If there is no geometric flow in that macro-block, it means that the macro-block is regular uniformly so we can use wavelet basis. Otherwise, the sub-block must be processed by geometric wavelet basis by applying the warp operation, which is defined in [12].

Each image of sequence is compressed by coding of segmentation of image and a geometric flow in each region of the segmentation. After quantization, the coefficients are coded. The total number of bits *R* is decomposed into

$$R = R_j = \sum (R_{js} + R_{jG} + R_{jB}),$$

where

*R*<sub>s</sub> is the number of bits to code the dyadic square segmentation.

*R*<sub>G</sub> is the number of bits to code the direction in each square region

*R*<sub>B</sub> is the number of bits to code the quantized geometric wavelet coefficients.

The wavelet coefficients are products between function *f*(*x*, *y*) and basis of discrete separable wavelet.

$$\left\{ \begin{matrix} \phi_{j,n_1}(x) \psi_{j,n_2}(y), \\ \psi_{j,n_1}(x) \phi_{j,n_2}(y), \\ \psi_{j,n_1}(x) \psi_{j,n_2}(y) \end{matrix} \right\} \qquad (5)$$

Separable wavelets are warped with an operator *W* along flow lines, defined as

*W*(*f*(*x*, *y*) = *f*(*x*, *y* − *c*(*x*)) for the vertical parallel flow. The *W* is an orthogonal operator, its adjoint is equal to its inverse, *W*\**f*(*x*, *y*) = *W*<sup>-1</sup>*f*(*x*, *y*)*f*(*x*, *y* − *c*(*x*)) . The warped wavelet basis is obtained by *W*<sup>-1</sup> to each separable wavelet basis.

$$\left\{ \begin{matrix} \phi_{j,n}(x) \psi_{j,n_2}(y-c(x)) \\ \psi_{j,n}(x) \phi_{j,n_2}(y-c(x)) \\ \psi_{j,n}(x) \psi_{j,n_2}(y-c(x)) \end{matrix} \right\} = \left\{ \begin{matrix} \psi_{j,n}^H \\ \psi_{j,n}^Y \\ \psi_{j,n}^D \end{matrix} \right\} \qquad (6)$$

After *W* operation of wavelet basis, the next step is a bandeletization to construct geometric wavelet. The *ψ*(*x*, *y*) consists of high-pass filters and has vanishing moments at lower resolutions, this is valid for *ψ*<sup>V</sup><sub>j,n</sub> and *ψ*<sup>D</sup><sub>j,n</sub>, but not for *ψ*<sup>H</sup><sub>j,n</sub>. Problem of regularity along the flow line is due to the scaling function *φ*(*x*, *y*) where it consists of low-pass filters and does not have vanishing moment at lower resolutions. To take advantage of regularity along the flow lines for *ψ*<sup>H</sup><sub>j,n</sub>, the deformed wavelet basis is bandeletization by replacing the horizontal wavelet *ψ*<sup>H</sup><sub>j,n</sub> with new functions

$$\psi_{j,n}(x) \psi_{j,n}(y-c(x)) \qquad (7)$$

The orthonormal basis of geometric wavelet of field warping is defined by:

$$\left\{ \begin{matrix} \psi_{j,n}(x) \psi_{j,n}(y-c(x)) \\ \psi_{j,n}(x) \phi_{j,n}(y-c(x)) \\ \psi_{j,n}(x) \psi_{j,n}(y-c(x)) \end{matrix} \right\} = \left\{ \begin{matrix} \psi_{j,n}^H \\ \psi_{j,n}^Y \\ \psi_{j,n}^D \end{matrix} \right\} \qquad (8)$$
<figure><img src="image_4.png" /></figure>

After warping, the warped region is regular along the vertical or horizontal (same previous operations) direction. The bandeletization removes the correlation that exists between wavelet coefficients near the singularity. Lastly, the resulting of geometric wavelet coefficients are computed from warped wavelets with 1D discrete wavelet transform than are encoded using subband coder. The full detailed descriptions of the geometric wavelet are shown in Figure 1.

<figure><img src="image_5.png" /><figcaption>Figure 1. Block diagram of geometric wavelet for medical video encoding</figcaption></figure>

### 3. REVIEW OF SET PARTITIONING IN HIERARCHICAL TREES

SPIHT [13] is considered to be one of the most popular wavelet image compression algorithms. The success of SPIHT is due to the organisation of wavelet coefficients into the spatial orientation trees. Three types of trees: $D(i, j)$, $O(i, j)$ and $L(i, j)$, with root at coordinate $(i, j)$, are used to hold wavelet coefficients as sets: $O(i, j)$ is a special case of $D(i, j)$, and $L(i, j)=D(i, j)-O(i, j)$. All coefficients are organised in three lists: LIP (List of insignificant Pixels). LIS (List of Insignificant Sets). LSP (List of Significant Pixels).

During initialisation, the coefficients in high frequency subband are put on the $D(i, j)$ types of trees in LIS, with roots $(i, j)$ at the coarsest subband and leaves on the finest subband; other coefficients are out in the LIP; the initial LSP is empty. Then bit plane coding is transmitted by sorting and refinement passes. In sorting pass, the coefficients in LIP are scanned and coded individually, and significant coefficients are moved to LSP; the trees in LIS are scanned and coded, and significant trees are partitioned in subtrees and / or individual coefficients, which are put to LIS, LIP and LSP respectively. In refinement pass, coefficients in LSP are scanned and coded.

<figure><img src="image_6.png" /><figcaption>Figure 2. Block diagram of generic binary of SPIHT encoder</figcaption></figure>
## 4. PROPOSED ALGORITHM

The proposed algorithm to encode medical frames developed as follows:

* Step 1: Input the color medical sequences of size 512x512.

* Step 2: Decompose the each input Y, Cb and Cr frame through 2D DWT.

* Step 3: The Y, Cb and Cr of each frame of sequences are recursively segmented into dyadic squares.

* Step 4: Geometric flow is constructed in square for each Y, Cb and Cr.

* Step 5: The wavelets basis is warped along geometric flow.

* Step 6: The bandeletization operation is applied to the warped wavelet basis.

* Step 7: The SPIHT coder is used to encode geometric wavelet coefficients.

* Step 8: Collect all layers in one matrix Ycbcr.

* Step 9: The resulting sequence qualities are measured in terms of PSNR (dB) parameter.

<figure><img src="image_7.png" /><figcaption>Figure 3. Proposed block diagram for color medical video compression</figcaption></figure>

## 5. RESULTS AND ANALYSIS

In this paper, we are interested in lossy compression methods based on geometrical wavelet because their important role in capturing anisotropic regularity along various curves. The proposed algorithm was applied to encode test natural sequences (FOREMAN, AKIYO) and medical sequences (ENDOSCOPY, BACTERIA-GROWTH) of size 512x512, these natural and medical video are taken from database [14] and [15]. For the purpose of evaluation, the classical methods (discret wavelet transform (DWT) [16] and discret curvelet transform (DCuT)) [17] has been used. The importance of our work lies in the possibility of reducing the bit-rates for which the video quality remains acceptable. The efficiency of the proposed algorithm is evaluated according to the objective parameters. In general, a higher Peak-Signal-to-Noise-Ratio (PSNR) value should correlate to a higher quality frame.

$$PSNR = 10 \log_{10} \left( \frac{255^2}{\frac{1}{N^2} \sum_{i=0}^{N-1} \sum_{j=0}^{N-1} (C_{ij} - R_{ij})^2} \right) \quad (9)$$

Where:

* N : Size parameter.

* i, j : Position information.

* C_{ij} : Current frame.

* R_{ij} : Reference frame.

Figure 4 shown below illustrates the compressed results for different bit-rate values. To show the performance of the proposed method (geometric wavelet coupled with SPIHT coder), we suggest to applied to a set of natural and medical video. We note that our algorithm is adapted for the medical video
<figure><img src="image_8.png" /></figure>

compression. Also, we can observe that compression degrades for low compression bit-rate. However, for high compression bitrate, our algorithm achive a high value of PSNR (dB).

<figure><img src="image_9.png" /><figcaption>Figure 4. PSNR (dB) values achieved for natural and medical test frames using the proposed methods</figcaption></figure>

To show the performance of the proposed method, we make a comparison between different types of transform DWT, DCUT and GEOMETRIC WAVELET (GW) coupled with the SPIHT. For each application we vary the bit-rate frome (0.3, 0.9 and 2Mbps), and we calculate the PSNR (dB) parameter. The results obtained are given in Table 1. According to the PSNR (dB) values, we note that video reconstruction becomes almost perfect with proposed algorithm for all bitrate values. Also from this results, our experimental results show that the proposed algorithm for low bit rate (0.3Mbps) is able to reduce up to 37.19% and 28.20% of the complex geometrics detection compared to the DWT+SPIHT and DCUT+SPIHT algorithm. The quality visual degradation of frames is less in low bit rate than in high bit rate. Also, we can see that the PSNR (dB) value depend on the decomposition thresholds (T) as it shown in F

Figure 5. The quality visual of decompressed frames (for first, tenth, twentieth and thirtieth frame) using algorithm of GEOMETRIC WAVELET-SPIHT at 2Mbps are shown in Figure 6.

<table><caption>Table 1. The PSNR (dB) values of reconstructed BACTERIA GROWTH sequence for various bitrate values using WAVELET-SPIHT, CURVELET-SPIHT and GEOMETRIC WAVELET-SPIHT</caption><thead><tr><td>BITRATE (Mbps)</td><td>WAVELET-SPIHT</td><td>CURVELET-SPIHT</td><td>PROPOSED ALGORITHM</td></tr></thead><tbody><tr><td>0.3</td><td>24.6947</td><td>26.4254</td><td>33.8799</td></tr><tr><td>0.9</td><td>24.5830</td><td>26.7219</td><td>35.9627</td></tr><tr><td>2</td><td>30.4890</td><td>30.9402</td><td>36.3323</td></tr></tbody></table>
<figure><img src="image_10.png" /><figcaption>Figure 5. PSNR (dB) values of reconstructed BACTERIA GROWTH sequence vs thresholds (T=10, 30, 50 and 100) using proposed method</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Figure 6. Visual quality of decompressed BACTERIA GROWTH frames using GEOMETRIC WAVELET-SPIHT at 2Mbps for first, tenth, twentieth and thirtieth frame: (a).Original frames; (b).Decompressed frames</figcaption></figure>

Before applying proposed algorithm on the color video, the RGB color frames are converted into YCbCr form, and then applying proposed algorithm on each layer independently, this means each layer from YCbCr are compressed as a grayscale frame. YCbCr refers to the color resolution of digital component video signals, which is based on sampling rates. This process is repeated for every frame and resolution in the case of level 5 decompositions. RGB color and YCbCr form of recovered frames including natural and medical frames by the proposed method are presented in Figure 8. Recovered BACTERIA GROWTH sequences yielded by using GEOMETRIC WAVELET+SPIHT, DCUT+SPIHT and DWT+SPIHT are shown in Figure 9.

<figure><img src="image_12.png" /><figcaption>Figure 7. Video compression steps using Geometric Wavelet transform coupled with SPIHT</figcaption></figure>
<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /><figcaption>Figure 8. Recovered color frames using proposed algorithm at 0.9Mbps</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>Figure 9. Recovered BACTERIA GROWTH sequence using: (a). GEOMETRIC WAVELET+SPIHT, (b). DCUT+SPIHT and (c). DWT+SPIHT at 0.9Mbps</figcaption></figure>

## 6. CONCLUSION

The objective of this paper is to improve the enhancement of color medical video quality after the application of the proposed algorithm to aid diagnosis (storage or transmission) in medical imaging. We used the geometric wavelet coupled with SPIHT coding. After several applications, we found that this algorithm gives better results than the other traditional algorithms. To develop our algorithm, we have applied this technique on different types of color video. We have noticed that for low bit-rate, the proposed algorithm provides very important PSNR (dB) values for color medical video and it is more suitable for BACTERIA-GROWTH video. In perspective, we aspire to apply our algorithm to compress video sequences with another efficient transforms and coders.

## ACKNOWLEDGEMENTS

We would like to thank the Editor and anonymous reviewers for their comments and suggestions, also we would like to thank the members and the directors of LTIT Laboratory of University of Bechar for their encouragement and for their precious help.

## REFERENCES

[1] V. Chappelier, "Progressive coding of images by directed wavelet," Phd. Thesis, Rennes 1 University, 2005.

[2] E. J. Candes and D. L. Donoho, "Ridgelets: a key to higher-dimensional intermittency Philos.," *Trans. A: Math. Phys. Eng. Sci.*, vol/issue: 357(1760), pp. 2495-2509, 1999.

[3] E. J. Candes and D. L. Donoho, "Curvelets: a surprisingly effective non adaptive representation for objects with
<figure><img src="image_16.png" /></figure>

edges,” in Proceedings of the International Conference Curves and Surfaces, pp. 105–120, 1999.

[4] M. N. Do and M. Vetterli, “Contourlets: a new directional multiresolution image representation,” in Proceedings of the Conference Record 36th Asilomar Conference on Signals Systems and Computers, vol. 1, pp. 497–501, 2002.

[5] M. N. Do, et al., “The contourlet transform: an efficient directional multiresolution image representation,” IEEE Trans. Image Process, vol./issue: 14(12), pp. 2091–2106, 2005.

[6] E. L. Pennec and S. Mallat, “Image compression with geometrical wavelets,” Proc. Int. Conf. Image Process, vol. 1, pp. 661–664, 2000.

[7] E. L. Pennec, et al., “Sparse geometric image representation with bandelets,” IEEE Trans. Image Process, vol./issue: 14(4), pp. 423–438, 2005.

[8] J. M. Shapiro, “Embedded image coding using zerotrees of wavelet coefficients,” IEEE Trans. Signal Process, vol. 41, pp. 3445–3463, 1993.

[9] A. Said and W. Pearlman, “A new fast and efficient image codec based on set partitioning in hierarchical trees,” IEEE Trans. Circuits Syst. Video Technol., vol. 6, pp. 243–250, 1996.

[10] S. Mallat, “A Wavelet Tour of Signal Processing: A Sparse Way,” Academic Press, 3rd. Edition, Ch. 12, USA, 2009.

[11] E. Lepennec, “Bandelettes et representation géométrique des images,” Doctorat Thesis, Ecole Polytechnique, France, 2002.

[12] M. Beladgham, et al., “A Comparative Study between Bandelet and Wavelet Transform Coupled by EZW and SPIHT Coder for Image Compression,” IJIGSP, vol./issue: 5(12), 2013.

[13] A. Said and W. Pearlman, “A new fast and efficient image codec based on set partitioning in hierarchical trees,” IEEE Trans. Circuits Syst. Video Technol., vol. 6, pp. 243–250, 1996.

[14] Internet: https://media.xiph.org/video/derf/ (Dec.10.2012).

[15] Internet: https://medtube.net/ (Nov.1.2013).

[16] A. Hazarathaiah and B. P. Rao, “Medical Image Compression using Lifting based New Wavelet Transforms,” International Journal of Electrical and Computer Engineering (IJECE), vol./issue: 4(5), pp. 741–750, 2014.

[17] C. J. Renoh, et al., “Curvelet Transform based Retinal Image Analysis,” International Journal of Electrical and Computer Engineering (IJECE), vol./issue: 3(3), pp. 366–371, 2013.

## BIOGRAPHIES OF AUTHORS

<figure><img src="image_17.png" /></figure>

Yassine HABCHI was born in Mechria, Algeria. He received the dipl. El-Ing from the University of Saïda University, Algeria, in 2010, the Magistere degree in digital communication and signal processing from University of Bechar, Algeria. in 2013. Actuelly, he prepare the doctoral degree Esscience at University of Bechar, Algeria. His main interested are Image and video processing, 1stG and 2ndG wavelets transform and optimal encoder. Correspondence address: Bechar University, Department of Electronic, Bechar, Algeria, E-mail: habchi8article@gmail.com

<figure><img src="image_18.png" /></figure>

Mohammed BELADGHAM was born in Tlemcen, Algeria; he received the electrical engineering diploma from university of Tlemcen, Algeria, and then a Magister in signals and systems from University of Tlemcen, Algeria and the PhD. degree in Electronics from the University of Tlemcen (Algeria), in 2012. His research interests are Image processing, Medical image compression, wavelets transform and optimal encoder. Correspondence address: Bechar University, Department of Electrical Engineering, Bechar, Algeria, E-mail: beladgham.tlm@gmail.com

<figure><img src="image_19.png" /></figure>

Abdelmalik TALEB-AHMED was born in Roubaix, France, in 1962. He received a post graduate degree and a Ph. D. in Electronics and Microwaves from the University of Lille1 in 1988 and 1992. From 1992 to 2004, He was an Associate Professor at the University of Littoral, Calais. Since 2004, He is currently a Professor at the University of Valenciennes in the department GE2I, and does his research at the LAMIH FRE CNRS 3304 UVHC, His research interests includes signal and image processing. Image segmentation, Prior knowledge integration in image analysis, Partial Differential Equations and Variational Methods in image analysis, Image compression, Multimodal signal processing, Medical image analysis, including multimodal image registration, etc. Correspondence address: Lamih Umr-Cnrs 8530 Valenciennes Mont-Houy University 59313, Valenciennes, France. E-mail: taleb@univ-valenciennes.fr