Reputation: 31
The DCT values of a JPEG Image are centred around the multiples of a step (step depends on the Quality Factor of the compression).
If a right-down cyclic shift is performed on a JPEG image, circshift(lenaJPG,[1,1]);)
, the DCT values are not centred anymore around the steps. Why does this happen?
I am guessing the problem is that I don't understand how does JPEG do its compression based on the QF.
My guess is that the reason for the DCT values not being “discrete” anymore, in the sense that they are not all multiple of 16 (for QF=50), is that the JPEG compression rounds the DCT values to the nearest multiple of 16; but, when the DCT is done to the shifted image, the cosine waves that form each of the 8x8 blocks are different from the blocks that the image was compressed for.
Is this what happens? Is the compression lost when the shift is applied? Am I completely wrong?
Upvotes: 0
Views: 1611
Reputation: 21710
Am I completely wrong?
Yes.
There is no such thing as a quality factor in JPEG. Some encoders have a quality setting that selects quantization tables.
After the DCT, the values are rounded to the nearest integer, not to multiples of 16. The DCT values are then divided by the corresponding value in the quantization table.
Upvotes: 1