在变换域中将 JPEG 快速缩放至一半或四分之一
我的印象是,JPEG 到 JPEG 缩放到 1/2 或 1/4 的速度非常快且质量很高,在变换域中完成时甚至会占用更小的内存占用(即从未解压缩)。假设这是正确的,我该如何使用 libjpeg 来做到这一点?另外,使用这种方法是否需要应用抗混叠滤波器?
(如果有助于写出更清晰的答案,我对一维 DFT 有很多经验)
I'm under the impression that JPEG to JPEG scaling to 1/2 or 1/4th be very fast and high quality and even a smaller memory footprint when done in the transform domain (i.e. never decompressed). Assuming this is correct, how can I do this with libjpeg? Also, does an anti-aliasing filter need to be applied using this method?
(If it helps write a clearer response, I have a lot of experience with 1D DFTs)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
libjpeg 的解压缩参数之一是比例因子 M/N,其中 N 是源 DCT 大小(通常为 8)。 M 可以是 1 到 16,所以它应该可以满足您的要求,并且缩放似乎是在变换空间中完成的(请检查源以确保)。
我不知道这对于图像质量来说效果如何。
One of libjpeg's decompression parameters is a scale factor M/N where N is the source DCT size (usually 8). M can be 1 to 16, so it should handle your requirements, and it seems likely that the scaling is done in transform space (check the source to be sure).
I don't have any idea how well this works as far as image quality.
我怀疑你可能会完全跳过减压。
JPEG 的最后一步是霍夫曼编码或算术编码。在缩放之前绝对应该撤消这一步。
I doubt that you may skip decompression completely.
The last step of JPEG is Huffman or Arithmetic Encoding. And this step definitely should be undone before scaling.