Print

发布时间: 2019-01-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.180305
2019 | Volume 24 | Number 1




    图像处理和编码    




  <<上一篇 




  下一篇>> 





减少相邻位平面间冗余度的加密图像可逆信息隐藏
expand article info 袁源, 和红杰, 陈帆
西南交通大学信号与信息处理四川省重点实验室, 成都 610031

摘要

目的 针对现有的加密域可逆信息隐藏算法在对位平面压缩时未能充分利用位平面间的相关性的问题,为了降低位平面的压缩率从而提高嵌入容量,提出一种减少相邻位平面间冗余度的加密域可逆信息隐藏算法。方法 算法将图像进行分块并将块的位置进行置乱,置乱并未改变位平面的块内像素的相关性,使得位平面的块同样利于压缩。将块置乱后的图像的高位平面与次高位进行异或操作后得到新的次高位平面,再用新的次高位异或比它低一位的位平面。依次对其余的低位平面进行同样的操作后得到新的低7个位平面,将它们与原始最高位相结合得到新的图像的8个位平面。使用BBE(binary-block embeding)算法对新的图像的位平面进行压缩为嵌入信息腾出空间。为了保证加密图像的安全性,对腾出空间后的图像进行异或加密。结果 对相邻位平面进行异或后使除了最高位平面外的低位平面更平滑,减少了不能使用BBE算法压缩的块及压缩的不好的块的个数,更有利于用BBE算法对图像进行压缩。提出的算法与现有的基于位平面压缩的算法相比得到了较高的嵌入率,对不同纹理的图像而言,嵌入的容量平均提高了0.4 bit/像素。结论 实验结果表明,提出的算法在保证安全性的同时可以腾出更多的空间来嵌入额外的信息,在实际生活中能根据需求灵活地嵌入信息。嵌入的信息能无损地提取,且图像能完全恢复。总的来说,提出的算法具有良好的性能。

关键词

位平面冗余度; 图像加密域; 可逆信息隐藏; BBE(binary-block embeding); 位平面压缩; 高嵌入率

Reduction of the redundancy of adjacent bit planes for reversible data hiding in encrypted images
expand article info Yuan Yuan, He Hongjie, Chen Fan
Sichuan Key Laboratory of Signal and Information Processing, Southwest Jiaotong University, Chengdu 610031, China
Supported by: National Natural Science Foundation of China (61872303, 61461047)

Abstract

Objective For the existing reversible data hiding algorithm in encrypted images, the correlation between bit planes is not fully utilized when the bit plane is compressed. To reduce the compression ratio of bit planes and improve the embedding capacity, this study proposes a reversible data hiding algorithm in encrypted images to reduce the redundancy between adjacent bit planes. Method The proposed algorithm is mainly divided into the following steps:image block scrambling, image preprocessing, exclusive encryption, additional information embedding, information extraction, and image decryption/recovery. The proposed algorithm initially divides the image into non-overlapping blocks (such as 4×4) and scrambles the position of these blocks. The value of the bit plane does not change because the scrambling operation does not change the pixels of the image. In this way, the correspondence between the bit planes is unaffected, and compression can be performed based on the correlation. XOR operation is performed on adjacent bit planes because the binary images between the bit planes of the original image are similar. After the image is divided and the block is scrambled, XOR operation is performed on the highest-order and second-highest bit planes to obtain a new second-highest bit plane. Next, the new second-highest bit plane XOR is combined with a lower one to obtain the third-highest bit plane. The same operation is performed on the remaining lower bit planes to obtain a new lower seven bit planes, which combines the original highest bit plane to obtain the eight bit planes of the new image. The compression method of a binary-block embedding (BBE) algorithm identifies the binary image and records the structural information of the block. The BBE algorithm remarkably increases the embedding rate. The bit plane can be regarded as a binary value, thus, the compression method has been applied to grayscale images and achieved good results. The BBE algorithm has good effect on marking the block and storing structure information; thus, the proposed algorithm in the present work is also applied to this compression method. We use the BBE algorithm to compress the bit plane of an image after an adjacent bit plane XOR operation to accommodate the embedded information. To ensure the security of the encrypted image, the image that vacates the room through compression is XOR-encrypted by using an encryption key. The additional information that does not exceed the maximum embedded capacity are encrypted and embedded in the vacated space to ensure their security. The extraction and embedding of information are reverse processes. Therefore, if the corresponding key is obtained, then the information can be extracted without loss. Information extraction or image decryption/restoration is based on the key held by the user. If the user has an encryption key, then the image can be decrypted or the image can be completely restored. After complete restoration, XOR operation should be initially performed on the image. Then, the high-order data are restored by the BBE algorithm, and XOR operation is performed on the adjacent bit plane to obtain a restored image that is consistent with the original image. Image decryption and information extraction are two independent processes, which realize the separation of the algorithm. If the user has the data encryption key, then the data embedded in the image can be extracted without loss. Result Experiments have shown that the XOR operation of adjacent bit planes makes the lower bit planes smooth except for the highest bit plane. This operation reduces the number of incompressible blocks and compresses poor blocks in bit planes. It is also conducive in compressing the images with the BBE algorithm. Image compression can be improved; thus, considerable space can be freed to embed additional information. In comparison with several existing algorithms for reversible data hiding in encrypted images based on bit-plane compression, the average embedding rate of the proposed algorithm is increased by 0.4 bit/pixel for images with different textures. This finding illustrates the effectiveness of the proposed algorithm in improving the embedding capacity. The XOR operation of adjacent bit planes not only increases the capacity but also has a smaller time complexity than that the BBE method used in grayscale images. In the literature, this operation increases the efficiency of bit-plane coding since prediction and XOR operation making the bit plane smoother. The embedded information can be extracted without loss, and the image can be completely recovered, thereby realizing the complete reversibility of the algorithm. Conclusion Experimental results show that the proposed algorithm provides considerable spaces to embed additional information and ensures their security, which enables the flexibility to embed information based on the requirements. Generally, the proposed algorithm has good performance, and the XOR operation of adjacent bit planes can be applied to several bit-plane processing algorithms. In the future, our focus will be on the application of the algorithm in real life. In cloud storage, a certain amount of user space and transmission traffic is wasted when the cloud manager is not required to embed considerable data for some reversible information hiding algorithms with high embedding rate. The solution to these practical problems will be investigated in our future work. In this way, the algorithm of reversible data hiding in encrypted images can be suitable in real-life applications.

Key words

bit plane redundancy; image encryption; reversible data hiding; binary-block embeding (BBE); bit plane compression; high embedding rate

0 引言

可逆信息隐藏(RDH)是一项能在数字图像中嵌入秘密信息,信息被提取后图像能完全恢复的技术。传统的RDH主要有3种方法:基于无损压缩的可逆信息隐藏算法[1-2],基于直方图平移的可逆信息隐藏算法[3]和基于预测误差扩展的可逆信息隐藏算法[4-5]。随着网络的快速发展以及人们的隐私意识越来越强,加密图像可逆信息隐藏(RDH-EI)成为研究的热点。RDH-EI可以在不知道原始内容的情况下嵌入数据,实现了隐私、版权保护,可用于军事、医疗等领域。

根据信息提取与图像解密恢复是否独立,RDH-EI算法又可分为联合RDH-EI[6-10]和可分离RDH-EI[11-17]两类。联合RDH-EI中,Zhang[6]首次提出了一种基于加密图像的可逆信息隐藏算法。将图像分块后再根据嵌入的信息翻转最低3位有效位来嵌入额外的信息,最后,利用空间的相关性提取嵌入的信息以及恢复图像。嵌入的信息与分块的大小有关,而当分块大小不合适时,会导致提取出的额外信息和恢复图像出错。Hong等人[7]在Zhang[6]的基础上,根据相邻块的相关性用边匹配的方法提高了嵌入容量并且降低了提取恢复的错误率。

可分离算法可在提取嵌入信息时无需解密图像,相比于联合算法更灵活,得到了大量的关注。2013年,Ma等人[11]用传统的RDH腾出空间后,将数据可逆地嵌入到加密图像中。嵌入率最高达到0.5 bit/像素。Yi等人[16]在基于二值图像的BBE算法上,将灰度图像高位平面运用BBE算法腾出空间再将低位的数据嵌入到高位腾出的空间中,用替代法在低位嵌入额外的信息。该算法具有较高的嵌入率,100幅图像平均为1.85 bit/像素。Liu等人[17]提出了一种基于冗余空间转移的算法,使用了和Yi等人[16]不同的块压缩方法在高3位腾出空间嵌入信息。该算法在保证安全性的同时也有较高的嵌入率,100幅图像平均可达到1.5 bit/像素,且时间复杂度比文献[16]低。但压缩的位平面最多可以选择3个,且块的大小只能为2的次方,灵活性不好。上述方法具有较高的嵌入率,但是未能充分利用位平面之间的相关性减少空间的冗余度以提高嵌入率。

为了进一步提高嵌入率,基于文献[16]的算法,提出了一种减少相邻位平面冗余度的可逆信息隐藏算法。算法将高位平面与次高位平面异或操作后,再使用BBE算法,得到更低的压缩率,从而嵌入更多的数据。嵌入率平均提高了0.4 bit/像素。

1 BBE算法介绍及分析

2017年,Yi等人[16]提出了一种基于BBE算法压缩块的可逆信息隐藏算法,具有较高的嵌入容量。BBE算法首先将二值图像分为不重叠的块,根据阈值$na$将块分类标记。将标记的块类型和结构信息作为压缩序列存放在块的起始位置后,块内剩余的空间即可嵌入额外的信息

$ \begin{array}{*{20}{c}} {na = \arg \mathop {{\mathop{\rm maxq}\nolimits} }\limits_x \left\{ {n - 3 - \max \left\{ {\left\lceil {{{\log }_2}\left( x \right)} \right\rceil ,1} \right\} - } \right.}\\ {\left. {x\left\lceil {{{\log }_2}\left( n \right)} \right\rceil } \right\} \ge 0,\;\;\;\;1 \le x \le \left\lceil {0.16 \times n} \right\rceil } \end{array} $ (1)

式中,$n$为块内的像素个数。

表 1为块分类标识。其中,$n_0$为像素值为0的个数,$n_0$为像素值为1的个数,$m=\text{min}\{{{n}_{0}}, {{n}_{1}}\}$。当块类型标记完之后,记录类型为G-Ⅱ和G-Ⅳ的块中少数像素的个数以及位置并将它们作为结构信息保存在对应块中标记信息之后。少数像素个数所占的空间为$p=\text{max}\{\left\lceil \text{lo}{{\text{g}}_{2}}~na \right\rceil, 1\}$。少数像素的位置采用相对位置为

$ {t_i} = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} {z_i}\\ {z_i} - {z_{i - 1}} \end{array}&\begin{array}{l} i = 1\\ 2 \le i \le n \end{array} \end{array}} \right. $ (2)

表 1 块分类标识
Table 1 Block classification identification

下载CSV
条件 块类型 块描述 块标识
$m > na$ Bad 不能嵌入信息 00
${m_0}{\rm{ = }}{n_0} = 0$ G-Ⅰ 所有的像素都为1 11
$m{\rm{ = }}{n_1} = 0$ G-Ⅱ 所有的像素都为0 10
$1 \le m \le na, {n_0} < {n_1}$ G-Ⅲ 大多数像素为1 011
$1 \le m \le na, {n_1} < {n_0}$ G-Ⅳ 大多数像素为0 010

每一个少数像素的相对位置所占空间为

$ {q_i} = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} \left\lceil {{{\log }_2}\left( n \right)} \right\rceil \\ \max \left\{ {\left\lceil {{{\log }_2}\left( {n - {z_{i - 1}}} \right)} \right\rceil ,1} \right\} \end{array}&\begin{array}{l} i = 1\\ 2 \le i \le m \end{array} \end{array}} \right. $ (3)

式中,$z_i$为少数像素在块内从左到右,从上到下的1维坐标。

为了便于统计,将上述的5种块分类简化为3类,如表 2所示。分类简化后的3类块的嵌入容量分别为

$ \left\{ \begin{array}{l} {C_{{\rm{T1}}}} = n - 2\\ {C_{{\rm{T2}}}} = n - 3 - p - \sum\limits_{i = 1}^m {{q_i}} \\ {C_{{\rm{T3}}}} = - 2 \end{array} \right. $ (4)

表 2 简化分类表
Table 2 Simplified classification table

下载CSV
类名 包含的块类型
T1 G-Ⅰ、G-Ⅱ
T2 G-Ⅲ、G-Ⅳ
T3 Bad

可以看出,分类为T1的块只需要记录类型标识;分类为T2的块不仅要记录标识位,还要记录少数像素的位置;分类为T3的块除了需要记录原始像素还需记录2 bit标记位,故嵌入容量为-2 bit。总结得出分类为T1的块可以嵌入更多的额外信息,T2次之,T3最差。

每个类型所占的比例${{R}_{\text{T1}}}$${{R}_{\text{T2}}}$${{R}_{\text{T3}}}$

$ \left\{ \begin{array}{l} {R_{{\rm{T1}}}} = \frac{{{N_{{\rm{T1}}}}}}{{m \times n}}\\ {R_{{\rm{T2}}}} = \frac{{{N_{{\rm{T2}}}}}}{{m \times n}}\\ {R_{{\rm{T3}}}} = \frac{{{N_{{\rm{T3}}}}}}{{m \times n}} \end{array} \right. $ (5)

各个比例与总的容量$C$之间的关系为

$ \begin{array}{*{20}{c}} {C = \left( {{R_{{\rm{T1}}}} \times {C_{{\rm{T1}}}} + {R_{{\rm{T2}}}} \times } \right.}\\ {\left. {{C_{{\rm{T2}}}} + {R_{{\rm{T3}}}} \times {C_{{\rm{T3}}}}} \right) \times m \times n} \end{array} $ (6)

式中,${{N}_{\text{T}}}_{\text{1}}$${{N}_{\text{T}}}_{2}$${{N}_{\text{T}}}_{3}$分别为3个类型的个数,$m×n$为块的总个数。结合式(4)(5)(6)可以得出,比例${{R}_{\text{T1}}}$越大、T2类型的少数像素个数$m$${{R}_{\text{T3}}}$的比例越小,得到的总嵌入容量$C$越大。嵌入率$R$

$ R = \frac{C}{{M \times N}} $ (7)

式中,$M×N$为图像的大小。载荷$p$由容量$C$及T3块的前两位像素组成,在每一个块腾出的空间中替代嵌入载荷。

由于灰度图像高位平面的空间冗余度比较高,Yi等人[16]将BBE算法应用在灰度图像中得到了较高的嵌入率。为了更充分地利用位平面之间的相关性,故对相邻位平面进行分析,让位平面中像素值为0和1的分布更集中,从而增加T1块的个数、减少T3块的个数,达到增加容量的效果。

2 相邻位平面分析

以Lena图像为例,图 1(a)为最高位平面二值图,图 1(b)为次高位平面二值图,图 1(c)图 1(a)(b)异或操作后的新的次高位平面二值图。可以看出图 1(c)图 1(b)更平滑,从而可以增加T1块的个数,减少T3块的个数,有利于用BBE压缩得到更多的嵌入空间。

图 1 Lena位平面
Fig. 1 Bits plane of Lena((a) MSB plane; (b) the second highest plane bit; (c) the new second highest plane after XOR)

为了更好地说明异或后的位平面压缩结果比较好,选取了Lena图像中的一个小块进行分析,如图 2(a)

图 2 位平面数据分析
Fig. 2 Bit-plane data analysis((a) partial original image (black block is the selected block); (b) pixel values of the black block; (c) pixel values of the highest bit plane in the black block; (d) pixel values of the second highest plane bit in the black block; (e) pixel values of the new second highest plane after XOR)

图 2所示,可以由原始块的像素(图 2(b))得到最高位平面比特为图 2(c)、次高位平面比特为图 2(d)。可以看出,图 2(c)图 2(d)异或之后得到的新的次高位平面为全1。由式(1)可计算出$na$=4,对照表 1可知图 2(c)图 2(d)为T3类型的块,图 2(e)的块类型为T1。它们的嵌入容量可由式(4)计算得出,结果如表 3所示。

表 3 块类型及嵌入容量
Table 3 Block types and embedded capacity

下载CSV
图 2 块类型 嵌入容量/bit
(b) T3 -2
(c) T3 -2
(d) T1 5×5-2=23

表 3可以看出,相邻位平面异或操作后新的位平面比原来位平面多嵌入25 bit。从表 4可知,图 2(d)图 2(c)分类为T1的块多,且减少了小部分分类为T2的块,T3的块减少得最多,故图 2(d)的嵌入率比图 2(c)高。

表 4 位平面类型比较
Table 4 Comparison of bit plane types

下载CSV
图 2 ${R_{{\rm{T1}}}}$ ${R_{{\rm{T2}}}}$ ${R_{{\rm{T3}}}}$ $R$
(c) 0.55 0.17 0.27 0.56
(d) 0.73 0.12 0.15 0.70

经过对相邻位平面的像素的观察,分析可知它们之间存在冗余度。由此,就可以将此方法运用在灰度图像的高位平面中,从而得到更高的嵌入容量。

3 算法描述

本文以512×512像素大小的图像为例,将减少相邻位平面间冗余度的加密图像可逆信息隐藏的算法分为3个部分描述:加密图像、数据嵌入与信息提取、解密图像与恢复图像。

3.1 加密图像

图像加密阶段的框架如图 3所示,首先将图像分成不重叠的块,接着将块的位置进行置乱。依次将置乱后图像的高位和次高位异或得到新的次高位平面。得到新的位平面后,用BBE算法对位平面压缩后再进行异或加密。详细步骤如下:

图 3 加密框架图
Fig. 3 Encryption frame

1) 块置乱。为了保证块内像素及相邻位平面的相关性,采用块置乱的方法对图像进行加密。设原始图像$\mathit{\boldsymbol{I}}$的大小为$M×N$像素,首先,将$\mathit{\boldsymbol{I}}$分成$m×n$个大小为$s×s$的不重叠的块。$m$$n$

$ m = \left\lfloor {\frac{M}{s}} \right\rfloor ,n = \left\lfloor {\frac{N}{s}} \right\rfloor $ (8)

由密钥$Key$生成的不重复的$m×n$大小的随机矩阵$\mathit{\boldsymbol{ED}}_1$,矩阵的值大小为1~$M×N$的整数。设块在原始图像中所对应的坐标为($x, y$),块置乱后块所对应的新坐标($x′, y′$)为

$ \left\{ \begin{array}{l} x' = \left\lceil {\frac{{E{D_1}\left( {x,y} \right)}}{m}} \right\rceil \\ y' = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} {N_1}\\ E{D_1}\left( {x,y} \right)\bmod n \end{array}&\begin{array}{l} E{D_1}\left( {{x_1},{y_1}} \right)\bmod m = 0\\ 其他 \end{array} \end{array}} \right. \end{array} \right. $ (9)

式中,mod为取余操作。

经过以上操作得到置乱后的图像$\mathit{\boldsymbol{ID}}$

2) 异或相邻位平面。由于块置乱后,相邻位平面之间的对应关系并没有改变,故块置乱后与未置乱时对相邻位平面异或操作的效果是一致的。置乱后的图像为$\mathit{\boldsymbol{ID}}$的8个平面位$\mathit{\boldsymbol{ID}}$($i$), $i$∈[1, 8],其中$\mathit{\boldsymbol{ID}}$(1)为高位平面。高位平面与次高位平面进行异或得到新的次高位平面

$ \mathit{\boldsymbol{ID}}\left( {i + 1} \right) = \mathit{\boldsymbol{ID}}\left( i \right) \oplus \mathit{\boldsymbol{ID}}\left( {i + 1} \right),1 < i \le 8 $ (10)

接着,用新的次高位平面与比它低一位的位平面异或。将原始图像的最高位与所有异或后的低7个位平面组合得到图像$\mathit{\boldsymbol{IX}}$

3) BBE算法腾出空间。采用BBE算法求出$\mathit{\boldsymbol{IX}}$图像每一个位平面可嵌入的容量$c_i(1≤i≤8)$,得到可用高$k$位嵌入低位信息。$k$

$ k = \left\{ \begin{array}{l} 0\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{c_i} \le 0\\ \arg \mathop {\max }\limits_t \left( \begin{array}{l} \sum\limits_{i = 1}^t {\frac{{{c_i}}}{{M \times N}}} \le 8 - t,\\ t = 1, \cdots ,8 \end{array} \right)\;\;\;\;\;{c_i} > 0 \end{array} \right. $ (11)

$k$位的总嵌入容量为

$ C = \left\{ \begin{array}{l} 0\;\;\;\;\;\;\;\;k = 0\\ \sum\limits_{i = 1}^k {{c_i}} \;\;\;其他 \end{array} \right. $ (12)

从低(8-$k$)位中选取$C$ bit信息作为即将嵌入到高位的数据。实际要嵌入到高$k$位的为载荷$P_E$$P_E$由低位的$C$ bit与高$k$个位平面中每一个分类为T3的块的前两个像素组成。$P_E$嵌入到高$k$个位平面中每一个块腾出空间后,将图像记为$\mathit{\boldsymbol{IR}}$

4) 异或加密。为了提高加密图像的安全性,再对$\mathit{\boldsymbol{IR}}$进行异或加密。将图像$\mathit{\boldsymbol{IR}}$的第$k$个位平面中坐标为($i, j$)的比特值记为$Bit_{i, j, k}$。使用密钥$Key$随机产生与$\mathit{\boldsymbol{IR}}$中比特一一对应的矩阵$\mathit{\boldsymbol{E}}{\mathit{\boldsymbol{D}}_{\rm{2}}}$$\mathit{\boldsymbol{IR}}$进行异或加密,加密过程为

$ {E_{i,j,k}} = Bi{t_{i,j,k}} \oplus E{D_{2i,j,k}} $ (13)

式中,$1≤i≤m, 1≤j≤n, 1≤k≤8$

将异或后的8个位平面组合得到加密图像$\mathit{\boldsymbol{E}}$

3.2 数据嵌入与信息提取

1) 数据嵌入。在3.1节中通过BBE压缩腾出了低位的$C$ bit空间可嵌入额外的数据。明文信息为$\mathit{\boldsymbol{p}} = [{p_1}, {p_2}, \ldots, {p_C}]$。为了提高数据的安全性,用加密密钥${\mathit{\boldsymbol{K}}_{\rm{D}}} = [{x_1}, {x_2}, \ldots, {x_C}]$对明文信息进行加密。密文信息$DS$

$ DS = round\left( {{x_i}} \right) \oplus {p_i},1 \le i \le C $ (14)

式中,$round$表示四舍五入。

通过替换,将密文信息$DS$嵌入到低(8-$k$)位的$C$ bit中得到含有隐藏信息的加密图像$\mathit{\boldsymbol{EM}}$。嵌入率${R_{{\rm{EM}}}}$

$ {R_{{\rm{EM}}}} = \frac{C}{{M \times N}} = \sum\limits_{i = 1}^k {{R_i}} $ (15)

式中,${R_i}$为位平面嵌入率。

2) 信息提取。若接收方拥有${\mathit{\boldsymbol{K}}_{\rm{D}}}$,接收方则可以在不知道原始图像内容的情况下提取隐藏的信息。首先,将秘密信息$\mathit{\boldsymbol{D}}' = [{d_1}, {d_2}, \ldots, {d_C}]$$\mathit{\boldsymbol{EM}}$的低位平面中提取出来,将${\mathit{\boldsymbol{K}}_{\rm{D}}}$密钥解密秘密信息得到明文信息$p′$,即

$ p' = round\left( {{x_i}} \right) \oplus {d_i},\;\;\;\;1 \le i \le C $ (16)

3.3 解密图像与恢复图像

如果接收方拥有密钥$Key$。则可以根据需要获得解密图像或者完全恢复图像。解密与恢复图像的过程可以分为以下几个步骤:

1) 异或解密。将$Key$密钥产生的$\mathit{\boldsymbol{E}}{\mathit{\boldsymbol{D}}_{\rm{2}}}$异或含有隐藏信息的加密图像$\mathit{\boldsymbol{EM}}$中除嵌入额外信息的低位$C$比特,将异或后的图像记为$\mathit{\boldsymbol{RX}}$, 即

$ R{X_{i,j,k}} = E{M_{i,j,k}} \oplus E{D_{2i,j,k}} $ (17)

式中,$1≤i≤m, 1≤j≤n, 1≤k≤8$

2) 根据BBE算法,恢复高位的信息并提取嵌入到高位的低位信息。提取出$\mathit{\boldsymbol{RX}}$里嵌入到高$k$位的低位平面信息$lm$和高位结构信息$hs$,并记录T3块的位置$tp$。根据$hs$$tp$恢复高位平面后得到$\mathit{\boldsymbol{RB}}$

3) 把$\mathit{\boldsymbol{RB}}$从第$k$位平面开始与比它低一位的位平面异或得到恢复的高位平面,最终得到位平面恢复的图像$\mathit{\boldsymbol{RH}}$

4) 恢复块置乱。将$\mathit{\boldsymbol{RH}}$分成大小为$s×s$的块。用$Key$密钥产生的$\mathit{\boldsymbol{E}}{\mathit{\boldsymbol{D}}_{\rm{1}}}$$\mathit{\boldsymbol{RX}}$图像的块置乱恢复,得到与原始图像相似含有秘密信息的解密图像$\mathit{\boldsymbol{RD}}$

$ \left\{ \begin{array}{l} {{x'}_1} = \left\lceil {\frac{{E{D_1}\left( {{x_1},{y_1}} \right)}}{m}} \right\rceil \\ {{y'}_1} = \\ \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} n\\ E{D_1}\left( {{x_1},{y_1}} \right)\bmod m \end{array}&\begin{array}{l} E{D_1}\left( {{x_1},{y_1}} \right)\bmod m = 0\\ 其他 \end{array} \end{array}} \right. \end{array} \right. $ (18)

式中,$({x_1}, {x_2})$为块的坐标,$(x{'_1}, y{'_1})$为恢复后的块坐标。

如果此时接收方拥有密钥${\mathit{\boldsymbol{K}}_{\rm{D}}}$,则可以在低位提取出嵌入信息。

5) 根据提取的低位平面信息$lm$恢复$\mathit{\boldsymbol{RD}}$中低位后得到完全恢复的图像$\mathit{\boldsymbol{R}}$

4 算法仿真分析

该部分主要分析了不同纹理的图像的$k$个位平面中块类型的比例以及总的嵌入容量。在测试了512×512像素的Lena、Baboon、Airplane、House图像后,进一步测试了100幅图像。图 4中Lena图像分块为4,其中,解密图像与原始图像的峰值信噪比(PSRN)为40.87,恢复图像与原始图像的PSRN为∞。

图 4 Lena图像仿真结果
Fig. 4 Simulation results of Lena((a) original image; (b) encrypted image; (c) decrypted image; (d) restored image)

测试了图 5的4幅图像在分块为4的情况下各$k$个位平面块类型比例及嵌入率,结果如表 5所示。可以看出,Liu等人[17]算法的T1块与Yi等人[16]的算法相同,而T2块比文献[16]多,导致了T3块比文献[16]少。这是因为文献[17]采用行列记录少数像素的位置,而文献[16]采用相对位置记录,占用的空间少于文献[17]。所以,文献[17]的嵌入率没有文献[16]高。本文算法的每一个位平面的T1块都多于其他两个算法,相应地减少了T2和T3块(如表 5中粗体数据),提高了位平面嵌入率。

图 5 测试图像
Fig. 5 Test images ((a) Lena; (b) Baboon; (c) Airplane; (d) House)

表 5 位平面块类型及嵌入容量比较
Table 5 Bit-plane block types and embedded capacity comparison

下载CSV
指标 算法 Lena Baboon Airplane House
P(2) P(3) P(4) P(5) P(2) P(3) P(2) P(3) P(4) P(5) P(2) P(3) P(4)
${R_{{\rm{T1}}}}$ 文献[16] 0.62 0.45 0.19 0.04 0.21 0.09 0.65 0.56 0.34 0.16 0.83 0.71 0.51
文献[17] 0.62 0.45 - - 0.21 0.09 0.65 0.56 - - 0.83 0.71 -
本文 0.78 0.57 0.37 0.15 0.57 0.18 0.72 0.70 0.38 0.33 0.89 0.77 0.59
${R_{{\rm{T2}}}}$ 文献[16] 0.12 0.17 0.18 0.11 0.17 0.11 0.11 0.12 0.15 0.14 0.04 0.06 0.10
文献[17] 0.21 0.32 - - 0.26 0.19 0.15 0.17 - - 0.06 0.09 -
本文 0.08 0.15 0.15 0.17 0.20 0.14 0.09 0.09 0.17 0.14 0.03 0.05 0.10
${R_{{\rm{T3}}}}$ 文献[16] 0.26 0.39 0.63 0.85 0.61 0.80 0.24 0.32 0.50 0.70 0.13 0.23 0.38
文献[17] 0.16 0.23 - - 0.53 0.73 0.20 0.27 - - 0.11 0.20 -
本文 0.15 0.29 0.48 0.69 0.23 0.68 0.19 0.22 0.45 0.53 0.08 0.18 0.31
${R_{{\rm{EM}}}}$ 文献[16] 0.56 0.41 0.16 -0.03 0.18 0.02 0.58 0.50 0.30 0.11 0.73 0.62 0.44
文献[17] 0.53 0.39 - - 0.19 0.06 0.55 0.47 - - 0.68 0.59 -
本文 0.69 0.52 0.32 0.11 0.55 0.12 0.64 0.62 0.35 0.27 0.78 0.68 0.51
注:加粗字体为对应4个指标提升较好的情况, “-”表示不能压缩, P($i$)表示第$i$个位平面。

表 6比较了Yi等人[16]、Liu等人[17]及本文算法的总嵌入率及程序运行时间。对嵌入容量来说,文献[17]的算法比文献[16]及本文的算法的嵌入率略低。当本文算法中$k$值比文献[16]的高或者相当时,嵌入率比文献[16]高大约0.4 bit/像素左右。而House图像由于$k$值比文献[16]算法少了1位,故嵌入率比文献[16]低。但是从表 4可知, 图像的每一个位平面的嵌入率都比文献[16]高,所以导致了嵌入率只低了0.1 bit/像素。程序的运行时间从一定程度上反映了算法的复杂度。从表 6可以看出,文献[17]的运行时间最短,这是因为其算法所用的位平面没有其他两个算法多,相应地,嵌入容量较低。本文算法与文献[16]算法的程序运行时间相差不大,且因为对位平面进行了处理使得压缩处理的时间减少。对纹理图像(Baboon)而言,本文算法在得到最佳嵌入率时的复杂度比文献[16]的低。对于平滑图像而言,本文算法在得到最佳嵌入率时的复杂度与文献[16]的差不多。总的来说,虽然本文算法复杂度比文献[17]高,但是嵌入率是3个算法中最好的。

表 6 嵌入容量
Table 6 Embedded capacity

下载CSV
图像 算法 $k$ ${R_{{\rm{EM}}}}$(bit/像素) 运行时间/s
Lena 文献[16] 4 1.84 14.81
文献[17] 3 1.58 10.20
本文 5 2.35 14.64
Baboon 文献[16] 3 0.56 13.79
文献[17] 3 0.59 8.43
本文 3 1.05 12.55
Airplane 文献[16] 5 2.23 15.12
文献[17] 3 1.70 11.81
本文 5 2.62 16.53
House 文献[16] 5 2.92 16.12
文献[17] 3 2.02 10.29
本文 4 2.82 14.12
注:加粗字体为最优值。

为了更好地证明本文算法减少了相邻位平面之间的冗余度,选取了100幅图像测试Yi等人[16]、Liu等人[17]和本文算法在高3位嵌入时各类块的比值。测试结果如图 6所示。从图 6中可以看出,本文算法中T1类型块总体提升了,T2、T3类型块总体下降了。减少了不能嵌入信息的块,增加了能够嵌入最多信息的块,故从图 6(d)中看出,3个位平面总嵌入率比文献[16]和文献[17]高。

图 6 100幅测试图像块类型及嵌入率分析
Fig. 6 Analysis of block type and embedded rate of 100 test images((a) block ratio of type T1; (b) block ratio of type T2; (c) block ratio of type T3; (d) total embedding rate of three high planes)

100幅测试图不同分块下的平均嵌入率如表 7所示。可以看出,因为文献[17]只能选取高3个位平面嵌入信息,且压缩方式不够好,故嵌入率比文献[16]和本文算法低。本文算法在不同分块下的嵌入率都比文献[16]和文献[17]的高,比文献[16]的算法嵌入率平均提高了0.4 bit/像素。所用的减少相邻位平面的冗余度算法无论是从位平面的块类型还是整个的嵌入率来看都有较好的效果。

表 7 100幅图像不同分块下的平均嵌入率
Table 7 The average embedding rate under different blocks of 100 images

下载CSV
/(bit/像素)
算法 分块大小
3×3 4×4 5×5 6×6 7×7 8×8
文献[16] 1.61 1.84 1.85 1.80 1.79 1.75
文献[17] - 1.53 - - - 1.50
本文 1.99 2.23 2.25 2.19 2.19 2.15
注:加粗字体为最好的嵌入率, “-”表示不能压缩。

5 结论

本文的主要贡献是在文献[16]的基础上,通过相邻位平面间的异或操作来减少相邻位平面之间的冗余度,使异或后得到的新的低位平面块中的0、1的值分布得更集中。这样就增加了BBE算法中的G-Ⅰ和G-Ⅱ类型的块,减少Bad块个数。更利于用BBE算法对位平面进行压缩,从而使载体图像能腾出比文献[16]及文献[17]更多的空间嵌入额外的信息。这种相邻位平面之间的异或操作对文献[17]同样适用,可以增加其嵌入率。在提出的算法中,信息提取与图像恢复是完全可逆的,具有较好的性能。使用异或和置乱加密相结合的方法,进一步保障了加密图像及携密的加密图像的安全性。虽然提出的算法的嵌入率相比文献[16]及文献[17]有所提高,但是未能很好地贴合实际生活的应用,如在云储存的过程中云管理者可能不需要嵌入那么大的容量,那么一部分腾出的空间就会浪费掉。那么,今后的研究重点将放在如何处理这些浪费的空间让传输流量变小及上传到云端的图像占用用户更小的存储空间上。

参考文献

  • [1] Fridrich J, Goljan M, Du R. Lossless data embedding-new paradigm in digital watermarking[J]. Journal on Applied Signal Processing, 2002, 2002(2): 185–196. [DOI:10.1155/S1110865702000537]
  • [2] Celik M U, Sharma G, Tekalp A M, et al. Lossless generalized-LSB data embedding[J]. IEEE Transactions on Image Processing, 2005, 14(2): 253–266. [DOI:10.1109/TIP.2004.840686]
  • [3] Ni Z C, Shi Y Q, Ansari N, et al. Reversible data hiding[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2006, 16(3): 354–362. [DOI:10.1109/TCSVT.2006.869964]
  • [4] Tian J. Reversible data embedding using a difference expansion[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2003, 13(8): 890–896. [DOI:10.1109/TCSVT.2003.815962]
  • [5] Li R, Li X Y. Pixel value ordering reversible data hiding algorithm based on image block selection[J]. Journal of Image and Graphics, 2017, 22(12): 1664–1676. [李蓉, 李向阳. 图像分区选择的像素值排序可逆数据隐藏[J]. 中国图象图形学报, 2017, 22(12): 1664–1676. ] [DOI:10.11834/jig.170101]
  • [6] Zhang X P. Reversible data hiding in encrypted image[J]. IEEE Signal Processing Letters, 2011, 18(4): 255–258. [DOI:10.1109/LSP.2011.2114651]
  • [7] Hong W E, Chen T S, Wu H Y. An improved reversible data hiding in encrypted images using side match[J]. IEEE Signal Processing Letters, 2012, 19(4): 199–202. [DOI:10.1109/LSP.2012.2187334]
  • [8] Liao X, Shu C W. Reversible data hiding in encrypted images based on absolute mean difference of multiple neighboring pixels[J]. Journal of Visual Communication and Image Representation, 2015, 28: 21–27. [DOI:10.1016/j.jvcir.2014.12.007]
  • [9] Cheng H, Wang Z C, Zhang X P. Reversible data hiding for encrypted image based on image blocks grouping[J]. Journal of Beijing University of Technology, 2016, 42(5): 722–728. [程航, 王子驰, 张新鹏. 基于图像块分组的加密域可逆信息隐藏[J]. 北京工业大学学报, 2016, 42(5): 722–728. ] [DOI:10.11936/bjutxb2015080007]
  • [10] Qian Z X, Dai S, Jiang F, et al. Improved joint reversible data hiding in encrypted images[J]. Journal of Visual Communication and Image Representation, 2016, 40: 732–738. [DOI:10.1016/j.jvcir.2016.08.020]
  • [11] Ma K D, Zhang W M, Zhao X F, et al. Reversible data hiding in encrypted images by reserving room before encryption[J]. IEEE Transactions on Information Forensics and Security, 2013, 8(3): 553–562. [DOI:10.1109/TIFS.2013.2248725]
  • [12] Zhang W M, Ma K D, Yu N H. Reversibility improved data hiding in encrypted images[J]. Signal Processing, 2014, 94: 118–127. [DOI:10.1016/j.sigpro.2013.06.023]
  • [13] Qian Z X, Zhang X P. Reversible data hiding in encrypted images with distributed source encoding[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2016, 26(4): 636–646. [DOI:10.1109/TCSVT.2015.2418611]
  • [14] Wu X T, Sun W. High-capacity reversible data hiding in encrypted images by prediction error[J]. Signal Processing, 2014, 104: 387–400. [DOI:10.1016/j.sigpro.2014.04.032]
  • [15] Zhang X P, Qian Z X, Feng G R, et al. Efficient reversible data hiding in encrypted images[J]. Journal of Visual Communication and Image Representation, 2014, 25(2): 322–328. [DOI:10.1016/j.jvcir.2013.11.001]
  • [16] Yi S, Zhou Y C. Binary-block embedding for reversible data hiding in encrypted images[J]. Signal Processing, 2017, 133: 40–51. [DOI:10.1016/j.sigpro.2016.10.017]
  • [17] Liu Z L, Pun C M. Reversible data-hiding in encrypted images by redundant space transfer[J]. Information Sciences, 2018, 433-434: 188–203. [DOI:10.1016/j.ins.2017.12.044]