Image Compression Flashcards
What is Variable Length Encoding?
Assigning fewer bits to the more probable grey levels than to less probable ones can achieve data compression e.g. build a codebook, replace ‘true’ pixel values with code
This is lossless - process can be reversed by inverting the codebook
What is Spatial Redundancy?
Neighbouring pixels often have similar values
Compression based on spatial redundancy involves some element of pixel grouping, or transformation
Simplest example is RLE (Run-Length Encoding - requires adjacent pixels to be equal)
What is psychovisual redundancy?
Some grey level and colour differences are imperceptible, goal is to compress without noticeable change to the image
For example, add a small random number to each pixel before quantisation
How do you evaluate compression?
Using Fidelity Criteria - success is judged by comparing original and compressed versions
Some measures are objective e.g. root mean square error or signal to noise ratio
What makes up an Image Compression System?
Mapper - transforms input data in a way that facilitates reduction of interpixel redundancies, and is reversible
Quantiser - transforms input data in a way that facilitates reduction of psychovisual redundancies, not reversible
Symbol Coder - Assigns the shortest code to the most frequently occurring output values, reversible
What does Entropy mean in regards to Image Processing?
The idea - associate information with probability
Entropy is the average information content of an image, a measure of histogram dispersion
Can’t compress to less than H bits/pixel without losing information
What are some properties of Huffman Coding?
Compute probabilities of each symbol by histogramming the source
Process probabilities to pre-compute codebook code - codebook is static
Encode source symbol-by-symbol
Transmit coded signal and codebook
The need to pre-process (histogram) the source before encoding begins is a disadvantage
Why is quantisation lossy?
It represents areas of grey level/colour space with fewer bits
It cannot be reversed because of this, and thus it is lossy, as it loses some crucial information in the compression.
What are Paletised Images, and how are they created?
For each pixel in the original image, find the closest colour in the Colour Table
Record the index of that colour (for storage or transmission)
To reconstruct the image, place the indexed colour from the Colour Table at the corresponding spatial location
How do you build a palette of colours for GIF compression?
Group pixels that are close to each other, and replace them by one single colour
Note - close as in close colours, not distance
Representative colours are then put into the palette
Uses supervised clustering (K-Means clustering)
What does it mean by Exploiting Spatial Redundancy?
Pixels are more often highly correlated (dependent), but not equal
Each pixel value is predicted based on its neighbours e.g. linear combination, to get a predicted image
The difference between the original and predicted images yields a differential or residual image with a reduced set of values
The differential image is encoded using Huffman coding, or similar.
What is Differential Pulse-code Modulation?
Code the difference between adjacent pixels
Prediction is that the next pixel value is equal to the current one
Need the first value to provide a point of reference
Lossless and lower entropy.
How does JPEG compression work?
The image is broken into 8x8 pixel blocks, which are processed sequentially, top left to bottom right
First, subtract half maximum intensity value so values are distributed about 0