Why JPEG compression processes image by 8x8 blocks?

对着背影说爱祢 提交于 2019-11-28 03:36:46

问题


Why JPEG compression processes image by 8x8 blocks instead of applying Discrete Cosine Transform to the whole image?


回答1:


8 X 8 was chosen after numerous experiments with other sizes.

The conclusions of experiments are: 1. Any matrices of sizes greater than 8 X 8 are harder to do mathematical operations (like transforms etc..) or not supported by hardware or take longer time. 2. Any matrices of sizes less than 8 X 8 dont have enough information to continue along with the pipeline. It results in bad quality of the compressed image.

Read, my blog, http://nboddula.blogspot.com/2013/05/image-compression-how-jpeg-works.html




回答2:


Because, that would take "forever" to decode. I don't remember fully now, but I think you need at least as many coefficients as there are pixels in the block. If you code the whole image as a single block I think you need to, for every pixel, iterate through all the DCT coefficients.

I'm not very good at big O calculations but I guess the complexity would be O("forever"). ;-)

For modern video codecs I think they've started using 16x16 blocks instead.



来源:https://stackoverflow.com/questions/10780425/why-jpeg-compression-processes-image-by-8x8-blocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!