DCT压缩 - 块大小,选择系数 [英] DCT Compression - Block Size, Choosing Coefficients

查看:220
本文介绍了DCT压缩 - 块大小,选择系数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解块大小的效果,以及在DCT压缩中选择系数的最佳策略。
基本上我想问一下我在这里写的:

I'm trying to understand the effect of the Block Size and best strategy of choosing the Coefficients in DCT compression. Basically I want to ask what I wrote here:

Video Compression: What is discrete cosine transform?

让我们假设最原始的压缩。制作图像块。在每个博客上执行DCT,并清除一些系数。

Lets assume the most primitive compression. Making block of an image. Performing a DCT on each blog and zeroing out some coefficients.

根据我的理解,块越小越好。
较小的块意味着像素更相关,因此DCT谱中的能量更紧凑。应该在快速变化的图像(高频率)中更加强调。

To my understanding, the smaller the block the better. Smaller blocks means the Pixels are more correlated hence the energy in the DCT spectrum is more "Compact". It should be more emphasized in a fast varying images (High Frequency).

让我们把一定百分比的系数清零,什么会得到最好的图像质量,小块还是大块?例如,我们假设我们保持,10%,25%,50%,75%,你会说不同的百分比是不同的答案吗?

Let's say we zero out a certain percent of the coefficients, what would result in best image quality, small or large blocks? Let's say we keep, 10%, 25%, 50%, 75%, would you say it's a different answer for a different percentage?

是如何选择你保持不变的系数。
Lest说我必须根据位置而不是能量做出决定。
你会从左上角拿一个正方形吗?
我已经在DCT谱中平均了许多块,并且得出最好的结果是从左上角取三角形。

Another issue is how to chose the coefficients you leave untouched. Lest's say I have to make a decision based on location and not energy. Would you take a square from the top left corner? I've averaged many block in the DCT spectrum and concluded the best would be taking a triangle from the top left corner. What do you think?

希望我们有效的讨论。

推荐答案

你的问题的本质似乎是关于图像质量。关于这个问题已经有了大量的文献,结果是图像质量是一件难以确定的事情。

The essence of your question seems to be about image quality. There has been a considerable literature produced on the subject, and the result is that image quality is a hard thing to determine.

诸如信噪比(SNR)和均方误差(MSE)的标准数学误差测量可以给出定量答案,但众所周知,这些与主观观察者观点并不相关,这必须是我们的最终权威。没有其他方法,甚至基于观察者的心理视觉模型的方法(例如,SAKarunasekera和NGKingsbury,A distortion measure for blocking artifacts in images based on human visual sensitivity,IEEE Trans.on Image Proc。vol.4 ,no.6,1995年6月,第713-724页;以及M.Miyahara,K.Kotani和VRAlgazi的Objective picture quality scale(PQS)for image coding,IEEE Trans.on Comm.vol.46,

Standard mathematical error measures like the signal-to-noise ratio (SNR) and mean-squared error (MSE) can give a quantitative answer, but it is well known that these don’t correlate well with subjective viewer opinions, which must be our final authority. No other methods, even those founded on psycho-visual models of the viewer (e.g., S.A. Karunasekera and N.G. Kingsbury, "A distortion measure for blocking artifacts in images based on human visual sensitivity", IEEE Trans. on Image Proc. vol. 4, no. 6, June 1995, pp. 713 –724; and M. Miyahara, K. Kotani, and V. R. Algazi, "Objective picture quality scale (PQS) for image coding," IEEE Trans. on Comm. vol. 46, no. 9, Sept. 1998, pp. 1215 –1226), have proven themselves to be better than SNR.

此外,当您改变图像的类型(线条绘图,卡通,照片,肖像等),某些类型的压缩失真变得更加明显。蚊子噪音可能会令人反感的一个图像,而楼梯噪音可能是另一个的罪魁祸首。

Moreover, when you vary the type of imagery (line drawing, cartoon, photo, portrait, etc.), certain types of compression distortion become more evident. Mosquito noise might be objectionable in one image, while staircase noise might be the culprit in another.

简而言之,没有平静的答案,你的问题,在最好的图像质量?

In short, there is no pat answer to your question, "what would result in best image quality?"

话虽如此,我们可以说一些关于DCT的事情是相关的。块的DCT中的像素从左上角[(0,0) - >(0,1) - >(1,0) - >(2))以Z字形模式从低变化到高变化。 ,0) - >(1,1) - >(0,2) - >等],作为你的三角形选择镜。像素距离左上角越近,其中包含的信息越平滑[实际上,(0,0)DCT值是整个块的平均值],并且离您获得的角落越远, 高频的细节,你会得到。越接近图像的顶部和左边,由该DCT系数表示的水平和垂直细节就越多,越接近块的对角线,你将拥有越多的对角线细节。

That being said, we can say some things about the DCT that are of relevance. The pixels in a DCT of a block go from low variation to high variation in a zig-zag pattern from the top left corner [(0,0)->(0,1)->(1,0)->(2,0)->(1,1)->(0,2)->etc.], as your triangle selection mirrors. The closer a pixel is to the top left corner, the smoother the information contained therein [in fact, the (0,0) DCT value is the average of the whole block], and the farther away from that corner you get, the more "high frequency" details you'll get. The closer to the top and left of the image, the more horizontal and vertical details you'll have represented by that DCT coefficient, and the closer to the diagonal of the block, the more diagonal details you'll have.

简而言之,有损压缩通常需要丢弃一些眼睛可能感觉不到的细节。 (抛弃更平滑的DCT值会导致严重的失真。)丢弃的DCT值越大,压缩率就越大,但也会导致更大的失真。

In brief, lossy compression usually entails throwing away some of the "details" that may not be perceptible to the eye. (Throwing away the "smoother" DCT values results in severe distortion.) The more DCT values you throw away, the greater your compression ratio will be, but also the greater distortion you'll induce.

对于块大小,这一切都取决于。块中的方差和细节越多,通过丢弃系数就越容易丢失。一些压缩算法自适应地在同一图像内使用不同的块大小,使得高细节区域接收越来越多的块,并且平滑区域接收越来越少的块。

As for block size, it all depends. The more variance and detail there is in a block, the more you'll lose by throwing away coefficients. Some compression algorithms adaptively use different block sizes within the same image so that high-detail regions receive more and smaller blocks and smooth regions receive fewer and larger blocks.

对于使用单个块大小的算法,8x8,16x16和32x32是JPEG和MPEG等常见的算法。压缩它们所需的处理将小于自适应块大小,但是通常质量也将较低。

For algorithms that use a single block size, 8x8, 16x16, and 32x32 are common for things like JPEG and MPEG. The processing required to compress them will be smaller than an adaptive block size, but the quality will also be lower in general.

这篇关于DCT压缩 - 块大小,选择系数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆