Detailed Description
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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 is a block diagram of an electronic device 100 according to a preferred embodiment of the invention. The electronic device 100 may be a desktop computer, a notebook computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), and the like. The electronic device 100 comprises an information hiding device 200 based on logarithmic quantization, an information extracting device 300 based on logarithmic quantization, a memory 101, a storage controller 102, a processor 103, a peripheral interface 104, a display unit 105 and an input/output unit 106.
The memory 101, the memory controller 102, the processor 103, the peripheral interface 104, the display unit 105, and the input/output unit 106 are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The information hiding device 200 based on logarithmic quantization and the information extracting device 300 based on logarithmic quantization each include at least one software functional module which can be stored in the memory 101 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 100. The processor 103 is configured to execute an executable module stored in the memory 101, such as a software functional module or a computer program included in the information hiding device 200 based on logarithmic quantization.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 101 is used for storing a program, and the processor 103 executes the program after receiving an execution instruction, and the method executed by the process-defined server disclosed by any embodiment of the invention can be applied to the processor 103, or implemented by the processor 103.
The processor 103 may be an integrated circuit chip having signal processing capabilities. The Processor 103 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor 103 may be any conventional processor 103 or the like.
The peripheral interface 104 couples various input/output devices to the processor 103 as well as to the memory 101. In some embodiments, the peripheral interface 104, the processor 103, and the memory controller 102 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The display unit 105 provides an interactive interface (e.g., a user interface) between the electronic device 100 and a user or for displaying image data to a user reference. In this embodiment, the display unit 105 may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor 103 for calculation and processing.
The input/output unit 106 is used for providing input data for a user to realize the interaction of the user with the electronic device 100. The input/output unit 106 may be, but is not limited to, a mouse, a keyboard, etc., and the keyboard may be a virtual keyboard.
First embodiment
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for hiding information based on logarithmic quantization according to a preferred embodiment of the present invention. The method comprises the following steps:
step S101, a predetermined number of target image sub-blocks are screened out from a plurality of image sub-blocks corresponding to an original image according to a predetermined rule.
The original image may be image information to which watermark data needs to be added. In the embodiment of the invention, the original image is divided into a plurality of image sub-blocks with the same size and without overlapping. For example, the original image has an image size of 512 × 512, and is divided into a plurality of image sub-blocks having a size of 64 × 64 and not overlapping with each other.
And then according to the pixel value of each image sub-block and the size of the image sub-block, utilizing a formula:
and respectively calculating the energy value corresponding to each image sub-block. Where E represents the energy value of the image sub-block. The value of L is determined by the size of the image sub-block, specifically, L × L represents the size of each image sub-block, for example, when the size of the image sub-block is 64 × 64, the value of L is 64. m and n respectively represent the rows and columns of the image sub-blocks. I (m, n) denotes the pixel value at the (m, n) position in the image sub-block.
The method for screening out the predetermined number of target image sub-blocks according to the predetermined rule may be that the image sub-blocks are arranged in a descending order according to the energy values corresponding to the image sub-blocks, and then the image sub-blocks arranged before the predetermined name are used as the target image sub-blocks, and the region formed by the target image sub-blocks is the region in which the watermark information is embedded. The predetermined ranking may be selected by the user. For example, if 32 is selected, all image sub-blocks with energy values within 32 are target image sub-blocks. According to the method of screening out the target image subblocks according to the energy value, the watermark accommodating space constructed by the obtained target image subblocks is more stable, so that the robustness of the embedded watermark data to attacks such as amplitude scale scaling, rotation and the like is improved.
And step S102, respectively carrying out wavelet transformation processing on each target image sub-block to obtain a corresponding first low-frequency sub-band image wavelet coefficient vector and a corresponding low-frequency sub-band image.
In the embodiment of the present invention, each target image sub-block is subjected to S-layer wavelet transform to obtain a low-frequency subband image, and a corresponding first low-frequency subband image wavelet coefficient is extracted therefrom, and then transformed into a one-dimensional coefficient vector, which can be recorded as: x ═ X1,X2,…,Xk]TWherein.]TAnd k represents the number of wavelet coefficients of the first low-frequency subband image corresponding to the target image sub-block. Next, S represents the number of decomposition layers corresponding to the wavelet transform processing, and in the present embodiment, the number of decomposition layers is 1. Each target image sub-block is 64 × 64 in size, the size of the low-frequency subband image of the target image sub-block after wavelet transform processing is 32 × 32, each position of the target image sub-block corresponds to a first low-frequency subband image wavelet coefficient, and the first low-frequency subband image wavelet coefficient is converted into a one-dimensional vector with the size of 1024, namely the k value of 1024.
Step S103, performing logarithmic transformation on each wavelet coefficient vector of the first low-frequency subband image to obtain a corresponding wavelet coefficient vector in a logarithmic domain.
In the embodiment of the invention, according to the wavelet coefficient vector of the first low-frequency subband image corresponding to each target image sub-block, a formula is utilized:
and acquiring a corresponding log domain wavelet coefficient vector. Wherein gamma represents a parameter of a predetermined compression level, XsPreset coefficients scale the scale factor, and gamma>0 and Xs>0. Preferably, the gamma value is set to 6.0, XsThe target image sub-block is set to 4.5, which can be fully adapted to wavelet coefficient distribution of various different amplitude distributions, X represents the first low-frequency subband image wavelet coefficient vector subjected to logarithm processing, and each element in the first low-frequency subband image wavelet coefficient vector can be subjected to logarithm processing in sequence. | X | represents the absolute value operation on the wavelet coefficient vector of the first low frequency subband image. C represents a log domain wavelet coefficient vector obtained after log processing, and the number of elements in C is consistent with the number of elements in the wavelet coefficient vector of the first low-frequency subband image.
And step S104, obtaining corresponding quantization step size by using a visual model according to each low-frequency sub-band image.
In the embodiment of the present invention, the wavelet coefficient value at each position can be extracted in the above-described low-frequency subband image. As shown in fig. 3, step S104 may include the following sub-steps:
and a substep S1041 of calculating an exactly distortable value corresponding to the low-frequency sub-band image according to the amplitude value of the wavelet basis function corresponding to the wavelet transform processing, the display pixel resolution parameter and the line-of-sight parameter corresponding to each target image sub-block.
In the embodiment of the present invention, according to the amplitude value of the wavelet basis function corresponding to the wavelet transform processing, the resolution parameter of the display pixel corresponding to each target image sub-block, and the line-of-sight parameter, a formula is used:
calculating the corresponding distortion value of the low-frequency sub-band image after the wavelet transformation, wherein Aλ,θRepresenting an amplitude value of a wavelet basis function corresponding to the wavelet transform process, d representing the corresponding resolution parameter of the display pixel, v representing the corresponding line-of-sight parameter, a representing a preset first constant parameter, β representing a preset second constant parameter, gθA third constant parameter, f, representing a preset0Representing a preset fourth constant parameter, JNDλ,θAnd the distortion value represents the corresponding distortion value of the low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction which correspond to the wavelet transformation processing are theta. In this embodiment, λ is 1. Preferably, the value of a is 0.495 and the value of β is set to 0.466, f0Is set to 0.401, gθThe value of (d) is 1.501.
And a substep S1042, calculating a luminance masking effect value corresponding to each position in the low frequency subband image according to the wavelet coefficient value corresponding to each position in the low frequency subband image.
In the embodiment of the present invention, according to the wavelet coefficient value corresponding to each position in the low-frequency subband image, using a formula:
calculating a luminance masking effect value corresponding to each position in the low-frequency subband image, wherein al(λ, θ, i, j) represents a luminance masking effect value at position (i, j) in the low-frequency subband image corresponding to the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. Wλ,LL,i,jThe wavelet coefficient values representing the low frequency subband image at position (i, j) with the number of decomposition layers λ. WmeanRepresenting the average of said wavelet coefficient values corresponding to the low frequency subband image. The value of L is determined according to the size of the low-frequency subband image, for example, if the size of the low-frequency subband image is 32 × 32, the value of L is 32. a isTA fifth constant parameter representing a preset, preferably aTThe value is set to 0.649.
In the sub-step S1043, a self contrast masking effect factor and a neighborhood contrast masking effect factor corresponding to each position in the low-frequency subband image are calculated according to the corresponding distortion just value, the corresponding wavelet coefficient value, and the corresponding luminance masking effect value.
In the embodiment of the present invention, a formula may be utilized according to the corresponding distortion value, the corresponding wavelet coefficient value, and the corresponding luminance masking effect value:
calculating self contrast masking effect factors corresponding to each position in the low-frequency subband image, wherein aself(λ, θ, i, j) represents a self-contrast masking effect factor at a position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. W (λ, θ, i, j) represents the wavelet coefficient value of the low-frequency subband image at position (i, j) with the number of decomposition layers λ, | W (λ, θ, i, j) | represents the absolute value of W (λ, θ, i, j). JNDλ,θIs represented in the wavelet transform processing pairAnd the corresponding distortion value of the low-frequency subband image under the condition that the corresponding decomposition layer number lambda and the decomposition direction are theta. a isl(λ, θ, i, j) represents a luminance masking effect value at position (i, j) in the low-frequency subband image corresponding to the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. Epsilon represents a preset sixth constant parameter, and preferably, the value of epsilon is 0.6. According to the corresponding distortion value, the corresponding wavelet coefficient value and the corresponding luminance masking effect value, utilizing a formula:
and calculating a neighborhood contrast masking effect factor corresponding to each position in the low-frequency subband image. Wherein, aneig(λ, θ, i, j) represents a neighborhood contrast masking effect factor at a position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ, it should be noted that each position in the low-frequency subband image corresponds to a neighborhood, and the size of the neighborhood can be preset. WnRepresenting the nth wavelet coefficient value belonging to the corresponding neighborhood with the predefined position (i, j). N is a radical ofi,jThe predefined position is the total number of wavelet coefficient values in the neighborhood corresponding to (i, j). JNDλ,θAnd the distortion value represents the corresponding distortion value of the low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction which correspond to the wavelet transformation processing are theta. a isl(λ, θ, i, j) represents a luminance masking effect value at position (i, j) in the low-frequency subband image corresponding to the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. ζ represents a preset seventh normal parameter.
And a substep S1044 of obtaining a contrast masking effect value corresponding to each position in the low-frequency subband image according to the self contrast masking effect factor and the neighborhood contrast masking effect factor corresponding to each position in the low-frequency subband image.
In the embodiment of the invention, according to the self contrast masking effect factor and the neighborhood contrast masking effect factor corresponding to each position in the low-frequency subband image, a formula is utilized:
ac(λ,θ,i,j)=aself(λ,θ,i,j)·aneig(λ,θ,i,j),
and obtaining a contrast masking effect value corresponding to each position in the low-frequency subband image. Wherein, ac(λ, θ, i, j) represents a contrast masking effect value corresponding to the position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. a isself(λ, θ, i, j) represents a self-contrast masking effect factor corresponding to the position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. a isneig(λ, θ, i, j) represents a neighborhood contrast masking effect factor corresponding to position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ. According to the corresponding just distortion value, the brightness masking effect value corresponding to each position in the low-frequency subband image and the contrast masking effect value corresponding to each position in the low-frequency subband image, utilizing a formula:
tJND(λ,θ,i,j)=JNDλ,θ·al(λ,θ,i,j)·ac(lambda, theta, i, j) and
Δ=tJND(λ,θ,i,j)/2,
and generating a quantization step corresponding to each position in the low-frequency subband image. Wherein, tJND(λ,θ,i,j)And the perceptual distortion threshold value corresponding to the position (i, j) in the low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction corresponding to the wavelet transformation processing are theta is represented. And delta represents a quantization step corresponding to a position (i, j) in the low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction which correspond to the wavelet transform processing are theta. JNDλ,θAnd the distortion value represents the corresponding distortion value of the low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction which correspond to the wavelet transformation processing are theta. a isl(λ,And theta, i, j) represents a brightness masking effect value at the position (i, j) in the corresponding low-frequency subband image under the condition that the decomposition layer number lambda and the decomposition direction which correspond to the wavelet transformation processing are theta. a isc(λ, θ, i, j) represents a contrast masking effect value corresponding to the position (i, j) in the low-frequency subband image under the condition that the decomposition layer number λ and the decomposition direction corresponding to the wavelet transform processing are θ.
And step S105, embedding the watermark data to be embedded into the original image according to the quantization step and the log domain wavelet coefficient vector.
In the embodiment of the present invention, as shown in fig. 4, step S105 includes the following steps:
and a substep S1051 of quantizing each log domain wavelet coefficient vector according to the corresponding quantization step and the watermark vector corresponding to the watermark data to be embedded to obtain a corresponding log quantization wavelet coefficient vector.
In the embodiment of the present invention, according to the corresponding quantization step and the corresponding watermark vector, a quantization model is used:
W=[W1,W2,…,WK]
d (1) ═ Δ/4, and
d(0)=-Δ/4
and quantizing each log domain wavelet coefficient vector. Wherein Q (C, W) represents the quantization model to obtain the corresponding logarithmically quantized wavelet coefficient vector. C represents the vector of the log domain wavelet coefficients. d (W) represents a dither vector, W represents the watermark vector, the watermark vector being generated by a pseudorandom function random (), WKRepresenting the Kth watermark information in the watermark vector, wherein the value of K is consistent with the number of elements in the wavelet coefficient vector of the first low-frequency subband image, and the value of K corresponding to the previous example is 1024. The value of the watermark information comprises 0 or 1, and when W isKWhen the value is 0, the jitter vector isd(WK) D (0), when WKWhen the value is 1, d (W) in the jitter vectorK) D (1), Δ represents the corresponding quantization step.
In the sub-step S1052, a distortion compensation factor is obtained.
In the embodiment of the present invention, it is assumed that a received image signal is a zero-mean Additive white Gaussian channel (AWGN), interference suffered by an image in a channel process is interference caused by Noise and distortion compensation, the two types of interference are independent from each other, and a total interference energy function is set as:
f=E(||ε-(1-α)(Q(C;m,Δ/α)-C)||2)
wherein epsilon is Gaussian noise satisfying
And (4) distribution. By calculation, the above equation can be further written as:
where D is the desired distortion, optionally D ═ E (1/N | | y-x)2||)。
Then, the optimal value of the compensation factor in the quantization process is calculated, and the Distortion Interference Ratio (DIR) is defined as:
wherein D1 is the minimum distortion
And to the function
Derivation of the deviation, i.e.
Is shown below
The optimal value of α is therefore:
wherein DNR is a distortion-to-noise ratio (DISTORTION-TO-NOISE RATIO). Assuming that the noise is zero mean and the standard deviation is 1, the optimal value of the compensation factor can be expressed as follows according to the relation between the peak signal-to-noise ratio (PSNR) and the expected distortion:
as another embodiment, in order to ensure imperceptibility of the watermark, reduce distortion of the image as much as possible, and improve visual fidelity of the image after embedding watermark information, a peak signal-to-noise ratio between the received image and the original image is generally more than 39 dB. Alternatively, the compensation factor α is in the range α ∈ (0.5,0.85), and in the present example the value of the compensation factor α is 0.6.
And a substep S1053, respectively obtaining the image coefficient vector embedded with the watermark data to be embedded corresponding to each target image sub-block according to the corresponding log domain wavelet coefficient vector, the log quantization wavelet coefficient vector and the distortion compensation factor.
In the embodiment of the present invention, a formula may be used according to the corresponding log domain wavelet coefficient vector, log quantization wavelet coefficient vector, and distortion compensation factor:
respectively obtaining the image coefficient vector embedded with the watermark data to be embedded corresponding to each target image sub-block, wherein,
representing the image coefficient vector, generation Q (C, W)And C represents the log-quantized wavelet coefficient vector.
It should be noted that, through the above process, a quantization mechanism with distortion compensation is introduced in the quantization process, and the relationship between the visual perception quality of the image and the watermark distortion is comprehensively considered, so as to seek the optimal control of the compensation factor, and overcome the defects in the watermark detection performance in the related art.
And a substep S1054 of performing inverse logarithmic transformation on the image coefficient vector to obtain a second low-frequency subband image wavelet coefficient vector embedded with the watermark data to be embedded corresponding to each target image sub-block.
In the embodiment of the present invention, a formula may be used according to each image coefficient vector, a corresponding coefficient scaling scale factor during log transform processing, and a parameter of a compression level in turn:
and acquiring a second low-frequency subband image wavelet coefficient vector which is embedded with the watermark data to be embedded and corresponds to each target image sub-block. Wherein sign (·) represents a sign function,
representing the image coefficient vector after performing the log domain quantization. Gamma represents a parameter of a preset compression level, X
sPreset coefficients scale the scale factor, and gamma>0 and X
s>0. Preferably, the gamma value is set to 6.0, X
sSet to 4.5. X
wAnd representing the wavelet coefficient vector of the second low-frequency subband image embedded with the watermark data to be embedded corresponding to the target image sub-block.
And a substep S1055 of sequentially reconstructing each target image sub-block according to the corresponding wavelet coefficient vector of the second low-frequency subband image.
In the embodiment of the present invention, each target image sub-block may be reconstructed by inverse wavelet transform according to the corresponding wavelet coefficient vector of the second low-frequency subband image to obtain a target image sub-block embedded with watermark data.
And a substep S1056 of combining the reconstructed target image sub-block with other image sub-blocks in the original image to obtain a watermark image.
Second embodiment
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for extracting information based on logarithmic quantization according to a preferred embodiment of the present invention. The method is used for extracting the watermark data in the watermark image obtained by the information hiding method based on the logarithmic quantization provided by the first embodiment. As shown in fig. 5, the method comprises the steps of:
step S201, when it is detected that the watermark image is distorted, screening the predetermined number of extracted image sub-blocks from the plurality of image sub-blocks corresponding to the watermark image according to a predetermined rule.
In the embodiment of the present invention, when the electronic device 100 serving as the receiving end of the watermark image detects that the watermark-containing image will be distorted after a channel attack, the predetermined number of extracted image sub-blocks are screened out from the plurality of image sub-blocks corresponding to the watermark image according to a predetermined rule. The specific process is similar to the watermark data embedding process provided in the first embodiment, and is not described herein again.
Step S202, performing wavelet transformation processing on each extracted image sub-block to obtain a corresponding wavelet coefficient vector of the third low-frequency sub-band image and a watermark low-frequency sub-band image.
And step S203, obtaining a corresponding quantization step according to the watermark low-frequency sub-band image by using a visual model.
Step S204, according to the quantization step size and the logarithm domain wavelet coefficient vector, using a formula:
are respectively provided withAcquiring first distorted image information corresponding to each extracted image sub-block, wherein C represents a wavelet coefficient vector of a third low-frequency sub-band image, and delta represents the quantization step size,
representing the first distorted image information.
Step S205, according to the quantization step and the log domain wavelet coefficient vector, using the formula:
respectively acquiring second distorted image information corresponding to each extracted image sub-block, wherein C represents a wavelet coefficient vector of a third low-frequency sub-band image, and delta represents the quantization step size,
representing the second distorted image information.
Step S206, extracting the watermark data in the watermark image by using a minimum distance detector according to the first distorted image information and the second distorted image information.
In this embodiment of the present invention, the extracting of the watermark data in the watermark image by using the minimum distance detector may be sequentially performed for each extracted image sub-block by using a formula:
and extracting the watermark information of the extracted image sub-blocks. Wherein the content of the first and second substances,
representing watermark information extracted from the extracted image sub-blocks. r represents the wavelet coefficient vector of the third low-frequency subband image of the extracted image sub-block, r
iComprising r
0And r
1,r
0Is the second distortionImage information r
1Is the first distorted image information. If the distance between r and the first distorted image information is smaller than the distance between r and the second distorted image information, the extracted watermark information will be "1"; if the distance between r and the first distorted image information is greater than the distance between r and the second distorted image information, the extracted watermark information will be "0".
Third embodiment
Referring to fig. 6, fig. 6 shows an information hiding apparatus 200 based on logarithmic quantization according to an embodiment of the present invention. As shown in fig. 6, the information hiding apparatus 200 based on logarithmic quantization includes: a screening module 201, a processing module 202, a calculation module 203 and an embedding module 204.
The filtering module 201 is configured to filter a predetermined number of target image sub-blocks from a plurality of image sub-blocks corresponding to an original image according to a predetermined rule.
The processing module 202 is configured to perform wavelet transform processing on each target image sub-block to obtain a corresponding first low-frequency subband image wavelet coefficient vector and a corresponding low-frequency subband image.
The processing module 202 is further configured to perform log transform processing on each wavelet coefficient vector of the first low-frequency subband image to obtain a corresponding log domain wavelet coefficient vector.
And the calculating module 203 is configured to obtain a corresponding quantization step by using a visual model according to each low-frequency subband image.
And the embedding module 204 is configured to embed the watermark data to be embedded into the original image according to the quantization step size and the log domain wavelet coefficient vector.
Referring to fig. 7, fig. 7 illustrates an information extraction apparatus 300 based on logarithmic quantization according to an embodiment of the present invention. As shown in fig. 7, the above-described information extraction apparatus 300 based on logarithmic quantization includes:
the detecting module 301, when it is detected that the watermark image is distorted, screens out the predetermined number of extracted image sub-blocks from the plurality of image sub-blocks corresponding to the watermark image according to a predetermined rule.
A wavelet transform module 302, configured to perform wavelet transform processing on each extracted image sub-block to obtain a corresponding wavelet coefficient vector of the third low-frequency subband image and a watermark low-frequency subband image.
An obtaining module 303, configured to obtain a corresponding quantization step according to the watermark low-frequency subband image by using a visual model;
an obtaining module 305, configured to utilize a formula according to the quantization step and the log domain wavelet coefficient vector:
respectively acquiring first distorted image information corresponding to each extracted image sub-block, wherein C represents a wavelet coefficient vector of a third low-frequency sub-band image, and delta represents the quantization step size,
representing the first distorted image information;
the obtaining module 305 is further configured to, according to the quantization step and the log domain wavelet coefficient vector, utilize a formula:
respectively acquiring second distorted image information corresponding to each extracted image sub-block, wherein C represents a wavelet coefficient vector of a third low-frequency sub-band image, and delta represents the quantization step size,
representing the second distorted image information;
an extracting module 304, configured to extract the watermark data in the watermark image by using a minimum distance detector according to the first distorted image information and the second distorted image information.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In summary, the present invention provides an information hiding method, an information extracting method and a related apparatus based on logarithmic quantization. The method comprises the following steps: and screening a predetermined number of target image sub-blocks from a plurality of image sub-blocks corresponding to the original image according to a predetermined rule. And respectively carrying out wavelet transformation processing on each target image sub-block to obtain a corresponding first low-frequency sub-band image wavelet coefficient vector and a corresponding low-frequency sub-band image. And then respectively carrying out logarithmic transformation processing on the wavelet coefficient vector of each first low-frequency sub-band image to obtain a corresponding log domain wavelet coefficient vector, respectively obtaining a corresponding quantization step according to each low-frequency sub-band image by using a visual model, and embedding the watermark data to be embedded into the original image according to the quantization step and the log domain wavelet coefficient vector. The robustness of the embedded watermark data to attacks such as amplitude scale scaling, rotation and the like is improved, and meanwhile, the embedded watermark data has good imperceptibility, and the influence on the detection performance of the watermark data is avoided.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules 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 removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.