**Abstract**

Steganography is a technology for hiding watermarks inside media files, which is relevant in the field of copyright protection, secret communication, etc. The effectiveness of modern methods of digital image processing allows determining the presence of embedded watermarks in a stegoimage using the original image and its statistical characteristics, as well as a priori information about the method and algorithm of embedding. In contrast to the known approaches, it is proposed to use algebraic fractals for steganographic embedding of watermarks in color images. It is proposed to use algebraic fractals in the form of medium cover image acting as a secret key, which allows the embedding to be more resistant to computer attacks, including JPEG compression. The main advantage of such use of fractals is an increase in the level of secrecy in which the attacker must know the parameters of the fractal image. Without knowledge of these parameters, it will not be enough to have the original stegoimage and a priori information about the embedding method to extract secret data. This chapter analyzes the methods and provides examples of generating algebraic fractals in the form of the Julia set using the escape time algorithm.

**Keywords:** steganography, watermarks, color images, copyright protection, Julia set, escape time algorithm

### **1. Introduction**

The digital form of audio, image, and video has become a commercial standard in the past decade. Digitized multimedia files can be easily created, copied, processed, saved, and distributed using commercial and free software. Unfortunately, the digitization of multimedia files leads to the fact that these files are subject to digital piracy: illegal copying, use, and distribution of copyrighted digital data. In order to combat digital piracy, various copyright protection mechanisms have been developed for many years. However, most of these mechanisms were found to be erroneous and unsafe.

One of the tools to protect multimedia data from copyright infringement is digital watermarks. Into digital watermarks, an imperceptible "mark" signal is embedded in the original image. This label uniquely identifies the owner. After embedding the watermark in the original image (container) there should be no noticeable distortion. Embedded watermarks should not be removed by an incomplete person and must be resistant to intentional and unintentional attacks.

One of the ways to protect copyright, which currently exists, is steganography, the art of hiding information in electronic media. Methods of steganography vary in their approach to hiding information. As a rule, the hidden data in electronic means will change some of their properties, which can lead to degradation or unusual characteristics.

called the "seahorse valley" in the vicinity of zo = 0, which have the property of

3. Select the maxstep parameter to indicate the maximum iteration. The higher it

4.Generate an array of colors from less bright to brighter. We will denote the color dependence of the removal of points from a variety of Julia sets;

5.For each point, we calculate whether it is part of the filled Julia set or not, as well as the iteration number at which the threshold has exceeded. If |z| > R then use the first color, then use the color palette on which the iteration

The implementation of the algorithm begins with the construction of the rectangle L � L, within which the Julia set will be constructed. By changing its parameters, we can "bring closer" the concentrations of interest to a set with high accuracy. The resulting rectangle is divided into parts with coordinates *zi*,*<sup>j</sup>*

Each point *zi*,*<sup>j</sup>* enters an iterative loop *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>*. The number of iterations depends on the maxstep parameter. If after a given number of iterations a point

Depending on which area of the Julia set will be generated (L � L), a certain number of points will go to infinity, without reaching the maximum iteration. To optimize the algorithm and significantly reduce the generation time of the Julia set, the following approach was adopted: for a complex number, the radius

<sup>2</sup> is calculated, and at each iteration, the test *zi*,*<sup>j</sup>* >*R* occurs, for points

The points *zi*,*<sup>j</sup>* extending beyond this radius will go to infinity through a certain

Such an approach can significantly reduce the number of calculations, especially

number of iterations; since their attractor is an infinitely distant point (points *zi*,*<sup>j</sup>* >*R* enter the pool of the attractor A (∞)). The basin of an attractor of a point z of a function f is a subset of points from a neighborhood of z (denoted as A (z)), that

with the general form of the Julia set (2 � 2). However, with an increase in the approximation to the level (0.005 � 0.005) the number of calculations will tend to the initial ones, as more and more points will belong to the Julia Set. The color in the implementation of the algorithm was chosen so that the absolute red color (with a brightness level of 255) has points (belonging to the Julia set) that do not go to infinity with the maximum number of iterations maxstep. The brightness of the "red component" of the rest of the check depends on the number of iterations that the point passed, going to infinity (points not belonging to the Julia set, but rather close to its boundary). For the green channel, an inverse relationship was used: the smaller the iterations, the greater the brightness of the green component up to the level of 255, if the point was originally outside the radius. The blue channel changes depending on the distance of the point from the origin and is minimal at z = 0.

Thus, the algorithm for constructing the Julia set takes the form of [4]:

2.Calculate the radius R for a given polynomial *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>*;

is, the higher the accuracy and the slower the algorithm;

self-similarity with chaotic dynamics.

*Using Algebraic Fractals in Steganography DOI: http://dx.doi.org/10.5772/intechopen.92018*

1.Select point c to set polynomial *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>*;

number was exceeded a threshold.

*<sup>R</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> þ

**87**

ffiffiffiffiffiffiffiffiffi <sup>1</sup>þ4∣*c*<sup>∣</sup> <sup>p</sup>

depending on the number of pixels of the image M � M.

does not go to infinity, then such a point belongs to the Julia set.

satisfying this condition, iterations are no longer performed.

any trajectory starting at one of these points converges to a point z.

The paper deals with the introduction of watermark into a still color image of JPEG format using steganography methods. A feature of the proposed method is the use of a fractal image as a secret key, in which a two-dimensional fractal of algebraic type in the form of a Julia set is used. As a result, an evil intentional person will not be able to generate an identical fractal image without the exact value of a certain complex number, which is agreed in advance between the sender and the recipient, which makes the proposed method resistant to attacks.

Algorithms for creating a fractal image are considered, into which a digital watermark is then embedded.

To embed the fractal image in the container, the algorithm that performs a three-level expansion using the Haar transform was chosen and implemented in the MATLAB. In order to optimize the quality of extraction and the amount of embedded information, an algorithm for calculating thresholds has been proposed, with the help of which the necessary number of wavelet decomposition coefficients suitable for embedding has been selected.

To assess the possibility of detecting the fact of embedding the watermark in the stegoimage, the method of estimating the fractal dimension (FR) can be used before and after the mark has been embedded. With numerous examples of parameters of algebraic fractals and the hidden algorithms used, it is shown that the introduction of a watermark slightly changes the fractal dimension of the stegoimage, which corresponds to the high stability of the method to possible steganographic attacks.

To assess the quality of the results obtained, the quality was estimated based on the following metrics: mean square error (MSE) and signal-to-noise ratio (SNR), expressed in decibels. The results of the original container and the container in which the watermark with the key in the form of a fractal are embedded, as well as the original and extracted watermark, are given.

Analysis of the results of the quality assessment of the original container and the container with the embedded watermark and the key in the form of a fractal, as well as the original and extracted watermark showed that the proposed algorithm provides a high quality of hiding confidential information.

## **2. Algorithm development and software implementation of the generation of a fractal image of Julia set**

The fractal image of a Julia sets will form using an algorithm of time escape (Escape time algorithm) [1, 2]. The algorithm is based on the use of complex maps when one complex number *zn* ¼ *xn* þ *iyn* is matched by another complex number *zn*þ<sup>1</sup> <sup>¼</sup> *xn*þ<sup>1</sup> <sup>þ</sup> *iyn*þ<sup>1</sup> according to the iterative rule *zn*þ<sup>1</sup> <sup>¼</sup> *f z*ð Þ*<sup>n</sup>* , where f(z) is some nonlinear function of the argument z, and n is the iteration number.

The algorithm uses a quadratic complex polynomial: *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>* where *<sup>c</sup>* <sup>¼</sup> *x* þ *iy* is the starting point on the complex plane on the basis of which the Julia set is constructed.

If point c belongs to the Mandelbrot set, the Julia set constructed on it is connected [3]. If c does not belong to the Mandelbrot set, the constructed sets are scattered into an infinite number of isolated points (Fatu dust). If the point c lies near the boundary of the Mandelbrot set, such sets form fractal figures figuratively

One of the ways to protect copyright, which currently exists, is steganography, the art of hiding information in electronic media. Methods of steganography vary in their approach to hiding information. As a rule, the hidden data in electronic means will change some of their properties, which can lead to degradation or unusual

The paper deals with the introduction of watermark into a still color image of JPEG format using steganography methods. A feature of the proposed method is the use of a fractal image as a secret key, in which a two-dimensional fractal of algebraic type in the form of a Julia set is used. As a result, an evil intentional person will not be able to generate an identical fractal image without the exact value of a certain complex number, which is agreed in advance between the sender and the recipient,

Algorithms for creating a fractal image are considered, into which a digital

To embed the fractal image in the container, the algorithm that performs a three-level expansion using the Haar transform was chosen and implemented in the MATLAB. In order to optimize the quality of extraction and the amount of embedded information, an algorithm for calculating thresholds has been proposed, with the help of which the necessary number of wavelet decomposition coefficients

To assess the possibility of detecting the fact of embedding the watermark in the stegoimage, the method of estimating the fractal dimension (FR) can be used before and after the mark has been embedded. With numerous examples of parameters of algebraic fractals and the hidden algorithms used, it is shown that the introduction of a watermark slightly changes the fractal dimension of the stegoimage, which corresponds to the high stability of the method to possible steganographic attacks. To assess the quality of the results obtained, the quality was estimated based on the following metrics: mean square error (MSE) and signal-to-noise ratio (SNR), expressed in decibels. The results of the original container and the container in which the watermark with the key in the form of a fractal are embedded, as well as

Analysis of the results of the quality assessment of the original container and the container with the embedded watermark and the key in the form of a fractal, as well as the original and extracted watermark showed that the proposed algorithm pro-

**2. Algorithm development and software implementation of the**

nonlinear function of the argument z, and n is the iteration number.

The fractal image of a Julia sets will form using an algorithm of time escape (Escape time algorithm) [1, 2]. The algorithm is based on the use of complex maps when one complex number *zn* ¼ *xn* þ *iyn* is matched by another complex number *zn*þ<sup>1</sup> <sup>¼</sup> *xn*þ<sup>1</sup> <sup>þ</sup> *iyn*þ<sup>1</sup> according to the iterative rule *zn*þ<sup>1</sup> <sup>¼</sup> *f z*ð Þ*<sup>n</sup>* , where f(z) is some

The algorithm uses a quadratic complex polynomial: *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>* where *<sup>c</sup>* <sup>¼</sup> *x* þ *iy* is the starting point on the complex plane on the basis of which the Julia set is

If point c belongs to the Mandelbrot set, the Julia set constructed on it is connected [3]. If c does not belong to the Mandelbrot set, the constructed sets are scattered into an infinite number of isolated points (Fatu dust). If the point c lies near the boundary of the Mandelbrot set, such sets form fractal figures figuratively

which makes the proposed method resistant to attacks.

characteristics.

watermark is then embedded.

*Fractal Analysis - Selected Examples*

suitable for embedding has been selected.

the original and extracted watermark, are given.

vides a high quality of hiding confidential information.

**generation of a fractal image of Julia set**

constructed.

**86**

called the "seahorse valley" in the vicinity of zo = 0, which have the property of self-similarity with chaotic dynamics.

Thus, the algorithm for constructing the Julia set takes the form of [4]:


The implementation of the algorithm begins with the construction of the rectangle L � L, within which the Julia set will be constructed. By changing its parameters, we can "bring closer" the concentrations of interest to a set with high accuracy. The resulting rectangle is divided into parts with coordinates *zi*,*<sup>j</sup>* depending on the number of pixels of the image M � M.

Each point *zi*,*<sup>j</sup>* enters an iterative loop *f z*ð Þ¼ *<sup>z</sup>*<sup>2</sup> <sup>þ</sup> *<sup>c</sup>*. The number of iterations depends on the maxstep parameter. If after a given number of iterations a point does not go to infinity, then such a point belongs to the Julia set.

Depending on which area of the Julia set will be generated (L � L), a certain number of points will go to infinity, without reaching the maximum iteration.

To optimize the algorithm and significantly reduce the generation time of the Julia set, the following approach was adopted: for a complex number, the radius *<sup>R</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> þ ffiffiffiffiffiffiffiffiffi <sup>1</sup>þ4∣*c*<sup>∣</sup> <sup>p</sup> <sup>2</sup> is calculated, and at each iteration, the test *zi*,*<sup>j</sup>* >*R* occurs, for points satisfying this condition, iterations are no longer performed.

The points *zi*,*<sup>j</sup>* extending beyond this radius will go to infinity through a certain number of iterations; since their attractor is an infinitely distant point (points *zi*,*<sup>j</sup>* >*R* enter the pool of the attractor A (∞)). The basin of an attractor of a point z of a function f is a subset of points from a neighborhood of z (denoted as A (z)), that any trajectory starting at one of these points converges to a point z.

Such an approach can significantly reduce the number of calculations, especially with the general form of the Julia set (2 � 2). However, with an increase in the approximation to the level (0.005 � 0.005) the number of calculations will tend to the initial ones, as more and more points will belong to the Julia Set. The color in the implementation of the algorithm was chosen so that the absolute red color (with a brightness level of 255) has points (belonging to the Julia set) that do not go to infinity with the maximum number of iterations maxstep. The brightness of the "red component" of the rest of the check depends on the number of iterations that the point passed, going to infinity (points not belonging to the Julia set, but rather close to its boundary). For the green channel, an inverse relationship was used: the smaller the iterations, the greater the brightness of the green component up to the level of 255, if the point was originally outside the radius. The blue channel changes depending on the distance of the point from the origin and is minimal at z = 0.

if w((i-1)\*m+j)>max max=w((i-1)\*m+j);

*Using Algebraic Fractals in Steganography DOI: http://dx.doi.org/10.5772/intechopen.92018*

if (abs(z(i,j))/r)>1 Blue(i,j)=255;

img(:,:,2)=Green; img(:,:,3)=Blue;

the Julia set;

approximation);

imwrite(img,'fractal.bmp'); User-defined initial conditions:

Red(i,j)=uint8(255\*w((i-1)\*m+j)/max); Green(i,j)=uint8(255-255\*w((i-1)\*m+j)/max);

Blue(i,j)=uint8(255\*(abs(z(i,j)/r)));

fractal byte) is replaced with a watermark bit.

first level LH1, HH1, HL1 is as follows:

where *<sup>i</sup>* <sup>¼</sup> 1, … , *<sup>M</sup>*; *<sup>j</sup>* <sup>¼</sup> 1, … , *<sup>N</sup>*; *jj* <sup>¼</sup> *<sup>j</sup>*, … , *<sup>N</sup>*

(Eqs. (1) and (2)).

**89**

maxstep - the maximum number of iterations, which determines the detailing of

l - the dimension of the rectangle (determines the scale of the approximation); cx, cy- coordinates of the center of the rectangle (determine the coordinates of the

m is the size of the container (the number of pixels of the image mxm). The results of the developed program module are presented in **Figure 1**.

**3. Embedding a watermark in a stegoimage using a "fractal key"**

embedding the filled fractal key into the original image begins [8–10].

The created fractal image based on Julia's set can be used as an intermediate cover image (key) for embedding a digital watermark into it by one of the wellknown methods [5–7]. So, for example, when using the least significant bit method when embedding, a fractal is converted into a one-dimensional binary array and every eighth bit of the given array (that is, every least significant bit of the next

After the watermark is fully integrated into the created fractal image, the step of

A horizontal Haar transform is applied (across all rows) to the source container

*<sup>C</sup>*1½ �¼ *<sup>i</sup>*, *jj Cont i*½ �þ , *<sup>j</sup> Cont i*½ � , *<sup>j</sup>* <sup>þ</sup> <sup>1</sup>

*<sup>C</sup>*2½ �¼ *<sup>i</sup>*, *jj Cont i*½ �� , *<sup>j</sup> Cont i*½ � , *<sup>j</sup>* <sup>þ</sup> <sup>1</sup>

2 .

<sup>2</sup> (1)

<sup>2</sup> (2)

As an example, consider embedding a watermark in a container using a 2D wavelet algorithm. To embed a watermark (in our case, a fractal image containing a watermark) in a cover image using 2D fiberboard, the algorithm [11–13] was used as a basis, which uses a three-level wavelet decomposition using the Haar transform. The decomposition of the container in the area of coefficients of detail of the

end end

else

end end end img=Red;

#### **Figure 1.**

*Generated fractals with various parameters: (a) с = 0.74543 + 0.11301i, maxstep = 300, l = 1.5, m = 1024; (b) с = 0.74543 + 0.11301i, maxstep = 300, l = 0.5, m = 1024; (c) с = 0.77780781 + 0.13164510i, maxstep = 300, l = 1.5, m = 1024; and (d) с = 0.77780781 + 0.13164510i, maxstep = 300, l = 0.5, m = 1024.*

The implementation of the above method in the MATLAB math package is shown in Listing 1:

```
clear;
cx=0;
cy=0;
l=0.005;
maxstep=300;
m=600;
max=0;
C=-0.74543 + 0.11301i;
r=0.5+sqrt(1+4*abs(C))/2;
for i=1:m
for j=1:m
z(i,j)=-l+j*2*l/(m-1)+(-l+i*2*l/(m-1))*1i;
for k=1:maxstep
w((i-1)*m+j)=maxstep;
if (abs(z(i,j))>r)
w((i-1)*m+j)=k;
break;
end
z(i,j)=power(z(i,j),2)+C;
```
*Using Algebraic Fractals in Steganography DOI: http://dx.doi.org/10.5772/intechopen.92018*

```
if w((i-1)*m+j)>max
max=w((i-1)*m+j);
end
end
Red(i,j)=uint8(255*w((i-1)*m+j)/max);
Green(i,j)=uint8(255-255*w((i-1)*m+j)/max);
if (abs(z(i,j))/r)>1
Blue(i,j)=255;
else
Blue(i,j)=uint8(255*(abs(z(i,j)/r)));
end
end
end
img=Red;
img(:,:,2)=Green;
img(:,:,3)=Blue;
imwrite(img,'fractal.bmp');
User-defined initial conditions:
maxstep - the maximum number of iterations, which determines the detailing of
```
the Julia set;

l - the dimension of the rectangle (determines the scale of the approximation);

cx, cy- coordinates of the center of the rectangle (determine the coordinates of the approximation);

m is the size of the container (the number of pixels of the image mxm).

The results of the developed program module are presented in **Figure 1**.

## **3. Embedding a watermark in a stegoimage using a "fractal key"**

The created fractal image based on Julia's set can be used as an intermediate cover image (key) for embedding a digital watermark into it by one of the wellknown methods [5–7]. So, for example, when using the least significant bit method when embedding, a fractal is converted into a one-dimensional binary array and every eighth bit of the given array (that is, every least significant bit of the next fractal byte) is replaced with a watermark bit.

After the watermark is fully integrated into the created fractal image, the step of embedding the filled fractal key into the original image begins [8–10].

As an example, consider embedding a watermark in a container using a 2D wavelet algorithm. To embed a watermark (in our case, a fractal image containing a watermark) in a cover image using 2D fiberboard, the algorithm [11–13] was used as a basis, which uses a three-level wavelet decomposition using the Haar transform. The decomposition of the container in the area of coefficients of detail of the first level LH1, HH1, HL1 is as follows:

A horizontal Haar transform is applied (across all rows) to the source container (Eqs. (1) and (2)).

$$\text{C1}[i, jj] = \frac{\text{Cont}[i, j] + \text{Cont}[i, j+1]}{2} \tag{1}$$

$$\text{C2}[i, jj] = \frac{\text{Cont}[i, j] - \text{Cont}[i, j+1]}{2} \tag{2}$$

where *<sup>i</sup>* <sup>¼</sup> 1, … , *<sup>M</sup>*; *<sup>j</sup>* <sup>¼</sup> 1, … , *<sup>N</sup>*; *jj* <sup>¼</sup> *<sup>j</sup>*, … , *<sup>N</sup>* 2 .

The implementation of the above method in the MATLAB math package is

*Generated fractals with various parameters: (a) с = 0.74543 + 0.11301i, maxstep = 300, l = 1.5, m = 1024; (b) с = 0.74543 + 0.11301i, maxstep = 300, l = 0.5, m = 1024; (c) с = 0.77780781 + 0.13164510i, maxstep = 300, l = 1.5, m = 1024; and (d) с = 0.77780781 + 0.13164510i, maxstep = 300, l = 0.5, m = 1024.*

shown in Listing 1:

*Fractal Analysis - Selected Examples*

C=-0.74543 + 0.11301i; r=0.5+sqrt(1+4\*abs(C))/2;

z(i,j)=-l+j\*2\*l/(m-1)+(-l+i\*2\*l/(m-1))\*1i;

clear; cx=0; cy=0; l=0.005; maxstep=300; m=600; max=0;

**Figure 1.**

for i=1:m for j=1:m

break; end

**88**

for k=1:maxstep

w((i-1)\*m+j)=maxstep; if (abs(z(i,j))>r) w((i-1)\*m+j)=k;

z(i,j)=power(z(i,j),2)+C;

In Eqs. (1) and (2), the following notation is used: Сont is an array of pixels of the original image; C1 is the half-sum matrix of pixels in the original image; C2 is the half-difference matrix of the pixels of the original image; M is the number of rows of the original image; and N is the number of columns of the original image.

The resulting matrices C1 and C2 will have the same dimension [i, jj], which means that the number of columns will be two times less relative to the Сont matrix of the original image. Then, using the values of the matrices C1 and C2, we calculate the coefficients of approximation (LL1) and details (HL1, LH1, HH1) for level 1 of the decomposition.

$$LL\mathbf{1}[ii,jj] = C\mathbf{1}[i,jj] + C\mathbf{1}[i+\mathbf{1},jj] \tag{3}$$

*x*0 *i* ð Þ¼ *x*, *y*

*(a) Original cover image; (b) stegoimage with embedded fractal key.*

*(a) Original watermark; (b) watermark extracted from fractal key.*

**4. Experimental results**

*Using Algebraic Fractals in Steganography DOI: http://dx.doi.org/10.5772/intechopen.92018*

obtained after extraction.

**Figure 2.**

**Figure 3.**

**Figure 4.**

**91**

*v*0 *i*

A fractal image, in which a watermark is embedded, acts as a watermark.

JPEG format. The image containing the embedded key is shown in **Figure 2b**. **Figure 3** shows the results of extracting the secret fractal key from the filled image. **Figure 3a** shows the original fractal image, in **Figure 3b** is the image

*(a) Generated fractal with watermark; (b) extracted from stegoimage fractal image with watermark.*

**Figure 2a** shows the original unfilled image with a size of 6400 � 4096 pixels in

ð Þ� *x*, *y vi*ð Þ *x*, *y α* ∗ *vi*ð Þ *x*, *y*

(9)

$$\text{HL1}[ii,jj] = \text{C1}[i,jj] - \text{C1}[i+\mathbf{1},jj] \tag{4}$$

$$LH1[ii,jj] = C2[i,jj] + C2[i+1,jj] \tag{5}$$

$$\mathbf{C}\mathbf{H}\mathbf{1}[ii,jj] = \mathbf{C}\mathbf{2}[i,jj] - \mathbf{C}\mathbf{2}[i+\mathbf{1},jj] \tag{6}$$

where *<sup>i</sup>* <sup>¼</sup> 1, … , *<sup>M</sup>*; *<sup>j</sup>* <sup>¼</sup> 1, … , *<sup>N</sup>*; *jj* <sup>¼</sup> *<sup>j</sup>*, … , *<sup>N</sup>* <sup>2</sup> ; *ii* <sup>¼</sup> *<sup>i</sup>*, … , *<sup>M</sup>* 2 .

In Eqs. (3)–(6), the following notation is used: LL1 [ii, jj]—an array of approximation coefficients; HL1 [ii, jj]—an array of horizontal detail coefficients; LH1 [ii, jj]—an array of vertical detail coefficients; and HH1 [ii, jj]—an array of diagonal detail coefficients.

The arrays of coefficients of approximation and detailing of level 1 obtained using 2D DVP have the same dimension [ii, jj], which means that each of these arrays is two times smaller than the array of the original image.

To get the arrays of coefficients for the second level of decomposition: LL2, HL2, LH2, HH2, you need to perform similar actions, while taking the array of approximation coefficients LL1 obtained at the first level of decomposition for the original image.

At each decomposition level, coefficients exceeding the threshold values are selected. The threshold Ti for the decomposition of level i depends on the maximum absolute coefficient Ci over all ranges of coefficients of level i, thus [14]:

$$T\_i = \mathbf{2}^{\lfloor \log\_2 C\_i \rfloor - 1} \tag{7}$$

The watermark is embedded in all coefficients exceeding the threshold value Ti for the corresponding decomposition level obtained from Eq. (7). Used additive algorithm for embedding watermark:

$$v\_i'(\mathbf{x}, \mathbf{y}) = v\_i(\mathbf{x}, \mathbf{y}) + a \ast v\_i(\mathbf{x}, \mathbf{y}) \ast \mathbf{x}\_i(\mathbf{x}, \mathbf{y}) \tag{8}$$

where *v*<sup>0</sup> *i* ð Þ *x*, *y* is a modified coefficient with coordinates (x, y); *vi*ð Þ *x*, *y* is a coefficient chosen for implementation with coordinates (x, y), for example, for level 1: LH1 (x, y), HH1 (x, y), HL1 (x, y)); *xi*ð Þ *x*, *y* —bit of watermark with coordinates (x, y); α—the scaling factor is adjusted for each level of decomposition. So for the range of coefficients of approximation of the third level α = 0.02, since the coefficients of this range have large values. Scaling factors of 0.1, 0.2, and 0.4 are used for the third, second, and first levels of decomposition, respectively. The fractal image is first embedded in the wavelet coefficients of the third level, then, if the coefficients of the third level were not enough to fully embed the watermark, the coefficients of the second level are used, etc. To extract the watermark, the inverse of the implementation equation (Eq. (9)) is used, but the adaptive-level scale factor α is taken into account.

*Using Algebraic Fractals in Steganography DOI: http://dx.doi.org/10.5772/intechopen.92018*

$$\varkappa\_i'(\mathbf{x}, \boldsymbol{\upchi}) = \frac{v\_i'(\mathbf{x}, \boldsymbol{\upchi}) - v\_i(\mathbf{x}, \boldsymbol{\upchi})}{a \ast v\_i(\mathbf{x}, \boldsymbol{\upchi})} \tag{9}$$

A fractal image, in which a watermark is embedded, acts as a watermark.
