CN111800634A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN111800634A
CN111800634A CN202010621062.XA CN202010621062A CN111800634A CN 111800634 A CN111800634 A CN 111800634A CN 202010621062 A CN202010621062 A CN 202010621062A CN 111800634 A CN111800634 A CN 111800634A
Authority
CN
China
Prior art keywords
image
sequencing
sequence
generate
encrypted
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.)
Pending
Application number
CN202010621062.XA
Other languages
Chinese (zh)
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology Co Ltd
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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010621062.XA priority Critical patent/CN111800634A/en
Publication of CN111800634A publication Critical patent/CN111800634A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/44Secrecy systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks

Abstract

The disclosure provides an image processing method and an image processing device, relates to the technical field of image processing, and can solve the problem that the calculated amount of an image sending device and an image receiving device in the image transmission process is very large. The specific technical scheme is as follows: dividing a frame image into macro blocks to generate at least one macro block and a serial number of each macro block in the at least one macro block; sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence; sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image; encrypting the sequencing sequence to generate the encrypted sequencing sequence; and sending the sequenced frame images and the encrypted sequencing sequence to an image receiving device. The invention is used for reducing the operation amount of the image sending device and the image receiving device and improving the operation efficiency of the image sending device and the image receiving device.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an image processing method and apparatus.
Background
Generally, in the process of image transmission, an image sending device encrypts an image first, and then sends the encrypted image to an image receiving device, and the image receiving device receives the encrypted image, decrypts the encrypted image, and then displays the image.
However, in the process of transmitting an image, it is necessary to first divide the macro blocks of the image, encode the divided macro blocks to generate image data code streams corresponding to the macro blocks, and then encrypt and transmit the image data code streams corresponding to the macro blocks, so that an image transmitting device needs to encrypt all the image data code streams, and correspondingly, an image receiving device also needs to decrypt all the encrypted image data code streams, and therefore, the image transmitting device and the image receiving device have a very large amount of computation in the process of transmitting an image.
Disclosure of Invention
The embodiment of the disclosure provides an image processing method and an image processing device, which can solve the problem that the calculation amount of an image sending device and an image receiving device in the image transmission process is very large. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an image processing method applied to an image transmission apparatus, the method including:
dividing a frame image into macro blocks to generate at least one macro block and a serial number of each macro block in the at least one macro block;
sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence;
sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image;
encrypting the sequencing sequence to generate the encrypted sequencing sequence;
and sending the sequenced frame images and the encrypted sequencing sequence to an image receiving device.
According to the image processing method provided by the embodiment of the disclosure, the coded macro blocks do not need to be encrypted, and only the sequencing sequence of at least one macro block needs to be encrypted, so that the data transmission safety is ensured, meanwhile, the operation amount of the image sending equipment is reduced, and the operation efficiency of the image sending equipment is improved.
In one embodiment, after the macro-block dividing the frame image, the method further includes:
converting the pixel value of the at least one macro block according to a preset conversion rule to generate a converted macro block, wherein the pixel values of the converted macro block have an association relation;
coding the transformed macro block to generate a coded macro block;
the sorting the at least one macroblock according to the sorting sequence, and generating a sorted frame image includes:
and sequencing the coded macro blocks according to the sequencing sequence to generate the sequenced frame image.
By converting the pixel value of the at least one macro block, the situation that the image is divulged due to the fact that the image is directly recovered according to the macro block in the image transmission process can be avoided, and the safety of data in the image transmission process is improved. By sequencing the coded macro blocks according to the sequencing sequence, the sequencing sequence of the at least one macro block can be reordered, the situation that the image is recovered after the at least one macro block is sequenced in sequence, so that the image is divulged is avoided, and the safety of data in the image transmission process is improved.
In one embodiment, after the transforming the pixel values of the at least one macroblock according to the preset transformation rule, the method further includes:
encrypting the identification information of the preset transformation rule to generate encrypted identification information;
and sending the encrypted identification information to the image receiving equipment.
By encrypting the identification information, the identification information can be prevented from being connected in the transmission process, and the safety of the data in the transmission process is improved.
In one embodiment, before the macro-block dividing the frame image, the method further includes:
receiving an image transmission request sent by the image receiving equipment;
in response to the image transmission request, sending a certificate acquired from a certificate authority and a first public key of the image sending device to the image receiving device, so that the image receiving device can verify whether the first public key is forged or not according to the first public key, the certificate and a second public key sent to the image receiving device by the certificate authority;
under the condition that the first public key is not forged, receiving an encrypted secret key sent by the image receiving equipment, wherein the encrypted secret key is generated by encrypting the secret key by the image receiving equipment by adopting the first public key;
decrypting the encrypted key to generate the key;
the encrypting the sorting sequence, and the generating the encrypted sorting sequence includes:
and encrypting the sequencing sequence by adopting the secret key to generate the encrypted sequencing sequence.
The validity of the image sending equipment can be verified by verifying whether the first public key is forged or not, and the secret key is encrypted and transmitted under the condition that the first public key is not forged, so that the secret key can be prevented from being cracked in the transmission process, and the safety of data in the transmission process is improved. By encrypting the sequencing sequence, the sequencing sequence can be prevented from being cracked, the situation that the image is recovered after the at least one macro block is subjected to reverse sequencing according to the sequencing sequence is further avoided, and the safety of data in the image transmission process is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an image processing method applied to an image receiving apparatus, the method including:
receiving a sequenced frame image and an encrypted sequencing sequence which are sent by an image sending device, wherein the sequenced frame image comprises at least one macro block obtained by macro block division of the frame image, and the sequenced frame image is generated by sequencing the at least one macro block according to the sequencing sequence;
decrypting the encrypted sequencing sequence to generate a sequencing sequence, wherein the sequencing sequence is generated by sequencing the serial number of the at least one macro block according to a preset sequencing rule;
reversely ordering the serial numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence;
and sequencing the at least one macro block according to the reverse sequencing sequence to generate the frame image.
According to the image processing method provided by the embodiment of the disclosure, the decoded macro blocks do not need to be decrypted, and only the sequencing sequence of at least one macro block needs to be decrypted, so that the operation amount of the image receiving device is reduced and the operation efficiency of the image receiving device is improved while the safety of data transmission is ensured.
In one embodiment, after decrypting the encrypted random sequence, the method further comprises:
decoding at least one macro block in the sequenced frame images to generate a decoded macro block;
the sorting the at least one macroblock according to the reverse sorting sequence, and generating the frame image includes:
and sequencing the decoded macro blocks according to the reverse sequencing sequence to generate the frame image.
In one embodiment, the method further comprises:
receiving encrypted identification information sent by the image sending equipment, wherein the encrypted identification information is identification information of an encrypted preset transformation rule, and the preset transformation rule is used for transforming the pixel value of the at least one macro block;
decrypting the encrypted identification information to generate identification information of the preset transformation rule;
determining a target preset transformation rule corresponding to the identification information of the preset transformation rule according to the identification information of the preset transformation rule;
the sorting the decoded macro blocks according to the reverse sorting sequence to generate the frame image includes:
sequencing the decoded macro blocks according to the reverse sequencing sequence to generate a frame image to be inversely transformed;
and performing inverse transformation on the pixel value of at least one macro block in the frame image to be inversely transformed according to the target preset transformation rule to generate the frame image.
In one embodiment, before receiving the sorted frame images and the encrypted sorted sequence transmitted by the image transmission apparatus, the method further includes:
an image transmission request transmitted to the image transmission apparatus;
receiving a certificate which is sent by the image sending equipment and acquired from a certificate authority and a first public key of the image sending equipment;
verifying whether the first public key is forged according to the first public key, the certificate and a second public key sent by the certificate authority;
if the first public key is determined not to be forged, generating a secret key of the image receiving equipment, and encrypting the secret key by adopting the first public key to generate an encrypted secret key;
and sending the encrypted key to the image sending equipment.
The validity of the image sending equipment can be verified by verifying whether the first public key is forged or not, and the secret key is encrypted and transmitted under the condition that the first public key is not forged, so that the secret key can be prevented from being cracked in the transmission process, and the safety of data in the transmission process is improved.
According to a third aspect of the embodiments of the present disclosure, there is provided an image processing apparatus applied to an image receiving device, including:
the macroblock dividing module is used for carrying out macroblock division on the frame image to generate at least one macroblock and a sequence number of each macroblock in the at least one macroblock;
the sequence generation module is used for sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence;
the macroblock ordering module is used for ordering the at least one macroblock according to the ordering sequence to generate an ordered frame image;
the sequencing sequence encryption module is used for encrypting the sequencing sequence to generate the encrypted sequencing sequence;
and the image sending module is used for sending the sequenced frame images and the encrypted sequencing sequence to image receiving equipment.
In one embodiment, the apparatus further comprises:
the pixel value transformation module is used for transforming the pixel value of the at least one macro block according to a preset transformation rule to generate a transformed macro block, and the pixel values of the transformed macro block have an incidence relation;
a macro block coding module, configured to code the transformed macro block to generate a coded macro block;
the macroblock ordering module is to:
and sequencing the coded macro blocks according to the sequencing sequence to generate the sequenced frame image.
In one embodiment, the apparatus further comprises:
the identification information encryption module is used for encrypting the identification information of the preset transformation rule to generate encrypted identification information;
and the identification information sending module is used for sending the encrypted identification information to the image receiving equipment.
In one embodiment, the apparatus further comprises:
a transmission request receiving module, configured to receive an image transmission request sent by the image receiving device;
a first public key sending module, configured to send, in response to the image transmission request, a certificate obtained from a certificate authority and a first public key of the image sending apparatus to the image receiving apparatus, so that the image receiving apparatus verifies whether the first public key is forged according to the first public key, the certificate, and a second public key sent by the certificate authority to the image receiving apparatus;
a key receiving module, configured to receive an encrypted key sent by the image receiving device when the first public key is not forged, where the encrypted key is generated by the image receiving device after encrypting the key with the first public key;
the key decryption module is used for decrypting the encrypted key to generate the key;
the sorting sequence encryption module is used for:
and encrypting the sequencing sequence by adopting the secret key to generate the encrypted sequencing sequence.
In the image processing apparatus provided by the embodiment of the present disclosure, the image sending device is capable of performing macroblock division on a frame image, and generating at least one macroblock and a sequence number of each macroblock in the at least one macroblock; sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence; sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image; encrypting the sequencing sequence to generate the encrypted sequencing sequence; the sequenced frame images and the encrypted sequencing sequence are sent to the image receiving equipment, the coded macro blocks do not need to be encrypted, only the sequencing sequence of at least one macro block needs to be encrypted, the safety of data transmission is guaranteed, meanwhile, the operation amount of the image sending equipment is reduced, and the operation efficiency of the image sending equipment is improved.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an image processing apparatus applied to an image receiving device, including:
the image receiving module is used for receiving the sequenced frame images and the encrypted sequencing sequence which are sent by the image sending equipment, wherein the sequenced frame images comprise at least one macro block obtained by macro block division of the frame images, and the sequenced frame images are generated by sequencing the at least one macro block according to the sequencing sequence;
the sequencing sequence decryption module is used for decrypting the encrypted sequencing sequence to generate a sequencing sequence, and the sequencing sequence is generated by sequencing the serial number of the at least one macro block according to a preset sequencing rule;
the reverse sequencing sequence generation module is used for reversely sequencing the serial numbers in the sequencing sequence according to the preset sequencing rule to generate a reverse sequencing sequence;
and the image generation module is used for sequencing the at least one macro block according to the reverse sequencing sequence to generate the frame image.
In one embodiment, the apparatus further comprises:
a macroblock decoding module, configured to decode at least one macroblock in the sorted frame images to generate a decoded macroblock;
the image generation module is to:
and sequencing the decoded macro blocks according to the reverse sequencing sequence to generate the frame image.
In one embodiment, the apparatus further comprises:
an identification information receiving module, configured to receive encrypted identification information sent by the image sending device, where the encrypted identification information is identification information of an encrypted preset transformation rule, and the preset transformation rule is used to transform a pixel value of the at least one macroblock;
the identification information decryption module is used for decrypting the encrypted identification information and generating the identification information of the preset transformation rule;
the preset transformation rule determining module is used for determining a target preset transformation rule corresponding to the identification information of the preset transformation rule according to the identification information of the preset transformation rule;
the image generation module is to:
sequencing the decoded macro blocks according to the reverse sequencing sequence to generate a frame image to be inversely transformed;
and performing inverse transformation on the pixel value of at least one macro block in the frame image to be inversely transformed according to the target preset transformation rule to generate the frame image.
In one embodiment, the apparatus further comprises:
a transmission request sending module for sending an image transmission request to the image sending device;
the first public key receiving module is used for receiving a certificate which is sent by the image sending equipment and acquired from a certificate authority and a first public key of the image sending equipment;
the first public key verification module is used for verifying whether the first public key is forged or not according to the first public key, the certificate and a second public key sent by the certificate authority;
a key generation module, configured to generate a key of the image receiving device if it is determined that the first public key is not forged, and encrypt the key with the first public key to generate an encrypted key;
and the key sending module is used for sending the encrypted key to the image sending equipment.
The image processing device provided by the embodiment of the disclosure can receive the sequenced frame images and the encrypted sequencing sequence sent by the image sending equipment; decrypting the encrypted sequencing sequence to generate a sequencing sequence; reversely ordering the serial numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence; the at least one macro block is sequenced according to the reverse sequencing sequence to generate the frame image, the decoded macro block is not required to be decrypted, only the sequencing sequence of the at least one macro block is required to be decrypted, the safety of data transmission is ensured, meanwhile, the operation amount of the image receiving equipment is reduced, and the operation efficiency of the image receiving equipment is improved.
According to a fifth aspect of embodiments of the present disclosure, there is provided an image transmission apparatus comprising a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the image processing method of any one of the first aspect and the first aspect.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, in which at least one computer instruction is stored, the instruction being loaded and executed by a processor to implement the steps performed in the image processing method according to the first aspect and any one of the embodiments of the first aspect.
According to a seventh aspect of the embodiments of the present disclosure, there is provided an image receiving apparatus, which includes a processor and a memory, where at least one computer instruction is stored, and the instruction is loaded and executed by the processor to implement the steps performed in the image processing method according to the second aspect and any one of the embodiments of the second aspect.
According to an eighth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, in which at least one computer instruction is stored, the instruction being loaded and executed by a processor to implement the steps performed in the image processing method according to the second aspect and any one of the embodiments of the second aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a block diagram of an image processing system provided by an embodiment of the present disclosure;
fig. 2 is a first flowchart of an image processing method provided by an embodiment of the present disclosure;
fig. 3 is a flowchart ii of an image processing method provided in the embodiment of the present disclosure;
FIG. 4A is a schematic diagram of an image preprocessing process provided by an embodiment of the present disclosure;
fig. 4B is a flowchart of an image preprocessing process provided by an embodiment of the present disclosure;
fig. 5A is a schematic diagram of an image encryption transmission process provided by an embodiment of the present disclosure;
fig. 5B is a flowchart of an image encryption transmission process provided by an embodiment of the present disclosure;
FIG. 6 is a flowchart of an image decryption process provided by an embodiment of the present disclosure;
fig. 7 is a first structural diagram of an image processing apparatus according to an embodiment of the disclosure;
fig. 8 is a second structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 9 is a third structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 10 is a fourth structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of a hardware structure of an image sending device according to an embodiment of the present disclosure;
fig. 12 is a schematic diagram of a hardware structure of an image receiving apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a structural diagram of an image transmission system according to an embodiment of the present disclosure, and as shown in fig. 1, the system includes:
an image transmission apparatus 101, an image reception apparatus 102, and a certificate authority 103. Wherein, the certificate authority 103 is respectively connected with the image sending device 101 and the image receiving device 102 in a communication way, and the image sending device 101 is also connected with the image receiving device 102 in a communication way.
The image transmission apparatus 101 is configured to generate a public key and a private key of the image transmission apparatus 101 and transmit the public key to the certificate authority 103. The certificate authority 103 is configured to receive the public key, generate a certificate based on the public key, and transmit the certificate to the image transmission apparatus 101, and transmit the public key to the image reception apparatus 102. The image transmission apparatus 101 is also configured to receive the certificate and transmit the certificate to the image reception apparatus 102. The image receiving device 102 is further configured to receive the certificate and receive the public key, verify whether the public key is forged according to the certificate, send an image transmission request to the image sending device 101 when it is determined that the public key is not forged, encrypt an image to be sent with the private key after the image sending device 101 receives the image transmission request, and send the encrypted image to the image receiving device 102. The image receiving device 102 receives the encrypted image, decrypts the encrypted image using the public key, and displays the decrypted image.
However, in the process of transmitting an image, it is necessary to first perform macroblock division on the image, encode a plurality of macroblocks obtained by the division, generate image data code streams corresponding to the plurality of macroblocks, and encrypt and transmit the image data code streams corresponding to the plurality of macroblocks, so that, with the above technical solution, an image transmitting device needs to encrypt all the image data code streams, and correspondingly, an image receiving device also needs to decrypt all the encrypted image data code streams, and the image transmitting device and the image receiving device have a very large amount of computation in the process of transmitting an image.
The inventor notices the problem and proposes an image processing method, which comprises the following steps:
fig. 2 is a flowchart of an image processing method provided by an embodiment of the present disclosure, and the method is applied to an image sending device. The method comprises the following steps:
s201, carrying out macro block division on the frame image, and generating at least one macro block and a sequence number of each macro block in the at least one macro block.
Illustratively, the image transmitting apparatus receives an image transmission request transmitted by the image receiving apparatus; and in response to the image transmission request, transmitting the certificate acquired from the certificate authority and the first public key of the image transmission device to the image reception device, so that the image reception device verifies whether the first public key is forged according to the first public key, the certificate and a second public key transmitted by the certificate authority to the image reception device;
and receiving the encrypted key sent by the image receiving device under the condition that the first public key is not forged, wherein the encrypted key is generated by encrypting the key by the image receiving device by adopting the first public key.
The validity of the image sending equipment can be verified by verifying whether the first public key is forged or not, and the secret key is encrypted and transmitted under the condition that the first public key is not forged, so that the secret key can be prevented from being cracked in the transmission process, and the safety of data in the transmission process is improved.
And after receiving the encrypted key sent by the image receiving equipment, the image sending equipment decrypts the encrypted key by using the private key of the image sending equipment to generate the key. And after decrypting the encrypted key, carrying out macro block division on the frame image to generate at least one macro block and a serial number of each macro block in the at least one macro block. Then, converting the pixel value of the at least one macro block according to a preset conversion rule to generate a converted macro block, wherein the pixel values of the converted macro block have an association relation; and then the transformed macro block is encoded to generate an encoded macro block.
How the pixel values of at least one macroblock are transformed will be explained below:
the image sending device divides the frame image into N macroblocks (M may be equal to N or not equal to N) which are not overlapped with each other; and then the N N M macro blocks are subjected to pixel transformation, so that the N N M macro blocks generate a dependency relationship. For example: subtracting 128 from the pixel of each N0 macroblock to obtain a transformed N0 macroblock, wherein the pixel value of each transformed N1 macroblock is equal to the difference between the pixel value of each N1 macroblock and the pixel value of each original N0 macroblock, the pixel value of each transformed N2 macroblock is equal to the difference between the pixel value of each N2 macroblock and the pixel value of each original N1 macroblock, and the pixel value of each transformed N3 macroblock is equal to the difference between the pixel value of each N3 macroblock and the pixel value of each original N2 macroblock until the pixel values of all the macroblocks are transformed.
By converting the pixel value of the at least one macro block, the situation that the image is divulged due to the fact that the image is directly recovered according to the macro block in the image transmission process can be avoided, and the safety of data in the image transmission process is improved.
S202, sequencing the sequence numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence.
Illustratively, the preset ordering rule may be a reverse ordering, a random ordering, an odd-first-even ordering, an even-first-odd ordering, etc., and the embodiment is not limited herein.
S203, sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image.
In this step, the encoded macroblocks are ordered according to the ordering sequence, and the ordered frame image is generated.
By sequencing the coded macro blocks according to the sequencing sequence, the sequencing sequence of the at least one macro block can be reordered, the situation that the image is recovered after the at least one macro block is sequenced in sequence, so that the image is divulged is avoided, and the safety of data in the image transmission process is improved.
S204, encrypting the sequencing sequence to generate the encrypted sequencing sequence.
In this embodiment, the key is a symmetric key, and the image sending device encrypts the ordered sequence by using the symmetric key and a symmetric encryption algorithm corresponding to the symmetric key to generate an encrypted ordered sequence.
By encrypting the sequencing sequence, the sequencing sequence can be prevented from being cracked, the situation that the image is recovered after the at least one macro block is subjected to reverse sequencing according to the sequencing sequence is further avoided, and the safety of data in the image transmission process is improved.
S205, sending the sequenced frame images and the encrypted sequencing sequence to an image receiving device.
In this step, the image sending device further encrypts the identification information of the preset transformation rule to generate encrypted identification information; and sending the encrypted identification information, the sequenced frame images and the encrypted sequencing sequence to an image receiving device.
According to the image processing method provided by the embodiment of the disclosure, the image sending device can perform macro block division on a frame image to generate at least one macro block and a serial number of each macro block in the at least one macro block; sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence; sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image; encrypting the sequencing sequence to generate the encrypted sequencing sequence; the sequenced frame images and the encrypted sequencing sequence are sent to the image receiving equipment, the coded macro blocks do not need to be encrypted, only the sequencing sequence of at least one macro block needs to be encrypted, the safety of data transmission is guaranteed, meanwhile, the operation amount of the image sending equipment is reduced, and the operation efficiency of the image sending equipment is improved.
How the image receiving device processes the image is described below with reference to the embodiment of fig. 3.
Fig. 3 is a flowchart of an image processing method provided by an embodiment of the present disclosure, and the method is applied to an image receiving device. The method comprises the following steps:
s301, receiving a sequenced frame image and an encrypted sequencing sequence, wherein the sequenced frame image comprises at least one macro block obtained by macro block division of the frame image, and the sequenced frame image is generated by sequencing the at least one macro block according to the sequencing sequence;
illustratively, the image transmission request transmitted from the image receiving apparatus to the image transmitting apparatus; after sending the image transmission request, receiving a certificate which is sent by the image sending equipment and acquired from a certificate authority and a first public key of the image sending equipment; the image receiving device verifies whether the first public key is forged or not according to the certificate and a second public key sent by the certificate authority;
if the first public key is determined not to be forged, generating a secret key of the image receiving equipment, and encrypting the secret key by adopting the first public key to generate an encrypted secret key; the encrypted key is transmitted to the image transmission apparatus. And after the encrypted key is sent to the image sending equipment, receiving the sequenced frame images and the encrypted sequencing sequence sent by the image sending equipment, wherein the encrypted sequencing sequence is generated by encrypting the sequencing sequence by the image sending equipment by adopting the key.
How the image receiving apparatus verifies whether the first public key is forged is explained below:
the image receiving equipment decrypts the received digital signature in the certificate by adopting a second public key sent by the certificate authority so as to obtain a first digital fingerprint; in addition, the image receiving equipment performs a digital digest algorithm on the received first public key so as to generate a second digital fingerprint; the image receiving device compares whether the first digital fingerprint and the second digital fingerprint are consistent; if the first public key is not forged, the certificate is verified.
The validity of the image sending equipment can be verified by verifying whether the first public key is forged or not, and the secret key is encrypted and transmitted under the condition that the first public key is not forged, so that the secret key can be prevented from being cracked in the transmission process, and the safety of data in the transmission process is improved.
S302, decrypting the encrypted sequencing sequence to generate a sequencing sequence, wherein the sequencing sequence is generated by sequencing the serial number of the at least one macro block according to a preset sequencing rule;
and S303, reversely ordering the sequence numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence.
In this embodiment, the key is a symmetric key, and after receiving the encrypted sorting sequence, the image receiving apparatus decrypts the encrypted sorting sequence by using a symmetric decryption algorithm corresponding to the symmetric key to generate a sorting sequence. And reversely ordering the serial numbers in the ordering sequence according to a preset ordering rule to generate a reversely ordered sequence, wherein the reversely ordered sequence is a sequence arranged in a normal order.
For example, the sorting sequence is generated by sorting the sequence numbers of the at least one macroblock according to a reverse sorting rule, and then, by reversely sorting the sequence numbers in the sorting sequence according to the reverse sorting rule, a sequence of the sequence numbers of the at least one macroblock in a normal arrangement order can be generated.
It should be noted that at least one macroblock in the sorted frame image is encoded, and therefore, after receiving the sorted frame image, the image receiving apparatus needs to decode at least one macroblock in the sorted frame image to generate a decoded macroblock.
S304, sequencing the at least one macro block according to the reverse sequencing sequence to generate the frame image.
In this embodiment, the image receiving device further receives encrypted identification information sent by the image sending device, where the encrypted identification information is identification information of an encrypted preset transformation rule, and the preset transformation rule is used to transform the pixel value of the at least one macroblock.
The image receiving equipment receives the encrypted identification information and decrypts the encrypted identification information to generate the identification information of the preset transformation rule; and determining a target preset transformation rule corresponding to the identification information of the preset transformation rule according to the identification information of the preset transformation rule.
After the target preset corresponding rule is determined, sequencing the decoded macro blocks according to the reverse sequencing sequence to generate a frame image to be inversely transformed; and then, carrying out inverse transformation on the pixel value of at least one macro block in the frame image to be inversely transformed according to the target preset transformation rule to generate the frame image.
The image processing method provided by the embodiment of the disclosure can receive the sequenced frame images and the encrypted sequencing sequence sent by the image sending equipment; decrypting the encrypted sequencing sequence to generate a sequencing sequence; reversely ordering the serial numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence; the at least one macro block is sequenced according to the reverse sequencing sequence to generate the frame image, the decoded macro block is not required to be decrypted, only the sequencing sequence of the at least one macro block is required to be decrypted, the safety of data transmission is ensured, meanwhile, the operation amount of the image receiving equipment is reduced, and the operation efficiency of the image receiving equipment is improved.
The following describes the image processing method provided by the embodiments of the present disclosure in further detail with reference to the embodiments of fig. 4 to 6.
Fig. 4A is a schematic diagram of an image preprocessing process provided by an embodiment of the present disclosure. Referring to fig. 4A, the image preprocessing mainly includes the following processing steps:
s401, the image sending equipment applies for a certificate to a certificate authority;
specifically, the image transmission apparatus generates a public key and a private key, and then gives the public key to the certificate authority to apply for a certificate from the certificate authority.
S402, the certificate authority issues a certificate to the image sending equipment, and the image sending equipment stores the received certificate;
after receiving the public key sent by the image sending equipment, the certificate authority generates a certificate by using a private key of the certificate authority and returns the certificate to the image sending equipment;
s403, the certificate authority sends the public key sent by the image sending device to the image receiving device, and the image receiving device presets the public key sent by the certificate authority through a reliable way.
The following describes how to perform encrypted transmission of images after image preprocessing.
Fig. 5A is a schematic diagram of an image encryption transmission process provided by an embodiment of the present disclosure. Referring to fig. 5A, the image encryption transmission mainly includes the following processing steps:
s501, the image receiving device actively initiates an encrypted image transmission request to the image sending device;
s502, the image sending equipment sends the certificate and the public key of the image sending equipment to the image receiving equipment;
the certificate is a certificate received from a certificate authority.
S503, the image receiving device verifies the certificate by using the public key of the certificate authority so as to verify whether the public key sent by the image sending device is forged or not;
specifically, the image receiving apparatus verifies the certificate by:
the image receiving equipment decrypts the digital signature in the currently received certificate by using a public key sent by a locally preset certificate authority so as to obtain a digital fingerprint; in addition, the image receiving equipment performs a digital digest algorithm on the currently received public key so as to generate a digital fingerprint; the image receiving equipment compares whether the digital fingerprint generated by the image receiving equipment is consistent with the digital fingerprint obtained by decryption from the certificate; if the two are consistent, the certificate is verified.
S504, if the public key of the image sending equipment passes the verification, the image receiving equipment generates a secret key for symmetric encryption, and then the secret key is encrypted by the public key of the image sending equipment and then sent to the image sending equipment;
s505, after receiving the encrypted symmetric key, the image sending equipment decrypts the encrypted key by using a private key of the image sending equipment to obtain an original key;
s506, the image sending device decomposes the original image into N × M macroblocks that do not overlap with each other (M may be equal to N, or may not be equal to N);
s507, the image sending equipment processes the blocks to enable the macro blocks to generate a dependency relationship;
in practical applications, various methods may be used to process the pixel values of the macroblocks, so that some correlation is generated between the pixel values of the macroblocks.
For example: n0 blocks all pixels minus 128, a new n1 macroblock equal the difference between the individual pixels of the n1 macroblock and the original n0 macroblock, a new n2 macroblock equal the difference between the individual pixels of the n2 macroblock and the original n1 macroblock, and so on. Thereafter, each macroblock may also be lossy or lossless compressed (this step is optional).
S508, the image sending equipment encodes each processed macro block;
an appropriate image coding algorithm may be selected to code each processed macroblock.
S509, the image sending equipment randomly scrambles the serial numbers 0 to (n-1) of the n macro blocks, then encrypts the generated random sequence by using a pre-agreed symmetric encryption algorithm and a key sent from a receiving end, and then sends the encrypted sequence to the image receiving equipment;
and S510, the image sending device writes the coded data of each macro block into a code stream according to the sequence generated in the S509 and sends the code stream to the image receiving device.
Each digit in the sequence represents the serial number of the macro block corresponding to the coded data, and when the coded data of each block is written into the code stream according to the random sequence, the finally generated code stream comprises the coded data of each macro block which is arranged out of order.
The following describes how to perform image decryption after image encryption transmission. Referring to fig. 6, the image decryption mainly includes the following processing steps:
s601, receiving code stream data by the image receiving equipment;
s602, the image receiving equipment analyzes out-of-order coded data and an encrypted random sequence from the received code stream data;
s603, the image receiving equipment decrypts the received sequence by adopting the agreed symmetric encryption method and the symmetric key;
s604, decoding the code stream of each block by the image receiving equipment to obtain the pixel value of each macro block which is processed and has a disordered sequence.
S605, rearranging the macro blocks according to the decrypted sequence by the image receiving equipment;
s606, the image receiving apparatus processes the pixels of each macroblock according to the inverse transform in S507, and obtains an original image.
In the step, the pixel value transformation rule of each block is agreed in advance, so that the encryption information of the pixel value transformation rule does not need to be added in the code stream; however, in practical applications, if the pixel value transformation rule is not fixed, the information of the pixel value transformation rule also needs to be encrypted and then sent to the image receiving device, and after the information is decrypted by the image receiving device, the pixel value transformation is performed based on the corresponding rule, so as to restore the original image.
In an alternative embodiment, in order to improve the encryption strength, the pixel value transformation rules may be set in such a manner that, for example, the image sending apparatus and the image receiving apparatus define a plurality of pixel value transformation rules in advance, and each pixel value transformation rule has a unique corresponding number; when the image sending equipment can send each frame of image according to the requirement, selecting a corresponding pixel value transformation rule, carrying out transformation processing on the pixel values of each block according to the selected pixel value transformation rule, encrypting the serial numbers of the corresponding pixel value transformation rules and sending the encrypted serial numbers to the image receiving equipment; after the decryption by the image receiving equipment, finding out a pixel value inverse transformation rule corresponding to the pixel value transformation rule in a locally set pixel value transformation rule pool according to the decrypted number; and performing inverse transformation on the currently received image data according to the found pixel value inverse transformation rule, thereby obtaining an original image.
Fig. 7 is a block diagram of an image processing apparatus provided in an embodiment of the present disclosure, and the apparatus is applied to an image transmission device. As shown in fig. 7, the apparatus 70 includes:
a macroblock dividing module 701, configured to perform macroblock division on a frame image, and generate at least one macroblock and a sequence number of each macroblock in the at least one macroblock;
a sequence generating module 702, configured to sort the sequence numbers of all the macro blocks according to a preset sorting rule, and generate a sorting sequence;
a macroblock ordering module 703, configured to order the at least one macroblock according to the ordering sequence, and generate an ordered frame image;
a sorting sequence encryption module 704, configured to encrypt the sorting sequence to generate the encrypted sorting sequence;
an image sending module 705, configured to send the sorted frame images and the encrypted sorted sequence to an image receiving apparatus.
In one embodiment, as shown in fig. 8, the apparatus 70 further comprises:
a pixel value transformation module 706, configured to transform the pixel value of the at least one macroblock according to a preset transformation rule, so as to generate a transformed macroblock, where an association relationship exists between the pixel values of the transformed macroblock;
a macroblock coding module 707, configured to code the transformed macroblock to generate a coded macroblock;
the macroblock ordering module 703 is configured to:
and sequencing the coded macro blocks according to the sequencing sequence to generate the sequenced frame image.
In one embodiment, the apparatus 70 further comprises:
an identification information encryption module 708, configured to encrypt the identification information of the preset transformation rule, and generate encrypted identification information;
an identification information sending module 709, configured to send the encrypted identification information to the image receiving apparatus.
In one embodiment, the apparatus 70 further comprises:
a transmission request receiving module 710, configured to receive an image transmission request sent by the image receiving apparatus;
a first public key sending module 711, configured to send, in response to the image transmission request, the certificate obtained from the certificate authority and the first public key of the image sending apparatus to the image receiving apparatus, so that the image receiving apparatus verifies whether the first public key is forged according to the first public key, the certificate, and a second public key sent by the certificate authority to the image receiving apparatus;
a key receiving module 712, configured to receive an encrypted key sent by the image receiving apparatus when the first public key is not forged, where the encrypted key is generated by the image receiving apparatus after encrypting the key with the first public key;
a key decryption module 713, configured to decrypt the encrypted key to generate the key;
the ordered sequence encryption module 704 is configured to:
and encrypting the sequencing sequence by adopting the secret key to generate the encrypted sequencing sequence.
In the image processing apparatus provided by the embodiment of the present disclosure, the image sending device is capable of performing macroblock division on a frame image, and generating at least one macroblock and a sequence number of each macroblock in the at least one macroblock; sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence; sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image; encrypting the sequencing sequence to generate the encrypted sequencing sequence; the sequenced frame images and the encrypted sequencing sequence are sent to the image receiving equipment, the coded macro blocks do not need to be encrypted, only the sequencing sequence of at least one macro block needs to be encrypted, the safety of data transmission is guaranteed, meanwhile, the operation amount of the image sending equipment is reduced, and the operation efficiency of the image sending equipment is improved.
Fig. 9 is a block diagram of an image processing apparatus provided in an embodiment of the present disclosure, and the apparatus is applied to an image receiving device. As shown in fig. 9, the apparatus 90 includes:
an image receiving module 901, configured to receive a sequenced frame image and an encrypted sequencing sequence, where the sequenced frame image includes at least one macro block obtained by macro block dividing the frame image, and the sequenced frame image is generated by sequencing the at least one macro block according to the sequencing sequence;
a sorting sequence decryption module 902, configured to decrypt the encrypted sorting sequence to generate a sorting sequence, where the sorting sequence is generated by sorting the sequence number of the at least one macroblock according to a preset sorting rule;
a reverse sorting sequence generating module 903, configured to reverse sort the sequence numbers in the sorting sequence according to the preset sorting rule, and generate a reverse sorting sequence;
an image generating module 904, configured to sort the at least one macroblock according to the reverse sorting sequence, and generate the frame image.
In one embodiment, as shown in fig. 10, the apparatus 90 further comprises:
a macroblock decoding module 905, configured to decode at least one macroblock in the sorted frame image, and generate a decoded macroblock;
the image generation module 904 is configured to:
and sequencing the decoded macro blocks according to the reverse sequencing sequence to generate the frame image.
In one embodiment, the apparatus 90 further comprises:
an identification information receiving module 906, configured to receive encrypted identification information sent by the image sending apparatus, where the encrypted identification information is identification information of an encrypted preset transformation rule, and the preset transformation rule is used to transform a pixel value of the at least one macroblock;
an identification information decryption module 907, configured to decrypt the encrypted identification information to generate identification information of the preset transformation rule;
a preset transformation rule determining module 908, configured to determine, according to the identifier information of the preset transformation rule, a target preset transformation rule corresponding to the identifier information of the preset transformation rule;
the image generation module 904 is configured to:
sequencing the decoded macro blocks according to the reverse sequencing sequence to generate a frame image to be inversely transformed;
and performing inverse transformation on the pixel value of at least one macro block in the frame image to be inversely transformed according to the target preset transformation rule to generate the frame image.
In one embodiment, the apparatus 90 further comprises:
a transmission request sending module 909 for sending an image transmission request to the image sending apparatus;
a first public key receiving module 910, configured to receive a certificate obtained from a certificate authority and sent by the image sending apparatus, and a first public key of the image sending apparatus;
a first public key verification module 911, configured to verify whether the first public key is forged according to the first public key, the certificate, and a second public key sent by the certificate authority;
a key generation module 912, configured to generate a key of the image receiving device if it is determined that the first public key is not forged, and encrypt the key with the first public key to generate an encrypted key;
a key sending module 913, configured to send the encrypted key to the image sending apparatus.
The image processing device provided by the embodiment of the disclosure can receive the sequenced frame images and the encrypted sequencing sequence sent by the image sending equipment; decrypting the encrypted sequencing sequence to generate a sequencing sequence; reversely ordering the serial numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence; the at least one macro block is sequenced according to the reverse sequencing sequence to generate the frame image, the decoded macro block is not required to be decrypted, only the sequencing sequence of the at least one macro block is required to be decrypted, the safety of data transmission is ensured, meanwhile, the operation amount of the image receiving equipment is reduced, and the operation efficiency of the image receiving equipment is improved.
Fig. 11 is a schematic diagram of a hardware structure of an image sending device according to an embodiment of the present disclosure, and as shown in fig. 11, the image sending device 110 includes:
a processor 1101 and a memory 1102, the memory 1102 having stored therein at least one computer instruction, the instruction being loaded and executed by the processor 1101 to implement the image processing method described in the embodiment of fig. 2.
Based on the image processing method described in the embodiment corresponding to fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the image processing method described in the embodiment corresponding to fig. 2, which is not described herein again.
Fig. 12 is a schematic diagram of a hardware structure of an image receiving apparatus according to an embodiment of the present disclosure, and as shown in fig. 12, the image sending apparatus 120 includes:
a processor 1201 and a memory 1202, the memory 1202 having stored therein at least one computer instruction that is loaded and executed by the processor 1201 to implement the image processing method described in the embodiment of fig. 3.
Based on the image processing method described in the embodiment corresponding to fig. 3, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the image processing method described in the embodiment corresponding to fig. 3, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. An image processing method applied to an image transmission apparatus, the method comprising:
dividing a frame image into macro blocks to generate at least one macro block and a serial number of each macro block in the at least one macro block;
sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence;
sequencing the at least one macro block according to the sequencing sequence to generate a sequenced frame image;
encrypting the sequencing sequence to generate the encrypted sequencing sequence;
and sending the sequenced frame images and the encrypted sequencing sequence to an image receiving device.
2. The method according to claim 1, wherein after macroblock dividing the frame image, the method further comprises:
converting the pixel value of the at least one macro block according to a preset conversion rule to generate a converted macro block, wherein the pixel values of the converted macro block have an association relation;
coding the transformed macro block to generate a coded macro block;
the sorting the at least one macroblock according to the sorting sequence, and generating a sorted frame image includes:
and sequencing the coded macro blocks according to the sequencing sequence to generate the sequenced frame image.
3. The method according to claim 2, wherein after transforming the pixel values of the at least one macroblock according to a preset transformation rule, the method further comprises:
encrypting the identification information of the preset transformation rule to generate encrypted identification information;
and sending the encrypted identification information to the image receiving equipment.
4. The method according to any one of claims 1 to 1, wherein before macroblock partitioning the frame image, the method further comprises:
receiving an image transmission request sent by the image receiving equipment;
in response to the image transmission request, sending a certificate acquired from a certificate authority and a first public key of the image sending device to the image receiving device, so that the image receiving device can verify whether the first public key is forged or not according to the first public key, the certificate and a second public key sent to the image receiving device by the certificate authority;
under the condition that the first public key is not forged, receiving an encrypted secret key sent by the image receiving equipment, wherein the encrypted secret key is generated by encrypting the secret key by the image receiving equipment by adopting the first public key;
decrypting the encrypted key to generate the key;
the encrypting the sorting sequence, and the generating the encrypted sorting sequence includes:
and encrypting the sequencing sequence by adopting the secret key to generate the encrypted sequencing sequence.
5. An image processing method applied to an image receiving apparatus, the method comprising:
receiving a sequenced frame image and an encrypted sequencing sequence which are sent by an image sending device, wherein the sequenced frame image comprises at least one macro block obtained by macro block division of the frame image, and the sequenced frame image is generated by sequencing the at least one macro block according to the sequencing sequence;
decrypting the encrypted sequencing sequence to generate a sequencing sequence, wherein the sequencing sequence is generated by sequencing the serial number of the at least one macro block according to a preset sequencing rule;
reversely ordering the serial numbers in the ordering sequence according to the preset ordering rule to generate a reversely ordered sequence;
and sequencing the at least one macro block according to the reverse sequencing sequence to generate the frame image.
6. The method of claim 5, wherein after decrypting the encrypted random sequence, the method further comprises:
decoding at least one macro block in the sequenced frame images to generate a decoded macro block;
the sorting the at least one macroblock according to the reverse sorting sequence, and generating the frame image includes:
and sequencing the decoded macro blocks according to the reverse sequencing sequence to generate the frame image.
7. The method of claim 6, further comprising:
receiving encrypted identification information sent by the image sending equipment, wherein the encrypted identification information is identification information of an encrypted preset transformation rule, and the preset transformation rule is used for transforming the pixel value of the at least one macro block;
decrypting the encrypted identification information to generate identification information of the preset transformation rule;
determining a target preset transformation rule corresponding to the identification information of the preset transformation rule according to the identification information of the preset transformation rule;
the sorting the decoded macro blocks according to the reverse sorting sequence to generate the frame image includes:
sequencing the decoded macro blocks according to the reverse sequencing sequence to generate a frame image to be inversely transformed;
and performing inverse transformation on the pixel value of at least one macro block in the frame image to be inversely transformed according to the target preset transformation rule to generate the frame image.
8. The method according to claim 5, wherein the method further comprises, before receiving the ordered frame images and the encrypted ordered sequence transmitted by the image transmission apparatus:
an image transmission request transmitted to the image transmission apparatus;
receiving a certificate which is sent by the image sending equipment and acquired from a certificate authority and a first public key of the image sending equipment;
verifying whether the first public key is forged according to the first public key, the certificate and a second public key sent by the certificate authority;
if the first public key is determined not to be forged, generating a secret key of the image receiving equipment, and encrypting the secret key by adopting the first public key to generate an encrypted secret key;
and sending the encrypted key to the image sending equipment.
9. An image processing apparatus applied to an image transmission device, comprising:
the macroblock dividing module is used for carrying out macroblock division on the frame image to generate at least one macroblock and a sequence number of each macroblock in the at least one macroblock;
the sequence generation module is used for sequencing the serial numbers of all the macro blocks according to a preset sequencing rule to generate a sequencing sequence;
the macroblock ordering module is used for ordering the at least one macroblock according to the ordering sequence to generate an ordered frame image;
the sequencing sequence encryption module is used for encrypting the sequencing sequence to generate the encrypted sequencing sequence;
and the image sending module is used for sending the sequenced frame images and the encrypted sequencing sequence to image receiving equipment.
10. An image processing apparatus applied to an image receiving device, comprising:
the image receiving module is used for receiving the sequenced frame images and the encrypted sequencing sequence which are sent by the image sending equipment, wherein the sequenced frame images comprise at least one macro block obtained by macro block division of the frame images, and the sequenced frame images are generated by sequencing the at least one macro block according to the sequencing sequence;
the sequencing sequence decryption module is used for decrypting the encrypted sequencing sequence to generate a sequencing sequence, and the sequencing sequence is generated by sequencing the serial number of the at least one macro block according to a preset sequencing rule;
the reverse sequencing sequence generation module is used for reversely sequencing the serial numbers in the sequencing sequence according to the preset sequencing rule to generate a reverse sequencing sequence;
and the image generation module is used for sequencing the at least one macro block according to the reverse sequencing sequence to generate the frame image.
CN202010621062.XA 2020-06-30 2020-06-30 Image processing method and device Pending CN111800634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010621062.XA CN111800634A (en) 2020-06-30 2020-06-30 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010621062.XA CN111800634A (en) 2020-06-30 2020-06-30 Image processing method and device

Publications (1)

Publication Number Publication Date
CN111800634A true CN111800634A (en) 2020-10-20

Family

ID=72809943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010621062.XA Pending CN111800634A (en) 2020-06-30 2020-06-30 Image processing method and device

Country Status (1)

Country Link
CN (1) CN111800634A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09214930A (en) * 1996-01-30 1997-08-15 Sanyo Electric Co Ltd Scramble transforming device and inverse scramble transforming device
JPH1175178A (en) * 1997-08-28 1999-03-16 Sanyo Electric Co Ltd Image coder and image coding method
KR20070072297A (en) * 2005-12-30 2007-07-04 고려대학교 산학협력단 Method for encryption and decryption video and apparatus thereof
US20080025504A1 (en) * 2005-11-23 2008-01-31 Robert Rapp Computer or digital device data encryption/decryption performed by using a random analog source
CN101146224A (en) * 2007-09-20 2008-03-19 合肥工业大学 DCT coefficient hierarchical disorder method based on conversion domain in H.264
US20090168892A1 (en) * 2007-12-28 2009-07-02 Cisco Technology, Inc. System and Method for Securely Transmitting Video Over a Network
CN101600110A (en) * 2009-07-14 2009-12-09 杭州华三通信技术有限公司 Method for testing motion and device
CA2766308A1 (en) * 2009-06-22 2010-12-29 Nds Limited Partial encryption using variable block-size parameters
CN102143170A (en) * 2011-03-11 2011-08-03 四川长虹电器股份有限公司 Method for protecting digital content
CN103546750A (en) * 2013-10-22 2014-01-29 中国人民解放军重庆通信学院 H.264 video encryption method based on region of interest
US20140185801A1 (en) * 2012-12-31 2014-07-03 Futurewei Technologies, Inc. Secure Video Transcoding with Applications to Adaptive Streaming
JP2014127990A (en) * 2012-12-27 2014-07-07 Canon Inc Encryption apparatus, encryption method and program
CN110149521A (en) * 2019-04-09 2019-08-20 西安万像电子科技有限公司 Data processing method and system
CN110677694A (en) * 2019-10-15 2020-01-10 华南理工大学 Video encryption method for resisting contour attack

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09214930A (en) * 1996-01-30 1997-08-15 Sanyo Electric Co Ltd Scramble transforming device and inverse scramble transforming device
JPH1175178A (en) * 1997-08-28 1999-03-16 Sanyo Electric Co Ltd Image coder and image coding method
US20080025504A1 (en) * 2005-11-23 2008-01-31 Robert Rapp Computer or digital device data encryption/decryption performed by using a random analog source
KR20070072297A (en) * 2005-12-30 2007-07-04 고려대학교 산학협력단 Method for encryption and decryption video and apparatus thereof
CN101146224A (en) * 2007-09-20 2008-03-19 合肥工业大学 DCT coefficient hierarchical disorder method based on conversion domain in H.264
US20090168892A1 (en) * 2007-12-28 2009-07-02 Cisco Technology, Inc. System and Method for Securely Transmitting Video Over a Network
CA2766308A1 (en) * 2009-06-22 2010-12-29 Nds Limited Partial encryption using variable block-size parameters
CN101600110A (en) * 2009-07-14 2009-12-09 杭州华三通信技术有限公司 Method for testing motion and device
CN102143170A (en) * 2011-03-11 2011-08-03 四川长虹电器股份有限公司 Method for protecting digital content
JP2014127990A (en) * 2012-12-27 2014-07-07 Canon Inc Encryption apparatus, encryption method and program
US20140185801A1 (en) * 2012-12-31 2014-07-03 Futurewei Technologies, Inc. Secure Video Transcoding with Applications to Adaptive Streaming
CN103546750A (en) * 2013-10-22 2014-01-29 中国人民解放军重庆通信学院 H.264 video encryption method based on region of interest
CN110149521A (en) * 2019-04-09 2019-08-20 西安万像电子科技有限公司 Data processing method and system
CN110677694A (en) * 2019-10-15 2020-01-10 华南理工大学 Video encryption method for resisting contour attack

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林巍峣, 方向忠, 黄修超: "基于H.264的新型视频加密算法", 信息安全与通信保密, no. 09, 10 September 2005 (2005-09-10) *

Similar Documents

Publication Publication Date Title
Zhang Separable reversible data hiding in encrypted image
US7167988B2 (en) Information processing method and information processing apparatus
CN111510281B (en) Homomorphic encryption method and device
US7463736B2 (en) Data process apparatus and method therefor
CN101911684B (en) Method and apparatus for selective data encryption
JP5615273B2 (en) Method and apparatus for selective data encryption
EP3195519B1 (en) Encoder, decoder and methods employing partial data encryption
JP5437073B2 (en) Method and apparatus for managing keys and method and apparatus for acquiring keys
US8335314B2 (en) Adaptive and secure modular connection
CN108322750B (en) Encrypted domain HEVC video data hiding method based on residual coefficient modulation
CN110149521B (en) Data processing method and system
CN111669650A (en) Video processing method and device, electronic equipment and storage medium
Hua et al. Matrix-based secret sharing for reversible data hiding in encrypted images
US20080226062A1 (en) Method for Secure Transmission of Data
CN105357537B (en) A kind of multistage tree set partitioning coded image encryption method based on chaos
CN111641500B (en) Encryption and decryption method for wireless video transmission safety of unmanned aerial vehicle
CN110798436B (en) Verification code verification method and device
CN111800634A (en) Image processing method and device
CN112104874A (en) Data transmission method and system
US20140237251A1 (en) Digital Signature System
CN113330712A (en) Encryption system and method using permutation group-based encryption technology
Sae-Tang et al. Encryption-then-compression-based copyright-and privacy-protected image trading system
Wu et al. Data hiding in block truncation coding
Shrivas et al. Visual cryptography in the video using halftone technique
Hua et al. Secure reversible data hiding in encrypted images using cipher-feedback secret sharing

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