[go: up one dir, main page]

CN114513305B - A kind of art painting image processing method and device - Google Patents

A kind of art painting image processing method and device Download PDF

Info

Publication number
CN114513305B
CN114513305B CN202210406097.0A CN202210406097A CN114513305B CN 114513305 B CN114513305 B CN 114513305B CN 202210406097 A CN202210406097 A CN 202210406097A CN 114513305 B CN114513305 B CN 114513305B
Authority
CN
China
Prior art keywords
image
encrypted
channel
original
art drawing
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
Application number
CN202210406097.0A
Other languages
Chinese (zh)
Other versions
CN114513305A (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.)
Nanchang Institute of Technology
Original Assignee
Nanchang Institute of 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 Nanchang Institute of Technology filed Critical Nanchang Institute of Technology
Priority to CN202210406097.0A priority Critical patent/CN114513305B/en
Publication of CN114513305A publication Critical patent/CN114513305A/en
Application granted granted Critical
Publication of CN114513305B publication Critical patent/CN114513305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了美术绘画图像处理方法、装置,通过获取美术绘画的原始图像信息,并转换为YUV通道图像;美术绘画图像基于图像扫描获取;原始图像信息包括原始图像以及所属用户ID;根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;依次对所述第一图像加密生成加密后的第二图像;将加密后的第二图像覆盖原始YUV通道图像中的奇数列、偶数行的Y通道向量以生成加密的Y通道图像,并基于加密的Y通道图像与原始YUV通道图像的UV通道图像合并,生成加密后的美术绘画图像;且对于用户ID开放对应的加密信息,使得加密后的美术作品图像不影响电子观赏效果且确保了加密信息的形成,保证安全。

Figure 202210406097

The invention discloses a method and a device for processing an image of an art painting. By acquiring the original image information of the art painting and converting it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID; Extract the Y channel vector from the channel image, and generate a first image based on the Y channel vector of the odd-numbered columns and even-numbered rows of the image; encrypt the first image in turn to generate an encrypted second image; cover the encrypted second image with the original YUV The Y channel vector of odd-numbered columns and even-numbered rows in the channel image is used to generate an encrypted Y-channel image, and based on the encrypted Y-channel image and the UV-channel image of the original YUV-channel image, an encrypted art painting image is generated; and for the user The ID opens the corresponding encrypted information, so that the encrypted artwork image does not affect the electronic viewing effect, and the formation of encrypted information is ensured and security is ensured.

Figure 202210406097

Description

一种美术绘画图像处理方法、装置A kind of art painting image processing method and device

技术领域technical field

本发明属于图像处理领域,具体涉及一种美术绘画图像处理方法、装置。The invention belongs to the field of image processing, and in particular relates to a method and a device for processing art painting images.

背景技术Background technique

绘画在艺术层面上,是一个以表面作为支撑面,再在其之上加上颜色的行为,那些表面的例子有纸张、油画布、木材、玻璃、漆器或混凝土等。在艺术用语的层面上,绘画的意义亦包含利用此艺术行为再加上图形、构图及其他美学方法去达到表现出从事者希望表达的概念及意思。At the artistic level, painting is the act of using a surface as a support and adding color to it. Examples of those surfaces are paper, canvas, wood, glass, lacquer or concrete. At the level of artistic terminology, the meaning of painting also includes the use of this artistic behavior plus graphics, composition and other aesthetic methods to achieve the concept and meaning that the practitioner wishes to express.

现有技术中一般将优秀的绘画作品进行扫描形成电子版,具体地,其一般是通过将欲扫描的原稿正面朝下铺在扫描仪的玻璃板上,原稿可以是文字稿件或者图纸照片;然后启动扫描仪驱动程序后,安装在扫描仪内部的可移动光源开始扫描原稿;为了均匀照亮稿件,扫描仪光源为长条形,并沿y方向扫过整个原稿;照射到原稿上的光线经反射后穿过一个很窄的缝隙,形成沿x方向的光带,又经过一组反光镜,由光学透镜聚焦并进入分光镜,经过棱镜和红绿蓝三色滤色镜得到的RGB三条彩色光带分别照到各自的CCD上,CCD将RGB光带转变为模拟电子信号,此信号又被A/D变换器转变为数字电子信号。但是,这样的电子版优秀作品具有版权,传输或者存储时需要进行加密,尤其是对于名画等作品,极其对于加密要求高,且不能过多影响绘画显示的质量;且通过确认当前登录用户的ID,对其执行自动解密操作对应于登录用户的ID所对应的加密图像,从而实现对于版权用户自动解密开放。In the prior art, excellent paintings are generally scanned to form an electronic version. Specifically, it is generally by laying the manuscript to be scanned face down on the glass plate of the scanner. The manuscript can be a text manuscript or a drawing photo; then After starting the scanner driver, the movable light source installed inside the scanner starts to scan the original; in order to evenly illuminate the manuscript, the scanner light source is a long strip and sweeps the entire original in the y direction; the light irradiated on the original is After reflection, it passes through a very narrow gap to form a light band along the x-direction, and then passes through a group of reflectors, is focused by an optical lens and enters the beam splitter, and passes through a prism and red, green, and blue three color filters. The CCD converts the RGB light band into an analog electronic signal, and the signal is converted into a digital electronic signal by the A/D converter. However, such excellent works in electronic version have copyright and need to be encrypted during transmission or storage, especially for famous paintings and other works, which have extremely high requirements for encryption, and cannot greatly affect the quality of the painting display; and by confirming the ID of the currently logged-in user , performing an automatic decryption operation on it corresponds to the encrypted image corresponding to the ID of the logged-in user, thereby realizing automatic decryption and opening for copyright users.

发明内容SUMMARY OF THE INVENTION

本发明的主要目的在于提出一种美术绘画图像处理方法、装置,旨在解决上述存在的美术绘画作品不利于加密存储或传输,以及加密过易破解,以及加密后影响图像质量的技术问题。The main purpose of the present invention is to propose an art painting image processing method and device, which aims to solve the above-mentioned technical problems that art painting works are not conducive to encrypted storage or transmission, and that the encryption is too easy to crack, and the image quality is affected after encryption.

为了实现上述目的,提出一种美术绘画图像处理方法,所述方法包括:In order to achieve the above purpose, a method for processing art painting images is proposed, the method comprising:

S1,获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;S1, obtain the original image information of art painting, and convert it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID;

S2,根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;S2, extract the Y channel vector according to the original YUV channel image, and generate the first image based on the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

S3,设置加密密钥X,生成随机数n,依次对所述第一图像的每个像素x执行加密得到c,从而生成加密后的第二图像;S3, set an encryption key X, generate a random number n, and perform encryption on each pixel x of the first image in turn to obtain c, thereby generating an encrypted second image;

其中,加密公式为:Among them, the encryption formula is:

Figure 100002_DEST_PATH_IMAGE002
Figure 100002_DEST_PATH_IMAGE002

其中,

Figure 100002_DEST_PATH_IMAGE004
取值为255;in,
Figure 100002_DEST_PATH_IMAGE004
The value is 255;

S4,将所述加密后的第二图像覆盖原始YUV通道图像中的Y通道的奇数列、偶数行像素以生成加密的Y通道图像,并基于加密的Y通道图像与原始YUV通道图像的UV通道图像合并,生成加密后的美术绘画图像。S4, covering the odd-numbered columns and even-numbered rows of pixels of the Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and based on the encrypted Y channel image and the UV channel of the original YUV channel image Image merging to generate encrypted art painting images.

优选的,所述方法还包括:S5,将加密后的美术绘画图像执行本地存储和/或发送至服务器。Preferably, the method further includes: S5, locally storing and/or sending the encrypted art painting image to the server.

优选的,所述方法还包括:所述设置加密密钥X,生成随机数n,包括:Preferably, the method further includes: the setting of the encryption key X and the generation of the random number n include:

基于加密密钥X,产生一个取值为0或1的二值序列;从所述二值序列中随机选择一个数字,作为随机数n。Based on the encryption key X, a binary sequence with a value of 0 or 1 is generated; a number is randomly selected from the binary sequence as a random number n.

优选的,所述将加密后的美术绘画图像执行本地存储和/或发送至服务器,包括:将加密后的图像、加密的像素描述信息、所属用户ID以及加密密钥X,进行对应存储;所述加密的像素描述信息包括图像奇数列、偶数行的Y通道向量;Preferably, performing local storage and/or sending the encrypted art painting image to the server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the user ID and the encryption key X; The encrypted pixel description information includes the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

通过确认当前登录用户的ID,对其执行自动解密操作对应于登录用户的ID所对应的加密图像;By confirming the ID of the currently logged-in user, performing an automatic decryption operation on it corresponds to the encrypted image corresponding to the ID of the logged-in user;

其中,所述解密操作为加密操作的逆过程,具体为:Wherein, the decryption operation is the inverse process of the encryption operation, specifically:

Figure 100002_DEST_PATH_IMAGE006
Figure 100002_DEST_PATH_IMAGE006
.

此外,本实施例,还提出一种美术绘画图像处理装置,所述装置包括:In addition, this embodiment also proposes a device for processing an image of an art painting, the device comprising:

获取模块,获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;The acquisition module obtains the original image information of the art painting and converts it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID;

第一生成模块,根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;The first generation module extracts the Y channel vector according to the original YUV channel image, and generates the first image based on the Y channel vector of the odd column and even row of the image;

加密模块,设置加密密钥X,生成随机数n,依次对所述第一图像的每个像素x执行加密得到c,从而生成加密后的第二图像;an encryption module, setting an encryption key X, generating a random number n, and performing encryption on each pixel x of the first image in turn to obtain c, thereby generating an encrypted second image;

其中,加密公式为:Among them, the encryption formula is:

Figure 100002_DEST_PATH_IMAGE008
Figure 100002_DEST_PATH_IMAGE008

其中,

Figure 100002_DEST_PATH_IMAGE004A
取值为255;in,
Figure 100002_DEST_PATH_IMAGE004A
The value is 255;

第二生成模块,将所述加密后的第二图像覆盖原始YUV通道图像中的Y通道的奇数列、偶数行像素以生成加密的Y通道图像,并基于加密的Y通道图像与原始YUV通道图像的UV通道图像合并,生成加密后的美术绘画图像。The second generation module covers odd-numbered columns and even-numbered rows of pixels of the Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and generates an encrypted Y channel image based on the encrypted Y channel image and the original YUV channel image. The UV channel images are merged to generate an encrypted art painting image.

优选的,所述装置还包括:存储模块,将加密后的美术绘画图像执行本地存储和/或发送至服务器。Preferably, the device further includes: a storage module, which locally stores and/or sends the encrypted art painting image to the server.

优选的,所述装置还包括:所述设置加密密钥X,生成随机数n,包括:Preferably, the device further includes: the setting of the encryption key X and the generation of the random number n include:

基于加密密钥X,产生一个取值为0或1的二值序列;从所述二值序列中随机选择一个数字,作为随机数n。Based on the encryption key X, a binary sequence with a value of 0 or 1 is generated; a number is randomly selected from the binary sequence as a random number n.

优选的,所述将加密后的美术绘画图像执行本地存储和/或发送至服务器,包括:将加密后的图像、加密的像素描述信息、所属用户ID以及加密密钥X,进行对应存储;所述加密的像素描述信息包括图像奇数列、偶数行的Y通道向量;Preferably, performing local storage and/or sending the encrypted art painting image to the server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the user ID and the encryption key X; The encrypted pixel description information includes the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

通过确认当前登录用户的ID,对其执行自动解密操作对应于登录用户的ID所对应的加密图像;By confirming the ID of the currently logged-in user, performing an automatic decryption operation on it corresponds to the encrypted image corresponding to the ID of the logged-in user;

其中,所述解密操作具体为:Wherein, the decryption operation is specifically:

Figure 100002_DEST_PATH_IMAGE010
Figure 100002_DEST_PATH_IMAGE010
.

此外,还提出一种电子装置,包括处理器以及存储器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行以实现如上述所述的美术绘画图像处理方法。In addition, an electronic device is also proposed, which includes a processor and a memory, where the memory stores a computer program, and the computer program is executed by the processor to realize the above-mentioned method for processing art painting images.

此外,还提出一种计算机存储介质,所述计算机存储介质存储有程序;所述程序由处理器加载并执行以实现如上述所述的美术绘画图像处理方法。In addition, a computer storage medium is also proposed, wherein the computer storage medium stores a program; the program is loaded and executed by a processor to realize the above-mentioned method for processing art painting images.

本发明所提供的美术绘画图像处理方法、装置,通过获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;设置加密密钥X,生成随机数n,并基于加密公式依次对所述第一图像的每个像素执行加密得到c,从而生成加密后的第二图像;将所述加密后的第二图像与原始图像的偶数列、奇数行的Y通道向量先进行合并生成加密的Y通道图像,并基于加密的Y通道图像与原始图像的UV通道图像合并,生成加密后的美术绘画图像。本发明通过选择性对于Y通道图像的局部行列进行更为随机的加密算法处理,且对于用户ID开放对应的加密信息,从而保证了加密后的美术作品图像不影响电子观赏效果且确保了加密信息的形成,保证了安全。且本发明,通过对于加密算法进行了改进,而且仅仅对于Y通道图像的部分行执行加密,极大的保护了图像的整体画面感,且完成了高效加密。The art painting image processing method and device provided by the present invention obtain the original image information of the art painting and convert it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID; extract the Y channel vector according to the original YUV channel image, and generate the first image based on the Y channel vector of the odd column and even row of the image; set the encryption key X, generate the random number n, and sequentially perform the first image based on the encryption formula Each pixel of the image is encrypted to obtain c, thereby generating an encrypted second image; the encrypted second image is combined with the Y channel vectors of the even columns and odd rows of the original image to generate an encrypted Y channel image. , and combine the encrypted Y channel image with the UV channel image of the original image to generate an encrypted art painting image. The present invention selectively processes the local rows and columns of the Y channel image with a more random encryption algorithm, and opens the corresponding encryption information for the user ID, thereby ensuring that the encrypted artwork image does not affect the electronic viewing effect and ensuring the encryption information. formation to ensure safety. In addition, the present invention improves the encryption algorithm and only performs encryption on part of the lines of the Y channel image, which greatly protects the overall picture sense of the image and completes efficient encryption.

附图说明Description of drawings

图1为本发明实施例一美术绘画图像处理方法的流程图;1 is a flowchart of a method for processing an art painting image according to an embodiment of the present invention;

图2为本发明实施例一美术绘画图像处理装置的结构示意图。FIG. 2 is a schematic structural diagram of an image processing apparatus for art painting according to an embodiment of the present invention.

具体实施方式Detailed ways

以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明,并且在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, but not to limit the present invention, and in the case of no conflict, the present invention The embodiments in and features in the embodiments can be combined with each other.

实施例一Example 1

参照图1,图1是本实施例美术绘画图像处理方法的流程图,本实施例中,所述方法包括:Referring to FIG. 1, FIG. 1 is a flowchart of a method for processing an art painting image in this embodiment. In this embodiment, the method includes:

S1,获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;S1, obtain the original image information of art painting, and convert it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID;

S2,根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;S2, extract the Y channel vector according to the original YUV channel image, and generate the first image based on the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

S3,设置加密密钥X,生成随机数n,依次对所述第一图像的每个像素x执行加密得到c,从而生成加密后的第二图像;S3, set an encryption key X, generate a random number n, and perform encryption on each pixel x of the first image in turn to obtain c, thereby generating an encrypted second image;

其中,加密公式为:Among them, the encryption formula is:

Figure DEST_PATH_IMAGE012
Figure DEST_PATH_IMAGE012

其中,

Figure DEST_PATH_IMAGE014
取值为255;in,
Figure DEST_PATH_IMAGE014
The value is 255;

S4,将所述加密后的第二图像覆盖原始YUV通道图像中的Y通道的奇数列、偶数行像素以生成加密的Y通道图像,并基于加密的Y通道图像与原始YUV通道图像的UV通道图像合并,生成加密后的美术绘画图像。S4, covering the odd-numbered columns and even-numbered rows of pixels of the Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and based on the encrypted Y channel image and the UV channel of the original YUV channel image Image merging to generate encrypted art painting images.

优选的,所述方法还包括:S5,将加密后的美术绘画图像执行本地存储和/或发送至服务器。Preferably, the method further includes: S5, locally storing and/or sending the encrypted art painting image to the server.

优选的,所述方法还包括:所述设置加密密钥X,生成随机数n,包括:Preferably, the method further includes: the setting of the encryption key X and the generation of the random number n include:

基于加密密钥X,产生一个取值为0或1的二值序列;从所述二值序列中随机选择一个数字,作为随机数n。Based on the encryption key X, a binary sequence with a value of 0 or 1 is generated; a number is randomly selected from the binary sequence as a random number n.

优选的,所述将加密后的美术绘画图像执行本地存储和/或发送至服务器,包括:将加密后的图像、加密的像素描述信息、所属用户ID以及加密密钥X,进行对应存储;所述加密的像素描述信息包括图像奇数列、偶数行的Y通道向量;Preferably, performing local storage and/or sending the encrypted art painting image to the server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the user ID and the encryption key X; The encrypted pixel description information includes the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

通过确认当前登录用户的ID,对其执行自动解密操作对应于登录用户的ID所对应的加密图像;By confirming the ID of the currently logged-in user, performing an automatic decryption operation on it corresponds to the encrypted image corresponding to the ID of the logged-in user;

其中,所述解密操作具体为:Wherein, the decryption operation is specifically:

Figure DEST_PATH_IMAGE016
Figure DEST_PATH_IMAGE016
.

此外,还提出一种美术绘画图像处理装置,所述方法包括:In addition, an art painting image processing device is also proposed, and the method includes:

获取模块10,获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;The acquisition module 10 acquires the original image information of the art painting, and converts it into a YUV channel image; the art painting image is obtained based on image scanning; the original image information includes the original image and the user ID;

第一生成模块20,根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;The first generation module 20 extracts the Y channel vector according to the original YUV channel image, and generates the first image based on the Y channel vector of the odd column and even row of the image;

加密模块30,设置加密密钥X,生成随机数n,并基于如下公式依次对所述第一图像的每个像素x执行加密得到c,从而生成加密后的第二图像;The encryption module 30 sets an encryption key X, generates a random number n, and sequentially encrypts each pixel x of the first image based on the following formula to obtain c, thereby generating an encrypted second image;

Figure DEST_PATH_IMAGE018
Figure DEST_PATH_IMAGE018

其中,

Figure DEST_PATH_IMAGE020
取值为255;in,
Figure DEST_PATH_IMAGE020
The value is 255;

具体地,本实施例,可以基于rand()函数来生成随机数。Specifically, in this embodiment, a random number may be generated based on the rand() function.

第二生成模块40,将所述加密后的第二图像覆盖原始YUV通道图像中的Y通道的奇数列、偶数行像素以生成加密的Y通道图像,并基于加密的Y通道图像与原始YUV通道图像的UV通道图像合并,生成加密后的美术绘画图像。The second generation module 40 covers odd-numbered columns and even-numbered rows of pixels of the Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and generates an encrypted Y channel image based on the encrypted Y channel image and the original YUV channel. The image's UV channel image is merged to generate an encrypted art painting image.

优选的,所述装置还包括:存储模块,将加密后的美术绘画图像执行本地存储和/或发送至服务器。Preferably, the device further includes: a storage module, which locally stores and/or sends the encrypted art painting image to the server.

优选的,所述装置还包括:所述设置加密密钥X,生成随机数n,包括:Preferably, the device further includes: the setting of the encryption key X and the generation of the random number n include:

基于加密密钥X,产生一个取值为0或1的二值序列;从所述二值序列中随机选择一个数字,作为随机数n。Based on the encryption key X, a binary sequence with a value of 0 or 1 is generated; a number is randomly selected from the binary sequence as a random number n.

优选的,所述将加密后的美术绘画图像执行本地存储和/或发送至服务器,包括:将加密后的图像、加密的像素描述信息、所属用户ID以及加密密钥X,进行对应存储;所述加密的像素描述信息包括图像奇数列、偶数行的Y通道向量;Preferably, performing local storage and/or sending the encrypted art painting image to the server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the user ID and the encryption key X; The encrypted pixel description information includes the Y channel vector of the odd-numbered columns and even-numbered rows of the image;

通过确认当前登录用户的ID,对其执行自动解密操作对应于登录用户的ID所对应的加密图像;By confirming the ID of the currently logged-in user, performing an automatic decryption operation on it corresponds to the encrypted image corresponding to the ID of the logged-in user;

其中,所述解密操作具体为:Wherein, the decryption operation is specifically:

Figure DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE022
.

此外,还提出一种电子装置,包括处理器以及存储器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行以实现如上述所述的美术绘画图像处理方法。In addition, an electronic device is also proposed, which includes a processor and a memory, where the memory stores a computer program, and the computer program is executed by the processor to realize the above-mentioned method for processing art painting images.

此外,还提出一种计算机存储介质,所述计算机存储介质存储有程序;所述程序由处理器加载并执行以实现如上述所述的美术绘画图像处理方法。In addition, a computer storage medium is also proposed, wherein the computer storage medium stores a program; the program is loaded and executed by a processor to realize the above-mentioned method for processing art painting images.

在本发明上述实施例的方案中,所提供的美术绘画图像处理方法、装置,通过获取美术绘画的原始图像信息,并转换为YUV通道图像;所述美术绘画图像基于图像扫描获取;所述原始图像信息包括原始图像以及所属用户ID;根据原始YUV通道图像提取Y通道向量,并基于图像奇数列、偶数行的Y通道向量生成第一图像;设置加密密钥X,生成随机数n,并基于加密公式依次对所述第一图像的每个像素执行加密得到c,从而生成加密后的第二图像;将所述加密后的第二图像与原始图像的偶数列、奇数行的Y通道向量先进行合并生成加密的Y通道图像,并基于加密的Y通道图像与原始图像的UV通道图像合并,生成加密后的美术绘画图像。本发明通过选择性对于Y通道图像的局部行列进行更为随机的加密算法处理,且对于用户ID开放对应的加密信息,从而保证了加密后的美术作品图像不影响电子观赏效果且确保了加密信息的形成,保证了安全。In the solution of the above embodiment of the present invention, the provided art painting image processing method and device obtain the original image information of art painting and convert it into a YUV channel image; the art painting image is obtained based on image scanning; the original The image information includes the original image and the user ID to which it belongs; the Y channel vector is extracted from the original YUV channel image, and the first image is generated based on the Y channel vector of the odd column and even row of the image; the encryption key X is set, the random number n is generated, and a random number n is generated based on the image. The encryption formula performs encryption on each pixel of the first image in turn to obtain c, thereby generating an encrypted second image; the encrypted second image and the Y channel vectors of the even columns and odd rows of the original image are first Perform merging to generate an encrypted Y channel image, and combine the encrypted Y channel image with the UV channel image of the original image to generate an encrypted art painting image. The present invention selectively processes the local rows and columns of the Y channel image with a more random encryption algorithm, and opens the corresponding encryption information for the user ID, thereby ensuring that the encrypted artwork image does not affect the electronic viewing effect and ensuring the encryption information. formation to ensure safety.

需要说明的是,应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现。也可以全部以硬件的形式实现。还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。It should be noted that it should be understood that the division of each module of the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated. And these modules can all be implemented in the form of software calling through processing elements. All can also be implemented in the form of hardware. Some modules can also be implemented in the form of calling software through processing elements, and some modules can be implemented in the form of hardware.

上文已对基本概念做了描述,显然,对于本领域技术人员来说,上述详细披露仅仅作为示例,而并不构成对本说明书的限定。虽然此处并没有明确说明,本领域技术人员可能会对本说明书进行各种修改、改进和偏移处理。该类修改、改进和偏移处理在本说明书中被建议,所以该类修改、改进、偏移处理仍属于本说明书示范实施例的精神和范围。The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is merely an example, and does not constitute a limitation of the present specification. Although not explicitly described herein, various modifications, improvements and offsets of this specification may occur to those skilled in the art. Such modifications, improvements, and offset processing are suggested in this specification, so such modifications, improvements, and offset processing still fall within the spirit and scope of the exemplary embodiments of this specification.

此外,本领域技术人员可以理解,本说明书的各方面可以通过若干具有可专利性的种类或情况进行说明和描述,包括任何新的和有用的工序、机器、产品或物质的组合,或对它们的任何新的和有用的改进。相应地,本说明书的各个方面可以完全由硬件执行、可以完全由软件(包括固件、常驻软件、微码等)执行、也可以由硬件和软件组合执行。以上硬件或软件均可被称为“数据块”、“模块”、“引擎”、“单元”、“组件”或“系统”。此外,本说明书的各方面可能表现为位于一个或多个计算机可读介质中的计算机产品,该产品包括计算机可读程序编码。Furthermore, those skilled in the art will appreciate that aspects of this specification may be illustrated and described in several patentable classes or situations, including any new and useful process, machine, product, or combination of matter, or combinations of them of any new and useful improvements. Accordingly, various aspects of this specification may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as a "data block", "module", "engine", "unit", "component" or "system". Furthermore, aspects of this specification may be embodied as a computer product comprising computer readable program code embodied in one or more computer readable media.

需要说明的是,如果本说明书附属材料中的描述、定义、和/或术语的使用与本说明书所述内容有不一致或冲突的地方,以本说明书的描述、定义和/或术语的使用为准。It should be noted that, if there is any inconsistency or conflict between the descriptions, definitions and/or use of terms in the accompanying materials of this specification and the contents of this specification, the descriptions, definitions and/or use of terms in this specification shall prevail .

最后,应当理解的是,本说明书中所述实施例仅用以说明本说明书实施例的原则。其它的变形也可能属于本说明书的范围。因此,作为示例而非限制,本说明书实施例的替代配置可视为与本说明书的教导一致。相应地,本说明书的实施例不仅限于本说明书明确介绍和描述的实施例。Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations are also possible within the scope of this specification. Accordingly, by way of example and not limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to those expressly introduced and described in this specification.

Claims (6)

1. An image processing method for art painting, the method comprising:
s1, acquiring original image information of art painting, and converting the original image information into a YUV channel image; the art drawing image is obtained based on image scanning; the original image information comprises an original image and a user ID;
s2, extracting a Y-channel vector according to the original YUV-channel image, and generating a first image based on the Y-channel vectors of odd columns and even rows of the image;
s3, setting an encryption key X, generating a random number n, and sequentially encrypting each pixel X of the first image to obtain c, thereby generating an encrypted second image;
wherein, the encryption formula is:
Figure DEST_PATH_IMAGE002
wherein,
Figure DEST_PATH_IMAGE004
the value is 255;
s4, covering odd-numbered columns and even-numbered rows of pixels of a Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and combining the encrypted Y channel image with the UV channel image of the original YUV channel image to generate an encrypted art drawing image;
s5, locally storing the encrypted art drawing image and/or sending the encrypted art drawing image to a server;
the setting of the encryption key X to generate the random number n includes:
generating a binary sequence with a value of 0 or 1 based on the encryption key X; randomly selecting a number from the binary sequence as a random number n.
2. The art drawing image processing method according to claim 1, wherein the performing local storage and/or sending of the encrypted art drawing image to a server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the belonged user ID and the encryption key X; the encrypted pixel description information comprises Y-channel vectors of odd columns and even rows of the image;
executing automatic decryption operation on the ID of the current login user by confirming the ID of the current login user, wherein the automatic decryption operation corresponds to the encrypted image corresponding to the ID of the login user;
wherein the decryption operation specifically comprises:
Figure DEST_PATH_IMAGE006
3. an apparatus for processing an image for art painting, the apparatus comprising:
the acquisition module acquires original image information of art painting and converts the original image information into a YUV channel image; the art drawing image is obtained based on image scanning; the original image information comprises an original image and a user ID;
the first generation module extracts a Y-channel vector according to the original YUV channel image and generates a first image based on the Y-channel vectors of odd columns and even rows of the image;
the encryption module is used for setting an encryption key X, generating a random number n, and sequentially encrypting each pixel X of the first image based on the following formula to obtain c, so that an encrypted second image is generated;
Figure DEST_PATH_IMAGE008
wherein,
Figure DEST_PATH_IMAGE004A
the value is 255;
the second generation module is used for covering odd-numbered columns and even-numbered rows of pixels of a Y channel in the original YUV channel image with the encrypted second image to generate an encrypted Y channel image, and combining the encrypted Y channel image with the UV channel image of the original YUV channel image to generate an encrypted art drawing image; the storage module is used for executing local storage on the encrypted art drawing image and/or sending the encrypted art drawing image to a server;
the setting of the encryption key X to generate the random number n includes:
generating a binary sequence with a value of 0 or 1 based on the encryption key X; randomly selecting a number from the binary sequence as a random number n.
4. The art drawing image processing apparatus according to claim 3, wherein the performing of the local storage and/or the transmission of the encrypted art drawing image to the server includes: correspondingly storing the encrypted image, the encrypted pixel description information, the belonged user ID and the encryption key X; the encrypted pixel description information comprises Y-channel vectors of odd columns and even rows of the image;
by confirming the ID of the current login user, executing automatic decryption operation on the current login user to obtain an encrypted image corresponding to the ID of the login user;
wherein the decryption operation specifically comprises:
Figure DEST_PATH_IMAGE010
5. an electronic device comprising a processor and a memory, the memory storing a computer program for execution by the processor to implement the art drawing image processing method of any one of claims 1-2.
6. A computer storage medium storing a program; the program is loaded and executed by a processor to implement the art drawing image processing method according to any one of claims 1 to 2.
CN202210406097.0A 2022-04-18 2022-04-18 A kind of art painting image processing method and device Active CN114513305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210406097.0A CN114513305B (en) 2022-04-18 2022-04-18 A kind of art painting image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210406097.0A CN114513305B (en) 2022-04-18 2022-04-18 A kind of art painting image processing method and device

Publications (2)

Publication Number Publication Date
CN114513305A CN114513305A (en) 2022-05-17
CN114513305B true CN114513305B (en) 2022-07-22

Family

ID=81555131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210406097.0A Active CN114513305B (en) 2022-04-18 2022-04-18 A kind of art painting image processing method and device

Country Status (1)

Country Link
CN (1) CN114513305B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108513135A (en) * 2017-02-27 2018-09-07 诺基亚技术有限公司 Image encryption and decryption
CN111294480A (en) * 2018-12-06 2020-06-16 中国科学院深圳先进技术研究院 Image encryption and correction method and device and image decryption method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100464584C (en) * 2006-11-21 2009-02-25 北京中星微电子有限公司 Video monitoring system and method for implementing signal encription
EP2432211B1 (en) * 2009-05-11 2017-04-26 Fujitsu Limited Image encryption/decoding device, method, and program
CN108989604B (en) * 2018-07-20 2020-05-05 京东方科技集团股份有限公司 Image encryption method, image transmission method, electronic device and readable storage medium
CN110430435B (en) * 2019-08-09 2022-04-19 广东工业大学 An image encryption method, device, sensor and readable storage medium
CN112788195B (en) * 2019-11-11 2023-08-29 阿里巴巴集团控股有限公司 Image processing method, device and equipment
CN111651775A (en) * 2020-04-29 2020-09-11 北京奇艺世纪科技有限公司 Image encryption and decryption method, device, electronic device and storage medium
CN113240569A (en) * 2021-06-18 2021-08-10 展讯通信(上海)有限公司 Fingerprint image encryption method, device and system
CN113746619B (en) * 2021-09-06 2023-05-26 济南大学 Image encryption method, decryption method and system for predefined time synchronization control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108513135A (en) * 2017-02-27 2018-09-07 诺基亚技术有限公司 Image encryption and decryption
CN111294480A (en) * 2018-12-06 2020-06-16 中国科学院深圳先进技术研究院 Image encryption and correction method and device and image decryption method and device

Also Published As

Publication number Publication date
CN114513305A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
US8588414B2 (en) Image encryption and image decryption apparatus and method
Piva An overview on image forensics
KR101627194B1 (en) Image forming apparatus and method for creating image mosaics thereof
JP5206024B2 (en) Image decryption device, image encryption device, image decryption method, and image decryption program
CN101652987B (en) Paper media information encryption system, decryption system and method for the same
US11394902B2 (en) Sparse infrared pixel design for image sensors
JP4399486B2 (en) Image processing apparatus, external storage apparatus, image forming apparatus, image transmission apparatus, image reading apparatus, image processing system, image processing method, program, and recording medium thereof
US20100316222A1 (en) Image processing system
CN102151118A (en) Image processing device, endoscope system, and image processing method
JP2011101338A (en) Picked up image processing system, image output method, program and recording medium
TW200300911A (en) Method for reading two dimensional bar codes
TW200903347A (en) Edge mapping using panchromatic pixels
JP2008271508A (en) Image processing apparatus, image forming apparatus, image transmitting device, image reading device, image processing system, image processing method, image processing program, and recording medium therefor
CN103563359A (en) Image processing device, image processing method and digital camera
US20130084004A1 (en) Image processing of data from scanned display
WO2012127578A1 (en) Image-processing device, image-processing method, and image-processing computer program
JP5340029B2 (en) Information processing apparatus and control method thereof, verification apparatus and control method thereof
JP6175905B2 (en) Information processing apparatus, information processing method, system, and program
CN114513305B (en) A kind of art painting image processing method and device
Chen et al. Design of image barcodes for future mobile advertising
CN109274855A (en) (k,n) halftone visual encryption method based on feature region
Franz et al. Steganography secure against cover-stego-attacks
JP2009259201A (en) Image processing apparatus and image forming apparatus
CN107071222A (en) A kind of image file encryption and decryption approaches of embedded spectral information
Shah Future of JPEG XT: privacy and security

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