Now that we've placed the data in the proper code syntax, have ordered the data into tiles, applied quantization and Elias entropy, we are finally ready to apply a discrete wavelet transformation to the signal. First, recall that any tile in our image is bounded by the coordinates tcx0, tcy0, tcx1, and tcy1. This means we can sample any tile at coordinate (x, y) where the following is true:
We must also note that, at this point, we have two choices in wavelets that we can apply to our signal. If we are preforming a lossless compression, we must apply the biorthogonal 5/3 Daubechies wavelet filter. If, however, we are preforming a lossy compression, we must apply the biorthogonal 9/7 Daubechies wavelet filter. If we apply the lossless compression standard, we can only achieve a compression ratio of about 2:1. If we use lossy compression, we can possibly achieve a compression ratio of nearly 200:1. Also, notice that we are using biorthogonal wavelets and not orthogonal ones. If we use orthogonal wavelets, we get a computational complexity of bigO(n^3). However, if we relax a bit, we get a computational complexity of bigO(nlogn). Thus, by using biorthogonal wavelets, we significantly decrease the time for computation.
I used the Cascade Algorithm coded into Maple to show you the two Mother wavelets of the 5/3 Daubechies wavelet filter. One corresponds to the 5-tap filter and the other corresponds to the 3-tap filter.
No matter if we're doing lossy or lossless compression, the procedure remains the same. We apply the Forward Discrete Wavelet Transformation (FDWT) to each tile, producing a set of two-dimensional wavelet transforms, or sub-band signals. Thus, we use the properties of low-pass and high-pass filtering to produce our new signal. This figure should make this clear.
As you can see, the low-low section of the first two-dimensional sub-band (upper left corner) is further decomposed into another two-dimensional sub-band.
When a low-low section is created, JPEG 2000 preforms a procedure called 2D_SD. This procedure is how the second decomposition is obtained. The 2D_SR procedure is actually a combination of three separate procedures: the VER_SD, the HOR_SD, and the 2D_DEINTERLEAVE, in that order. The VER_SD procedure preforms a vertical decomposition of the two-dimensional array. The HOR_SD preforms a horizontal decomposition of the two-dimensional array, and the 2D_DEINTERLEAVE deinterleaves the coefficients of the two-dimensional array. Basically, the 2D_DEINTERLEAVE separates the low-low, low-high, high-low, and high-high coefficients and places them into groups.
In order to recompose the image, we simply reverse the procedure described above. We just apply the Inverse Discrete Wavelet Transformation to the compressed image file, undo the coefficient bit modeling, undo the Elias entropy encoding, and let the decoder simply read the tiles from the codestream. The decoder will know about tiles and marker headers, so it will know how to reconstruct the original image. I would also like to point out that we are using a universal wavelet to compress the image. Other formats first look at the signal and then try to construct a mother wavelet that might be best suited for the signal. However, JPEG 2000 does not need to execute this computation. Thus, a great deal of computation time is saved by simply specifying the mother wavelets in the beginning.