Sei sulla pagina 1di 18

CHAPTER ONE

INTRODUCTION
1.0 BACKGROUND TO THE STUDY
Now-a-days many data compression techniques are evolved with high compression rate.
In these Techniques input date is to be encoded. By using the techniques the input data is to be
compressed. To compress the original input data or to reduce the input data it will never effect
the original information and it is possible to consume less power for data transmission. It is
possible to transmit the data efficiently by using these methods; there two compression methods.
One is Lossless compression and the other is Lossy compression method. In this paper loss less
compression technique is implemented. This algorithm is described using VHDL language and is
simulated using Xilinx ISE simulator.

The aim is to compress the input data using loss less compression method. It has low
power consumption, reduced time delay. Loss less is only effective with media elements that can
still 'work' without all their original data. These include audio, video, images and detailed
graphics for screen design (computers, TVs, projector screens). One of the
disadvantages of loss less compression is that if the compressed file size is more due to of
redundancy to be compressed, then the quality will degrade drastically.

In this paper loss less data compression technique is used. Loss less data compression
looks for 'redundant' pixel information is to be defining like a function (x, y). This means that
when the file is decompressed the original data will not retrieve with a small error. Here both the
techniques have their own advantages. The data from the user is obtained in which the data
would be stored in FIFO. So as to get synchronization between receiver and the compressor,
FIFOs are used and the FIFO would assign the priorities to the data obtained. Then the data is
transferred to the COMPRESSOR block at which it would compress the data and would give the
data to the output FIFO. Output FIFO is used to synchronize data coming from the compressor
and the data that is transmitted through the communication channel. The decompression was also
the same fashion there would be two FIFO‟S and a DECOPRESSOR block which would
decompress the data obtained from the FIFO and the FIFO gets the data from the transmitter.
Run-Length Encoding, as an important compression method for raster data, is broadly
applied in storing GIS spatial data. The present researches on Run-Length Encoding pay more
attention on the realization and optimization of the compression, encoding and decoding, while
less on the raster operations that on the basis of Run-Length Encoding data structure. The raster
operations, easy to be realized, are all kinds of algebraic and logical operations targeted at the
attribute of raster grid; Run-Length Encoding could not only compress the raster data effectively,
but also retain the intuition feature of raster data (Pujar & Kadlaskar, 2010). The RLE algorithm
performs a lossless compression of input data based on sequences of identical values (runs). It is
a historical technique, originally exploited by fax machine and later adopted in image processing.
The algorithm is quite easy: each run, instead of being represented explicitly, is translated by the
encoding algorithm in a pair (l, v) where l is the length of the run and v is the value of the run
elements.
The longer the run in the sequence to be compressed, the better is the compression ratio.
All the smaller sequences that may result in expansion of data are kept out of RLE. The single
zeros/ones, double zeros/ones that contribute in expanding data are ignored. Such sequences are
left untouched and run length encoding scheme is not applied on them. The v in (l ,v) or value of
a run is not a single zero or one, as a single zero or one will be mixed with the ignored
sequences. The value of v is taken as the smallest consecutive sequence that is considered for
RLE. Consider a data 444444555566666. If the modified scheme is applied and defines the data
which is repeated as a function, the output comes out to be (4, 6), (5, 4), (6, 5). The value of a
run is defined to send efficiently. Before compression it needs 15 bytes, but after compression
the total bytes required to transmit is 6 bytes only. So the total file size is to be reduced from 15
to 9 bytes and need less power to transmit the data.

Image processing and compression is currently a prominent context for computer science
field. Basically, image compression is the processes of images that encode the images into small
code without any loss of information. The image compression process provides the optimum
utilization for storage, (Gupta et al, 2014). The small size of images allows more images to be
stored in a memory space or disk drive. It also required less time for images to be sent over the
Internet or downloaded from web pages. (Nagarajan et al 2011).In other words, the basic
motivation of image compression is using short quantity of information to represents the original
image without loss of information. And reduce the size of image for decrease the transmission
time.

RLE (Run-length encoding) is a very easy and simple technique of data compression, in
which the count of occurrence of same data is stored as a single data value and single count.

This is most useful for the data that contains many such runs: for example, a simple
colored image such as same color occur many time. It is less useful with images that don't have
many runs as it could greatly increase the files size The Run length encoding technique performs
a lossless compression of input images that is based on sequences of identical values (runs),
(Amin, et al. 2011) In other word, the run length encoding scheme only encodes the consecutive
number of same color pixels the probability of occurrence of consecutive same color is very
high.

Run Length Encoding provides efficient compression of data, whereas the data with
large number of runs or large number pixel contains same intensity value. But this encoding also
has the drawback; RLE scheme does not always provide data compression. In some case where
runs are smaller length or each pixel value has different intensity value from its adjacent pixel,
this method performs very poorly and instead of compressing data (Akhtarl, et al., 2011).

1.2 STATEMENTS OF THE PROBLEM

Now a day’s communication plays a vital role and it is the main aspect in the present
world. Due to these rapid changes data (images) are transmitted effectively and efficiently but it
takes large time and power conception to transmit it. This transmission waste a lot of time, thus
we are proposed to the development of an image compression and decompression using Run
Length Encoding Algorithm which will provide efficient compression of data and save a lot of
time when transmitting images.

1.3 AIM AND OBJECTIVES


The aim of this research work is to develop an image compression and decompression
system using Run Length Encoding Algorithm. The objectives are as follows:

i. To eradicate the stress faced when transmitting data (images) on the system using
Run Length Encoding Algorithm.
ii. To develop the system using C# programming language.
iii. To develop a user-friendly application for image compression and decompression.

1.4 SIGNIFICANCE OF THE STUDY


The main importance of this system is that it helps to fasten or hasten the time of
transmission of data (images) on a system. It also helps to decrease the data rate, the data can be
compressed and it would be transmitted in an efficient manner.

1.5 SCOPE AND LIMITATION OF THE STUDY


The scope of this study focuses mainly on image compression and decompression system
using Run Length Encoding Algorithm. It does not go beyond compression and decompression
of images.
1.6 ORGANISATION OF REPORT
This report is divided to five chapters as stated below. Chapter one deals with the general
introduction and overview of the whole research. It also discusses the statement of the problem,
aim and objectives of the proposed system, significance of the study, scope and limitations of the
project as well as organization of the report.
Chapter two deals with the literature review, it reviews the related topics to the project,
discussion of related aspect of the project topic relative to computer technology is also treated.
Chapter three deals with analysis of the system which include the data collection method
employed, the description of the existing system and its problems and the description of the
proposed system and possible advantages it will provide the will solve problems encountered in
the existing manual system.
While chapter four deals with the design, implementation and the description of the
proposed system. It also covers description of the output design, input design, database design
and procedure design. The implementation techniques used, the programming language used in
developing the new system and system requirements for running the system. And it talks about
the program documentation as well user documentation.
Finally, chapter five presents a brief summary of the work done, experience gained and
problems encountered in the course of the project, conclusion and recommendation.
CHAPTER TWO

LITERATURE REVIEW

2.1 REVIEW OF RELATED WORKS


VidyaSagar and Rose (2013), wrote an article on “Modified Run Length Encoding
Scheme for High Data Compression Rate” Now a day’s communication plays a vital role and it
is the main aspect in the present world. Due to of this rapid changes are occurred and to transmit
the data effectively and efficiently and it takes large time and power conception to transmit it. So
it needs to decrease the data rate, the data can be compressed and it would be transmitted in an
efficient manner. The efficient manner of compression data is to use Run Length Encoding
(RLE) method. In this paper data compression uses Run Length Encoding (RLE) because the
compression is very ability and would be having an exact output and an easy way to understand
to implement. This algorithm is implemented by writing VHDL description and is simulated
using Xilinx ISE software simulation tools. The paper deals mainly about data compression.
There are two types of compressions - one is loss less data compression and other is lossy data
compression. In this paper loss less data compression technique is used. Both techniques have
their own advantages. Advantage of lossless compression is that it can send the data efficiently.
It has low power consumption, reduced time delay. This include audio, video, images and
detailed graphics for screen design (computers, TVs, projector screens). One of the
disadvantages of loss less compression is that if the data has less repentance bytes then it takes
more bits than the original data (VidyaSagar & Rose, 2013).
Varsha, Pratishtha and Suhail (2014), wrote an article on “The Implementation of Run
Length Encoding for RGB Image Compression” This research paper presents 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 algorithm which is proficiently
suited for RGB images. Here considered colored and natural images for the inspection of
implemented technique. By which image can be compressed and occupy lesser space in memory,
and improve the performance of the system. Such that run length encoding split larger sequences
of runs that affects compression ratio into small sequences of runs without degrading the quality
of image (Varsha, Pratishtha & Suhail, 2014).
Frank (2016), wrote an article on “Binary image compression using run length encoding
and multiple scanning techniques” While run length encoding is a popular technique for binary
image compression, a raster (line by line) scanning technique is almost always assumed and
scant attention has been given to the possibilities of using other techniques to scan an image as it
is encoded. This thesis looks at five different image scanning techniques and how their
relationship to image features and scanning density (resolution) affects the overall compression
that can be achieved with run length encoding. This thesis also compares the performance of run
length encoding with an application of Huffman coding for binary image compression. To realize
these goals a complete system of computer routines, the Image, Scanning and Compression
(ISC) System has been developed and is now available for continued research in the area of
binary image compression (Frank, 2016)
Yanhu, Yongfeng, Guoyong and Kaiqun (2017), wrote an article on “AN ENHANCED
RUN-LENGTH ENCODING COMPRESSION METHOD FOR TELEMETRY DATA” The
telemetry data are essential in evaluating the performance of aircraft and diagnosing its failures.
This work combines the oversampling technology with the run-length encoding compression
algorithm with an error factor to further enhance the compression performance of telemetry data
in a multichannel acquisition system. Compression of telemetry data is carried out with the use
of FPGAs. In the experiments there are used pulse signals and vibration signals. The proposed
method is compared with two existing methods. The experimental results indicate that the
compression ratio, precision, and distortion degree of the telemetry data are improved
significantly compared with those obtained by the existing methods. The implementation and
measurement of the proposed telemetry data compression method show its effectiveness when
used in a high-precision high-capacity multichannel acquisition system (Yanhu, Yongfeng,
Guoyong & Kaiqun, 2017).
Samir, Tuhin and Avishek (2011), wrote an article on “Image Compression using
Approximate Matching and Run Length” Image compression is currently a prominent topic for
both military and commercial researchers. Due to rapid growth of digital media and the
subsequent need for reduced storage and to transmit the image in an effective manner Image
compression is needed. Image compression attempts to reduce the number of bits required to
digitally represent an image while maintaining its perceived visual quality. This study
concentrates on the lossless compression of image using approximate matching technique and
run length encoding. The performance of this method is compared with the available jpeg
compression technique over a wide number of images, showing good agreements (Samir, Tuhin
& Avishek, 2011).

2.2 REVIEW OF GENERAL TEXT

Images may be worth a thousand words, but they generally occupy much more space in a
hard disk, or bandwidth in a transmission system, than their proverbial counterpart. So, in the
broad field of signal processing, a very high-activity area is the research for efficient signal
representations. Efficiency, in this context, generally means to have a representation from which
we can recover some approximation of the original signal, but which doesn’t occupy a lot of
space. Unfortunately, these are contradictory requirements; in order to have better pictures, we
usually need more bits.
The signals which we want to store or transmit are normally physical things like sounds
or images, which are really continuous functions of time or space. Of course, in order to use
digital computers to work on them, we must digitize those signals. This is normally
accomplished by sampling (measuring its instantaneous value from time to time) and finely
quantizing the signal (assigning a discrete value to the measurement) (Diniz, Silva & Netto,
2002). This procedure will produce long series of numbers. For all purposes of this article, from
here on we will proceed as if these sequences were the original signals which need to be stored
or transmitted, and the ones we will eventually want to recover. After all, we can consider that
from this digitized representation we can recover the true (physical) signal, as long as human
eyes or ears are concerned. This is what happens, for example, when we play an audio CD. In
our case, we will focus mainly on image representations, so the corresponding example would be
the display of a picture in a computer monitor. However, the discussion in this paper, and
especially the theory developed here, apply equally well to a more general class of signals.
There are many applications requiring image compression, such as multimedia, internet,
satellite imaging, remote sensing, and preservation of art work, etc. Decades of research in this
area has produced a number of image compression algorithms. Most of the effort expended over
the past decades on image compression has been directed towards the application and analysis of
different coding techniques to compress the image data. Here in this paper also, we have
proposed a two step encoding technique that transforms the image data to a stream of integer
values. The number of values generated by this encoding technique is much less than the original
image data. The main philosophy of this encoding technique is based on the intrinsic property of
most images, that similar patterns are present in close locality of images.
The coding technique makes use of this philosophy and uses an approximate matching
technique along with the concept of run length to encode the image data into a stream of integer
data. Experimental results over a large number of images have shown good amount of
compression of image size.
2.3 Working of Run Length Encoding
Here, let’s take the example of image and perform the run length encoding. There will be
too much long runs of white pixels, and short runs of black pixels. Let us take a single scan line
or row of image with B representing a black pixel and W representing white pixel.
WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWW
WWWWWWWWWWBWWWWWWWWWWWWWW Here apply the run-length encoding
for image compression algorithm to the above scan line, we get the following:
(12W) (1B) (12W) (3B) (24W) (1B) (14W). 12 W, means 12 count of white color pixel, and so
on.
Modified Run Length Encoding Scheme
The basic scheme of run length encoding is to improve the system working and
performance. Decrease the memory used by Run Length Encoding (RLE) technique and increase
the compression rate. This paper proposed some modification in RLE scheme; this modification
provides prime improvement in compression rate of image data.
Firstly, analyzing the inputting color image at the starting step of algorithm. If there are
any big sequences of same intensity or pixel value, that may need the large number of bit for
represent the length of each run. In proposed method if pixel of input image contains same or
nearest value with its adjacent pixel then both pixel values consider as a same data or intensity
value in RGB image (Joseph et al. 2013).
Types of Compression Method

A. Lossless compression method

Most lossless compression programs do two things in sequence: the first step generates a
statistical model for the input data, and the second step uses this model to map input data to bit
sequences in such a way that "probable" (e.g. frequently encountered) data will produce shorter
output than "improbable" data.
The primary encoding algorithms used to produce bit sequences are Huffman coding
(also used by DEFLATE) and arithmetic coding. Arithmetic coding achieves compression rates
close to the best possible for a particular statistical model, which is given by the information
entropy, whereas Huffman compression is simpler and faster but produces poor results for
models that deal with symbol probabilities. There are two primary ways of constructing
statistical models: in a static model, the data is analyzed and a model is constructed, then this
model is stored with the compressed data. This approach is simple and modular, but has the
disadvantage that the model itself can be expensive to store, and also that it forces using a single
model for all data being compressed, and so performs poorly on files that contain heterogeneous
data. Adaptive models dynamically update the model as the data is compressed. Both the encoder
and decoder begin with a trivial model, yielding poor compression of initial data, but as they
learn more about the data, performance improves. Most popular types of compression used in
practice now use adaptive coders.

Lossless compression methods may be categorized according to the type of data they are
designed to compress. While, in principle, any general-purpose lossless compression algorithm
(general-purpose meaning that they can accept any bit string) can be used on any type of data,
many are unable to achieve significant compression on data that are not of the form for which
they were designed to compress. Many of the lossless compression techniques used for text also
work reasonably well for indexed images.

B. Lossy compression method

Lossy data compression has of course a strong negative connotation and sometimes it is
doubted quite emotionally that it is at all applicable in medical imaging. In Transform encoding
one performs for each image, run a mathematical transformation that is similar to the Fourier
Transform thus separating image information on gradual spatial variation of brightness (regions
of essentially constant brightness) from information with faster variation of brightness at edges
of the image (compare: the grouping by the editor of news according to the classes of contents).
In the next step, the information on slower changes is transmitted essentially lossless (compare:
careful reading of highly relevant pages in the newspaper), but information on faster local
changes is communicated with lower accuracy (compare: looking only at the large headings on
the less relevant pages). In image data reduction, this second step is called quantization. Since
this quantization step cannot be reversed when decompressing the data, the overall compression
is “lossy” or “irreversible”.
CHAPTER THREE
METHODOLOGY AND ANALYSIS OF THE SYSTEM
3.1 RESEARCH METHODOLOGY

Run-length encoding (RLE) is a very simple form of data compression in which runs of
data (that is, sequences in which the same data value occurs in many consecutive data elements)
are stored as a single data value and count, rather than as the original run. This is most useful on
data that contains many such runs: for example, simple graphic images such as icons, line
drawings, and animations. It is not useful with files that don't have many runs as it could greatly
increase the file size. RLE may also be used to refer to an early graphics file format supported by
CompuServe for compressing black and white images, but was widely supplanted by their later
Graphics Interchange Format. RLE also refers to a little-used image format in Windows 3.x, with
the extension “rle”, which is a Run Length Encoded Bitmap, used to compress the Windows 3.x
startup screen. Typical applications of this encoding are when the source information comprises
long substrings of the same character or binary digit.

All the smaller sequences that may result in expansion of data are kept out of RLE. The
single zeros/ones, double zeros/ones that contribute in expanding data are ignored. Such
sequences are left untouched and run length encoding scheme is not applied on them. The v in
(l,v) or value of a run is not a single zero or one as a single zero or one will be mixed with the
ignored sequences. We take the value of v as the smallest consecutive sequence that is
considered for RLE. Consider a data 444444555566666. If we apply modified scheme and define
the data which is repeated as a function. The output comes out to be (4, 6), (5, 4), (6, 5). The
value of a run is defined to send efficiently.

3.2 ANALYSIS OF THE EXISTING SYSTEM

The existing system of compressing images simply involves people to put their images in a

folder and after that zip it so that the size can reduce a bit. This form of compression is still

heavy when it comes to real image compression technique.


3.3 PROBLEMS OF EXISTING SYSTEM
Some problems of the existing system are listed below:
i. Transmission of image data is time consuming.
ii. It is not efficient.
iii. It has high compression rate.
3.4 DESCRIPTION OF THE PROPOSED SYSTEM
The basic philosophy behindhand the selecting Run Length Encoding technique, that is
loss less technique and based on intrinsic property of images and they have same patterns in
nearest pixel area of image. Specifically the intensity of two pixels is very much same in nearest
area. This property of image is exploited to design a very effective image compression technique.
The technique used in this compression methodology and run length coding are described in this
section. Here consider run length compression for given image. The bellow image has RGB
color combination. Image read from first pixel of image and starts compression.

Fig 1. RGB image with pixel value.

 Here each cell of matrix represents the pixel.


 This algorithm scans image one row at a time.
 This technique shows result as above manner.
 The result of first row,”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 following.
Compression Step 1: Input the RGB source image file. Step 2: Find out the size of source
image

Step 3: Read pixel values from first pixel of source image.

Step 4: Read next pixel value, if current pixel is last then exit otherwise

a. If next pixel value that is j and j+1 is same as the previous pixel value then Count = count+1;
b. Else Any mismatch in RGB 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 with count of same intensity value of pixel.
Fig 2. flow chart of compression

Decompression

Step 1: Read the compressed array and obtain the image size.

Step 2: Create the blank array for reconstruction of compressed image.


Step 3: For reconstructing compressed image, 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 of compressed array.

Step 5: Reconstruct array, store as a decompressed image file.

Step 6: Display the decompressed image file.

Fig 3.Flow chart of decompression


3.5 ADVANTAGES OF THE PROPOSED SYSTEM
The proposed system has the following advantages over the existing system:
i. It compresses images in an efficient manner.
ii. It saves a lot of time during transmission.
iii. It is user friendly.
REFERENCE

Akhtarl, M.B., Qureshi, A.M. & Islam Q. (2011). “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)
Amin, A., Aheman, Q. Junaid, M. Habib, M.Y. & Anjum W. (2011). “MODIFIED RUN
LENGTH ENCODING SCHEME WITH INTRODUCTION OF BIT STUFFING FOR
EFFICIENT DATA COMPRESSION” 6th International conference on internet
technology and secured transaction 11-14 December 2011 Abu Dhabi (978-1-908320-00-
1-/11/$26.00 @ IEEE)
Gupta, G., Gupta, K.L. & Jyoti, A., (2014). “An Advanced Compression Approach with RLE for
Image Compression”, International Journal of Advanced Research in Computer Science
and Software Engineering Volume 4, Issue 2, February.
Joseph, S. & Srikanth, N. (2013). “A NOVEL APPROCH OF MODIFIED RUN LENGTH
ENCODING SCHEME FOR HIGH SPEED DATA COMMUNICATION APPLICATION”
International Journal of Science and Research (IJSR) Volume 2 Issue 12, December.
Nagarajan, A. & Alagarsamy, K. (2011). “An Enhanced Approch in Run Length Encoding
Scheme”, International Journal of Engineering Trends and Technology- July to Aug
Issue.
Pujar, J.H. & Kadlaskar, L.M. (2010). "A New Lossless Method of Image Compression and
Decompression Using Huffman Coding Techniques", Journal of Theoretical and Applied
Information Technology 15 (1): 18–23.
Frank, J. M. (2016). “Binary image compression using run length encoding and multiple
scanning techniques” Rochester Institute of Technology RIT Scholar Works
Samir, K. B., Tuhin, U. P. & Avishek, R. (2011). “Image Compression using Approximate
Matching and Run Length” (IJACSA) International Journal of Advanced Computer
Science and Applications, Vol. 2, No. 6, 2011
Varsha, B., Pratishtha, G. & Suhail, T. (2014). “The Implementation of Run Length Encoding for
RGB Image Compression” International Journal of Advanced Research in Computer
Engineering & Technology (IJARCET) Volume 3 Issue 12, December 2014
VidyaSagar, M. & Rose, V.J.S. (2013). “Modified Run Length Encoding Scheme for High Data
Compression Rate” International Journal of Advanced Research in Computer
Engineering & Technology (IJARCET) Volume 2, Issue 12, December 2013 ISSN: 2278
– 1323

Potrebbero piacerti anche