# How Can JPEG Be Used to Realize a Transfer Application with a Fixed Bit Rate? [closed]

For simplicity, assume a fixed bandwidth (5MB/s) and that each second an image with 12MP is generated. The quality of the image should be as high as possible (in terms of PSNR). Which compression rate is necessary and how would the task differ or become simplified when using JPEG 2000 instead?

## Thoughts

When the image is a colored image with 24bpp, then the size of a 12MP image would be 12*10^6*24/8 Byte = 36 MB. That divided by 5MB yields a compression rate of approximately 7. Then transferring works as desired. However, I don't see how the task changes when using JPEG 2000.

• so, what have you figured out so far? What's the problem you're having answering this yourself? – Marcus Müller Jul 6 '18 at 11:40
• When the image is in grayscale then the size of a 12MP image would be 12*10^6/8 Byte. That divided by 5MB yields a compression rate of 300. Then transferring works as desired. However, I don't see how the problem changes when using JPEG or JPEG 2000. – cz5 Jul 6 '18 at 12:53
• why do you even assume the problem changes? Give context for your question! – Marcus Müller Jul 6 '18 at 13:14
• I mean, why the task becomes simpler when using JPEG 2000? Does the compression rate shrink? Can't be, right? – cz5 Jul 6 '18 at 13:24
• That's three new questions. What I'm saying is: Please edit your question to make clear all of your thoughts leading to the question you're asking. Your comments are mostly incoherent to me. – Marcus Müller Jul 6 '18 at 13:25

You calculated the needed compression ratio correctly.
Now to answer the rest of the question:

1. The JPEG Algorithm doesn't let you set the size of the output file only the Quality measure. Namely to ensure the size of the output is close to the limit (Namely highest quality) requires trial and error (Though using the Quality you can get a measure of the bits per color).
The JPEG 2000 on the other hand allows you to cut the data at the exact number of bytes required hence makes the task much simpler (You can practically set a threshold on the output size).
2. The image quality of JPEG at compression ratio of ~100 is really bad (See Wikipedia article on JPEG). While JPEG 2000 can get better results.

To understand the Quality in JPEG, have a look at How JPG Works by Colt McAnlis:

Pay attention to the line:

Probably most important, is that the quality parameter varies depending on the image. Since each image is unique, and presents different types of visual artifacts, the Q value will be unique as well.

This is what JPEG 2000 makes easier.

• I noticed a mistake in the compression rate calculation. Let's assume a color image with 24bpp, then it would be 12*10^6*24/8 B = 36 MB divided through 5 MB yields approx. a compression rate of 7, right? I edited it above. – cz5 Jul 7 '18 at 16:42
• It doesn't change the difference between JPEG and JPEG 2000 in that respect. – Royi Jul 7 '18 at 16:58
• True. I just wanted to mention it. – cz5 Jul 7 '18 at 17:06

A very good article on JPEG 2000 is

A. Skodras, C. Christopoulos and T. Ebrahimi, "The JPEG 2000 still image compression standard," in IEEE Signal Processing Magazine, vol. 18, no. 5, pp. 36-58, Sep 2001. doi: 10.1109/79.952804 Abstract: One of the aims of the standardization committee has been the development of Part I, which could be used on a royalty- and fee-free basis. This is important for the standard to become widely accepted. The standardization process, which is coordinated by the JTCI/SC29/WG1 of the ISO/IEC has already produced the international standard (IS) for Part I. In this article the structure of Part I of the JPFG 2000 standard is presented and performance comparisons with established standards are reported. This article is intended to serve as a tutorial for the JPEG 2000 standard. The main application areas and their requirements are given. The architecture of the standard follows with the description of the tiling, multicomponent transformations, wavelet transforms, quantization and entropy coding. Some of the most significant features of the standard are presented, such as region-of-interest coding, scalability, visual weighting, error resilience and file format aspects. Finally, some comparative results are reported and the future parts of the standard are discussed keywords: {ISO standards;code standards;data compression;entropy codes;image coding;quantisation (signal);reviews;standardisation;telecommunication standards;transform coding;wavelet transforms;ISO/IEC;JPEG 2000 still image compression standard;Part I standard;entropy coding;error resilience;file format;image tiling;international standard;multicomponent transformations;performance comparisons;quantization;region-of-interest coding;scalability;standardization committee;visual weighting;wavelet transforms;Entropy coding;IEC standards;ISO standards;Image coding;Quantization;Resilience;Scalability;Standardization;Transform coding;Wavelet transforms}, URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=952804&isnumber=20598

There are other JPEG2000 papers in this SP magazine edition.

It is in some ways a transport layer as much as a file standard. It is designed to support many display resolutions over a network. Another network feature is that is builds an image as it is received over a network. If the transport terminates, some of the image is registered at the destination. One doesn't need a complete file to display an image.

The Region of Interest is treated as an elevated bit plane that is transmitted first. You have the option of lossy or lossless compression.