Report-1

Report-1 - Run Length Encoding/Decoding EE113D Project...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Run Length Encoding/Decoding EE113D Project Imran Hoque Yipeng Li Diwei Zhang
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction and Background Run length encoding (RLE) is a simple technique to compress digital data by representing successive runs of the same value in the data as the value followed by the count, rather than the original run of values. The goal is to reduce the amount of data needed to be stored or transmitted. The need to use run length encoding often arises in various applications in DSP, especially image processing and compression. Example of RLE: Original 1 1 1 0 0 1 1 1 RLE Representation 1 3 0 2 1 3 As we can see from the above simple example, RLE works the best when applied to data where there are successive runs of the same values. Although one might think that such situations are trivial and not the norm, they actually appear over and over in many fields of DSP. As an example, when applying a low-frequency digital filter against a random input of varying frequencies, all the frequencies above the cut-off frequency will be represented as 0. Thus in the corresponding output, there would be runs of 0’s which could be better represented as the value (0) followed by the count of consecutive 0’s. Another real world application of RLE is in image processing. During image compression, higher spatial “frequencies” are filtered out. This is done by applying a 2-D DFT (Discrete Fourier Transform) or DCT (Discrete Cosine Transform), then
Background image of page 2
stored in the higher spatial frequencies (i.e. the higher spatial frequency components will be 0 or very close to 0). The resulting image is often stored as a vector of values and they are read in from the 2-D matrix using a zig-zag technique that maximizes the number of consecutive 0’s so that RLE would be most efficient. Thus, standard image compression techniques such as JPEG uses RLE extensively, and what we implemented on the DSP would become part of a whole system that does JPEG encoding and decoding. The advantages of RLE encoding is that it’s, in principle, very easy to comprehend and implement compared with other compression techniques used today. However, the compression results depends heavily upon the input. In the best case, RLE can reduce data to merely two numbers if all the values in the original data are exactly the same, regardless of the size of the input. However, in the worst case, that is if there are no repeating values in the data, RLE could actually double the amount of numbers compared with the original data. Thus RLE should only be used in cases where runs of the same value are expected. Another advantage of RLE is a lossless (or reversible) compression technique. That is unlike some other compression techniques, such as JPEG, one can obtain exactly the original data. This is done through an RLE decoder which we have also implemented in both Matlab and assembly code. Project Development
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Report-1 - Run Length Encoding/Decoding EE113D Project...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online