CN114612317A - Secret image sharing method and system for resisting mean filtering - Google Patents

Secret image sharing method and system for resisting mean filtering Download PDF

Info

Publication number
CN114612317A
CN114612317A CN202210116389.0A CN202210116389A CN114612317A CN 114612317 A CN114612317 A CN 114612317A CN 202210116389 A CN202210116389 A CN 202210116389A CN 114612317 A CN114612317 A CN 114612317A
Authority
CN
China
Prior art keywords
pixel
image
neighborhood
value
extended
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210116389.0A
Other languages
Chinese (zh)
Other versions
CN114612317B (en
Inventor
姜越
杨国正
刘林涛
程静文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202210116389.0A priority Critical patent/CN114612317B/en
Publication of CN114612317A publication Critical patent/CN114612317A/en
Application granted granted Critical
Publication of CN114612317B publication Critical patent/CN114612317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/12Simultaneous equations, e.g. systems of linear equations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Operations Research (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

本发明提出一种用于对抗均值滤波的秘密图像分享方法和系统。包括:获取秘密图像和作为分享秘密图像的图像信息的载体的n个原始载体图像,原始载体图像经调整后得到与秘密图像大小相同的重组载体图像,n为正整数;将秘密图像的图像信息分别融合至n个重组载体图像以获取n个影子图像,对影子图像的每个像素进行邻域扩展,利用原始载体图像来填充经扩展的邻域,以得到扩展影子图像;计算扩展影子图像中的每个非扩展像素的邻域像素的均值,基于均值与对应的非扩展像素之间的差值来调整非扩展像素的各个邻域像素;将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方以恢复出秘密图像。

Figure 202210116389

The present invention proposes a secret image sharing method and system for anti-average filtering. Including: acquiring the secret image and n original carrier images as carriers for sharing the image information of the secret image, the original carrier image is adjusted to obtain a recombined carrier image with the same size as the secret image, n is a positive integer; Respectively fuse to n reconstructed carrier images to obtain n shadow images, perform neighborhood expansion on each pixel of the shadow image, and use the original carrier image to fill the expanded neighborhood to obtain an extended shadow image; The average value of the neighbor pixels of each non-extended pixel is adjusted based on the difference between the mean value and the corresponding non-extended pixel. The sender sends to the receiver to recover the secret image.

Figure 202210116389

Description

一种用于对抗均值滤波的秘密图像分享方法和系统A secret image sharing method and system for adversarial mean filtering

技术领域technical field

本发明属于图像处理领域,尤其涉及一种用于对抗均值滤波的秘密图像分享方法和系统。The invention belongs to the field of image processing, and in particular relates to a secret image sharing method and system for countering mean value filtering.

背景技术Background technique

秘密分享技术把秘密信息加密成为多个影子图像并分发给多个参与方,只有授权参与方的子集合可以一起解密,而非授权子集合无法解密。一个秘密分享算法一般包括秘密分享和恢复两个阶段,有时也称作加密和解密或者编码和解码。在(k,n)门限秘密分享方案当中,其中k≤n,将秘密信息加密成n个影子图像。只有获得等于或者大于k个影子图像时,才能解密原秘密;而少于k个影子图像时无法获得任何秘密。Secret sharing technology encrypts secret information into multiple shadow images and distributes them to multiple participants. Only a subset of authorized participants can decrypt them together, while non-authorized subsets cannot. A secret sharing algorithm generally includes two stages of secret sharing and recovery, sometimes called encryption and decryption or encoding and decoding. In the (k,n) threshold secret sharing scheme, where k≤n, the secret information is encrypted into n shadow images. The original secret can only be decrypted when equal to or greater than k shadow images are obtained; and no secret can be obtained when there are less than k shadow images.

数字图像是最重要的媒体类型之一,将秘密分享技术应用于数字图像对象的秘密图像分享技术蓬勃发展。相对于数据,在秘密图像分享领域数字图像的特殊性在于:(1)数字图像的特殊文件存储结构。以灰度BMP格式数字图像为例,其像素值取值空间为[0,255],所以在秘密图像分享方案中应充分考虑秘密值、分享值及相关参数的取值范围,避免分享或恢复过程出现信息丢失,导致无法恢复秘密图像的情况;(2)数字图像由大量像素点组成,秘密分享每次仅针对一个或几个像素值进行分享操作,因此,方案设计过程中应当重视分享和恢复算法的高效性;(3)相邻像素值之间有关联性,图像相邻像素点之间存在连贯性和关联性,这可能造成图像秘密信息的泄露,因此秘密图像分享方案要同时考虑单次分享安全性和视觉安全性;(4)图像传递最终靠人眼视觉系统识别,由于人眼的低通滤波特性,不要求无损恢复图像;(5)图像是特殊的数据,秘密图像分享方案可经简单改变应用于一般数据的秘密分享场合。秘密图像分享方案进行性能评估指标包括:秘密图像的恢复质量,有无像素扩张,(k,n)门限,秘密图像恢复复杂度,影子图像可理解,渐进性,秘密图像类型等。Digital images are one of the most important media types, and secret image sharing techniques that apply secret sharing techniques to digital image objects are flourishing. Compared with data, the particularity of digital images in the field of secret image sharing lies in: (1) The special file storage structure of digital images. Taking the digital image in grayscale BMP format as an example, its pixel value value space is [0, 255], so in the secret image sharing scheme, the value range of secret value, shared value and related parameters should be fully considered to avoid sharing or restoration. In the process, information is lost, which makes it impossible to recover the secret image; (2) The digital image is composed of a large number of pixels, and the secret sharing is only performed for one or a few pixel values at a time. The efficiency of the recovery algorithm; (3) There is correlation between adjacent pixel values, and there is coherence and correlation between adjacent image pixels, which may lead to the leakage of image secret information, so the secret image sharing scheme should be considered at the same time. Single sharing security and visual security; (4) The image transmission is ultimately recognized by the human visual system. Due to the low-pass filtering characteristics of the human eye, it does not require lossless restoration of the image; (5) The image is special data, secret image sharing The scheme can be applied to general data secret sharing situations with simple changes. The performance evaluation indicators of the secret image sharing scheme include: the restoration quality of the secret image, the presence or absence of pixel dilation, the (k,n) threshold, the complexity of the secret image restoration, the comprehensibility of the shadow image, the progressiveness, and the type of the secret image.

秘密分享的主流原理包括:基于多项式的(k,n)门限秘密分享方案、基于中国剩余定理的秘密分享方案、可视加密方案等。其中多项式秘密分享方案将秘密嵌入一个随机的k-1次多项式,在解密时这个多项式可以由拉格朗日插值法重构,从而获取嵌入多项式的秘密信息。已知秘密信息s,将其分享为n个影子份额sc1,sc2,…,scn,具体的方案如下:The mainstream principles of secret sharing include: polynomial-based (k,n) threshold secret sharing scheme, Chinese remainder theorem-based secret sharing scheme, and visual encryption scheme. The polynomial secret sharing scheme embeds the secret into a random k-1 polynomial, which can be reconstructed by Lagrangian interpolation during decryption to obtain the secret information embedded in the polynomial. Knowing the secret information s, share it as n shadow shares sc1,sc2,...,sc n , the specific scheme is as follows:

(1)在初始化阶段,确定门限(k,n)的值,其中,k≤n。选择一个大素数p,满足p>n且p>s,令GF(p)是一个有限域,所有的元素都是GF(p)的元素,且所有的运算在有限域GF(p)中进行。(1) In the initialization phase, determine the value of the threshold (k, n), where k≤n. Choose a large prime p, satisfying p>n and p>s, let GF(p) be a finite field, all elements are elements of GF(p), and all operations are performed in the finite field GF(p) .

(2)在分享阶段,为了将s加密成为影子值sci,在有限域GF(p)内随机生成一个k-1次的多项式:(2) In the sharing stage, in order to encrypt s into a shadow value sc i , a polynomial of degree k-1 is randomly generated in the finite field GF(p):

f(x)=a0+a1x+…+ak-1xk-1 f(x)=a 0 +a 1 x+…+a k-1 x k-1

其中,将秘密s嵌入到多项式第一个系数中,即a0=s,其余的系数a1,…,ak-1在有限域GF(p)中随机选取。然后计算Among them, the secret s is embedded in the first coefficient of the polynomial, that is, a 0 =s, and the remaining coefficients a 1 , . . . , a k-1 are randomly selected in the finite field GF(p). then calculate

sc1=f(1),…,sck=f(k),…,scn=f(n)sc 1 =f(1),...,sc k =f(k),...,sc n =f(n)

取(i,sci)作为一个影子对,其中i作为一个信息标签或者序号标签,sci作为一个影子像素值。将n个影子份额分别分发给n个参与者即完成秘密分享。Take (i, sc i ) as a shadow pair, where i is an information label or a serial number label, and sc i is a shadow pixel value. The secret sharing is completed by distributing n shadow shares to n participants respectively.

(3)在恢复阶段,在获取n个参与者中持有的任意k个秘密对

Figure BDA0003496553850000021
其中,
Figure BDA0003496553850000022
可以构建如下的线性方程组:(3) In the recovery phase, obtain any k secret pairs held by n participants
Figure BDA0003496553850000021
in,
Figure BDA0003496553850000022
The following system of linear equations can be constructed:

Figure BDA0003496553850000031
Figure BDA0003496553850000031

因为il(1≤l≤k)均不相同,所以可由拉格朗日插值公式构造如下的多项式:Because i l (1≤l≤k) are all different, the following polynomial can be constructed from the Lagrangian interpolation formula:

Figure BDA0003496553850000032
Figure BDA0003496553850000032

从而可得秘密s=f(0)。如果k-1个参与者想要获得秘密,可构造出k-1个方程并组成线性方程组,其中分享多项式的k个系数是未知数。由于标签il不同,每一个影子份额都对应一个唯一的多项式满足公式线性方程组,所以已知k-1个影子无法求解含有k个未知数的线性方程组,从而得不到关于秘密的任何信息,因此这个方案是完善的。Thus the secret s=f(0) can be obtained. If k-1 participants want to obtain a secret, k-1 equations can be constructed and formed into a linear system of equations, where the k coefficients of the sharing polynomial are unknowns. Because the labels i l are different, each shadow share corresponds to a unique polynomial that satisfies the linear equation system of the formula, so it is known that k-1 shadows cannot solve the linear equation system containing k unknowns, so that no information about the secret can be obtained. , so this scheme is perfect.

近年来,随着社交网络的各种安全问题显现,社交网络成了网络攻击和防御的必须考虑的一个复杂阵地。社交网络通信信道会造成各种噪声,网络服务器对含秘载体进行多种图像处理(重压缩、下采样、滤波、采样),然而由于秘密图像的恢复是基于数学运算的(如Lagrange插值、XOR等),在传输和存储图像时,通信信道通常会对图像进行滤波、采样、压缩等,另外会产生噪声,从而导致分享数据变化、丢失,进一步导致恢复的秘密图像中的数据变化、丢失,使得现有的传统的秘密图像共享方案不适用。影子图像在有损和被进行了图像处理情况下的秘密图像恢复是实践中必须解决的一个重要问题(鲁棒性)。如果想让机密信息可靠顺利传输过去,需要稳健的鲁棒的秘密图像分享。In recent years, with the emergence of various security problems of social networks, social networks have become a complex position that must be considered in network attacks and defenses. The social network communication channel will cause various noises, and the network server performs various image processing (recompression, downsampling, filtering, sampling) on the secret carrier, but since the recovery of the secret image is based on mathematical operations (such as Lagrange interpolation, XOR etc.), when transmitting and storing images, the communication channel usually filters, samples, compresses the images, etc., and also generates noise, which leads to the change and loss of shared data, which further leads to the change and loss of data in the recovered secret image, It makes the existing traditional secret image sharing scheme inapplicable. The secret image recovery of the shadow image in the case of lossy and image processing is an important problem (robustness) that must be solved in practice. Robust and robust sharing of secret images is required if confidential information is to be transmitted reliably and smoothly.

当前,关于鲁棒信息隐藏的研究不断增多,这些研究集中于抗JPEG压缩(无论在空域还是在时域上进行隐藏,或结合具有不同失真函数syndrome trellis codin框架)。但鲜有研究专注于鲁棒秘密图像分享,现存方案普遍存在像素扩张、恢复复杂度高的问题。目前的研究中,对抗图像处理类的鲁棒秘密分享对抗的对象主要有JPEG压缩、椒盐噪声、最低有效位噪声。目前这方面的研究存在以下不足:(1)对抗图像处理类的鲁棒秘密分享的研究还非常少;(2)针对的单一图像处理类型不全面,例如仅对最低有效位噪声、JPEG压缩和椒盐噪声具有一定的鲁棒性,对滤波、采样等操作无效;(3)借助隐写术来实现鲁棒性,这种方法具有很高的计算复杂度,会造成影子图像像素扩张,不能达到无损恢复。对抗图像处理类的鲁棒秘密分享的研究是将秘密图像分享应用于社交网络的必经之路和基础。必须考虑对抗的单一的图像处理类型还包括滤波、采样、旋转等常见的图像处理类型。另外,应追求更好的秘密图像分享属性,如无损恢复等。Currently, there is a growing body of research on robust information hiding, which focuses on anti-JPEG compression (whether hiding in spatial or temporal domain, or in combination with syndrome trellis codin frameworks with different distortion functions). However, few studies focus on robust secret image sharing, and existing schemes generally suffer from pixel expansion and high recovery complexity. In the current research, the objects of robust secret sharing against image processing mainly include JPEG compression, salt and pepper noise, and least significant bit noise. The current research in this area has the following shortcomings: (1) There are very few researches on robust secret sharing against image processing; (2) The single image processing type is not comprehensive, such as only the least significant bit noise, JPEG compression and Salt and pepper noise has a certain robustness, and is invalid for filtering, sampling and other operations; (3) Robustness is achieved by means of steganography. This method has high computational complexity and will cause shadow image pixel expansion, which cannot be achieved. Lossless recovery. The research on robust secret sharing against image processing is the only way and foundation for applying secret image sharing to social networks. The single image processing types that must be considered against are also common image processing types such as filtering, sampling, and rotation. In addition, better secret image sharing properties such as lossless recovery should be pursued.

目前鲜有研究专注于鲁棒秘密图像分享,对抗图像处理类的鲁棒秘密图像分享的研究更少,对抗的图像处理类型有主要有JPEG压缩、椒盐噪声、最低有效位噪声。目前还没有对抗滤波这一图像处理类型的鲁棒秘密图像分享方案的相关研究。现有技术中鲁棒的(k,n)门限SIS算法很巧妙地通过影子生成阶段的筛选机制将error-纠错码嵌入到影子图像中而没有造成影子扩张。最终利用基于中国剩余定理的秘密图像分享的原理实现了无像素扩展、恢复复杂度低、对某些类型的噪声(如最低有效位噪声、JPEG压缩和椒盐噪声)具有一定的鲁棒性。通过筛选随机数,该方案在影子生成阶段被设计为在不增加影子大小的情况下实现纠错能力。这是一种基于中国剩余定理和纠错码提出的不存在像素扩张的鲁棒SIS门限方案。然而,该方案仅对最低有效位噪声、JPEG压缩和椒盐噪声具有一定的鲁棒性,对滤波、采样等操作无效。而滤波、采样等图像处理操作是实践中通信信道中常用的操作。根据香农理论知道,要达到完美安全性,密钥必须和明文一样长并且相同的密钥不能使用两次。基于多项式的秘密图像分享实现简单、易理解且是理想且完美的。基于中国剩余定理的秘密图像分享影子图像比秘密图像大,若强制限制密图像分享影子图像比秘密图像等大会造成秘密信息泄露。At present, few researches focus on robust secret image sharing, and there are even fewer researches on robust secret image sharing in adversarial image processing. The types of adversarial image processing mainly include JPEG compression, salt and pepper noise, and least significant bit noise. There is no related research on a robust secret image sharing scheme for this type of image processing, adversarial filtering. The robust (k, n) threshold SIS algorithm in the prior art cleverly embeds the error-correcting code into the shadow image through the screening mechanism in the shadow generation stage without causing shadow expansion. Finally, the principle of secret image sharing based on the Chinese remainder theorem is used to achieve no pixel expansion, low recovery complexity, and certain robustness to certain types of noise (such as least significant bit noise, JPEG compression, and salt and pepper noise). By sifting random numbers, the scheme is designed to achieve error correction capability without increasing the shadow size during the shadow generation stage. This is a robust SIS threshold scheme without pixel dilation based on the Chinese remainder theorem and error correction codes. However, this scheme is only robust to least significant bit noise, JPEG compression and salt and pepper noise, and is ineffective for operations such as filtering and sampling. Image processing operations such as filtering and sampling are commonly used operations in communication channels in practice. According to Shannon's theory, to achieve perfect security, the key must be as long as the plaintext and the same key cannot be used twice. The implementation of polynomial-based secret image sharing is simple, understandable, ideal and perfect. Based on the Chinese remainder theorem, the secret image sharing shadow image is larger than the secret image. If the secret image sharing is forced to restrict the sharing of the shadow image than the secret image, it will lead to the leakage of secret information.

发明内容SUMMARY OF THE INVENTION

为解决上述技术问题,以及针对当前的研究多是针对最低有效位噪声、JPEG压缩和椒盐噪声鲁棒的秘密图像分享方案,没有关于对抗均值滤波的秘密图像分享方案的研究,本申请提出一种用于对抗均值滤波的秘密图像分享方案,以实现更多良好的传统秘密分享方案特性,如无损恢复、影子图像可理解、(k,n)门限。In order to solve the above-mentioned technical problems, and in view of the fact that most of the current researches are robust to the least significant bit noise, JPEG compression and salt-and-pepper noise, and there is no research on the secret image sharing scheme against mean filtering, this application proposes a A secret image sharing scheme for adversarial mean filtering to achieve more good characteristics of traditional secret sharing schemes, such as lossless recovery, shadow image intelligibility, (k,n) threshold.

本发明第一方面公开了一种用于对抗均值滤波的秘密图像分享方法。A first aspect of the present invention discloses a secret image sharing method for anti-average filtering.

所述方法包括:The method includes:

步骤S1、获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;Step S1, obtaining a secret image and n original carrier images as carriers for sharing the image information of the secret image, the secret image is a grayscale image, and the original carrier image is adjusted to obtain the same size as the secret image. , where n is a positive integer;

步骤S2、将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;Step S2, fuse the image information of the secret image into n of the reorganized carrier images respectively to obtain n shadow images, carry out neighborhood expansion to each pixel of the shadow images, and use the original carrier image to fill an expanded neighborhood to obtain an expanded shadow image of the same size as the original carrier image;

步骤S3、计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;Step S3, calculate the mean value of the neighborhood pixels of each non-expanded pixel in the expanded shadow image, and adjust each neighborhood pixel of the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel ;

步骤S4、将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。Step S4, sending the n extended shadow images that have completed neighborhood pixel adjustment from the sender to the receiver, and the receiver recovers the secret image based on the received n extended shadow images that have completed neighborhood pixel adjustment. .

根据本发明第一方面的方法,所述秘密图像的大小为r*r,所述n个原始载体图像的大小为3r*3r,r≥2且为正整数;在所述步骤S1中,对所述原始载体图像进行调整以得到与所述秘密图像大小相同的所述重组载体图像,具体包括:将所述原始载体图像分割成3*3的图像块,共有r*r个所述图像块,抽取每个所述图像块的中间像素,利用各个所述中间像素构成大小为r*r的所述重组载体图像。According to the method of the first aspect of the present invention, the size of the secret image is r*r, and the size of the n original carrier images is 3r*3r, where r≥2 and is a positive integer; in the step S1, for Adjusting the original carrier image to obtain the reconstructed carrier image with the same size as the secret image, specifically including: dividing the original carrier image into 3*3 image blocks, and there are r*r image blocks in total , extract the intermediate pixels of each of the image blocks, and use each of the intermediate pixels to form the reconstructed carrier image with a size of r*r.

根据本发明第一方面的方法,在所述步骤S2中,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取所述n个影子图像具体包括:对于所述秘密图像中的第i个像素,1≤i≤r*r,获取所述第i个像素在n个所述重组载体图像中对应的像素位置上的像素{i1,i2,...,in},通过将所述第i个像素与像素集合{i1,i2,...,in}进行融合得到{i1’,i2’,...,in’},作为所述n个影子图像在所述对应的像素位置上的像素,所述n个影子图像的大小为r*r。According to the method of the first aspect of the present invention, in the step S2, fusing the image information of the secret image into the n recombined carrier images respectively to obtain the n shadow images specifically includes: for the secret image The i-th pixel in , 1≤i≤r*r, obtains the pixel {i 1 , i 2 ,..., i of the i-th pixel at the corresponding pixel position in the n reconstructed carrier images n }, by fusing the i-th pixel with the pixel set {i 1 , i 2 , ..., i n } to obtain {i 1' , i 2' , ..., i n' }, as For the pixels of the n shadow images at the corresponding pixel positions, the size of the n shadow images is r*r.

根据本发明第一方面的方法,在所述步骤S2中,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像,具体包括:对所述影子图像中的每个像素进行邻域扩展,以扩展出周围的8个邻域像素;利用所述原始载体图像经3*3分割后得到的r*r个所述图像块,将所述图像块的中间像素的8个邻域像素填充至所述扩展影子图像中与所述中间像素对应的像素扩展出的8个邻域像素;所述扩展影子图像的大小为3r*3r。According to the method of the first aspect of the present invention, in the step S2, neighborhood expansion is performed on each pixel of the shadow image, and the expanded neighborhood is filled with the original carrier image, so as to obtain a The extended shadow image with the same size as the carrier image, specifically includes: performing neighborhood expansion on each pixel in the shadow image to expand the surrounding 8 neighborhood pixels; using the original carrier image after 3*3 segmentation For the obtained r*r image blocks, the 8 neighborhood pixels of the intermediate pixels of the image blocks are filled into the 8 neighborhood pixels extended from the pixels corresponding to the intermediate pixels in the extended shadow image; The size of the extended shadow image is 3r*3r.

根据本发明第一方面的方法,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the method of the first aspect of the present invention, in the step S3, adjusting each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为正数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素分别减去所述差值的整数部分,并且减去所述差值的整数部分后的所述各个邻域像素的像素值的范围为[0,255],若减去所述差值的整数部分后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is a positive number, each neighboring pixel of each non-extended pixel in the extended shadow image subtracts the integer part of the difference value respectively, and subtracts the integer part of the difference value. The range of the pixel value of each neighborhood pixel is [0, 255], if the range of the pixel value of each neighborhood pixel after subtracting the integer part of the difference value is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels;

在所述非扩展像素的各个邻域像素分别减去所述差值的整数部分后,确定所述差值的小数部分乘以8后的数值m1,从减去所述差值的整数部分后的所述非扩展像素的各个邻域像素中任意选取m1个邻域像素,所述m1个邻域像素中的每个邻域像素的像素值都减1,使得减1后的m1个邻域像素的像素值的范围为[0,255],若所述减1后的m1个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m1为正整数。After the integer part of the difference value is respectively subtracted from each neighboring pixel of the non-extended pixel, a numerical value m 1 obtained by multiplying the decimal part of the difference value by 8 is determined, and the integer part of the difference value is subtracted from M 1 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the subsequent non-extended pixel, and the pixel value of each neighborhood pixel in the m 1 neighborhood pixels is reduced by 1, so that the m after the reduction of 1 is reduced by 1. The range of the pixel value of 1 neighborhood pixel is [0, 255], if the range of the pixel value of the m 1 neighborhood pixel after subtracting 1 is not within [0, 255], then assign the pixel value of the non-extended pixel to Given its neighborhood pixels, m 1 is a positive integer.

根据本发明第一方面的方法,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the method of the first aspect of the present invention, in the step S3, adjusting each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为负数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素中分别加上所述差值的整数部分的绝对值,并且加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围为[0,255],若加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is negative, add the absolute value of the integer part of the difference value to each neighboring pixel of each non-extended pixel in the extended shadow image, and add the integer value of the difference value The range of the pixel value of each neighborhood pixel after the absolute value of the part is [0, 255], if the range of the pixel value of each neighborhood pixel after adding the absolute value of the integer part of the difference value is not in [ 0,255], then assign the pixel value of the non-expanded pixel to its neighborhood pixel;

在所述非扩展像素的各个邻域像素分别加上所述差值的整数部分的绝对值后,确定所述差值的小数部分乘以8后的数值m2,从加上所述差值的整数部分的绝对值后的所述非扩展像素的各个邻域像素中任意选取m2个邻域像素,所述m2个邻域像素中的每个邻域像素的像素值都加1,使得加1后的m2个邻域像素的像素值的范围为[0,255],若所述加1后的m2个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m2为正整数。After the absolute value of the integer part of the difference value is added to each neighboring pixel of the non-extended pixel, the numerical value m 2 obtained by multiplying the decimal part of the difference value by 8 is determined, and the difference value is added from the M 2 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the non - extended pixel after the absolute value of the integer part of The range of the pixel values of the m 2 neighborhood pixels after adding 1 is [0, 255], if the range of the pixel values of the m 2 neighborhood pixels after adding 1 is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels, and m 2 is a positive integer.

根据本发明第一方面的方法,所述接收方对接收到的所述完成邻域像素调整的n个扩展影子图像进行均值滤波,得到的结果图像中各个像素的像素值与所述影子图像的各个像素的像素值一致,从而实现能够对抗均值滤波的所述秘密图像的分享。According to the method of the first aspect of the present invention, the receiver performs mean filtering on the received n extended shadow images with pixel adjustment in the neighborhood, and the pixel value of each pixel in the obtained result image is the same as that of the shadow image. The pixel values of each pixel are consistent, thereby realizing the sharing of the secret image that can resist mean filtering.

本发明第二方面公开了一种用于对抗均值滤波的秘密图像分享系统。A second aspect of the present invention discloses a secret image sharing system for anti-average filtering.

所述系统包括:The system includes:

第一处理单元,被配置为,获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;The first processing unit is configured to acquire a secret image and n original carrier images serving as carriers for sharing image information of the secret image, the secret images are grayscale images, and the original carrier image is adjusted to obtain the same value as the original carrier image. The reconstructed carrier images with the same size of the secret image, and n is a positive integer;

第二处理单元,被配置为,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;The second processing unit is configured to fuse the image information of the secret image into the n reconstituted carrier images respectively to obtain n shadow images, perform neighborhood expansion on each pixel of the shadow images, and use the using the original carrier image to fill the extended neighborhood to obtain an extended shadow image of the same size as the original carrier image;

第三处理单元,被配置为,计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;a third processing unit configured to calculate a mean value of neighboring pixels of each non-expanded pixel in the expanded shadow image, and adjust the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel each neighborhood pixel of the pixel;

第四处理单元,被配置为,将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。The fourth processing unit is configured to send the n extended shadow images that have completed the neighborhood pixel adjustment from the sender to the receiver, and the receiver is based on the received n extended shadow images that have completed the neighborhood pixel adjustment. The secret image is recovered.

根据本发明第二方面的系统,所述秘密图像的大小为r*r,所述n个原始载体图像的大小为3r*3r,r≥2且为正整数;所述第一处理单元具体被配置为,对所述原始载体图像进行调整以得到与所述秘密图像大小相同的所述重组载体图像,具体包括:将所述原始载体图像分割成3*3的图像块,共有r*r个所述图像块,抽取每个所述图像块的中间像素,利用各个所述中间像素构成大小为r*r的所述重组载体图像。According to the system of the second aspect of the present invention, the size of the secret image is r*r, the size of the n original carrier images is 3r*3r, r≥2 and is a positive integer; the first processing unit is specifically configured by The configuration is to adjust the original carrier image to obtain the reconstituted carrier image with the same size as the secret image, which specifically includes: dividing the original carrier image into 3*3 image blocks, with a total of r*r pieces For the image block, the intermediate pixels of each of the image blocks are extracted, and each of the intermediate pixels is used to form the reconstructed carrier image with a size of r*r.

根据本发明第二方面的系统,所述第二处理单元具体被配置为,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取所述n个影子图像具体包括:对于所述秘密图像中的第i个像素,1≤i≤r*r,获取所述第i个像素在n个所述重组载体图像中对应的像素位置上的像素{i1,i2,...,in},通过将所述第i个像素与像素集合{i1,i2,...,in}进行融合得到{i1’,i2’,...,in’},作为所述n个影子图像在所述对应的像素位置上的像素,所述n个影子图像的大小为r*r。According to the system of the second aspect of the present invention, the second processing unit is specifically configured to fuse the image information of the secret image into the n reconstituted carrier images respectively to obtain the n shadow images, which specifically includes: for For the ith pixel in the secret image, 1≤i≤r*r, obtain the pixel {i 1 , i 2 , . .., i n }, by fusing the i-th pixel with the pixel set {i 1 , i 2 , ..., i n } to obtain {i 1' , i 2' , ..., i n ' }, as the pixels of the n shadow images at the corresponding pixel positions, the size of the n shadow images is r*r.

根据本发明第二方面的系统,所述第二处理单元具体被配置为,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像,具体包括:对所述影子图像中的每个像素进行邻域扩展,以扩展出周围的8个邻域像素;利用所述原始载体图像经3*3分割后得到的r*r个所述图像块,将所述图像块的中间像素的8个邻域像素填充至所述扩展影子图像中与所述中间像素对应的像素扩展出的8个邻域像素;所述扩展影子图像的大小为3r*3r。According to the system of the second aspect of the present invention, the second processing unit is specifically configured to perform neighborhood expansion on each pixel of the shadow image, and fill the expanded neighborhood with the original carrier image to obtain The expanded shadow image with the same size as the original carrier image specifically includes: performing neighborhood expansion on each pixel in the shadow image to expand the surrounding 8 neighborhood pixels; using the original carrier image after 3 *3 For the r*r image blocks obtained after division, the 8 neighboring pixels of the middle pixel of the image block are filled to the 8 pixels extended from the pixels corresponding to the middle pixel in the extended shadow image Neighborhood pixels; the size of the extended shadow image is 3r*3r.

根据本发明第二方面的系统,所述第三处理单元具体被配置为,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the system of the second aspect of the present invention, the third processing unit is specifically configured to adjust each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为正数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素分别减去所述差值的整数部分,并且减去所述差值的整数部分后的所述各个邻域像素的像素值的范围为[0,255],若减去所述差值的整数部分后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is a positive number, each neighboring pixel of each non-extended pixel in the extended shadow image subtracts the integer part of the difference value respectively, and subtracts the integer part of the difference value. The range of the pixel value of each neighborhood pixel is [0, 255], if the range of the pixel value of each neighborhood pixel after subtracting the integer part of the difference value is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels;

在所述非扩展像素的各个邻域像素分别减去所述差值的整数部分后,确定所述差值的小数部分乘以8后的数值m1,从减去所述差值的整数部分后的所述非扩展像素的各个邻域像素中任意选取m1个邻域像素,所述m1个邻域像素中的每个邻域像素的像素值都减1,使得减1后的m1个邻域像素的像素值的范围为[0,255],若所述减1后的m1个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m1为正整数。After the integer part of the difference value is respectively subtracted from each neighboring pixel of the non-extended pixel, a numerical value m 1 obtained by multiplying the decimal part of the difference value by 8 is determined, and the integer part of the difference value is subtracted from M 1 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the subsequent non-extended pixel, and the pixel value of each neighborhood pixel in the m 1 neighborhood pixels is reduced by 1, so that the m after the reduction of 1 is reduced by 1. The range of the pixel value of 1 neighborhood pixel is [0, 255], if the range of the pixel value of the m 1 neighborhood pixel after subtracting 1 is not within [0, 255], then assign the pixel value of the non-extended pixel to Given its neighborhood pixels, m 1 is a positive integer.

根据本发明第二方面的系统,所述第三处理单元具体被配置为,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the system of the second aspect of the present invention, the third processing unit is specifically configured to adjust each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为负数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素中分别加上所述差值的整数部分的绝对值,并且加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围为[0,255],若加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is negative, add the absolute value of the integer part of the difference value to each neighboring pixel of each non-extended pixel in the extended shadow image, and add the integer value of the difference value The range of the pixel value of each neighborhood pixel after the absolute value of the part is [0, 255], if the range of the pixel value of each neighborhood pixel after adding the absolute value of the integer part of the difference value is not in [ 0,255], then assign the pixel value of the non-expanded pixel to its neighborhood pixel;

在所述非扩展像素的各个邻域像素分别加上所述差值的整数部分的绝对值后,确定所述差值的小数部分乘以8后的数值m2,从加上所述差值的整数部分的绝对值后的所述非扩展像素的各个邻域像素中任意选取m2个邻域像素,所述m2个邻域像素中的每个邻域像素的像素值都加1,使得加1后的m2个邻域像素的像素值的范围为[0,255],若所述加1后的m2个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m2为正整数。After the absolute value of the integer part of the difference value is added to each neighboring pixel of the non-extended pixel, the numerical value m 2 obtained by multiplying the decimal part of the difference value by 8 is determined, and the difference value is added from the M 2 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the non - extended pixel after the absolute value of the integer part of The range of the pixel values of the m 2 neighborhood pixels after adding 1 is [0, 255], if the range of the pixel values of the m 2 neighborhood pixels after adding 1 is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels, and m 2 is a positive integer.

根据本发明第二方面的系统,所述接收方对接收到的所述完成邻域像素调整的n个扩展影子图像进行均值滤波,得到的结果图像中各个像素的像素值与所述影子图像的各个像素的像素值一致,从而实现能够对抗均值滤波的所述秘密图像的分享。According to the system according to the second aspect of the present invention, the receiver performs mean filtering on the received n extended shadow images that have completed neighborhood pixel adjustment, and the pixel value of each pixel in the obtained result image is the same as that of the shadow image. The pixel values of each pixel are consistent, thereby realizing the sharing of the secret image that can resist mean filtering.

本发明第三方面公开了一种电子设备。所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时,实现本公开第一方面中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。A third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method for anti-mean filtering described in any one of the first aspects of the present disclosure is implemented. Steps in the Secret Image Sharing Method.

本发明第四方面公开了一种计算机可读存储介质。所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现本公开第一方面中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。A fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, implements the method for sharing a secret image for anti-mean filtering according to any one of the first aspects of the present disclosure. step.

本发明提供的技术方案在给定一个被隐藏的秘密图像S和n个原始载体图像coveri的情况下,生成n个影子图像SC'i,使得k个或更多SC'i在被均值滤波处理以后依然会被恢复。该方案旨在于在均值滤波和进一步抽取后生成的影子图像SC'i恰好等于直接输入载体图像cover'i和S到秘密分享方案后得到的结果。该方案实现了良好的秘密分享方案特性,如无损恢复、影子图像可理解、(k,n)门限,可以应用于隐写分析和面向社交网络的隐蔽通信领域中。The technical solution provided by the present invention generates n shadow images SC' i given a hidden secret image S and n original carrier images cover i , so that k or more SC' i are filtered by the mean value It will still be restored after processing. The scheme aims to generate shadow images SC' i after mean filtering and further decimation exactly equal to the results obtained after directly inputting the carrier images cover' i and S to the secret sharing scheme. The scheme achieves good secret sharing scheme characteristics, such as lossless recovery, shadow image comprehension, (k,n) threshold, and can be applied in the fields of steganalysis and covert communication for social networks.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为根据本发明实施例的一种用于对抗均值滤波的秘密图像分享方法的流程图;1 is a flowchart of a secret image sharing method for anti-average filtering according to an embodiment of the present invention;

图2为根据本发明实施例的对抗均值滤波的秘密图像分享方案的框架图;2 is a framework diagram of a secret image sharing scheme against mean filtering according to an embodiment of the present invention;

图3(组图(a)-(q))为根据本发明实施例的对抗均值滤波的影子图像在生成阶段的实验结果;FIG. 3 (groups (a)-(q)) is the experimental result of the shadow image resisting mean value filtering in the generation stage according to an embodiment of the present invention;

图4(组图(a)-(j))为根据本发明实施例的对抗均值滤波的影子图像在恢复阶段的实验结果;FIG. 4 (groups (a)-(j)) is an experimental result of a shadow image against mean filtering in the restoration stage according to an embodiment of the present invention;

图5为根据本发明实施例一种用于对抗均值滤波的秘密图像分享系统的结构图;5 is a structural diagram of a secret image sharing system for anti-average filtering according to an embodiment of the present invention;

图6为根据本发明实施例的一种电子设备的结构图。FIG. 6 is a structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例只是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明第一方面公开了一种用于对抗均值滤波的秘密图像分享方法。图1为根据本发明实施例的一种用于对抗均值滤波的秘密图像分享方法的流程图;如图1所示,所述方法包括:A first aspect of the present invention discloses a secret image sharing method for anti-average filtering. FIG. 1 is a flowchart of a secret image sharing method for anti-average filtering according to an embodiment of the present invention; as shown in FIG. 1 , the method includes:

步骤S1、获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;Step S1, obtaining a secret image and n original carrier images as carriers for sharing the image information of the secret image, the secret image is a grayscale image, and the original carrier image is adjusted to obtain the same size as the secret image. , where n is a positive integer;

步骤S2、将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;Step S2, fuse the image information of the secret image into n of the reorganized carrier images respectively to obtain n shadow images, carry out neighborhood expansion to each pixel of the shadow images, and use the original carrier image to fill an expanded neighborhood to obtain an expanded shadow image of the same size as the original carrier image;

步骤S3、计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;Step S3, calculate the mean value of the neighborhood pixels of each non-expanded pixel in the expanded shadow image, and adjust each neighborhood pixel of the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel ;

步骤S4、将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。Step S4, sending the n extended shadow images that have completed neighborhood pixel adjustment from the sender to the receiver, and the receiver recovers the secret image based on the received n extended shadow images that have completed neighborhood pixel adjustment. .

图2为根据本发明实施例的对抗均值滤波的秘密图像分享方案的框架图;以下将结合图2详细说明本发明第一方面的方法。FIG. 2 is a frame diagram of a secret image sharing scheme against mean filtering according to an embodiment of the present invention; the method of the first aspect of the present invention will be described in detail below with reference to FIG. 2 .

在步骤S1,获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数。In step S1, a secret image and n original carrier images serving as carriers for sharing image information of the secret image are obtained, the secret images are grayscale images, and the original carrier image is adjusted to obtain the same size as the secret image The same reconstituted vector image, n is a positive integer.

在一些实施例中,所述秘密图像的大小为r*r,所述n个原始载体图像的大小为3r*3r,r≥2且为正整数;在所述步骤S1中,对所述原始载体图像进行调整以得到与所述秘密图像大小相同的所述重组载体图像,具体包括:将所述原始载体图像分割成3*3的图像块,共有r*r个所述图像块,抽取每个所述图像块的中间像素,利用各个所述中间像素构成大小为r*r的所述重组载体图像。In some embodiments, the size of the secret image is r*r, the size of the n original carrier images is 3r*3r, r≥2 and is a positive integer; in the step S1, the original The carrier image is adjusted to obtain the reconstructed carrier image with the same size as the secret image, which specifically includes: dividing the original carrier image into 3*3 image blocks, there are r*r image blocks in total, and extracting each Each of the intermediate pixels of the image block is used to form the reconstructed carrier image with a size of r*r.

具体地(如图2所示),获取原始载体图像(大小为3r*3r)后,对原始载体图像的大小进行调整,通过矩阵分割的方式分成3*3的图像块,抽取每个块的中间元素并进行重组(重组载体图像,大小为r*r)。获取待分享图像,通过对待分享图像进行灰度处理得到秘密图像(大小为r*r)。Specifically (as shown in Figure 2), after obtaining the original carrier image (with a size of 3r*3r), adjust the size of the original carrier image, divide it into 3*3 image blocks by matrix division, and extract the image size of each block. Intermediate elements and recombined (recombined vector image, size r*r). Obtain an image to be shared, and obtain a secret image (size r*r) by performing grayscale processing on the image to be shared.

在步骤S2,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像。In step S2, the image information of the secret image is respectively fused into n of the reconstructed carrier images to obtain n shadow images, and each pixel of the shadow images is expanded by neighborhood, and the original carrier image is used to obtain n shadow images. The expanded neighborhood is filled to obtain an expanded shadow image of the same size as the original carrier image.

在一些实施例中,在所述步骤S2中,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取所述n个影子图像具体包括:对于所述秘密图像中的第i个像素,1≤i≤r*r,获取所述第i个像素在n个所述重组载体图像中对应的像素位置上的像素{i1,i2,...,in},通过将所述第i个像素与像素集合{i1,i2,...,in}进行融合得到{i1’,i2’,...,in’},作为所述n个影子图像在所述对应的像素位置上的像素,所述n个影子图像的大小为r*r。In some embodiments, in the step S2, respectively fusing the image information of the secret image into the n reconstructed carrier images to obtain the n shadow images specifically includes: for the first image in the secret image i pixels, 1≤i≤r*r, obtain the pixel {i 1 , i 2 , . By fusing the i-th pixel with the pixel set { i 1 , i 2 , . The pixels of the shadow images at the corresponding pixel positions, and the size of the n shadow images is r*r.

具体地(如图2所示),利用基于多项式的秘密图像分享算法,实现将所述秘密图像的图像信息分别存储至n个所述重组载体图像中,以获取n个插值载体图像。插值方式可以为拉格朗日插值或者本领域常用的其他插值方式。例如,对于所述秘密图像中r*r个像素的第一个像素r1,将其分解为n个子信息r1-1,r1-2,r1-3,...,r1-(n-1),r1-n;将n个子信息分别插入至n个所述重组载体图像中;例如,采用基于多项式的秘密分享方法。对其他像素r2,r3,...,rr*r-1,rr*r执行同上操作。Specifically (as shown in FIG. 2 ), a polynomial-based secret image sharing algorithm is used to store the image information of the secret image into the n recombined carrier images respectively, so as to obtain n interpolated carrier images. The interpolation method may be Lagrangian interpolation or other interpolation methods commonly used in the art. For example, for the first pixel r 1 of r*r pixels in the secret image, decompose it into n sub-information r 1-1 , r 1-2 , r 1-3 , ..., r 1- (n-1) , r 1-n ; insert n pieces of sub-information into the n pieces of the recombined carrier images respectively; for example, adopt a polynomial-based secret sharing method. Ditto for other pixels r 2 , r 3 , . . . , r r*r-1 , r r*r .

在一些实施例中,在所述步骤S2中,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像,具体包括:对所述影子图像中的每个像素进行邻域扩展,以扩展出周围的8个邻域像素;利用所述原始载体图像经3*3分割后得到的r*r个所述图像块,将所述图像块的中间像素的8个邻域像素填充至所述扩展影子图像中与所述中间像素对应的像素扩展出的8个邻域像素;所述扩展影子图像的大小为3r*3r。In some embodiments, in the step S2, neighborhood expansion is performed on each pixel of the shadow image, and the expanded neighborhood is filled with the original carrier image, so as to obtain the same size as the original carrier image. The same extended shadow image specifically includes: performing neighborhood expansion on each pixel in the shadow image to expand the surrounding 8 neighborhood pixels; using the r obtained by dividing the original carrier image by 3*3 *r of the image blocks, filling the 8 neighboring pixels of the intermediate pixel of the image block to the 8 neighboring pixels extended from the pixels corresponding to the intermediate pixels in the extended shadow image; the extended shadow image The size of the shadow image is 3r*3r.

具体地(如图2所示),在生成能够对抗均值滤波的可理解影子图像的过程中,首先对插值载体图像进行邻域扩展,每一个像素都进行8邻域扩展,扩展出的像素位以原始载体图像的8邻域来对应填充。Specifically (as shown in Figure 2), in the process of generating an intelligible shadow image that can resist mean filtering, the interpolated carrier image is first subjected to neighborhood expansion, and each pixel is subjected to 8 neighborhood expansion, and the expanded pixel bits Fill it with the 8-neighborhood of the original carrier image.

在步骤S3,计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素。In step S3, calculate the mean value of the neighborhood pixels of each non-expanded pixel in the expanded shadow image, and adjust each neighborhood of the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel pixel.

具体地(如图2所示),计算每一个像素值(插值载体图像中的每一个像素,也即所述扩展载体图像中对应的像素)在所述扩展载体图像中对应的邻域像素的均值,进一步计算均值与8邻域像素包围的中间像素之间的差值。Specifically (as shown in FIG. 2 ), calculate each pixel value (each pixel in the interpolated carrier image, that is, the corresponding pixel in the extended carrier image) in the corresponding neighborhood pixel of the extended carrier image. Mean, which further computes the difference between the mean and the middle pixel surrounded by 8 neighbor pixels.

在一些实施例中,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:In some embodiments, in the step S3, adjusting each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为正数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素分别减去所述差值的整数部分,并且减去所述差值的整数部分后的所述各个邻域像素的像素值的范围为[0,255],若减去所述差值的整数部分后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is a positive number, each neighboring pixel of each non-extended pixel in the extended shadow image subtracts the integer part of the difference value respectively, and subtracts the integer part of the difference value. The range of the pixel value of each neighborhood pixel is [0, 255], if the range of the pixel value of each neighborhood pixel after subtracting the integer part of the difference value is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels;

在所述非扩展像素的各个邻域像素分别减去所述差值的整数部分后,确定所述差值的小数部分乘以8后的数值m1,从减去所述差值的整数部分后的所述非扩展像素的各个邻域像素中任意选取m1个邻域像素,所述m1个邻域像素中的每个邻域像素的像素值都减1,使得减1后的m1个邻域像素的像素值的范围为[0,255],若所述减1后的m1个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m1为正整数。After the integer part of the difference value is respectively subtracted from each neighboring pixel of the non-extended pixel, a numerical value m 1 obtained by multiplying the decimal part of the difference value by 8 is determined, and the integer part of the difference value is subtracted from M 1 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the subsequent non-extended pixel, and the pixel value of each neighborhood pixel in the m 1 neighborhood pixels is reduced by 1, so that the m after the reduction of 1 is reduced by 1. The range of the pixel value of 1 neighborhood pixel is [0, 255], if the range of the pixel value of the m 1 neighborhood pixel after subtracting 1 is not within [0, 255], then assign the pixel value of the non-extended pixel to Given its neighborhood pixels, m 1 is a positive integer.

具体地(如图2所示),当差值differ>0时,确定邻域像素减去差值的整数部分int(differ)后,其像素值落在[0,255]的邻域点的个数,若为8,则执行邻域像素减去差值的整数部分int(differ),否则,将被所述8个邻域像素包围的中间像素的像素值赋给所述8个邻域像素。随后,判断邻域像素进一步减去8个(倍)的差值的小数部分differ-int(differ)*8后,其像素值是否仍然落在[0,255],若是,则执行减法运算(注意,可以对任意多个(1-8个)邻域像素点执行减法,只要减去的总和为differ-int(differ)*8,且满足上述范围条件即可,但更优的方案是,确定小数部分*8后的值,该值为整数值,例如m1,并将其平均地分配到m1个邻域像素中去进行调整,这样的调整方式是平滑且均匀的,能够更好的保护图像信息),若否,则将被所述8个邻域像素包围的中间像素的像素值赋给所述8个邻域像素。注意,上述条件判断过程旨在于确保调整后的各个像素值仍然落在[0,255]范围内,上述调整方案旨在于使得中间像素与邻域像素均值之间的差值为零,而调整的方法/条件判断的方式不限制于以上一种。例如,图2中还给出了一种方式,即判断邻域像素中是否有多于differ-int(differ)*8个像素点的像素值大于等于1,若是,则对随机选择的differ-int(differ)*8个领域像素点执行减法操作,减去的值为differ-int(differ)。Specifically (as shown in Figure 2), when the difference value is greater than 0, it is determined that after subtracting the integer part int(differ) of the difference value from the neighbor pixels, the number of neighbor points whose pixel value falls within [0,255] , if it is 8, subtract the integer part int(differ) of the difference from the neighbor pixels, otherwise, assign the pixel value of the middle pixel surrounded by the 8 neighbor pixels to the 8 neighbor pixels. Then, it is determined whether the pixel value of the neighbor pixel is still in [0, 255] after further subtracting the fractional part of the difference of 8 (times) difference-int(differ)*8, and if so, perform the subtraction operation (note that, Subtraction can be performed on any number of (1-8) neighborhood pixels, as long as the sum of the subtraction is differ-int(differ)*8, and the above range conditions are met, but a better solution is to determine the decimal Part of the value after *8, this value is an integer value, such as m 1 , and it is evenly distributed to m 1 neighborhood pixels for adjustment. This adjustment method is smooth and uniform, and can better protect image information), if not, assign the pixel value of the middle pixel surrounded by the 8 neighboring pixels to the 8 neighboring pixels. Note that the above conditional judgment process aims to ensure that the adjusted pixel values still fall within the range of [0, 255]. The above adjustment scheme aims to make the difference between the average value of the intermediate pixel and the neighboring pixel zero, and the adjustment method / The method of conditional judgment is not limited to the above one. For example, Figure 2 also provides a way to judge whether there are more than differ-int(differ)*8 pixels in the neighborhood pixels whose pixel value is greater than or equal to 1, if so, for the randomly selected differ- int(differ)*8 domain pixels perform a subtraction operation, and the subtracted value is differ-int(differ).

在一些实施例中,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:In some embodiments, in the step S3, adjusting each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel specifically includes:

对于所述差值为负数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素中分别加上所述差值的整数部分的绝对值,并且加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围为[0,255],若加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is negative, add the absolute value of the integer part of the difference value to each neighboring pixel of each non-extended pixel in the extended shadow image, and add the integer value of the difference value The range of the pixel value of each neighborhood pixel after the absolute value of the part is [0, 255], if the range of the pixel value of each neighborhood pixel after adding the absolute value of the integer part of the difference value is not in [ 0,255], then assign the pixel value of the non-expanded pixel to its neighborhood pixel;

在所述非扩展像素的各个邻域像素分别加上所述差值的整数部分的绝对值后,确定所述差值的小数部分乘以8后的数值m2,从加上所述差值的整数部分的绝对值后的所述非扩展像素的各个邻域像素中任意选取m2个邻域像素,所述m2个邻域像素中的每个邻域像素的像素值都加1,使得加1后的m2个邻域像素的像素值的范围为[0,255],若所述加1后的m2个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m2为正整数。After the absolute value of the integer part of the difference value is added to each neighboring pixel of the non-extended pixel, the numerical value m 2 obtained by multiplying the decimal part of the difference value by 8 is determined, and the difference value is added from the M 2 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the non - extended pixel after the absolute value of the integer part of The range of the pixel values of the m 2 neighborhood pixels after adding 1 is [0, 255], if the range of the pixel values of the m 2 neighborhood pixels after adding 1 is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels, and m 2 is a positive integer.

具体地(如图2所示),当差值differ<0时,确定邻域像素加上差值的整数部分的绝对值int(abs(differ))后,其像素值落在[0,255]的邻域点的个数,若为8,则执行邻域像素加上差值的整数部分的绝对值int(abs(differ)),否则,将被所述8个邻域像素包围的中间像素的像素值赋给所述8个邻域像素。随后,判断邻域像素进一步加上8个(倍)的差值的小数部分的绝对值[abs(differ)-int(abs(differ))]*8后,其像素值是否仍然落在[0,255],若是,则执行加法运算(注意,可以对任意多个(1-8个)邻域像素点执行加法,只要加上的总和为[abs(differ)-int(abs(differ))]*8,且满足上述范围条件即可,但更优的方案是,确定小数部分*8后的值,该值为整数值,例如m2,并将其平均地分配到m2个邻域像素中去进行调整,这样的调整方式是平滑且均匀的,能够更好的保护图像信息),若否,则将被所述8个邻域像素包围的中间像素的像素值赋给所述8个邻域像素。注意,上述条件判断过程旨在于确保调整后的各个像素值仍然落在[0,255]范围内,上述调整方案旨在于使得中间像素与邻域像素均值之间的差值为零,而调整的方法/条件判断的方式不限制于以上一种。例如,图2中还给出了一种方式,即判断邻域像素中是否有多于[abs(differ)-int(abs(differ))]*8个像素点的像素值小于等于255,若是,则对随机选择的[abs(differ)-int(abs(differ))]*8个领域像素点执行加法操作,加上的值为abs(differ)-int(abs(differ))。Specifically (as shown in Figure 2), when the difference value is less than 0, after determining the absolute value int(abs(differ)) of the integer part of the difference value added to the adjacent pixels, its pixel value falls within the range of [0,255] The number of neighborhood points, if it is 8, execute the neighborhood pixel plus the absolute value of the integer part of the difference int(abs(differ)), otherwise, will be surrounded by the 8 neighborhood pixels. Pixel values are assigned to the 8 neighbor pixels. Then, judge whether the pixel value of the neighbor pixel is still in [0,255 after adding the absolute value of the fractional part of the difference of 8 (times) [abs(differ)-int(abs(differ))]*8. ], if so, perform the addition operation (note that the addition can be performed on any number of (1-8) neighborhood pixels, as long as the sum of the additions is [abs(differ)-int(abs(differ))]* 8, and the above range conditions are satisfied, but a better solution is to determine the value after the fractional part * 8, which is an integer value, such as m 2 , and distribute it evenly to m 2 neighborhood pixels The adjustment method is smooth and uniform, which can better protect the image information), if not, assign the pixel value of the middle pixel surrounded by the 8 neighbor pixels to the 8 neighbor pixels. domain pixels. Note that the above conditional judgment process aims to ensure that the adjusted pixel values still fall within the range of [0, 255]. The above adjustment scheme aims to make the difference between the average value of the intermediate pixel and the neighboring pixel zero, and the adjustment method / The method of conditional judgment is not limited to the above one. For example, Figure 2 also provides a way to determine whether there are more than [abs(differ)-int(abs(differ))]*8 pixels in the neighborhood pixels whose pixel value is less than or equal to 255, if , then perform the addition operation on the randomly selected [abs(differ)-int(abs(differ))]*8 domain pixels, and the added value is abs(differ)-int(abs(differ)).

在步骤S4,将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。In step S4, the n extended shadow images whose neighborhood pixels have been adjusted are sent from the sender to the receiver, and the receiver recovers the secret based on the received n extended shadow images whose neighborhood pixels have been adjusted. image.

具体地(如图2所示),所述接收方基于所述n个影子图像恢复出所述秘密图像,即对影子图像执行后续的均值滤波、图像提取等操作以恢复秘密图像。Specifically (as shown in FIG. 2 ), the receiver restores the secret image based on the n shadow images, that is, performs subsequent mean filtering, image extraction, and other operations on the shadow image to restore the secret image.

在一些实施例中,所述接收方对接收到的所述完成邻域像素调整的n个扩展影子图像进行均值滤波,得到的结果图像中各个像素的像素值与所述影子图像的各个像素的像素值一致,从而实现能够对抗均值滤波的所述秘密图像的分享。In some embodiments, the receiver performs mean filtering on the received n extended shadow images that have completed neighborhood pixel adjustment, and obtains the pixel value of each pixel in the resulting image and the pixel value of each pixel in the shadow image. The pixel values are consistent, thereby realizing the sharing of the secret image that can resist mean filtering.

在另一实施例中,可以通过以下算法流程来实现上述方法:In another embodiment, the above method can be implemented through the following algorithm flow:

算法:基于(k,n)门限多项式的影子图像可理解的对抗均值滤波的鲁棒秘密图像分享方案。输入:门限k;影子的数量n;ID序列号列表id;一个大小为r*r的灰度秘密图像;n个大小为3r×3r的原始灰度载体图像cover1,cover2,…,covern。输出:n个可以抗均值滤波的灰度影子图像SC'1,SC'2,…,SC'nAlgorithm: A robust secret image sharing scheme against mean filtering based on shadow image comprehensibility of (k, n) threshold polynomials. Inputs: threshold k; number of shadows n; ID serial number list id; a grayscale secret image of size r*r; n original grayscale carrier images of size 3r×3r cover 1 ,cover 2 ,…,cover n . Output: n grayscale shadow images SC' 1 , SC' 2 , ..., SC' n that can be anti-average filtered.

(1)对于每一个原始载体图像,分成3*3的块。抽取每个块的中间元素并重组为大小为r×r的图像cover'i(1) For each original carrier image, it is divided into 3*3 blocks. The intermediate elements of each block are extracted and reassembled into an image cover' i of size r×r.

(2)将灰度秘密图像S和cover'i输入到影子图像可理解的基于多项式的秘密分享算法中,输出结果SC1,SC2,…,SCn(2) Input the grayscale secret image S and cover' i into a polynomial-based secret sharing algorithm that can be understood by the shadow image, and output the results SC 1 , SC 2 ,...,SC n .

(3)对于SCi的每一个像素,拓展出8邻域的像素。最终图像矩阵表示为m。将m分割成r个3×3的块,每一块表示为square[p][q],其中p=0,2,…,r-1,q=0,2,…,r-1。(3) For each pixel of SC i , extend the pixels of 8 neighborhoods. The final image matrix is denoted as m. Divide m into r 3x3 blocks, each represented as square[p][q], where p=0,2,...,r-1,q=0,2,...,r-1.

(4)对于每一块square[p][q],用原始载体图像相对应的中心像素填充拓展处的8邻域。(4) For each square[p][q], fill the 8-neighborhood of the extension with the center pixel corresponding to the original carrier image.

(5)对于每一块square[p][q],计算8邻域的均值。计算均值与SCi[p][q]的差differ。若differ>0,跳转到步骤6,否则跳到步骤7。(5) For each block square[p][q], calculate the mean of 8 neighborhoods. Calculate the difference between the mean and SC i [p][q]. If difference>0, go to step 6, otherwise go to step 7.

(6)对于当前块的8邻域,计算每一个像素减去差的整数部分。计算该值落在0到255之间的数目,如果为8,则对8邻域的每一个像素减int(differ),否则跳到步骤8。判断在8邻域像素里是否有大于等于(differ-int(differ))×8个像素的值大于等于1。如果是,随机选择(differ-int(differ))×8个大于等于1的像素减1。否则跳到步骤8。(6) For the 8-neighborhood of the current block, calculate each pixel minus the integer part of the difference. Calculate the number of the value falling between 0 and 255. If it is 8, subtract int(different) for each pixel in the neighborhood of 8, otherwise skip to step 8. It is judged whether there is a value greater than or equal to (differ-int(differ))×8 pixels in the 8-neighborhood pixels greater than or equal to 1. If so, randomly select (differ-int(differ))×8 pixels greater than or equal to 1 minus 1. Otherwise skip to step 8.

(7)若differ=0,跳到步骤8。对于当前块的8邻域,计算每一个像素加上差的绝对值的整数部分。计算该值落在0到255之间的数目,如果为8,则对8邻域的每一个像素加int(abs(differ)),否则跳到步骤8。判断在8邻域像素里是否有大于等于(abs(differ)-int(differ))×8个像素的值小于等于254。如果是,随机选择(differ-int(differ))×8个小于等于245的像素加1。否则跳到步骤8。(7) If differ=0, go to step 8. For the 8-neighborhood of the current block, compute each pixel plus the integer part of the absolute value of the difference. Calculate the number of the value falling between 0 and 255. If it is 8, add int(abs(differ)) to each pixel in the neighborhood of 8, otherwise skip to step 8. Determine whether there are values greater than or equal to (abs(differ)-int(differ))×8 pixels in the 8-neighborhood pixels and less than or equal to 254. If so, randomly select (differ-int(differ))×8 pixels less than or equal to 245 plus 1. Otherwise skip to step 8.

(8)设置square[p][q][s][t]=SCi[p][q],其中p=0,2,…,r-1,q=0,2,…,r-1,s=0,1,2,t=0,1,2。(8) Set square[p][q][s][t]=SC i [p][q], where p=0,2,...,r-1, q=0,2,...,r- 1, s=0,1,2, t=0,1,2.

(9)输出n个抗均值滤波的影子图像SC'1,SC'2,…,SC'n(9) Output n anti-average filtered shadow images SC' 1 , SC' 2 , . . . , SC' n .

在又一实施例中,对抗均值滤波的秘密图像分享方法可以分为两个阶段:抗均值滤波的可理解影子图像生成阶段和秘密图像恢复阶段。In yet another embodiment, the mean-resistant secret image sharing method can be divided into two stages: a mean-resistant intelligible shadow image generation stage and a secret image restoration stage.

在抗典型图像处理的可理解的影子图像生成阶段,首先将原始载体图像的大小调整为与秘密图像一致。一般来说会把每一个原始载体图像分割成等大的块(这里分割成3×3的块),并抽取特定位置上像素(这里是抽取中心像素)重组为新的载体图像cover'i。调整的原则是保证调整后的图像看起来与原图相似并保留完整的图像意义,只是改变原始载体图像的大小。值得注意的是原始载体图像的大小取决于图像处理的类型和秘密图像。例如,如果对抗均值滤波,那么原始载体图像的大小应该为秘密图像大小的9倍。提出的方案中的二值载体图像看作为灰度载体图像的最高位来处理。In the understandable shadow image generation stage of anti-canonical image processing, the original carrier image is first resized to be consistent with the secret image. Generally speaking, each original carrier image will be divided into blocks of equal size (here, divided into 3×3 blocks), and the pixels at specific positions (here, the central pixels are extracted) are extracted and recombined into a new carrier image cover' i . The principle of adjustment is to ensure that the adjusted image looks similar to the original image and retains the full image meaning, but only changes the size of the original carrier image. It is worth noting that the size of the original carrier image depends on the type of image processing and the secret image. For example, if filtering against the mean, then the size of the original carrier image should be 9 times the size of the secret image. The binary carrier image in the proposed scheme is treated as the highest bit of the gray-scale carrier image.

具体算法如下:The specific algorithm is as follows:

算法2:基于多项式的影子图像可理解的(k,n)门限秘密图像分享方案。输入:门限k;影子的数量n;ID列表id;一个灰度秘密图像S;n个二值载体图像C1,C2,…,Cn。输出:n个灰度影子图像SC1,SC2,…,SCnAlgorithm 2: A (k, n) threshold secret image sharing scheme based on polynomial shadow image comprehension. Inputs: threshold k; number n of shadows; ID list id; a grayscale secret image S; n binary carrier images C 1 , C 2 ,...,C n . Output: n grayscale shadow images SC 1 , SC 2 , . . . , SC n .

Figure BDA0003496553850000191
Figure BDA0003496553850000191

以125为门限将灰度值序列[SC1(i,j),…,SCn(i,j)]转换为二值序列[BSC1,…,BSCn]Convert the gray value sequence [SC 1 (i,j),…,SC n (i,j)] into a binary sequence [BSC 1 ,…,BSC n ] with a threshold of 125

Figure BDA0003496553850000192
Figure BDA0003496553850000192

为了保证无损恢复,设置p=257。将cover'i和S秘密图像输入到基于多项式的影子图像可理解的秘密图像分享方案里,最终得到SCi。对SCi的每一个像素进行拓展(这里对每一个像素拓展出8-邻域)。用原始载体图像相对应位置上的像素给拓展后的影子图像相对应位置上的像素赋值。对于每一个块里的每一个像素轻微地调整其值,使微调后的图像在被图像处理和进一步的图像抽取后与原始影子图像完全一致。保证最终可以成功的恢复秘密图像。To ensure lossless recovery, set p=257. The cover' i and S secret images are input into the secret image sharing scheme comprehensible based on polynomial shadow images, and finally SC i is obtained. Expand each pixel of SC i (here, 8-neighborhood is expanded for each pixel). Use the pixels at the corresponding positions of the original carrier image to assign values to the pixels at the corresponding positions of the expanded shadow image. For each pixel in each block, its value is slightly adjusted so that the fine-tuned image is exactly the same as the original shadow image after image processing and further image decimation. It is guaranteed that the secret image can be successfully recovered in the end.

在恢复阶段,包括两个步骤:图像提取和拉格朗日插值。与传统基于多项式的SIS不同,这里首先需要图像抽取,根据上面设计的具体对抗图像处理的策略,在重要位置上像素会被抽取并重组为SCi″。In the recovery stage, two steps are included: image extraction and Lagrangian interpolation. Different from the traditional polynomial-based SIS, image extraction is first required here. According to the specific strategy against image processing designed above, pixels at important positions will be extracted and reorganized into SC i ".

可选地及附加地,图3(组图)展示了(k,n)门限影子图像可理解的鲁棒SIS的对抗均值滤波的影子图像生成阶段的实验结果,其中k=3,n=4,p=257。图3(a)展示输入的灰度秘密图像,大小为128×128。图3(b)-(e)为输入的大小为的原始的可理解的灰度载体图像cover1,cover2,cover3,cover4。大小调整后的载体图像cover1',cover2',cover3',cover4在图3(f)-(i)展示,其大小与秘密图像S的大小相等。图3(g)-(m)展示的是将大小调整后的影子图像和秘密图像输入到基于多项式的SIS算法而得到的可理解的影子图像SC1,SC2,SC3和SC4。这里在基于多项式的SIS算法里保证大小调整过的载体图像的每一个像素的前两位等于相对应的影子图像的每一个像素的前两位。最终经过像素扩张,像素赋值,像素微调三个步骤之后生成可以抗这三种图像处理的影子图像SC'1,SC'2,SC'3,SC'4,在图3(n)-(q)中展示。Optionally and additionally, Fig. 3 (panel) shows the experimental results of the shadow image generation phase of the robust SIS against mean filtering with (k, n) threshold shadow image comprehensibility, where k = 3, n = 4 , p=257. Figure 3(a) shows the input grayscale secret image with size 128×128. Figures 3(b)-(e) are the original understandable grayscale carrier images of the input size cover 1 , cover 2 , cover 3 , cover 4 . The resized carrier images cover 1 ', cover 2 ', cover 3 ', cover 4 are shown in Fig. 3(f)-(i), whose size is equal to that of the secret image S. Figure 3 (g)-(m) show the intelligible shadow images SC1, SC2 , SC3 and SC4 obtained by inputting the resized shadow image and secret image to the polynomial - based SIS algorithm. Here, the polynomial-based SIS algorithm ensures that the first two bits of each pixel of the resized carrier image are equal to the first two bits of each pixel of the corresponding shadow image. Finally, after three steps of pixel expansion, pixel assignment, and pixel fine-tuning, a shadow image SC' 1 , SC' 2 , SC' 3 , SC' 4 that can resist these three image processing is generated. In Figure 3(n)-(q ) are displayed.

图4展示了(k,n)门限影子图像可理解的鲁棒SIS的对抗均值滤波的影子图像恢复阶段的实验结果,其中k=3,n=4,p=257。图4(a)-(d)SC”1,SC”2,SC”3,SC”4表示为SC'1,SC'2,SC'3,SC'4经过核为3×3的均值滤波器平滑的结果。图4(e)-(h)

Figure BDA0003496553850000211
是将SC”1,SC”2,SC”3,SC”4分成3×3的块并抽取每一块的中心像素重新组成的新图像。图4(i)展示了通过拉格朗日插值从
Figure BDA0003496553850000212
两个个恢复的秘密图像。图4(j)展示了通过拉格朗日插值从
Figure BDA0003496553850000213
中三个或四个恢复的秘密图像。Figure 4 shows the experimental results of the shadow image restoration stage against mean filtering for a robust SIS understandable by (k,n) thresholded shadow images, where k=3, n=4, p=257. Figure 4(a)-(d) SC" 1 , SC" 2 , SC" 3 , SC" 4 are represented as SC' 1 , SC' 2 , SC' 3 , SC' 4 through mean filtering with a kernel of 3×3 smoother results. Figure 4(e)-(h)
Figure BDA0003496553850000211
It is a new image formed by dividing SC" 1 , SC" 2 , SC" 3 , SC" 4 into 3×3 blocks and extracting the center pixel of each block. Figure 4(i) shows that by Lagrangian interpolation from
Figure BDA0003496553850000212
Two recovered secret images. Figure 4(j) shows that by Lagrangian interpolation from
Figure BDA0003496553850000213
Three or four recovered secret images.

本发明第二方面公开了一种用于对抗均值滤波的秘密图像分享系统。图5为根据本发明实施例一种用于对抗均值滤波的秘密图像分享系统的结构图;如图5所示,所述系统500包括:A second aspect of the present invention discloses a secret image sharing system for anti-average filtering. FIG. 5 is a structural diagram of a secret image sharing system for anti-average filtering according to an embodiment of the present invention; as shown in FIG. 5 , the system 500 includes:

第一处理单元501,被配置为,获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;The first processing unit 501 is configured to acquire a secret image and n original carrier images serving as carriers for sharing image information of the secret image, the secret images are grayscale images, and the original carrier images are obtained after adjustment. The reconstructed carrier image with the same size as the secret image, and n is a positive integer;

第二处理单元502,被配置为,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;The second processing unit 502 is configured to fuse the image information of the secret image into the n reconstituted carrier images respectively to obtain n shadow images, perform neighborhood expansion on each pixel of the shadow images, and use the original carrier image to fill the expanded neighborhood to obtain an extended shadow image of the same size as the original carrier image;

第三处理单元503,被配置为,计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;The third processing unit 503 is configured to calculate the average value of the neighborhood pixels of each non-extended pixel in the extended shadow image, and adjust the non-extended pixel based on the difference between the average value and the corresponding non-extended pixel Expand each neighborhood pixel of the pixel;

第四处理单元504,被配置为,将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。The fourth processing unit 504 is configured to send the n extended shadow images that have completed neighborhood pixel adjustment from the sender to the receiver, where the receiver is based on the received n extended shadow images that have completed neighborhood pixel adjustment. The image recovers the secret image.

根据本发明第二方面的系统,所述秘密图像的大小为r*r,所述n个原始载体图像的大小为3r*3r,r≥2且为正整数;所述第一处理单元501具体被配置为,对所述原始载体图像进行调整以得到与所述秘密图像大小相同的所述重组载体图像,具体包括:将所述原始载体图像分割成3*3的图像块,共有r*r个所述图像块,抽取每个所述图像块的中间像素,利用各个所述中间像素构成大小为r*r的所述重组载体图像。According to the system of the second aspect of the present invention, the size of the secret image is r*r, the size of the n original carrier images is 3r*3r, r≥2 and is a positive integer; the first processing unit 501 specifically is configured to adjust the original carrier image to obtain the reconstituted carrier image with the same size as the secret image, specifically including: dividing the original carrier image into 3*3 image blocks, with a total of r*r Each of the image blocks is extracted, and the intermediate pixels of each of the image blocks are extracted, and each of the intermediate pixels is used to form the reconstructed carrier image with a size of r*r.

根据本发明第二方面的系统,所述第二处理单元502具体被配置为,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取所述n个影子图像具体包括:对于所述秘密图像中的第i个像素,1≤i≤r*r,获取所述第i个像素在n个所述重组载体图像中对应的像素位置上的像素{i1,i2,...,in},通过将所述第i个像素与像素集合{i1,i2,...,in}进行融合得到{i1’,i2’,...,in’},作为所述n个影子图像在所述对应的像素位置上的像素,所述n个影子图像的大小为r*r。According to the system of the second aspect of the present invention, the second processing unit 502 is specifically configured to fuse the image information of the secret image into the n reconstituted carrier images respectively to obtain the n shadow images, which specifically includes: For the ith pixel in the secret image, 1≤i≤r*r, obtain the pixel {i 1 , i 2 , the pixel position {i 1 , i 2 , of the ith pixel at the corresponding pixel position in the n reconstituted carrier images, ..., i n }, by fusing the i-th pixel with the pixel set {i 1 , i 2 , ..., i n } to obtain {i 1' , i 2' , ..., i n' }, as the pixels of the n shadow images at the corresponding pixel positions, the size of the n shadow images is r*r.

根据本发明第二方面的系统,所述第二处理单元502具体被配置为,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像,具体包括:对所述影子图像中的每个像素进行邻域扩展,以扩展出周围的8个邻域像素;利用所述原始载体图像经3*3分割后得到的r*r个所述图像块,将所述图像块的中间像素的8个邻域像素填充至所述扩展影子图像中与所述中间像素对应的像素扩展出的8个邻域像素;所述扩展影子图像的大小为3r*3r。According to the system of the second aspect of the present invention, the second processing unit 502 is specifically configured to perform neighborhood expansion on each pixel of the shadow image, and use the original carrier image to fill the expanded neighborhood to Obtaining an expanded shadow image with the same size as the original carrier image, specifically comprising: performing neighborhood expansion on each pixel in the shadow image to expand 8 surrounding pixels; The r*r image blocks obtained after 3*3 division are filled with 8 neighboring pixels of the middle pixel of the image block to the 8 pixels extended from the pixels corresponding to the middle pixel in the extended shadow image. neighborhood pixels; the size of the extended shadow image is 3r*3r.

根据本发明第二方面的系统,所述第三处理单元503具体被配置为,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the system of the second aspect of the present invention, the third processing unit 503 is specifically configured to adjust each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel, specifically including: :

对于所述差值为正数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素分别减去所述差值的整数部分,并且减去所述差值的整数部分后的所述各个邻域像素的像素值的范围为[0,255],若减去所述差值的整数部分后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is a positive number, each neighboring pixel of each non-extended pixel in the extended shadow image subtracts the integer part of the difference value respectively, and subtracts the integer part of the difference value. The range of the pixel value of each neighborhood pixel is [0, 255], if the range of the pixel value of each neighborhood pixel after subtracting the integer part of the difference value is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels;

在所述非扩展像素的各个邻域像素分别减去所述差值的整数部分后,确定所述差值的小数部分乘以8后的数值m1,从减去所述差值的整数部分后的所述非扩展像素的各个邻域像素中任意选取m1个邻域像素,所述m1个邻域像素中的每个邻域像素的像素值都减1,使得减1后的m1个邻域像素的像素值的范围为[0,255],若所述减1后的m1个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m1为正整数。After the integer part of the difference value is respectively subtracted from each neighboring pixel of the non-extended pixel, a numerical value m 1 obtained by multiplying the decimal part of the difference value by 8 is determined, and the integer part of the difference value is subtracted from M 1 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the subsequent non-extended pixel, and the pixel value of each neighborhood pixel in the m 1 neighborhood pixels is reduced by 1, so that the m after the reduction of 1 is reduced by 1. The range of the pixel value of 1 neighborhood pixel is [0, 255], if the range of the pixel value of the m 1 neighborhood pixel after subtracting 1 is not within [0, 255], then assign the pixel value of the non-extended pixel to Given its neighborhood pixels, m 1 is a positive integer.

根据本发明第二方面的系统,所述第三处理单元503具体被配置为,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:According to the system of the second aspect of the present invention, the third processing unit 503 is specifically configured to adjust each neighborhood pixel of the non-extended pixel based on the difference between the mean value and the corresponding non-extended pixel, specifically including: :

对于所述差值为负数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素中分别加上所述差值的整数部分的绝对值,并且加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围为[0,255],若加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is negative, add the absolute value of the integer part of the difference value to each neighboring pixel of each non-extended pixel in the extended shadow image, and add the integer value of the difference value The range of the pixel value of each neighborhood pixel after the absolute value of the part is [0, 255], if the range of the pixel value of each neighborhood pixel after adding the absolute value of the integer part of the difference value is not in [ 0,255], then assign the pixel value of the non-expanded pixel to its neighborhood pixel;

在所述非扩展像素的各个邻域像素分别加上所述差值的整数部分的绝对值后,确定所述差值的小数部分乘以8后的数值m2,从加上所述差值的整数部分的绝对值后的所述非扩展像素的各个邻域像素中任意选取m2个邻域像素,所述m2个邻域像素中的每个邻域像素的像素值都加1,使得加1后的m2个邻域像素的像素值的范围为[0,255],若所述加1后的m2个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m2为正整数。After the absolute value of the integer part of the difference value is added to each neighboring pixel of the non-extended pixel, the numerical value m 2 obtained by multiplying the decimal part of the difference value by 8 is determined, and the difference value is added from the M 2 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the non - extended pixel after the absolute value of the integer part of The range of the pixel values of the m 2 neighborhood pixels after adding 1 is [0, 255], if the range of the pixel values of the m 2 neighborhood pixels after adding 1 is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels, and m 2 is a positive integer.

根据本发明第二方面的系统,所述接收方对接收到的所述完成邻域像素调整的n个扩展影子图像进行均值滤波,得到的结果图像中各个像素的像素值与所述影子图像的各个像素的像素值一致,从而实现能够对抗均值滤波的所述秘密图像的分享。According to the system according to the second aspect of the present invention, the receiver performs mean filtering on the received n extended shadow images that have completed neighborhood pixel adjustment, and the pixel value of each pixel in the obtained result image is the same as that of the shadow image. The pixel values of each pixel are consistent, thereby realizing the sharing of the secret image that can resist mean filtering.

本发明第三方面公开了一种电子设备。所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时,实现本公开第一方面中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。A third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method for anti-mean filtering described in any one of the first aspects of the present disclosure is implemented. Steps in the Secret Image Sharing Method.

图6为根据本发明实施例的一种电子设备的结构图,如图6所示,电子设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、近场通信(NFC)或其他技术实现。该电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。FIG. 6 is a structural diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 6 , the electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, near field communication (NFC) or other technologies. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the electronic device , or an external keyboard, trackpad, or mouse.

本领域技术人员可以理解,图6中示出的结构,仅仅是与本公开的技术方案相关的部分的结构图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a structural diagram of a part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic equipment to which the solution of the present application is applied. A device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

本发明第四方面公开了一种计算机可读存储介质。所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现本公开第一方面中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。A fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, implements the method for sharing a secret image for anti-mean filtering according to any one of the first aspects of the present disclosure. step.

本发明提供的技术方案在给定一个被隐藏的秘密图像S和n个原始载体图像coveri的情况下,生成n个影子图像SC'i,使得k个或更多SC'i在被均值滤波处理以后依然会被恢复。该方案旨在于在均值滤波和进一步抽取后生成的影子图像SC'i恰好等于直接输入载体图像cover'i和S到秘密分享方案后得到的结果。该方案实现了良好的秘密分享方案特性,如无损恢复、影子图像可理解、(k,n)门限,可以应用于隐写分析和面向社交网络的隐蔽通信领域中。The technical solution provided by the present invention generates n shadow images SC' i given a hidden secret image S and n original carrier images cover i , so that k or more SC' i are filtered by the mean value It will still be restored after processing. The scheme aims to generate shadow images SC' i after mean filtering and further decimation exactly equal to the results obtained after directly inputting the carrier images cover' i and S to the secret sharing scheme. The scheme achieves good secret sharing scheme characteristics, such as lossless recovery, shadow image comprehension, (k,n) threshold, and can be applied in the fields of steganalysis and covert communication for social networks.

请注意,以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features , should be considered to be within the scope of this specification. The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

1.一种用于对抗均值滤波的秘密图像分享方法,其特征在于,所述方法包括:1. A secret image sharing method for antagonizing mean filtering, wherein the method comprises: 步骤S1、获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;Step S1, obtaining a secret image and n original carrier images as carriers for sharing the image information of the secret image, the secret image is a grayscale image, and the original carrier image is adjusted to obtain the same size as the secret image. , where n is a positive integer; 步骤S2、将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;Step S2, fuse the image information of the secret image into n of the reorganized carrier images respectively to obtain n shadow images, carry out neighborhood expansion to each pixel of the shadow images, and use the original carrier image to fill an expanded neighborhood to obtain an expanded shadow image of the same size as the original carrier image; 步骤S3、计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;Step S3, calculate the mean value of the neighborhood pixels of each non-expanded pixel in the expanded shadow image, and adjust each neighborhood pixel of the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel ; 步骤S4、将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。Step S4, sending the n extended shadow images that have completed neighborhood pixel adjustment from the sender to the receiver, and the receiver recovers the secret image based on the received n extended shadow images that have completed neighborhood pixel adjustment. . 2.根据权利要求1所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,其中:2. A kind of secret image sharing method for anti-mean filtering according to claim 1, is characterized in that, wherein: 所述秘密图像的大小为r*r,所述n个原始载体图像的大小为3r*3r,r≥2且为正整数;The size of the secret image is r*r, the size of the n original carrier images is 3r*3r, r≥2 and a positive integer; 在所述步骤S1中,对所述原始载体图像进行调整以得到与所述秘密图像大小相同的所述重组载体图像,具体包括:将所述原始载体图像分割成3*3的图像块,共有r*r个所述图像块,抽取每个所述图像块的中间像素,利用各个所述中间像素构成大小为r*r的所述重组载体图像。In the step S1, the original carrier image is adjusted to obtain the reconstructed carrier image with the same size as the secret image, which specifically includes: dividing the original carrier image into 3*3 image blocks, with a total of The r*r image blocks are extracted, and the intermediate pixels of each of the image blocks are extracted, and each of the intermediate pixels is used to form the reconstructed carrier image with a size of r*r. 3.根据权利要求2所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,在所述步骤S2中,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取所述n个影子图像具体包括:对于所述秘密图像中的第i个像素,1≤i≤r*r,获取所述第i个像素在n个所述重组载体图像中对应的像素位置上的像素{i1,i2,...,in},通过将所述第i个像素与像素集合{i1,i2,...,in}进行融合得到{i1’,i2’,...,in’},作为所述n个影子图像在所述对应的像素位置上的像素,所述n个影子图像的大小为r*r。3. A secret image sharing method for anti-average filtering according to claim 2, characterized in that, in the step S2, the image information of the secret image is fused into n of the recombination carriers respectively The image to obtain the n shadow images specifically includes: for the ith pixel in the secret image, 1≤i≤r*r, obtaining the corresponding pixel of the ith pixel in the n recombined carrier images. Pixels { i 1 , i 2 , . 1' , i 2' ,...,in ' }, as the pixels of the n shadow images at the corresponding pixel positions, the size of the n shadow images is r*r. 4.根据权利要求3所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,在所述步骤S2中,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像,具体包括:对所述影子图像中的每个像素进行邻域扩展,以扩展出周围的8个邻域像素;利用所述原始载体图像经3*3分割后得到的r*r个所述图像块,将所述图像块的中间像素的8个邻域像素填充至所述扩展影子图像中与所述中间像素对应的像素扩展出的8个邻域像素;所述扩展影子图像的大小为3r*3r。4. A secret image sharing method for anti-average filtering according to claim 3, characterized in that, in the step S2, each pixel of the shadow image is subjected to neighborhood expansion, using the The original carrier image is used to fill the extended neighborhood to obtain an extended shadow image with the same size as the original carrier image, which specifically includes: performing neighborhood extension on each pixel in the shadow image to extend the surrounding 8 using the r*r image blocks obtained by dividing the original carrier image by 3*3, and filling the 8 neighborhood pixels of the middle pixel of the image block into the extended shadow image 8 neighboring pixels extended from the pixel corresponding to the intermediate pixel; the size of the extended shadow image is 3r*3r. 5.根据权利要求4所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:5. A secret image sharing method for anti-average filtering according to claim 4, characterized in that, in the step S3, adjustment is made based on the difference between the average and the corresponding non-extended pixels Each neighborhood pixel of the non-extended pixel specifically includes: 对于所述差值为正数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素分别减去所述差值的整数部分,并且减去所述差值的整数部分后的所述各个邻域像素的像素值的范围为[0,255],若减去所述差值的整数部分后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is a positive number, each neighboring pixel of each non-extended pixel in the extended shadow image subtracts the integer part of the difference value respectively, and subtracts the integer part of the difference value. The range of the pixel value of each neighborhood pixel is [0, 255], if the range of the pixel value of each neighborhood pixel after subtracting the integer part of the difference value is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels; 在所述非扩展像素的各个邻域像素分别减去所述差值的整数部分后,确定所述差值的小数部分乘以8后的数值m1,从减去所述差值的整数部分后的所述非扩展像素的各个邻域像素中任意选取m1个邻域像素,所述m1个邻域像素中的每个邻域像素的像素值都减1,使得减1后的m1个邻域像素的像素值的范围为[0,255],若所述减1后的m1个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m1为正整数。After the integer part of the difference value is respectively subtracted from each neighboring pixel of the non-extended pixel, a numerical value m 1 obtained by multiplying the decimal part of the difference value by 8 is determined, and the integer part of the difference value is subtracted from M 1 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the subsequent non-extended pixel, and the pixel value of each neighborhood pixel in the m 1 neighborhood pixels is reduced by 1, so that the m after the reduction of 1 is reduced by 1. The range of the pixel value of 1 neighborhood pixel is [0, 255], if the range of the pixel value of the m 1 neighborhood pixel after subtracting 1 is not within [0, 255], then assign the pixel value of the non-extended pixel to Given its neighborhood pixels, m 1 is a positive integer. 6.根据权利要求4所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,在所述步骤S3中,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素具体包括:6 . The secret image sharing method for anti-average filtering according to claim 4 , wherein, in the step S3 , adjustment is made based on the difference between the average and the corresponding non-extended pixels. 7 . Each neighborhood pixel of the non-extended pixel specifically includes: 对于所述差值为负数的情况,所述扩展影子图像中每个非扩展像素的各个邻域像素中分别加上所述差值的整数部分的绝对值,并且加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围为[0,255],若加上所述差值的整数部分的绝对值后的所述各个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素;In the case where the difference value is negative, add the absolute value of the integer part of the difference value to each neighboring pixel of each non-extended pixel in the extended shadow image, and add the integer value of the difference value The range of the pixel value of each neighborhood pixel after the absolute value of the part is [0, 255], if the range of the pixel value of each neighborhood pixel after adding the absolute value of the integer part of the difference value is not in [ 0,255], then assign the pixel value of the non-expanded pixel to its neighborhood pixel; 在所述非扩展像素的各个邻域像素分别加上所述差值的整数部分的绝对值后,确定所述差值的小数部分乘以8后的数值m2,从加上所述差值的整数部分的绝对值后的所述非扩展像素的各个邻域像素中任意选取m2个邻域像素,所述m2个邻域像素中的每个邻域像素的像素值都加1,使得加1后的m2个邻域像素的像素值的范围为[0,255],若所述加1后的m2个邻域像素的像素值的范围不在[0,255]内,则将所述非扩展像素的像素值赋给其邻域像素,m2为正整数。After the absolute value of the integer part of the difference value is added to each neighboring pixel of the non-extended pixel, the numerical value m 2 obtained by multiplying the decimal part of the difference value by 8 is determined, and the difference value is added from the M 2 neighborhood pixels are arbitrarily selected from each neighborhood pixel of the non - extended pixel after the absolute value of the integer part of The range of the pixel values of the m 2 neighborhood pixels after adding 1 is [0, 255], if the range of the pixel values of the m 2 neighborhood pixels after adding 1 is not within [0, 255], the non- The pixel value of the extended pixel is assigned to its neighbor pixels, and m 2 is a positive integer. 7.根据权利要求5或6任一项所述的一种用于对抗均值滤波的秘密图像分享方法,其特征在于,所述接收方对接收到的所述完成邻域像素调整的n个扩展影子图像进行均值滤波,得到的结果图像中各个像素的像素值与所述影子图像的各个像素的像素值一致,从而实现能够对抗均值滤波的所述秘密图像的分享。7. A secret image sharing method for anti-average filtering according to any one of claims 5 or 6, wherein the receiver performs the received n extensions of pixel adjustment in the neighborhood The shadow image is subjected to mean filtering, and the pixel value of each pixel in the obtained result image is consistent with the pixel value of each pixel of the shadow image, thereby realizing the sharing of the secret image that can resist mean filtering. 8.一种用于对抗均值滤波的秘密图像分享系统,其特征在于,所述系统包括:8. A secret image sharing system for anti-mean filtering, wherein the system comprises: 第一处理单元,被配置为,获取秘密图像和作为分享所述秘密图像的图像信息的载体的n个原始载体图像,所述秘密图像为灰度图像,所述原始载体图像经调整后得到与所述秘密图像大小相同的重组载体图像,n为正整数;The first processing unit is configured to acquire a secret image and n original carrier images serving as carriers for sharing image information of the secret image, the secret images are grayscale images, and the original carrier image is adjusted to obtain the same value as the original carrier image. The reconstructed carrier images with the same size of the secret image, and n is a positive integer; 第二处理单元,被配置为,将所述秘密图像的图像信息分别融合至n个所述重组载体图像以获取n个影子图像,对所述影子图像的每个像素进行邻域扩展,利用所述原始载体图像来填充经扩展的邻域,以得到与所述原始载体图像大小相同的扩展影子图像;The second processing unit is configured to fuse the image information of the secret image into the n reconstituted carrier images respectively to obtain n shadow images, perform neighborhood expansion on each pixel of the shadow images, and use the using the original carrier image to fill the extended neighborhood to obtain an extended shadow image of the same size as the original carrier image; 第三处理单元,被配置为,计算所述扩展影子图像中的每个非扩展像素的邻域像素的均值,基于所述均值与对应的非扩展像素之间的差值来调整所述非扩展像素的各个邻域像素;a third processing unit configured to calculate a mean value of neighboring pixels of each non-expanded pixel in the expanded shadow image, and adjust the non-expanded pixel based on the difference between the mean value and the corresponding non-expanded pixel each neighborhood pixel of the pixel; 第四处理单元,被配置为,将完成邻域像素调整的n个扩展影子图像由发送方发送至接收方,所述接收方基于接收到的所述完成邻域像素调整的n个扩展影子图像恢复出所述秘密图像。The fourth processing unit is configured to send the n extended shadow images that have completed the neighborhood pixel adjustment from the sender to the receiver, and the receiver is based on the received n extended shadow images that have completed the neighborhood pixel adjustment. The secret image is recovered. 9.一种电子设备,其特征在于,所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时,实现权利要求1至7中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。9. An electronic device, characterized in that the electronic device comprises a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any one of claims 1 to 7 is implemented Steps in the described method for sharing secret images against mean filtering. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1至7中任一项所述的一种用于对抗均值滤波的秘密图像分享方法中的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program of any one of claims 1 to 7 is implemented. Steps in a secret image sharing method for adversarial mean filtering.
CN202210116389.0A 2022-02-07 2022-02-07 Secret image sharing method and system for resisting mean filtering Active CN114612317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210116389.0A CN114612317B (en) 2022-02-07 2022-02-07 Secret image sharing method and system for resisting mean filtering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210116389.0A CN114612317B (en) 2022-02-07 2022-02-07 Secret image sharing method and system for resisting mean filtering

Publications (2)

Publication Number Publication Date
CN114612317A true CN114612317A (en) 2022-06-10
CN114612317B CN114612317B (en) 2023-04-07

Family

ID=81859521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210116389.0A Active CN114612317B (en) 2022-02-07 2022-02-07 Secret image sharing method and system for resisting mean filtering

Country Status (1)

Country Link
CN (1) CN114612317B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119444828A (en) * 2024-10-18 2025-02-14 中国水利水电科学研究院 Concrete crack true length calculation method and device, system, and storage medium
CN119788267A (en) * 2024-11-07 2025-04-08 西华大学 A distributed secret sharing method, system and storage medium with efficient storage

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426690A (en) * 2011-07-30 2012-04-25 成都信息工程学院 Secret sharing and recovery method for digital image
CN102946310A (en) * 2012-09-03 2013-02-27 杭州电子科技大学 Fingerprint fuzzy vault method based on (k, w) threshold secret sharing scheme
CN106339975A (en) * 2016-10-10 2017-01-18 中科院成都信息技术股份有限公司 Digital image secret sharing method, restoration method and devices
CN106980791A (en) * 2017-03-30 2017-07-25 上海海洋大学 Weighted Threshold ocean remote sensing image secret sharing scheme and method are extended under cloud environment
US9967292B1 (en) * 2017-10-25 2018-05-08 Extrahop Networks, Inc. Inline secret sharing
CN108600574A (en) * 2018-04-20 2018-09-28 大连理工大学 Secret sharing method based on Faster R-CNN ' s
CN110516425A (en) * 2019-08-21 2019-11-29 济南大学 A secret sharing method and system
CN111291411A (en) * 2020-02-13 2020-06-16 福州大学 Security video anomaly detection system and method based on convolutional neural network
CN111327786A (en) * 2020-02-26 2020-06-23 中国科学技术大学 Robust Steganography Method Based on Social Network Platform
CN111416915A (en) * 2020-02-21 2020-07-14 成都信息工程大学 An Image Secret Sharing Method and Application Based on Threshold Reduction
US20210132949A1 (en) * 2019-10-30 2021-05-06 Robert Bosch Gmbh Method and apparatus for an advanced convolution on encrypted data

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426690A (en) * 2011-07-30 2012-04-25 成都信息工程学院 Secret sharing and recovery method for digital image
CN102946310A (en) * 2012-09-03 2013-02-27 杭州电子科技大学 Fingerprint fuzzy vault method based on (k, w) threshold secret sharing scheme
CN106339975A (en) * 2016-10-10 2017-01-18 中科院成都信息技术股份有限公司 Digital image secret sharing method, restoration method and devices
CN106980791A (en) * 2017-03-30 2017-07-25 上海海洋大学 Weighted Threshold ocean remote sensing image secret sharing scheme and method are extended under cloud environment
US9967292B1 (en) * 2017-10-25 2018-05-08 Extrahop Networks, Inc. Inline secret sharing
CN108600574A (en) * 2018-04-20 2018-09-28 大连理工大学 Secret sharing method based on Faster R-CNN ' s
CN110516425A (en) * 2019-08-21 2019-11-29 济南大学 A secret sharing method and system
US20210132949A1 (en) * 2019-10-30 2021-05-06 Robert Bosch Gmbh Method and apparatus for an advanced convolution on encrypted data
CN111291411A (en) * 2020-02-13 2020-06-16 福州大学 Security video anomaly detection system and method based on convolutional neural network
CN111416915A (en) * 2020-02-21 2020-07-14 成都信息工程大学 An Image Secret Sharing Method and Application Based on Threshold Reduction
CN111327786A (en) * 2020-02-26 2020-06-23 中国科学技术大学 Robust Steganography Method Based on Social Network Platform

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
GHEBLEH M: "A novel secret image sharing scheme using large primes", 《MULTIMED TOOLS APPL》 *
LAKSHMIV.S: "Collusion resistant secret sharing scheme for secure data storage and processing over cloud", 《JOURNAL OF INFORMATION SECURITY AND APPLICATIONS》 *
XIAO SHANGQIN: "Secret sharing based video watermark algorithm for multiuser", 《DIGITAL WATERMARKING》 *
XUEHU YAN: "Chinese remainder theorem-based two-in-one image secret sharing with three decoding options", 《DIGITAL SIGNAL PROCESSING》 *
刘林涛: "秘密图像分享一般模型与随机性利用关键技术研究", 《中国博士学位论文全文数据库 信息科技辑》 *
刘海泉: "图像认证技术的研究与应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119444828A (en) * 2024-10-18 2025-02-14 中国水利水电科学研究院 Concrete crack true length calculation method and device, system, and storage medium
CN119788267A (en) * 2024-11-07 2025-04-08 西华大学 A distributed secret sharing method, system and storage medium with efficient storage

Also Published As

Publication number Publication date
CN114612317B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN107492064B (en) Image encryption method based on memristor chaos system, elementary cellular automata and compressed sensing
Mstafa et al. A high payload video steganography algorithm in DWT domain based on BCH codes (15, 11)
Bansod et al. Modified BPCS steganography using Hybrid cryptography for improving data embedding capacity
Hamza et al. Novel Secure Hybrid Image Steganography Technique Based on Pattern Matching.
Mukherjee et al. An efficient multi-bit steganography algorithm in spatial domain with two-layer security
Ye et al. Research on reversible image steganography of encrypted image based on image interpolation and difference histogram shift
CN114612317A (en) Secret image sharing method and system for resisting mean filtering
Lai et al. High embedding capacity data hiding technique based on hybrid AMBTC and LSB substitutions
Teotia et al. Enhancing audio and video steganography technique using hybrid algorithm
CN115131253A (en) Secret image sharing method and system for resisting JPEG recompression
Krishna et al. Concealment of data using RSA cryptography and steganography techniques
Moon Forensic multi-dimensional Ary exploited modified direction data embedding approach to increase imperceptibility and robustness of secured data
Yu et al. Reversible data hiding with pixel prediction and additive homomorphism for encrypted image
CN109447886B (en) Binding to EMD-2 1 Embedded multi-carrier secret map separate storage method with recovery
CN114782563B (en) A secret image sharing method and system for JPEG images
Kumar et al. Dual image reversible data hiding: A survey
Gupta et al. An improved image steganography technique using block division & least significant bit approach
CN108171665B (en) A Multi-version Backup and Restricted Two-Factor Authentication Master Key (t,s,k,n) Image Sharing Method
Jiang et al. Meaningful secret image sharing for JPEG images with arbitrary quality factors
Hema et al. Efficient Compression of Multimedia Data using Lempel–Ziv–Markov Chain Adaptive Block Compressive Sensing (LZMC-ABCS)
Dharwadkar Unveiling the Hidden Pixels: A Comprehensive Exploration of Digital Image Steganography Schemes
Rodrigues et al. Reversible image steganography using cyclic codes and dynamic cover pixel selection
Rani et al. Video steganography using mid-point circle algorithm and spatial domain technique
Perumal et al. Sparse data encoder and decoder to improve security in video steganography
Lee et al. Steganographic access control in data hiding using run‐length encoding and modulo‐operations

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant