• DCT
• Eliminating some of DCT coefficients
by using a masking vector
• Scalar quantization of the coefficients
First step was to calculate DCT from the original
signal using blocks of 16, 24 or 32 signal
coefficients. In these tests DCT was done by using
MatLab's DCT-function. After that, some of the
coefficients were eliminated by using binary
maskvector. Maskvector is the same size as the used
DCT block size. If maskvector's value in some index
is zero, the value of corresponding index of DCT
block will be eliminated. Otherwise maskvector's
value is one and DCT coefficient in corresponding
index will not be eliminated.
Maskvector is constant during the whole
compression process and the same vector is used
when compression is done and when signal is
decompressed. Before IDCT, receiver adds zeros at
those indexes of DCT block where coefficients have
been eliminated to have correct number of
reconstructed signal coefficients.
In this study, we have used masking to eliminate
high end DCT coefficients. For block size 16
coefficients we masked out last 3, 5 and 7 DCT
coefficients, for block size 24 respectively 4, 8 and
12 DCT coefficients, and for block size 32
respectively 5, 10 and 15.
After masking the selected coefficients, the rest
of coefficients will be scalar quantized. Compression
in this method comes from masking some DCT
coefficients and from scalar quantization.
Decompression is done by finding the DCT
values corresponding to indexes from codebook,
adding zeros to those places of the DCT block where
coefficients have been eliminated and making the
IDCT.
2.4 Scalar Quantization of Coefficients
In this study, non-uniform scalar quantization
method was used to quantize the DCT coefficients.
In a uniform scalar quantization the difference
between every value in codebook is the same,
whereas in a non-uniform scalar quantization the
difference between codebook values depends on the
distribution of coefficients' probabilities. In the
intervals where the probability of that the coefficient
is placed on that interval is large, the difference
between codebook values is short, and where the
probability of coefficient is placed on some interval
is small, the difference between codebook values is
bigger.
Table 1: Raw remaining sizes and mean-squared-errors
(MSE) of compressed signals in percentages by variations.
Codebook size 64 (6 bit)
Segment length 16 samples
Without mask 50% 25.6498
Masking last 3 41% 25.9935
Masking last 5 34% 27.6196
Masking last 7 28% 36.1951
Segment length 24 samples
Without mask 50% 17.0290
Masking last 4 42% 17.2294
Masking last 8 33% 19.0580
Masking last 12 25% 36.3946
Segment length 32 samples
Without mask 50% 19.5787
Masking last 5 42% 19.7208
Masking last 10 34% 20.8712
Masking last 15 27% 31.1169
Codebook size 256 (8 bit)
Segment length 16 samples
Without mask 67% 20.2835
Masking last 3 54% 20.6467
Masking last 5 46% 22.2934
Masking last 7 38% 30.9039
Segment length 24 samples
Without mask 67% 13.6706
Masking last 4 56% 13.8864
Masking last 8 44% 15.7420
Masking last 12 33% 33.1424
Segment length 32 samples
Without mask 67% 18.4853
Masking last 5 56% 18.6404
Masking last 10 46% 19.8118
Masking last 15 35% 30.1023
We constructed the codebooks by using Matlab's
KMEANS function. Before using KMEANS
function, the DCT of the training signal was
calculated using the same DCT block size which
will be used when compressing the test signal.
KMEANS function was given the following
parameters: training signal, which has 50000
samples, replicates 'rep' was 3, which made method
more optimal, maximum number of iterations
'maxiter' was 800 and 'EmptyAction' was 'singleton',
which creates a new cluster consisting of the one
point furthest from its centroid. We tested codebook
sizes 64 and 256. For codebook size 64, it is possible
to present all codebook indexes with 6 bits and
respectively for codebook size 256, indexes are
presented with 8 bits.
VERSATILE EVALUATION OF EFFECTS ON DCT-BASED LOSSY COMPRESSION OF EMG SIGNALS ON
MEDICAL PARAMETERS
151