Uneingeschränkter Zugang

Research on Digital Image Watermarking Algorithm in Frequency Domain Based on Matlab

   | 21. Mai 2023

Zitieren

Introduction

In the field of copyright protection, the secret technology of information plays a great role. It can fully protect the copyright of the original author through a series of operations. Digital watermarking technology is the main method of information hiding technology. Through digital watermarking technology, some additional information of multimedia digital products (such as image, video, audio, etc.) can be displayed. This information is often used to indicate the source of the product and declare the copyright. The purpose is to prevent the copyright of multimedia digital products from being infringed, tampered or copied.

Digital watermarking technology involves many disciplines, including signal technology, cryptography and so on. Therefore, it is a complex and challenging technology. Each researcher can conduct extensive and in-depth research on digital watermarking technology according to his own understanding and learning of this technology. It can be said that with the development of digital watermarking technology, there have been many mature and effective algorithms and achieved good results. However, while having fruitful results, we should also see that there are still many difficulties and doubts that need to be overcome by technicians. For example, many existing watermarking algorithms are not robust enough and need to optimize the algorithm to further improve the performance of the algorithm. With the rapid development of computer technology and the wide popularization of the Internet, multimedia information products will be more abundant in the future, making it easier and faster for people to obtain information. Therefore, digital watermarking technology will have more far-reaching application value.

The main research content of this paper

In this study, the basic algorithms and knowledge of information hiding are analyzed, and the research perspective is focused on the fusion and scrambling of digital images. After extensive reading and studying the research conclusions of many scholars, a new color image technology algorithm is proposed. The technical support of this new algorithm is wavelet transform technology and chaos fusion technology, the specific performance of this new algorithm is demonstrated by experiments, and the experimental results show that this method is reasonable. The details are as follows:

1) This paper introduces the hiding technology, including its background, significance, research status at home and abroad and its basic principle model, and popularizes the basic attributes and specific applications of information system.

2) The basic principles and properties of image hiding technology are covered, and its main applications are analyzed.

3) The algorithm types of color image steganography are listed, and the algorithm types in the transform domain are mainly studied and analyzed. Finally, according to the specific comparison of different algorithms, the wavelet domain transform is determined as the main method.

4) This paper mainly analyzes the image scrambling technology, briefly introduces the centralized image scrambling method, and discusses the Arnold transform and its application.

5) This paper analyzes the digital watermarking algorithm in wavelet domain in detail, and focuses on the process of embedding and extraction.

6) The stability of the algorithm is analyzed, including the specific impact test. The stability and anti-interference of the digital watermark are verified by comprehensively analyzing the peak signal-to-noise ratio.

For digital watermarking, no matter which algorithm is adopted, it can not guarantee that the digital watermarking itself is perfect. It can only choose any algorithm according to the actual situation. Generally speaking, the algorithm needs to consider three characteristics, namely imperceptibility, robustness and capacity, as shown in Figure 1. [2]

Figure 1

The performance indexes of robust watermarking are reasonable and compromise

Basic model of digital watermarking system

The basic model of digital watermarking system is mainly the embedding and extraction of watermarking model. In the operation of making watermark model, preprocessing is usually required to ensure that the system can be applied. This preprocessing is to transform the watermark memory in advance. It can be used as the embedded watermark signal only after meeting the requirements. The specific model is shown in the figure. The embedding process of watermark is shown in Figure 2, and the original data represents the difference between blind detection and non blind detection.

Figure 2

General model of watermark generation

Figure 3

Watermark embedding and extraction process

Performance evaluation of digital watermarking system

There are generally two technical means for the evaluation of image quality, one is the subjective evaluation based on human experience or some visual effect, and the other is the objective evaluation based on specific quality indicators such as signal-to-noise ratio. Subjective evaluation will be disturbed by external factors such as people's mood and working state, resulting in inaccurate results. Therefore, objective evaluation plays a very important role in the performance evaluation of digital watermarking system.

The quality evaluation indexes of digital watermarking system are also divided into many categories, which can be divided into variance, signal-to-noise ratio and peak signal-to-noise ratio. Table 2.1 is a specific calculation formula, in which, it represents the pixel size of the color image and the embedded pixel value. The most used indicators by researchers are signal-to-noise ratio and peak signal-to-noise ratio. Error based distortion measurement method:

Mean square deviation: MSE=m,n(Im,nIm,n)2/MN MSE = \sum\limits_{m,n} {{{\left( {{I_{m,n}} - I_{m,n}^\prime} \right)}^2}/MN}

Signal to noise ratio: SNR=10lg(m,nIm,n2/m,n(Im,nIm,n)2) SNR = 10\lg \left( {\sum\limits_{m,n} {{I_{m,n}^2}} /\sum\limits_{m,n} {{{\left( {{I_{m,n}} - I_{m,n}^\prime} \right)}^2}} } \right)

Peak signal-to-noise ratio: PSNR=10lg(MNmaxm,nIm,n2/m,n(Im,nIm,n)2) PSNR = 10\lg \left( {MN\mathop {\max }\limits_{m,n} \;I_{m,n}^2/\sum\limits_{m,n} {{{\left( {{I_{m,n}} - I_{m,n}^\prime} \right)}^2}} } \right)

Image fidelity: IF=1m,n(Im,nIm,n)2/m,nIm,n2 IF = 1 - \sum\limits_{m,n} {{{\left( {{I_{m,n}} - I_{m,n}^\prime} \right)}^2}} /\sum\limits_{m,n} {I_{m,n}^2}

Normalization constant: NC=m,nIm,nIm,n/m,nIm,n2 NC = \sum\limits_{m,n} {{I_{m,n}} I_{m,n}^\prime} /\sum\limits_{m,n} {I_{m,n}^2}

Frequency domain watermarking algorithm

In the current image lossy compression, more concepts are absorbed, such as DFT, DCT and other algorithms are applied to this field. Many watermark robustness algorithms will adopt the above methods. The robustness of watermark is improved through the addition of this method. Moreover, some fragile watermark systems put forward the resistance to lossy compression, which can be easily realized according to the mode of change domain. Therefore, more algorithms can be implemented in the change domain according to the tampered characteristics of the change domain.

Taking Fourier transform as an example, this classical algorithm is also applied to watermark transform algorithm. DFT algorithm can not only realize the non deformation of watermark, but also realize position transformation in the specific embedding process. According to this Fourier transform mode, the amplitude and phase values of some coefficients can be modified to realize watermark embedding. In order to ensure the invisibility and robustness of the watermark, the watermark content can be embedded with different frequency coefficients. O. Ruanaidh [3] did research on related algorithms, two algorithms are obtained: 1. The phase technology of DFT coefficient is mainly used to change the watermark; 2. The change of watermark mainly takes the displacement change of watermark.

Another DCT algorithm in the algorithm is the discrete cosine change algorithm. This transformation method can be for the complete image, or it can divide the image into multiple blocks and divide the image into multiple modules of 8 * 8. In this way, DCT transformation shall be carried out first, and then the embedding space shall be selected according to the mode of the carrier. The stable frequency band shall be selected in the embedding space, and the coefficients of this part of the stable frequency band shall be modified or replaced. The information of the carrier is to reflect its main external structure, which will not lead to too fuzzy pixels. The embedding of digital watermark will not affect the characteristics of the graphics. The high-frequency information is a type other than human perception. The compression technology also removes this part of the content in the compression, and the removed part will also damage the robustness of the watermark. Both high frequency and low frequency are in the range that may affect the watermark, so the best way is to load the information into the if information of the image.

In addition, there is DWT watermarking technology, which is discrete wavelet transform technology. This technology has multi-resolution characteristics. Compared with other transform domain methods, this transform method has better energy concentration characteristics, and after transformation, it is more in line with human visual system. It is also applied more in the new era, including MPEG-4 and JPEG-2000.

Discrete cosine transform, also known as DCT method, is an orthogonal image coding method. If this method was traced back to 1968, Andrews and others were the first to apply it. At that time, he found that the high-frequency component of natural images was in a relatively small amplitude, so it was not important for this part to occupy a position in the whole image system. Therefore, he proposed the transformation coding form of asymmetric mode, Then it is encoded and transmitted according to Fourier transform. However, DFT is an orthogonal transformation mode, which requires huge operation, which also causes some difficulties in practical work. In order to improve this method, what is introduced and DFT is mentioned to reduce the operation workload. The most important concept of this concept is the birth of DCT and DFT. These two calculation modes can calculate faster and ensure accuracy. Especially the DCT method, which is very similar to the tobbelize matrix and closely related to human language. Therefore, DCT is the best transformation method in many people's cognition.

Because the image itself is two-dimensional, it is also necessary to use two-dimensional algorithm in the selection of specific algorithm. In specific application, two-dimensional DCT is used for image processing.

1) Definition of discrete cosine transform (DCT)

Set the size of the graph as f (x, y) (x = 0, 1, 2, …, M −1, y = 0, 1, 2, …, N −1) to M × N, Its two-dimensional DCT transformation formula can be shown in formula (1): F(u,v)=C(u)C(v)x=0M1y=0N1f(x,y)cos[(2x+1)uπ2M]cos[(2y+1)vπ2N] F\left( {u,v} \right) = C\left( u \right)C\left( v \right)\sum\limits_{x = 0}^{M - 1} {\sum\limits_{y = 0}^{N - 1} {f\left( {x,y} \right)\cos \left[ {{{\left( {2x + 1} \right)u\pi } \over {2M}}} \right]\cos \left[ {{{\left( {2y + 1} \right)v\pi } \over {2N}}} \right]} }

Similarly, the definition of to transform (IDCT) is shown in equation (2): f(x,y)=u=0M1u=0N1C(u)C(v)F(u,v)cos[(2x+1)uπ2M]cos[(2y+1)vπ2N] f\left( {x,y} \right) = \sum\limits_{u = 0}^{M - 1} {\sum\limits_{u = 0}^{N - 1} {C\left( u \right)C\left( v \right)F\left( {u,v} \right)\cos \left[ {{{\left( {2x + 1} \right)u\pi } \over {2M}}} \right]\cos \left[ {{{\left( {2y + 1} \right)v\pi } \over {2N}}} \right]} }

Among: C(u)={1M,μ=02M,μ=1,2,,M1 C\left( u \right) = \left\{ {\matrix{ {\sqrt {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 M}}\right.}\!\lower0.7ex\hbox{$M$}}} ,\mu = 0} \hfill \cr {\sqrt {{\raise0.7ex\hbox{$2$} \!\mathord{\left/ {\vphantom {2 M}}\right.}\!\lower0.7ex\hbox{$M$}}} ,\mu = 1,2, \cdots ,M - 1} \hfill \cr } } \right. C(v)={1N,v=02N,v=1,2,,M1 C\left( v \right) = \left\{ {\matrix{ {\sqrt {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 N}}\right.}\!\lower0.7ex\hbox{$N$}}} ,v = 0} \hfill \cr {\sqrt {{\raise0.7ex\hbox{$2$} \!\mathord{\left/ {\vphantom {2 N}}\right.}\!\lower0.7ex\hbox{$N$}}} ,v = 1,2, \cdots ,M - 1} \hfill \cr } } \right.

Before embedding, the current digital watermark will be encrypted once. The current encryption processing is mainly to scramble the digital watermark, that is, to make the watermark image “beyond recognition” and lose its original appearance, and then embed the scrambled watermark into the carrier image, so as to further strengthen the concealment performance of the watermark, When you need to extract the watermark or view the original appearance of the watermark information, you can reverse the original scrambling rules to restore the original appearance of the watermark. If the watermark is extracted by the attacker, it is difficult to crack the original information of the watermark because he does not know the scrambling rules or the key set during scrambling, which is considered to be an error in extracting the watermark. Therefore, an excellent image scrambling technology can add more confidentiality and security performance to the watermark system. Generally, scrambling is to cha. In the two-dimensional discrete cosine transform, X and y are spatial domain values. Firstly, determine M = n, and the calculation formula can be expressed as: F(u,v)=C(u)C(v)x=0N1y=0N1f(x,y)cos[(2x+1)uπ2N]cos[(2y+1)vπ2N] F\left( {u,v} \right) = C\left( u \right)C\left( v \right)\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{N - 1} {f\left( {x,y} \right)\cos \left[ {{{\left( {2x + 1} \right)u\pi } \over {2N}}} \right]\cos \left[ {{{\left( {2y + 1} \right)v\pi } \over {2N}}} \right]} }

Inverse transformation to: f(x,y)=u=0N1v=0N1C(u)C(v)F(u,v)cos[(2x+1)uπ2N]cos[(2y+1)vπ2N] f\left( {x,y} \right) = \sum\limits_{u = 0}^{N - 1} {\sum\limits_{v = 0}^{N - 1} {C\left( u \right)C\left( v \right)F\left( {u,v} \right)\cos \left[ {{{\left( {2x + 1} \right)u\pi } \over {2N}}} \right]\cos \left[ {{{\left( {2y + 1} \right)v\pi } \over {2N}}} \right]} }

Among: C(u)=C(v)={1Nu=v=02Nu=v=0,1,2,,N1 C\left( u \right) = C\left( v \right) = \left\{ {\matrix{ {\sqrt {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 N}}\right.}\!\lower0.7ex\hbox{$N$}}} } & {u = v = 0} \cr {\sqrt {{\raise0.7ex\hbox{$2$} \!\mathord{\left/ {\vphantom {2 N}}\right.}\!\lower0.7ex\hbox{$N$}}} } & {u = v = 0,1,2, \cdots ,N - 1} \cr } } \right.

The direct coefficient DC is shown in formula (8): F(0,0)=1Nx=0Ny=0Nf(x,y) F\left( {0,0} \right) = {1 \over N}\sum\limits_{x = 0}^N {\sum\limits_{y = 0}^N {f\left( {x,y} \right)} }

DCT digital image watermarking algorithm

In the meaningless watermark and meaningful watermark divided according to the content, the content conveyed by the meaningless watermark is often a sequence digital string, including pseudo-random sequence, pseudo-random binary sequence and chaotic sequence, which can be directly added to the carrier image when the watermark is embedded. However, this meaningless sequence often can not convey information, and can not express copyright information or logo, so it can not meet many needs of copyright protection. Meaningful watermark signals have various forms, which can be text, sound or image. When the creator needs to add his own copyright information or some kind of declaration to the watermark signal, he can use a meaningful watermark signal. In this way, the extracted watermark signal can also intuitively display the information. This design will study the meaningful watermark image and select the school emblem, as shown in Figure 4.

Figure 4

Watermark image

As one of the information encryption technologies, image scrambling algorithm has reversibility, and uses the adjustment and change of pixel position to produce visual confusion. After scrambling the watermark image, if you do not know the image scrambling rules, iteration cycle and other information, you can not correctly and completely obtain the original watermark image, which increases the cost and difficulty of piracy and the security and reliability of digital watermark to a certain extent. The common scrambling transformation methods in watermark images include Arnold, Baker, gray and so on. In this paper, Arnold method is mainly used to scramble the watermark image.

Arnold transform method is also called cat face method. For color images, the position of picture pixels is changed by changing the coordinates in the quadrant, and then the gray value of the picture is changed. Each change is a cat face transformation. After all the pixels of the image are transformed once by the formula, the image will be very different from the original image, which is equivalent to a new image. Then you can continue to transform the new image until the image loses its original appearance. At this time, assuming that the number of iterations is n, it is usually used as the key to extract the watermark. The cat face transformation is periodic. When the number of iterations increases, it will return to the original image. Different order images have different recovery periods to the original image.

In this simulation, the watermark pixel size is equal to 64 * 64. The value of scrambling times is 5. After encryption, the watermark signal is evenly distributed on all pixels. [4]When there is a small part of the embedded watermark image, we can see that the recovered watermark has a relatively complete structure. See the figure below for details.

Figure 5

Watermark image

Figure 6

Scrambling once

Figure 7

Scrambling 5 times

Experimental results and anti attack experiment
Image quality evaluation

The quality of digital watermarking algorithm needs a reasonable evaluation method and index. At present, the evaluation system of digital watermarking algorithm is not perfect, and there is no unified objective evaluation standard. Generally speaking, people can use the visual effect of the processed image to subjectively evaluate the algorithm. When the effect of the algorithm needs to be objectively evaluated and quantitatively analyzed, it needs to be completed with the help of some quantitative indicators, such as peak signal-to-noise ratio, correlation quality coefficient and normalization coefficient. A curve is a FASS curve that fills a unit square. When the image data is two-dimensional data, traversing all the elements of the image according to the trend of Hilbert curve can change the element order of the original image, so as to make the image “chaotic”. Its principle is shown in the figure.

Analysis of experimental results

In order to verify the simulation results of the watermark, Figure 8 shows the watermark added and recovered in the carrier.[5] In the meaningless watermark and meaningful watermark divided according to the content, the content conveyed by the meaningless watermark is often a sequence digital string, including pseudo-random sequence, pseudo-random binary sequence and chaotic sequence, which can be directly added to the carrier image when the watermark is embedded. However, this meaningless sequence often can not convey information, and can not express copyright information or logo, so it can not meet many needs of copyright protection. Meaningful watermark signals have various forms, which can be text, sound or image. When the creator needs to add his own copyright information or some kind of declaration to the watermark signal, he can use a meaningful watermark signal. In this way, the extracted watermark signal can also intuitively display the information. Set the carrier image as matrix B (n, m), correspond B to each element of a one-to-one, then move the pixel at the position of element 1 in a to the position of element 2, then move its pixel horizontally to the position of element 3, translate in turn, and finally move horizontally to the position of element 1.

Figure 8

Four pictures of watermark system

From the basic principle of magic square matrix, it is not difficult to see that it has periodicity like Arnold transform, and the period is. The difficulty of magic square scrambling is how to find the magic square matching the size of the image to be scrambled. Another difficulty is that when the size of the carrier image is large, the cycle of magic square transformation will be large, and the steps required to restore the image will increase, resulting in a long time-consuming algorithm.

Watermark attack experiment

The robustness algorithm is mainly used to attack the watermark, and different attack methods are used to test it. The specific experimental results are shown in the figure below. In the meaningless watermark and meaningful watermark divided according to the content, the content conveyed by the meaningless watermark is often a sequence digital string, including pseudo-random sequence, pseudo-random binary sequence and chaotic sequence, which can be directly added to the carrier image when the watermark is embedded. However, this meaningless sequence often can not convey information, and can not express copyright information or logo, so it can not meet many needs of copyright protection. Meaningful watermark signals have various forms, which can be text, sound or image. When the creator needs to add his own copyright information or some kind of declaration to the watermark signal, he can use a meaningful watermark signal. In this way, the extracted watermark signal can also intuitively display the information. A point on an existing square, when changing the point (x, y), when changing the point (x, y), to another point (x1, y1), has following relationship: (x1y1)=(1112)(xy)(mod1) \left( {\matrix{ {{x_1}} \cr {{y_1}} \cr } } \right) = \left( {\matrix{ 1 & 1 \cr 1 & 2 \cr } } \right)\left( {\matrix{ x \cr y \cr } } \right)\left( {{\rm mod} 1} \right)

This transformation method is also called two-dimensional Arnold transformation. The main method is to change the pixel coordinates to change the overall layout of the image. Taking the matrix distribution as an example, the application of this transformation method will mess up all the numbers in the original matrix, but if the transformation continues, there will be a chance to reset the numbers. Therefore, this method is a periodic transformation method, which is specifically expressed as: (x1y1)=(1112)(xy)(modN) \left( {\matrix{ {{x_1}} \cr {{y_1}} \cr } } \right) = \left( {\matrix{ 1 & 1 \cr 1 & 2 \cr } } \right)\left( {\matrix{ x \cr y \cr } } \right)\left( {{\rm mod}\, N} \right)

Where is determined as a coordinate, and N is the image order. Among them, Arnold transform is used to analyze different matrices, which has a typical periodic law. In order to save cost, the content with shorter period should be selected. Magic cube originated very early, and the central idea of its transformation lies in a table lookup thinking. First, set a matrix in which the sum of two numbers on each line is equal Take natural number 1 to n 2N-order matrix of elements.

Figure 9

Two compression test results

Figure 10

Noise test results

Figure 11

Rotation and shear test

In the meaningless watermark and meaningful watermark divided according to the content, the content conveyed by the meaningless watermark is often a sequence digital string, including pseudo-random sequence, pseudo-random binary sequence and chaotic sequence, which can be directly added to the carrier image when the watermark is embedded. However, this meaningless sequence often can not convey information, and can not express copyright information or logo, so it can not meet many needs of copyright protection. Meaningful watermark signals have various forms, which can be text, sound or image. When the creator needs to add his own copyright information or some kind of declaration to the watermark signal, he can use a meaningful watermark signal. In this way, the extracted watermark signal can also intuitively display the information.

The following table 1 shows the relevant parameters in the attack image watermarking experiment:

Watermark simulation related parameters

Attack mode Parameter Normalized parameters Signal to noise ratio (db)
unassailed nothing 0.894375 38.424410
95%JPEG compress 95% 0.894085 38.293235
45%JPEG compress 45% 0.754401 35.026503
Gaussian noise 1/4 0.547445 20.157188
Salt and pepper noise 0.002 0.664663 21.999809
Rotate 0.796050 23.123601
Rotate 95° 0.779734 19.440330
Shear 1/4 0.664663 11.225899

It can be seen from the above pictures that different processing methods have different effects on the restoration process of watermark. However, the correlation coefficient of the watermark recovered after the denoising algorithm is not high, and the visual effect is not good. Therefore, it can be concluded that the robustness of the simulation algorithm is not good, and the watermark extraction is good without attack. Once attacked, the recovered watermark image is not ideal.

Conclusion

Copyright protection of digital media is an important means to encourage creators to create continuously. With the rapid progress of digital technology, all kinds of digital resources suffer more and more infringement. Facing the frequent occurrence of infringement, more new technologies and new methods are needed to deal with and solve the problem of piracy. In this design, the digital watermarking algorithm in frequency domain is studied. The main work and results are as follows:

1) The basic theory of digital watermarking is explained, and the research status of this technology at home and abroad is summarized.

2) The research of digital watermarking algorithm in DCT domain is realized. The experimental results show that the digital algorithm is feasible in watermarking.

3) Through the experiments of non attack and robustness of digital watermark, the feasibility of DW domain digital watermark algorithm in watermark processing technology is verified.

Although this design makes a preliminary exploration and attempt on the common frequency domain image watermarking algorithms, there are other methods not involved, such as the method based on DWT. In addition, in the implementation of the watermark algorithm, the carrier image used in this paper is gray image, but in practical application, the carrier image often exists in color formats such as JPG, which needs to further improve the algorithm to adapt to more carrier image formats and further expand the scope of application.

eISSN:
2470-8038
Sprache:
Englisch
Zeitrahmen der Veröffentlichung:
4 Hefte pro Jahr
Fachgebiete der Zeitschrift:
Informatik, andere