|
发布时间: 2020-01-16 |
图像处理和编码 |
|
|
收稿日期: 2019-05-08; 修回日期: 2019-08-27; 预印本日期: 2019-09-04
第一作者简介:
王卓,1976年生,男,研究员,主要研究方向为信号处理技术。E-mail:26966821@qq.com;
周生龙,男,高级工程师,主要研究方向为数字图像处理。E-mail:527819845@qq.com; 田原,男,工程师,主要研究方向为电子工程。E-mail:tianyuan4662@163.com; 帅云开,男,工程师,主要研究方向为无线通信技术。E-mail:shuaiyk@163.com.
中图法分类号: TP391.4
文献标识码: A
文章编号: 1006-8961(2020)01-0073-08
|
摘要
目的 针对现有小波域图像集合划分编码(SPC)方法存在无损编码性能较弱的问题,设计广义树分类器,构建嵌入广义树分类器的集合划分编码方法(SPACS_C)。方法 针对已有SPC方法对坐标集合直接进行"先检测后划分"编码,存在当位平面降低导致数据之间相关性降低后位置比特和不必要比特数量急剧增大问题,SPACS_C对编码过程中产生的坐标集合分类处理,减少对坐标集合的显著性检测次数,从而降低位置比特的输出。SPACS_C对广义树分类处理利用图像小波系数的稀疏度随位平面降低而迅速降低的数据特点,对"先划分后检测"和"先检测后划分"两种方式所需的比特开销进行预测,选用比特开销较少的方式编码坐标集合,减少SPACS_C输出的位置比特数量。结果 采用不同统计特性和不同大小的可见光图像(8 bit)和红外图像(16 bit)测试SPACS_C,结果表明SPACS_C的无损编码性能优于JPEG 2000,特别是对红外图像的无损编码平均节省了3.1%的数据空间;性能接近或超过图像无损压缩标准JPEG-LS。结论 SPACS_C对坐标集合的分类处理利用小波域图像低层位平面稀疏度差的数据特点,有效减少位置比特输出,进而提高编码性能。与JPEG2000一样,SPACS_C可以实现图像质量的渐进式压缩。SPACS_C的编码不受图像数据动态范围的影响,可以对任意位深度的图像进行压缩编码。
关键词
集合划分编码; 分类器; 无损编码; 位置比特; 不必要比特
Abstract
Objective
As a powerful image compression method, set partition coding (SPC) method effectively uses the correlation between the wavelet coefficients to obtain a higher data compression ratio, and it has been widely used for all types of image compression. The SPC method uses the idea of successive quantization approximation of the wavelet coefficient set, such as set partition coding system (SPACS), which partitions the coefficient set step-by-step to find significant coefficients and code them. A significance map was used to decide whether a set is significant, based on which set will be partitioned. If a set is significant, then SPC will output a location bit "1" and the set will be partitioned into 4 subsets; otherwise, the set is prepared for the next set coding operation. If set partition operations are conformable to the distribution of the insignificant coefficients, then location bits and unnecessary bits will be decreased. When the coefficient set is sparse, the SPC method can use fewer bits to encode the image. However, with the decrease of the bit plane, the sparseness of the coefficient set decreases, and the SPC method will waste many location and unnecessary bits, especially for lossless compression. To increase the lossless encoding performance of the set SPC method, we construct a set partition coding method that embeds a generalized tree classifier named SPACS_C.
Method
The previous SPC methods process all coordinate sets with "test before partition, " thereby increasing the number of location and unnecessary bits when the correlation between data decreases. SPACS_C calculates the bit costs of two different coding ways called "test before partition" and "partition before test" for each coordinate set. Then, it chooses the one with lower bit cost to process the set. The process method used in SPACS_C takes advantage of the data characteristics in which the sparseness of bottom bit-planes decrease rapidly in wavelet transformed images. SPACS_C performs the coding process in the domain of the wavelet transform of the image. Daubechies (4, 4) integer wavelet transform is used in this study. The level of wavelet transform is determined by the image size. For instance, a level of 5 is recommended for an image with a spatial size of 512×512. Similar to SPACS, a general tree (GT) is used to simultaneously represent the tree and square sets in the wavelet domain. The processing flow of SPACS_C is as follows:1)Initialization. Let the threshold n be most significant digit of the maximum of the wavelet coefficient and the list of significant points (LSP) be an empty list. Add all GTs into the list of insignificant points (LIP), where all GTs that have descendants are added into the list of insignificant sets (LIS). 2)Sorting pass. Perform the significant test for every entry (
Key words
set partition coding(SPC); classifier; lossless encoding; location bit; unnecessary bit
0 引言
集合划分编码(SPC) (Pearlman和Said,2008a;Pearlman和Said,2008b)通过对坐标集合的循环检测划分,有效利用小波域图像的子带间相关性和子带内相关性,实现图像数据的高效压缩(李凤怡,2017)。
现有的SPC方法包含EZW(embedded zerotree wavelet)、SPIHT(set partitioning in hierarchical tree)(Said和Pearlman,1996;方炫苏等,2018)、SPECK(set partitioning embedded block)(Pearlman等,2004)、SPACS(set partition coding system)(Li等,2016)等一系列重要方法。EZW、SPIHT等树形SPC(T-SPC)方法侧重于利用小波域图像的子带间相关性(Kim等,2018),SPIHT(Said和Pearlman,1996)是其中的典型代表,已广泛应用于高光谱图像(Christophe等,2008;陈玉玲等,2018)、医学图像(Ntsama等,2016)等数据的压缩(Lee和Hung,2019;Boukaache等,2018),以及数据加密技术领域(Yeh等,2013;Lahdir等,2019)。SPECK等块状SPC(B-SPC)方法更侧重于利用小波域图像的子带内相关性,同样有着广泛的应用(Sudha和Sudhakar,2014;Kidwai等,2016)。
为综合利用两种相关性,进一步提高编码效率,Li等人(2016)建立集合划分编码系统(SPACS),SPIHT和SPECK可视为SPACS的两个特例。Li等人(2016)还提出了位置比特、幅值比特、不必要比特的概念。对于同一图像的编码,不同SPC方法所需的幅值比特总相同,不同编码效率体现在所需位置比特和不必要比特的不同数量上。对同一图像的编码,SPACS相比于SPIHT和SPECK,以位置比特的较少增加为代价减少了更多的不必要比特。
根据Li等人(2016)的数值结果,由于小波域图像高层位平面表现出较强的子带间相关性和子带内相关性,因此在SPACS编码的初始阶段只需输出较少的位置比特和不必要比特。随着位平面降低,数据间相关性减弱,SPACS所需的位置比特和不必要比特的数量急剧增大。这使得SPACS对图像有损编码的高效性并未完全延伸到对图像的无损编码。
针对SPACS无损编码性能略弱的问题,本文设计广义树分类器,构建嵌入广义树分类器的集合划分编码方法SPACS_C。对数据进行分类处理也是图像压缩中的常用工具(李秋富等,2015;孙鹏浩等,2017),SPACS_C对编码过程中产生的坐标集合分类处理,减少对坐标集合的显著性检测次数,从而降低位置比特的输出。文中采用不同图像测试SPACS_C,结果表明其无损编码性能不仅优于JPEG2000(刘敏慧,2018),且接近或超过图像无损压缩标准JPEG-LS(陈聪等,2018)。
1 算法构造
本节首先回顾Li等人(2016)的集合划分编码系统SPACS,然后为减少其比特输出,设计坐标集合分类器并将其嵌入SPACS,构建嵌入广义树分类器的集合划分编码方法SPACS_C。
1.1 SPACS
对于原图像
广义树是SPACS用到的特殊坐标集合。若
$ \mathit{\boldsymbol{GT}}\left({i, j;{n_1}, {n_2}, {n_3}} \right) = \mathit{\boldsymbol{Tree}}(i, j) \cap \left({\bigcup\limits_{n = {n_3}}^{{n_2}} {{\mathit{\boldsymbol{B}}_n}} } \right) $ | (1) |
式中,
SPACS中有两个参数
在初始化阶段,SPACS将
初始化结束后,进入对LIP和LIS的分类排序阶段。这个阶段是对LIP中的单点集和LIS中的广义树集合进行显著性检测。对于某个坐标集合
$ {\mathit{\Gamma }_n}(\mathit{\boldsymbol{T}}) = \left\{ {\begin{array}{*{20}{l}} 1&{{2^n} \le \mathop {\max }\limits_{_{(i, j) \in T}} \left\{ {\left| {{c_{ij}}} \right|} \right\} < {2^{n + 1}}}\\ 0&其他 \end{array}} \right. $ | (2) |
若该函数输出1则称集合
对LIS的分类排序过程中,若某个
$ \begin{array}{l} \;\;\;\;\;\;\left\{ {\begin{array}{*{20}{l}} {\mathit{\boldsymbol{GT}}\left({{i^\prime }, {j^\prime };{n_1} - 1, {n_2}, {n_2}} \right)}\\ {\mathit{\boldsymbol{GT}}\left({i, j;{n_1}, {n_2} - 1, {n_3}} \right)} \end{array}} \right.\\ \left({{i^\prime }, {j^\prime }} \right) \in \mathit{\boldsymbol{GT}}\left({i, j;{n_1}, {n_1} - 1, {n_1} - 1} \right) \end{array} $ | (3) |
Divide方法将
$ \begin{array}{l} \;\;\;\;\;\;\mathit{\boldsymbol{GT}}\left({{i^\prime }, {j^\prime };{n_1} - 1, {n_2}, {n_3}} \right)\\ \left({{i^\prime }, {j^\prime }} \right) \in \mathit{\boldsymbol{GT}}\left({i, j;{n_1}, {n_1} - 1, {n_1} - 1} \right) \end{array} $ | (4) |
式中,当
SPACS的另一个参数
在分类排序阶段过程中,会生成一些显著单点,SPACS将这些显著单点放入LSP列表。当SPACS确认LIS中的所有广义树都是非显著时,转入对LSP的细化阶段。细化阶段结束后,若还没达到SPACS算法停止条件,则将阈值减半,重复分类排序阶段和细化阶段过程。
1.2 算法分析
根据李秋富等人(2015)的定义,编码多元集显著性的比特称为位置比特,而编码显著单点和非显著单点的比特,分别称为幅值比特和不必要比特。
对于同一图像
位置比特是对LIS列表中广义树的显著性检测结果。对于
在同一阈值下,广义树被自然地分为非显著的和显著的两类,将这两类广义树构成的集合分别记为
由于不使用检测函数式(2),分类器
对于被分类器
1.3 分类器设计
SPACS_C的分类器应最大可能地减少比特开销。这要求SPACS_C在其编码进程中估计广义树
$ \begin{array}{l} \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{r_j}(\mathit{\boldsymbol{GT}}) = \\ {L_{0j}}P\left({{\mathit{\boldsymbol{s}}_0}|\mathit{\boldsymbol{GT}}} \right) + {L_{1j}}P\left({{\mathit{\boldsymbol{s}}_1}|\mathit{\boldsymbol{GT}}} \right), j \in \{ 0, 1\} \end{array} $ | (5) |
自然地,为了节省比特开销,若
$ {r_j}(\mathit{\boldsymbol{GT}}) = \min \left\{ {{r_0}(\mathit{\boldsymbol{GT}}), {r_1}(\mathit{\boldsymbol{GT}})} \right\} $ | (6) |
分类器
式(5)中还有4个参数
$ {L_{00}} = 1 $ | (7) |
若
$ {L_{10}} = \left\{ {\begin{array}{*{20}{l}} 6&{{n_1} - {n_2} < k且{n_3} > {n_2}}\\ 5&其他 \end{array}} \right. $ | (8) |
对于
$ {L_{01}} = {L_{11}} = \left\{ {\begin{array}{*{20}{l}} 5&{{n_1} - {n_2} < k且{n_3} > {n_2}}\\ 4&其他 \end{array}} \right. $ | (9) |
1.4 SPACS_C
将本节设计的广义树分类器嵌入李秋富等人(2015)的SPACS,构造SPACS_C。
SPACS_C(
1) 初始化:输出
2) 排序阶段:
(1) 对LIP中每个
输出
若
(2) 对LIS中的每个
按式(5)计算
若
Test & Partition
若
Partition & Test
3) 细化阶段:对LSP中的每个条目
(1) 若
(2) 若
4) 阈值更新:置
子程序Test & Partition和Partition & Test的功能分别是对相应的广义树进行“先检测后划分”和“先划分后检测”处理,其伪代码如下:
Test & Partition
输出
若
令List = Partition
对于List中的每个条目
将
Partition & Test
令List1 = Partition
对于List1中的每个条目
输出
若
令List2 = Partition
对于L ist2中的每个条目
若
将
子程序Partition的调用格式为List = Partition
2 实验仿真
为验证本文算法的有效性,使用SPACS_C对标准测试图像Lena、Barbara以及分别源自美国国家航空航天局、陆军夜视和电子传感局、Sandia实验室的可见光、红外、SAR图像进行无损编码仿真;标准测试图像大小为512×512像素,可见光、红外、SAR图像在实验仿真之前也均被转换为512×512像素,部分图像如图 1所示。除了红外图像数据为16位外,其他图像数据均为8位。实验仿真流程为:
1) 对原图像
2) 使用SPACS_C
3) 计算无损编码比特率
根据论文约定,此时有
表 1列出了SPACS_C对Lena和Barbara的无损编码比特率结果,表 2给出了可见光图像Aerial、Washington DC,红外图像Cegr-hongwai和SAR图像MilitaryVehicles的数值结果;作为对比,表中也列出了图像压缩标准JPEG2000和图像无损压缩标准JPEG-LS的相应结果。
表 1
SPACS_C、JPEG2000、JPEG-LS对标准测试图像的无损编码性能比较
Table 1
Comparison of lossless coding performance of SPACS_C, JPEG2000 and JPEG-LS for standard test images
编码方法 | Lena | Barbara | ||||||||||
1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 4 | 5 | |||
SPACS_C | 1 | 4.366 7 | 4.901 8 | |||||||||
2 | 4.328 8 | 4.331 4 | 4.833 4 | 4.832 8 | ||||||||
3 | 4.298 1 | 4.297 5 | 4.296 7 | 4.769 5 | 4.763 3 | 4.765 5 | ||||||
4 | 4.293 3 | 4.290 2 | 4.290 6 | 4.289 6 | 4.757 8 | 4.755 3 | 4.754 4 | 4.753 9 | ||||
5 | 4.290 7 | 4.285 6 | 4.285 5 | 4.285 6 | 4.285 6 | 4.754 9 | 4.750 2 | 4.749 6 | 4.750 2 | 4.750 2 | ||
6 | 4.280 5 | 4.284 7 | 4.283 6 | 4.283 7 | 4.749 8 | 4.746 5 | 4.747 2 | 4.747 4 | ||||
7 | 4.284 0 | 4.282 7 | 4.282 8 | 4.747 4 | 4.746 5 | 4.746 5 | ||||||
8 | 4.283 0 | 4.283 2 | 4.747 3 | 4.748 0 | ||||||||
9 | 4.283 1 | 4.748 0 | ||||||||||
JPEG-LS | 4.242 5 | 4.860 3 | ||||||||||
JPEG2000 | 4.317 0 | 4.786 4 | ||||||||||
注:加粗字体表示最优结果。 |
表 2
SPACS_C、JPEG2000、JPEG-LS对不同类型图像的无损编码性能比较
Table 2
Comparison of lossless coding performance of SPACS_C, JPEG2000 and JPEG-LS for different type of images
编码方法 | Aerial | Washington DC | Cegr-hongwai | MilitaryVehicles |
SPACS_C(8, 4) | 4.574 3 | 7.023 9 | 5.682 1 | 5.679 2 |
JPEG-LS | 4.668 4 | 6.871 3 | - | 5.690 0 |
JPEG2000 | 4.637 4 | 7.144 0 | 5.850 1 | 5.750 5 |
注:加粗字体表示最优结果, “-”表示无数据。 |
从表 1中可以发现,参数
除了图像Washington DC,SPACS_C对其他图像的无损编码性能接近或超过JPEG-LS的无损编码性能。相比于JPEG-LS,SPACS_C的优势在于它能输出质量渐进式码流,这意味着SPACS_C的编码过程可随时中止,其获得的部分码流仍能解码得到图像完整区域的数据,如图 2所示;JPEG-LS的码流是空间渐进式的,其部分码流只能解码得到图像部分区域的数据,而无法获知图像的整体结构等全局信息。此外,SPACS_C的编码不受图像数据动态范围的影响,对任意位深度的图像均能编码,而目前JPEG-LS仅能对8位图像编码。
3 结论
为了进一步提升小波域图像集合划分编码(SPC)方法的无损编码性能,本文在集合划分编码系统SPACS的基础上设计广义树坐标集合分类器,构建SPACS_C。分类器根据广义树显著或非显著的概率,预测“先划分后检测”和“先检测后划分”两种编码方式编码该广义树所需的比特开销,选用比特开销较少的方式。对广义树坐标集合的分类处理,能够降低SPACS_C编码所需的位置比特数量,提升了对图像的无损编码性能。对多种类型图像的无损编码仿真表明,SPACS_C的最优无损编码性能优于JPEG 2000,且对红外图像的无损编码平均节省3.1 %的数据空间。同时,对大部分图像的无损编码,SPACS_C的编码性能也接近或优于图像无损编码标准JPEG-LS。
虽然嵌入广义树分类器的SPACS_C有效提升了小波域图像的无损编码性能,但其对某些图像的无损编码相比于JPEG-LS的编码性能仍有差距,如对可见光图像Washington DC,针对此现象的改进值得进一步研究。
参考文献
-
Boukaache A, Doghmane N, Boudjehem D. 2018. New SPIHT-based algorithm for electrocardiogram signal compression. Journal of Mechanics in Medicine and Biology, 19(3): 1950005 [DOI:10.1142/S0219519419500052]
-
Chen C, Zhang X Q, Zhou S Y. 2018. Improvement and hardware implementation for bit rate control algorithm of JPEG-LS. Chinese Journal of Space Science, 38(6): 944-952 (陈聪, 张学全, 周盛雨. 2018. JPEG-LS码率控制算法改进及硬件实现. 空间科学学报, 38(6): 944-952) [DOI:10.11728/cjss2018.06.944]
-
Chen Y L, Yan J W, Ma L M. 2018. Compression method for hyperspectral images. Computer Engineering and Design, 39(3): 780-784 (陈玉玲, 闫敬文, 马丽梅. 2018. 高光谱图像压缩方法. 计算机工程与设计, 39(3): 780-784) [DOI:10.16208/j.issn1000-7024.2018.03.032]
-
Christophe E, Mailhes C, Duhamel P. 2008. Hyperspectral image compression:adapting SPIHT and EZW to anisotropic 3-D wavelet coding. IEEE Transactions on Image Processing, 17(12): 2334-2346 [DOI:10.1109/TIP.2008.2005824]
-
Fang X S, Huang Z C, Chen Y X. 2018. Research on Huffman algorithm based on PCA and SPIHT for image compression. Journal of Zhejiang University:Science Edition, 45(1): 54-59 (方炫苏, 黄樟灿, 陈亚雄. 2018. 基于主成分分析和分层树集合划分的Huffman算法图像压缩研究. 浙江大学学报:理学版, 45(1): 54-59) [DOI:10.3785/j.issn.1008-9497.2018.01-009]
-
Kidwai N R, Khan E, Reisslein M. 2016. ZM-SPECK:a fast and memoryless image coder for multimedia sensor networks. IEEE Sensors Journal, 16(8): 2575-2587 [DOI:10.1109/JSEN.2016.2519600]
-
Kim H, No A, Lee H J. 2018. SPIHT algorithm with adaptive selection of compression ratio depending on DWT coefficients. IEEE Transactions on Multimedia, 20(12): 3200-3211 [DOI:10.1109/TMM.2018.2832604]
-
Lahdir M, Hamiche H, Kassim S, Tahanout M. 2019. A novel robust compression-encryption of images based on SPIHT coding and fractional-order discrete-time chaotic system. Optics & Laser Technology, 109: 534-546 [DOI:10.1016/j.optlastec.2018.08.040]
-
Lee R C, Hung K C. 2019. New modified SPIHT algorithm for data compression system. Journal of Medical and Biological Engineering, 39(1): 18-26 [DOI:10.1007/s40846-018-0384-z]
-
Li F Y. 2017. Analysis and application of image compression technology in mobile internet. Xi'an: Xidian University (李凤怡. 2017. 移动互联网时代的图像压缩技术分析及应用探讨. 西安: 西安电子科技大学)
-
Li Q F, Chen D R, He G L, Feng H, Yang L X. 2015. Hyperspectral image compression algorithm with maximum error controlled based on clustering. Journal of Electronics & Information Technology, 37(2): 255-260 (李秋富, 谌德荣, 何光林, 冯辉, 杨柳心. 2015. 最大误差可控的高光谱图像聚类压缩算法. 电子与信息学报, 37(2): 255-260) [DOI:10.11999/JEIT140451]
-
Li Q F, Chen D R, Jiang W, Liu B T, Gong J L. 2016. Generalization of SPIHT:set partition coding system. IEEE Transactions on Image Processing, 25(2): 713-725 [DOI:10.1109/TIP.2015.2509253]
-
Liu M H. 2018. Design and implementation of the high frame rate image compression device loaded on rockets. Taiyuan: North University of China (刘敏慧. 2018. 箭载高帧频图像压缩装置设计与实现. 太原: 中北大学)
-
Ntsama E P, Colince W, Ele P. 2016. Comparison study of EMG signals compression by methods transform using vector quantization, SPIHT and arithmetic coding. SpringerPlus, 5: 444 [DOI:10.1186/s40064-016-2095-7]
-
Pearlman W A, Said A. 2008a. Image wavelet coding systems:part Ⅱ of set partition coding and image wavelet coding systems. Foundations and Trends in Signal Processing, 2(3): 181-246 [DOI:10.1561/2000000014]
-
Pearlman W A, Said A. 2008b. Set partition coding:part Ⅰ of set partition coding and image wavelet coding systems. Foundations and Trends in Signal Processing, 2(2): 95-180 [DOI:10.1561/2000000013]
-
Pearlman W A, Islam A, Nagaraj N, Said A. 2004. Efficient, low-complexity image coding with a set-partitioning embedded block coder. IEEE Transactions on Circuits and Systems for Video Technology, 14(11): 1219-1235 [DOI:10.1109/tcsvt.2004.835150]
-
Said A, Pearlman W A. 1996. A new, fast, and efficient image codec based on set partitioning in hierarchical trees. IEEE Transactions on Circuits and Systems for Video Technology, 6(3): 243-250 [DOI:10.1109/76.499834]
-
Sudha V, Sudhakar R. 2014. 3D multiwavelet based block coding algorithm for compression of volumetric medical images. International Journal of Imaging Systems and Technology, 24(2): 182-192 [DOI:10.1002/ima.22093]
-
Sun P H, Lan J L, Lu X Y, Ma T. 2017. Field-trimming compression model for rule set of packet classification. Journal of Electronics & Information Technology, 39(5): 1185-1192 (孙鹏浩, 兰巨龙, 陆肖元, 马腾. 2017. 一种基于匹配域裁剪的包分类规则集压缩方法. 电子与信息学报, 39(5): 1185-1192) [DOI:10.11999/JEIT160740]
-
Yeh H L, Gue S T, Tsai P, Shih W K. 2013. Wavelet bit-plane based data hiding for compressed images. AEU-International Journal of Electronics and Communications, 67(9): 808-815 [DOI:10.1016/j.aeue.2013.04.003]