CN112188119B - Image data transmission method and device and computer readable storage medium - Google Patents

Image data transmission method and device and computer readable storage medium Download PDF

Info

Publication number
CN112188119B
CN112188119B CN202010968906.8A CN202010968906A CN112188119B CN 112188119 B CN112188119 B CN 112188119B CN 202010968906 A CN202010968906 A CN 202010968906A CN 112188119 B CN112188119 B CN 112188119B
Authority
CN
China
Prior art keywords
matrix
image data
sub
transmitted
pure color
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
CN202010968906.8A
Other languages
Chinese (zh)
Other versions
CN112188119A (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.)
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 CN202010968906.8A priority Critical patent/CN112188119B/en
Publication of CN112188119A publication Critical patent/CN112188119A/en
Application granted granted Critical
Publication of CN112188119B publication Critical patent/CN112188119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/67Circuits for processing colour signals for matrixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a method and a device for transmitting image data and a computer readable storage medium. Wherein, the method comprises the following steps: generating pure color image data corresponding to the image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted; carrying out transformation processing on a matrix corresponding to the pure color image data, and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream; and transmitting the lossless image data stream to a receiving end. The invention solves the technical problems that the security of a file encryption mode in the related technology is low, the file is easy to restore, and the transmission file is easy to leak.

Description

Image data transmission method and device and computer readable storage medium
Technical Field
The present invention relates to the field of image data processing technologies, and in particular, to a method and an apparatus for transmitting image data, and a computer-readable storage medium.
Background
In order to ensure the security of file transmission and effectively avoid the leakage of files in the transmission process, the encryption of files is a more common security guarantee mode in the file transmission process; however, in the current encryption technology, the image code is encrypted once by using the key and then transmitted, once the key and the encrypted image code are intercepted, the transmitted image file can be restored according to the standard encoding format under the condition that the encryption mode is the standard encoding format, so that the file is leaked, and the security is low.
Aiming at the problems that the security of a file encryption mode in the related technology is low, files are easy to restore, and transmission files are easy to leak, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for transmitting image data and a computer readable storage medium, which are used for at least solving the technical problems that a file encryption mode in the related technology is low in safety, files are easy to restore, and transmitted files are easy to leak.
According to an aspect of an embodiment of the present invention, there is provided a transmission method of image data, including: generating pure color image data corresponding to image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted; carrying out transformation processing on the matrix corresponding to the pure color image data, and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream; and transmitting the lossless image data stream to a receiving end.
Optionally, generating the pure color image data corresponding to the image data to be transmitted includes: determining each color channel of the image to be transmitted; and splitting the image to be transmitted according to each color channel to obtain pure color image data corresponding to each color channel.
Optionally, performing transformation processing on a matrix corresponding to the pure color image data includes: decomposing the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel; multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices; and converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
Optionally, encoding a matrix corresponding to the pure color image data includes: and lossless coding is respectively carried out on the new first sub-matrix, the preset conversion matrix and the vector.
Optionally, transmitting the lossless image data stream to a receiving end includes: transmitting the lossless image data stream to the receiving end over a plurality of channels.
According to another aspect of the embodiments of the present invention, there is also provided an image data transmission method, including: receiving a lossless image data stream transmitted by a transmitting end; decrypting the lossless image data stream to obtain a decrypted code stream; obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is a matrix obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted; obtaining pure color image data corresponding to each color channel according to the original sub-matrix; and synthesizing the pure color image data corresponding to each color channel to obtain the image data to be transmitted.
Optionally, obtaining an original submatrix according to the code stream includes: analyzing a preset conversion matrix, a new first sub-matrix and a vector from the code stream, wherein the new first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrices based on the preset conversion matrix, the first sub-matrix is a non-diagonal matrix in the original sub-matrices, the vector is obtained by performing vector conversion on a second sub-matrix in the original sub-matrices, and the second sub-matrix is a diagonal matrix in the original sub-matrices; multiplying the new first sub-matrix by the inverse of the preset matrix to obtain the first sub-matrix; and restoring the vector into the second sub-matrix.
According to another aspect of the embodiments of the present invention, there is also provided an image data transmission apparatus including: the generating unit is used for generating pure color image data corresponding to the image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted; the first acquisition unit is used for carrying out transformation processing on the matrix corresponding to the pure color image data and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream; and the transmission unit is used for transmitting the lossless image data stream to a receiving end.
Optionally, the generating unit includes: the first determining module is used for determining each color channel of the image to be transmitted; and the splitting module is used for splitting the image to be transmitted according to each color channel to obtain pure color image data corresponding to each color channel.
Optionally, the first obtaining unit includes: the decomposition module is used for decomposing the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel; the first obtaining module is used for multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices; and the second obtaining module is used for converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
Optionally, the first obtaining unit is configured to include: and the coding module is used for respectively carrying out lossless coding on the new first sub-matrix, the preset conversion matrix and the vector.
Optionally, the transmission unit includes: and the transmission module is used for transmitting the lossless image data stream to the receiving end through a plurality of channels.
According to another aspect of the embodiments of the present invention, there is provided an image data transmission apparatus including: the receiving unit is used for receiving the lossless image data stream transmitted by the transmitting end; the decryption unit is used for decrypting the lossless image data stream to obtain a decrypted code stream; the second obtaining unit is used for obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is a matrix obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted; a third obtaining unit, configured to obtain pure color image data corresponding to each color channel according to the original sub-matrix; and the synthesizing unit is used for synthesizing the image data to be transmitted based on the pure color image data corresponding to each color channel.
Optionally, the second obtaining unit includes: the code stream processing module is used for processing the code stream to obtain a first sub-matrix, a second sub-matrix and a vector, wherein the first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrix based on the preset conversion matrix; the third obtaining module is used for multiplying the new first sub-matrix by the inverse of the preset matrix to obtain the first sub-matrix; and the restoring module is used for restoring the vector into the second sub-matrix.
According to another aspect of the embodiment of the present invention, there is provided a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is executed by a processor, the apparatus in which the computer storage medium is located is controlled to execute the method for transmitting image data described in any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a computer program, where the computer program executes to execute the image data transmission method described in any one of the above.
In the embodiment of the invention, the pure color image data corresponding to the image data to be transmitted is generated, wherein the pure color image data is the image data obtained by decomposing each color channel based on the image data to be transmitted; carrying out transformation processing on a matrix corresponding to the pure color image data, and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream; the lossless image data stream is transmitted to the receiving end, and the image data transmission method provided by the embodiment of the invention realizes the purposes of obtaining the pure color image data by decomposing the image data to be transmitted according to the color channel and encrypting the pure color image data after decomposing and changing the pure color image data, achieves the technical effect of improving the safety in the file transmission process, and further solves the technical problems that the file encryption mode in the related technology is low in safety, the file is easy to restore and the transmission file is easy to leak.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a transmission method of image data according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative method of transmission of image data according to an embodiment of the invention;
fig. 3 is a flowchart of another image data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a transmission apparatus of image data according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an alternative image data transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Some terms or terms appearing in the embodiments of the present invention are explained below:
singular Value Decomposition (SVD): the method is an important matrix decomposition in linear algebra, and the decomposition rule is the popularization of feature decomposition on any matrix.
Color channel: is the channel that holds the image color information.
Example 1
In accordance with an embodiment of the present invention, there is provided a method embodiment of a method for transmitting image data, where the steps illustrated in the flow chart of the figure may be performed in a computer system such as a set of computer executable instructions, and where a logical order is illustrated in the flow chart, in some cases, the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a transmission method of image data according to an embodiment of the present invention, as shown in fig. 1, the transmission method of image data including the steps of:
step S102, generating pure color image data corresponding to the image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted.
In this embodiment, generating the solid-color image data corresponding to the image data to be transmitted includes: determining each color channel of an image to be transmitted; and splitting the image to be transmitted according to each color channel to obtain pure color image data corresponding to each color channel.
For example, the image data to be transmitted may be split according to the color channels thereof to generate pure color image data corresponding to each color channel.
If the image data to be transmitted is a gray image, only gray image data corresponding to one gray channel exists; if the image data to be transmitted is an image in an RGB format, R, G, B has red image data, green image data and blue image data corresponding to the three channels 5363 respectively. Color pictures in other formats are similar and are split according to color channels.
It should be noted that the pure color image data corresponding to each color channel is a two-dimensional matrix.
And step S104, performing transformation processing on the matrix corresponding to the pure color image data, and encoding and encrypting the matrix after the transformation processing to obtain a lossless image data stream.
In an alternative embodiment, the transforming the matrix corresponding to the solid-color image data includes: decomposing the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel; multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices; and converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
For example, the SVD decomposition may be performed on the solid color image data (two-dimensional matrix) corresponding to each channel to generate three sub-matrices, and one solid color image data may correspond to the three sub-matrices.
Specifically, in the case of a gray-scale image, since there is only one pure-color image data, there are only three sub-matrices after decomposition of the gray-scale image. In the case of the color picture in the RGB format, since three pure color image data are associated and each of the pure color image data is decomposed into three sub-matrices, nine sub-matrices are total after the color picture in the RGB format is decomposed.
Wherein, the SVD decomposition can be shown as the following formula (1): m = U Σ V * In formula (1), Σ is a diagonal matrix; it should be noted that, among the three sub-matrices obtained by decomposing the pure color image data, one sub-matrix corresponds to the Σ matrix in equation (1), and the other two sub-matrices correspond to the U matrix and the V matrix in equation (1), respectively.
Next, two sub-matrices except the diagonal sub-matrix of the three sub-matrices corresponding to the pure color image data may be multiplied by two preset conversion matrices, respectively, to generate two new sub-matrices, which are denoted as U 'and V', and the diagonal sub-matrix is denoted as Σ.
In this embodiment, for better security, the sub-matrix after SVD decomposition may be further encrypted by a reversible method; for example, two transformation matrices may be preset, and U-corresponding sub-matrix and V-corresponding sub-matrix are respectively dot-multiplied by the two preset transformation matrices, as shown in formula (2) (U' = U × M) 1 ) And formula (3) (V' = V) * *M 2 ) Two new sub-matrices are generated, which are denoted as U 'and V' for convenience of description, and the diagonal sub-matrix without reversible transformation is denoted as Σ.
The conversion matrix may be generated in advance or may be generated temporarily. The transformation matrix is a random integer matrix and is required to be invertible.
Step S106, transmitting the lossless image data stream to the receiving end.
As can be seen from the above, in the embodiment of the present invention, the pure color image data corresponding to the image data to be transmitted is generated, where the pure color image data is image data obtained by decomposing each color channel based on the image data to be transmitted; carrying out transformation processing on a matrix corresponding to the pure color image data, and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream; the lossless image data stream is transmitted to the receiving end, so that the aim of obtaining the pure color image data by decomposing the image data to be transmitted according to the color channel and encrypting the pure color image data after decomposing and changing is achieved, and the technical effect of improving the safety in the file transmission process is achieved.
Therefore, the image data transmission method provided by the embodiment of the invention solves the technical problems that the file encryption mode in the related technology is low in safety, the file is easy to restore, and the transmission file is leaked.
In an alternative embodiment, encoding a matrix corresponding to the solid color image data includes: and respectively carrying out lossless coding on the new first sub-matrix, the preset conversion matrix and the vector.
For example, two newly generated sub-matrices U 'and V' among three sub-matrices corresponding to each solid-color image data are losslessly encoded; lossless encoding is carried out on two preset conversion matrixes (M1 and M2); the diagonal submatrices sigma are converted into vectors for lossless encoding.
Specifically, for the diagonal submatrix Σ, the non-zero elements therein are extracted and then converted into a vector form according to the column order, as shown in formula (4)
Figure BDA0002683354350000071
As shown. And carrying out lossless coding on the vector obtained by the diagonal submatrix sigma conversion.
In an alternative embodiment, the transmitting the lossless image data stream to the receiving end comprises: the lossless image data stream is transmitted to a receiving end through a plurality of channels.
In this embodiment, the encoded codestream (i.e., the lossless image data stream) is encrypted; and different matrices are transmitted through multiple channels to improve security.
It should be noted that the multiple channels may be logically divided or physically divided; wherein the security of the plurality of physical channels may be higher.
As can be seen from the above, according to the image data transmission method provided in the embodiment of the present invention, the original image data is split into the pure color image data corresponding to each color channel according to the color, then each pure color image data is split into three sub-matrices by using SVD decomposition, reversible transformation is performed on two of the sub-matrices, and then the self-matrix is encoded and encrypted, and then is sent to the receiving end, so that the security of image data transmission is effectively improved.
Example 2
According to another aspect of the embodiment of the present invention, there is also provided a method for transmitting image data, and fig. 2 is a flowchart of an optional method for transmitting image data according to an embodiment of the present invention, and as shown in fig. 2, the method for transmitting image data may include:
step S202, receiving the lossless image data stream transmitted by the transmitting end.
And step S204, decrypting the lossless image data stream to obtain a decrypted code stream.
Optionally, after receiving the encrypted code stream (i.e., the lossless image data stream), the receiving end decrypts the encrypted code stream by using a preset key to obtain a decrypted code stream, and parses preset conversion matrices (M1 and M2) and three sub-matrices (U ', V', and Σ) from the decrypted code stream.
It should be noted that the key may be randomly generated by the receiving end and then sent to the receiving end through a separate channel, or the key may be preset at both ends, and in the embodiment of the present invention, the generation manner and the obtaining manner of the key are not limited.
Step S206, obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on the image data to be transmitted.
In an optional embodiment, obtaining the original sub-matrix according to the codestream includes: analyzing a preset conversion matrix, a new first sub-matrix and a vector from the code stream, wherein the new first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrices based on the preset conversion matrix, the first sub-matrix is a non-diagonal matrix in the original sub-matrices, the vector is obtained by converting a second sub-matrix in the original sub-matrices, and the second sub-matrix is a diagonal matrix in the original sub-matrices; multiplying the new first sub-matrix by the inverse of a preset matrix to obtain a first sub-matrix; the vectors are reduced to a second sub-matrix.
For example, the sub-matrices U 'and V', respectively, may be multiplied by a preset transformation matrix (M) 1 And M 2 ) To obtain the original sub-matrices U and V * (ii) a And converting the vector into a diagonal submatrix Σ.
Specifically, the sub-matrices U 'and V' are respectively multiplied by a predetermined transformation matrix (M) 1 And M 2 ) To obtain the original sub-matrices U and V * Reference may be made to equations (5) and (6);
Figure BDA0002683354350000081
it should be noted that, for the diagonal submatrix Σ, it can be realized by referring to the rule of formula (4) in embodiment 1: firstly, the number of rows and columns of the square matrix is determined according to the number of elements in the vector. For example, there are 3 elements in the vector, and the number of rows and columns of the matrix is 3. Then, taking the 1 st element in the vector, and filling zero in the back to be used as the 1 st line; taking the 2 nd element in the vector, supplementing 1 zero in the front and supplementing zero in the back as the 2 nd line; taking the 3 rd element in the vector, supplementing 2 zeros in the front and supplementing zeros in the back to be used as a 3 rd line; and so on. In this way, the diagonal submatrix Σ can be obtained by conversion from the vector.
And step S208, obtaining pure color image data corresponding to each color channel according to the original sub-matrix.
Optionally, the pure color image data corresponding to each color channel may be restored according to an SVD decomposition formula.
Step S210, synthesizing to obtain image data to be transmitted based on the pure color image data corresponding to each color channel.
Optionally, the three sub-matrices may be reduced to pure color image data corresponding to the color channel based on an SVD decomposition formula; the pure color image data corresponding to each color channel are combined together to restore the original image.
Specifically, for the gray-scale image, only gray image data corresponding to one gray channel is needed, and then only three sub-matrices need to be restored to the gray image data of the gray color channel; for the picture in RGB format, the original image data can be obtained by recovering the pure color image data corresponding to the three color channels, and combining the three pure color image data.
As can be seen from the above, in the embodiment of the present invention, the lossless image data stream transmitted by the transmitting end is received; decrypting the lossless image data stream to obtain a decrypted code stream; obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is a matrix obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted; obtaining pure color image data corresponding to each color channel according to the original sub-matrix; the image data to be transmitted is obtained based on the synthesis of the pure color image data corresponding to each color channel, the aim of obtaining the pure color image data by decomposing the image data to be transmitted according to the color channels is achieved, the pure color image data is encrypted after being decomposed and changed, and the technical effect of improving the safety in the file transmission process is achieved.
Therefore, the image data transmission method provided by the embodiment of the invention solves the technical problems that the file encryption mode in the related technology is low in safety, the file is easy to restore, and the transmission file is easy to leak.
FIG. 3 is a flow chart of another method for transmitting image data according to an embodiment of the present invention, as shown in FIG. 3, the color channels of the original image can be separated; SVD decomposition is carried out on each channel (color channel), and each channel can obtain U, S, V three matrixes; generating a matrix transformation rule, and transforming the generated matrix; encoding the transformed matrix and the transformation rule; then encrypting each matrix and the transformation rule, and transmitting through different channels; and the receiving end decrypts the information after receiving the information, performs inverse transformation on the matrix according to a transformation rule, multiplies the matrix to obtain each color channel of the original image, and finally synthesizes the color channels into the original image.
As can be seen from the above, in the present invention, first, the original image data is split into the pure color image data corresponding to each color channel according to the color; then, decomposing each pure color image data into three sub-matrixes by using SVD; next, performing reversible transformation on two sub-matrixes; and finally, after the sub-matrix is coded, encrypting and sending the coded sub-matrix to a receiving end. The receiving end needs to decrypt the received image data, perform inverse transformation on the sub-matrix, decompose the inverse transformed sub-matrix by using SVD to obtain pure color image data, and combine a plurality of pure color image data to obtain the original image data.
Therefore, with the image data transmission method provided by the embodiment of the present invention, if the processes of splitting, decomposing and transforming and the reversible matrix are not known, even if the encryption key is obtained, the image data cannot be obtained from the encrypted data, and the security is high.
Example 3
According to another aspect of the embodiment of the present invention, there is also provided an image data transmission apparatus, and fig. 4 is a schematic diagram of an image data transmission apparatus according to an embodiment of the present invention, as shown in fig. 4, the image data transmission apparatus includes: a generating unit 41, a first acquiring unit 43 and a transmitting unit 45. The following describes the image data transmission device.
The generating unit 41 is configured to generate pure color image data corresponding to the image data to be transmitted, where the pure color image data is image data obtained by decomposing each color channel based on the image data to be transmitted.
The first obtaining unit 43 is configured to perform transformation processing on a matrix corresponding to the pure color image data, and encode and encrypt the matrix after the transformation processing, so as to obtain a lossless image data stream.
A transmission unit 45 for transmitting the lossless image data stream to the receiving end.
It should be noted here that the generating unit 41, the first acquiring unit 43, and the transmitting unit 45 correspond to steps S102 to S106 in embodiment 1, and the units are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1. It should be noted that the above-described elements as part of an apparatus may be implemented in a computer system, such as a set of computer-executable instructions.
As can be seen from the above, in the above embodiment of the present application, the generating unit may be used to generate the pure color image data corresponding to the image data to be transmitted, where the pure color image data is image data obtained by decomposing each color channel based on the image data to be transmitted; then, a first acquisition unit is used for carrying out transformation processing on a matrix corresponding to the pure-color image data, and the matrix after the transformation processing is coded and encrypted to obtain a lossless image data stream; and a transmission unit for transmitting the lossless image data stream to a receiving end. The image data transmission device provided by the embodiment of the invention realizes the purposes of obtaining the pure color image data by decomposing the image data to be transmitted according to the color channel and encrypting the pure color image data after decomposition and change, achieves the technical effect of improving the safety in the file transmission process, and further solves the technical problems that the file encryption mode in the related technology is low in safety, the file is easy to restore and the transmission file is easy to leak.
In an alternative embodiment, the generating unit comprises: the first determining module is used for determining each color channel of the image to be transmitted; and the splitting module is used for splitting the image to be transmitted according to each color channel to obtain pure color image data corresponding to each color channel.
In an alternative embodiment, the first obtaining unit includes: the decomposition module is used for decomposing the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel; the first obtaining module is used for multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices; and the second acquisition module is used for converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
In an alternative embodiment, the first obtaining unit is configured to include: and the coding module is used for carrying out lossless coding on the new first sub-matrix, the preset conversion matrix and the vector respectively.
In an alternative embodiment, the transmission unit includes: and the transmission module is used for transmitting the lossless image data stream to the receiving end through a plurality of channels.
Example 4
According to another aspect of the embodiment of the present invention, there is also provided an image data transmission apparatus, and fig. 5 is a schematic diagram of an alternative image data transmission apparatus according to the embodiment of the present invention, as shown in fig. 5, the image data transmission apparatus includes: a receiving unit 51, a decryption unit 53, a second acquisition unit 55, a third acquisition unit 57, and a combining unit 59. The following describes the image data transmission device.
The receiving unit 51 is configured to receive the lossless image data stream transmitted by the transmitting end.
And a decryption unit 53, configured to decrypt the lossless image data stream to obtain a decrypted code stream.
The second obtaining unit 55 is configured to obtain an original sub-matrix according to the code stream, where the original sub-matrix is a matrix obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted.
And a third obtaining unit 57, configured to obtain, according to the original sub-matrix, pure color image data corresponding to each color channel.
And a synthesizing unit 59, configured to synthesize the to-be-transmitted image data based on the pure color image data corresponding to each color channel.
It should be noted here that the receiving unit 51, the decrypting unit 53, the second obtaining unit 55, the third obtaining unit 57, and the synthesizing unit 59 correspond to steps S202 to S210 in embodiment 2, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the contents disclosed in embodiment 2. It should be noted that the above-described elements as part of an apparatus may be implemented in a computer system, such as a set of computer-executable instructions.
As can be seen from the above, in the above embodiments of the present application, a receiving unit may be utilized, configured to receive a lossless image data stream transmitted by a transmitting end; the decryption unit is used for decrypting the lossless image data stream to obtain a decrypted code stream; the second obtaining unit is used for obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is a matrix obtained by decomposing pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted; the third acquisition unit is used for acquiring pure color image data corresponding to each color channel according to the original sub-matrix; and the synthesis unit is used for synthesizing the pure color image data corresponding to each color channel to obtain the image data to be transmitted. The image data transmission device provided by the embodiment of the invention realizes the purposes of obtaining the pure color image data by decomposing the image data to be transmitted according to the color channel and encrypting the pure color image data after decomposition and change, achieves the technical effect of improving the safety in the file transmission process, and further solves the technical problems that the file encryption mode in the related technology is low in safety, the file is easy to restore and the transmission file is easy to leak.
Optionally, the second obtaining unit includes: the decoding module is used for decoding the code stream to obtain a first sub-matrix, a second sub-matrix and a vector, wherein the first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrix based on the first sub-matrix, the second sub-matrix is a diagonal matrix in the original sub-matrix, and the vector is a non-diagonal matrix in the original sub-matrix; the third obtaining module is used for multiplying the new first sub-matrix by the inverse of the preset matrix changing to obtain a first sub-matrix; and the restoring module is used for restoring the vector into the second sub-matrix.
Example 5
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored computer program, wherein when the computer program is executed by a processor, the apparatus where the computer storage medium is located is controlled to execute the image data transmission method of any one of the above.
Example 6
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a computer program, where the computer program executes to execute the image data transmission method of any one of the above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described in detail in a certain embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A method for transmitting image data, comprising:
generating pure color image data corresponding to image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted;
carrying out transformation processing on a matrix corresponding to the pure-color image data, and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream;
transmitting the lossless image data stream to a receiving end;
and performing transformation processing on the matrix corresponding to the pure color image data, wherein the transformation processing comprises the following steps:
performing singular value decomposition on the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel;
multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices;
and converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
2. The method of claim 1, wherein generating the solid color image data corresponding to the image data to be transmitted comprises:
determining each color channel of the image to be transmitted;
and splitting the image to be transmitted according to each color channel to obtain pure color image data corresponding to each color channel.
3. The method of claim 1, wherein encoding the matrix corresponding to the solid color image data comprises:
and lossless coding is respectively carried out on the new first sub-matrix, the preset conversion matrix and the vector.
4. The method of claim 3, wherein transmitting the lossless image data stream to a receiving end comprises:
and transmitting the lossless image data stream to the receiving end through a plurality of channels.
5. A method for transmitting image data, comprising:
receiving a lossless image data stream transmitted by a transmitting end;
decrypting the lossless image data stream to obtain a decrypted code stream;
obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is obtained by performing singular value decomposition on pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted;
obtaining pure color image data corresponding to each color channel according to the original sub-matrix;
synthesizing pure color image data corresponding to each color channel to obtain the image data to be transmitted;
obtaining an original sub-matrix according to the code stream, including:
analyzing a preset conversion matrix, a new first sub-matrix and a vector from the code stream, wherein the new first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrices based on the preset conversion matrix, the first sub-matrix is a non-diagonal matrix in the original sub-matrices, the vector is obtained by performing vector conversion on a second sub-matrix in the original sub-matrices, and the second sub-matrix is a diagonal matrix in the original sub-matrices;
multiplying the new first sub-matrix by the inverse of the preset conversion matrix to obtain the first sub-matrix;
and restoring the vector into the second sub-matrix.
6. An apparatus for transmitting image data, comprising:
the generating unit is used for generating pure color image data corresponding to the image data to be transmitted, wherein the pure color image data are image data obtained by decomposing each color channel based on the image data to be transmitted;
the first acquisition unit is used for carrying out transformation processing on the matrix corresponding to the pure color image data and coding and encrypting the matrix after the transformation processing to obtain a lossless image data stream;
a transmission unit for transmitting the lossless image data stream to a receiving end;
the first acquisition unit includes: the decomposition module is used for carrying out singular value decomposition on the pure color image data corresponding to each color channel to obtain an original sub-matrix of the pure color image data corresponding to each color channel; the first obtaining module is used for multiplying a first sub-matrix in the original sub-matrices by a preset conversion matrix respectively to obtain a new first sub-matrix, wherein the first sub-matrix is a non-diagonal matrix in the original sub-matrices; and the second obtaining module is used for converting a second sub-matrix in the original sub-matrix into a vector form to obtain a vector corresponding to the second sub-matrix, wherein the second sub-matrix is a diagonal matrix in the original sub-matrix.
7. An apparatus for transmitting image data, comprising:
the receiving unit is used for receiving the lossless image data stream transmitted by the transmitting end;
the decryption unit is used for decrypting the lossless image data stream to obtain a decrypted code stream;
the second obtaining unit is used for obtaining an original sub-matrix according to the code stream, wherein the original sub-matrix is a matrix obtained by performing singular value decomposition on pure color image data corresponding to each color channel, and the pure color image data is image data obtained by decomposing each color channel based on image data to be transmitted;
a third obtaining unit, configured to obtain, according to the original sub-matrix, pure color image data corresponding to each color channel;
the synthesizing unit is used for synthesizing the pure color image data corresponding to each color channel to obtain the image data to be transmitted;
a second acquisition unit comprising: the code stream processing module is used for processing the code stream to obtain a first sub-matrix, a second sub-matrix and a vector, wherein the first sub-matrix is a matrix obtained by converting a first sub-matrix in the original sub-matrix based on the preset conversion matrix; a third obtaining module, configured to multiply the new first sub-matrix by an inverse of the preset conversion matrix to obtain the first sub-matrix; and the restoring module is used for restoring the vector into the second sub-matrix.
8. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed by a processor, controls an apparatus in which the computer-readable storage medium is located to perform the method of transmitting image data according to any one of claims 1 to 5.
9. A processor for executing a computer program, wherein the computer program executes to perform the method for transmitting image data according to any one of claims 1 to 5.
CN202010968906.8A 2020-09-15 2020-09-15 Image data transmission method and device and computer readable storage medium Active CN112188119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010968906.8A CN112188119B (en) 2020-09-15 2020-09-15 Image data transmission method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010968906.8A CN112188119B (en) 2020-09-15 2020-09-15 Image data transmission method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112188119A CN112188119A (en) 2021-01-05
CN112188119B true CN112188119B (en) 2022-12-13

Family

ID=73921167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010968906.8A Active CN112188119B (en) 2020-09-15 2020-09-15 Image data transmission method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112188119B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3589111B2 (en) * 1998-09-04 2004-11-17 日本電信電話株式会社 Digital watermarking method and apparatus
KR100685784B1 (en) * 2005-08-17 2007-02-22 한국전자통신연구원 Apparatus and its method of quantization-based watermarking with improved security
JP6033725B2 (en) * 2013-03-28 2016-11-30 Kddi株式会社 Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, and program
CN110086953A (en) * 2019-03-12 2019-08-02 天津大学 The color image encrypting method with Gyrator transformation is decomposed based on QR
CN110365866B (en) * 2019-06-13 2021-09-14 首都师范大学 Color image encryption method and device

Also Published As

Publication number Publication date
CN112188119A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
Lian Efficient image or video encryption based on spatiotemporal chaos system
Zhang et al. A fast and efficient approach to color-image encryption based on compressive sensing and fractional Fourier transform
Wang et al. Secret image sharing with smaller shadow images
Ozturk et al. Analysis and comparison of image encryption algorithms
US10291392B2 (en) Method and system for encrypting data
Rehman et al. A novel robust dual diffusion/confusion encryption technique for color image based on Chaos, DNA and SHA-2
Chen et al. Compression-unimpaired batch-image encryption combining vector quantization and index compression
US20140248929A1 (en) Sudoku arrays
Itier et al. Recompression of JPEG crypto-compressed images without a key
EP3195519B1 (en) Encoder, decoder and methods employing partial data encryption
Deshmukh et al. Modified AES based algorithm for MPEG video encryption
US20070217607A1 (en) Repetition Coded Compression For Encrypting Highly Correlated Data
KR20150073753A (en) Apparatus and methdo for giving the compressed encryption functionality to integer-based homomorphic encryption schemes
CN101005603A (en) Method and device for enciphering, deenciphering and transfer code of image data
Khlif et al. Secure chaotic dual encryption scheme for H. 264/AVC video conferencing protection
Ponnaian et al. Crypt analysis of an image compression–encryption algorithm and a modified scheme using compressive sensing
CN112188119B (en) Image data transmission method and device and computer readable storage medium
AL-Laham Encryption-decryption RGB color image using matrix multiplication
Li et al. A secure and efficient entropy coding based on arithmetic coding
Qiu et al. A case study for practical issues of DCT based bitmap selective encryption methods
Banupriya et al. Video steganography using LSB algorithm for security application
CN111372083A (en) SHVC video encryption method based on interlayer processing
CN115134471A (en) Image encryption and decryption method and related equipment
Ghadi et al. Enhancing digital image integrity by exploiting JPEG bitstream attributes
Hashim et al. Secret image sharing based on wavelet transform

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