Introduction

Currently, the security of multimedia data in all forms (images, videos, and audio) plays an important role in all domains, especially for military or medical domains that require a very high level of confidentiality. To prevent illicit acts such as hacking, falsification, or unauthorized use of sensitive information, major security concerns must be addressed1.

Images, as carriers of crucial information, are increasingly widespread and stored across networks. This expansion has drawn the attention of researchers to issues relating to their transmission and preservation. The fundamental solution is to encrypt or digitally watermark these images before transferring them2,3,4. This approach aims to ensure the confidentiality and security of images, prevent unauthorized alteration, and enable authentication of their source. It thus meets the need for data protection and image integrity verification in an ever-growing digital environment5. In this context, cryptography was the first proposal to secure the transfer of digital color images. Today, modern encryption algorithms, with very sensitive and long security keys, can ensure the confidentiality and security of images. However, once the image is decrypted, it is no longer protected and can be distributed or modified in an illegal way. Information hiding, and more specifically the insertion of hidden data in the images, can be an answer to this problem6,7,8. Indeed, the insertion of a watermark in an image allows us to authenticate it and to guarantee its integrity. In recent years, significant advances have been made in the field of digital watermarking applied to color images. Table 1 provides an overview of the research and work carried out in this specific field. This work shows a growing interest in the use of digital watermarking methods, particularly for color images, to guarantee the security, confidentiality, and authenticity of visual data. This development reflects the growing importance of copyright protection and image security in various fields of application, such as medicine and military security.

Table 1 Watermark articles of color images with their objectives, approaches used, and processing domain.

We can see that copyright protection with color images has become an increasingly pressing challenge in this day and age, given that many organizations' trademarks, logos, and information to be hidden are in color. In this context, it is worth mentioning that color watermarking has two advantages over grayscale watermarking: (i) It allows a greater amount of data to be hidden. (ii) It achieves a higher level of realism since color perception depends not only on brightness but also on chrominance9,10.

After conducting an exhaustive review of the relevant literature and highlighting digital watermarking methods, we concluded that one of the most significant obstacles facing researchers in the field of digital watermarking is the development of an algorithm that manages to effectively balance the various properties, including imperceptibility, capacity, robustness, and data security. In this publication, we present a hybrid approach that combines the principles of digital watermarking and encryption. Our watermarking method is essentially based on the use of QCM, DWT, SVD, QR, and modified Henon cards. This innovative approach combines these elements to ensure the security and robustness of the watermark while preserving its invisibility in color images. We will go into more detail on the various stages of this method and provide an assessment of its performance through in-depth simulations.

To explain our new watermarking system in depth, we start by extending classical Charlier Moments (CM) to the QCM using quaternion algebra. This extension allows us to holistically represent color images without having to decompose their three components (red, green and blue) and without losing any information. Next, the resulting matrix of QCMs is subjected to decomposition in the DWT. This approach allows us to avoid decomposing the host and watermark images into three distinct RGB planes, reducing both decomposition time and computational complexity. We then decompose the DWT-generated matrix using both QR and SVD transformations. It is important to note that these QR and SVD decompositions are particularly effective in detecting important image features, thus reducing the amount of information to be analyzed in the image. To enhance the security and reliability of our system, we introduce a modified version of Henon's 2D chaotic map, which we refer to in this paper as 2D-FrMHM. This modified version offers more parameters than the classical map, thus enhancing the overall safety of the system. Finally, to guarantee a dynamic and adaptive scaling factor when inserting the watermark, we use the Arithmetic Optimization Algorithm (AOA). This final step contributes to improving the overall robustness of our watermarking system.

Essential contributions

The main contributions of this research.

  1. 1.

    Introduction of Quaternion Moments (QCM): This study introduces QCM as a novel representation for color images. QCM not only preserves image integrity but also reduces computational complexity significantly, marking a significant advancement in image representation.

  2. 2.

    Modification of Chaotic System: The research presents a novel modification to a chaotic system, enhancing the system's security and expanding its parameterization possibilities. This modification represents a noteworthy advancement in chaotic system design.

  3. 3.

    Integration of Arithmetic Optimization Algorithm (AOA): The incorporation of AOA facilitates dynamic and adaptive scaling factor selection, enhancing the flexibility and efficiency of the watermarking system.

  4. 4.

    Development of Hybrid Watermarking Method with Color Image Encryption: A key contribution is the proposal of a hybrid method that combines watermarking and color image encryption. This approach addresses the dual requirements of copyright protection and medical information confidentiality, representing a significant advancement in image security techniques.

General structure

We structured the rest of this work as follows: in “Preliminaries”, we present the theoretical background of the research. We devote “Fast computation of discrete orthogonal quaternary Charlier moments” to the presentation of quaternion orthogonal discrete Charlier moments. In “Improved reversible watermarking scheme”, we will present the proposed scheme for watermarking color images. In “Simulations and findings”, we illustrate the simulation results. The last section concludes the work.

Preliminaries

In this section, we outline the QR, SVD and a modified version of the 2D-Henon map, referred to in the remainder of this article as (2D-FrMHM), which will be implemented in the new watermarking system to improve its overall performance.

QR decomposition

QR is a matrix factorization where a real matrix is represented as the result of multiplying an orthogonal matrix Q by an upper triangular matrix R (Eq. 1)19,20.

$$ A = QR $$
(1)

Note that the R-matrix contains more significant elements that represent most of the energy of the signal (image) after the transformation. Experimentation and analysis revealed that the larger element provides numerical stability to external disturbances. In information security and data hiding technologies, A-matrix decomposition has the potential to increase anti-attack performance19,20.

Singular value decomposition

SVD is an algebraic approach in which matrices are treated based on their eigenvectors. The singular vector of the matrix can be obtained by SVD, keeping the correlation of the rows or columns of the original matrix21. The SVD decomposition of a matrix A of size \(N \times N\) is given by Eq. (2) with U and V, two orthogonal matrices, and S a diagonal matrix.

$$ USV^{T} = SVD(A) $$
(2)
$$ S = diag(\sigma_{1} ,\sigma_{2} ,\sigma_{3} ,...,\sigma_{r} ,\sigma_{r + 1} ,...,\sigma_{n} ) $$
(3)

The diagonal elements of S = \(\left\{ {\sigma_{1} ,\sigma_{2} ,\sigma_{3} ,...,\sigma_{r} ,\sigma_{r + 1} ,...,\sigma_{n} } \right\}\) are singular values of matrix A.

Modified chaotic system

Chaotic systems22 are one of the most common methods used to contribute to the field of information security23,24,25. Mathematically, the 2D fractional Henon map is defined by Eq. (4), with \((x,y) \in {\text{R}}^{{2}} ,\,\,(\alpha ,\gamma ) \in {\text{R}}^{2}\) and the fractional order \(\upsilon \in \left[ {0,1} \right]\)26.

$$ \left\{ {\begin{array}{*{20}c} {x(n) = x(0) + \frac{1}{\Gamma (\upsilon )}\sum\limits_{i = 1}^{n} {\frac{\Gamma (n - i + \upsilon )}{{\Gamma (n - i + 1)}}\left( {y(i - 1) + 1 - \alpha x^{2} (i - 1) - x(i - 1)} \right)} } \\ {y(n) = y(0) + \frac{1}{\Gamma (\upsilon )}\sum\limits_{i = 1}^{n} {\frac{\Gamma (n - i + \upsilon )}{{\Gamma (n - i + 1)}}\left( {\beta x(i - 1) - y(i - 1)} \right)} } \\ \end{array} } \right. $$
(4)

The chaotic characteristic of the map represented in Eq. (4) undergoes a modification due to the amplification of numerical errors when calculating output values for high orders. This amplification arises from the presence of the non-elementary analytical function gamma, as shown in Table 2. This modification is highlighted using the following parameters \(\left[ {\alpha ,\beta ,x(0),y(0),\upsilon } \right] = \left[ {1.95,\,\,0.001,\,0.009,\,\,0,\,\,0.98} \right]\).

Table 2 Values of the 2D-FrMHM calculated for n = 0 : 2000.

Next, we introduce a 2D-FrMHM that addresses instability issues during computation by substituting \(\frac{\Gamma (n - i + \upsilon )}{{\Gamma (n - i + 1)}}\) with \(e^{\ln (x)}\). Moreover, to improve the security level, we will increase the complexity of the map by adding two additional parameters \(\varphi_{1} ,\varphi_{2}\) that will extend the space of the security keys. Indeed, the 2D-FrMHM is defined by Eq. (5)27.

where \((x,y) \in {\text{R}}^{{2}} ,\,\,(\alpha ,\gamma ) \in {\text{R}}^{2}\) and \(\upsilon \in \left[ {0,1} \right]\) are the fractional orders, and \(\left| {\cos (i)} \right|\) is the absolute value of \(\cos (i)\).

$$ \left\{ {\begin{array}{*{20}c} {x(n) = x(0) + \frac{1}{\Gamma (\upsilon )}\sum\limits_{i = 1}^{n} {{\text{A}}_{1} \times (1 - \varphi_{1} \times \left| {\cos (i)} \right|) \times \exp \left( {\ln (\Gamma (n - i + \upsilon )) - \ln (\Gamma (n - i + 1))} \right)} } \\ {y(n) = y(0) + \frac{1}{\Gamma (\upsilon )}\sum\limits_{i = 1}^{n} {{\text{A}}_{2} \times (1 - \varphi_{2} \times \left| {\cos (i)} \right|) \times \exp \ln (\Gamma (n - i + \upsilon )) - \ln (\Gamma (n - i + 1))} } \\ \end{array} } \right. $$
(5)
$$ \left\{ {\begin{array}{*{20}c} {A_{1} = y(i - 1) + 1 - \alpha x^{2} (i - 1) - x(i - 1)} \\ {A_{2} = \alpha x(i - 1) - y(i - 1)} \\ \end{array} } \right. $$
(6)

To assess and visually represent the performance and effectiveness of the modified Henon map, we generate plots of the \(x(n)\,{\text{and}}\,y(n)\) coordinates of the map and the corresponding phase space as functions of the iteration number "n", using the same parameter values employed in the traditional 2D Henon map \(\left( {\left[ {\alpha ,\beta ,x(0),y(0),\varphi_{1} ,\varphi_{2} ,\upsilon } \right] = \left[ {1.95,\,\,0.001,\,0.009,\,\,0,\,\,0.98} \right]} \right)\).

Figure 1c illustrates the 2D-FrMHM by individual points in space, creating a shape closely resembling a half-oval, while Fig. 1a,b plot the two \(x(n)\,{\text{and}}\,y(n)\) coordinates as a function of the number of iterations "n," showing that they remain stable whatever "n." While Fig. 1d–f represent the classic Henon instability for large sizes. These observations reinforce the idea that the modified system exhibits both chaotic behavior and remarkable stability, particularly for high values of "n". This suggests that our stabilization approach is effective in resolving the numerical instability problems typically encountered in calculations involving high values of "n". Importantly, this stability is crucial to ensure the reliability of our method for digitally watermarking color images, particularly when applied to large images or applications requiring high accuracy. As a result, our approach offers a robust solution for inserting digital watermarks into color images while maintaining a chaotic behavior desirable for system safety and robustness28,29.

Figure 1
figure 1

(a,d) First coordinate x(n). (b,e) Second coordinate y(n). (c,f) The phase space (x, y).

Fast computation of Charlier polynomial (CP)

The CP is defined by Eq. (7), where "x" and "n" represent the variable and the CP order, while "a" is the control parameter.

$$ CP_{n}^{a} (x) = {}_{2}F_{0} \left( { - n, - x; - \frac{1}{a}} \right);\,\,\,x,n \in \left[ {0.\infty } \right] $$
(7)

Iterative computation of CP30, whether with respect to order n or the variable x, generates the numerical instability of these polynomials, as highlighted in Figs. 2 and 3. This instability results from the propagation of numerical errors and can present challenges when applying these methods to large images in the security domain. To overcome this limitation, researchers have adopted the Gram‒Schmidt Ortho-normalization Process (GSOP)31,32,33. However, this method is still limited by the computational time, which is characterized by exponential behavior with an increment of n. As an example, the elapsed time in seconds (s) using GSOP for the case where N = 100 is 0.2546 s and for N = 1000 is 4.7835e + 02 s. Using the recursive method or the GSOP method to figure out CP causes problems with stability and the time to figure out CP.

Figure 2
figure 2

For the case a = 40, 3D traces of CP versus n with different orders.

Figure 3
figure 3

For the case a = 40, 3D traces of CP versus x with different orders.

The fundamental idea for solving the problems of numerical instability associated with CP calculation lies in the adoption of an innovative and efficient algorithm34. This algorithm is designed to guarantee the stable calculation of CP values, which is essential for our method of digitally watermarking color images. Its efficiency is based on two key principles: the notion of symmetry and the simultaneous use of standard recurrence relations associated with n and x. By adopting this method, our digital watermarking system for color images can effectively exploit the advantages of CP while avoiding the problems of numerical instability. This enhances the reliability and robustness of our approach, making it suitable for a wide range of applications, including the digital watermarking of large color images in fields requiring high precision and enhanced security35,36. It is important to note that this approach has already been successfully employed to stabilize other polynomials in previous works in the literature35.

Practically, after specifying the surface of CP calculations by determining the exact value of n, the plane of CP is divided into two parts having the shape of a triangle bounded by the diagonal n = x, as shown in Fig. 4. Thus, the calculation of the values of CP is performed in five steps, as shown in the pseudocode below (Algorithm 1), where \(\omega_{CP} \left( x \right)\) and \(\rho_{CP} \left( n \right)\) are the weight function and the quadratic norm respectively:

$$ \omega_{CP} \left( x \right) = \frac{{e^{ - a} a^{x} }}{{\Gamma \left( {x + 1} \right)}} $$
(8)
$$ \rho_{CP} \left( n \right) = \frac{{\Gamma \left( {n + 1} \right)}}{{a^{n} }} $$
(9)
Figure 4
figure 4

Regions of symmetry regarding to the diagonal n = x.

figure a

Algorithm 1: Fast computation of CP values34.

Step 1: The values of \(\tilde{C}P_{0}^{a} \left( 0 \right)\) are computed using the following equation:

$$ \tilde{C}P_{0}^{a} \left( 0 \right) = e^{{{\raise0.7ex\hbox{${ - a}$} \!\mathord{\left/ {\vphantom {{ - a} 2}}\right.\kern-0pt} \!\lower0.7ex\hbox{$2$}}}} $$
(10)

Step 2: The values of \(\tilde{C}P_{0}^{a} \left( x \right)\) within the range \(x = 1,2,3,4,5 \ldots ,N - 1\) are computed using the following equation:

$$ \tilde{C}P_{0}^{a} \left( x \right) = \sqrt {\frac{{\omega_{CP} \left( x \right)}}{{\rho_{CP} \left( 0 \right)}}} $$
(11)

Step 3: The values of \(\tilde{C}P_{1}^{a} \left( x \right)\) within the range \(x = 1,2,3,4,5, \ldots ,N - 1\) are computed using the following equation:

$$ \tilde{C}P_{1}^{a} \left( x \right) = \frac{a - x}{a}\sqrt {\frac{{\omega_{CP} \left( x \right)}}{{\rho_{CP} \left( 1 \right)}}} $$
(12)

Step 4: The values of \(\tilde{C}P_{n}^{a} \left( n \right)\) within the range \(n = 2,3,4,5, \ldots ,N_{\max }\) and \(x = n, \ldots ,N - 1\) are computed using the following equation:

$$ \tilde{C}P_{n}^{a} \left( x \right) = \frac{a - x + n - 1}{a}\sqrt{\frac{a}{n}} \tilde{C}P_{n - 1}^{a} \left( x \right) - \sqrt {\frac{n - 1}{n}} \tilde{C}P_{n - 2}^{a\,} \left( x \right) $$
(13)

Step 5: The values of \(\tilde{C}P_{n}^{a} \left( n \right)\) within the range \(n = 0,1,2, \ldots ,N_{\max }\) and \(x = n, \ldots ,N_{\max }\) are computed using the following equation:

$$ \tilde{C}P_{n}^{a} \left( x \right) = \tilde{C}P_{x}^{a} \left( n \right) $$
(14)

Fast computation of discrete orthogonal quaternary Charlier moments

The quaternion model is an example of a mathematical approach that could be used effectively for digital color image processing37, as it generalizes grayscale modelling (on \(R\) or \(C\)) and treats color images holistically as an individual quaternion without decomposition into three RGB planes38,39. The quaternion representation of a digital color image \(f(x\,,y)\) is defined as follows:

$$ f(x,y) = f_{RED} (x,y)i + f_{GREEN} (x,y)j + f_{BLUE} (x,y)k $$
(15)

The QCM are calculated from Eq. (15), knowing that the CP are calculated by algorithm 1.

$$ QCM_{nm} (f) = \sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {f_{{{\text{Re}} d}} (x,y)i + f_{Green} (x,y)j + f_{Blue} (x,y)k} \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right) \times \mu $$
(16)

with \(\mu = \frac{ - (i + j + k)}{{\sqrt 3 }}\). Taking into consideration the definition of \(\mu\), Eq. (16) is simplified as follows:

$$ \begin{aligned} QCM_{nm} (f) & = \,\,\,\,\frac{1}{\sqrt 3 }\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {f_{{{\text{Re}} d}} (x,y) + f_{Green} (x,y) + f_{Blue} (x,y)} \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \\ & \quad - \,\frac{1}{\sqrt 3 }i\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {f_{Green} (x,y) - f_{Blue} (x,y)} \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \\ & \quad - \frac{1}{\sqrt 3 }j\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {f_{Blue} (x,y) - f_{{{\text{Re}} d}} (x,y)} \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \\ & \quad - \frac{1}{\sqrt 3 }k\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {f_{{{\text{Re}} d}} (x,y) - f_{Green} (x,y)} \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \\ \end{aligned} $$
(17)

The 2D moments (\({\rm M}_{nm}\)) of \(f(x,y)\) of size \(N \times N\) using CP are obtained by the following equation35,40,41:

$$ {\rm M}_{nm} = \sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{N - 1} {\tilde{C}P_{n}^{a1} (x) \times \tilde{C}P_{m}^{a2} (y) \times f(x,y)} } $$
(18)

Using Eq. (18) to calculate moments generates a considerable computational load, making the process intensive in terms of computing resources. Therefore, to overcome this computational complexity, we opted for an alternative matrix approach.

$$ {\rm M} = \,\,CP_{n}^{{a1}{^{T} }} \times F\, \times CP_{m}^{a2} $$
(19)

where \({\rm M},CP_{n}^{a1} ,CP_{m}^{a2} \,{\text{and}}\,F\) is the matrix form of \({\rm M}_{nm} ,\tilde{C}P_{n}^{a1} (x),\tilde{C}P_{m}^{a2} (y),{\text{and}}\,f(x,y)\).

Using Eq. (19), we obtain the simplified matrix version of QCM:

$$ QCM_{nm} (f) = \,\frac{1}{\sqrt 3 }\left[ {{\rm M}_{R} + {\rm M}_{R} + {\rm M}_{R} } \right] - \,\frac{1}{\sqrt 3 }i\left[ {{\rm M}_{G} + {\rm M}_{B} } \right] - \,\frac{1}{\sqrt 3 }j\left[ {{\rm M}_{B} + {\rm M}_{R} } \right] - \,\frac{1}{\sqrt 3 }k\left[ {{\rm M}_{R} + {\rm M}_{G} } \right] $$
(20)

In this equation, \({\rm M}_{R}\), \({\rm M}_{G}\) and \({\rm M}_{B}\) represent Charlier's conventional discrete orthogonal moments for the red, green and blue channels, respectively. Equation (20) can be reformulated as the following formula:

$$ QCM_{nm} (f) = \,D_{0} + iD_{1} + jD_{2} + kD_{3} $$
(21)
$$ \left\{ \begin{gathered} D_{0} = \frac{1}{\sqrt 3 }\left[ {{\rm M}_{R} + {\rm M}_{R} + {\rm M}_{R} } \right];\,\,D_{1} = - \,\frac{1}{\sqrt 3 }\left[ {{\rm M}_{G} + {\rm M}_{B} } \right] \hfill \\ D_{2} = - \,\frac{1}{\sqrt 3 }j\left[ {{\rm M}_{B} + {\rm M}_{R} } \right];\,\,\,\,\,D_{3} = - \,\frac{1}{\sqrt 3 }k\left[ {{\rm M}_{R} + {\rm M}_{G} } \right] \hfill \\ \end{gathered} \right. $$
(22)

After the calculation of the \(QCM_{nm} (f)\) moments, we present the inverse form of \(IQCM_{nm} (f)\) (reconstruction of the 2D signal).

$$ \overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{F} = \,\,CP_{n}^{a1} \times {\rm M} \times CP_{m}^{{a2}{^{T} }} $$
(23)

Utilizing Eqs. (17) and (23), we can now demonstrate the reverse computation of \(QCM_{nm} (f)\).

$$ \begin{gathered} IQCM_{nm} (f) = \,\,\,\,\frac{1}{\sqrt 3 }\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {D_{1} + D_{2} + D_{3} } \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, - \,\frac{1}{\sqrt 3 }i\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {D_{0} + D_{2} - D_{3} } \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, - \frac{1}{\sqrt 3 }j\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {D_{0} - D_{1} + D_{3} } \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, - \frac{1}{\sqrt 3 }k\left[ {\sum\limits_{x = 0}^{N - 1} {\sum\limits_{y = 0}^{M - 1} {\left( {D_{0} + D_{1} - D_{2} } \right)} } \times \left( {\tilde{C}P^{a} (x)\tilde{C}P^{a} (y)} \right)} \right] \hfill \\ \end{gathered} $$
(24)
$$ \begin{gathered} IQCM_{nm} (f) = \,\,\,\,\frac{1}{\sqrt 3 }\left[ {\hat{D}_{1} + \hat{D}_{2} + \hat{D}_{3} } \right]\,\, - \,\,\frac{1}{\sqrt 3 }i\left[ {\hat{D}_{1} + \hat{D}_{2} + \hat{D}_{3} } \right]\, - \frac{1}{\sqrt 3 }j\left[ {\hat{D}_{0} - \hat{D}_{1} + \hat{D}_{3} } \right] \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, - \frac{1}{\sqrt 3 }k\left[ {\hat{D}_{0} + \hat{D}_{1} - \hat{D}_{2} } \right] \hfill \\ \end{gathered} $$
(25)

To illustrate the benefits and interest of extending classical Charlier moments to QCM moments, we conducted a visual evaluation using an arbitrary method of color image reconstruction from an MRI image of size 1024 (this image is selected from the database42). Figure 5 shows the reconstruction of the MRI image using a Charlier control parameter a = 512 for various orders ranging from n = 80 to n = 1024. The results of this evaluation demonstrate that QCMs outperform classical Charlier moments. Furthermore, these results indicate that the QCMs do not exhibit any loss of information.

Figure 5
figure 5

Comparative evaluation of medical image reconstruction using classic Charlier moments and QCM.

Having outlined the theoretical part of the paper, we will now present the digital watermarking scheme we have developed.

Improved reversible watermarking scheme

In this section, the QCM, DWT, QR, SVD and 2D-FrMHM are used to present a new improved reversible watermarking scheme. Figure 6 provides an overview of the proposed system (the images used in this figure are selected from database Ref.42).

Figure 6
figure 6

General overview of improved reversible watermarking scheme.

Proposed watermark scheme for color images

This phase consists of several successive steps, which generate watermarked color images from the original images and watermarks. A detailed description is presented in Fig. 7 (the images used in this figure are selected from database Ref.42 and website Ref.43).

Figure 7
figure 7

Watermark incorporation procedure.

Watermark insertion process

Step 1: Calculate the moments of the input images using Eq. (24). This step eliminates the need to decompose the input images before applying DWT. This approach significantly reduces the computation time. In addition, the CP parameters a1 and a2 are used to increase the extent of the available security key space (KEY1).

Step 2: Decompose the image \(I_{H} (x,y)\) into \(LL_{Hk} ,\,\,LH_{Hk} ,\,\, \, HL_{Hk} {\text{ and }}HH_{Hk}\) by K-DWT, where \(k = \log_{2} \frac{M}{N}\).

Step 3: Decompose the resulting image \(LL_{HK}\) into two matrices \(Q_{H}\) and \(\,R_{H}\), as shown in Eq. (29), while considering the size of \(LL_{HK}\); \(\left( {\frac{M}{{2^{k + 1} }}\,,\,\frac{M}{{2^{k + 1} }}} \right)\).

$$ Q_{H} \, \times \,\,R_{H} = QR(LL_{HK} ). $$
(26)

Step 4: Decompose the matrix \(\,R_{H}\) into three matrices \(U_{H}\) , \(S_{H}\) and \(V_{H}\) based on SVD decomposition as shown in Eq. (30), while considering the size of \(S_{H}\)\(\left( {\frac{M}{{2^{k + 1} }}\,,\,\frac{M}{{2^{k + 1} }}} \right)\).

$$ U_{H} \, \times S_{H} \times V_{H}^{T} = SVD\left( {R_{H} } \right) $$
(27)

Step 5: Encrypt the \(S_{H}\) matrix using 2D-FrMHM. To enhance the security of the proposed digital watermarking system, we implemented two crucial steps:

  1. (a)

    Confusion process: In this step, we interchange the positions of the values within \(S_{H}\) to generate matrix \(S_{{H_{2} }}^{{}}\), which serves as the representation of the permuted \(S_{H1}\). To accomplish this, we use two chaotic sequences X(i) and Y(j) defined in Eq. (5) to generate the following two vectors.

    $$ \left\{ {\begin{array}{*{20}c} {X(i) = \left[ {x(1);x(2);x(3);......;x(M \times M)} \right]} \\ {Y(j) = \left[ {y(1);y(2);y(3);......;y(M \times M)} \right]} \\ \end{array} } \right. $$
    (28)

The two resulting vectors are arranged in ascending order and saved in variables denoted as \(X*(i){\text{ and }}Y*(j)\):

$$ \left\{ {\begin{array}{*{20}c} {X^{ * } (i) = \left[ {x^{ * } (1);x^{ * } (2);x^{ * } (3);......;x^{ * } (M \times M)} \right]} \\ {Y^{ * } (j) = \left[ {y^{ * } (1);y^{ * } (2);y^{ * } (3);......;y^{ * } (M \times M)} \right]} \\ \end{array} } \right. $$
(29)

It is important to note that to guarantee the reversibility of the process, \(L_{x} \left( i \right){\text{ and }}L_{y} \left( j \right)\) must receive the index from which \(X*(i){\text{ and }}Y*(j)\) originated, for the change to be reversible. After completing the preparation of the chaotic sequences. We convert the matrix \(S_{H}\) into a 1D vector, then rearrange the elements of this vector according to \(L_{x} \left( i \right)\) to obtain the \(S_{{H_{1} }} = \left\{ {S_{{H_{1} }} (1)\,,\,S_{{H_{1} }} (2)\,,\,S_{{H_{1} }} (3)\,,....;\,S_{,} \left( {\frac{M}{{2^{k + 1} }}\, \times \frac{M}{{2^{k + 1} }}} \right)} \right\}\) sequence. This sequence is transformed into a 2D matrix \(S_{{H_{1} }} = \left\{ {S_{{H_{1} }} (x,y)} \right\}_{x,y = 1}^{{x,y = \frac{M}{{2^{k + 1} }},\frac{M}{{2^{k + 1} }}}}\). This step is performed for the \(S_{{H_{1} }}\) matrix, using \(L_{y} \left( j \right)\) to make \(S_{{H_{2} }} = \left\{ {S_{{H_{2} }} (x,y)} \right\}_{x,y = 1}^{{x,y = \frac{M}{{2^{k + 1} }},\frac{M}{{2^{k + 1} }}}}\) (\(S_{{H_{1} }}\) scrambled).

  1. (b)

    Diffusion process: During this crucial stage of the process, the values of the \(S_{{H_{2} }}\) matrix undergo modifications to give rise to the encrypted matrix \(ES_{H}\). This process is orchestrated by the use of two chaotic sequences presented in Eq. (5)\(\left( {X(i){\text{ and }}Y(j)} \right)\), where they are rounded off to the nearest integer \(\left( {X_{1} (i) = floorX(i){\text{ and }}Y_{1} (j) = floorY(j)} \right)\).

The XOR function \(\left( \oplus \right)\) is used to combine the two sequences \(X_{1} (i) = \left[ {x_{1} (1),x_{1} (2),x_{1} (3),....,x_{1} \left( {\frac{M}{{2^{k + 1} }} \times \frac{M}{{2^{k + 1} }}} \right)} \right]\) and \(Y_{1} (i) = \left[ {Y_{1} (1),Y_{1} (2),Y_{1} (3),....,Y_{1} \left( {\frac{M}{{2^{k + 1} }} \times \frac{M}{{2^{k + 1} }}} \right)} \right]\), and the result is then resized to form a 2D matrix \(T = \left\{ {T(x,y)} \right\}_{x,y = 1}^{{x,y = \frac{M}{{2^{k + 1} }},\frac{M}{{2^{k + 1} }}}}\).

$$ ES_{H} = \left\{ {S_{{H_{2} }} (x,y)} \right\}_{x,y = 1}^{{x,y = \frac{M}{{2^{k + 1} }},\frac{M}{{2^{k + 1} }}}} \,\, \oplus \,\,\left\{ {T(x,y)} \right\}_{x,y = 1}^{{x,y = \frac{M}{{2^{k + 1} }},\frac{M}{{2^{k + 1} }}}} $$
(30)

Before proceeding to the step of inserting \(I_{W} (x,y)\) into \(I_{W} (x,y)\), it should be noted that the image \(I_{W} (x,y)\) of size \(N \times N\) goes through the same steps as the image \(I_{H} (x,y)\) cited before to obtain the matrix \(ES_{W}\). With the exception of step 1, we compute the QCMs of image \(I_{W} (x,y)\) using Eq. (24) up to order N, and in step 2, the image \(I_{W} (x,y)\) is subjected to a single decomposition \(1 - DWT\).

Step 6: Calculate the integrated singular value \(ES_{{_{HW} }}^{{}}\) by using a scaling factor \(\theta\).

$$ ES_{{_{HW} }}^{{}} = ES_{H} + \theta .ES_{W} $$
(31)

The final stage of the watermarking process involves the reconstruction of the watermarked image. This is a critical step to ensure that the watermark is correctly embedded in the image and can be reliably extracted later. The reconstruction process follows a series of carefully designed steps, as depicted in Fig. 6.

Watermark extraction process

The phase of watermark extraction uses the watermarked host image \(I_{{_{HW} }}^{{}} (x,y)\) of size \(M \times M\) as input as long as the extracted watermark \(I_{{_{W} }}^{ * } (x,y)\) of size \(N \times N\) is the output of this phase. This process is illustrated in Fig. 8. We describe the extraction process in the following sequence of steps (the images used in this Fig. 8 are selected from database Ref.42 and website Ref.43).

Figure 8
figure 8

Watermark extraction procedure.

Step 1: Compute the MCQs of the input image using Eq. (13) up to order M for image \(I_{{_{HW} }}^{{}} (x,y)\)

Step 2: Use the \(k - DWT\) transformation to decompose the \(I_{{_{HW} }}^{{}} (x,y)\) image into four equals \(LL_{{_{HWk} }}^{{}} ,\,LH_{{_{HWk} }}^{{}} ,\, \, HL_{{_{HWk} }}^{{}} {\text{ and }}HH_{{_{HWk} }}^{{}}\) subbands.

Step 3: Use QR to decompose \(LL_{{_{HWk} }}^{{}}\) into \(Q_{{_{HW} }}^{{}}\) and \(\,R_{{_{HW} }}^{{}}\).

Step 4: Use SVD decomposition, to decompose \(\,R_{{_{HW} }}^{{}}\) into three matrices \(U_{{_{HW} }}^{{}}\), \(S_{{_{HW} }}^{{}}\) and \(V_{{_{HW} }}^{{}}\).

Step 5: Encrypt \(S_{{_{HW} }}^{{}}\) using 2D-FrMHM to acquire the \(E\hat{S}_{{_{HW} }}^{{}}\) matrix.

Step 6: Utilize the scaling factor \(\theta\) to compute the singular value \(E\hat{S}_{{_{HW} }}^{{}}\).

$$ E\hat{S}_{{_{W} }}^{{}} = \frac{{E\hat{S}_{{_{HW} }}^{{}} - ES_{HW}^{{}} }}{\theta } $$
(32)

Step 7: Decrypt the \(E\hat{S}_{{_{W} }}^{{}}\) using 2D-FrMHM to obtain the \(\hat{S}_{{_{W} }}^{{}}\) matrix.

Step 8: Apply the inverse of the SVD transformation to obtain the matrix \(\,\hat{R}_{{_{w} }}^{{}}\).

Step 9: Apply inverse QR decomposition to recover the \(L\hat{L}_{{_{W1} }}^{{}}\) matrix, followed by the inverse operation of the DWT transformation.

Step 10: Apply the inverse operation of the QCM to reconstruct watermark \(I_{{_{W} }}^{ * } (x,y)\) with size \(N \times N\).

After presenting in detail the operation of the watermarking system, which generates color images incorporating watermarks from the original images and watermarks, the next section looks at the use of AOA optimization to discover the optimum scaling factor.

Scale factor optimization via AOA

Preliminaries of the AOA algorithm

The AOA algorithm is based on the four fundamental arithmetic operators (+ , –, x, and /). The optimization process of this algorithm has two key steps: an inspection phase and a manipulation phase. Figure 9 presents an overview of the two phases and their roles44,45.

Figure 9
figure 9

Two phases of inspection and manipulation of the AOA algorithm.

In the following, we will give a more detailed overview of the AOA. First, we start with the initialization step, in which a set of candidate solutions is randomly created \(X = \left[ {x_{1,1} \,;\,\,x_{2,1} \,;....;\,\,x_{N,n} \,} \right]\). In addition, Eq. (34) is chosen to play the accelerating function.

Before starting the work process, the AOA must determine the search phase, either inspection or manipulation. The Math Optimizer Accelerated (MOA) function represents a coefficient calculated according to Eq. (33), which is then used in the search stages. Where \(C_{iter}\) and \(M_{iter}\) denote the current iteration and the maximum number of iterations.

$$ MOA(C_{iter} ) = MOA_{\min } + C_{iter} \times \left( {\frac{{MOA_{\max } - MOA_{\min } }}{{M_{iter} }}} \right);C_{iter} \in \left[ {1,M_{iter} } \right] $$
(33)

The inspection phase within AOA involves multiple convergent iterations aimed at thoroughly exploring the entire search space to ensure broad coverage. To prevent convergence into local solutions, AOA leverages arithmetic operators (refer to Eq. 37) in conjunction with the optimization probability function (MOP) (see Eq. 35)45.

$$ x_{i,j} (C_{iter} + 1) = \left\{ {\begin{array}{*{20}c} {best(x_{j} )/(MOP + \varepsilon ) \times ((UB_{j} - LB_{j} ) \times \mu + LB_{j} ),\,\,r_{2} < 0.5} \\ {best(x_{j} ) \times MOP \times ((UB_{j} - LB_{j} ) \times \mu + LB_{j} )\,\,,\,\,{\text{otherwise}}} \\ \end{array} } \right. $$
(34)

where \(\varepsilon\), \(\mu\) and MOP denote an integer, the control parameter for adjusting the search process and the function of the optimization probability, respectively.

$$ MOP(C_{iter} ) = 1 - \frac{{C_{iter}^{1/\alpha } }}{{M_{iter}^{1/\alpha } }};\,\,\,\,\,\,\,\,\,\,C_{iter} \in \left[ {1,M_{iter} } \right] $$
(35)

During the manipulation phase, AOA enables precise convergence to attain an enhanced solution following the inspection phase. This phase primarily relies on arithmetic operators, specifically subtraction (-) and addition ( +), as defined in Eq. (36), in combination with the MOP as described in Eq. (35)45.

$$ x_{i,j} (C_{iter} + 1) = \left\{ {\begin{array}{*{20}c} {best(x_{j} ) - (MOP + \varepsilon ) \times ((UB_{j} - LB_{j} ) \times \mu + LB_{j} ),\,\,r_{3} < 0.5} \\ {best(x_{j} ) + MOP \times ((UB_{j} - LB_{j} ) \times \mu + LB_{j} )\,\,,\,\,{\text{otherwise}}} \\ \end{array} } \right. $$
(36)

Scale factor optimization

The watermark insertion and extraction process consists of several successive steps: calculation of the QCMs of the input color image, application of the discrete wavelet transform, QR decomposition, SVD decomposition and encryption via 2D-FrMHM. These steps are used to generate watermarked color images, as illustrated in Figs. 7 and 8. This process is highly dependent on a scaling factor. To find a suitable factor, we propose to use an efficient optimization algorithm. This optimization algorithm is inserted after step 6, which involves calculating the integrated singular value, as described in “Proposed watermark scheme for color images” of the proposed watermarking scheme for color images (Fig. 10).

Figure 10
figure 10

Integrating the AOA into the watermark insertion process.

It should be noted that the scaling factor \(\theta\) presented in “Improved reversible watermarking scheme”, more precisely Eq. (31), varies according to the host image \(I_{H} (x,y)\) and watermark \(I_{W} (x,y)\), meaning that different watermarks require different scaling factors, even if they are all embedded in the same host image. This paper opts for the use of AOA to improve the reliability and robustness of our new system. The proposed process for selecting optimal values of the scaling factor using AOA aims to solve the challenge of the trade-off between invisibility and robustness. This algorithm is summarized in Algorithm 2. In addition, standard performance metrics such as PSNR, NC, and SSIM are also employed to assess the visibility and reliability of the proposed system.

We apply these steps to develop an objective function, which we will henceforth refer to as \(FO_{\theta }^{opt}\). This function will serve as the basis for our subsequent work.

$$ MSE(I_{H} ,I_{H}^{ * } ) = \frac{1}{{M^{2} }}\sum\limits_{i = 1}^{M} {\sum\limits_{j = 1}^{M} {\left( {I_{{H_{i,j} }} - I_{{H_{i,j} }}^{ * } } \right)} }^{2} $$
(37)
$$ PSNR(I_{H} ,I_{H}^{ * } ) = 10\lg \frac{{I_{MAX}^{2} }}{MSE} $$
(38)
$$ NC\left( {I_{W}^{{}} ,I_{W}^{ * } } \right) = \frac{{\sum\nolimits_{{i = 1}}^{N} {\sum\nolimits_{{j = 1}}^{N} {I_{{W_{{i,j}} }}^{{}} I_{{W_{{i,j}} }}^{ * } } } }}{{\sqrt {\sum\nolimits_{{i = 1}}^{N} {\sum\nolimits_{{j = 1}}^{N} {I_{{w_{{i,j}} }}^{2} } } } \sqrt {\sum\nolimits_{{i = 1}}^{N} {\sum\nolimits_{{j = 1}}^{N} {I_{{w_{{i,j}} }}^{{2 * }} } } } }} $$
(39)
$$ SSIM(I_{H} ,I_{H}^{ * } ) = \frac{{\mu _{{I_{H} }} \mu _{{I_{H}^{ * } }} + d_{1} }}{{\mu _{{I_{H} }} ^{2} + \mu _{{I_{H}^{ * } }} ^{2} + d_{1} }}.\frac{{\sigma _{{I_{H} I_{H}^{ * } }} + d_{2} }}{{\sigma _{{I_{H} }} ^{2} + \sigma _{{I_{H}^{ * } }} ^{2} + d_{2} }} $$
(40)

where \(\sigma_{{I_{H} }}^{2} \,{\text{and}}\,\sigma_{{I_{H}^{ * } }}^{2}\) are the variances of \(I_{H}\) and \(I_{H}^{ * }\). \( \sigma _{{I_{{H_{{I_{H}^{*} }} }} }} \) is the covariance of \(I_{H}\) and \(I_{H}^{ * }\). \(d_{1}\) and \(d_{2}\) are two variables that are used to stabilize the division with a low denominator, and \(FO_{\theta }^{opt}\) is defined to optimize the scaling factor, which is given by the following equation.

$$ FO_{\theta }^{opti} = \frac{{PSNR(I_{H} ,I_{H}^{ * } )}}{\lambda } + SSIM(I_{H} ,I_{H}^{ * } ) + NC\left( {I_{{_{W} }}^{{}} ,I_{{_{W} }}^{ * } } \right) $$
(41)

By applying the formula (PSNR/λ), the PSNR undergoes a normalization that takes into account the weighting factor λ. Typical PSNR values are in the range of 1 to 70 dB. Therefore, if the PSNR/λ ratio is equal to or greater than 1, this indicates that the watermark is sufficiently discrete to be deemed acceptable. On the other hand, if this ratio is less than 1, the watermark is detectable and therefore considered unacceptable.

Algorithm 2 summarizes the idea of optimizing the scaling factor \(\theta\) by seeking to maximize the objective function \(FO_{\theta }^{opti}\). This step is based on the AOA algorithm: First, we select the host \(I_{H} (x,y)\) image and watermark \(I_{W} (x,y)\), taking into account the initial parameters of the AOA algorithm and the \(FO_{\theta }^{opti}\). Next, the algorithm randomly generates a set of initial solutions. These solutions are evaluated using the \(FO_{\theta }^{opti}\). Next, the algorithm updates the scaling factor \(\theta\) using the exploration and exploitation phases of the AOA algorithm, and we evaluate the value of the \(FO_{\theta }^{opti}\). This step is repeated iteratively until the maximum number of iterations is reached (\(M_{iter}\)). Finally, the output of this optimization generates the optimal values of the scaling factor \(\theta_{opt}\) and the watermarked image \(I_{H}^{ * }\).

figure b

Algorithm 2: Scale factor optimization steps.

Simulations and findings

In this section, we evaluated the efficiency of the proposed watermarking method, which is based on quaternion moments, wavelet transforms, algebraic decompositions, and the modified Henon map. To enhance clarity, this section is divided into three subsections.

  • The first subsection focuses on evaluating the robustness of the encryption with the modified Henon map. It includes an in-depth security analysis, a detailed histogram study, a correlation investigation as well as an entropy analysis.

  • The second subsection examines the performance of the proposed digital watermarking system. This part of the analysis covers the impact of the choice of scale factor and carries out a careful analysis of the invisibility and robustness of digital watermarking.

  • The third subsection provides a detailed comparison with similar works. This comparison highlights key differences between our approach and existing approaches, as well as the specific advantages of our method.

Additionally, we consider NC along with SSIM and PSNR to evaluate the robustness aspect of this innovative watermarking scheme. A summary of these and other metrics can be found in Fig. 11 for reference1,2,46,47,48,49.

Figure 11
figure 11

Digital watermarking metrics.

Encryption process using 2D-FrMHM

Security analysis

The security key (KEY) produced by 2D-FrMHM is formed by the concatenation of the keys generated in step 5 of the watermark insertion process \(KEY = \left\{ {\alpha ,\beta ,x(0),y(0),x^{ * } (0),y^{ * } (0),\varphi_{1} ,\varphi_{2} ,\varphi_{3} ,\varphi_{4} ,\upsilon } \right\}\).

The following scenario aims to evaluate key sensitivity in the following steps: Firstly, the original image shown in Fig. 12a undergoes an encryption process using the "KEY" security key, thereby generating the encrypted RGB image42 shown in Fig. 12b. Figure 12c depicts the image decrypted by the correct key. Next, the "KEY" security key undergoes a minor modification, equivalent to a change in order by \(10^{ - 15}\), thus becoming "KEY*." The original encrypted image is then decrypted using the modified "KEY*" key. The conclusions of this evaluation reveal that the proposed system is highly sensitive to variations in the security key, particularly evident in PSNR values that do not exceed 10 dB, as illustrated in Fig. 12d.

Figure 12
figure 12

Key sensitivity with a modification of \(10^{ - 15}\)

Histogram analysis

Optimal encryption should generate encrypted images with as uniform a histogram as possible50. As illustrated in Fig. 13, the histograms of the three channels of the encrypted image42 (R, G and B) show a horizontal distribution. This demonstrates the effectiveness of the proposed 2D-FrMHM in terms of resistance to statistical attacks.

Figure 13
figure 13

Histogram analysis.

Correlation and entropy analysis

Correlation analysis is a well-established approach to evaluating the relationships between pixels in an image51. It quantifies the statistical dependence between the brightness or color values of different pixels. This analysis is crucial in various fields, including computer vision, image processing and statistics. To measure the correlation between each pair of pixels, we use the following formula23.

$$ r(J_{1} ,J_{2} ) = \frac{{{\text{Cov}}(J_{1} ,J_{2} )}}{{\sigma (J_{1} )\sigma (J_{2} )}} $$
(42)

when

$$ \left\{ {\begin{array}{*{20}c} {r(J_{1} ,J_{2} ) = - 1\,or\, + 1\,} \\ {r(J_{1} ,J_{2} ) = 0\,} \\ \end{array} } \right. $$
(43)

Using point maps to visually represent the correlation between pixels before and after encryption is an effective way of assessing the impact of the encryption process on the image. This method makes it possible to highlight changes in the spatial distribution of pixel values and determine whether encryption has succeeded in disrupting the correlation between pixels in the original image. Specifically, in Fig. 14, the dot maps show the correlation coefficients between adjacent pixels in the three-color channels (R, G, and B) of the image. Prior to encryption, when the image is still unaltered, neighboring pixels can be expected to show strong correlation, resulting in coherent patterns on the dot maps.

Figure 14
figure 14

Correlation point map.

To reinforce this observation, we proceeded to calculate the correlation coefficients on another 512 × 512-pixel medical image42 using different chaotic maps reported in previous work (see Table 3). This comparative analysis highlights that the correlation coefficients associated with the encrypted osteochondroma image tend towards zero, indicating extremely low correlation.

Table 3 Correlation values.

The entropy analysis, as presented in Table 4, highlighted that all three channels of the encrypted image (Red, Green and Blue) exhibit information entropy very close to the theoretical maximum value of 8. These results conclusively confirm that the 2D-FrMHM model is highly effective in defending against attacks that attempt to take advantage of the information entropy present in the image. This observation is of great importance, as it demonstrates the robustness of the 2D-FrMHM model in the face of attack attempts specifically aimed at disrupting the entropy of information within the image. Entropy, being a crucial indicator of data complexity and disorganization, would play a key role in preserving the security and confidentiality of encrypted images.

Table 4 The entropy values found by 2D-FrMHM and other static systems.

Image watermark

Effects of the choice of the scaling factor

To assess the influence of the scale factor on the process of incorporating and extracting color watermarks, we used two separate images. The first comes from the database "The Visible Human Project" and has a resolution of 512 × 51242. The second represents the logo of the Hassan II Hospital in Fez43 and has a resolution of 128 × 128, as shown in Fig. 15. The incorporation and extraction phases reveal that the scaling factor, denoted \(\theta\), exerts a significant influence on the quality of the filtered image as well as on the extracted watermark. In this experiment, we systematically modified the value of \(\theta\), ranging from 0.01 to 1. The optimum value is the one that achieves the best balance between imperceptibility and robustness. It is important to note that the choice of scale factor depends on both the host image \(\left( {I_{H} (x,y)} \right)\) and the watermark \(\left( {I_{W} (x,y)} \right)\) used. Consequently, different watermark images require different scaling factors, even if they are inserted in the same host image.

Figure 15
figure 15

Watermarked image and extracted watermark using different scale factor choices.

In light of these results, we chose to adopt the AOA algorithm45 in conjunction with the objective function \(\left( {FO_{\theta }^{opt} } \right)\) to solve the \(\theta\) parameter challenge. Table 5 provides a comparison with other algorithms, including particle swarm optimization58 (PSO), gray wolf optimization59 (GWO), and artificial bee colony optimization60 (ABC). Performance, assessed using standard metrics such as PSNR, NC, and SSIM, testifies to the superiority of our algorithm. Note that the four selected algorithms adopt a maximum iteration of 200. This means that each algorithm has a fixed limit of 200 execution cycles to attempt to reach an optimal solution. To ensure reliable results, each algorithm is run independently 15 times. This minimizes the effect of random variation and provides a representative average of each algorithm's performance. The results recorded during these multiple runs are then compiled and presented in Table 5.

Table 5 Optimization results.

Invisibility and robustness analysis

In this evaluation, we examined how the size of the color watermark affects the embedding and extraction steps61. To illustrate this process, Fig. 16 shows watermarked host images, together with the corresponding extracted watermarks42, with dimensions of 256 × 256 and 128 × 128 pixels (the images used in this Fig. 16 are selected from database Ref.42 and website Ref.43).

Figure 16
figure 16

Extracted watermarks of different dimensions from a watermarked image.

To carry out this evaluation, this section highlights a real 512 × 512 pixel medical image42. As can be seen in Fig. 16, the proposed digital watermarking system achieved its objectives, with results clearly defined by PSNR values above 70.00 and SSIM values above 0.99. The NC of the extracted watermarks all shows a value of 1.0000 (no alterations were made to the watermarked host images). This indicates the excellent visibility of the watermarking method. In summary, the proposed watermarking scheme can satisfy the prerequisites for invisible watermarks. In addition, the use of a watermark of size 128 × 128 produces superior results to those obtained by using a watermark of size 256 × 256.

To assess the robustness of the proposed watermarking system, first, as shown in Fig. 17, we subjected photographs that were previously watermarked with color watermarks of sizes 128 × 128 and 256 × 256 to various attacks (see Table 6). Next, we extracted the watermark and calculated the normalization coefficient (NC) values.

Figure 17
figure 17

Types of attacks on watermarked images.

Table 6 Attacks used and related parameters.

Figure 18 is an important illustration of the robustness of the watermarking system we developed. It shows the watermarks that we were able to recover after subjecting the watermarked images to various filtering attacks, such as scaling, applying filters, adding noise, and other similar attacks. We carried out these tests on two sets of watermarks, one of size 128 × 128 pixels and the other of size 256 × 256 pixels. Table 7 contains the PSNR, NC and SSIM measurements which provide a comprehensive assessment of the quality and fidelity, whether of the watermarked image compared to the original or of the watermark before its insertion and after its extraction. To maintain consistency with Eq. (41), which defines the objective function, we assigned the PSNR and SSIM measurements to the watermarked images, while the NC is used to evaluate the watermark. The results shown in Table 7 indicate that our watermarking system is able to recover watermarks reliably even after being subjected to filtering attacks. This confirms the robustness of the system, essential to guarantee the security and integrity of watermarks in real-world conditions where images may be exposed to different types of alterations.

Figure 18.
figure 18

Extracted the watermark 128 × 128 and 256 × 256.

Table 7 PSNR and SSIM of watermarked images, the NC of watermarks.

In summary, the use of a variety of watermarks has emphasized the robustness of our digital watermark. After performing several attacks on the watermarked image and determining the NC value of each attack using two watermarks, the first of size 128 × 128 and the second of size 256 × 256. Figure 19 illustrates how the average NC value varied depending on the attack used, including the filter attack, noise attack, compression attack, scaling attack, and sharpening attack. The red curve represents this variation when using a 256 × 256 size watermark, while the blue curve illustrates this variation when using a 128 × 128 size watermark. The results shown in this figure show that, when a small watermark is used, our method works well.

Figure 19
figure 19

Average NC values after the application of certain attacks.

Table 8 shows a comparative study of the robustness of our method with other works that are based on metaheuristic algorithms, including an ABC-based watermark, a PSO-GWO based watermark, and an ABC-based watermark. From the results shown in Table 8, we can see that the proposed method provides a high NC compared to the other methods under the different attacks. It is important to note that the attack parameters we examined earlier were static, i.e., fixed and pre-set. However, to get a more complete and realistic view of the robustness of our watermarking system, it is also essential to take into account dynamic parameters, which can vary depending on the situation or environment.

Table 8 The NC values found compared with different methods.

In order to better understand the impact of dynamic parameter choices when applying attacks, we conducted tests taking these parameter variations into consideration. The results of these tests are shown in Fig. 20. This approach enables us to demonstrate the ability of our system to maintain its robustness even when attack parameters vary.

Figure 20
figure 20

NC value under different parameters under various attacks.

Comparison with similar work and discussion of results

To guarantee the credibility and validity of our results, we have undertaken an essential step to validate and authenticate our method. In this subsection, our system, based on a combination of DWT, QR, SVD, and the 2D-Henon map, is subjected to a detailed comparison with several other related methods. This comparison is based on a set of crucial features, as shown in Table 9. In this comparative analysis, we take into account a series of important properties, each of which has a significant impact on overall performance.

Table 9 Comparative analysis of NC, PSNR and SSIM values.

As the table clearly illustrates, our proposed approach proves extremely effective in comparison with other methods based on standard metrics64,65. These remarkable results can be attributed to several key factors that distinguish our approach. Firstly, the use of discrete orthogonal moments in their quaternion form. QCMs are particularly effective for representing images with low information redundancy, while preserving the visual quality of the images used in the proposed watermarking system. What's more, our system benefits from scale factor optimization via the AOA optimization algorithm, which guaranteed precise scale factor adjustment for each specific host image and watermark. By combining these two elements—the use of QCM and scale factor optimization via AOA—our system offers superior performance in terms of image quality and watermark detection capability. Thanks to this combination of techniques, we are able to achieve outstanding results, reinforcing the effectiveness and reliability of our watermarking method.

Conclusion

In this work, we introduced a novel watermarking system designed to guarantee the robust integrity of color images. Our method is founded on the use of moment and wavelet transformations, algebraic decompositions, and chaotic systems. As a first step, we have extended the scope of classical Charlier moments by adapting them to QCM through the exploitation of quaternion algebra. This first phase of our system enabled us to perform the DWT without requiring color image decomposition while minimizing the computational load at each stage of the process. Subsequently, we performed a decomposition of the resulting matrix generated by the DWT using QR decomposition and SVD. Then, to enhance the safety and robustness of our system, we used a modified version of Henon's 2D chaotic map, characterized by extended parameters compared to the classical version. Finally, to optimize watermark insertion, we employed the arithmetic optimization algorithm, enabling dynamic and adaptive estimation of the scaling factor. This overall approach is designed to guarantee the security, reliability, and capacity of our watermarking system while maintaining the excellent invisibility of watermarks inserted in color images. Experimental results show that our approach outperforms recent color image processing methods in terms of security, storage capacity, and resistance to various attacks while maintaining high invisibility. In the future, we intend to put our watermarking system into practice using programmable electronic boards such as Arduino and Raspberry Pi. This is intended to overcome the limitations of our current system, notably the high computation time involved in using a meta-heuristic.