Using Artificial Intelligence Techniques for Image Compression

Image compression helps in storing the transmitted data in proficient way by decreasing its redundancy. This technique helps in transferring more digital or multimedia data over internet as it increases the storage space. This research presents some methods to compress digital images using Artificial Intelligence Techniques(AITs) that include from fuzzy logic, swarm intelligent technique


Introduction
Digital image presentation requires a large amount of data and its transmission over communication channels is time consuming.Numerous image compression techniques have been developed in the past years [1].Image compression is a result of applying data compression to the digital image.The main objective of image compression is to decrease the redundancy of the image data which helps in increasing the capacity of storage and efficient transmission.Image compression aids in decreasing the size in bytes of a digital image without degrading the quality of the image to an undesirable level [2].K-means is one of the common partitioning techniques which has large number of applications in the fields of image and video compression, image segmentation, pattern recognition and data mining.Though the K-means algorithm always converge, it does not guarantee to yield the most optimal clustering as it is significantly sensitive to the randomly selected initial cluster centroids [3].Fuzzy systems have been successfully applied to various areas such as classification, simulation, data mining, pattern recognition, image compression [4], Gath-Geva (G-G) fuzzy clustering algorithm takes the size and density of the clusters into account [5].Swarm intelligence (SI) as an innovative artificial intelligence technique inspired by intelligent behaviors of insect or animal groups in nature, such as ant colonies, bird flocks, bee colonies bacterial swarm, and so on.In recent years, many SI algorithms have been proposed [6], such as Particale Swarm Optimization(PSO) is a kind of evolutionary computation techniques developed by Kennedy and Elberhart in 1995 based on social behaviour metaphor.PSO is a simple, but powerful search technique; it has been applied successfully to a wide variety of search and optimization problems, including some image processing problems such as image compression [7].
A neural network represents a highly parallelized dynamic system with a directed graph topology that can receive the output information by means of reaction of its state on the input nodes.The ensembles of interconnected artificial neurons generally organized into layers of fields include neural networks.The behavior of such ensembles varies greatly with changes in architectures as well as neuron signal functions [8].Artificial neural networks have been applied to many problems, one such application is far data compression.In this research was combined Gath-Geva fuzzy clustering method with backpropagation neural network to produce Fuzzy Backpropagation Neural Network (FBPNN).

Previous Works
Numerous compression research studies examine the use of compression in different file types and different application domains, as well as by using different algorithms.In 2010, Singh V., Rajpal N., Murthy K. [1], described practical and effective image compression system based on neuro-fuzzy model which combines the advantages of fuzzy vector quantization with multi layered neural network and wavelet transform.Boopathi G, Arockiasamy S. [2], present the proposed technique for the image compression by using modified Self-Organizing Map(SOM) based vector quantization.Somasundarad K., Rani M. [3], used K-means algorithm and proposed a new approach to generate codebook used in Vector Quantization for the image compression.Al-Hashemi R., Kamal I. [9], presented an efficient lossless image compression approach based on a well-known error correcting BCH codes.Khashman A., Dimililer K. [10], presented Haar wavelet transform, and used a supervised neural network based on the back propagation learning algorithm for the image compression.Sahoolizadeh H., Abolfazl A. [11], the perceptron networks to compress images were used and tried by using the adaptive network based on the amount of information presented in blocks of the image.Chaabouni I., Fourati W., Bouhlel M. [12], presented four wavelets families used in incremental self organizing map ISOM based on the image compression technique.Four families of wavelets were considered:1) Biorthogonal, 2) Daubechies, 3) Coiflet and 4) Symlet.Wang A., Zhang Y., and Feng Gu Y. [13], were used of multiwavelets in Synthetic aperture radar (SAR) images denoising and compression.Vasmatkar1 R., Biradar S., Shivashankar P. [14], were using a parallel structure of Multilayer Feed-forward Networks and the concept of Discrete Wavelet Transform DWT for the image compression.

Image Quality Measures
A number of quality measures [4] are evaluated for color image compression.They are all bivariate, exploiting the differences between corresponding pixels in the original and the degraded images.Image quality assessment is an important, but difficult issue in image processing applications such as compression coding and digital watermarking.For a long time, root mean square error (RMSE) and peak signal-to-noise ratio (PSNR) are widely used to measure the image compression [15].The RMSE R , RMSE G , RMSE B can be calculated by the following equation [15][16]: Then, the RMSE can be found for the color image by equation (2): Where, RMSE R , RMSE G , RMSE B , represent the RMSE value for the Red, Green, and Blue colors for an image.
The Peak Signal to Noise Ratio (PSNR) in decibel (dB) for the three color can be calculated by the following equations [17]: The average PSNR can be calculated as follows: To find the BitPerPixel, this equation can be used [18]:

Digital Image Background
A digital image is a rectangular array of dots, or pixels, arranged in m rows and n columns.A digital image is represented by a two-dimensional array of pixels, which are arranged in rows and columns.Hence, a digital image can be presented as M×N array.
Where, f(0,0) gives the pixel of the left top corner of the array that represents the image and f(M-1,N-1) represents the right bottom corner of the array.A Grey-scale image, also referred to as a monochrome image contains the values ranging from 0 to 255, where 0 is black, 255 is white and values in between are shades of grey.In color images, each pixel of the array is constructed by combining three different channels (RGB) which are R=red, G=green and B=blue.Each channel represents a value from 0 to 255.In digital image, each pixel is stored in three bytes, while in a Grey image is = represented by only one byte.Therefore, color images take three times the size of Gray images [19].

Image Compression
The main idea in the image compression is to reduce the data stored in the original image to a smaller amount.According to scientific revolution in the internet and the expansion of multimedia applications, the requirements of new technologies have been grown.Recently, many different techniques have been developed to address these requirements for both lossy and lossless compression.Modern computers employ graphics extensively.Window-based operating systems display the disk's file directory graphically.The progress of many system operations, such as downloading a file, may also be displayed graphically.Now-a-days, most of the applications working under windows provide a graphical user interface (GUI), which makes it easier to use the program.Many areas of life use computer graphics to change the type of the problem from information to a digital image.Thus, images are important, but they tend to be big!Modern hardware can display many colors, which is why it is common to have a pixel represented internally as a 24-bit number, where the percentages of red, green, and blue occupy 8 bits each.Such a 24-bit pixel can specify 16.78 million colors.As a result, an image at a resolution of 512×512 that consists of such pixels occupies 786,432 bytes.At a resolution of 1280×800 it gives 3,072,000 bytes as a total for 3 bytes for each pixel which makes it four times as big as 512×512.Therefore, an image compression arises to solve this problem [19].

Run Length Encoding
Run Length Encoding is a compression technique that replaces consecutive occurrences of a symbol with the symbol followed by the number of times it is repeated.For example, the string 111110000003355 could be represented by 15063252.Clearly, this compression technique is most useful where symbols appear in long runs, and thus can sometimes be useful for images that have areas where the pixels all have the same value, cartoons for example [20].

K-means algorithm was originally introduced by
is the corresponding set of centers, where c is the number of clusters.The aim of K-means algorithm is to minimize the objective function J (V), in this case a squared error functions [21]: Where is the Euclidean distance between ij x and j v , i c is the number of data points in the cluster i.The ith center i v can be calculated as : The procedure of this algorithm can be described as follows: 1) Randomly select c cluster centers.
2) Calculate the distance between all of the data points and each center.
3) Data is assigned to a cluster based on the minimum distance.4) Recalculate the center positions using (8).5) Recalculate the distance between each data point and each center.And 6) If no data was reassigned, then stop, otherwise repeat (3)[21] [22].

Gath-Geva Fuzzy Clustering Algorithm
Gath-Geva (GG) can be used to detect ellipsoidal clusters with varying size [23].G-G fuzzy clustering algorithm takes the size and density of clusters for classification [5].The objective function based on the minimization of the sum of weighted squared distances between the data points and cluster centers is described in the following [4][23]: Where Z is the set of data, U = [ ik  ] is the fuzzy partition matrix,


is the set of centers of the clusters, c is the number of clusters, N is the number of the data, m is the fuzzy coefficient, ik  is the membership degree between the i-th cluster and k-th data, which satisfies conditions: The minimum of   V U , is calculated as follows: The norm of distance between i-th cluster and k-th data is : Where, the mi F is the fuzzy covariance matrix of the i-th cluster, ik  is the fuzzy partitioning matrix, m is the weighting exponent controls the 'fuzziness' of the resulting cluster and i P is aprior probability of selecting the i-th cluster.The distance in Eq. ( 13) is used in the calculation of i P , the probability of selecting the i-th cluster given the k-th data point, is given by: The steps of the GG algorithm are listed as follows [4]: Step1: determining the number of cluster; m c and value( let 2  m ), given the converge error, 0   .
Step5: update the partition matrix U using (11).Step6: stop if , else go to step 3.

Particles Swarm Optimization (PSO)
A PSO is population-based optimization algorithms modeled after the simulation of social behaviour of bird in a flock.PSO is initialized with a group of random particles (solutions) and then searches for optima by updating generations.Each particle is flown through the search space, having its position adjusted based on its distance from its own personal best position and the distance from the best particle of the swarm.The performance of each particle.i.e., how close the particle is from the global optimum, is measured using a fitness function which depends on the optimization problem.Each particle i flies through the n-dimensional search R n and maintains the following information: i x , the current position of the particle i ( x -vector).i p , the personal best position of the particle i ( p -vector).i v , the current velocity of the particle i ( v -vector).The personal best position associated with a particle i is the best position that the particle has visited so far.If f denotes the fitness function, then the personal best of particle i at a time step t is updated as : If the position of the global best particle is denoted by gbest, then: The velocity updates is calculated as a linear combination of position and velocity vectors.Thus, the velocity of particle i is updated by using equation 18 and the position of particle i is updated by using equation 19: In the formula, w is the inertia weight, 1 c , and 2 c are the acceleration constants and 1 r , 2 r are random numbers in the rang [0,1], , and if . And Figure (3) shows the flow chart for Particle Swarm Optimization [24].

Fuzzy Backpropagation Network
Artificial neural networks are massively parallel adaptive networks of simple non-liner computing elements called neurons which are intended to abstract and model some of the functionality of the human nervous system in an attempt to partially capture some of its computational strengths.Neural networks are classified as feed forward and feedback networks.Back propagation network is of feed forward type.In BPNN the errors are back propagated to the input level [8].By combining Gath-Geva fuzzy clustering algorithm with backpropagation network, Fuzzy backpropagation neural network was produced.The fuzzy backpropagation neural network (FBPNN) algorithm is as follows [8][25] and [26]: Step 1: create initial random weights for network nodes .
Step 2: A vector pair   p p T X , of the training set, is selected in random.calculate output for each node in each layer L in network.
Step 3 : calculate the error between actual output pj out and target output, and use the actual output Step 4: calculate  value for each hidden layer

And
Step 5: update the weights by adding i z to the standard update weight equation for backpropagation network, then this equation becomes as follows: L pi Step 5 : return to step 2 , repeated for each pattern of training set.
Figure (4) shows the structure of FBP network, The number of the input nodes in FBP is (256 nodes) in input layer for image that have resolution (256 x 256), and equal(300 nodes) in input layer for image that have resolution (300 x 250) , and 6 nodes in hidden layer which randomly selected, the output is 15 nodes which are equal to number of cluster center.Table (4) shows the comparison between K-means, G-G FCA, PSO, and Fuzzy BP for image compression.The FBP is better than other methods were used in this research (K-means, G-G FCA, and PSO), because FBP method obtained higher compression ratio CR, and lower BitPerPixels BPP.