How is compression ratio related to number of dct coefficients
Compression ratio is defined as the amount of bits in the original image divided by the amount of bits in the compressed image. In the original image the number of coefficients is 64, while you choose 15 coefficients after DCT in the compressed image with mask A. The ratio is 64*6/15*8. With mask B it is 64*6/41*8