WO2020114308A1 - Image encryption and correction method and device, and image decryption method and device - Google Patents

Image encryption and correction method and device, and image decryption method and device Download PDF

Info

Publication number
WO2020114308A1
WO2020114308A1 PCT/CN2019/121557 CN2019121557W WO2020114308A1 WO 2020114308 A1 WO2020114308 A1 WO 2020114308A1 CN 2019121557 W CN2019121557 W CN 2019121557W WO 2020114308 A1 WO2020114308 A1 WO 2020114308A1
Authority
WO
WIPO (PCT)
Prior art keywords
brightness value
pixel brightness
gamma correction
random data
pixel
Prior art date
Application number
PCT/CN2019/121557
Other languages
French (fr)
Chinese (zh)
Inventor
杨建权
黄倩
张玉兰
常杰
朱国普
Original Assignee
中国科学院深圳先进技术研究院
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 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Publication of WO2020114308A1 publication Critical patent/WO2020114308A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits 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/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, 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/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits 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

Abstract

The present invention relates to the technical field of image processing, and provides an image encryption and correction method and device, and an image decryption method and device. The method comprises: performing normalization processing on brightness pixels to generate a first pixel brightness value; randomly generating first random data on the basis of an encryption key, and generating an encrypted second pixel brightness value on the basis of the first random data and the first pixel brightness value; and performing gamma correction on the second pixel brightness value on the basis of a first gamma correction parameter to obtain a third pixel brightness value. The generating of the encrypted second pixel brightness value on the basis of the first random data and the first pixel brightness value comprises: performing logarithmic operation on a product of the first random data and the first pixel brightness value so as to generate the encrypted second pixel brightness value. By means of the present solution, gamma correction processing can be performed on encrypted image data, thereby improving the image quality while protecting the privacy of an image of a user side, and ensuring safety of user data.

Description

一种图像加密与校正方法、装置及图像解密方法、装置Image encryption and correction method and device, and image decryption method and device 技术领域Technical field
本申请涉及一种图像处理技术领域,特别是涉及一种图像加密与校正方法、装置及图像解密方法、装置。The present application relates to the technical field of image processing, in particular to an image encryption and correction method and device, and an image decryption method and device.
背景技术Background technique
在社交平台上,用户希望对私人图片进行加密,以保护个人隐私;同时也希望社交平台能够对加密图像进行一定清晰化或美化处理。作为满足这一需求的关键技术,加密域信号处理技术近年来得到迅猛发展和广泛关注。On social platforms, users hope to encrypt private pictures to protect personal privacy; at the same time, they also hope that social platforms can perform certain clarity or beautification of encrypted images. As a key technology to meet this demand, the encryption domain signal processing technology has been rapidly developed and widely concerned in recent years.
目前,对于图像进行清晰化或美化处理一般使用图像解密后基于像素域进行的图像处理,其中被广泛采用的伽马校正是常见的增强视觉质量的图像处理技术之一,其通过将亮度值根据指定的幂函数进行重新映射,可提亮过暗区域,抑制过亮区域,从而增强图像或视频的细节信息。现有技术中,一般通过公式:y=255*(x/255) γ实现伽马校正,其中,y为伽马校正后的像素值,x为原始亮度值(0表示最暗,255表示最亮,0≤x≤255),y为伽马校正后的亮度值,γ为伽马校正的参数(γ>0);说明书附图1给出了伽马校正的效果,可以看出,伽马校正可以增强图像或视频的细节信息。然而,上述传统的伽马校正方案都是建立在对解密图像上进行的伽马校正。而一旦用户端对图像进行加密、上传后,平台端在不进行解密的情况下根本无法对于图像进行伽马校正处理,使得图像质量无法提高;另一方面,一旦平台端解密进行图像处理,这也即将大大破坏用户端图像的私密性,不能保证用户数据安全。 At present, the image clearing or beautification processing generally uses image processing based on the pixel domain after image decryption. Among them, gamma correction, which is widely used, is one of the common image processing techniques to enhance visual quality. The specified power function performs remapping to brighten over-dark areas and suppress over-bright areas, thereby enhancing the details of images or videos. In the prior art, the gamma correction is generally implemented by the formula: y=255*(x/255) γ , where y is the pixel value after gamma correction, and x is the original brightness value (0 means the darkest, 255 means the most Bright, 0≤x≤255), y is the brightness value after gamma correction, and γ is the parameter of gamma correction (γ>0); Figure 1 of the specification gives the effect of gamma correction. It can be seen that the gamma Horse correction can enhance the details of the image or video. However, the above traditional gamma correction schemes are all based on the gamma correction performed on the decrypted image. Once the user side encrypts and uploads the image, the platform side cannot perform gamma correction processing on the image without decryption, making the image quality unable to improve; on the other hand, once the platform side decrypts the image processing, this It is also about to greatly destroy the privacy of the user's image and cannot guarantee the security of user data.
发明内容Summary of the invention
为解决上述技术问题,本发明实施例提供了一种加密域伽马校正的方法及系统,保护用户私密性的情况下进行图像细节增强处理,技术方案如下:In order to solve the above technical problems, the embodiments of the present invention provide a method and system for gamma correction of the encryption domain to enhance image detail processing while protecting user privacy. The technical solution is as follows:
一种图像加密与校正方法,其特征在于,包括:An image encryption and correction method, characterized in that it includes:
对亮度像素进行归一化处理生成第一像素亮度值;Normalize the brightness pixels to generate the first pixel brightness value;
基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;Randomly generate first random data based on the encryption key, and generate an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
基于第一伽马校正参数对第二像素亮度值进行伽马校正得到第三像素亮度 值;所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。Perform gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain a third pixel brightness value; the generating encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: Perform a logarithmic operation on the product of the first random data and the first pixel brightness value to generate an encrypted second pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
相应的,所述基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。Correspondingly, the gamma correction of the second pixel luminance value based on the first gamma correction parameter includes: multiplying the first gamma correction parameter and the second pixel luminance value to obtain the corrected luminance value.
一种图像解密方法,其特征在于,包括:获得第一随机数据、第一伽马校正参数以及第三像素亮度值;An image decryption method, characterized in that it includes: obtaining first random data, a first gamma correction parameter, and a third pixel brightness value;
基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;Restore the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The first pixel brightness value is denormalized to generate a gamma-corrected brightness value.
基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值,包括:基于公式
Figure PCTCN2019121557-appb-000001
进行还原出第一像素亮度值;
The first pixel brightness value is restored based on the first random data, the first gamma correction parameter, and the third pixel brightness value, including: based on the formula
Figure PCTCN2019121557-appb-000001
Restore the brightness value of the first pixel;
其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
一种图像加密与校正装置,其特征在于,包括:An image encryption and correction device, characterized in that it includes:
归一化模块,对亮度像素进行归一化处理生成第一像素亮度值;The normalization module performs normalization processing on the brightness pixels to generate the first pixel brightness value;
加密模块,基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;The encryption module randomly generates first random data based on the encryption key, and generates an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
伽马校正模块,基于第一伽马校正参数对第二像素亮度值进行伽马校正得到第三像素亮度值;The gamma correction module performs gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain a third pixel brightness value;
相应的,所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。Correspondingly, the generating the encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: performing a logarithmic operation on the product of the first random data and the first pixel brightness value to generate encryption After the second pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
相应的,基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。Correspondingly, performing gamma correction on the second pixel brightness value based on the first gamma correction parameter includes: multiplying the first gamma correction parameter and the second pixel brightness value to obtain the corrected brightness value.
一种图像解密装置,其特征在于,包括:An image decryption device, characterized in that it includes:
第一获取模块,获得第一随机数据、第一伽马校正参数以及第三像素亮度值;The first obtaining module obtains the first random data, the first gamma correction parameter, and the third pixel brightness value;
还原模块,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;The restoration module restores the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
去归一化模块,对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The de-normalization module performs de-normalization processing on the luminance value of the first pixel to generate a gamma-corrected luminance value.
相应的,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值,包括:基于公式
Figure PCTCN2019121557-appb-000002
进行还原出第一像素亮度值;
Correspondingly, the first pixel brightness value is restored based on the first random data, the first gamma correction parameter, and the third pixel brightness value, including: based on the formula
Figure PCTCN2019121557-appb-000002
Restore the brightness value of the first pixel;
其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
一种图像加密与校正系统,其特征在于,包括:所述系统包括由上述任一项所述的图像加密与校正装置以及任一项所述的图像解密装置。An image encryption and correction system, characterized in that the system includes the image encryption and correction device according to any one of the above items and the image decryption device according to any one of the above items.
本发明实施例中,在基于上述实施例方案,从而对于用户端加密、上传后的图像,在不进行解密的情况下执行伽马校正处理,一方面大大提高了使得图像质量;另一方面,由于基于解密图像数据进行伽马校正处理,保护了用户端图像的私密性,保证用户数据安全;此外,采用了对数加密方法,大大降低了相对于传统复杂函数进行图像校正的方案,大大降低了的计算量。In the embodiment of the present invention, based on the solution of the above embodiment, the gamma correction process is performed on the encrypted and uploaded image of the user terminal without decryption, on the one hand, the image quality is greatly improved; on the other hand, Due to the gamma correction processing based on the decrypted image data, the privacy of the user's image is protected and the security of the user data is guaranteed; in addition, the logarithmic encryption method is used, which greatly reduces the image correction scheme compared with the traditional complex function, greatly reducing The amount of calculation.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative labor, other drawings can be obtained based on these drawings.
图1为现有技术中伽马校正处理效果图:(a)原图;(b)以γ=1/2伽马校正后的图像(c)以γ=1/4伽马校正后的图像;Figure 1 is the effect diagram of the gamma correction processing in the prior art: (a) the original image; (b) the image corrected with γ=1/2 gamma correction (c) the image corrected with γ=1/4 gamma correction ;
图2为本发明实施例一中的图像加密与校正方法流程图;2 is a flowchart of an image encryption and correction method in Embodiment 1 of the present invention;
图3为本发明实施例一中的图像加密的具体细节步骤流程图;3 is a flowchart of specific details of image encryption in Embodiment 1 of the present invention;
图4为本发明实施例一中的对于加密后的图像数据执行伽马校正方法流程图;4 is a flowchart of a method for performing gamma correction on encrypted image data in Embodiment 1 of the present invention;
图5为本发明实施例二中的图像解密方法流程图;5 is a flowchart of an image decryption method in Embodiment 2 of the present invention;
图6为本发明实施例三中的图像加密与校正装置模块图;6 is a block diagram of an image encryption and correction device in Embodiment 3 of the present invention;
图7为本发明实施例四中的图像解密装置模块图。7 is a block diagram of an image decryption device in Embodiment 4 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.
实施例一Example one
本发明实施例一种图像加密与校正方法,图像的功能是对输入的像素亮度值x(通常是取值在0~255的整数),在加密秘钥K的控制下进行加密,得到加密后的像素亮度值c;An image encryption and correction method according to an embodiment of the present invention. The function of the image is to encrypt the input pixel brightness value x (usually an integer ranging from 0 to 255) under the control of the encryption key K, and obtain the encrypted Pixel brightness value c;
如图2所示,本实施例一种图像加密与校正方法包括:As shown in FIG. 2, an image encryption and correction method in this embodiment includes:
对亮度像素进行归一化处理生成第一像素亮度值;Normalize the brightness pixels to generate the first pixel brightness value;
基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;Randomly generate first random data based on the encryption key, and generate an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。The generating the encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: performing a logarithm operation on the product of the first random data and the first pixel brightness value to generate the encrypted first Two pixel brightness value.
具体的,如图3所示,Step 1:对x进行归一化处理,得到归一化的亮度值
Figure PCTCN2019121557-appb-000003
可知
Figure PCTCN2019121557-appb-000004
Specifically, as shown in FIG. 3, Step 1: normalize the x to obtain the normalized brightness value
Figure PCTCN2019121557-appb-000003
Know
Figure PCTCN2019121557-appb-000004
具体的,Step 2:在加密秘钥K的控制下,生成一个取值范围在[1,N](N由用户根据所需的加密强度来设置)的随机正浮点数n,根据下述加密公式得到加密后的像素亮度值c:Specifically, Step 2: Under the control of the encryption key K, generate a random positive floating-point number n in the range [1,N] (N is set by the user according to the required encryption strength), according to the following encryption The formula gets the encrypted pixel brightness value c:
Figure PCTCN2019121557-appb-000005
Figure PCTCN2019121557-appb-000005
式中的-ε用于表示此时
Figure PCTCN2019121557-appb-000006
起标记的作用,通常取ε=1000。
-Ε in the formula is used to indicate that
Figure PCTCN2019121557-appb-000006
To play the role of mark, usually take ε=1000.
具体的,对于没有加密秘钥的第三方,由于无法产生正确的随机正浮点数数,因此无法由c推断出x,从而起到加密的效果。Specifically, for a third party without an encryption key, since a correct random positive floating-point number cannot be generated, x cannot be inferred from c, thereby achieving the effect of encryption.
相应地,在加密秘钥K的控制下,生成一个取值范围在[1,N](N由用户根 据所需的加密强度来设置)的随机正浮点数n,是基于学术界和工业界已研究多年并已相当成熟的随机数发生器技术来生成。一般软件开发包都会提供生成随机正浮点数的函数接口。另外,只需要用相同的加密秘钥K来初始化该函数,就能生成相同的随机数序列。由于不同开发包的随机数生成公式均可不同,因此此处写出具体公式,反而会限制专利保护范围。具体到实施例一,本发明调用Matlab 2016a版本的rand函数来生成随机正浮点数。Correspondingly, under the control of the encryption key K, a random positive floating point number n with a value range of [1,N] (N is set by the user according to the required encryption strength) is generated, which is based on academia and industry Random number generator technology that has been studied for many years and has been quite mature to generate. General software development kits will provide a function interface for generating random positive floating point numbers. In addition, you only need to initialize the function with the same encryption key K to generate the same random number sequence. Since the random number generation formulas of different development packages can be different, the specific formula written here will instead limit the scope of patent protection. Specifically to Embodiment 1, the present invention calls the Matlab 2016a version of the rand function to generate random positive floating point numbers.
基于第一伽马校正参数对第二像素亮度值进行伽马校正得到第三像素亮度值;Performing gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain a third pixel brightness value;
具体地,如图4所示:Specifically, as shown in Figure 4:
加密域伽马校正模块的功能是将加密后的亮度值c进行伽马校正处理,得到加密下的伽马校正值z。The function of the gamma correction module in the encryption domain is to perform gamma correction processing on the encrypted luminance value c to obtain the encrypted gamma correction value z.
Step 1:设定伽马校正参数γ,γ>0。Step 1: Set the gamma correction parameter γ, γ>0.
Step 2:通过下述公式实现加密域伽马校正:Step 2: Realize the gamma correction of the encryption domain by the following formula:
z=γ*cz=γ*c
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
相应的,所述基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。Correspondingly, the gamma correction of the second pixel luminance value based on the first gamma correction parameter includes: multiplying the first gamma correction parameter and the second pixel luminance value to obtain the corrected luminance value.
实施例二Example 2
本发明实施例提供一种图像解密方法,解密的功能是根据伽马校正后的加密亮度值z和伽马校正参数γ,还原出伽马校正后的亮度值y。An embodiment of the present invention provides an image decryption method. The function of decryption is to restore the gamma-corrected brightness value y according to the gamma-corrected encrypted brightness value z and the gamma correction parameter γ.
本发明实施例一种图像解密方法,包括:An image decryption method according to an embodiment of the present invention includes:
获得第一随机数据、第一伽马校正参数以及第三像素亮度值;Obtain the first random data, the first gamma correction parameter, and the third pixel brightness value;
基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;Restore the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
具体地,如图5所示:Specifically, as shown in Figure 5:
Step 1:根据加密秘钥K,生成随机正浮点数n。Step 1: According to the encryption key K, generate a random positive floating point number n.
相应地,本发明通过调用了Matlab 2016a版本的rand函数来生成随机正浮点数。Accordingly, the present invention generates a random positive floating-point number by calling the Matlab 2016a version of the rand function.
Step 2:根据下述解密公式还原出归一化的伽马校正亮度值
Figure PCTCN2019121557-appb-000007
Step 2: Restore the normalized gamma corrected brightness value according to the following decryption formula
Figure PCTCN2019121557-appb-000007
Figure PCTCN2019121557-appb-000008
Figure PCTCN2019121557-appb-000008
其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value.
对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The first pixel brightness value is denormalized to generate a gamma-corrected brightness value.
具体地,对
Figure PCTCN2019121557-appb-000009
进行去归一化,得到伽马校正后的亮度值y
Specifically, yes
Figure PCTCN2019121557-appb-000009
Perform de-normalization to get the gamma-corrected brightness value y
Figure PCTCN2019121557-appb-000010
Figure PCTCN2019121557-appb-000010
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
实施例三Example Three
如图6所示,本发明实施例提供一种图像加密与校正装置,一种图像加密与校正装置,包括:As shown in FIG. 6, an embodiment of the present invention provides an image encryption and correction device. An image encryption and correction device includes:
归一化模块110,对亮度像素进行归一化处理生成第一像素亮度值;The normalization module 110 performs normalization processing on the brightness pixels to generate the first pixel brightness value;
加密模块111,基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;The encryption module 111 randomly generates first random data based on the encryption key, and generates an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
伽马校正模块112,基于第一伽马校正参数对第二像素亮度值进行伽马校正得到第三像素亮度值;The gamma correction module 112 performs gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain a third pixel brightness value;
相应的,所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。Correspondingly, the generating the encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: performing a logarithmic operation on the product of the first random data and the first pixel brightness value to generate encryption After the second pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
相应的,基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。Correspondingly, performing gamma correction on the second pixel brightness value based on the first gamma correction parameter includes: multiplying the first gamma correction parameter and the second pixel brightness value to obtain the corrected brightness value.
实施例四Example 4
如图7所示,本发明实施例提供一种图像解密装置,相应的,包括:As shown in FIG. 7, an embodiment of the present invention provides an image decryption device. Correspondingly, it includes:
第一获取模块210,获得第一随机数据、第一伽马校正参数以及第三像素亮度值;The first obtaining module 210 obtains the first random data, the first gamma correction parameter, and the third pixel brightness value;
还原模块211,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;The restoration module 211 restores the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
去归一化模块212,对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The de-normalization module 212 performs a de-normalization process on the luminance value of the first pixel to generate a gamma-corrected luminance value.
相应的,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值,包括:基于公式
Figure PCTCN2019121557-appb-000011
进行还原出第一像素亮度值;
Correspondingly, the first pixel brightness value is restored based on the first random data, the first gamma correction parameter, and the third pixel brightness value, including: based on the formula
Figure PCTCN2019121557-appb-000011
Restore the brightness value of the first pixel;
其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value.
相应的,所述第一随机数据为随机正浮点数。Correspondingly, the first random data is a random positive floating point number.
实施例五Example 5
本发明实施例提供一种图像加密与校正系统,包括:所述系统包括由上述实施例三所述的图像加密与校正装置以及实施例四所述的图像解密装置。An embodiment of the present invention provides an image encryption and correction system, including: the system includes the image encryption and correction device described in the foregoing third embodiment and the image decryption device described in the fourth embodiment.
本发明,在基于上述实施例方案,从而对于用户端加密、上传后的图像,在不进行解密的情况下执行伽马校正处理,一方面大大提高了使得图像质量;另一方面,由于基于解密图像数据进行伽马校正处理,保护了用户端图像的私密性,保证用户数据安全;此外,采用了对数加密方法,大大降低了相对于传统复杂函数进行图像校正的方案,大大降低了的计算量。The present invention is based on the above embodiment solution, so that the gamma correction process is performed on the encrypted and uploaded image of the user terminal without decryption, on the one hand, the image quality is greatly improved; on the other hand, due to the decryption The image data is gamma-corrected to protect the privacy of the user's image and ensure the security of the user's data. In addition, the logarithmic encryption method is used, which greatly reduces the image correction scheme compared with the traditional complex function and greatly reduces the calculation. the amount.
本领域普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。A person of ordinary skill in the art may understand that all or part of the steps carried in the method of the above embodiments may be completed by instructing relevant hardware through a program, and the program may be stored in a computer-readable storage medium. When the program is executed , Including one of the steps of the method embodiment or a combination thereof.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module. The above integrated modules may be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention is also intended to include these modifications and variations.

Claims (13)

  1. 一种图像加密与校正方法,其特征在于,包括:An image encryption and correction method, characterized in that it includes:
    对亮度像素进行归一化处理生成第一像素亮度值;Normalize the brightness pixels to generate the first pixel brightness value;
    基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;Randomly generate first random data based on the encryption key, and generate an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
    基于第一伽马校正参数对第二像素亮度值进行伽马校正得到第三像素亮度值;所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。Perform gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain a third pixel brightness value; the generating encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: Perform a logarithmic operation on the product of the first random data and the first pixel brightness value to generate an encrypted second pixel brightness value.
  2. 如权利要求1所述的方法,其特征在于,所述第一随机数据为随机正浮点数。The method of claim 1, wherein the first random data is a random positive floating point number.
  3. 如权利要求1所述的方法,其特征在于,基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:The method of claim 1, wherein performing gamma correction on the second pixel brightness value based on the first gamma correction parameter includes:
    通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。By multiplying the first gamma correction parameter and the second pixel brightness value, the corrected brightness value is obtained.
  4. 一种图像解密方法,其特征在于,包括:获得第一随机数据、第一伽马校正参数以及第三像素亮度值;An image decryption method, characterized in that it includes: obtaining first random data, a first gamma correction parameter, and a third pixel brightness value;
    基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;Restore the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
    对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The first pixel brightness value is denormalized to generate a gamma-corrected brightness value.
  5. 如权利要求1所述的方法,其特征在于,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值,包括:基于公式
    Figure PCTCN2019121557-appb-100001
    进行还原出第一像素亮度值;
    The method of claim 1, wherein restoring the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value includes: based on a formula
    Figure PCTCN2019121557-appb-100001
    Restore the brightness value of the first pixel;
    其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value.
  6. 如权利要求4或5所述的方法,其特征在于,所述第一随机数据为随机正浮点数。The method according to claim 4 or 5, wherein the first random data is a random positive floating point number.
  7. 一种图像加密与校正装置,其特征在于,包括:An image encryption and correction device, characterized in that it includes:
    归一化模块,对亮度像素进行归一化处理生成第一像素亮度值;The normalization module performs normalization processing on the brightness pixels to generate the first pixel brightness value;
    加密模块,基于加密密钥随机生成第一随机数据,基于第一随机数据与第一像素亮度值生成加密后的第二像素亮度值;The encryption module randomly generates first random data based on the encryption key, and generates an encrypted second pixel brightness value based on the first random data and the first pixel brightness value;
    伽马校正模块,基于第一伽马校正参数对第二像素亮度值进行伽马校正得到 第三像素亮度值;The gamma correction module performs gamma correction on the second pixel brightness value based on the first gamma correction parameter to obtain the third pixel brightness value;
    所述基于第一随机数据与第一像素亮度值的生成加密后的第二像素亮度值,包括:对第一随机数据与第一像素亮度值的乘积进行对数运算,从而生成加密后的第二像素亮度值。The generating the encrypted second pixel brightness value based on the first random data and the first pixel brightness value includes: performing a logarithm operation on the product of the first random data and the first pixel brightness value to generate the encrypted first Two pixel brightness value.
  8. 如权利要求7所述的图像加密与校正装置,其特征在于,所述第一随机数据为随机正浮点数。The image encryption and correction device according to claim 7, wherein the first random data is a random positive floating point number.
  9. 如权利要求7所述的图像加密与校正装置,其特征在于,基于第一伽马校正参数对第二像素亮度值进行伽马校正,包括:The image encryption and correction device according to claim 7, wherein performing gamma correction on the brightness value of the second pixel based on the first gamma correction parameter includes:
    通过第一伽马校正参数与第二像素亮度值相乘,获得校正后的亮度值。By multiplying the first gamma correction parameter and the second pixel brightness value, the corrected brightness value is obtained.
  10. 一种图像解密装置,其特征在于,包括:An image decryption device, characterized in that it includes:
    第一获取模块,获得第一随机数据、第一伽马校正参数以及第三像素亮度值;The first obtaining module obtains the first random data, the first gamma correction parameter, and the third pixel brightness value;
    还原模块,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值;The restoration module restores the first pixel brightness value based on the first random data, the first gamma correction parameter, and the third pixel brightness value;
    去归一化模块,对第一像素亮度值进行去归一化处理,生成伽马校正后的亮度值。The de-normalization module performs de-normalization processing on the luminance value of the first pixel to generate a gamma-corrected luminance value.
  11. 如权利要求10所述的图像解密装置,其特征在于,基于第一随机数据、第一伽马校正参数以及第三像素亮度值还原出第一像素亮度值,包括:基于公式
    Figure PCTCN2019121557-appb-100002
    进行还原出第一像素亮度值;
    The image decryption device according to claim 10, wherein the first pixel brightness value is restored based on the first random data, the first gamma correction parameter, and the third pixel brightness value, including: based on the formula
    Figure PCTCN2019121557-appb-100002
    Restore the brightness value of the first pixel;
    其中,γ为第一伽马校正参数,n为第一随机数据,z为第三像素亮度值。6、Where γ is the first gamma correction parameter, n is the first random data, and z is the third pixel brightness value. 6.
  12. 如权利要求10或11所述的图像解密装置,其特征在于,所述第一随机数据为随机正浮点数。The image decryption device according to claim 10 or 11, wherein the first random data is a random positive floating point number.
  13. 一种图像加密与校正系统,其特征在于,包括:所述系统包括由权利要求7-9任一项所述的图像加密与校正装置以及权利要求10-12任一项所述的图像解密装置。An image encryption and correction system, characterized in that the system includes the image encryption and correction device according to any one of claims 7-9 and the image decryption device according to any one of claims 10-12 .
PCT/CN2019/121557 2018-12-06 2019-11-28 Image encryption and correction method and device, and image decryption method and device WO2020114308A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811488248.1A CN111294480B (en) 2018-12-06 2018-12-06 Image encryption and correction method and device and image decryption method and device
CN201811488248.1 2018-12-06

Publications (1)

Publication Number Publication Date
WO2020114308A1 true WO2020114308A1 (en) 2020-06-11

Family

ID=70975190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/121557 WO2020114308A1 (en) 2018-12-06 2019-11-28 Image encryption and correction method and device, and image decryption method and device

Country Status (2)

Country Link
CN (1) CN111294480B (en)
WO (1) WO2020114308A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572913B (en) * 2021-01-18 2022-08-05 腾讯科技(深圳)有限公司 Image encryption method, device, medium and electronic equipment
CN114513305B (en) * 2022-04-18 2022-07-22 南昌工学院 Art painting image processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450495A (en) * 2002-03-29 2003-10-22 佳能株式会社 Image process device and method
US20160000301A1 (en) * 2014-07-02 2016-01-07 Xenocor, Inc. Borescopes and related methods and systems
CN105814874A (en) * 2013-12-11 2016-07-27 来特荣国际有限公司 Super-resolution processing method for tv video images, super-resolution processing device for tv video images that is used in same method, first to fourteenth super-resolution processing programs, and first to fourth storage media
CN105830134A (en) * 2013-12-16 2016-08-03 来特荣国际有限公司 Method and device for compressing and expanding image intended for encrypted communication, program, and storage medium
CN105900421A (en) * 2014-01-07 2016-08-24 杜比实验室特许公司 Techniques for encoding, decoding and representing high dynamic range images

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004015547A (en) * 2002-06-07 2004-01-15 Canon Inc Image encrypting device, image encrypting method, decrypting device, decrypting method, program, and storage medium
CN102196320B (en) * 2011-04-15 2013-02-27 江苏省现代企业信息化应用支撑软件工程技术研发中心 Image encrypting and decrypting system
CN108230219B (en) * 2016-12-09 2021-10-29 中国科学院深圳先进技术研究院 Method and system for enhancing JPEG image contrast of encrypted domain
CN109614808B (en) * 2018-12-12 2022-09-06 苏州科技大学 Gray level image encryption and decryption method based on linear canonical transformation and gamma function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450495A (en) * 2002-03-29 2003-10-22 佳能株式会社 Image process device and method
CN105814874A (en) * 2013-12-11 2016-07-27 来特荣国际有限公司 Super-resolution processing method for tv video images, super-resolution processing device for tv video images that is used in same method, first to fourteenth super-resolution processing programs, and first to fourth storage media
CN105830134A (en) * 2013-12-16 2016-08-03 来特荣国际有限公司 Method and device for compressing and expanding image intended for encrypted communication, program, and storage medium
CN105900421A (en) * 2014-01-07 2016-08-24 杜比实验室特许公司 Techniques for encoding, decoding and representing high dynamic range images
US20160000301A1 (en) * 2014-07-02 2016-01-07 Xenocor, Inc. Borescopes and related methods and systems

Also Published As

Publication number Publication date
CN111294480B (en) 2021-04-16
CN111294480A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
US20210312334A1 (en) Model parameter training method, apparatus, and device based on federation learning, and medium
CN106716914B (en) Secure key management for roaming protected content
KR101030354B1 (en) Methods and systems for authentication of components in a graphics system
WO2020114308A1 (en) Image encryption and correction method and device, and image decryption method and device
TWI692743B (en) A color image authentication method and computer program product based on palette compression technique
CN112054900A (en) Ciphertext domain reversible information hiding method and software and hardware application system
KR20170097509A (en) Operation method based on white-box cryptography and security apparatus for performing the method
US9225514B2 (en) Method for image encryption and decryption incorporating physiological features and image capture device thereof
Mishra et al. An edge based image steganography with compression and encryption
CN112866216B (en) Method and system for encrypting file
CN105279443A (en) Picture encrypting and decrypting methods and devices
CN116756750A (en) Medical sensitive data acquisition desensitization method
WO2023087704A1 (en) Traceable picture authorization method and apparatus
Yang et al. Achieve thumbnail preserving encryption by sum preserving approaches for images
KR102319699B1 (en) White box cryptographic encoding device and method using anti-inversion function
CN114448687A (en) Image file encryption method and system based on RSA
CN109756459B (en) Data processing method, data identification method, data processing device, data identification device, and data processing medium
Hu et al. Reversible secret image sharing with steganography and dynamic embedding
Mantoro et al. Stegano-image as a digital signature to improve security authentication system in mobile computing
WO2020119645A1 (en) Image encryption method and device, and image decryption method and device
CN114422651B (en) Image information hiding method, tracing method, hiding device and tracing device
CN115134473B (en) Image encryption method and device
WO2017130711A1 (en) Electronic signature management system
Liu et al. Homomorphic visual cryptography.
CN117411648A (en) Data security system and data processing method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19894176

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.11.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19894176

Country of ref document: EP

Kind code of ref document: A1