tags: image processing

Lossless vs lossy compression

With lossless compression, you don’t lose information about the image, it is the same after decompression. With lossy compression you will lose some data and you can’t reconstruct the same image.

In applications other than compression sometimes I want y to be larger than x, maybe I added hamming codes.

Data is not the same as information

Data is not the same information, you can think of information as what value do you get from the data or thing you have. Data is the way you transfer the information or how do you convey the information.

Data Redundancy

Here is the original file and is the compressed.

Error measures

Root mean square error: here is the function after compression and decompression, there is also another error metric called mean square SNR: The problem with these error metrics is that they aren’t really accurate, they don’t model human perception of the error correctly, for example: From the above image, we can see the last image has lower RMS error thant the middle image even though for a human it is much more deformed. The idea here is that the human can see the image in the middle well because the data that was removed was removed from between a lot of data so it didn’t really make a difference, we still have the same information. The DR talks about it at minute 26:00 in lecture 10.

Why frequency of information occurrence differs

If i have information that is not repeated a lot in the data, then that means that it is a detail, so would need more data to represent this information, and the opposite for true for data that is frequent, it is not really a detail and it is kind of obvious so I don’t need a lot of data to tell you this information. This is my interpretation by the way and look here.

if you know the structure you need less information to describe it so it is kind of compression.

Variable Length Coding

Code 2 is considered to be a correct encoding because it can be decoded, i.e. understood.

In huffman always give the first one 0.

Huffman Encoding

The efficiency of an algorithm is entropy/L average Entropy:

Extended Huffman Encoding

Works with 2 letters in a symbol instead of 1. We use extended Huffman when there is big difference between probabilities. The probability of a pair is the product of the probability of the two symbols in the pair.

Arithmetic Coding