Video Compression by Memetic Algorithm

—Memetic Algorithm by hybridization of Standard Particle Swarm Optimization and Global Local Best Particle Swarm Optimization is proposed in this paper. This technique is used to reduce number of computations of video compression by maintaining same or better quality of video. In the proposed technique, the position equation of Standard Particle Swarm Optimization is modified and used as step size equation to find best matching block in current frame. To achieve adaptive step size, time varying inertia weight is used instead of constant inertia weight for getting true motion vector dynamically. The time varying inertia weight is based up on previous motion vectors. The step size equation is used to predict best matching macro block in the reference frame with respect to macro block in the current frame for which motion vector is found. The result of proposed technique is compared with existing block matching algorithms. The performance of Memetic Algorithm is good as compared to existing algorithms in terms number of computations and accuracy.


I. INTRODUCTION
With the increasing popularity of technologies such as Internet streaming video and video conferencing, video compression has became an essential component of broadcast and entertainment media.Motion Estimation (ME) and compensation techniques, which can eliminate temporal redundancy between adjacent frames effectively, have been widely applied to popular video compression coding standards such as MPEG-2, MPEG-4.
Motion estimation has been popularly used in video signal processing, which is a fundamental component of video compression.In motion estimation, computational complexity varies from 70 percent to 90 percent for all video compression.The exhaustive search (ES) or full search algorithm gives the highest peak signal to noise ratio amongst any block-matching algorithm but requires more computational time [1].To reduce the computational time of exhaustive search method, many other methods are proposed i.e.Simple and Efficient Search (SES) [1], Three Step Search (TSS) [2], New Three Step Search (NTSS) [2], Four step Search (4SS) [3], Diamond Search (DS) [4], Adaptive Road Pattern Search (ARPS) [5], Novel Cross Diamond search [6], New Cross-Diamond Search algorithm [7], Adaptive Block Matching Algorithm [8], Efficient Block Matching Motion Estimation [9], Content Adaptive Video Compression [10] and Fast motion estimation algorithm [11] .Soft computing tool such as Genetic Algorithm (GA) has also been used for fast motion estimation [12].
Traditional fast block matching algorithms are easily trapped into the local minima resulting in degradation on video quality to some extent after decoding.Since evolutionary computing techniques are suitable for achieving global optimal solution.In this paper, we propose a Memetic Algorithm to reduce number of computations of video compression by maintaining same or better quality of video.The paper is divided into five sections.The review of Particle Swarm Optimization techniques is discussed in section 2. The proposed Memetic Algorithm for video compression is discussed in section 3. Section 4 provides experimental results comparing MA with other methods for video compression.The conclusion is given in section 5.

II. PARTICLE SWARM OPTIMIZATION
The Particle Swarm Optimizer (PSO) is a population-based optimization method developed by Eberhart and Kennedy in 1995 [13].PSO is inspired by social behavior of bird flocking or fish schooling.In PSO, a particle is defined as a moving point in hyperspace.It follows the optimization process by means of local best (Lbest), global best (Gbest), particle displacement or position and particle velocity.In PSO, particle changes their positions by flying around in a multidimensional search space until computational limitations are exceeded.The two updating fundamental equations in a PSO are velocity and position equations.The particle velocity is expressed as Eq (1) and the particle position is expressed as Eq. ( 2)  1) is the "cognition" part, which represents the personal thinking of the particle itself.The third part of Eq (1) is "social part", which represents the collaboration among the particles.Without the first part of Eq. ( 1), all the particles will tend to move toward the same position.By adding the first part, the particle has a tendency to expand the search space, that is, they have ability to explore new area.Therefore, they acquire a global search capability by adding the first parts.
In GLBestPSO [14], inertia weight (w) and acceleration co-efficient (c) are proposed in terms of global best and local best position of the particles as given in Eq. ( 3) and ( 4).The modified velocity equation for the GLBest PSO is given in Eq. ( 5).

III. MEMETIC ALGORITHM FOR VIDEO COMPRESSION
Memetic Algorithm is developed by hybridization of Standard Particle Swarm Optimization and Global Local Best Particle Swarm Optimization.This technique is used to reduce number of computations of video compression by maintaining the same or better quality of video.
We have modified velocity and position equations of PSO to achieve step size for video compression, which is used to predict best matching macro block in the reference frame with respect to macro block in the current frame for which motion vector is found.
To get the step size, the velocity and position equations of PSO are modified as given below.The velocity equation is expressed as Eq. ( 6).
Where W is the inertia weight, C is the acceleration constant, r is random number between 0 to 1 and t is generation number.To get the adaptive step size, the time varying inertia weight (W) is used instead of constant inertia weight similar to GLBestPSO for getting the true motion vector dynamically.The time varying inertia weight is based up on previous motion vectors as given in Eq. ( 7) Where, X and Y is the x and y coordinates of the predicted motion vector.The velocity term in Eq. ( 6) is added with previous motion vector to predict the next best matching block as given in Eq (8)

S (t+1) =S (t) +V (t) (8)
In Memetic Algorithm, a search is made in an earlier frame of the sequence over a random area of the frame.The search is for the best matching block viz. the position that minimizes a distortion measured between the two sets of pixels comprising the blocks.The relative displacement between the two blocks is taken to be the motion vector.Usually the macro block is taken as a square of side consists of 16 pixels.The compression ration is 128:1 or 256:2.The each block size of 16 x 16 is compressed into two pixels which are nothing but motion vectors.
In Memetic Algorithm, five swarms are used to find best matching block.The initial position of block to be searched in reference frame is the predicted motion vector as expressed in Eq. ( 8).In Memetic Algorithm, the number of generations is taken as 2. The cost required for finding best matching block in the reference frame is ten blocks, which is less than existing methods.
The mean absolute difference (MAD) is taken as objective function or cost function in Memetic Algorithm and is expressed as in Eq. ( 9).] ) , (


Where, M = Number of rows in the frame and N = Number of columns in the frame.The objective quality obtained by Memetic Algorithm has been measured by the peak signal-tonoise ratio (PSNR), which is commonly used in the objective quality comparison.The performance of the proposed method is evaluated by following Eq (10)


A further small improvement in the Memetic Algorithm is to check for Zero Motion Prejudgment (ZMP).If current macroblock matches with macroblock in the reference frame i.e. cost is zero then motion vector are directly stored as zero motion vector instead of gaining the motion vector through Memetic Algorithm.The zero motion prejudgment saves considerable amount of computational time.
Zero Motion Prejudgment is the procedure to find the static macro blocks which contains zero motion.In real world video sequences more than 70% of the MBs are static which do not need the remaining search.So, significant reduction of computation is possible if we predict the static macro blocks by ZMP procedure before starting motion estimation procedure and the remaining search will be faster and saves memory.We first calculate the matching error (MAD) between the macro block in the current frame and the macro block at the same location in the reference frame and then  www.ijacsa.thesai.orgcompare it to a predetermined threshold.If the matching error is smaller than predetermined threshold we consider this macro block static which do not need any further motion estimation, and return a [0, 0] as its motion vector (MV).

IV. EXPERIMENTAL RESULTS AND DISCUSSIONS
The presented method Memetic Algorithm has been tested for two videos sequences.The performance of the proposed method is measured in terms of the PSNR and percentage of saving number of computations of video compression.To test the efficiency of the proposed algorithm with existing methods, the algorithms are executed in single machine.Video sequence with distance of two frames between current frame and reference frame are used to generate frame-by-frame results of the Memetic Algorithm.The performance of Memetic Algorithm is compared with other existing methods such as ES, SESTSS, TSS, NTSS and 4SS and the results are presented in Table 1 and Table 2. Figure 1 to Figure 2 shows the comparison of PSNR with other existing methods for two video sequences respectively.Figure 3 to Figure 4 shows the comparison of number of computations with other existing methods for two video sequences respectively.The speed of Memetic Algorithm is found to be faster than that of already published methods and PSNR is close to published methods as shown in Table 3    V.CONCLUSION The soft computing tool such as Memetic Algorithm is used for video compression.The performance of Memetic Algorithm is good as compared to existing algorithms except ES for video compression because it find best matching block with less computational cost by maintaining same accuracy of video.Memetic Algorithm is faster and accurate tool for video compression.The results shows promising improvement in terms of accuracy, while drastically reducing the number of computations.The step size equation of MA predicts the best matching block with less computational requirement.Memetic Algorithm uses only two-steps for video compression.An approximately more than 96% of computational time saving in the motion estimation coding is achieved as compared to ES algorithm.This saving comes with less degradation in the PSNR.This technique can easily used as block matching motion estimation algorithm or video compression algorithm.
Particle Velocity S= Particle Position Lbest = Local best Gbest = Global best W = Inertia weight C 1 and C 2 are acceleration constant r 1 and r 2 are random values [0 1] k = Current iteration www.ijacsa.thesai.orgi = Particle number In first parts, W plays the role of balancing the global search and local search.Second and third parts contribute to the change of the velocity.The second part of Eq. (

Figure 4
Figure 4 Comparison for Number of Computations for Video 2

Table 4 .
andThe Memetic Algorithm saves number of computations up to 95.36% to 94.95 % with PSNR degradation of -0.1222 to -0.0537 as compared to ES.Similarly, Memetic Algorithm saves number of computations up to 58.95% to 35.73% with PSNR gain of +1.08 to +0.03as compared to SESTSS, TSS, NTSS and 4SS.