本文介绍了libjpeg和无损JPEG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对DICOM标准和libjpeg库有疑问。
在DICOM标准中,还有转移语法:

I have a question regarding DICOM standard and libjpeg library.In the DICOM standard, there are, among others, Transfer Syntax:

据我所知,此传输语法与JPEG-1 Lossles格式相对应。
我开始研究libjpeg库,但发现它不支持(?)无损JPEG,如下所示:

As far as I know, this Transfer Syntax corresponds with JPEG-1 Lossles format.I started researching libjpeg library and I found out that it doesn't support (?) Lossless JPEG, as stated here: JPEG Lossless in DICOM

此外,在libjpeg文档中有一部分说:

Also, in libjpeg documentation there is a part saying:

但是,在库代码中,压缩参数结构为 jpeg_compress_struct 有一个字段:

However, in library code, in compression parameters structure jpeg_compress_struct there is a field:

boolean lossless;       /* TRUE=lossless encoding, FALSE=lossy */

这是什么意思?我真的很困惑。谁能描述该库支持哪些JPEG标准?此外,如何设置压缩参数使其与DICOM JPEG无损标准兼容?

What does is all mean? I'm really confused. Could anyone describe which standards of JPEG are supported by the library? Furthermore, how to set parameters for compression to be compatible with DICOM JPEG Lossless standard?

推荐答案

我们首先在此处进行一些说明。首先应该是著名的JPEG 6b(aka 62)版本。首先从阅读代码。您会发现您的布尔无损没有提及。 libjpeg 6b是为两个分支服务的参考代码库:

Let's do some clarifications here first. What you should start with is the famous JPEG 6b (aka 62) release. Start by reading the code from here. You'll discover that there is no mention to your boolean lossless. libjpeg 6b is the reference codebase that served two forks:


  • Guido Vollbeding(IJG维护者):libjpeg 7及以上著名的 SmartScale 扩展

  • dcommander libjpeg-turbo,尤其是读取。

  • Guido Vollbeding (IJG maintainer): libjpeg 7 and up with the famous SmartScale extension
  • dcommander libjpeg-turbo, in particular reads the comments from here.

因此,如果这是您正在谈论的 libjpeg ,那么是的,它不支持在中指定的无损模式标准。无损修补程序是由Ken Murchison创建的,您仍然可以找到它(例如)。它应直接应用于libjpeg 6b。如果您不想自己打补丁,请快速浏览和或,因为它们都使用了便捷的libjpeg副本+著名的无损补丁(感谢DCMTK团队提供了进一步的补丁)。

So if this is the libjpeg you were talking about, then yes it does not support the lossless mode specified in the standard. The lossless patch was created by Ken Murchison, and you should still be able to find it (eg. here). It should apply directly over libjpeg 6b. If you do not want to patch the lib yourself, have a quick look at GDCM and or DCMTK, since they are both using a convenient copy of libjpeg + the famous lossless patch (with some further patch, thanks to DCMTK team).

这时应该可以回答您的问题。

At this point this should answer your question.

有关libjpeg(IJG)和libjpeg-turbo信息的更多详细信息我建议您阅读以下信息:

For further details on libjpeg (IJG) and libjpeg-turbo informations I suggest you read informations from:




  • https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612341#131
  • https://lists.debian.org/debian-devel-announce/2014/08/msg00000.html

你还在看书,我想你也快速看了另一本书Brary(特意)也称为 libjpeg ,请在。特别要检查 README 文件()。而且您会发现,此 libjpeg 是ITU 81的完整实现(有损,无损,8/12/16位,甚至是分级结构,都可以在一个代码中完成,而无需

In case you are still reading, I sugest you also have a quick look at another library (purposely) also called libjpeg, see it here at github. In particular go over the README file (here). And you'll discover that this libjpeg is a full implementation of ITU 81 (lossy, lossless, 8/12/16bits and even hierarchical all in one single code, without the need to do multiple compilations !).

为了完整起见,我发现以下链接非常有用:

And for completeness, I found that the following links were very usefull:


  • http://fileformats.archiveteam.org/wiki/Lossless_JPEG_(原始)


  • http://fileformats.archiveteam.org/wiki/Lossless_JPEG_(original)
  • https://sourceforge.net/projects/jpeg/

这篇关于libjpeg和无损JPEG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-31 17:58