Doug Kerr
Well-known member
The process of requantization (generally, but inaccurately, described as "quantization") plays an important role in how JPEG encoding reduces the number of bits required to describe an image.
But there are common misunderstandings about just how it does that. I'll try and clear some of those up.
************
Quantization
Quantization (often called quantizing, a perfectly-good synonym) refers to the process of taking a quantity that is continuous (that is, can take on any value we can imagine, albeit perhaps over a finite range) and restating it as if it were composed on an integral number of some unit (that unit being considered a quantum, thus the name).
My body temperature might be 98.6283618274691820...° F. But if I measure it with my handy digital fever thermometer, it reports is as "98.6°F". The continuous value has been quantized to units of 0.1° F.
Precision
We can say that the temperature, as measured and reported, has a precision of 0.0° F. If it had been quantized to units of 0.01° F, we could say that its precision was 0.01° F. Qualitatively, we can speak of the precision with a larger unit as "coarser", or with a smaller unit as "finer".
Requantization
Suppose we have a list of the weights of four lathes being readied for shipment by rail. The weights in pounds are (always integers - that's the precision of our weighing department):
4356
2780
4875
5125
We want to send the list to a logistics broker, who will arrange for the shipment. If we send the list as is, it will take 16 decimal digits (never mind delimiters and such).
But the broker doesn't need to know the weights to such precision. The freight tariffs all work in hundreds of pounds.
Now we heard that if we make the data have a more coarse precision, we will need fewer digits to transmit it. Lets try that.
We will requantize the data to a precision of 100 units, giving:
4300
2700
4800
5100
Attaining the reduction in the required number of digits.
Well, to actually reap the advantage of the more coarse representation, we need to send:
43
27
48
51
The broker, knowing that we send weights quantized to 100s, multiplies each by 100, getting:
4300
2700
4800
5100
the numbers that he needs. (It is only at this point that true quantization of the four numbers has been accomplished.)
Where does the advantage come from?
Note that it is not the fact that the data is now more coarsely quantized that actually leads to the saving in number of digits to be sent. It is that the numbers are now smaller (which of course is only possible, with integer values, if we accept that they are more coarsely quantized, compared to their size).
Best regards,
Doug
But there are common misunderstandings about just how it does that. I'll try and clear some of those up.
************
Quantization
Quantization (often called quantizing, a perfectly-good synonym) refers to the process of taking a quantity that is continuous (that is, can take on any value we can imagine, albeit perhaps over a finite range) and restating it as if it were composed on an integral number of some unit (that unit being considered a quantum, thus the name).
My body temperature might be 98.6283618274691820...° F. But if I measure it with my handy digital fever thermometer, it reports is as "98.6°F". The continuous value has been quantized to units of 0.1° F.
Precision
We can say that the temperature, as measured and reported, has a precision of 0.0° F. If it had been quantized to units of 0.01° F, we could say that its precision was 0.01° F. Qualitatively, we can speak of the precision with a larger unit as "coarser", or with a smaller unit as "finer".
Requantization
Suppose we have a list of the weights of four lathes being readied for shipment by rail. The weights in pounds are (always integers - that's the precision of our weighing department):
4356
2780
4875
5125
We want to send the list to a logistics broker, who will arrange for the shipment. If we send the list as is, it will take 16 decimal digits (never mind delimiters and such).
But the broker doesn't need to know the weights to such precision. The freight tariffs all work in hundreds of pounds.
Now we heard that if we make the data have a more coarse precision, we will need fewer digits to transmit it. Lets try that.
We will requantize the data to a precision of 100 units, giving:
4300
2700
4800
5100
Why do I say requantize, not quantize? Because the data was already quantized, with a unit of 1. Now it is still quantized, with a unit of 100.
Now we send it, but that still takes 16 decimal digits, What went wrong?Attaining the reduction in the required number of digits.
Well, to actually reap the advantage of the more coarse representation, we need to send:
43
27
48
51
These are also "more coarsely quantized" if we mean "with respect to their size".
That will only take 8 decimal digits.The broker, knowing that we send weights quantized to 100s, multiplies each by 100, getting:
4300
2700
4800
5100
the numbers that he needs. (It is only at this point that true quantization of the four numbers has been accomplished.)
Where does the advantage come from?
Note that it is not the fact that the data is now more coarsely quantized that actually leads to the saving in number of digits to be sent. It is that the numbers are now smaller (which of course is only possible, with integer values, if we accept that they are more coarsely quantized, compared to their size).
Best regards,
Doug