• Tidak ada hasil yang ditemukan

3.3 Rate- and Distortion-Driven Subband Coding Algorithms

3.3.1 Determination of Coding Parameters

3.3.1.3 Selection of Data Length and Block Length

In ECG compression, different data lengths and block lengths are used for testing and comparison of their performances. To examine the effects of the data lengths and block lengths, a set of analysis is carried out

Table 3.9: Performance of quantization process for records frommita,cuvtandmitsvadatabases.

PRD1 Quantizer resolution,b(bits)

(%) 6 7 8 9 10 11 12

average 5.7645 3.5570 2.0429 1.1194 0.5796 0.2912 0.1463

std 1.4599 0.8874 0.4918 0.2855 0.1530 0.0763 0.0381

max 10.7675 6.2769 3.8149 2.5145 1.4385 0.7291 0.3593

Table 3.10: Performance of the proposed algorithm for different data lengths and block lengths.

Test Compression ratio (CR)

data PRD1 M=4096 samples M=8192 samples M=16384 M=32768 M=65536

(%) N=512 1024 2048 4096 512 1024 2048 4096 8192 16384 32768 65536

100 7.1 7.72±0.80 9.34±0.48 10.81±1.21 12.68 7.65±0.83 9.45±0.41 11.16±0.66 12.62±0.07 13.76 14.69 15.36 15.79 115 5.0 8.20±1.29 10.07±1.01 12.57±0.08 14.05 8.24±0.92 10.06±0.79 12.14±0.84 13.77±1.09 14.96 16.0 17.67 18.01 119 3.51 6.07±0.45 7.95±0.22 10.28±0.10 11.73 5.84±0.5 7.63±0.46 9.73±0.321 10.97±0.05 12.02 14.51 15.07 14.83 cu01 5.0 6.53±1.01 7.89±1.02 10.14±1.43 12.04 6.20±1.11 7.43±0.90 8.67±1.09 9.38±0.66 10.11 9.92 10.35 11.47 800 7.1 4.77±0.62 5.56±0.60 6.23±0.54 6.68 4.23±0.72 4.86±0.84 5.51±0.86 5.88±1.06 6.11 6.20 6.97 6.11

and the results are shown in Fig. 3.18 and Table 3.10. The performance of the proposed algorithms with different block lengths for the data length, M = 65536 samples is shown in Fig. 3.18(a) and (b). The upper plot shows that the compression performance improves with increasing block length. The lower plot shows PRD1 values versus block lengths for the same records. It can be observed that PRD1 increment is very small as block length increases. Above a certain block length, the incremental change in the compression ratio is also small. The block length of 2048 or 4096 samples results in good compression performance.

But the consideration of duration of the ECG signal for real time processing, internal memory and the com- putation time is also important. The experimental results shown in Figs. 3.18 (c) and (d) also establish that the percentage of correct diagnosis is high for these two block lengths. Table 3.10 shows the compression ratios for various block lengths at a given PRD1 value for the selected records. The results show that the performance of the proposed algorithm is better with a large block length. These observations are consis- tent with different test ECG signals. According to the results shown in Table 3.10 and Fig. 3.18, a block length of 2048 or 4096 and a data length of 4096 are recommended since the performance of the proposed algorithm will not improve significantly with a data length larger than 4096. If the block length and data length are large, small and sharp local waves may be distorted. The other two system parameters, EPEiand b, are determined based on compression criteria, either distortion level or CDR in few iterations using the proposed algorithm which is discussed in the next section.

In the next section, using the above coding parameters, the TDL and TDR driven wavelet threshold based compression algorithms are implemented and their performances are evaluated. Effects of data rate variation on different signal parameters such as mean value variation, noise in the signal and the time

512 1024 2048 4096 8192 16384 32768 65536 6

8 10 12 14 16 18 20 22 24

CR

512 1024 2048 4096 8192 16384 32768 65536 3

4 5 6 7 8 9 10

Block length, N

PRD1 %

5 6 7 8 9 10 11 12 13 14 15

3 4 5 6 7 8 9 10 11 12

PRD1 %

5 6 7 8 9 10 11 12 13 14 15

40 50 60 70 80 90 100

CR

CD %

100__99%

100__98%

117__99%

117__98%

119__99%

119__98%

cu01__99%

cu01__98%

N = 4096 N = 2048 N = 1024

99.5%

98 %

99 %

97 % 96 %

95 % 93 %

(a)

(b)

(c)

93 % (d)

95 % 96 % 97 % 98 % 99 % 99.5 %

Figure 3.18: Compression performance for different data and block lengths. (a) Compression ratio (CR) and (b) average PRD1 of the of the proposed algorithm with data length, M = 65536 as a function of block length, N for the tested mita records 100, 117, 119 and cuvt record cu01. (c) Average PRD1 and (d) percentage of correct diagnosis (CD) as a function of CR at different EPE values, showing the average performance of all 48mitarecords for different block lengths.

varying characteristics of PQRST complexes within a cycle are investigated for TDL algorithm. This data rate variability condition may not be acceptable for limited and well established channel. To solve this, TDR driven ECG compression algorithm is proposed and its performance is analyzed in terms of number of iterations required to meet the target value, compression efficiency, amount of clinical information lost and coding delay. Note that the energy packing efficiency is followed in the iterative algorithms. One might be argued that they are applied at increased computational cost. The reason for the use of EPE is illustrated

Table 3.11: Target distortion level (TDL) driven wavelet threshold based ECG compression algorithm.

Let us consider the ECG signal with length of M samples for a real time processing.

Step 1: Blocking and buffering N input samples.

The PRD1 can be written as follows:

PRD1= f(Xn,Xen=f(N,EPEi,b) )

// where,Xn={x[0],x[1],x[2], ...x[N−1]}, N is the block length,

// EPEi is the energy packing efficiency of theithframe,and the quantization bits,b={6, 7, 8, 9}. Encoder:

Step 2: Decompose the signal,Xn, using 9/7 wavelet filters.

Step 3: Initialization

(a) Specify the target PRD1taror RMSEtar value.

(b) Define the value of EPEF2and the range of search for EPEF3is [0 100]%.

(c) Get all three frames F1, F2and F3.

(d) Get the relative bound error,e, for PRD1tarcalculation.

Step 4: Calculate T2at desired EPEF2by SA in Table 3.2.

(a) Get copy of F2and threshold it at T2. for(k = 1; k<=K; k=k+1 )

// where K is the number of quantization bits. Here, K = 4.

{While|(PRD1(EPE3)−PRD1tar)/PRD1tar| ×100 > e {Step 5: Calculate T3at EPE3= (EPE3min+EPE3max)/2 ;

(a) Get the copy of F3and threshold it at T3. Step 6: Compute PRD1 by

(a) Get the thresholded wavelet coefficient (TWC) vector, TWC = [F1F2TF3T] (b) Create the nonzero thresholded coefficient (NZTC) vector.

(c) Quantize the NZTC by using the proposed adaptive quantizer at desired resolutionbbits.

(d) Reconstruct the signal by taking inverse DWT of the reordered QNZTC.

(e) Finally, calculate the PRD1.

Step 7:IfPRD1 (EPE3)<PRD1tar {EPE3min= EPE3;} else

{EPE3max= EPE3;} } EPEq(k)= EPE3; Step 8: Compute the CR or CDR.

(a) Get the TWC vector, TWC = [F1F2TF3T] and the NZTC vector.

(b) Create the integer significance map (ISM) vector.

(c) Encode the ISM vector using the proposed index coding scheme.

(d) Finally, encode the QNZTC and the output of the index coder and calculate the CR.

CRq(k)=CR ;

}Step 9: Get{EPEq(k)}and{CRq(k)} ∀k=1,2, ...K.

Step 10: Get combination of{EPE3, b}by{EPE3, b}=max{CRq};

Step 11: Using EPE3andb, compress the original signalXnat PRD1tar with high CR.

Reconstruction: 1) Decoding, 2) De-quantization and 3) Inverse DWT.

in the previous section. However this extension to simple threshold adaptation case is straightforward for a given maximum absolute value of wavelet coefficients in each class or frame. In this algorithms, the two- stage design philosophy is followed, where the subband coefficients are thresholded first and then quantized.