CN110766594A - Information hiding method and device, detection method and device and anti-counterfeiting tracing method - Google Patents

Information hiding method and device, detection method and device and anti-counterfeiting tracing method Download PDF

Info

Publication number
CN110766594A
CN110766594A CN201910934389.XA CN201910934389A CN110766594A CN 110766594 A CN110766594 A CN 110766594A CN 201910934389 A CN201910934389 A CN 201910934389A CN 110766594 A CN110766594 A CN 110766594A
Authority
CN
China
Prior art keywords
image
hidden information
intermediate frequency
target area
block
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.)
Granted
Application number
CN201910934389.XA
Other languages
Chinese (zh)
Other versions
CN110766594B (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.)
Shenzhen International Graduate School of Tsinghua University
Original Assignee
Shenzhen International Graduate School of Tsinghua University
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 Shenzhen International Graduate School of Tsinghua University filed Critical Shenzhen International Graduate School of Tsinghua University
Priority to CN201910934389.XA priority Critical patent/CN110766594B/en
Publication of CN110766594A publication Critical patent/CN110766594A/en
Application granted granted Critical
Publication of CN110766594B publication Critical patent/CN110766594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses an information hiding method and device, a detection method and device and an anti-counterfeiting tracing method, wherein the information hiding method comprises the following steps: converting the hidden information into a hidden information binary image and performing coding scrambling; performing discrete cosine transform on image subblocks in a blue channel image of the target area image according to the hidden information binary image; modifying the intermediate frequency coefficient meeting the preset requirement according to the pixel value of the pixel in the hidden information binary image corresponding to the image subblock to obtain a modified coefficient matrix; and performing inverse discrete cosine transformation on the modified coefficient matrix to obtain a blue channel image of the target area image embedded with the hidden information, and replacing the blue channel image of the target area image to obtain a carrier image embedded with the hidden information. The invention combines the invisibility of the hidden information of the transform domain, and embeds the hidden information into the carrier image by modifying the intermediate frequency coefficient which meets the preset requirement in the image subblock, thereby improving the robustness of information hiding.

Description

Information hiding method and device, detection method and device and anti-counterfeiting tracing method
Technical Field
The invention relates to the technical field of anti-counterfeiting traceability, in particular to an information hiding method and device, a detection method and device and an anti-counterfeiting traceability method.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the rapid development of computer technology and the internet, electronic information shows explosive growth, and the accompanying information security is of great importance. Based on this, information hiding techniques have been developed. Information hiding technology, namely information hiding, plays an important role in protecting information from being damaged in a future network, and the information hiding is a method for hiding confidential information in a large amount of information to prevent others from discovering the information. The information hiding method mainly comprises the following steps of steganography, digital watermarking technology, visible passwords, hidden channels, hiding protocols and the like.
The information hiding method mainly considers an information hiding technology based on a space domain and an information hiding technology based on a transform domain. The information hiding technology based on the airspace mainly adopts the LSB (Least significant bit) algorithm. The method replaces the least significant bit of the carrier image pixel with the bit of the binary information to be hidden by attention, thereby hiding the information to be hidden in the carrier image. Whereas transform domain based information hiding techniques mainly hide information by using different transforms. The commonly used transforms mainly include Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT), Discrete Fourier Transform (DFT), and the like.
However, the existing information hiding method is poor in robustness and cannot effectively resist the attack behaviors such as filtering, compression and the like.
Disclosure of Invention
The embodiment of the invention provides an information hiding method, which is used for improving robustness and effectively resisting filter, compression and other attack behaviors and comprises the following steps:
converting the hidden information into a hidden information binary image, and performing code scrambling on the hidden information binary image;
determining a target area image of the carrier image according to the hidden information binary image, and respectively performing discrete cosine transform on each image sub-block in a blue channel image of the target area image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
modifying the intermediate frequency coefficient of each image subblock meeting the preset requirement according to the pixel value of each pixel in the hidden information binary image corresponding to each image subblock to obtain a modified coefficient matrix of each image subblock;
performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block to obtain a blue channel image of a target area image embedded with hidden information;
and replacing the blue channel image of the target area image of the carrier image with the blue channel image of the target area image of the embedded hidden information to obtain the carrier image of the embedded hidden information.
The embodiment of the invention also provides an information hiding device, which is used for improving robustness and effectively resisting attack behaviors such as filtering, compression and the like, and comprises the following components:
the conversion and scrambling module is used for converting the hidden information into a hidden information binary image and carrying out coding scrambling on the hidden information binary image;
the discrete cosine transform module is used for determining a target area image of the carrier image according to the binary image of the hidden information and respectively performing discrete cosine transform on each image sub-block in a blue channel image of the target area image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
the intermediate frequency coefficient modification module is used for modifying the intermediate frequency coefficient of each image subblock meeting the preset requirement according to the pixel value of each pixel in the hidden information binary image corresponding to each image subblock to obtain a modified coefficient matrix of each image subblock;
the inverse discrete cosine transform module is used for performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block to obtain a blue channel image of a target area image in which information to be hidden is embedded;
and the replacing module is used for replacing the blue channel image of the target area image of the carrier image with the blue channel image of the target area image of the embedded hidden information to obtain the carrier image embedded with the hidden information.
The embodiment of the invention also provides a method for detecting the hidden information, which is used for effectively detecting the hidden information and comprises the following steps:
determining a target area image embedded with hidden information;
respectively carrying out discrete cosine transform on each image subblock in a blue channel image of a target area image embedded with hidden information, and determining a coefficient matrix of each image subblock;
determining a scrambled hidden information binary image according to the coefficient matrix of each image subblock; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
carrying out inverse scrambling corresponding to scrambling on the scrambled hidden information binary image, and determining a hidden information binary image;
and determining hidden information according to the hidden information binary image.
The embodiment of the invention also provides a device for detecting the hidden information, which is used for effectively detecting the hidden information and comprises the following components:
the target area image determining module is used for determining a target area image embedded with hidden information;
the second discrete cosine transform module is used for respectively carrying out discrete cosine transform on each image sub-block in the blue channel image of the target area image embedded with the hidden information and determining a coefficient matrix of each image sub-block;
the binary image determining module is used for determining a scrambled hidden information binary image according to each image subblock coefficient matrix; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
the reverse scrambling module is used for performing reverse scrambling corresponding to scrambling on the scrambled hidden information binary image to determine a hidden information binary image;
and the hidden information determining module is used for determining the hidden information according to the hidden information binary image.
The embodiment of the invention also provides an anti-counterfeiting tracing method for improving the information security, which comprises the following steps:
hiding the product identification code on the product packaging diagram by using the information hiding method in the embodiment;
extracting the product identification code on the product packaging diagram by using the method for detecting the hidden information in the embodiment;
and acquiring anti-counterfeiting traceability information of the product based on the anti-counterfeiting traceability system according to the product identification code.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the information hiding method or the method for detecting hidden information is implemented.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the above-mentioned information hiding method or hidden information detecting method is stored.
In the embodiment of the invention, the characteristic that human eyes have the worst blue light sensing capability is fully utilized, the binary image of the hidden information is mapped to the blue channel image of the target area image, the invisibility of the hidden information in a transform domain is utilized to perform discrete cosine transform on each image sub-block in the blue channel image of the target area image, and then the intermediate frequency coefficient of each image sub-block meeting the preset requirement is modified according to the pixel value of each pixel in the binary image of the hidden information corresponding to each image sub-block, so that the modified coefficient matrix of each image sub-block is obtained; and then, performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block, and finally replacing a blue channel image of the target area image to obtain a carrier image embedded with hidden information. The embodiment of the invention combines the invisibility of the hidden information of the transform domain, and modifies the intermediate frequency coefficient meeting the preset requirement in each image sub-block, so that the hidden information is embedded into the carrier image, the robustness of information hiding is improved, and the attack behaviors such as filtering, compression and the like are effectively resisted.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart illustrating an implementation of an information hiding method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an implementation of step 103 in the information hiding method according to an embodiment of the present invention;
fig. 3 is a flowchart of another implementation of step 103 in the information hiding method according to the embodiment of the present invention;
FIG. 4 is a functional block diagram of an information hiding apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an intermediate frequency coefficient modification module 403 in the information hiding apparatus according to the embodiment of the present invention;
fig. 6 is another block diagram of an intermediate frequency coefficient modification module 403 in the information hiding apparatus according to the embodiment of the present invention;
fig. 7 is a flowchart illustrating an implementation of a method for detecting hidden information according to an embodiment of the present invention;
fig. 8 is a flowchart illustrating an implementation of step 701 in a method for detecting hidden information according to an embodiment of the present invention;
fig. 9 is a flowchart illustrating an implementation of step 703 in a method for detecting hidden information according to an embodiment of the present invention;
FIG. 10 is a functional block diagram of an apparatus for detecting hidden information according to an embodiment of the present invention;
fig. 11 is a block diagram of a target area image determination module 1001 in an apparatus for detecting hidden information according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows an implementation flow of an information hiding method provided by an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown, and the details are as follows:
as shown in fig. 1, the information hiding method includes:
step 101, converting hidden information into a hidden information binary image, and performing code scrambling on the hidden information binary image;
step 102, determining a target area image of a carrier image according to the hidden information binary image, and respectively performing discrete cosine transform on each image sub-block in a blue channel image of the target area image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
103, modifying the intermediate frequency coefficient of each image sub-block meeting the preset requirement according to the pixel value of each pixel in the hidden information binary image corresponding to each image sub-block to obtain a modified coefficient matrix of each image sub-block;
104, performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block to obtain a blue channel image of a target area image embedded with hidden information;
and 105, replacing the blue channel image of the target area image of the carrier image with the blue channel image of the target area image of the embedded hidden information to obtain the carrier image of the embedded hidden information.
In the embodiment of the invention, when the hidden information is the character string information, the character string information is converted into the hidden information image, and the hidden information image is binarized to obtain the hidden information binary image. And when the hidden information is an image, directly carrying out binarization on the hidden information to form a hidden information binary image. Wherein, the binarization comprises Ostu binarization, bernsen binarization, Niblack binarization and the like. The hidden information binary image may be a two-dimensional code, or other binary images other than the two-dimensional code, or the like. The pixel value of each pixel in the hidden information binary image may be 0 or 1. When the hidden information binary image is subjected to code scrambling, the following scrambling algorithm can be adopted: arnold scrambling, chaotic random sequence scrambling, and pseudorandom sequence scrambling.
The carrier image is an original image carrying hidden information, which may be, for example, an image on a product package, etc. The target area image is an area portion of the carrier image, and the size of the visible target area image is smaller than that of the carrier image. In order to facilitate the subsequent discrete cosine transform of the target area image, the target area image needs to be partitioned, that is, the target area image is divided into a plurality of image sub-blocks, the size of the image sub-block is k pixels × k pixels (k is a positive integer), and each image sub-block corresponds to one pixel of the binary image of the hidden information. Therefore, the size of the target area image can be determined according to the size of the hidden information binary image and the size of the image subblock during discrete cosine transform, and the target area image can be further determined at any position on the carrier image.
For example, if the size of the hidden information binary image is 40 × 40 pixels, and the size of the image sub-block corresponding to one pixel of the hidden information binary image is 8 × 8 pixels, the size of the target area image is 320 × 320 pixels.
In an embodiment of the present invention, after determining the target area image of the carrier image according to the hidden information binary image in step 102, the method further includes:
performing histogram compression on the blue channel image of the target area image to obtain a blue channel image of the target area image after the histogram compression;
in step 102, performing discrete cosine transform on each image sub-block in the blue channel image of the target area image, respectively, including:
and respectively carrying out discrete cosine transform on each image sub-block in the blue channel image of the target area image after the histogram compression.
Histogram compression can compress image pixels from 0-255 to 10-245, which can increase information redundancy.
After the target area image is determined, in view of the worst perception capability of human eyes to blue in three colors of red, yellow and blue, in order to improve invisibility and robustness, discrete cosine transform is respectively performed on each image sub-block in a blue channel image of the target area image to determine a coefficient matrix of each image sub-block. The coefficient matrix of each image sub-block comprises a low-frequency coefficient, a medium-frequency coefficient and a high-frequency coefficient. The change of the low-frequency coefficient has great influence on invisibility, the high-frequency coefficient is easily influenced by various noises, the modification of the medium-frequency coefficient has little influence on the image quality, and simultaneously, the distortion caused by most noises can be resisted.
And modifying the intermediate frequency coefficient of the image subblock meeting the preset requirement based on the pixel value of each pixel in the hidden information binary image corresponding to the image subblock, and then performing inverse discrete cosine transform on the modified coefficient matrix to obtain the blue channel image of the target area image embedded with the hidden information. And finally, replacing the blue channel image of the target area image which is not embedded with the hidden information with the blue channel image of the target area image which is embedded with the hidden information, thereby obtaining the carrier image embedded with the hidden information.
In the embodiment of the invention, the characteristic that human eyes have the worst blue light sensing capability is fully utilized, the binary image of the hidden information is mapped to the blue channel image of the target area image, the invisibility of the hidden information in a transform domain is utilized to perform discrete cosine transform on each image sub-block in the blue channel image of the target area image, and then the intermediate frequency coefficient meeting the preset requirement of each image sub-block is modified according to the pixel value of each pixel in the binary image of the hidden information corresponding to each image sub-block, so as to obtain the modified coefficient matrix of each image sub-block; and then, performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block, and finally replacing a blue channel image of the target area image to obtain a carrier image embedded with hidden information. The embodiment of the invention combines the invisibility of the hidden information of the transform domain, and modifies the intermediate frequency coefficient meeting the preset requirement in each image sub-block, so that the hidden information is embedded into the carrier image, the robustness of information hiding is improved, and the attack behaviors such as filtering, compression and the like are effectively resisted.
In an embodiment of the present invention, discrete cosine transform is specifically performed on each image sub-block in the blue channel image by using the following formula:
when u is equal to 0, the reaction is carried out,otherwise
Figure BDA0002221116090000063
When v is equal to 0, the voltage is set to 0,
Figure BDA0002221116090000064
otherwise
Figure BDA0002221116090000065
Wherein, X (u, v) represents a coefficient matrix of the image subblock after discrete cosine transform, u represents an abscissa generalized frequency, v represents an ordinate generalized frequency, M represents the row number of the image subblock, N represents the column number of the image subblock, auRepresenting the abscissa transformation coefficient, avDenotes an ordinate transform coefficient, row is 0,1, …, M-1 denotes a row number of an image subblock, col is 0,1, …, N-1 denotes a column number of an image subblock, and x denotes a column number of an image subblockrow,colRepresenting the pixel values of row col of the image sub-block.
In an embodiment of the present invention, the intermediate frequency coefficient satisfying the preset requirement in each image sub-block may be determined by the following formula:
mi + mj ═ k +1, k being an even number greater than 0;
mi is more than or equal to 1 and less than or equal to k, and mj is more than or equal to 1 and less than or equal to k;
where mi represents the row number of the intermediate frequency coefficient in the image sub-block coefficient matrix, mj represents the column number of the intermediate frequency coefficient in the image sub-block coefficient matrix, and k represents the pixel size of each image sub-block.
Fig. 2 shows an implementation flow of step 103 in the information hiding method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to further improve the robustness, as shown in fig. 2, step 103, modifying the intermediate frequency coefficient, which satisfies the preset requirement, of each image sub-block according to the pixel value of each pixel in the binary image of the hidden information corresponding to each image sub-block, to obtain a modified coefficient matrix of each image sub-block, includes:
step 201, when the pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 0, sequentially determining an original intermediate frequency coefficient and an original position of the original intermediate frequency coefficient in a coefficient matrix, wherein the original intermediate frequency coefficient and the original position meet preset requirements in the image subblock;
step 202, after arranging the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks in the descending order, sequentially placing the original intermediate frequency coefficients at the original positions of the original intermediate frequency coefficients in the coefficient matrix according to the same order as the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks, and obtaining the coefficient matrix after each image sub-block is modified.
The embodiments of the present invention are described herein with specific examples. Assuming that the size of the image sub-block is 8 × 8, i.e., k is 8, the intermediate frequency coefficients satisfying the preset requirement are sequentially determined as a coefficient g1 at the position of the eighth column (mi is 1, mj is 8), a coefficient g2 at the position of the seventh column (mi is 2, mj is 7), a coefficient g3 at the position of the sixth column (mi is 3, mj is 6), a coefficient g4 at the position of the fifth column (mi is 4, mj is 5), a coefficient g5 at the position of the fourth column (mi is 5, mj is 4), a coefficient g6 at the position of the third column (mi is 6, mj is 3), a coefficient g7 at the position of the second column (mi is 7, mj is 2), and a coefficient g8 at the position of the first column (mi is 8, mj is 1) in the coefficient matrix.
When the pixel value of the pixel in the binary hidden information image corresponding to the image sub-block is 0, arranging the original intermediate frequency coefficients g 1-g 8 meeting the preset requirement in the image sub-block in descending order, assuming that the final ordering result is g5 > g3 > g1 > g6 > g4 > g7 > g2 > g8, sequentially placing the intermediate frequency coefficient g5 at the first row and the eighth column position, placing the intermediate frequency coefficient g3 at the second row and the seventh column position, placing the intermediate frequency coefficient g4 at the fifth row and the fourth column position, placing the intermediate frequency coefficient g7 at the sixth row and the third column position, placing the intermediate frequency coefficient g2 at the seventh row and the second column position, placing the intermediate frequency coefficient g8 at the eighth row and the first column position according to the same sequence as the original intermediate frequency coefficient which meets the preset requirement in the image subblock, and further obtaining a coefficient matrix modified by the image subblock, wherein the hidden information is hidden in a blue channel image of the target area image.
Fig. 3 shows another implementation flow of step 103 in the information hiding method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to further improve the robustness, as shown in fig. 3, step 103, modifying the intermediate frequency coefficient, which satisfies the preset requirement, of each image sub-block according to the pixel value of each pixel in the binary image of the hidden information corresponding to each image sub-block, to obtain a modified coefficient matrix of each image sub-block, includes:
step 301, when the pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 1, sequentially determining an original intermediate frequency coefficient and an original position of the original intermediate frequency coefficient in a coefficient matrix, which meet preset requirements, in the image subblock;
step 302, after arranging the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks in the order from small to large, sequentially placing the original intermediate frequency coefficients at the original positions in the coefficient matrix according to the same order as the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks, and obtaining the coefficient matrix after each image sub-block is modified.
Similar to the corresponding embodiment of fig. 2, assuming that the size of the image sub-block is 8 × 8, i.e., k is 8, the intermediate frequency coefficients satisfying the preset requirement are sequentially determined as a coefficient g1 at the position of the eighth column (mi is 1, mj is 8), a coefficient g2 at the position of the seventh column (mi is 2, mj is 7), a coefficient g3 at the position of the sixth column (mi is 3, mj is 6), a coefficient g4 at the position of the fifth column (mi is 4, mj is 5), a coefficient g5 at the position of the fourth column (mi is 5, mj is 4), a coefficient g6 at the position of the third column (mi is 6, mj is 3), a coefficient g7 at the position of the second column (mi is 7, mj is 2), and a coefficient g8 at the position of the eighth column (mi is 1) in the coefficient matrix.
When the pixel value of the pixel in the binary hidden information image corresponding to the image sub-block is 1, arranging the original intermediate frequency coefficients g1 to g8 meeting the preset requirement in the image sub-block in the order from small to large, assuming that the final ordering result is g5 < g3 < g1 < g6 < g4 < g7 < g2 < g8, sequentially placing the intermediate frequency coefficient g5 at the first row and the eighth column position, placing the intermediate frequency coefficient g3 at the second row and the seventh column position, placing the intermediate frequency coefficient g4 at the fifth row and the fourth column position, placing the intermediate frequency coefficient g7 at the sixth row and the third column position, placing the intermediate frequency coefficient g2 at the seventh row and the second column position, placing the intermediate frequency coefficient g3 at the eighth row and the first column position according to the same sequence as the original intermediate frequency coefficient which meets the preset requirement in the image subblock, and further obtaining a coefficient matrix modified by the image subblock, wherein the hidden information is hidden in a blue channel image of the target area image.
In an embodiment of the present invention, the modified coefficient matrix of each image sub-block is inverse discrete cosine transformed by the following formula:
Figure BDA0002221116090000091
when u is equal to 0, the reaction is carried out,
Figure BDA0002221116090000092
otherwise
Figure BDA0002221116090000093
When v is equal to 0, the voltage is set to 0,
Figure BDA0002221116090000094
otherwise
Figure BDA0002221116090000095
Wherein, yrow,colExpressing the pixel value of the row and column of row of an image subblock after inverse discrete cosine transform, Y (u, v) expressing a coefficient matrix after the image subblock is modified, u expressing an abscissa generalized frequency, v expressing an ordinate generalized frequency, M expressing the row number of the image subblock, N expressing the column number of the image subblock, auRepresenting the abscissa transformation coefficient, avIndicating the ordinate transform coefficient, row is 0,1, …, M-1 indicates the row number of the image subblock, and col is 0,1, …, N-1 indicates the column number of the image subblock.
An information hiding device is further provided in the embodiments of the present invention, as described in the following embodiments. Because the principle of these devices for solving the problems is similar to the information hiding method, the implementation of these devices can be referred to the implementation of the method, and the repeated details are not repeated.
Fig. 4 shows functional modules of an information hiding apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
referring to fig. 4, each module included in the information hiding device is used to execute each step in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which is not repeated herein. In the embodiment of the present invention, the information hiding device includes a conversion and scrambling module 401, a discrete cosine transform module 402, an intermediate frequency coefficient modification module 403, an inverse discrete cosine transform module 404, and a replacement module 405.
And a converting and scrambling module 401, configured to convert the hidden information into a hidden information binary image, and perform encoding scrambling on the hidden information binary image.
A discrete cosine transform module 402, configured to determine a target region image of the carrier image according to the binary image of the hidden information, and perform discrete cosine transform on each image sub-block in a blue channel image of the target region image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image, respectively.
An intermediate frequency coefficient modifying module 403, configured to modify an intermediate frequency coefficient, which satisfies a preset requirement, of each image sub-block according to a pixel value of each pixel in a binary image of hidden information corresponding to each image sub-block, so as to obtain a modified coefficient matrix of each image sub-block.
And an inverse discrete cosine transform module 404, configured to perform inverse discrete cosine transform on the coefficient matrix modified by each image sub-block, to obtain a blue channel image of the target area image in which the information to be hidden has been embedded.
And a replacing module 405, configured to replace the blue channel image of the target area image of the carrier image with the blue channel image of the target area image in which the hidden information has been embedded, to obtain the carrier image in which the hidden information is embedded.
In the embodiment of the invention, the characteristic that human eyes have the worst blue light sensing capability is fully utilized, the binary image of the hidden information is mapped to the blue channel image of the target area image, the invisibility of the hidden information in a transform domain is utilized, the discrete cosine transform module 402 respectively performs discrete cosine transform on each image sub-block in the blue channel image of the target area image, and then the intermediate frequency coefficient modification module 403 modifies the intermediate frequency coefficient, which meets the preset requirement, of each image sub-block according to the pixel value of each pixel in the binary image of the hidden information corresponding to each image sub-block, so as to obtain the modified coefficient matrix of each image sub-block; then, the inverse discrete cosine transform module 404 performs inverse discrete cosine transform on the modified coefficient matrix of each image sub-block, and finally the replacement module 405 replaces the blue channel image of the target area image to obtain the carrier image embedded with the hidden information. The embodiment of the invention combines the invisibility of the hidden information of the transform domain, and modifies the intermediate frequency coefficient meeting the preset requirement in each image sub-block, so that the hidden information is embedded into the carrier image, the robustness of information hiding is improved, and the attack behaviors such as filtering, compression and the like are effectively resisted.
Fig. 5 shows a structural schematic diagram of an intermediate frequency coefficient modification module 403 in the information hiding apparatus provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
in an embodiment of the present invention, in order to further improve robustness, referring to fig. 5, each unit included in the intermediate frequency coefficient modification module 403 is configured to perform each step in the embodiment corresponding to fig. 2, and specifically please refer to fig. 2 and the related description in the embodiment corresponding to fig. 2, which is not repeated herein. In the embodiment of the present invention, the intermediate frequency coefficient modification module 403 includes a first order determination unit 501 and a first order adjustment unit 502.
A first sequential determining unit 501, configured to sequentially determine, when a pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 0, an original intermediate frequency coefficient and an original position of the original intermediate frequency coefficient in a coefficient matrix, where the original intermediate frequency coefficient meets a preset requirement in the image subblock;
the first sequential adjustment unit 502 is configured to arrange the original intermediate frequency coefficients that meet the preset requirement in the image sub-blocks in a descending order, and then sequentially put the original positions of the original intermediate frequency coefficients in the coefficient matrix in the same order as the original intermediate frequency coefficients that meet the preset requirement in the image sub-blocks, so as to obtain a modified coefficient matrix of each image sub-block.
Fig. 6 shows another structural schematic diagram of the intermediate frequency coefficient modification module 403 in the information hiding apparatus provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
in an embodiment of the present invention, in order to further improve robustness, referring to fig. 6, each unit included in the intermediate frequency coefficient modification module 403 is configured to perform each step in the embodiment corresponding to fig. 3, and specifically, please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3, which is not described herein again. In this embodiment of the present invention, the intermediate frequency coefficient modification module 403 includes: a second order determination unit 601 and a second order adjustment unit 602.
A second sequential determining unit 601, configured to sequentially determine, when a pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 1, an original intermediate frequency coefficient and an original position of the original intermediate frequency coefficient in a coefficient matrix, where the original intermediate frequency coefficient meets a preset requirement in the image subblock;
the second sequential adjustment unit 602 is configured to arrange the original intermediate frequency coefficients that meet the preset requirement in the image sub-blocks in a descending order, and then sequentially put the original positions of the original intermediate frequency coefficients in the coefficient matrix in the same order as the original intermediate frequency coefficients that meet the preset requirement in the image sub-blocks, so as to obtain a modified coefficient matrix of each image sub-block.
Fig. 7 illustrates an implementation flow of the method for detecting hidden information according to the embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown, and the following details are described below:
as shown in fig. 7, the method for detecting hidden information includes:
step 701, determining a target area image embedded with hidden information;
step 702, respectively performing discrete cosine transform on each image subblock in a blue channel image of a target area image embedded with hidden information, and determining a coefficient matrix of each image subblock;
703, determining a scrambled hidden information binary image according to the coefficient matrix of each image sub-block; each image subblock in a blue channel image of a target area image embedded with hidden information corresponds to each pixel in a hidden information binary image respectively;
step 704, performing inverse scrambling corresponding to the scrambling on the scrambled binary image of the hidden information, and determining a binary image of the hidden information;
step 705, determining hidden information according to the hidden information binary image.
For efficient detection of hidden information, first a target area image in which the hidden information is embedded may be determined. For example, knowing the information hiding method, the position of the target area image on the carrier image can be known, and the target area image in which the hidden information is embedded can be directly determined from the carrier image.
Then, discrete cosine transform is respectively carried out on each image sub-block in the blue channel image of the target area image embedded with the hidden information, a coefficient matrix of each image sub-block in the blue channel image of the target area image embedded with the hidden information can be obtained, and the scrambled hidden information binary image can be determined according to the coefficient matrix of each image sub-block. Likewise, each image subblock in the blue channel image of the target area image in which the hidden information is embedded corresponds to each pixel in the hidden information binary image, respectively.
And carrying out inverse scrambling on the scrambled hidden information binary image to obtain a hidden information binary image. The inverse scramble here is an inverse scramble algorithm corresponding to a scramble algorithm when scrambling a binary image of hidden information in the information hiding method. And obtaining a hidden information binary image by inverse scrambling, and further determining hidden information according to the hidden information binary image.
In the embodiment of the invention, each image sub-block in the blue channel image of the target area image embedded with the hidden information is respectively subjected to discrete cosine transform, and the coefficient matrix of each image sub-block is determined; determining a scrambled hidden information binary image according to the coefficient matrix of each image subblock; and performing inverse scrambling corresponding to scrambling on the scrambled hidden information binary image, and finally determining the hidden information according to the hidden information binary image, so that the hidden information in the carrier image can be effectively detected, and the safety of information hiding is improved.
Fig. 8 illustrates an implementation flow of step 701 in the method for detecting hidden information according to the embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, as shown in fig. 8, step 701, determining an image of a target area in which hidden information is embedded, includes:
step 801, acquiring an image to be detected of a printed carrier image embedded with hidden information through image acquisition equipment;
and step 802, determining a target area image embedded with hidden information by using scale invariant feature transformation according to the image to be detected.
In order to resist information distortion generated in the photographing-printing process, the carrier image embedded with the hidden information can be printed first, and then the to-be-detected image of the printed carrier image embedded with the hidden information is acquired through the image acquisition equipment. The image acquisition device can be, for example, a camera of a mobile terminal or the like, or a scanning and photographing device of other handheld terminals or the like. After an image to be detected containing a carrier image is determined, a target area image embedded with hidden information in the carrier image is determined by utilizing scale-invariant feature transformation.
In the method, Scale-invariant feature transform (Scale-invariant feature transform, abbreviated as SIFT), since a picture taken by a camera (i.e., an image to be detected in the embodiment of the present invention) has a certain geometric deformation, image registration and geometric correction are required. The image registration is to find the space mapping relation from one image pixel to another image pixel and estimate the projective transformation matrix by matching the characteristic points to complete the geometric correction. The invention provides an image registration method based on SIFT features. The SIFT features are local features of the image, the rotation, scale scaling and brightness change of the image are kept unchanged, the stability of the view angle change, affine transformation and noise is kept to a certain degree, the information content is rich, the method is suitable for fast and accurately matching in a massive feature database, and even a few objects can generate a large amount of SIFT feature vectors. By extracting SIFT feature points of an image to be detected and a carrier image, and taking Euclidean distance of feature vectors of the key points as similarity judgment measurement of the key points in the two images, four pairs of feature points with the most accurate matching result are found, then a projective transformation Homographies matrix is calculated, finally the image to be detected can be corrected to be under a carrier image coordinate system, and a target area image embedded with hidden information is further determined.
Fig. 9 shows an implementation flow of step 703 in the method for detecting hidden information according to the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in step 703, determining a scrambled hidden information binary image according to a coefficient matrix of each image sub-block, includes:
step 901, sequentially determining k intermediate frequency coefficients meeting preset requirements according to the coefficient matrix of each image subblock;
step 902, if the k intermediate frequency coefficients in the image sub-block meet the preset requirement
Figure BDA0002221116090000131
The average value of the intermediate frequency coefficient is larger than
Figure BDA0002221116090000132
Determining the pixel value of a pixel corresponding to the image sub-block in the scrambled hidden information binary image to be 0 by the average value of the intermediate frequency coefficients;
step 903, if the k intermediate frequency coefficients in the image sub-block meet the preset requirement
Figure BDA0002221116090000133
The average value of the intermediate frequency coefficient is less than
Figure BDA0002221116090000134
And determining the pixel value of the pixel corresponding to the image sub-block in the scrambled hidden information binary image to be 1 by the average value of the intermediate frequency coefficients.
The process of determining the if coefficient meeting the preset requirement in the embodiment of the present invention is the same as the process of determining the if coefficient meeting the preset requirement in the information hiding method, and for details, reference is made to the description of the related embodiments above, and details are not described here.
In the information hiding method, when the pixel value of a pixel corresponding to an image sub-block in a hidden information binary image is 0, the intermediate frequency coefficients meeting the requirements are readjusted according to the sequence from large to small, and the average value of the former intermediate frequency coefficients is definitely larger than the average value of the latter intermediate frequency coefficients; when the pixel value of the corresponding pixel of the image sub-block in the hidden information binary image is 1, the intermediate frequency coefficients meeting the requirements are readjusted according to the sequence from small to large, and the average value of the former intermediate frequency coefficients is definitely smaller than the average value of the latter intermediate frequency coefficients.
Based on the existence of such a magnitude relationship, in the method of detecting hidden information corresponding to the information hiding method, the pixel values of the pixels corresponding to the image sub-blocks in the hidden information binary image may be determined based on the magnitude relationship between the average value of the intermediate frequency coefficients of the first half and the average value of the intermediate frequency coefficients of the second half.
When the image sub-block meets the preset requirement of k intermediate frequency coefficients
Figure BDA0002221116090000135
The average value of the intermediate frequency coefficient is larger than
Figure BDA0002221116090000136
When the average value of the intermediate frequency coefficients is obtained, the intermediate frequency coefficients in the information hiding method are arranged in the descending order, and at this time, the pixel value of the pixel corresponding to the image sub-block in the scrambled hidden information binary image can be determined to be 0.
When the image sub-block meets the preset requirement of k intermediate frequency coefficients
Figure BDA0002221116090000137
The average value of the intermediate frequency coefficient is less than
Figure BDA0002221116090000138
When the average value of the intermediate frequency coefficients is obtained, the intermediate frequency coefficients in the information hiding method are arranged from small to large, and at this time, the pixel value of the pixel corresponding to the image sub-block in the scrambled hidden information binary image can be determined to be 1.
Accordingly, the scrambled hidden information binary image can be determined.
The embodiment of the present invention further provides a device for detecting hidden information, as described in the following embodiments. Since the principle of these devices to solve the problem is similar to the method of detecting hidden information, the implementation of these devices can be referred to the implementation of the method, and repeated descriptions are omitted.
Fig. 10 shows functional modules of an apparatus for detecting hidden information according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
referring to fig. 10, each module included in the apparatus for detecting hidden information is configured to perform each step in the embodiment corresponding to fig. 7, and please refer to fig. 7 and the related description in the embodiment corresponding to fig. 7 for details, which are not described herein again. In this embodiment of the present invention, the apparatus for detecting hidden information includes a target area image determining module 1001, a second discrete cosine transform module 1002, a binary image determining module 1003, an inverse scrambling module 1004, and a hidden information determining module 1005.
A target area image determining module 1001 configured to determine a target area image embedded with hidden information.
The second discrete cosine transform module 1002 is configured to perform discrete cosine transform on each image sub-block in the blue channel image of the target area image in which the hidden information is embedded, and determine a coefficient matrix of each image sub-block.
A binary image determining module 1003, configured to determine a scrambled hidden information binary image according to each image subblock coefficient matrix; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image, respectively.
And an inverse scrambling module 1004, configured to perform inverse scrambling corresponding to the scrambling on the scrambled binary image of the hidden information, and determine a binary image of the hidden information.
A hidden information determining module 1005, configured to determine hidden information according to the hidden information binary image.
In the embodiment of the present invention, the second discrete cosine transform module 1002 performs discrete cosine transform on each image sub-block in the blue channel image of the target area image in which the hidden information is embedded, and determines a coefficient matrix of each image sub-block; further, the binary image determining module 1003 determines a scrambled hidden information binary image according to the coefficient matrix of each image sub-block; the reverse scrambling module 1004 performs reverse scrambling corresponding to the scrambling on the scrambled binary image of the hidden information, and finally the hidden information determining module 1005 determines the hidden information according to the binary image of the hidden information, so that the hidden information in the carrier image can be effectively detected, and the security of information hiding is improved.
Fig. 11 shows a schematic structure of a target area image determination module 1001 in an apparatus for detecting hidden information according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
in an embodiment of the present invention, referring to fig. 11, each unit included in the target area image determining module 1001 is configured to execute each step in the embodiment corresponding to fig. 8, specifically please refer to fig. 8 and the related description in the embodiment corresponding to fig. 8, which is not described herein again. In this embodiment of the present invention, the target area image determining module 1101 includes an image to be detected acquiring unit 1101 and a target area image determining unit 1102.
An image to be detected acquisition unit 1101 configured to acquire, by an image acquisition device, an image to be detected of the printed carrier image embedded with the hidden information;
and a target area image determining unit 1102, configured to determine, according to the image to be detected, a target area image in which the hidden information is embedded in the carrier image by using scale-invariant feature transformation.
In the embodiment of the present invention, the to-be-detected image acquiring unit 1101 acquires, by using an image acquiring device, an to-be-detected image of a printed carrier image embedded with hidden information, and the target area image determining unit 1102 determines, according to the to-be-detected image, a target area image embedded with hidden information in the carrier image by using scale invariant feature transformation, so that information distortion generated in the photographing-printing process can be resisted.
The applicant finds that the current commodity tracing technology mainly depends on RFID and two-dimension code tracing technology. RFID technology, also known as RFID, can identify a specific object and read and write related data via radio signals without establishing mechanical or optical contact between the identification system and the specific object. However, the RFID system has disadvantages of high cost, requiring introduction of additional hardware facilities for identification, being used only for high value-added goods, and being easily forged. The two-dimension code tracing technology is a two-dimension code with a tracing function printed on a tracing label or a product package, and source tracing can be achieved whenever a product goes wrong. However, the two-dimensional code tracing technology has the defects of being easy to forge and replace, and the like.
In addition, an invisible two-dimensional code anti-counterfeiting technology is also available on the market, and the two-dimensional bar code is output in a printing or printing mode by using colorless invisible consumables (such as fluorescent ink, fluorescent carbon powder, fluorescent color tape, infrared ink and the like), is invisible to naked eyes in a normal state, and can be read by a special reader. The technology has the characteristic of being incapable of scanning and copying, but specific consumables are required for manufacturing the technology.
Therefore, the applicant finds that the existing tracing technologies all have serious problems, namely, pirate manufacturers can also read information by the same means, copying is only a problem of time and cost, and then piracy can be carried out, and the security degree is not high.
In order to solve the problems of high anti-counterfeiting traceability cost and low security, the information hiding method and the method for detecting hidden information provided by the embodiment of the invention can be applied to the anti-counterfeiting traceability process of products. Specifically, the unique product identification code can be generated firstly, the unique product identification code is embedded into a product package image through the information hiding method, the unique product identification code is shot by a user through terminal equipment comprising a camera through a traceable logistics transportation process to the hand of the user, the unique product identification code is extracted by a method for detecting hidden information, and the comprehensive anti-counterfeiting traceability information such as production, storage, distribution, logistics transportation and the like of the product is acquired by combining a logistics tracing anti-counterfeiting traceability system. The product unique identification code is invisible to naked eyes, pirate reading and breaking are effectively prevented, imitation cannot be carried out, counterfeit phenomena are avoided, product quality safety is ensured, and the product unique identification code has the characteristics of high reliability, low cost, easiness in popularization and the like. In addition, the whole logistics tracking anti-counterfeiting traceability system can be supported by a block chain technology, centralized operation is achieved, and the reliability of anti-counterfeiting traceability is guaranteed.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above information hiding method or a method for detecting hidden information when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above information hiding method or the method for detecting hidden information is stored in the computer-readable storage medium.
In summary, in the embodiment of the present invention, the characteristic that human eyes have the worst ability to perceive blue light is fully utilized, the binary image of hidden information is mapped to the blue channel image of the target region image, the invisibility of the hidden information in the transform domain is utilized to perform discrete cosine transform on each image sub-block in the blue channel image of the target region image, and then the intermediate frequency coefficient, which satisfies the preset requirement, of each image sub-block is modified according to the pixel value of each pixel in the binary image of hidden information corresponding to each image sub-block, so as to obtain the modified coefficient matrix of each image sub-block; and then, performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block, and finally replacing a blue channel image of the target area image to obtain a carrier image embedded with hidden information. The embodiment of the invention combines the invisibility of the hidden information of the transform domain, and modifies the intermediate frequency coefficient meeting the preset requirement in each image sub-block, so that the hidden information is embedded into the carrier image, the robustness of information hiding is improved, and the attack behaviors such as filtering, compression and the like are effectively resisted.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. An information hiding method, comprising:
converting the hidden information into a hidden information binary image, and performing code scrambling on the hidden information binary image;
determining a target area image of the carrier image according to the hidden information binary image, and respectively performing discrete cosine transform on each image sub-block in a blue channel image of the target area image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
modifying the intermediate frequency coefficient of each image subblock meeting the preset requirement according to the pixel value of each pixel in the hidden information binary image corresponding to each image subblock to obtain a modified coefficient matrix of each image subblock;
performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block to obtain a blue channel image of a target area image embedded with hidden information;
and replacing the blue channel image of the target area image of the carrier image with the blue channel image of the target area image of the embedded hidden information to obtain the carrier image of the embedded hidden information.
2. The information hiding method as claimed in claim 1, wherein the intermediate frequency coefficient satisfying the preset requirement in each image sub-block is determined by the following formula:
mi + mj ═ k +1, k being an even number greater than 0;
mi is more than or equal to 1 and less than or equal to k, and mj is more than or equal to 1 and less than or equal to k;
where mi represents the row number of the intermediate frequency coefficient in the image sub-block coefficient matrix, mj represents the column number of the intermediate frequency coefficient in the image sub-block coefficient matrix, and k represents the pixel size of each image sub-block.
3. The information hiding method of claim 1, wherein modifying the intermediate-frequency coefficient of each image sub-block according to the pixel value of each pixel in the hidden information binary image corresponding to each image sub-block to obtain the modified coefficient matrix of each image sub-block comprises:
when the pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 0, sequentially determining an original intermediate frequency coefficient meeting a preset requirement in the image subblock and an original position of the original intermediate frequency coefficient in a coefficient matrix;
arranging the original intermediate frequency coefficients meeting the preset requirement in the image subblocks in a descending order, and sequentially placing the original intermediate frequency coefficients at the original positions of the original intermediate frequency coefficients in the coefficient matrix according to the same order as the original intermediate frequency coefficients meeting the preset requirement in the image subblocks to obtain a modified coefficient matrix of each image subblock; and/or
Modifying the intermediate frequency coefficient of each image subblock according to the pixel value of each pixel in the hidden information binary image corresponding to each image subblock to obtain a modified coefficient matrix of each image subblock, wherein the modifying method comprises the following steps:
when the pixel value of a pixel in a binary image of hidden information corresponding to an image subblock is 1, sequentially determining an original intermediate frequency coefficient meeting a preset requirement in the image subblock and an original position of the original intermediate frequency coefficient in a coefficient matrix;
arranging the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks according to a sequence from small to large, and sequentially placing the original intermediate frequency coefficients at the original positions of the original intermediate frequency coefficients in the coefficient matrix according to the sequence identical to the sequence of the original intermediate frequency coefficients meeting the preset requirement in the image sub-blocks to obtain the modified coefficient matrix of each image sub-block.
4. An information hiding apparatus, comprising:
the conversion and scrambling module is used for converting the hidden information into a hidden information binary image and carrying out coding scrambling on the hidden information binary image;
the discrete cosine transform module is used for determining a target area image of the carrier image according to the binary image of the hidden information and respectively performing discrete cosine transform on each image sub-block in a blue channel image of the target area image; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
the intermediate frequency coefficient modification module is used for modifying the intermediate frequency coefficient of each image subblock meeting the preset requirement according to the pixel value of each pixel in the hidden information binary image corresponding to each image subblock to obtain a modified coefficient matrix of each image subblock;
the inverse discrete cosine transform module is used for performing inverse discrete cosine transform on the coefficient matrix modified by each image sub-block to obtain a blue channel image of a target area image in which information to be hidden is embedded;
and the replacing module is used for replacing the blue channel image of the target area image of the carrier image with the blue channel image of the target area image of the embedded hidden information to obtain the carrier image embedded with the hidden information.
5. A method for detecting hidden information based on the information hiding method of any one of claims 1 to 3, comprising:
determining a target area image embedded with hidden information;
respectively carrying out discrete cosine transform on each image subblock in a blue channel image of a target area image embedded with hidden information, and determining a coefficient matrix of each image subblock;
determining a scrambled hidden information binary image according to the coefficient matrix of each image subblock; each image subblock in a blue channel image of a target area image embedded with hidden information corresponds to each pixel in a hidden information binary image respectively;
carrying out inverse scrambling corresponding to scrambling on the scrambled hidden information binary image, and determining a hidden information binary image;
and determining hidden information according to the hidden information binary image.
6. The method of detecting hidden information according to claim 5, wherein determining the target area image in which the hidden information is embedded comprises:
acquiring a to-be-detected image of the printed carrier image embedded with the hidden information through image acquisition equipment;
and determining the target area image embedded with the hidden information by utilizing scale invariant feature transformation according to the image to be detected.
7. The method of claim 5, wherein determining the scrambled hidden information binary image according to each image sub-block coefficient matrix comprises:
sequentially determining k intermediate frequency coefficients meeting preset requirements according to the coefficient matrix of each image subblock;
if the image subblocks meet the preset requirement of the front-middle k intermediate frequency coefficients
Figure FDA0002221116080000031
The average value of the intermediate frequency coefficient is larger than
Figure FDA0002221116080000032
Determining the pixel value of a pixel corresponding to the image sub-block in the scrambled hidden information binary image to be 0 by the average value of the intermediate frequency coefficients;
if the image subblocks meet the preset requirement of the front-middle k intermediate frequency coefficientsThe average value of the intermediate frequency coefficient is less than
Figure FDA0002221116080000034
And determining the pixel value of the pixel corresponding to the image sub-block in the scrambled hidden information binary image to be 1 by the average value of the intermediate frequency coefficients.
8. An apparatus for detecting hidden information, comprising:
the target area image determining module is used for determining a target area image embedded with hidden information;
the second discrete cosine transform module is used for respectively carrying out discrete cosine transform on each image sub-block in the blue channel image of the target area image embedded with the hidden information and determining a coefficient matrix of each image sub-block;
the binary image determining module is used for determining a scrambled hidden information binary image according to each image subblock coefficient matrix; each image sub-block in the blue channel image of the target area image corresponds to each pixel in the hidden information binary image respectively;
the reverse scrambling module is used for performing reverse scrambling corresponding to scrambling on the scrambled hidden information binary image to determine a hidden information binary image;
and the hidden information determining module is used for determining the hidden information according to the hidden information binary image.
9. An anti-counterfeiting tracing method is characterized by comprising the following steps:
hiding the product identification code on the product packaging diagram by using the information hiding method as claimed in any one of claims 1 to 3;
extracting a product identification code on a product packaging diagram by using the method for detecting the hidden information according to any one of claims 5 to 7;
and acquiring anti-counterfeiting traceability information of the product based on the anti-counterfeiting traceability system according to the product identification code.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the information hiding method according to any one of claims 1 to 3, or implements the method for detecting hidden information according to any one of claims 5 to 7, or implements the anti-counterfeiting tracing method according to claim 9 when executing the computer program.
11. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the information hiding method of any one of claims 1 to 3, or for executing the hidden information detecting method of any one of claims 5 to 7, or for executing the anti-counterfeiting traceability method of claim 9.
CN201910934389.XA 2019-09-29 2019-09-29 Information hiding method and device, detection method and device and anti-counterfeiting tracing method Active CN110766594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910934389.XA CN110766594B (en) 2019-09-29 2019-09-29 Information hiding method and device, detection method and device and anti-counterfeiting tracing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910934389.XA CN110766594B (en) 2019-09-29 2019-09-29 Information hiding method and device, detection method and device and anti-counterfeiting tracing method

Publications (2)

Publication Number Publication Date
CN110766594A true CN110766594A (en) 2020-02-07
CN110766594B CN110766594B (en) 2023-07-11

Family

ID=69329068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910934389.XA Active CN110766594B (en) 2019-09-29 2019-09-29 Information hiding method and device, detection method and device and anti-counterfeiting tracing method

Country Status (1)

Country Link
CN (1) CN110766594B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669477A (en) * 2020-06-24 2020-09-15 深圳前海微众银行股份有限公司 Image processing method, system, device, equipment and computer storage medium
CN112270638A (en) * 2020-11-19 2021-01-26 闪捷信息科技有限公司 Sensitive file steganography and tracing method based on deep confrontation network
CN112446715A (en) * 2021-02-01 2021-03-05 深圳华龙讯达信息技术股份有限公司 Product tracing method based on industrial internet cloud platform
CN113160028A (en) * 2021-02-24 2021-07-23 陕西师范大学 Information hiding and recovering method and equipment based on colorful character picture and storage medium
CN113704703A (en) * 2021-08-27 2021-11-26 上海钧正网络科技有限公司 Information hiding method and device and computer storage medium
CN113965660A (en) * 2021-10-19 2022-01-21 广东电网有限责任公司 Image encryption method, device and system
CN116722991A (en) * 2023-02-02 2023-09-08 浙江云马智慧科技有限公司 Data transmission system used in physical isolation environment
US11810496B1 (en) 2022-07-27 2023-11-07 AUO Corporation Display apparatus and image displaying method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080199093A1 (en) * 2007-02-19 2008-08-21 New Jersey Institute Of Technology Appratus and method for reversible data hiding for jpeg images
CN107888925A (en) * 2017-11-03 2018-04-06 清华大学深圳研究生院 A kind of embedding grammar and detection method of digital video hiding information
CN107911698A (en) * 2017-11-03 2018-04-13 清华大学深圳研究生院 The embedding grammar and detection method of video digital watermark information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080199093A1 (en) * 2007-02-19 2008-08-21 New Jersey Institute Of Technology Appratus and method for reversible data hiding for jpeg images
CN107888925A (en) * 2017-11-03 2018-04-06 清华大学深圳研究生院 A kind of embedding grammar and detection method of digital video hiding information
CN107911698A (en) * 2017-11-03 2018-04-13 清华大学深圳研究生院 The embedding grammar and detection method of video digital watermark information

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669477A (en) * 2020-06-24 2020-09-15 深圳前海微众银行股份有限公司 Image processing method, system, device, equipment and computer storage medium
CN111669477B (en) * 2020-06-24 2023-01-24 深圳前海微众银行股份有限公司 Image processing method, system, device, equipment and computer storage medium
CN112270638A (en) * 2020-11-19 2021-01-26 闪捷信息科技有限公司 Sensitive file steganography and tracing method based on deep confrontation network
CN112446715A (en) * 2021-02-01 2021-03-05 深圳华龙讯达信息技术股份有限公司 Product tracing method based on industrial internet cloud platform
CN112446715B (en) * 2021-02-01 2021-05-04 深圳华龙讯达信息技术股份有限公司 Product tracing method based on industrial internet cloud platform
CN113160028A (en) * 2021-02-24 2021-07-23 陕西师范大学 Information hiding and recovering method and equipment based on colorful character picture and storage medium
CN113704703B (en) * 2021-08-27 2024-04-16 上海钧正网络科技有限公司 Information hiding method and device and computer storage medium
CN113704703A (en) * 2021-08-27 2021-11-26 上海钧正网络科技有限公司 Information hiding method and device and computer storage medium
CN113965660A (en) * 2021-10-19 2022-01-21 广东电网有限责任公司 Image encryption method, device and system
CN113965660B (en) * 2021-10-19 2023-04-28 广东电网有限责任公司 Image encryption method, device and system
US11810496B1 (en) 2022-07-27 2023-11-07 AUO Corporation Display apparatus and image displaying method
CN116722991A (en) * 2023-02-02 2023-09-08 浙江云马智慧科技有限公司 Data transmission system used in physical isolation environment
CN116722991B (en) * 2023-02-02 2023-11-17 浙江云马智慧科技有限公司 Data transmission system used in physical isolation environment

Also Published As

Publication number Publication date
CN110766594B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN110766594B (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
US20220335561A1 (en) Embedding signals in a raster image processor
Fang et al. Screen-shooting resilient watermarking
Holub et al. Random projections of residuals for digital image steganalysis
US8175329B2 (en) Authentication of physical and electronic media objects using digital watermarks
US7424131B2 (en) Authentication of physical and electronic media objects using digital watermarks
US7158654B2 (en) Image processor and image processing method
US7970166B2 (en) Steganographic encoding methods and apparatus
US8538068B2 (en) Embedding and detecting hidden information
EP1917625B1 (en) Covert and robust mark for media identification
Fridrich Methods for detecting changes in digital images
CN105701757B (en) Product anti-counterfeiting method and device based on digital watermark and graphic code
Gupta et al. A study on source device attribution using still images
CN111368960B (en) Quantum anti-counterfeiting two-dimensional code generation method and scanning method
US7058198B1 (en) Image processing apparatus and method
CN115063280A (en) Watermark superposition and recovery method and device
CN114330621A (en) Two-dimensional code anti-counterfeiting method and device based on identification information and storage medium
Chalamala et al. Local binary patterns for digital image watermarking
CN117499551B (en) Encryption anti-counterfeiting printing method based on binary signals
D’Angelo et al. Watermark-based authentication
Rani et al. A Brief Review on Existing Techniques for Detecting Digital Image Forgery
Xia et al. Perceptual image hashing using rotation invariant uniform local binary patterns and color feature
CN116757904A (en) Information hiding and verifying method and device based on digital image watermark
Guzman-Candelario et al. A low-distortion QR code watermarking scheme for digital color images robust to gamma correction attack
Hussien et al. Survey: Recent Techniques of Image Fragile Watermarking

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