Chapter 10
Chapter 10
2 5 8
3 6 9
2 5 8
3 6 9
x(nT – T)
x(nT – 2T)
x(nT)
x(nT – T)
x(nT)
y(nT) = x(nT) y(nT) = x(nT – T)
TP selection strategy
x(nT – 2T)
x(nT – T)
x(nT – 2T)
x(nT)
x(nT – T)
x(nT)
y(nT) = x(nT) y(nT) = x(nT – T)
TP selection strategy
x(nT – 2T)
x(nT – T)
x(nT – 2T)
x(nT)
x(nT – T)
x(nT)
y(nT) = x(nT) y(nT) = x(nT – T)
TP selection strategy
x(nT – 2T)
x(nT – T)
x(nT – 2T)
x(nT)
x(nT – T)
x(nT)
y(nT) = x(nT) y(nT) = x(nT – T)
Turning point algorithm example
Original
signal 14 data points
Discard
every
other
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Turning
point
Turning point algorithm example
Original
signal 14 data points
Discard
every
other 7 data points
point
Original
signal 14 data points
Discard
every
other 7 data points
point
€
Data reduction – TP
Original signal
Data range = –75 to +85 (160 levels)
Turning point
Reduction 2:1; PRD = 3.8%
AZTEC algorithm
Amplitude Zone Time Epoch Coding
Piecewise linear approximation of the
ECG
Originally for preprocessing ECGs for
rhythm analysis
AZTEC Zero Order Interpolation
(ZOI)
ECG sampled at 200 sps
Vth
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
ECG sampled at 200 sps
AZTEC encoding of ECG –
3.3 to 1 reduction
AZTEC data structure
{–2, 83, 22, 83, 18, 77, 4, 101, –5, –232, –4, 141, 24, 141, 21, 164}
L, A, L, A, L, A, L, A, L, A, L, A, L, A, L, A
Data reduction – AZTEC
Original signal
Data range = –75 to +85 (160 levels)
AZTEC Threshold = 5
Reduction 2.99:1; PRD = 18.2%
AZTEC Threshold = 10
Reduction 5.4:1; PRD = 16.5%
AZTEC Threshold = 20
Reduction 8.4:1; PRD = 16.8%
AZTEC flow chart
Start A
N
Tsi = 0
Y Vsi = V1
Vmxi - Vmni
< Vth
N
Vmxi = Vmni = V
T1 = NUM - 1
LineLen = 1
V1 = (Vmx + Vmn)/2
B A
B
CORTES algorithm
Coordinate Reduction Time Encoding
System
Hybrid of the TP and AZTEC algorithms
Uses AZTEC zero-order-interpolation (ZOI)
for lower-frequency regions (e.g., baseline)
Uses TP for higher frequency regions (e.g.,
QRS complex)
CORTES encoding of ECG –
2.3 to 1 reduction
CORTES encoding of ECG –
2.3 to 1 reduction
CORTES encoding of ECG –
2.3 to 1 reduction
AZTEC and CORTES
encoding example
Original
ECG
AZTEC CORTES
CORTES
AZTEC
with LPF
with LPF
Fan algorithm
Draws lines between pairs of starting
and ending points so that all
intermediate samples are within some
specified error tolerance
Final stored samples not equally spaced
Similar algorithm is Scan-Along
Approximation (SAPA)
Fan algorithm example
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
U2
L2 U3
U1
ε
ε
Amplitude
L1 L3
Saved samples
Eliminated samples
Fan Threshold = 5
Reduction 3.6:1; PRD = 4.6%
Fan Threshold = 10
Reduction 6.8:1; PRD = 11.5%
An encoded poem
Sir, I send a rhyme excelling
In sacred truth and rigid spelling
Numerical sprites elucidate
For me the lexiconʼs full weight.
An encoded poem - decoded
3.14159265358979323846 π
Sir, I send a rhyme excelling
3 1 4 1 5 9
In sacred truth and rigid spelling
π
2 6 5€ 3 5 8
Numerical sprites elucidate
9 7 € 9
For me the lexiconʼs full weight.
3 2 3 8 4 6
Steganography
The art and science of writing hidden
messages
Image of a tree.
By removing all but the
last 2 bits of each color
component, an almost
completely black image
results. Making the
resulting image 85 times
brighter results in the
image of the cat.
S Lists of P
i i
1 0 1 0
1 0 1 1 0 2
3 4 5 1 0
.07 .04
6 7
1.0
1 0
.57 .43
1 0 1 0
1 0 1 1 0 2
3 4 5 1 0
.07 .04
6 7
1.0
7
E(l) = ∑ l i Pi
1 0
.57 .43
1 0 1 0
i=1
.32 .25 .22 .21
6 7
1.0
7
E(l) = ∑ l i Pi
1 0
.57 .43
1 0 1 0
i=1
.32 .25 .22 .21
6 7
li l i Pi
2 2 × 0.25 = 0.50
2 2 × 0.21 = 0.42
3 3 × 0.18 = 0.54
€ €3 3 × 0.14 = 0.42
3 3 × 0.11 = 0.33
4 4 × 0.07 = 0.28
4 4 × 0.04 = 0.16
E(l) = 2.65
1.0
7
E(l) = ∑ l i Pi
1 0
.57 .43
1 0 1 0
i=1
.32 .25 .22 .21
li l i Pi
2 2 × 0.25 = 0.50
2 2 × 0.21 = 0.42
3 3 × 0.18 = 0.54
€ €3 3 × 0.14 = 0.42
3 3 × 0.11 = 0.33
4 4 × 0.07 = 0.28
4 4 × 0.04 = 0.16
E(l) = 2.65
Modified Huffman coding –
adding infrequent symbols
Frequent set and infrequent set
Reduces size of the translation table
Adaptive coding
Builds translation table as data are presented
Example is Lempel-Ziv-Welch (LZW) algorithm
Uses fixed-size table
Initializes some positions of table for some chosen
data sets
When new data encountered, uninitialized positions
are used so that each unique data word is assigned
its own position
When table is full, oldest or least-used position is
reinitialized according to the new data
During data reconstruction, translation table is
incrementally rebuilt from the encoded data
Encoding the ECG first
difference
Typically neighboring signal amplitudes
are not statistically independent
Amplitude range of difference signal is
smaller than that of the original signal,
thus less bits required per sample point
First difference selectable in UW
DigiScope Huffman coding module
First difference changes the
statistics
60
50
Original ECG 40
10
5
1
7
3
9
5
1
7
3
9
5
1
7
9
13
19
31
47
53
77
85
-7
-1
-7
-7
-6
-6
-5
-5
-5
-4
-4
-3
-3
-3
-2
-1
First difference changes the
statistics
60
50
Original ECG 40
10
5
1
7
3
9
5
1
7
3
9
5
1
7
9
13
19
31
47
53
77
85
-7
-1
-7
-7
-6
-6
-5
-5
-5
-4
-4
-3
-3
-3
-2
-1
160
140
80
40
20
-8
-4
3
12
22
26
30
34
-6
-3
-2
-2
-1
First difference changes the
statistics
60
50
Original ECG 40
10
5
1
7
3
9
5
1
7
3
9
5
1
7
9
13
19
31
47
53
77
85
-7
-1
-7
-7
-6
-6
-5
-5
-5
-4
-4
-3
-3
-3
-2
-1
160
140
80
40
20
-8
-4
3
12
22
26
30
34
-6
-3
-2
-2
-1
Signal can be exactly reconstructed.
ECG beat subtraction and
encoding of residual