Dictionary Based Intra Prediction for Image Compression

Recently image coding has been important and in many field it is necessary. Recently various sparse algorithms have been developed for image compression. This paper presents a dictionary based block intra prediction for image compression with construction of an adaptive trained dictionary. The adaptive trained dictionary is prepared using K-SVD algorithm. K-SVD algorithm update the dictionary based on the sparse algorithms and given image. The prediction residuals selected from different image are used for dictionary training. The orthogonal matching pursuit (OMP) algorithm have employed for selection of dictionary elements and encoding. The proposed method is then integrated into 9 mode H.264 intra coding. Performance of proposed method compared with existing methods. Simulation result shows that proposed scheme has improved efficiency as compared to existing schemes.


I. INTRODUCTION
Nowadays image coding [1][2][3][4][5][6] has become essential due to huge requirement of storage and transfer.By far different image compression standards like Joint Photographic Experts Group (JPEG) standards have been proposed [7][8].These standards are based on block-based transform, which exploits the spatial redundancies of the image.In JPEG standards, orthogonal transform such as DCT or wavelets were used as dominant transform.Unfortunately such standards do not exploit the inter-block correlations.Recently, various sparse algorithms [9][10][11][12] using over-complete dictionaries have been used for image compression.Many strategies have been addressed using sparse approximation algorithms for image compression [13][14][15][16][17][18][19][20][21].The over complete dictionary based image coding provides a competitive coding gains and visual perceptual quality as compared to popular transform based image coding.In dictionary based image coding several analytical functions like DCT, wavelets and DFT are used as dictionary elements, and for encoding the dictionary elements sparse coding is used.These analytical functions are unable to capture the complex characteristics of an image.The dictionary training method [18][19][20][21] is a recent approach in image coding, which are able to capture the complex characteristics of an image.The initial proposal towards over complete dictionary based image coding was proposed by Bryt and Elad [13].They proposed an algorithm for image compression based on K-SVD algorithm [17].Yuan [14] presented image compression via sparse reconstruction.Zapeda [18] have presented image coding using iteration tuned and aligned dictionary.Other intra prediction methods [19][20][21] have presented a sparse coding with adaptive dictionary in image coding.In these schemes, an adaptive dictionary is trained and used to predict the neighboring blocks in an image.These methods do not use the prediction error during design of dictionary.To include more complex characteristics of an image it is important to introduce prediction error during design and training of dictionary.
In this paper, we introduce a new dictionary based block intra prediction method of image compression.We propose an efficient dictionary based intra block coding embedded in 9 mode H.264 directional intra prediction methods.The intra prediction of each block is performed in spatial domain based on the trained dictionary.The dictionary is trained adaptively using well known K-SVD algorithm.An over complete dictionary is trained using the residuals obtained from 9 mode directional intra prediction to represent complex characteristics of an image.The normal transform based image coding is replaced by a sparse representation of residual image blocks using trained dictionary.Well known OMP algorithm used for selection of dictionary elements and encoding.
The remainder of this paper is organized as follows.Section II presents back ground on sparse coding and K-SVD algorithm.In section III the proposed dictionary based block intra prediction for image compression is introduced.Section IV illustrates results and discussion.Finally, conclusion is given in Section V.

II. SPARSE CODING AND K-SVD ALGORITHM
Sparse coding is the representation of a given signal by a combination of small number of standard signals from a large set of standard signals.To select those combinations various sparse approximation algorithms have been developed.Sparse approximation algorithms [9][10][11][12] solve system of linear equations which is under-determined.Mathematically this can be expressed as Where D is a K x N matrices with K < N called dictionary and each column of D is called atom.X is a column vector of size Nx1 and Y is a column vector of size Kx1.As K < N the dictionary is called over complete dictionary.If Y and each atom of D are treated as a signal then Y can be represented as a linear combination of atoms of D. This linear combination can be expressed as solution vector X.
Due to over complete nature of D, infinite number of solution exists for X.The Sparse approximation algorithm always aims to represent Y in terms of minimum number atoms.Mathematically this can be expressed as solving equation ( 1) such that the solution X contains minimum number of non-zero elements.The Sparse approximation problem is represented as Where the l 0 norm represents the number of non-zero elements in solution vector X.
The Sparse approximation problem that allows some approximation error is represented as for some δ ≥ 0 and p is the norm .
Matching pursuit (MP) [10], Orthogonal Matching Pursuit (OMP) [11] and Complimentary matching pursuit (CMP) [12] are some well known algorithms used to find out the sparse solution.These sparse algorithms using over-complete dictionaries have been used for image compression.In sparse coding, a set of N image block arranged as the columns of a matrix D, known as dictionary and each column is known as atoms.So given a column vector Y obtained from a image block, in sparse coding the problem is to find out the minimum number image blocks from D whose linear weighted sum will represent Y. Image compression takes place if the number of non zero elements in X is very less as compared to number of pixels in the image block Y.The efficiency of sparse coding also depends on the design of over complete dictionary.Various algorithms have been developed to train over complete dictionaries for sparse signal representation.The K-SVD algorithm [17] is very efficient and it works well with different sparse approximation algorithm.K-SVD algorithm iteratively updates the dictionary atoms to better fit the data.The high performance of this algorithm is due to an effective sparse coding.

III. PROPOSED METHOD
Initially, a set of 8 × 8 predictions residuals blocks are selected from different images using 9 modes H.264 intra prediction [6].The residual blocks obtained from different images are rearranged in a column format to represent the atoms of the over complete dictionary.The number of columns or atoms of over complete dictionary are very large.The over complete dictionary represented as a K x N matrices with K < N, where K represent the number of pixel in a residual image block and N represent the number of dictionary atoms.K-SVD algorithm [17] is used to train the dictionary obtained from predictions residuals blocks and for sparse coding Orthogonal Matching Pursuit (OMP) [11] has employed.During dictionary training, in each iteration K-SVD algorithm updated the dictionary atoms.K-SVD algorithm iteratively updates the dictionary atoms to better fit the data and after certain iteration an updated dictionary is resulted.This updated dictionary is used for image coding.Fig. 1 shows the proposed dictionary based intra block image coding scheme.In this scheme the images are divided into different blocks of size 8x8.9 modes H.264 intra prediction used for each image block.Residual image or prediction error obtained for each image block.Then the proposed algorithm is used to code the residual image block obtained during intra prediction.

IV. SIMULATION RESULTS
In our proposed scheme, we collect 100 different images and a set of 512 residuals blocks of size 8 × 8 are selected using 9 modes H.264 intra prediction.The over complete dictionary are constructed with respect to 512 residuals blocks and proposed algorithm implemented to train the dictionary.To train the dictionary we set 100 number iterations in K-SVD algorithm.In the simulation, the efficiency of proposed method is evaluated by taking different standard images such as -Lena‖, and -Barbara‖.The dimension of images was 512 X 512 pixels with 8-bit gray level.Initially the images divided into different blocks of size 8 × 8.The proposed algorithm is applied to obtain best prediction mode (M), position (P) and coefficients(C) of the dictionary elements.Position (P) and best prediction mode (M) are encoded with fixed length codes, and coefficients are uniformly quantized and entropy coded.To evaluate compression efficiency, the proposed method along with other existing methods i.e.JPEG, JPEG2000 were simulated using MATLAB.Figure 2 shows residual blocks used for Dictionary training and trained dictionary.Fig. 3 shows the Bit rate vs. PSNR (in dB) of the proposed scheme along with JPEG and JPEG 2000.The proposed method yields around 3 dB PSNR gain when compared to JPEG and 0.5 dB PSNR gain when compared to JPEG 2000.

Figure1.
Figure1.Architecture of Proposed dictionary based intra prediction coding A. Proposed algorithm Proposed algorithm consists of two stages: Stage I: Dictionary Training: a) A set of 8 × 8 predictions residuals blocks are selected from different images using 9 modes H.264 intra prediction.(b) The residual blocks are put in a column format to represent each atom of the dictionary and training is made using K-SVD algorithm.(c) The trained dictionary is embedded with intra coding framework to encode the residual blocks obtained from intra prediction.

Figure 2 .
Figure 2. (a) Residual Blocks used for Dictionary training (b) Trained dictionary

Figure 4 .
Figure 4. Bitrate vs. PSNR plot for Barbara image