Approach to Comparison

The two metrics one is most concerned with when talking about image compression are: similarity to the original image, and compression ratio. In order to properly weigh the costs and benefits of each compression algorithm we must first establish how to measure each of these.

Frobenius Norm

To establish a rating of how similar our compressed image is to its original, we used Frobenius Norms, a tool commonly used to find out how similar two matrices are. The definition of the Frobenius Norm followsFrobenius Norm Eq

Note that this is just the sum of the square of the magnitude of each entry in the matrix.

The Frobenius Norm is then used in the following equation to establish a percentage rating of how similar the comprised image is to the original.

Frobenius Norm Approach Eq
Note that “differences” is the compressed image minus the original image matrices.

Propagation of Compression Ratio

To find the compression ratio we first had to find the sizes of each version of the image. Our calculation of compression relies on the idea that pixels with the value 0 require only one bit to represent, while pixels of any other value require eight bits. The formulas for the size of each version of the image are below.Screen Shot 2017-12-11 at 7.34.34 PM