International Journal of Computer Applications (0975 8887) Volume 44No.21, April 2012 6 Adaptive Video Compression using PCA Method Mostafa Mofarreh-Bonab Department of Electrical and Computer Engineering Shahid Beheshti University,Tehran, Iran Mohamad Mofarreh-Bonab Electrical and Electronic Engineering school, University of Bonab, East Azerbaijan, Iran ABSTRACT In this paper, a new PCA based method for video compression is introduced. This method extracts the features of video frames and process them adaptively based on required accuracy. This idea improves the quality of compression effectively. In this paper, we focused on the fact that video is a composition of sequential and correlated frames, so we can apply the PCA to these high correlated frames. Most of other video compression methods use DCT transform to compression. DCT causes to large damage in the edges of frames which plays fundamental role in quality of video. Our method in this paper doesn’t reduce the bandwidth of frequency response, so the edges of frames don’t fade. Keywords Video Compression, Correlation, PCA, SVD, 2DPCA, Frame, Feature extraction, Database, PSNR, Bit Rate. 1. INTRODUCTION PCA -also known as KL Transform for images- is a statistical approach which is used widely in pattern recognition and compression of various type of databases, especially image databases which their components have high correlation -i.e. frontal face databases. This method first used by Kirby and Sirovich for compressing human face image database [7], [8].In PCA method, features of images are extracted by means of images correlations and these information are mapped to an orthogonal space and the features that are correspond to less important components -smaller eigenvalues- are ignored. In this approach, compression is reached by very little loss of information [1]. In fact, the eigenvectors and their corresponding eigenvalues are extracted using the covariance matrix of images. Since the eigenvectors which are related to small eigenvalues have very low information, their elimination has almost no effect on the quality of reconstructed images and compression is done by eliminating those components. There are other Optimal PCA-based methods for compressing images which show better results than conventional PCA, i.e. 2DPCA, K2DPCA, KPCA, L1- norm-Based2DPCA and so on[3], [11], [10], [9]. As mentioned in the following, a combination of improved PCA presented by M.Mofarreh et.al. in [1] and the introduced method in [2] for compressing one image show better results rather than other methods. Also we will show that other PCA based methods don’t have proper performance for video sequences. 2. PCA method Suppose there areMgrayscale N×Pimages. N×Pgrayscale images are equivalent to N×P matrixes that the values of the components of the matrixes are the light intensities of the corresponding pixel's location. Put N×P=Q. By reshaping the matrixes, the image can be expressed as 1×Qvectors F i in equation 1. Applying PCA, images are transferred to another field. All images are put in matrix that its elements are the intensity values of images. ܆= F 1 ڭ F M M×Q ,F i = x i1 ,x i2 , ,x iQ 1×Q Eq. 1 The term F i indicates the i th image which is converted to a vector. In order to applying PCA, some definitions should be considered; The mean vector, M x : that contains mean values of each image and expressed as: M x = 1 Q x 1k Q k=1 x 2k Q k=1 . . x Mk Q k=1 M×1 = m 1 m 2 . . . m M Eq. 2 x matrix, that contains the values of M x for ܯtimes and expressed as: x = [M x ,M x , ,M x ] M×Q Eq. 3 Covariance matrix ۱ x for ܯrows of matrixis [1]: ۱ x = c i,j M×M That: c i,j = 1 Q 1 ×  x ik M x i, 1 × (x jk M x (j, 1)) Q k=1 Eq. 4 For ۱ matrix, ܯeigenvectors v i , i = 1,2, ,M and ܯ eigenvalues λ i , i = 1,2, ,M can be found, which satisfy equation 5: i ∈1,2, ,M,, C x .v i = λ i .v i v i = v 1 (i) v 2 (i) ڭ v M (i) Eq. 5 The modal matrix will be obtained by putting all eigenvectors in a matrix, that its columns are the eigenvectors of C x as shown below [2]: = [v 1 ,v 2 , ,v M ] Eq. 6 Now we can define matrix: ܄= 1 Eq. 7 is a unitary matrix. So: 1 = T ܄⟹= T Eq. 8 ܄⟹= [v 1 ,v 2 , ,v M ] T M×M Eq. 9 So: