Compression Flashcards

1
Q

Why is compression used

A

Simple maths states that images represent very large arrays (pixels x bits x RBG x time (video)) - this represents a lot of memory.

Computers and in particular mobile phones have limited space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

the main reason why compression works

A

Reduncancy - not all pixel values are equal, some are repeated or not even used. in flat images we may not care about the accuracy of the pixel values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name one of the main benefits of compression

A

It works across multiple devices. This is because standards are used: such as JPEG or MPEG.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe at a very high level the process for a compression an algorithm

A

Input -> Encode -> Decoder -> output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the process of an encoder

A
  1. an image in deconstructed into sub images.
  2. forward transform is performed.
  3. Quantisation is performed.
  4. symbol encoder
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the process of a decoder

A
  1. Symbol decoder
  2. Inverse transform
  3. Merge sub-images together into a final compressed image.
  4. Compressed image outputted.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is a histogram used in image compression

A

To calculate the amount of times a given grey scale of all of the pixels is used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Key points for encoding grey values

A
  1. Find the most common grey values.

2 calculate the most individual probabilities of all of the grey values. - this are your symbols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define symbol

A

The grey scale value for a given pixel or set of pixels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe a simple 5 part symbol encoder algorithm

A
  1. Create a histogram of all of the grey values
  2. use the histogram to calculate the probabilities - these are the symbols.
  3. order the symbols in order of there frequency
  4. give short binary values to the most common values
  5. repeat for all values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what does Huffman coding do?

A

it uses a probabilistic tree method to calculate how to assign bits to symbols such that it will produce the lowest average bit rate per a symbol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the 6 parts to the Huffman coding algorithm

A
  1. calculate the probabilities of each symbol occurring and order them from highest to lowest
  2. take the two lowest probablities and add the together to create a new “source reduction” or iteration of the list of symbols
  3. Reorder the probablities and repeat step 2 until just two symbols remain.
  4. start with the last iteration and work backwards, placing bits next to each number. -
  5. Each time proablilites were added - split the bits up into two.
  6. follow this all the way back to the beginning - you will then have bits for every symbol.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Key parts of why huffman works

A
  1. each symbol has unique bits
  2. This is mathematically the shortest way of calculating how to assign the bits
    3.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly