• 沒有找到結果。

CHAPTER 4 A NEW APPROACH FOR FAST MULTIPLE SPRITES GENERATION

4.3 The Complete Algorithm

4.3.3 Sequence partition

In order to find the proper partition points, the optimal partition algorithm [38] described in Section 1.5.2 is applied. The algorithm is originally developed to find the optimal partition from a coding-cost matrix made up by costs of all combinations of possible sub-sequences. In our method, the sequence is partitioned only in the candidate partition points found in Section 4.3.1. Therefore, a much smaller coding-cost matrix can be made up.

Assume that M candidate partition points {v1,...,vM} are found in Section 4.3.1. The

obtained from the minimal area bounding box (the bounding box with validated reference frame) found in Section 4.2.

An upper triangle coding-cost matrix C with size (M +2)×(M +2) can be made up by

where i and j are indices of two elements in V.

The matrix C is applied to Eq. (1.9) as the sprite coding-cost matrix Si;k . Then based on Eqs. (1.11) and (1.12), the partition of sequence can be found using the method described in Section 1.5.2.

77

4.4 Experimental Results

Identical global motion parameters of testing sequences should be used in all competitive methods to show the performance. However, the estimated global motion parameters will be different according to various estimation methods, different feature points and initial guesses used in the gradient descent algorithm. Since it is impossible to acquire the same estimated global motion parameters as those in Farins’ paper, we choose to implement their optimal method. The global motion parameters are generated in advance by the sprite generator with intelligent blending proposed in Section 2, and the same parameters are used in both the proposed and the optimal methods. The testing platform is an IBM laptop with mobile PentiumIII 800MHz CPU and 640MB of RAM. Both methods are implemented and simulated by Matlab. The results of using a single sprite are also included as a comparison.

Table 4.1 and Table 4.2 show the results of sequence ‘stefan’ using perspective and affine motion model respectively. Table 4.3 shows the results of sequence ‘tabletennis’ in perspective model. Note that the experimental results of the optimal method are different from the results described in their paper [38] because the global motion parameters of sequences are not the same. In all tables, we can see that Farins’ optimal method achieves excellent performance. The total sprite sizes of all sequences by the optimal method are superior to the sizes of using a single sprite. The performance of using multiple sprites is obvious. Results

78

also show that using affine motion model slightly reduces execution time because the affine transformation is a bit faster than perspective transformation, but the execution time of the optimal method is still very slow.

Table 4.1 Experimental results of sequence ‘stefan’ (perspective).

Partitions (reference frames) Total sprite size

(bytes) Executing time (seconds) Using a single sprite

(frame 1~250) - 2,862,240 -

Farin et al.’s optimal

method 1-242 (57), 243-300 (265) 766,350 780 Proposed method with

normal validation 1-244 (60), 245-300 (266) 777,160 44 Proposed method with

fast validation 1-244 (53), 245-300 (265) 793,529 4.1

Table 4.2 Experimental results of sequence ‘stefan’ (affine).

Partitions (reference frames) Total sprite size (bytes)

Executing time (seconds) Using a single sprite

(frame 1~300) - 1,450,446 -

Farin et al.’s optimal

method 1-245 (81), 246-300 (283) 604,214 766 Proposed method with

normal validation 1-244 (58), 245-300 (261) 608,685 44 Proposed method with

fast validation 1-244 (57), 245-300 (259) 633,953 4.1

Table 4.3 Experimental results of sequence ‘tabletennis’.

Partitions (reference frames) Total sprite size

(bytes) Executing time (seconds)

Using a single sprite - 620,044 -

Farin et al.’s optimal

method 1-49 (48), 50-75 (52), 76-131 (76) 177,766 95 Proposed method with

normal validation 1-51 (9), 52-77 (57), 78-131 (83) 190,150 9.3 Proposed method with

fast validation 1-51 (4), 52-77 (52), 78-131 (78) 220,964 2.7

79

The results of the proposed method with normal validation and fast validation are also listed in tables. The proposed method divides the sequence ‘stefan’ into partitions at frame 245 and divides the sequence ‘tabletennis’ into three partitions at frame 52 and 78. The partition points of the proposed method are very close to the partition points of using the optimal method, which is frame 243 in ‘stefan’ and frames 50 and 76 in ‘tabletennis’.

The total sprite sizes using the proposed method are only slightly higher than those using the optimal method, but the executing time of the proposed method are greatly reduced. The total sprite sizes of two testing sequences using the proposed method with normal validation are 777,160 and 190,150 pixels respectively, which are only 1.41% and 6.97% higher than total sprite sizes of using the optimal method. The executing times are reduced from 780 seconds to 44 seconds, and 95 seconds to 9.3 seconds. The execution speed is increased over 10 times. If the fast validation method is applied, the executing times can be further decreased to 4.1 and 2.7 seconds, which is 35-190 times fast than that of the optimal method. In contrast to the reduction of executing time, the total sprite size of using fast validation method is not increased much.

The generated sprites of sequence ‘stefan’ by the optimal method and the proposed methods are shown in Fig. 4.6 respectively. We can see that the generated sprites are perceptually similar, excepting for the dimensions of sprites. The effects of geometric distortions are lightened and the qualities of generated sprites are preserved. The generated

80

sprites of sequence ‘tabletennis’ by different methods are shown in Fig. 4.7.

(a)

(b)

(c)

Fig. 4.6 Generated sprites of sequence ‘stefan’ by different methods.

(a) Farin et al.’s optimal method. (b) Proposed method with normal validation.

(c) Proposed method with fast validation.

81

(a)

(b)

(c)

Fig. 4.7 Generated sprites of sequence ‘tabletennis’ by different methods.

(a) Farin et al.’s optimal method. (b) Proposed method with normal validation.

(c) Proposed method with fast validation.

The experimental results of sequence ‘building’ are listed in Table 4.4. The sequence consists of wide camera movements in y-axis direction and continuous panning in x-axis direction. From Table 4.4, one can see that the proposed method works well. Fig. 4.8 shows the generated sprites of the sequence.

82

Table 4.4 Experimental results of sequence ‘building’.

Partitions (reference frames) Total sprite size

(bytes) Executing time (seconds) Farin et al.’s optimal

method 1-12 (10), 13-39 (31), 40-65 (56) 607,265 22 Proposed method with

fast validation 1-29 (10), 30-41 (37), 42-65 (56) 614,052 2.2

(a)

(b)

Fig. 4.8 Generated sprites of sequence ‘building’ by different methods.

(a) Farin et al.’s optimal method. (b) Proposed method with fast validation.

相關文件