3.1 Complexity
Structure of the Partial Search Algorithm
independent part | dependent part | |
number of additions S per vector | 2k+2(N-1) | 2(N-1)(kC-1) |
number of multiplication P per vector | k+N-1 | (N-1)(kC-1) |
number of comparisons C per vector | k+N-1 | (N-1)(kC-1) |
total | 4k+4(N-1) | 4(N-1)(kC-1) |
3.2.1 Existing Experimental Results
source | N | k | operations per pixel | inferior limit | min | max |
[25] | 512 | 16 | addition | 65.875 | 58.4 | 144.7 |
multiplication | 32.9375 | 45.2 | 88.3 | |||
comparison | 32.9375 | 45.2 | 88.3 | |||
[13] | 256 | 16 | addition | 33.875 | 71.21 | 97.56 |
multiplication | 16.9375 | 43.61 | 56.78 | |||
comparison | 16.9375 | 43.61 | 56.78 | |||
[18] | 256 | 16 | addition | 33.875 | 222.6 | |
multiplication | 16.9375 | 111.3 | ||||
comparison | 16.9375 | 111.3 | ||||
[12] | 256 | 16 | multiplication | 16.9375 | 57.865 | |
[26] | 256 | 8 | addition | 65.75 | 106.78 | 154.98 |
multiplication | 32.875 | 69.39 | 93.49 | |||
comparison | 32.875 | 69.39 | 93.49 | |||
[8] | 256 | 8 | multiplication | 32.875 | 50.5 | 145.2 |
[7] | 256 | 8 | multiplication | 32.875 | 66.00 | 68.3 |
With the help of the expressions for the number of operations for addition,
multiplication and comparison we can compute the average number of iteration
for each combination codebooksize N and dimension k. There the expected
values should be restricted to 1£ kC£
k.
source | N | k | average number of iterations based on | min | max |
[25] | 512 | 16 | addition | 0.883 | 2.234 |
multiplication | 1.384 | 2.734 | |||
comparison | 1.384 | 2.734 | |||
[13] | 256 | 16 | addition | 2.171 | 2.998 |
multiplication | 2.674 | 3.500 | |||
comparison | 2.674 | 3.500 | |||
[18] | 256 | 16 | addition | 6.921 | |
multiplication | 6.921 | ||||
comparison | 6.921 | ||||
[12] | 256 | 16 | multiplication | 3.568 | |
[26] | 256 | 8 | addition | 1.644 | 2.400 |
multiplication | 2.146 | 2.902 | |||
comparison | 2.146 | 2.902 | |||
[8] | 256 | 8 | multiplication | 1.553 | 4.524 |
[7] | 256 | 8 | multiplication | 2.039 | 2.111 |
number of additions S per vector | 2(kI+(N-I)l ) |
number of multiplication P per vector | kI+(N-I) l |
number of comparisons C per vector | kI+(N-I) l |
total | 4(kI+(N-I) l ) |
For every combination codebooksize and dimension a codebook has to be computed. We used for that the LBG-algorithm presented in [6]. With the already described exhaustive search algorithm, a training set of vectors and set of initial vectors a codebook is generated, such that the initial codevectors converge to the codevectors representing a minimal overall distortion for the training set. This is an iterative process, at each repetition each training vector is associated to its nearest neighbor codevector resulting in N subsets called Voronoi regions. When for each subset the centroid is computed. These vectors constitute the new codevectors and the procedure can be repeated once more. To save computation time we made ten iterations and didn't execute the calculations until the minimum distortion has been reached. The measured distortions state, that this number of iterations is sufficient and that the distortion is near enough to the minimum. For the initial codevector we selected vectors of the training set with a distribution along its squared Euclidean norm. The vector quantization is obtained by using the partial distance search algorithm as described in 2.1.2. The number of operations for addition, multiplication and comparison was measured by incrementing each a counter. For further details the corresponding MATLAB files are listed up in the annex B.
As the training set we used the images peppers, baboon, barb, gold and as the source image lena.
The following table resumes the measured average number of multiplication
or comparison operations per pixel. As discussed above, the number of addition
operations are these values multiplied by a factor two and the total number
of operations are these values multiplied by four.
codebooksize N | |||||
64 | 128 | 256 | 512 | ||
dimension k | 4 | 32.8 | 63.6 | 124.4 | - |
8 | 26.7 | 51.9 | 101.0 | 201.0 | |
16 | 23.8 | 46.3 | 88.1 | 169.1 | |
32 | 25.4 | 46.7 | 85.6 | 166.1 | |
64 | 26.1 | 47.3 | 87.8 | 163.9 |
Before giving an interpretation, there is to note that only large codebooks with small dimensions are for practical use. So only vector quantization resulting in a small distortion is applied. The following Figure 4 shows the growing degradation. The first picture is the original. The others are obtained by quantizing with a codebook of size N=512 and the dimension k = 8 for the upper right, k = 16 for the bottom left and k = 32 for the bottom right. So with increasing dimension the bit rate is decreasing. This is equal to a loss in information as it can be observed in the following pictures.
The growing degradation states also in the experimental results. With increasing dimension the complexity passes by a minimum. So for the following parameter estimation, only the shaded values in the table are considered.
Figure 4: Vector quantization
with the partial distance search algorithm for different codebooks. Upper
left: original picture. Upper right: codebooksize N = 512, dimension k
= 8 Bottom left: codebooksize N = 512, dimension k = 16 Bottom right: codebooksize
N = 512, dimension k = 32
As for the existing experimental results we compute the average number
of iterations kC. Because of the proportionality between the
number of addition operations and the number multiplication and comparison
operations only one value is obtained. The values are listed up in the
following table for the considered codebooksizes and dimensions.
codebooksize N | |||||
64 | 128 | 256 | 512 | ||
dimension k | 4 | 2.019 | 1.972 | 1.936 | - |
8 | 3.264 | 3.206 | 3.137 | 3.131 | |
16 | 5.790 | 5.707 | 5.465 | 5.263 | |
32 | - | - | 10.616 | 10.339 | |
64 | - | - | - | 20.402 |
Number of additions S per vector | 2N(0.316k+0.684) |
Number of multiplication P per vector | N(0.316k+0.684) |
Number of comparisons C per vector | N(0.316k+0.684) |
total | 4N(0.316k+0.684) |