DEVELOPMENT OF A METHOD FOR IMPROVING STABILITY METHOD OF APPLYING DIGITAL WATERMARKS TO DIGITAL IMAGES

into digital images is presented. A technique for increasing the stability of methods for applying digital watermarks into digital images, based on pseudo-holographic coding and additional filtering of a digital watermark, has been developed. The technique described in this work using pseudo-holographic coding of digital watermarks is effective for all types of attacks that were considered, except for image rotation. The paper presents a statistical indicator for assessing the stability of methods for applying digital watermarks. The indicator makes it possible to comprehensively assess the resistance of the method to a certain number of attacks. An experimental study was carried out according to the proposed method. This technique is most effective when part of the image is lost. When pre-filtering a digital watermark, the most effective is the third filtering method, which is averaging over a cell with subsequent binarization. The least efficient is the first method, which is binarization and finding the statistical mode over the cell. For an affine type attack, which is an image rotation, this technique is effective only when the rotation is compensated. To estimate the rotation angle, an affine transformation matrix is found, which is obtained from a consistent set of corresponding ORB-descriptors. Using this method allows to accurately extract a digital watermark for the entire range of angles. A comprehensive assessment of the methodology for increasing the stability of the method of applying a digital watermark based on Wavelet transforms has shown that this method is 20 % better at counteracting various types of attacks


Introduction
Reliability, invisibility and applying are prerequisites for any watermarking technique. However, research has concluded that these requirements are difficult to achieve at the same time.
Steganography techniques are used not only for the covert transmission of messages, but also used to protect copyright or property rights in a digital image, photographs or other digitized works of art.
Therefore, various measures are being developed to protect information, of an organizational and technical nature. One of the most effective technical means of protecting multimedia information is to applied invisible tags -digital watermarks -into the protected. Digital watermarks can contain a lot of useful information: when the file was created, who owns the copyright, contact information about the authors, and more. All entered data can be considered strong evidence when considering issues and litigation about authorship or to prove the fact of illegal copying and is often decisive.
Attacks that extract digital watermarks (filtering, overmodulation, lossy compression, etc.), they act against an applied message, that is, aimed at destroying or damaging a digital watermark by manipulating the tagged image. At the same time, it is rather difficult to develop methods for introducing digital watermarks that are resistant to minor filtering. Such methods usually cause significant distortion of the container image, which is not acceptable.
Thus, an urgent task is to develop methods and approaches that increase the stability of digital watermarks

DEVELOPMENT OF A METHOD FOR IMPROVING STABILITY METHOD OF APPLYING DIGITAL WATERMARKS TO DIGITAL IMAGES O l e k s a n d r M a k o v e i c h u k
Doctor of Technical Sciences, Head of Department Scientific Research Department Abto Software Heroiv UPA str., 77, Lviv, Ukraine, 79015 This paper [7] proposes a robust watermarking technique that combines the features of discrete wavelet transform (DWT), discrete cosine transform, and singular value decomposition. In this technique, DWT is used to decompose color images into different frequency and time scales. According to the results, the combination of DWT-DCT features with SVD technology provides reliability against image processing and geometric attacks in the YIQ color model. However, this technique turned out to be unstable against other types of attacks.
A stable hybrid double watermarking method is discussed in [9]. But when increasing the digital watermark applying rate to achieve a higher level of robustness, minor artifacts are observed in the container image.
The main problems in the implementation of methods for ensuring copyright protection in images representing open steganosystems are the significant destruction or destruction of digital watermarks at high image compression ratios, affine transformations and other types of attacks, as well as the associated noticeable deterioration of the image quality.
Therefore, studies aimed at developing methods and approaches that increase the stability of digital watermarks and do not introduce significant distortions into the container image are relevant.

The aim and objectives of research
The aim of this research is to develop a technique for increasing the stability of methods for applying digital watermarks to digital images. This will enable the further use of methods for applying digital watermarks in commercial projects, while ensuring an acceptable level of stability.
To achieve the aim, the following objectives were set: -to develop a functional model of the process of ensuring increased stability of methods for applying digital watermarks in images; -to propose an indicator for assessing sustainability; -to conduct an experimental study, according to the proposed method.

Materials and methods of research
Modern research to create an effective watermarking system uses various methods to improve and balance characteristics such as: stability, invisibility, reliability.
Let's note that the work does not impose any restrictions on the type of attacks; therefore, it is required that the proposed method of steganography be resistant to the loss of a part of the image to which the watermark is added.
The direction of solving this problem is provided by the so-called holographic metaphor -a distributed form of digital images presentation, which is resistant to interference [10][11][12][13][14].
The idea of the proposed transformation is quite transparent: the digital image is unfolded into a one-dimensional sequence so that the "distant" points of the image should be "close" numbers in a one-dimensional sequence.
In this case, each point with coordinates (m, n) on the image is associated with a certain number k, which deter-and do not introduce significant distortions into the container image.

Literature review and problem statement
The authors of the article [1] have developed a technique for marking color images of a digital watermark using the induction of a decision tree in the field of discrete cosine transform. The method uses discrete cosine transform domains to transform the container image and watermark, and the decision tree induction method is used to hide the watermark. But since a color image has three channels, in which the intensity will be different, then for each channel it will be necessary to select a different threshold for selecting blocks for applying a digital watermark. And it is the use of a decision tree that makes it impossible to universally use this method of applying a digital watermark, since the thresholds for the selection of applying blocks will need to be calculated for each image separately.
In [2], the authors present geometrically invariant images of watermarks based on affine covariant regions (ACR), which provide a certain degree of stability. To further improve reliability, a new watermark scheme is used based on work [3], which is insensitive to geometric distortions, as well as general image processing operations. This scheme consists mainly of three components: 1) the feature selection procedure based on the theoretical graph clustering algorithm is used to obtain a set of stable ACRs that do not overlap; 2) for each selected ACR, local normalization and orientation alignment are performed to create a geometrically invariant region that can improve the robustness of the proposed watermarking scheme; 3) in order to prevent image quality degradation caused by normalization and reverse normalization, indirect inverse normalization is applied to achieve a good trade-off between stealth and reliability.
However, this method is resistant only to geometric distortions of images.
The authors have developed a watermarking algorithm using a singular matrix representation and a genetic algorithm [4]. The method uses a singular vector to insert a watermark into the container. In addition, the genetic algorithm technique is used to improve the efficiency of the proposed scheme. But the computational complexity that arises when using a genetic algorithm makes it impossible to use this approach in real life.
Wavelet-based watermarks are presented in [5]. The method uses a scale factor to modify a single vector of the container image. In addition, multipurpose particle swarm optimization is used to optimize the balance between conflicting watermarking factors. But there are still unresolved issues related to image distortions in which a significant part of information is lost (for example, a large percentage of noise or loss of part of the image) In [6], a technique for applying watermarks based on human perception of color is proposed. It provides a new visual model that can accurately assess the degree of noticeable distortions in the human visual system. However, the work does not highlight how to select the desired area for applying. It does not provide an opportunity to assess the sustainability of this technique. mines the number of this point in a pseudo-holographic sequence. When the sequence is scanned and recorded, a "pseudo-hologram" is formed.
Such a transformation allows reconstructing a reduced copy of the original image with an arbitrary connected fragment of the resulting sequence (or, using interpolation methods, reconstructing a full-scale approximation of the original image). That is, a fragment of a one-dimensional sequence, like an analog hologram, contains enough information about the entire image as a whole.
Such a "holographic" representation of images is resistant to data corruption, since even if some of the image information is lost, it is possible to recover with a certain accuracy, depending on the size of the loss.
Thus, it is proposed to carry out a pseudo-holographic coding procedure for the watermark image, which consists in mixing the image pixels using a known pseudo-random permutation [15]: where w perm -result of pixel shuffling, p -known pseudo-random permutation. To obtain such a permutation, it is convenient to use an algorithm that consists in generating a pseudo-random uniformly distributed sequence x, which is then sorted in ascending order and taken as a permutation p (indices in the sorted sequence). Let's note that it is advisable to consider only global permutations, the use of block permutations requires the fulfillment of the condition on the block size, which must be greater than the correlation radius of the image (in this case, it is commensurate with the size of the QR code) [16].
When adding digital signs (watermark) to images, it is proposed to use wavelet transforms (Digital Wavelet Transform, DWT) [17][18][19]. In this case, the container image is converted using DWT into four sub-bands: low-high (LH), high-low (HL), high-high (HH) and low-low (LL) [20]. It is possible to formally write this in the form where f -container image, DWT () is a function that implements DWT [LL, HL, LH, HH] -the corresponding wavelet transform subbands. In this case, most of the known types of DWT can be used; Daubechies wavelets were used in this work [21].
The watermark multiplicatively modifies the LL subband, in which the main information about the picture is concentrated: where w -watermark image, LL w -modified sub-range LL, α -parameter, an operator (•), which means element-wise matrix multiplication. Let's note that the watermark image must be half the size of the container image. The original image (with an attached watermark) is created using the inverse wavelet transform: where f w -watermarked container image, DWT -1 () -inverse DWT transform function.
To extract digital watermarks, the above procedure is performed in reverse order: 1) similarly to (1), the wavelet transforms are carried out: where [LL', HL', LH', HH'] -the corresponding wavelet transform sub-bands; 2) the estimate of the digital watermark w'is found as the difference between the LL -subbands of the watermarked image and the container image: 3) since the estimate of the digital watermark w' will be modulated by LL (expressions (3) and (5)), taking into account the presence of noise, it is proposed to filter the image w". In an important special case, when the digital watermark is a binary matrix code (for example, QR code) for filtering, it is possible to use the following procedures that will be performed for each cell of the matrix code: -binarization and finding the statistical mode over the cell: where 1 q w -filtering result for the first method; mode() -function, returns the value of the statistical mode; t 1 -binarization threshold; -averaging over binarized values over a cell and further binarization: w -filtering result for the second method; mean() -averaging function; t 2 -binarization threshold; -cell averaging and further binarization: where 3 q w -filtering result for the second method; t 3 -binarization threshold. The binarization thresholds t 1,2,3 are found using the Otsu's algorithm [22] or using adaptive binarization [23].
This study takes into account the main factors and new techniques used by potential researchers to create a reliable system for applying DW to digital images.

1. Functional model of the process of ensuring the enhancement of resilience
The functional model of the process of ensuring the enhancement of the sustainability of methods for applying digital watermarks in digital images is shown in Fig. 1.
In Fig. 1 the following notation is used: f − container image, w − digital watermark, p -known pseudo-random permutation, w perm − mixed digital watermark, f' -container image with added watermark, perm w′ − extracted mixed digital watermark, w' − restored digital watermark with distortion.
The technique described in Fig. 1 includes the following steps: 1. Mixing the pixels of the digital watermark. The essence of this stage is that a sequence of indices l={l 1 , l 2 , …, l n×m }is formed using a pseudo-random number generator, where n, m is the size of the watermark w in pixels. Then the k-pixel of the watermark is moved to the place of the pixel with the index l k . Thus, let's obtain a digital watermark (w perm ) mixed with a known sequence.
2. Applying a mixed digital watermark (w perm ) into a digital container image (f). At this stage, using any method of applying a digital watermark, application (w perm ) occurs. In this work, a method using wavelet transforms was used to apply a digital sign. Let's use Daubechies wavelets [21] to represent a container image (f) and a mixed digital watermark (w perm ). Then, using the LL coefficient and a certain coefficient α using formulas (3), (4), the frequency spectrum of the mixed digital watermark (w perm ) is added to the frequency spectrum of the container image (f).
3. Extraction of the mixed digital watermark (w perm ) from the container image with a digital watermark (f'). At this stage, using formula (3), the wavelet transforms and images are represented in the frequency spectrum. Using formula (6), an estimate of the digital watermark w' is found as the difference between the LL -sub-bands of the watermarked image and the container image.
4. Restoring the normal sequence of digital watermark pixels. This step is the reverse of the procedure presented in the first step, after which let's obtain a normal sequence of digital watermark pixels. 5. Using digital watermark filtering. In this step, various image filtering methods are used to improve the digital watermark. In this work, let's use three methods of image filtering described by formulas (7)- (9).
In this technique, due to pseudo-holographic coding, the digital watermark is converted, which is resistant to different types of distortions. This, in turn, in combination with the methods of filtering images after separating the digital watermark and restoring the normal distribution of the digital watermark pixels makes it possible to achieve a high level of stability of the methods of applying digital watermarks during various attacks.

2. Indicator for assessing the sustainability of methods for applying digital water
The stability of the digital watermark applying method can be assessed in a statistical sense, the following assumptions were made.
The digital watermarking method W can be defined as a set of some functions F and G that describe the process of applying and extracting a digital watermark on a set of all data: E is the set of data required for the digital watermark applying and extraction method to work.
For simplicity, let's assume that the input dataset E includes the embed container Im and the digital watermark Wm: All such cases are called false. As a criterion for comparing the correspondence between formulas (12) and (13), other criteria for assessing the correspondence of two images can also be used, for example, the assessments presented in [24,25].
Transformation of the form , , results in the correct reading of the digital watermark from the container or false triggering, represented by formulas (12), (13). Thus, the probability P that, after using an attack on a container from a digital watermark At Im Im ′ = , extraction of the digital watermark from the container will lead to an erroneous result (13) is equal to the probability that the input data set E i used in the j-th attack belongs to the set E l . Let n l,j be the number of different input data sets contained in E l , for the j-th attack, then Q j =n l,j /N is the probability that the execution of the sequence of functions (14) on the data set E i randomly selected from E among the same likely to result in a false digital watermark exception.
In this case, P j =1-Q=1-n l,j /N is the probability that during the j-th attack on the element E i , randomly selected from the set E, the value of the digital watermark will be obtained, which is within acceptable limits -the expression (12).
Since various attacks are independent events, the probability that these attacks do not provide an acceptable resultexpression (13) is equal to the product of the probabilities of admissible digital watermark values after each attack: It is this product of probabilities that will assess the reliability of the DW method.

3. Experimental study of the method of applying digital watermarks
For the experiments, a test image in grayscale Cameraman was used as the container image (Fig. 2, a). For a digital watermark image -a binary QR-code image, which is a matrix of 29×29 elements, where the message 'KHARKIV NATIONAL UNIVERSITY OF RADIO ELECTRONICS' is encoded (Fig. 2, b). When the size of the QR-code image is 464×464 pixels (that is, the size of one cell is 16×16), Cameraman was rescaled to size 928×928. To obtain a digital watermark, the pixels of the QR-code image were mixed using the procedure described above (Fig. 2, c). The result of adding a digital watermark (parameter value α=0.1) is shown in Fig. 2, d. During the experiment, the influence of the following types of attacks was investigated: -addition of normally distributed noise with a given mean and variance; -adding noise like "salt and pepper" with a given density; -rotation at a given angle; -extraction of a part of the image of a given size; -jpeg compression with a specified quality parameter. For each type of attack, the total number of errors in the QR code matrix obtained from the selected digital watermark was determined.
The influence of normally distributed additive noise with mean μ=0: 0.001: 0.05 and variance σ 2 =0: 0.001: 0.05 was investigated. The results are shown in Fig. 3-7. When studying the influence of normally distributed additive noise (Fig. 3), it is possible to construct graphs of the dependence of the number of errors on the noise parameters, shown in Fig. 7-9.
Next, let's investigate the effect of "salt and pepper" noise with a density ρ=0: 0.01: 0.5. The results are shown in Fig. 10-13.
All filtering methods for this type of attack are equally ineffective.
The second step involves investigating the use of rotation compensation before extracting the digital watermark from the container image.
To estimate the rotation angle, let's find the affine transformation matrix between the original and returned container images. To do this, on each of these images, let's determine the location of the singularity points (as which let's use the ORB descriptors [24]). Let's note that in order to detect a sufficient number of descriptors, these images must be smoothed using a Gaussian filter with σ=3 (Fig. 20).    When investigating the influence of "salt-and-pepper" noise ( Fig. 10-13), it is possible to build graphs of the dependence of the number of errors on the noise parameters (Fig. 14).
The study of the effect of image rotation on a digital watermark was carried out in two stages.
At the first stage, the influence of image rotation on angles φ=2°:0.1°:2° was investigated. The results are shown in Fig. 15-18.

Method 3
Error Noise parameter  For each filtering method, graphs of the dependence of the number of errors on the rotation angle are shown (Fig. 19).
Finding the corresponding points of the ORB descriptor is performed using the RANSAC algorithm [25]. RANSAC (abbr. RANdom SAmple Consensus) is an iterative method used to estimate the parameters of a mathematical model for a set of observable data that contains outliers (Fig. 21). Oriented FAST and Rotated BRIEF The described compensation method can be easily generalized to other coordinate transformations and is a promising direction for further research.
Knowing the rotation angle, turn the image in the opposite direction (Fig. 22). For each filtering method, graphs of the dependence of the number of errors on the size of the extracted square are shown (Fig. 30).
Further, the influence of image compression using the Jpeg algorithm was investigated depending on the value of the quality parameter q=1:100. The results are shown in Fig. 31-34.
When studying the effect of image compression using the Jpeg algorithm, depending on the value of the quality parameter in Fig. 31-34 it is possible to build the following graphs (Fig. 35).
Further, the stability of the proposed method was assessed. When assessing the reliability of the proposed methodology, five types of attacks were used: -addition of normally distributed noise with a given mean and variance; -addition of noise like "salt and pepper" with a given density; -rotation at a given angle; -extraction of a part of the image of a given size; -jpeg compression with a specified quality parameter. Each type of attack included 500 different variations of these attacks. The test results are presented in Table 1.

Discussion of the results of the study of methods for increasing the stability of applying digital watermarks
The method of pseudo-holographic coding of digital watermarks described in this work is effective for all types of attacks that were considered, except for image rotation. This method is most effective when part of the image is lost.
After analyzing the graphs in Fig. 7-9, it is possible to conclude that the third filtering method is the most effective.
As can be seen from the graph in Fig. 14 the second and third filtering methods are effective and give comparable results.
The investigation of the "turn" attack was carried out in two stages. At the first stage, the influence of image rotation on angles φ=2°:0.1°:2° was investigated. For each filtering method, graphs of the dependence of the number of errors on the rotation angle are shown (Fig. 19).
After analyzing the results obtained during image rotations, the following conclusions can be drawn. First, without rotation compensation, all filtering methods for this type of attack are equally ineffective -if the image is returned to an angle greater than 0.2°, then the correct selection of the digital watermark is impossible. Secondly, using the proposed compensation method, all three filtering methods work absolutely faultlessly in the entire range of investigated angles φ=-10°:10°.
During the attack, extracting a part of the image from the graph in Fig. 30 shows that the third filtering method is the most effective.
When studying the effect of image compression using the Jpeg algorithm, depending on the value of the quality parameter ( Fig. 31-34), it can be seen (Fig. 35) that all three methods give comparable results, the most effective is the third filtering method.  Table 1 Reliability assessment results Methods for applying digital watermarks Reliability assessment of the digital watermarking method The classic method of applying a digital watermark using wavelet transforms 0,6348 Digital watermarking based on wavelet transforms using the proposed technique 0,8344 As can be seen from the test results, due to the use of pseudo-holographic coding, the inhomogeneity of applying a digital watermark into the container image is ensured. This makes it possible to increase the resistance of the method to the loss of a part of the pixels of the digital watermark. And methods of filtering a digital watermark allow to restore lost information based on statistical criteria.
Thus, based on the results shown in Table 1, it is possible to say that the use of the proposed technique increased the reliability of the method by 20 %.
The above allows to determine that the proposed method has advantages in that, regardless of the method of applying a digital watermark, an increase in stability will be provided.
For the development of the proposed technique, it is planned to conduct further research on pseudo-holographic coding methods using chaos theory.

Conclusions
1. A functional model of the process of ensuring increased stability of methods for applying digital watermarks into digital images, based on pseudo-holographic coding and additional filtering of a digital watermark, has been developed. The method of pseudo-holographic coding of digital watermarks described in the work is effective for countering all types of attacks that were considered, except for image rotation. A comprehensive assessment of the methodology for increasing the stability of the method of applying a digital watermark based on Wavelet transformations has shown that its use improves resistance to various types of attacks by 20 %.
2. The paper presents an indicator for assessing the sustainability of digital watermarking methods, which takes into account all types of attacks and allows a comprehensive assessment of the sustainability of the digital watermarking method.
3. An experimental study was carried out according to the proposed method. This technique is most effective when part of the image is lost. When pre-filtering a digital watermark, the third filtering method is most effective. This method is averaging over a cell and subsequent binarization. The least efficient method is the first binarization method and finding the statistical mode over the cell. It is advisable to carry out binarization according to the Otsu algorithm. For an attack of the affine type, which is a rotation of the image, this method is effective only when compensating for the rotation. To estimate the rotation angle, an affine transformation matrix is found, which is obtained from a consistent set of corresponding ORB-descriptors. Using this method allows to accurately identify a digital watermark for the entire range of angles investigated.