Top Banner
Lecture #9 High Compression Gal Leonard Keret
48

Lecture #9 High Compression

Feb 23, 2016

Download

Documents

Cole

Lecture #9 High Compression. Gal Leonard Keret. This lecture. Introduction. Why compression. Type of compression. Known Image algorithms. SPIHT algorithm for 2d images. SPIHT algorithm for hyper-spectral images. Introduction. Why hyperspectral Imaging ? How does the process work?. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture #9 High Compression

Lecture #9

High Compression

Gal Leonard Keret

Page 2: Lecture #9 High Compression

This lecture

• Introduction.• Why compression.• Type of compression.• Known Image algorithms.• SPIHT algorithm for 2d images.• SPIHT algorithm for hyper-spectral images.

Page 3: Lecture #9 High Compression

Introduction

• Why hyperspectral Imaging? • How does the process work?

Page 4: Lecture #9 High Compression

Why Hyper-spectral Imaging?

–Detection and identification of the surface and atmospheric constituents.–Analysis of soil present.–Monitoring agriculture and forest status.– Environmental studies.–Military surveillance.

Page 5: Lecture #9 High Compression

How does the process work?

1. Images collecting hundreds of narrow bands of data.

2. Each substance has its own spectrum characteristics or diagnostic absorption features.

3. Comparing its resulting spectrum features with known substances, reveals the information about the composition of the area.

Page 6: Lecture #9 High Compression

Collecting the information

• Gain high resolution spectrum information is generate massively large image data sets.

• Access and transport of these data sets will stress processing, storage and transmission capabilities.

Page 7: Lecture #9 High Compression

How big?

• AVIRIS - A typical hyperspectral imaging system, has 224 sensors. Each sensor has a wavelength sensitive range of approximately 10 nanometers. Covering range between 380 - 2500 nm.

• If each band is 615 X 512 scans (pixels), with one byte per pixel, the whole data set will be over 70 Mbytes.

• AVIRIS can yield 16 Gigabytes of data per day!

Page 8: Lecture #9 High Compression

The Solution

Compression

Page 9: Lecture #9 High Compression

Types of Compression

• Lossless – reduces the redundancy of data sets without losing any information. This is a reversible process. Compression ratio is about (2-3):1.

• Lossy – reduces the redundancy of data sets by losing information. Not a reversible process.

Page 10: Lecture #9 High Compression

Examples

• Lossless: • Lossy:

Page 11: Lecture #9 High Compression

Lossless

• There are algorithms based on pixel predictions.

• Hyper spectral images have two main forms of correlations:– Near-allocated bands have very high correlation.– adjacent pixels are likely to have similar spectral

signatures

Page 12: Lecture #9 High Compression

Bands Correlation

• Each band is considered as an individual 2D image.

• Pixels from the current band and from the previously coded bands are involved in prediction of the current pixel.

• We use the previous band pixel value and the current band value to predict the value .

Page 13: Lecture #9 High Compression

Bands Correlation

• We use and to get horizontal, vertical and spectrum gradients.

• Horizontal - • Vertical - • spectrum -

Page 14: Lecture #9 High Compression

Pixels Correlation

• The value of pixel X can be predicted by the other three pixels.

• results show that the first prediction function obtains the best performance.

Page 15: Lecture #9 High Compression

Coding

• Coding is the final phase of the algorithm.• We use entropy coding, like:– Huffman coding.– Arithmetic coding.– Rice coding. – Golumb coding.

Page 16: Lecture #9 High Compression

Lossy

• Significantly higher compression ratio then of lossless compression.

• The goal is to achieve as high as possible compression ratio without losing important information.

Page 17: Lecture #9 High Compression

Algorithms:

• BMP - uncompressed• GIF - lossless compression• JPEG – lossy compression• 2D-SPECK – similar to 2D-SPIHT• 2D-SPIHT

Page 18: Lecture #9 High Compression

SPIHT

• Set Partitioning In Hierarchical Trees.• Encoder and decoder.• Based on Discrete Wavelet Transform, and

sorting coefficients before transmission.• Low complexity.• Fast in encoding and decoding.• “State of the art”.

Page 19: Lecture #9 High Compression

Wavelet Transform

• Conversion of periodic signal (repeats its values in regular intervals or periods) into the sum of a infinite set of simple oscillating functions, based on sines and cosines.

• Captures both frequency and location information (location in time).

Page 20: Lecture #9 High Compression

based on Fourier Transform

𝐹 (𝑥 )= 1√2𝜋∫ 𝑓 (𝑡)¿¿

{𝑢0 ,𝑢1 ,𝑢2 ,𝑢3 ,…,𝑢𝑛}

-

Page 21: Lecture #9 High Compression

From Time domain to Frequency domain

Page 22: Lecture #9 High Compression

Wavelet Transform to Discrete Wavelet Transform

Page 23: Lecture #9 High Compression

Wavelet Transform

• “Applying a 2-D DWT to an image results in a sparse representation.”

Page 24: Lecture #9 High Compression

• The original image is transformed from low frequencies to higher frequencies.

• Each image describing local changes in brightness (details) in the original image.

An example of the 2D discrete wavelet transform that is used in JPEG2000

Page 25: Lecture #9 High Compression

Example

Low magnitude

High magnitude

Page 26: Lecture #9 High Compression

SPIHT2D vs JPEG

• images compressed with JPEG (using xv) and with SPIHT to exactly the same file size.

Page 27: Lecture #9 High Compression

SPIHT

• Encoder and decoder are built on the same sorting algorithm.

• No need to save or transmit additional information.

• We do not need to collect all coefficients.• Find which DWT Coefficients are more

relevant.

Page 28: Lecture #9 High Compression

Spectral information

• High frequency = small details (sharpness).• most of an images small details is

concentrated in the high frequency components.

• High magnitude = image information.• Large low activity areas are expected to be

identified in the lowest frequencies.

Page 29: Lecture #9 High Compression

Sorting

• SPIHT sorts coefficients and sends them in decreasing magnitude.

• Starting with the coefficients with the highest magnitude at the lowest pyramid levels.

• A transformed coefficient with larger magnitude has larger information content. and therefore should be transmitted first.

Page 30: Lecture #9 High Compression

Sorting process

The SPIHT multistage encoding process employs three lists and sets:

1. LIP – List of insignificant pixels contains individual coefficients that have magnitudes smaller than the threshold.

Page 31: Lecture #9 High Compression

Encoding process

2. LIS – list of insignificant sets contains sets of wavelet coefficients that are defined by tree structures and are found to have magnitudes smaller than the threshold (insignificant).

• The sets exclude the coefficients corresponding to the tree and all sub tree roots.

Page 32: Lecture #9 High Compression

Encoding process

3. LSP – List of significant pixels is a list of pixels found to have magnitudes larger than the threshold (significant).

4. Set of offspring (direct descendants) of a tree node, , in the tree structures is defined by pixel location .

5. Set of descendants, , of a node is defined by pixel location .6. is defined as

Page 33: Lecture #9 High Compression
Page 34: Lecture #9 High Compression

Encoding process

• For each pixel in LIP, one bit is used to describe its significant, the pixel remains in the LIP and no more bits are generated. Otherwise the pixel is moved to LSP.

• Similarly, each set in the LIS requires one bit for the significance information. The insignificant sets remain in the LIS.

Page 35: Lecture #9 High Compression

Encoding process

• The significant sets are partitioned into subsets, which are processed in the same manner and at the same resolution until each significant subset has exactly one coefficient.

• Finally, each pixel in the LSP is refined with one bit describe its significance.

• This procedure is then repeated each stage resolution.

Page 36: Lecture #9 High Compression

Set the Threshold

• The initial threshold is defined by:

• Each stage, is reduced by one.

• Test: is ?

Page 37: Lecture #9 High Compression

Sorting Algorithm

1. Initialization: – Set .– Set LSP as an empty list.– Add all to the LIP.– Add only that has descendants also to LIS as type

D.

Page 38: Lecture #9 High Compression

Significant function

Page 39: Lecture #9 High Compression

2. Sorting pass:– For each element (i,j) in LIP:

• If then – Move (i,j) to LSP.

– For each element (i,j) in LIS:• If element is of type D then:

– If then» For each

• If then add to LSP.• If then add to LIP.

» If then move (i,j) to LIS as type L.» Else remove (i,j) from the LIS.

• If element is of type L then:– If then

» Add each to LIS as type D.» Remove (i,j) from LIS.

Page 40: Lecture #9 High Compression

3. Quantization step:– decrement n by 1 and go to Step 2.

• If a pixel is not significant, it remains in the LIP and no more information is generated.

Page 41: Lecture #9 High Compression

One of them compressed with SPIHT2D, the other is real.Compression rate 1:2

Page 42: Lecture #9 High Compression

Average decompression times for image compression methods with respect to file size.

Compression ratios and compression speed for some methods

Compression Algorithms

Page 43: Lecture #9 High Compression

Little problem: 2D-SPIHT is suited for 2D images not 3D.

Page 44: Lecture #9 High Compression

From 2D to 3D

• Each band will be (discrete fourier) transformed separately.

• Sorting coefficients should apply for 3D tree (pyramid) instead of 2D.

• One pixel corresponds to eight direct descendant pixels. Instead of four (2D tree).

Page 45: Lecture #9 High Compression

3D SPIHT Algorithm

• Set S is significant if: .

Where denote the transformed coefficients at coordinate .• And the same for:

Significant function:

Page 46: Lecture #9 High Compression

3D-SPIHT (Same - same, different name)

Page 47: Lecture #9 High Compression

Thank U.

Lecture #9

High Compression

Page 48: Lecture #9 High Compression

Bibliography • SPIHT algorithm: http://140.118.16.82/www/index.php/JCIE/article/view/667/281• SPIHT algorithm: http://www.cipr.rpi.edu/research/SPIHT/EW_Code/csvt96_sp.pdf• SPIHT compare with JPEG:

http://www.cipr.rpi.edu/research/SPIHT/spiht5.html• Wikipedia: wavelet transform: http://en.wikipedia.org/wiki/Wavelet_transform• Wikipedia: discrete wavelet transform: http://

en.wikipedia.org/wiki/Discrete_wavelet_transform• Hyperspectral Image Compression Using Three-Dimensional Wavelet Coding - Xaoli

Tang, William A. Pearlman and James W. Modestino.• Lecture #8 (wavelet transform).• Compare: http://www.sciencedirect.com/science/article/pii/S0895611198000421• Lossless Compression of Hyperspectral Images Based on 3D Context Prediction - Lin

BAI, Mingyi HE, Yuchao DAI School of Electronics and Information, Northwestern Polytechnical University Shaanxi Key Laboratory of Information Acquisition and Processing Xi’an, 710072, P.R. China.