Hierarchical Trees
3.5.3 Spatial Spatial Orientation Orientation Trees Trees
3.5.3 Spatial Spatial Orientation Orientation Trees Trees
The Spatial Orientation Tree is responsible for obtaining an efficient representation The Spatial Orientation Tree is responsible for obtaining an efficient representation of the
of the positions of positions of the significant coefficients. the significant coefficients. Although the Although the wavelet coefficientswavelet coefficients are uncorrelated, they
are uncorrelated, they are not are not all independent. all independent. The magnitudes of The magnitudes of the coefficients atthe coefficients at the lowest scale are somewhat equivalent to an edge map of the image, consisting the lowest scale are somewhat equivalent to an edge map of the image, consisting of an x-edge subimage, a y-edge subimage, and an xy-edge (corner) subimage.
of an x-edge subimage, a y-edge subimage, and an xy-edge (corner) subimage.
Each successively higher scale represents edges on a larger scale, with a Each successively higher scale represents edges on a larger scale, with a correspondingly spatial resolution.
correspondingly spatial resolution. As a As a result the edge result the edge map at map at a given scale a given scale isis approximately a downsampled version of the edge map at the next lower scale.
approximately a downsampled version of the edge map at the next lower scale.
This scale space of edges allows us to state the following heuristic:
This scale space of edges allows us to state the following heuristic:
If a coefficient is insignificant with respect to a threshold T (|x| < T), then all If a coefficient is insignificant with respect to a threshold T (|x| < T), then all
Z
Z (for (for Zero) Zero) Insignificant, Insignificant, but but with with a a significant significant descendantdescendant T
T (for (for zero-Tree zero-Tree root) root) Insignificant, Insignificant, with with insignificant insignificant descendantsdescendants
If a node is labelled as a zero-tree root then none of its children’s labels need to be If a node is labelled as a zero-tree root then none of its children’s labels need to be transmitted.
transmitted. Thus the Thus the vast majority vast majority of the of the insignificant coefficients are labelled byinsignificant coefficients are labelled by a few zero tree roots in the highest levels of the tree, producing an extremely a few zero tree roots in the highest levels of the tree, producing an extremely efficient representation.
efficient representation.
3.5.3.2
3.5.3.2 SPIHT’s SPIHT’s SOTSOT
EZW’s SOT is inefficient, as a coefficient that is already known to be significant EZW’s SOT is inefficient, as a coefficient that is already known to be significant must
must be be relabelled significant relabelled significant at at each each lower lower threshold. threshold. Set Set Partitioning inPartitioning in Hierarchical Trees avoids this by treating the insignificant coefficients as subtrees Hierarchical Trees avoids this by treating the insignificant coefficients as subtrees represented by
represented by their root their root node. node. As As new coefficients new coefficients become significant become significant duringduring encoding, these subtrees are repeatedly split into smaller subtrees until the encoding, these subtrees are repeatedly split into smaller subtrees until the significant coefficients
significant coefficients have have been been extracted. extracted. The The following following three three lists lists areare maintained in synchronisation by both the encoder and the decoder:
maintained in synchronisation by both the encoder and the decoder:
Both algorithms are very similar with the exception of the SOT, so here we describe Both algorithms are very similar with the exception of the SOT, so here we describe only SPIHT.
only SPIHT. For a For a more detailed description of more detailed description of the algorithms see the algorithms see the originalthe original papers [Shapiro 1993] and [Said
papers [Shapiro 1993] and [Said & Pearlman 1996]. & Pearlman 1996]. Both EZW Both EZW and SPIHT and SPIHT havehave symmetric encoding/decoding algorithms, which means that the encoding algorithm symmetric encoding/decoding algorithms, which means that the encoding algorithm is the same as the decoding algorithm with each output step replaced by an input is the same as the decoding algorithm with each output step replaced by an input step.
step.
3.5.4.1
3.5.4.1 Algorithm Algorithm 1 1 – – SPIHT SPIHT encodingencoding 1. Initialisation:
1. Initialisation:
1.1. Output n, the highest significant bit position.
1.1. Output n, the highest significant bit position.
1.2. Set the LSP as empty 1.2. Set the LSP as empty
1.3. Add the significant coefficients co-ordinates to the LIP, and those with 1.3. Add the significant coefficients co-ordinates to the LIP, and those with
descendants to the LIS as type A entries.
descendants to the LIS as type A entries.
2.
2. Sorting Sorting passpass
2.1. For each entry in the LIP:
2.1. For each entry in the LIP:
2.1.1.
2.1.1. Output Output their their significance at significance at the the current current thresholdthreshold
3.1.
3.1. For entry iFor entry in the LSP, n the LSP, except the except the new entries, new entries, output thoutput the n-th moe n-th mostst significant bit of |x|.
significant bit of |x|.
4.
4. Quantisation Quantisation step step updateupdate
4.1. Decrement n (halve the threshold) and go back to Step 2.
4.1. Decrement n (halve the threshold) and go back to Step 2.
For
For further detail, further detail, see the see the attached code attached code [Appendices, 9.2 [Appendices, 9.2 – SP– SPIHT.c]. IHT.c]. ThisThis algorithm has been extended to colour by transformation to YUV space before algorithm has been extended to colour by transformation to YUV space before coding the
coding the three components three components independently. independently. When When interlaced, the interlaced, the three codedthree coded streams compete for bit allocation such that the PSNR is maximised at each point.
streams compete for bit allocation such that the PSNR is maximised at each point.