Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is a Wavelet? Haar Wavelet A wavelet is a function that has finite energy and has an average of zero. Here are some examples of mother wavelets:

Similar presentations


Presentation on theme: "What is a Wavelet? Haar Wavelet A wavelet is a function that has finite energy and has an average of zero. Here are some examples of mother wavelets:"— Presentation transcript:

1

2 What is a Wavelet? Haar Wavelet A wavelet is a function that has finite energy and has an average of zero. Here are some examples of mother wavelets: Daubechie’s 4 WaveletDaubechie’s 6 Wavelet Daubechie’s mother wavelets are like fractals: the smaller portions mimic the original wavelet.

3 Why use Wavelets? Sine and cosine functions extend in either direction to infinity, however, wavelets are just for a small portion of time, and are called local. Since wavelets are local we can approximate functions that have spikes, irregularities or are choppy. To use wavelets for compression, a mother wavelet, such as a Haar or Daubechie’s 4 or 6, is selected. To get the best compression, we want to use the wavelet that gives us the greatest number of zeros, while still preserving original picture quality. Thus we tested three different mother wavelets for our project, and Daubechie’s 6 gave us the best results. Wavelets are used within the fields of electrical engineering, mathematics, quantum physics, seismic geology, astronomy, neurophysiology, nuclear engineering, optics and music. More specifically, wavelets are used for sub-band coding, signal and image processing, denoising noisy data, detecting self similarity in a time series, and our favourite, compression. Wavelets give us the ability to cut up the data into different frequency components, which can be matched to the scale or size of the function.

4 Design Specifications For Compression: Input: Pure Video Data from Planar YUV 4:2:0 files Output: Compressed File Desired Compression Ratio: around 10:1…this may vary between samples Maximum Loss: Loss should be kept to a minimum, almost visually lossless For Decompression Input: Compressed File Output: Pure Video Data Decompression algorithm must be able to reverse all encoding done during compression

5 Design Achievements Compression Results: Input: Pure Video Data from Planar YUV 4:2:0 files Output: Compressed File Compression Ratio: around 5 to 1 Decompression Results: Input: Compressed File Output: Pure Video Data Uncompressed file may be played and viewed with almost the same quality as original

6 The Design Decompression: a) Load the.kmw file b) Decode the data c) Perform Inverse Wavelet Transform in three dimensions d) Save video data to a new file Compression: a) Load the file b) Perform Wavelet Transform in three dimensions c) Encode the data d) Save data to a new file (*.kmw)

7 Main Program Transform Block Load_Files Encode Filter Wavelet choice Video file(s) Memory Compressed File Software Layout For Compression Algorithm Load Data Block

8 Main Program Inverse Transform Load Decode Filter Wavelet choice Compressed File Memory Raw Video File Software Layout For Decompression Algorithm

9 Transform Algorithm for Three Dimensions Filter along x Filter along y Filter along t Mother Wavelet Filter = ? Transform Choose Haar Wavelet

10 Inverse Transform Algorithm for Three Dimensions Filter along y Filter along x Filter along t Mother Wavelet Filter = ? Inverse Transform Choose Haar Wavelet

11 Encoding Process To encode the data, first we quantized our numbers. To quantize one must divide by the maximum value of the data, and multiply by 2 bits used. Then we reduced the number of bits for each filtered data point. Depending on the set of data, and its importance, we keep a certain number of bits, one for the sign, and the other for data. We will also note the maximum value of the data, so that decoding will be easier. When we quantize and reduce the number of bits for the data we are losing information, so we will have a lossy compression. 000000000 000000101 The next part of the encode process removed bytes of zeros, and bytes that had a value of one, and replaced them with two bit. This process was iterated as long as the size of the file would be smaller.

12 Filtering 2 22 2 A one dimensional Haar Filter + A0 B0C0D0 A1B1C1D1 E{…f2, f1, f0} Signals:

13 3-D Filtering 2 2 Filter H0 Filter H1 2Filter H0H0 2 Filter H0H0H0 2 Filter H0H0H1 2Filter H0H1 2 Filter H0H1H1 2 Filter H0H1H0 2Filter H1H0 2Filter H1H0H0 2 Filter H1H0H1 2Filter H1H1 2Filter H1H1H1 2Filter H1H1H0 DATA X-DIRECTION Y-DIRECTION T-DIRECTION

14 3-D Filtering + Filter F0F0 Filter F0F1 Filter F1F0 Filter F1F1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Filter F0 Filter F1 Y-DIRECTION X-DIRECTION T-DIRECTION Filter F0F0F0 Filter F0F0F1 Filter F0F1F1 Filter F0F1F0 Filter F1F0F0 Filter F1F0F1 Filter F1F1F1 Filter F1F1H0

15 Video File Format Our video file format is Planar YUV 4:2:0. This video files comes from the MPEG format, so the video clip is already compressed. This made our task more difficult, as there is little room for improvement. Planar YUV 4:2:0 is broken down into luminance (Y) and red (U) and blue (V) chrominance parts. This is because the human eye does not detect a big difference between colour as it does between light and dark. The original picture is 720 by 480. The luminance is 720 by 480, and each of the chrominance is 360*240. The video clip we have is from the start of the movie “Eyes Wide Shut”. It contains a part with the opening credits, a brighter portion and a darker portion. This should give us unbiased results for our compression ratio.


Download ppt "What is a Wavelet? Haar Wavelet A wavelet is a function that has finite energy and has an average of zero. Here are some examples of mother wavelets:"

Similar presentations


Ads by Google