**4. Experimental results**

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

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

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

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

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

ð Þ *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

*LL*1½ �¼ *ii*, *jj C*1½ �þ *i*, *jj C*1½ � *i* þ 1, *jj* (3)

*HL*1½ �¼ *ii*, *jj C*1½ �� *i*, *jj C*1½ � *i* þ 1, *jj* (4)

*LH*1½ �¼ *ii*, *jj C*2½ �þ *i*, *jj C*2½ � *i* þ 1, *jj* (5)

*HH*1½ �¼ *ii*, *jj C*2½ �� *i*, *jj C*2½ � *i* þ 1, *jj* (6)

<sup>2</sup> ; *ii* <sup>¼</sup> *<sup>i</sup>*, … , *<sup>M</sup>*

2 .

*Ti* <sup>¼</sup> <sup>2</sup> log ½ � <sup>2</sup>*Ci* �<sup>1</sup> (7)

ð Þ¼ *x*, *y vi*ð Þþ *x*, *y α* ∗ *vi*ð Þ *x*, *y* ∗ *xi*ð Þ *x*, *y* (8)

the decomposition.

*Fractal Analysis - Selected Examples*

diagonal detail coefficients.

algorithm for embedding watermark:

scale factor α is taken into account.

where *v*<sup>0</sup> *i*

**90**

*v*0 *i*

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>*

arrays is two times smaller than the array of the original image.

absolute coefficient Ci over all ranges of coefficients of level i, thus [14]:

**Figure 2a** shows the original unfilled image with a size of 6400 � 4096 pixels in 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 obtained after extraction.

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

**Figure 3.**

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

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

**Figure 4** shows the results of extracting a digital watermark from the selected fractal. **Figure 4a** contains the original watermark and **Figure 4b** shows watermark extracted from the key.

As a result of the algorithm, a watermark was extracted with high quality. Despite the fact that you can observe small pixel distortions in the extracted secret key, the received watermark as a QR code is completely identical to the original one.
