Comparison study of EMG signals compression by methods transform using vector quantization, SPIHT and arithmetic coding
 Eloundou Pascal Ntsama^{1}Email author,
 Welba Colince^{2} and
 Pierre Ele^{3, 4}
Received: 24 September 2015
Accepted: 4 April 2016
Published: 12 April 2016
Abstract
In this article, we make a comparative study for a new approach compression between discrete cosine transform (DCT) and discrete wavelet transform (DWT). We seek the transform proper to vector quantization to compress the EMG signals. To do this, we initially associated vector quantization and DCT, then vector quantization and DWT. The coding phase is made by the SPIHT coding (set partitioning in hierarchical trees coding) associated with the arithmetic coding. The method is demonstrated and evaluated on actual EMG data. Objective performance evaluations metrics are presented: compression factor, percentage root mean square difference and signal to noise ratio. The results show that method based on the DWT is more efficient than the method based on the DCT.
Keywords
Compression EMG DWT DCT Vector quantization SPIHT Arithmetic codingIntroduction
Electromyography has a great important in pathological diagnostic, of patients suffering of neuromuscular disorders and for the prevention of premature births; well many data are recorded and stored in the hospitals. These data can be sent to another health center for diagnosis by a specialist; and thus arises the problem of storage and transmission. With the development of telemedicine, the storage problem and transmission of biomedical signals has become a top priority. Compression is an alternative to solve this problem. In the literature, we have two types of compression: lossless compression that gives a good signal reconstruction but which hardly yields high compression ratio and lossy compression which often includes quantification stage to improve the compression ratio. Compression of EMG signals already been the subject of some work and we have the development of new techniques and compression formats. According to the works of Sana and Kaïs (2009) a recording of an electrocardiogram (ECG) per day at a resolution of 12 bits/sample requires to average of over 100 megabytes of memory. These numbers far exceed the capabilities of traditional systems of storage and transmission. The literature of EMG signals compression (especially surface EMG) echoes several techniques and methods. The compression of EMG signals using the Embedded Zero Tree Wavelet has been studied with compression Factor in the range 60–95 % by Norris et al. (2001). The algorithms for EMG signal compression using wavelet transform, and a scheme for the dynamic allocation of the bits that represent wavelet coefficients have been proposed by Berger et al. (2006, 2007). In the works of Carotti et al. (2005), we have the EMG signal compression technique based on autoregressive (AR) modeling. This technique provides a high compression factor (over 97 %) but it is not applicable if the shape of the signal waveform has to be preserved after compression. Discrete wavelet packet transform with optimization of the mother wavelet and wavelet packet basis were used for compression of biomedical signals (Brechet et al. 2007). The same year, Jain and Vig (2007) proposed EMG compression method based on vector quantization combined with wavelets. The year 2008 was marked by the work of Paiva et al. (2008) who proposed adaptive EMG compression using optimization wavelet filters. The work of Filho et al. (2008) adopted the multiscale multidimensional parser algorithm. The works of Carotti et al. (2008) and Marcus et al. (2009) applied to the EMG signals, techniques for image compression and gets a compression factor of the order of 80 % with a PRD from 3.82 to 4.43 %. In the more recent work of literature, we can found the works of Trabuco et al. (2013), such as “Compression of EMG signals by Transforms and Spectral Profile for BitAllocation” and “SEMG signal compression based on domain transformation and spectral shape dynamic bit allocation” (Trabuco et al. 2014). In this paper, we make a comparative study between DCT and DWT for compression of EMG signals, using vector quantization which are associated SPIHT coding and arithmetic coding. In this work, lossy compression is exploited. We propose a new algorithm for the EMG signal compression. The performances of this method under study are determined by the PRD, signal to noise ratio, the compression factor and the subjective criteria.
Background
These compression systems concern lossy compression methods; that exploit at best the redundancy in the signal. Most of these compression systems are using transformed methods, which allow switching from spatial domain to a transform domain where the coefficients are low correlation. This step is carried out by a mathematical transformation followed by quantization step. The final step of these systems is entropy coding which produces the bit stream representing the compressed data.
Two transforms were used by the new compression approach proposed: the discrete cosine transform and the discrete wavelet transform. These transforms are used at the decorrelation. The decorrelation extracts the relevant signal information and reduces redundancy in the signal. Most decorrelators are based on reversible transformation. The principle of these decorrelators, consist to focus the information on a small number of values, the other being near zero.
The purpose of processing is to project the signal on a basis function whose properties are adapted to the nature and characteristics of signal to be analyzed. The projection is orthogonal in order to guarantee a decorrelation of obtained coefficients (Gaudeau 2006).
Theory of wavelet transform and discrete cosine transform
The wavelet function must check the eligibility requirement:
Here, the EMG signal is converted into a twodimensional signal to undergo the image decomposition into subbands with different filters (low pass h and high pass g). This requires the use of a separable twodimensional DWT (lines + columns). The input image is decomposed each time into four subimages (Image approximated, horizontal detail, vertical detail and diagonal detail) with different lowpass filters and high pass. Reconstruction will be done using quadrature mirror filters, represented by their impulse responses (h and g).
The discrete cosine transform is an orthogonal linear transformation. It is considered a simplified version of the discrete Fourier transform. The transform coefficients are not complex, but real; which is advantageous for the coding and quantization.
The compression method of the EMG signal is based on the twodimensional discrete cosine transform. The 2D DCT is of great interest that has already shown its effectiveness. It is widely used and popular for image coding, as shown its adoption by the JPEG international standard for still image compression.
Quantization and coding
To quantify the coefficients from the decorrelation, vector quantization has been exploited.
A codebook plays an important role in Vector Quantization, which consists of collection of code vectors. The literature presents many algorithms for generating the codebook: Linde, Buzo and Gray (LBG) (Jain and Vig 2007; Shaou et al. 2002; Gronfors and Paivinen 2005; Gronfors et al. 2006), KMeans, Kohonen and the learning algorithm to competition (AC). In this article, we use the algorithm of Kmeans. The codebook size used is a power of 2. In our work, we tested the size of codebook \(2^{5} , 2^{6} , 2^{7} , 2^{8}\) on EMG signals. All these codebooks tested, only the codebook size \(2^{5}\) presented a faithful reconstruction of the EMG signals.

good performance;

if the product bit stream is interrupted or truncated, the reconstruction of the image is partially possible.
SPIHT is based on a partial ordering by amplitude via a sorting algorithm of partitions, and exploiting similarity present at different levels of the image wavelet transform.
The Arithmetic coding allows, from the probability of occurrence of the symbols of a source to create a single code word that is associated with a sequence of arbitrary length symbols. This differs from the Huffman encoding that assigns code words to variable lengths to each source symbol. The associated code with a sequence is a real number in the interval [0, 1]. This code is built by recursive subdivision of intervals. A range is divided for each new symbol belonging to the sequence. Is obtained, ultimately, a subinterval of the interval [0, 1] such that every real number belonging to this interval represents the sequence to coded. The arithmetic coding principle can be found in Witten et al. (1987).
Compression approach method
It is composed of a preprocessing block, a decorrelation block, of the vector quantization, a SPIHT coding block and followed by another arithmetic coding block.
The first function used is a separating wavelet whose purpose is to divide the EMG signal into two sub signals. These two sub signals correspond to samples of even indexes and odd indexes. The oversampling of the difference of even and odd index is associated with the even index samples. This step can be regarded as a subsampling of input signal and allows us to remove correlation on EMG signal. The operation is done on a part of the input signal. This is to reduce redundancy.
The resulting signal is converted into a 2D signal. For the transformation of EMG signal coefficients in two dimensions, the work of Marcus et al. (2009), Costa et al. (2009), Ntsama et al. (2013) have been exploited, where the coefficients of the EMG signal is divided in M _{ i } sequences multiple of 128, then align each after other and completed with zeros if necessary. The objective is to achieve a 2D matrix. The twodimensional EMG signal coefficients obtained is divided into 32 × 32 block, in order to reduce noise and errors over a large portion of the signal. The 2D DWT and 2D DCT are used at the decorrelation. We have two compression schemes. Namely: a compression scheme with 2D DWT and another compression scheme with 2D DCT. The different coefficients from the decorrelation are quantified by a vector quantization. The quantized coefficients are encoded doubling by the SPIHT coding and arithmetic coding. This way of proceeding allows increasing the compression ratio.
Performance parameters used to evaluate compression
EMG signals were collected from the biceps muscle of 4 male subjects (Age: 23–28 years). All subjects were placed in an isometric brace and the forearm was fixed at 90°, maintaining 60 % of their maximum voluntary contraction. All signals were sampled at 2048 Hz, quantized with 12 bits. The EMG signals were amplified (−3 dB, bandwidth: 5–512 H) with a gain of 2000. The duration of the signals varies from 3 to 5 min. Four EMG signals called Kheir1, Kheir2, Jouve3 and EMG_Healthy were used. In the quantization phase, and to find the optimal size of the codebook, we tested each codebooks previously built on the four EMG signals. It emerges from this experiment that the size 25 of the codebook gives a good EMG signal reconstruction. However, the second experiment consisted in looking for a codebook able to encode and decode all four signals effectively. It occurs that the codebook built with the EMG_Healthy signal is able to reconstruct “faithfully” the four EMG signals.
Results
Obtained results for Kheir1 (with DCT)
CF (%)  PRD (%)  SNR (dB) 

87.35  3.22  29.84 
81.15  1.30  37.72 
74.85  0.59  44.46 
68.55  0.30  50.19 
62.15  0.16  55.68 
55.76  0.08  61.55 
49.36  0.042  67.36 
43.07  0.02  73.74 
36.71  0.01  79.42 
11.42  0.0006  103.65 
Obtained results for Kheir2 (with DCT)
CF (%)  PRD (%)  SNR (dB) 

87.20  3.01  30.43 
80.95  1.28  37.86 
74.80  0.59  44.61 
68.31  0.30  50.34 
61.86  0.16  55.94 
55.51  0.08  61.82 
49.21  0.04  67.41 
42.87  0.02  73.62 
36.47  0.01  79.50 
11.23  0.0006  103.52 
Obtained results for Jouve3 (with DCT)
CF (%)  PRD (%)  SNR (dB) 

87.35  1.30  37.71 
81.20  0.42  47.51 
75.04  0.2  53.93 
68.60  0.10  59.67 
62.25  0.04  65.32 
55.71  0.026  71.46 
49.41  0.013  77.20 
43.01  0.0066  83.55 
36.71  0.0033  89.53 
11.32  0.0002  113.22 
Obtained results for Kheir1 (with DWT)
CF (%)  PRD (%)  SNR (dB) 

86.23  1.45  36.80 
80.02  0.71  43.00 
73.77  0.38  48.42 
67.52  0.20  54.01 
61.23  0.10  59.89 
54.88  0.051  65.80 
48.53  0.02  71.86 
42.23  0.012  77.80 
35.93  0.0061  84.16 
10.74  0.0003  108.11 
Obtained results for Kheir2 (with DWT)
CF (%)  PRD (%)  SNR (dB) 

86.08  1.58  36.02 
79.83  0.77  42.31 
73.63  0.41  47.79 
67.43  0.21  53.49 
61.13  0.11  59.37 
54.88  0.05  65.46 
48.53  0.02  71.56 
42.23  0.01  77.40 
35.92  0.006  83.63 
10.74  0.0004  107.80 
Obtained results for Jouve3 (with DWT)
CF (%)  PRD (%)  SNR (dB) 

86.13  0.4  47.85 
79.98  0.18  54.61 
73.82  0.10  59.72 
67.48  0.052  65.62 
61.18  0.027  71.27 
54.88  0.013  77.41 
48.58  0.0069  83.16 
42.23  0.0034  89.13 
35.93  0.0016  95.45 
10.79  0.0001  119.57 
Comparison of the results (CF, PRD)
Compression factor (%)  70  75  80  85 

Norris et al. (2001) for Kheir1  3.90  4.12  5.20  8.02 
Berger et al. (2006) for Kheir1  2.57  2.63  3.85  7.01 
Berger et al. (2007) for Kheir1  1.79  1.80  2.24  3.13 
Filho et al. (2008) for Kheir1  1.21  1.75  2.64  4.18 
Trabuco et al. (2014) for Kheir1  
DEA  –  –  3.83  4.82 
DLA  2.00  2.29  2.91  4.40 
DSR  1.90  2.05  2.39  3.58 
RHT  1.85  2.10  2.22  3.31 
Proposed method  
Kheir1  
DCT  0.30  0.59  1.30  3.22 
DWT  0.20  0.38  0.71  1.45 
Kheir2  
DCT  0.30  0.59  1.28  3.01 
DWT  0.21  0.41  0.77  1.58 
Jouve3  
DCT  0.10  0.2  0.42  1.30 
DWT  0.05  0.10  0.18  0.4 
Discussion
The two compression approach methods using DCT and DWT have been implemented. The aim in this article is finding the best transform (DWT or DCT) which is adapted to vector quantization to compress the EMG signals for our new compression approach. About Fig. 4, it appears that PRD increases with compression factor while SNR decreases. Reconstruction quality is good if the PRD is close to zero. This figure shows that wavelet transform whatever the EMG signal, produces an error rate (PRD) maximum of 1.60 %, whereas the discrete cosine transform gives maximum PRD of about 3.4 %.
From Fig. 5, the method by discrete wavelet transform is found to be more efficient than the method through discrete cosine transform.
About Table 1, 2, 3, 4, 5 and 6, we note that the discrete cosine transform gives a compression factor slightly above the discrete wavelet transform. However, the discrete wavelet transform gives smaller PRD. Table 7 shows the comparison of our method and other methods in the literature. We note that, the proposed algorithms give the smaller PRD. We can conclude that, our algorithms provide an improvement in terms of PRD.
About the Figs. 6, 7, 8, 9, 10 and 11, we note that, each figure shows the superposition of the original signal and the reconstructed signal for a better assessment of the power of reconstruction of EMG signals by our algorithm. Then the original signal, reconstructed signal and error between original signal and reconstructed signal are represented. The reconstruction of different EMG signals is represented at compression factor of about 74 % for the discrete wavelet transform and the order of 75 % for the discrete cosine transform. But according to the reconstruction error rate, the wavelet transform keep the lowest error rate.
In telemedicine, the challenge is to have higher compression factor while providing a faithful reconstruction (very small error rate) and avoid any deterioration which may cause a fatal error during the diagnosis of the patient (Istepanian and Petrosian 2000).
Although the discrete cosine transform has brought good results, it is less adequate to compress EMG signals by vector quantization compared to the discrete wavelet transform. About this, we note that the discrete wavelet transform is better suited for compression of EMG by vector quantization.
Conclusion
In this article, we showed that despite of the good results provided by the discrete cosine transform, it is less suitable for compression of EMG by vector quantization compared to the discrete wavelet transform. The wavelet transform remains appropriate for compression of EMG by vector quantization. This laborious demonstration joined the work of Sana and Kaïs (2009) and Guerrero and Mailhes (1997) which also concluded that the compression method through discrete wavelet transform is found to be significantly better than transform discrete cosine. The proposed algorithms for different signals ensured acceptable quality and also the considerable information retention after reconstruction (CF, PRD and visual observation). In this work we have oriented our choice on vector quantization on Kmeans algorithm. It would be wise to use other algorithms of vector quantization combined with wavelet transform.
Declarations
Authors’ contributions
NEP, WC and PE have made contributions for this study. NEP and WC worked with algorithm implementation, improvement and evaluation. NEP and PE participated in the acquisition of EMG signals. All authors participated in the analysis and interpretation of EMG signals. All authors read and approved the final manuscript.
Acknowledgements
The authors are grateful to the volunteers of their participation.
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Allen VA, Bellian J (1993) Subband coding of the discrete cosine transform in ECG compression. In: Proceedings of the 15th annual international conference IEEE engineering medicine biology society, pp 790–791Google Scholar
 Berger PA, Nascimento FAO, Carmo JC, Rocha AF (2006) Compression of EMG signals with wavelet transform and artificial neural networks. Physiol Meas 27(6):457–465View ArticleGoogle Scholar
 Berger PA, Nascimento FAO, Rocha AF, Carvalho JLA (2007) A new waveletbased algorithm for compression of EMG signals. In: Proceedings of the 29th annual international conference of the IEEE engineering in medicine and biology society, Lyon, pp 1554–1557Google Scholar
 Brechet L, Lucas MF, Doncarli C, Farina D (2007) Compression of biomedical signals with mother wavelet optimization and bestbasis wavelet packet selection. IEEE Trans Biomed Eng 54(12):2186–2192View ArticleGoogle Scholar
 Carotti ESG, De Martin JC, Farina D, Merletti R (2005) Linear predictive coding of myoelectric signals. In: Acoustics, speech and signal processing, ICASSP’05, IEEE international conference, vol 5, pp 629–632Google Scholar
 Carotti ESG, De Martin JC, Merletti, Roberto, Farina D (2008) Matrixbased linear predictive compression of multichannel surface EMG signals. In: Acoustics, speech and signal processing, ICASSP 2008. IEEE international conference, Las Vegas, pp 493–496Google Scholar
 Costa MVC, Carvalho JLA, Berger PA, Zaghetto A, Da Rocha AF, Nascimento FAO (2009) Twodimensional compression of surface electromyographic signals using columncorrelation sotrting and image encoders. In: Proceedings of the 31st annual international conference of the IEEE engineering in medicine and biology society, Minneapolis, pp 428–431Google Scholar
 Filho EB, Silva Da, Carvalho MB (2008) On EMG signal compression with recurrent patterns. IEEE Trans Biomed Eng 55(7):1920–1923View ArticleGoogle Scholar
 Gaudeau Y (2006) Contributions en compression d’images médicales 3D et d’images naturelles 2D. Thèse de Doctorat de l’Université Henri Poincaré, Nancy 1Google Scholar
 Gronfors TK, Paivinen NS (2005) Comparison of vector quantization methods for medical fidelity preserving lossy compression of EMG signals. In: Computational intelligence for modelling, control and automation, international conference on intelligent agents, Web technologies and internet commerce, international conference, vol 1, pp 1107–1113Google Scholar
 Gronfors T, Reinikainen M, Sihvonen T (2006) Vector quantization as a method for integer EMG signal compression. J Med Eng Technol 30(1):41–52View ArticleGoogle Scholar
 Guerrero AP, Mailhes C (1997) Comparaison de Méthodes de Compression Appliquées aux Electromyogrammes. 16éme Colloque GRETSI, GrenobleGoogle Scholar
 Gutzwiller JL, Hariti M, Barret M, Christophe E, Thiebaut C, Duhamel P (2009) Extension du codeur SPIHT au codage d’images hyperspectrales. In: Colloque CORESA, ToulouseGoogle Scholar
 Istepanian RSH, Petrosian AA (2000) Optimal zonal waveletbased ECG data compression for a mobile telecardiology system. IEEE Trans Info Technol Biomed 4(3):200–211View ArticleGoogle Scholar
 Jain N, Vig R (2007) Wavelet based vector quantization with tree code vectors for EMG Signal compression. In: Proceedings of the 6th WSEAS international conference on signal processing, Dallas, TX, pp 117–124Google Scholar
 Lu Z, Kim DY, Pearlman WA (2000) Wavelet compression of ECG signals by the set partitioning in hierarchical trees algorithm. IEEE Trans Biomed Eng 47(7):849–856View ArticleGoogle Scholar
 Marcus VCC, Joao LAC, Pedro AB, Adson FDR, Francisco AON (2009) Compression of surface electromyographic signals using twodimensional techniques. In: Naik GR (ed) Recent advances in biomedical engineering, InTech October 2009, ISBN: 978953307004, pp 17–38Google Scholar
 Norris JA, Englehart K, Lovely D (2001) Steadystate and dynamic myoelectric signal compression using embedded zerotree wavelets. In: Proceedings of the 23rd annual international conference of the IEEE engineering in medicine biology society, Istanbul, Turkey, vol 2, pp 1879–1882Google Scholar
 Ntsama EP, Ele P, Kabiena IB (2013) Compression approach of EMG signal using 2D discrete wavelet and cosine transforms. Am J Signal Process 3(1):10–16. doi:https://doi.org/10.5923/j.ajsp.20130301.02 Google Scholar
 Paiva JPLM, Kelencz CA, Paiva HM, Galvâo RKH, Magini M (2008) Adaptive wavelet EMG compression based on local optimization of filter banks. Physiol Meas 29(7):843–856View ArticleGoogle Scholar
 Pearlman WA, Kim BJ, Xiong Z (1998) Embedded video subband coding with 3D SPIHT. Chap. 24. In: Topiwala NP (ed) Wavelet image and video compression. Kluwer, Boston, pp 397–432Google Scholar
 Said A, Pearlman WA (1996) A new, fast, and efficient image codec based on set partitioning in hierarchical trees. IEEE Trans Circuits Syst Video Technol 6(3):243–250View ArticleGoogle Scholar
 Sana K, Kaïs O (2009) Comparaison des Méthodes de Compression Appliquées aux Electrocardiogrammes. In: 5th International conference: sciences of electronic, technologies of information and telecommunications, Tunisia, SETITGoogle Scholar
 Shaou GM, Chung YC, Chung L, Yen HL, Lin CL (2002) Wavelet based ECG compression using dynamic vector quantization with tree code vectors in single codebook. IEEE Trans Biomed Eng 49(7):671–680View ArticleGoogle Scholar
 Shapiro JM (1993) Embedded image coding using zerotrees of wavelet coefficients. IEEE Trans Signal Process 14(12):3445–3462. doi: https://doi.org/10.1109/78.258085. ISSN: 1053587X, CODEN: ITPRED
 Tai S, Sun CC, Yan WC (2005) A 2D ECG compression method based on wavelet transform and modified SPIHT. IEEE Trans Biomed Eng 52(6):999–1008View ArticleGoogle Scholar
 Trabuco MH, Costa MVC, Schwartz FP, De O Nascimento FA (2013) Compression of SEMG signals by transforms and spectral profile for bit allocation. In: Health Care Exchanges (PAHCE), 2013 Pan American, Conference, Medellin, Colombia, pp 1–6Google Scholar
 Trabuco MH, Costa MVC, Francisco AON (2014) SEMG signal compression based on domain transformation and spectral shape dynamic bit allocation. Biomed Eng Online 13:22View ArticleGoogle Scholar
 Witten IH, Neal RM, Cleary JG (1987) Arithmetic coding for data compression. Commun ACM 30(6):520–540View ArticleGoogle Scholar