我正在开发一个应用程序,在该应用程序中获取不同焦平面上的图像,并且当前存储在多页 tif 中。不幸的是,基于 tif 的压缩技术并不能从不同焦平面上的信号冗余中受益。
我在这里 ZPEG 和 JPEG2000 Addon找到了一些关于此的资源
不幸的是,它们都远离标准。
我想知道在这种情况下是否可能有一个视频编解码器可以实现出色的压缩比?
我也非常开放非常任何其他想法。
我正在开发一个应用程序,在该应用程序中获取不同焦平面上的图像,并且当前存储在多页 tif 中。不幸的是,基于 tif 的压缩技术并不能从不同焦平面上的信号冗余中受益。
我在这里 ZPEG 和 JPEG2000 Addon找到了一些关于此的资源
不幸的是,它们都远离标准。
我想知道在这种情况下是否可能有一个视频编解码器可以实现出色的压缩比?
我也非常开放非常任何其他想法。
这是一种不同的方法:将跨平面冗余转换为空间冗余,然后使用标准图像压缩。
以最简单的方式,只需从每个平面中取出宽度*1 像素的条带,然后将它们堆叠起来。作为一个图像,它看起来会以一种奇怪的方式垂直涂抹。最好将其与 DCT 块(如果适用)对齐,以避免在块中出现锐利的水平边缘,因此应该通过复制平面将其填充到(通常)8 个平面的倍数。通过优化填充以获得最小能量,您可以获得更多收益,但这很复杂,而复制已经非常好且微不足道。
显然,未经过滤的无损压缩不能很好地压缩,但带有合适过滤器(向上、平均或 paeth)的 PNG 应该可以工作。
tiff 的问题在于它不支持其基线中的组件间去相关。有一些扩展(不是很广泛支持)允许存储其他文件压缩格式(例如完整的 JPEG2000 JP2 文件,扩展 0x8798),但不能保证标准解码器能够正确处理它。
如果您可以使用您想要的任何工具,则可能通过良好的频谱去相关变换(用于有损压缩的 KLT 和用于无损压缩的 RKLT - 请参阅http://gici.uab.cat/GiciWebPage/downloads)获得接近最佳的编码性能.php#spectral用于这些转换的 JAVA 实现),然后是良好的压缩算法,例如 JPEG2000。另一方面,由于 KLT/RKLT 转换,这种方法实施起来可能有点复杂并且速度较慢。
其他更简单的方法是简单地使用带有 DWT 的 JPEG2000 进行光谱去相关。例如,如果您使用 Kakadu 实现 (kakadusoftware.com),则只需在压缩时使用适当的参数即可。这里有一个从http://kakadusoftware.com/wp-content/uploads/2014/06/Usage_Examples.txt中提取的示例调用,
Ai) kdu_compress -i catscan.rawl*35@524288 -o catscan.jpx -jpx_layers * -jpx_space sLUM Creversible=yes Sdims={512,512} Clayers=16 Mcomponents=35 Msigned=no Mprecision=12 Sprecision=12,12,12,12,12,13 Ssigned=no,no,no,no,no,yes Mvector_size:I4=35 Mvector_coeffs:I4=2048 Mstage_inputs:I25={0,34} Mstage_outputs:I25={0,34} Mstage_collections:I25={35,35} Mstage_xforms:I25={DWT,1,4,3,0} Mnum_stages=1 Mstages=25 -- Compresses a medical volume consisting of 35 slices, each 512x512, represented in raw little-endian format with 12-bits per sample, packed into 2 bytes per sample. This example follows example (x) above, but adds a multi-component transform, which is implemented using a 3 level DWT, based on the 5/3 reversible kernel (the kernel-id is 1, which is found in the second field of the `Mstage_xforms' record. -- To decode the above parameter attributes, note that: a) There is only one multi-component transform stage, whose instance index is 25 (this is the I25 suffix found on the descriptive attributes for this stage). The value 25 is entirely arbitrary. I picked it to make things interesting. There can, in general, be any number of transform stages. b) The single transform stage consists of only one transform block, defined by the `Mstage_xforms:I25' attribute -- there can be any number of transform blocks, in general. c) This block takes 35 input components and produces 35 output components, as indicated by the `Mstage_collections:I25' attribute. d) The stage inputs and stage outputs are not permuted in this example; they are enumerated as 0-34 in each case, as given by the `Mstage_inputs:I25' and `Mstage_outputs:I25' attributes. e) The transform block itself is implemented using a DWT, whose kernel ID is 1 (this is the Part-1 5/3 reversible DWT kernel). Block outputs are added to the offset vector whose instance index is 4 (as given by `Mvector_size:I4' and `Mvector_coeffs:I4') and the DWT has 3 levels. The final field in the `Mstage_xforms' record is set to 0, meaning that the canvas origin for the multi-component DWT is to be taken as 0. f) Since a multi-component transform is being used, the precision and signed/unsigned properties of the final decompressed (or original compressed) image components are given by `Mprecision' and `Msigned', while their number is given by `Mcomponents'. g) The `Sprecision' and `Ssigned' attributes record the precision and signed/unsigned characteristics of what we call the codestream components -- i.e., the components which are obtained by block decoding and spatial inverse wavelet transformation. In this case, the first 5 are low-pass subband components, at the bottom of the DWT tree; the next 4 are high-pass subband components from level 3; then come 9 high-pass components from level 2 of the DWT; and finally the 17 high-pass components belonging to the first DWT level. DWT normalization conventions for both reversible and irreversible multi-component transforms dictate that all high-pass subbands have a passband gain of 2, while low-pass subbands have a passband gain of 1. This is why all but the first 5 `Sprecision' values have an extra bit -- remember that missing entries in the `Sprecision' and `Ssigned' arrays are obtained by replicating the last supplied value.