<<

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528

The Run Length Encoding for RGB Images Pratishtha Gupta1, Varsha Bansal2 , Banasthali University, Jaipur, Rajasthan, India1 Computer Science, Banasthali University, Jaipur, Rajasthan, India2

Abstract: This document presents the basically the implementation of Run Length Encoding that is one of the lossless image compression technique. This paper gives the implementation of Run length encoding compression which is capably well-matched for RGB images data. Here considered painted and natural images for the examination of implemented scheme. By this technique image can be compressed and occupy short space in memory, and improve the performance and result of the system. There for that RUN LENGTH ENCODING split big sequences of runs that totally affects compression ratio into small sequences of runs without degrading the quality of image.

Keyword:RLE (run length encoding), image compression, R (Red), G (Green ), B(blue). AAAAAAAAAAABAAAAAAAAAAAABBBAAAAAAAA Introduction of Image Compression AAAAAAAAAAAAAAAABAAAAAAAAAAAAAA Here apply the run-length encoding for image compression Image compression and processing is currently a well-known algorithm to the above scan line, we get the following: context for computer science countryside. Essentially, image compression is the processes of images that (12A) (1B) (12A) (3B) (24A) (1B) (14A). change the images into small codeword without any loss of important information. The image compression process 12 A, means 12 count of white color , (3B) 3 provides the most favorable for consumption for storage, means count of black color pixel and so on. Nagarajan A. et al, [2]. The less size of images allows more images to be stored in a Run Length Encoding Scheme less memory space or disk drive. It also uses short time slot for images to be sent over the network or downloaded from web The basic scheme of run length encoding is to improve the pages. Gupta G. et al [1].In other words, the basic enthusiasm of system working and performance. This technique helps to image compression is using short amount of data to represent decrease the memory that is obtain by Images. Run Length the innovative image without compromising with information. Encoding technique and helps to increase the compression And reduce the size of image for decrease the transmission velocity This paper planned some alteration in RLE scheme; time. this modification provides major improvement in compression velocity of image data.

Introduction of Run length encoding First of all , analyzing the inputting RGB image at the first step of algorithm. If there are any large sequences of equivalent RLE (Run-length encoding) is a very popular ,simple and easy intensity or pixel value, that may require the big number of bit concept of , in which the count of rate of same for represent the length of each run. In proposed method if pixel data is stored as a single data value and single count. This is of input image contains same or nearest value with its adjacent most useful for the images that contains many such runs, huge pixel then both pixel values consider as a same data or number of same data value : for example, a simple RGB image intensity value in RGB image, Joseph S., at al.[5] such as same color occur many time. It is less helpful with RGB images that don't have many runs or same value data as it could to a great extent increase the files size The Run length Proposed Methodology encoding technique performs a of input images that is based on sequences of The basic viewpoint behindhand the selecting Run Length identical values (runs), Amin A.,et al. [4] Encoding (RLE) technique, that is loss less technique and based on inherent property of images data and they have same patterns in nearest pixel area of image. Specifically the Basic Working of Run Length Encoding intensity of two is very much same in nearest area. This belongings of image is exploited to design a very effective Here, let’s take the example of image and perform the run image compression technique. The technique basically used in length encoding. There will be too much long runs of white this compression area and Run Length Encoding (RLE) are pixels, and short runs of black pixels. Here considered take a described in this segment of document. Here consider Run single scan line or row of image with B representing a black Length compression for given image. The bellow image has pixel and W representing white pixel.

1

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528 RGB color combination. Image read from first pixel of image Step 3: For reconstructing compressed image, and starts compression. a. Construct the ith row of compressed image with putting run length value in reconstruct array from compressed array. b. Then construct i+1th row then next row and so on. Step 4: Step 3 is repeated until reconstruct array fill by value fig 1. RGB image with pixel value. of compressed array. Step 5: Reconstruct array, store as a decompressed image • Here each cell of represents the pixel. file. • This algorithm scans image one row at a time. This technique shows result as above manner. • For example the result is shows as a ,”2R 2G 3B” that is represents 2R means 2 pixels of red color. 2G means 2 pixels of green color. 3B means 3pixels of blue color. And so on.

The basic steps of proposed algorithm of Run Length Encoding are as follow

Compression Step 6: Display the decompressed image file. Step 1: Firstly, Input the colored source image file.

Step 2: Find out the size of source image by following statement

[row,col,dim]=size(I);

Step 3: Read pixel values from first pixel of source image by help of this statement X=impixel (I,i,j); Here i=row; J= columns; I= Image;

Step 4: Read next pixel value, if current pixel is end of the Test Result image then exit from loop otherwise (i).If next pixel value is same from previous than Input: This function takes source colored images. Count = count+1; Output: This function provides the compressed image file. (ii). Else if mismatch in value of next pixel as the previous than save as the new value of pixel in array.

Step 5: Read and count all the value of pixel.

Step 6: Go to step 4 until all pixel read . Step 7: Display the result array with intensity value.

Decompression

Step 1: Firstly Read compressed array which store the intensity value and attain the image size.

Step 2: Generate the vacant array for reconstruction of Figure 2. bag.jpg compressed image. New array ( : , : ,1:3); Before compression of Bag.jpg image

2

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528 Size row =235 Before compression for Thumbnail.jpg image Col = 300 = 1692000 bits Size row = 1692000/8 = 360990 bytes 699 Col = 697 = 11692872 bits After compression of above image 11692872/8 = 1461609 bytes Compression percentage is 82.5% After compression of above image Compression percentage is 20.29%

Examination of Run Length Encoding Technique for Colored Image

According to result of Run Length Encoding scheme, This technique of compression works efficiently where large areas of similar pixel value takes place in image data. In the image data ‘Bag.jpg’, RLE compression technique shows much more compression percentage that is 82.5% because here is large number of pixels have same value in it. Now, consider the ‘Thumbnail.jpg’ image, this image slightly compressed than ‘Bag .jpg’ image data because there are many colors present in Name Row Col RGB bits Total size Size in Array Array Compression Compression (i) (j) before bytes size in size calculation Percentages. compression row in col Bag.jpg 235 300 16*3=48 360990 1397184 96 1397184/ 82.5% 1692000 bytes 1692000 bits *100 Thumbnail. 699 697 16*3=48 11692872 1461609 2373408 96 2373408/ 20.29% jpg bits bytes 11692872 *100

Table 1. This table contains the result of run length encoding scheme. it.

Conclusion

This Document provide a working of Run Length Encoding compression technique (RLE) of RGB images data. It is the unambiguous from of algorithm that remove the pixel value from image data. Compression is very much useful and important part of Image Processing filed. Fundamentally these methodology will discover complete use in Medical image, GIS images (geographical ), because these type of image has large area of identical pixel pattern.

Figure 3. Thumbnail

IN RUN LENGTH ENCODING SCHEME” International Journal of Engineering Trends and Technology- July to Aug Issue 2011

References

[2] Gupta G., Gupta K.L. Jyoti A. , “AN ADVANCED [1] Nagarajan A., Alagarsamy K. “AN ENHANCED COMPRESSION APPROACH WITH RLE FOR IMAGE APPROCH

3

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528 COMPRESSION” International Journal of Advanced Research in Computer Science and Volume 4, Issue 2, February 2014

[3] Akhtarl M.B., Qureshi A.M. , and Islam Q., “OPTIMIZED RUN LENGTH CODING FOR JPGE IMAGE COMPRESSION USED IN SPEC RESEARCH PROGRAM OF IST.( 978-1-61284-941-6/11/$26.00 ©2011 IEEE)

[4] Amin A., Aheman Q. ,Junaid M. Habib M.Y, Anjum W. , “MODIFIED RUN LENGTH ENCODING SCHEME WITH INTRODUCTION OF BIT STUFFING FOR EFFICIENT DATA COMPRESSION” 6th International conference on technology and secured transaction 11-14 December 2011 Abu Dhabi (978-1-908320-00-1-/11/$26.00 @ 2011 IEEE)

[5] Joseph S., Srikanth N. “A NOVEL APPROCH OF MODIFIED RUN LENGTH ENCODING SCHEME FOR HIGH SPEED APPLICATION” International Journal of Science and Research (IJSR) Volume 2 Issue 12, December 2013

.

4

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528

5

Suresh Gyan Vihar University, Jaipur International Journal of Converging Technologies and Management (IJCTM) Volume 1, Issue 1, 2015 ISSN : 2455-7528

6