What does this formula mean?

506 views Asked by At

The formula in the image is depicting quantization

I would like to know if anyone can help me understand what is going on in the above formula? Am I supposed to first perform x = [c/s1] and then perform s1 * x?

Please help me understand this.

The paper in question.

4

There are 4 answers

2
NPE On BEST ANSWER

In a nutshell, JPEG works by applying the discrete cosine transform to 8x8-pixel blocks of the image and then quantizing the resulting 8x8 matrix in order to compress it into fewer bits.

The quantization is what makes JPEG lossy. Different quantization matrices lead to different levels of compression (and decompressed image quality).

The formula in your question represents JPEG compression followed by decompression. The DCT yields an 8x8 matrix of float coefficients. Then:

  • The DCT coefficient matrix is divided element-by-element by the quantization matrix.
  • The results get rounded to integer.
  • The integers are then multiplied back by the quantization coefficients.

The point that the paper is getting at is that when this process is done more than once (potentially with different quantization coefficients), this is detectable and can be used to find doctored JPEG images.

P.S. It seems to me that the author's notation is a bit sloppy. If I am not mistaken, JPEG rounds to the nearest integer whereas the paper uses the floor function, which rounds towards negative infinity. That aside, the main point of the paper stands.

0
Ignacio Vazquez-Abrams On

⌊⌋ is the floor operation. Any fractional part of the number is dropped, reducing it to the largest lesser or equal integer. In Python this is done via math.floor() or any equivalent.

0
user3344003 On

Your source is a confusing one. Quantization is simply a highfaluting term for integer division.

You have an 8x8 quantization table (Q). When you quantize the 8x8 DCT matrix (M) into values (V) you do

V (n, m) = M (n, m) / Q (n, m)

JPEG does do INTEGER division where the values are rounded DOWN.

Note there is no multiplication afterward as shown in our example during the compression process. The paper is apparently suggesting a process to determining whether an image has been compressed multiple times.

If V(n, m) * Q (n, m) != M (n, m) it is likely the image has not been compressed before.

0
AudioBubble On

Okay so the formula can be represented as

Quantized Value(i, j) = DCT(i, j)/Quantum(i, j)[Rounded-off to the nearest integer]

where DCT = Discreet Cosine Transform Coefficient and

For every element position in the DCT matrix, a corresponding value in the 
quantization matrix gives a **Quantum value** indicating what the step size is 
going to be for that element. 

and i, j are the row and column of the quantization matrix respectively.

Here is the sample matrix: enter image description here

Mentioned in here the python way for Lossy Data Compression technique(JPEG for the instance). You can also read more about formula insights(Do refer this paper) in here.

Hope it helps...