Quiz: compression and measurements, JPEG 2000, formats

Short questions to test your understanding. Try each on paper first, then open the answer.


Q1. A JPEG at quality 95 of a fluorescence image looks identical to the original. Can you use it to measure spot intensities?

Which spots have most of their energy close to the noise and in high frequencies?

Not safely. In the demo every spot is still found at quality 95, but the integrated intensities of the dim spots change by about 3% on average (up or down, spot by spot), and the noise statistics change. Visual identity says nothing about the numbers; test the measurement itself, or use lossless storage.


Q2. Why does lossy compression damage dim spots more than bright ones?

What happens to coefficients that are not much larger than the quantisation step?

A dim spot adds only small coefficients, comparable to the noise and to the quantisation steps: they are rounded to zero or to a coarse level, so the spot is flattened, shifted or lost. A bright spot’s coefficients are many steps large, and their relative rounding error is small.


Q3. How can you tell that an image was once saved as a JPEG, even if it is now a TIFF?

What periodic structure does JPEG leave behind?

JPEG’s 8 × 8 blocks leave larger jumps between neighbouring pixels at every 8th row and column. The spectrum of the neighbour differences shows peaks at multiples of 1/8 cycle per pixel (in a 256-pixel image at 32, 64, 96, 128). Zoomed in, flat areas may also show blocks.


Q4. Why does JPEG 2000 show no blocking, even at low rates?

Which transform does it use, and on what?

It transforms the whole image (or large tiles) with a wavelet transform, whose basis functions overlap and come at many scales; there is no 8 × 8 grid whose blocks are coded independently. Its errors appear as blur and ringing around edges instead.


Q5. How can a wavelet transform be exactly lossless, when wavelet coefficients are normally real numbers?

Lifting, with rounding inside each step.

The reversible 5/3 transform is computed by lifting: each step adds a rounded function of samples the decoder already has (predict the odd samples from the even ones, update the even ones from the residuals). Integers stay integers, and the decoder subtracts exactly the same rounded values in reverse order. Without quantisation, the image comes back exactly.


Q6. A colleague saves a 16-bit confocal stack as a TIFF and is sure it is lossless. What should you check?

A TIFF is a container.

The compression inside the TIFF (none, LZW, Deflate and Zstandard are lossless; JPEG is lossy) and the bit depth (was it saved as 8-bit?). The file extension alone says neither.


Q7. A 3D volume is stored in chunks of 512 × 512 × 1. A viewer shows x–z slices. Why is it slow, and what chunk shape would help?

Which chunks does one x–z slice touch?

An x–z slice (one y, all x and z) passes through one chunk per z-slice and x-block: every chunk is decoded in full (512 × 512 values) to use one row of 512. Chunks that are deeper in z and thinner in y (e.g. 128 × 32 × 128), or cubic chunks, decode far less for x–z slices, at some cost for x–y slices.


Q8. (math) Each received bit plane of a JPEG 2000 coefficient halves the range of values it can still have. How many decibels of PSNR does one more bit plane buy, at most?

Halving the error amplitude divides the squared error by 4.

The error amplitude halves, the squared error is divided by 4: 10\log_{10} 4 = 6.02 dB per bit plane, the same 6 dB per bit as for a uniform quantiser.