I am new to image compression topic and really appreciate it if someone could help me understand how compression rati works in this case. Assuming I have JPEG lossless coder that encodes the following image:
2 3 4 3 1 A B C
I have used predictive coding and Huffman to obtain the binary representations (codes) for pixels A, B and C:
A=0 -> 0 B=3 -> 1101 C=0 -> 0
How can I calculate the compression ratio achieved for coding of the pixels A, B and C (jointly) assuming that the original image has pixel values ranging from 1 to 8?