CN112188028B - 一种球极变换的彩色图像加密编码与解码方法 - Google Patents
一种球极变换的彩色图像加密编码与解码方法 Download PDFInfo
- Publication number
- CN112188028B CN112188028B CN202010977342.4A CN202010977342A CN112188028B CN 112188028 B CN112188028 B CN 112188028B CN 202010977342 A CN202010977342 A CN 202010977342A CN 112188028 B CN112188028 B CN 112188028B
- Authority
- CN
- China
- Prior art keywords
- image
- channel
- color image
- pixel
- arccos
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Facsimile Transmission Control (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明涉及一种球极变换的彩色图像加密编码和解码方法。在加密编码方,首先调整彩色图像每个通道的灰度阈值范围,然后再将彩色图像每个通道的灰度值变换到球极坐标系中,实现加密编码。将球极矢量的模长作为密文,相位角作为密钥,通过不同的信道分别传给接收者。接收方收到密文及密钥后,通过计算球极矢量在各个坐标轴上的分量,即可恢复出原始图像的信息。该方法实现方式简单,可以免疫来自相位恢复算法的攻击,提高图像加密强度,具有良好的应用潜力。
Description
技术领域
本发明涉及一种图像编码与解码方法,尤其涉及一种球极变换的彩色图像加密编码和解码方法。
背景技术
在现代军事、工业、科研、生活、娱乐等领域中,数字图像的使用非常广泛,在很多场景下,数字图像的内容涉及到版权、隐私、机密等信息,因此需要进行加密编码以后再进行传输。
在图像加密编码领域,有很多方式可以实现对图像信息的隐藏,其中一类加密方案是将彩色图像每个通道的灰度信息看成是某个球极矢量的三个分量,然后对该矢量的振幅部分和相位部分进行加密,最终得到一幅无法辨识内容的白噪声图像。为了实现双随机相位编码,可以使用傅里叶变换的方法,得到振幅和相位分布函数,在通过随机相位矩阵对其进行加密。除此之外,还可以使用菲涅耳变换、小波变换、余弦变换等方式来实现加密。同时,这类加密方法,不仅可以使用算法实现,也可以通过光电系统完成。
然而,研究表明,光学变换大多属于线性变换,且有明确的物理模型。这些特点给加密方法带来了一系列问题。通过模型分析、选择合适的参数、使用相位恢复算法进行一系列的迭代,就可以在不知道密钥的情况下,重建出图像的信息。
为了解决这个问题,本专利提出了一种针对彩色图像的加密编码方法,该方法对彩色图像每个通道的像素和球极变换方法进行编码,不会受到相位恢复算法的攻击,提高了安全性。
发明内容
针对现有方法的不足,本发明提出了一种球极变换的彩色图像加密编码和解码方法。下面结合附图对本发明做进一步详细说明。为实现上述目的,本发明的方案包括:
如图1所示,加密编码包括如下步骤:
1)将数字图像每个通道的灰度阶矩阵表示为I(x,y,k),它在每个像素上都是实数,x和y分别表示图像的像素坐标,k代表通道编号,图像的像素尺寸为M*N,其中M表示图像的行像素数,N表示图像的列像素数。
2)I(x,y,k)每个通道的灰度阶范围为0到P,调整每个像素的灰度值为
I1(x,y,k)=I(x,y,k)-(P+1)/2,(1)
3)彩色图像分为三个通道,所以令k=1,2,3,根据式(2)(3)(4)分别得到
a(x,y)=I1(x,y,1),(2)
b(x,y)=I1(N+1-x,y,2),(3)
c(x,y)=I1(N+1-x,M+1-y,3),(4)
其中,x从1到N,y从1到M。生成尺寸与a(x,y)相同的随机数矩阵Z(x,y),随机数的范围从-0.5到0.5。根据式(5)(6)(7)计算T1(x,y)、T2(x,y)、T3(x,y),
T1(x,y)=sqrt[a(x,y)^2+b(x,y)^2],(5)
T2(x,y)=sqrt[a(x,y)^2+b(x,y)^2+c(x,y)^2],(6)
T3(x,y)=T2(x,y)+Z(x,y)*2*P,(7)
其中,sqrt()表示开方运算,^2表示平方运算。
4)根据式(5)、(6)、(7)确定复数的相位角r1(x,y)和r2(x,y),
若b(x,y)>0,则r1(x,y)=arccos[a(x,y)/T1(x,y)],(8)
若b(x,y)≤0,则r1(x,y)=arccos[a(x,y)/T1(x,y)]+π,(9)
若c(x,y)>0,则r2(x,y)=arccos[a(x,y)/T3(x,y)],(10)
若c(x,y)≤0,则r2(x,y)=-arccos[a(x,y)/T3(x,y)],(11)
5)将T3(x,y)作为密文通过公共信道传输给接收者,同时将r1(x,y)、r2(x,y)和Z(x,y)作为密钥通过保密信道传输给接收者。
在接收方,解码包括如下步骤:
1)根据密文T3(x,y)和密钥r1(x,y)、r2(x,y)进行解密,
T31(x,y)=T3(x,y)-Z(x,y)*2*P,(12)
c1(x,y)=sin[r2(x,y)]*T31(x,y),(13)
T11(x,y)=cos[r2(x,y)]*T31(x,y),(14)
b1(x,y)=sin[r1(x,y)]*T11(x,y),(15)
a1(x,y)=cos[r1(x,y)]*T11(x,y),(16)
2)还原出原图像,
I2(x,y,1)=a1(x,y),(17)
I2(x,y,2)=b1(N+1-x,y),(18)
I2(x,y,3)=c1(N+1-x,M+1-y),(19)
其中,x从1到N,y从1到M。调整I2(x,y,k)的灰度值为0到P之间,I2(x,y,k)即为解码图像。
本发明与现有方法相比,有益效果在于:本发明提出了不会受到相位恢复算法攻击的彩色图像加密编码与解码方法,该方法的计算过程简单,加密编码和解码效果好,具有良好的应用前景。
附图说明
下面结合附图对本发明进一步说明。
图1为本发明所述图像加密编码的流程图。
图2为本发明实施例中所用的测试彩色图像的三个通道。
图3为本发明实施例中所述的编码密文图像T3(x,y)。
图4为本发明实施例中所述的解码彩色图像的三个通道。
具体实施方式
为使本发明的上述目的、特征和优点能够更加易于理解,下面结合附图和具体实施方式对本发明作进一步详细说明。
实施例:
根据编码步骤1),如图2所示,灰度图像的像素尺寸为512*512,通道数k为3。
根据编码步骤2),图像灰度阶最大值P = 256,根据式(1)将灰度值调整到-128到127之间。
根据编码步骤3),根据式(2)(3)(4),计算出a、b、c,生成随机数矩阵Z(x,y),并根据式(5)(6)(7)计算出T1(x,y)、T2(x,y)、T3(x,y),图3所示的是加密编码后的矩阵T(x,y)。
根据编码步骤4),根据式(8)(9)(10)计算出相位角r1(x,y)和r2(x,y)。
根据编码步骤5),将T3(x,y)作为密文通过公共信道传输给接收者,同时将r1(x,y)、r2(x,y)和Z(x,y)作为密钥通过保密信道传输给接收者。
根据解码步骤1),根据密文T3(x,y)和密钥r1(x,y)、r2(x,y)和Z(x,y),计算a1(x,y)、b1(x,y)、c1(x,y)。
根据解码步骤2),还原出图像并调整灰度值,如图4所示是解码图像。
Claims (1)
1.一种球极变换的彩色图像加密编码和解码方法,其特征在于:包括以下步骤:
加密编码包括如下步骤:
1)将数字图像每个通道的灰度阶矩阵表示为I(x,y,k),它在每个像素上都是实数,x和y分别表示图像的像素坐标,k代表通道编号,图像的像素尺寸为M*N,其中M表示图像的行像素数,N表示图像的列像素数;
2)I(x,y,k)每个通道的灰度阶范围为0到P,调整每个像素的灰度值为
I1(x,y,k)=I(x,y,k)-(P+1)/2,(1)
3)彩色图像分为三个通道,所以令k=1,2,3,根据式(2)(3)(4)分别得到
a(x,y)=I1(x,y,1),(2)
b(x,y)=I1(N+1-x,y,2),(3)
c(x,y)=I1(N+1-x,M+1-y,3),(4)
其中,x从1到N,y从1到M;生成尺寸与a(x,y)相同的随机数矩阵Z(x,y),随机数的范围从-0.5到0.5;根据式(5)(6)(7)计算T1(x,y)、T2(x,y)、T3(x,y),
T1(x,y)=sqrt[a(x,y)^2+b(x,y)^2],(5)
T2(x,y)=sqrt[a(x,y)^2+b(x,y)^2+c(x,y)^2],(6)
T3(x,y)=T2(x,y)+Z(x,y)*2*P,(7)
其中,sqrt()表示开方运算,^2表示平方运算;
4)根据式(5)、(6)、(7)确定复数的相位角r1(x,y)和r2(x,y),
若b(x,y)>0,则r1(x,y)=arccos[a(x,y)/T1(x,y)],(8)
若b(x,y)≤0,则r1(x,y)=arccos[a(x,y)/T1(x,y)]+π,(9)
若c(x,y)>0,则r2(x,y)=arccos[a(x,y)/T3(x,y)],(10)
若c(x,y)≤0,则r2(x,y)=-arccos[a(x,y)/T3(x,y)],(11)
5)将T3(x,y)作为密文通过公共信道传输给接收者,同时将r1(x,y)、r2(x,y)和Z(x,y)作为密钥通过保密信道传输给接收者;
在接收方,解码包括如下步骤:
1)根据密文T3(x,y)和密钥r1(x,y)、r2(x,y)进行解密,
T31(x,y)=T3(x,y)-Z(x,y)*2*P,(12)
c1(x,y)=sin[r2(x,y)]*T31(x,y),(13)
T11(x,y)=cos[r2(x,y)]*T31(x,y),(14)
b1(x,y)=sin[r1(x,y)]*T11(x,y),(15)
a1(x,y)=cos[r1(x,y)]*T11(x,y),(16)
2)还原出原图像,
I2(x,y,1)=a1(x,y),(17)
I2(x,y,2)=b1(N+1-x,y),(18)
I2(x,y,3)=c1(N+1-x,M+1-y),(19)
其中,x从1到N,y从1到M;调整I2(x,y,k)的灰度值为0到P之间,I2(x,y,k)即为解码图像。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010977342.4A CN112188028B (zh) | 2020-09-17 | 2020-09-17 | 一种球极变换的彩色图像加密编码与解码方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010977342.4A CN112188028B (zh) | 2020-09-17 | 2020-09-17 | 一种球极变换的彩色图像加密编码与解码方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112188028A CN112188028A (zh) | 2021-01-05 |
CN112188028B true CN112188028B (zh) | 2022-06-07 |
Family
ID=73921508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010977342.4A Active CN112188028B (zh) | 2020-09-17 | 2020-09-17 | 一种球极变换的彩色图像加密编码与解码方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112188028B (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113259122B (zh) * | 2021-06-04 | 2021-09-21 | 国网浙江省电力有限公司杭州供电公司 | 一种基于人工智能的全场景网络安全智慧决策处置方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2365295A (en) * | 2000-07-27 | 2002-02-13 | Cambridge Consultants | Watermarking key |
CN102800042B (zh) * | 2012-06-14 | 2014-10-29 | 南昌大学 | 基于对数极坐标变换的多图像加密方法 |
WO2017004790A1 (zh) * | 2015-07-07 | 2017-01-12 | 深圳大学 | 基于双随机相位图像编码系统的密码学破解方法和装置 |
CN107742082B (zh) * | 2017-10-11 | 2020-09-11 | 长沙师范学院 | 一种光学图像加密算法 |
CN109583216B (zh) * | 2018-10-09 | 2023-06-06 | 天津大学 | 矢量分解和相位编码的单通道彩色图像加密方法 |
-
2020
- 2020-09-17 CN CN202010977342.4A patent/CN112188028B/zh active Active
Also Published As
Publication number | Publication date |
---|---|
CN112188028A (zh) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Dolendro Singh et al. | Visually meaningful multi-image encryption scheme | |
CN108648133B (zh) | 一种结合块旋转和马赛克的无嵌入伪装方法 | |
Manohar et al. | Data encryption & decryption using steganography | |
Bansod et al. | Modified BPCS steganography using Hybrid cryptography for improving data embedding capacity | |
CN105812816B (zh) | 一种压缩加密认证联合编码方法 | |
Ping et al. | Generating visually secure encrypted images by partial block pairing-substitution and semi-tensor product compressed sensing | |
Zhang et al. | Harnessing the hybrid cloud for secure big image data service | |
Hodeish et al. | An optimal (k, n) visual secret sharing scheme for information security | |
Qiu et al. | Reversible data hiding in encrypted images with dual data embedding | |
Mo et al. | Reversible Data Hiding in Encrypted Image Based on Block Classification Permutation. | |
Singh | High PSNR based image steganography | |
CN112188028B (zh) | 一种球极变换的彩色图像加密编码与解码方法 | |
CN105975869A (zh) | 基于显著性区域的自适应选择加密方法 | |
Abdulkadhim et al. | Audio steganography based on least significant bits algorithm with 4D grid multi-wing hyper-chaotic system | |
Mansour et al. | Steganography-Based Transmission of Medical Images Over Unsecure Network for Telemedicine Applications. | |
CN112188030B (zh) | 像素组合与复数变换的灰度图像加密编码与解码方法 | |
CN112351151B (zh) | 基于fcn的图像信息加密方法及装置 | |
CN103945224A (zh) | 基于双随机相位编码的视频加密方法 | |
Solak et al. | A new approach for Steganography: Bit shifting operation of encrypted data in LSB (SED-LSB) | |
Atee et al. | A steganography approach based on particle swarm optimization and least significant bit in color images | |
Shanthakumari et al. | Video Steganography using LSB matching revisited algorithm | |
CN114969796A (zh) | 一种结合qr码与s盒混沌置乱的图像隐写方法及系统 | |
Talal et al. | Steganographic Data Hiding Using Quantum Behaved Particle Swarm Optimization and An Enhanced Aes Algorithm | |
Wu et al. | Data hiding in block truncation coding | |
Meghana et al. | A new method for secret image transmission via mosaic fragments using ecc key |
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 |