Watermarking Applications of Krawtchouk–Sobolev Type Orthogonal Moments

: In this contribution, we consider the sequence { H n ( x ; q ) } n ≥ 0 of monic polynomials orthogonal with respect to a Sobolev-type inner product involving forward difference operators For the ﬁrst time in the literature, we apply the non-standard properties of { H n ( x ; q ) } n ≥ 0 in a watermarking problem. Several differences are found in this watermarking application for the non-standard cases (when j > 0) with respect to the standard classical Krawtchouk case λ = µ = 0.

The key point of the application we present here relies on their novel properties related to their norm, and on the construction of the so-called weighted Krawtchouk-Sobolev type orthogonal polynomials.The use of orthogonal polynomials (and orthogonal moments) in a watermarking scheme is widely spread in the scientific community (see, for example [2][3][4][5][6][7][8][9] among many other references).Nevertheless, and to the best of our knowledge, it is the first time that any Sobolev-type orthogonal polynomial family has been considered in such an application, achieving reasonably different, and in some cases, positive results.In this concern, new open problems come up from this novel direction of research which are subject of a future study, such as the optimality of the parameters in the definition of the Krawtchouk-Sobolev polynomials, which compromise a secure watermarking scheme and similarity of the cover and the watermarked image.Such parameters involve not only the boundary points of the support of Krawtchouk measure and the level in which such points interfere in the Sobolev inner product, but also the order of the difference operators involved.
The interest of orthogonal polynomials associated to inner products involving differences on a uniform lattice as (1), started with a series of seminal papers by Herman Bavinck in the 1900s (see [10][11][12]) by analogy with the so-called discrete Sobolev inner products under the action of usual derivatives (see the comprehensive survey [13]).It is well known that this kind of inner products give place to novel families of non-standard orthogonal polynomials, meaning that the action of multiplication by x is not symmetric with respect to such an inner product, i.e., xp, q λ,µ = p, xq λ,µ and therefore the usual properties of standard orthogonal polynomials disappear: for non-standard inner products, there is not a three term recurrence relation (see, for example [14][15][16]), the zeros of consecutive polynomials could not interlace, or it could not be real, etc.Since those first three seminal papers, many researchers have made advances on the Sobolev-type case for a bunch of discrete orthogonality measures, mainly describing and providing properties of the corresponding new discrete Sobolev-type new orthogonal polynomial families (check again [13] and the references given there).Having said that, the idea here is not to describe the new properties of the Krawtchouk-Sobolev type orthogonal polynomials (which has already been done in [1]), but rather to apply for the first time this new discrete non-standard orthogonal polynomials family in watermarking and steganography techniques.We also refer to [17,18] as research using similar techniques.
The procedure of watermarking an image C consists, roughly speaking, on embedding some information in the image (the cover image) in order to obtain a modified image W (the watermarked image) in such a way that both images remain as close as possible.In this work, the tool which serves as a bridge from the first to the second image is the matrix of Krawtchouk-Sobolev type orthogonal moments (see Equation ( 18)) which satisfies that W approaches C due to the properties of the defined Sobolev-type polynomials.The algorithm of embedding the watermark in the cover image is shown in Section 5 and is applied in concrete examples, comparing the results obtained with respect to other families of classical polynomials in experimental analysis.
The structure of the present work is as follows.In Section 2 we recall the definition and main properties of the classical Krawtchouk {K p,N n } n≥0 and Krawtchouk-Sobolev type {K (j) n } n≥0 orthogonal polynomials introduced in [1].Most of the results in this section are presented without proof, and those necessary can be found in that previous work.

Polynomials in {K
(j) n } n≥0 are defined after a Sobolev type modification, located at the boundary points of the support of the classical Krawtchouk polynomials, of the inner product corresponding to {K p,N n } n≥0 .We also deepen in the properties relating both families, and the Section concludes with the novel result relating the norms of both families of polynomials.Section 3 is devoted to define the weighted Krawtchouk-Sobolev type polynomials, based on the knowledge of the norms previously obtained.The key result here is Lemma 3, describing a quasi-orthogonality condition, which is applied in Section 4 to show that the matrix of orthogonal inverse moments defined in (19) gets close to the cover image.In Section 5, we put forward the application of polynomials in {K (j) n } n≥0 in the framework of a watermarking scheme through an embedding algorithm.The statements relating the theory and the application are described and motivated in Section 4. Finally, we include a last section of directions of future work at the end of the paper.

Krawtchouk and Krawtchouk-Sobolev Type Orthogonal Polynomials
In this first section, we recall the main definitions and results related to the elements involved in the construction of the weighted Krawtchouk-Sobolev type polynomials, to be studied in Section 3.More precisely, we deal with Krawtchouk and Krawtchouk-Sobolev type orthogonal polynomials in Sections 2.2 and 2.3, respectively.

Basic Definitions
Definition 1.Given x ∈ C, the shifted factorial of x, also known as Pochhammer symbol [19] is defined by (x) 0 = 1 and for every positive integer n.
For every positive integer k and a finite tuple (a 1 , . . ., a r ) ∈ C r , we write Definition 2. Let {a i } r i=1 and b j s j=1 be two finite sets of complex numbers such that for every j = 1, 2, . . ., s one has that b j = −n for n ∈ N\{0}.The hypergeometric series is the formal power series [20] r F s

Krawtchouk Polynomials
Let 0 < p < 1 and let N be a non negative integer.The sequence of monic Krawtchouk orthogonal polynomials {K p,N n (x)} n≥0 are orthogonal with respect to the inner product In the next result we recall some basic properties of Krawtchouk orthogonal polynomials, which can be found in the references [20,21].Proposition 1.Let 0 < p < 1, and let N ≥ 0 be an integer.We consider the sequence of classical Krawtchouk monic orthogonal polynomials, {K p,N n (x)} n≥0 .1.
The following recurrence relation holds for all n ≥ 0: Here, we have considered K p,N −1 (x) = 0, and K p,N Squared norm.For every n ∈ N, it holds that

4.
The sequence of classical Krawtchouk monic orthogonal polynomials satisfies the following second-order difference equation (hypergeometric type equation) where ∆ and ∇ denote the forward and backward difference operators defined by , respectively, with Let 0 < p < 1 and N ≥ 0.
Definition 3. Let {K p,N n (x)} n≥0 be the sequence of classical Krawtchouk monic orthogonal polynomials.The n-th reproducing kernel is defined by Here, || • || stands for the Euclidean norm.
Concerning the partial finite difference of K n (x, y) with respect to each variable, we use the following notation for every pair i, j ≥ 0: (4)

Krawtchouk-Sobolev Type Orthogonal Polynomials
In this subsection, we consider the sequence of monic polynomials orthogonal with respect to a Sobolev-type inner product, as defined in [1].We include the details of their main properties for the sake of completeness, and refer to [1] for further information and the detailed proofs.Let 0 < p < 1, N, j ∈ Z + and λ, µ ∈ R + .We define the Sobolev-type inner product •, • λ,µ by It holds that for all integers 2 ≤ n ≤ N one can write the elements of the sequence {K (j) n (x)} n≥0 , consisting of the family of monic orthogonal polynomials with respect to the previous inner product, in terms of the classical Krawtchouk monic orthogonal polynomials as follows: where where We observe that b Proof.This property follows from an induction argument on h.If h is a constant polynomial, it is straight that ∆ j π h = ∆π h = 0 for every j ≥ 1.If we assume the property is valid for all integers up to h, and consider a polynomial π h+1 (x) of degree h + 1, and j ≥ h, then one has that and ∆π h+1 is a polynomial of degree less or equal to h and the induction hypothesis can be applied.
Proposition 2. The polynomals K (j) n (x) and K p,N n (x) coincide for every 0 ≤ n ≤ j.
Proof.Let n ≥ 1 and consider any polynomial π of degree 0 ≤ < n.Then, in view of Lemma 1 and the definition of •, • λ,µ one has This concludes the proof.
Figure 1 illustrates the Krawtchouk-Sobolev type polynomials for the values N = 10, p = 1/2, and with j = 1.Observe in this case that the first ones coincide with the classical Krawtchouk polynomials in view of Proposition 2.
For the sake of a more compact writing of the forthcoming properties associated with such a family of polynomials, we put We observe that the choice of the elements involved in the definition of the Krawtchouk-Sobolev type orthogonal polynomials is implicitly made, and will be omitted for simplicity.
The properties of the sequence {K (j) n (x)} n≥0 determine analogous properties for this novel sequence of orthogonal Sobolev-type orthogonal polynomials.Proposition 3. Let {K (j) n (x)} n≥0 be the sequence of monic Krawtchouk-Sobolev orthogonal polynomials defined by (6).Then, the following statements hold.

1.
Hypergeometric representation.Given positive integers n ≤ N and j, one has and h and , where , and
The recurrence relation for the classical Krawtchouk monic orthogonal polynomials determines that, for the Krawtchouk-Sobolev type orthogonal polynomials, as follows: where n (x; 2, 1), and Ξ with initial conditions K (j) −1 (x) = 0, and K (j) In the remaining part of this Section, we complete the previous properties with the norm of the elements in {K (j) n (x)} n≥0 , stated in Theorem 1.This result is derived from the Proposition 4, whose proof is a direct result of the following technical Lemma, together with (6).
Lemma 2. For every p, q ∈ P one can apply the definition of the inner product to arrive at n (x)} n≥0 be the sequence of monic Krawtchouk-Sobolev orthogonal polynomials defined by (6).Then, one has where and i,n and b i,n given in ( 7)-( 8) and ( 9), respectively.

Weighted Krawtchouk-Sobolev Type Polynomials
This section is devoted to define the so-called weighted Krawtchouk-Sobolev type polynomials, and describe their main properties, which will be used in Section 5 in an application to watermarking schemes.The knowledge of the norm obtained in Theorem 1 is of great importance in order to define such weighted Krawtchouk-Sobolev type polynomials.It is worth remarking that, despite their name, the elements of the sequence of weighted Krawtchouk-Sobolev type polynomials are no longer polynomials.We have maintained this and other denominations to maintain the one used in applications such as that of Section 5. We refer to [22] for more information in this concern.
As in the previous sections, we fix the parameters defining the norm of a Krawtchouk-Sobolev sequence of monic orthogonal polynomials.
for every n ≥ 0.
In the next result, we obtain the asymptotic behavior as λ and µ approach zero, which leads to the asymptotic behavior of the matrix of orthogonal direct moments, as defined in Section 5. Lemma 3. Let {K (j) n (x)} n≥0 be the sequence of weighted Krawtchouk-Sobolev type polynomials defined by (16).Then, it holds that lim (λ,µ)→(0,0) Here, δ m,n stands for the Kronecker delta.
Proof.From the definition of the Krawtchouk-Sobolev type orthogonal polynomials in (5), we then observe that From the previous equality, one can conclude that Therefore, lim (λ,µ)→(0,0) The following recurrence relation holds for the sequence of weighted Krawtchouk-Sobolev type polynomials.Proposition 5. Let {K (j) n (x)} n≥0 be the sequence of weighted Krawtchouk-Sobolev type polynomials defined in (16).Then, the following recurrence relation holds: where and .
Proof.A direct application of (10) yields The previous equation is equivalent to , and the result follows from here.

Krawtchouk-Sobolev Type Orthogonal Moments
In this section, we briefly describe the mathematical statements to be considered in the application for a watermarking scheme.For this reason, the notation stated in this section will be maintained in the last section of applications.
Assume one considers an image, the cover image, stored in matrix C. Such a matrix is divided into matrices of size N × N bytes.The k-th image block of C is denoted by C (k,N) .Let us write Definition 5. Let C (k,N) be the k-th image block of a cover image C. We define its matrix of orthogonal direct moments by where for some fixed j.
The purpose of a steganographic image, created from a cover image, relies on the fact that the steganographic image hides some data within it, while maintaining a similar shape as that of the cover image, hiding secret data in it.The results obtained in Section 3, in particular Lemma 3, guarantees that A t A I, where I denote the identity matrix.
The previous fact motivates the following transformation associated to M. Definition 6.Let M be the matrix of orthogonal direct moments.The matrix of orthogonal inverse moments is given by According to Lemma 3 and (17), one has that and therefore, one concludes lim (λ,µ)→(0,0) Therefore, one can choose λ, µ such that the watermarked image remains as close as needed to the cover image.

Application: Watermarking Scheme
In this section a watermarking scheme is presented as an application of the Krawtchouk-Sobolev type orthogonal moments.The embedding algorithm obtaining a watermarked image W from a cover image C is deduced following the procedure explained in the previous section.The present work concludes with the experimental analysis of the proposed scheme.

Arnold Transform
The Arnold transform is an invertible method that can be used for pixel scrambling.This important transform has been widely used in various watermarking schemes proposed by several authors.Arnold transform can be used in order to eliminate the high correlation of pixels, see [23]: The watermark is scrambled from ω into ω.Here, (x, y) y ( x, ŷ) represent the pixels of ω and ω, respectively.In particular, we take p = 1 and q = η, being η the control parameter, which is used as a private key during the watermark embedding and extraction processes.
The watermark that will be used in this contribution is that of Figure 2: Thus, considering Figure 3, it is deduced that the control parameter η should satisfy that η ∈ [1, 63], since for η = 64 the watermark is recovered in the process of applying the Arnold transform.

Zigzag Scan
Following the notation considered in [22], we write Z (•) for the operator transforming a 8 × 8 matrix into a vector of length 64 after the ordering given to the elements of the matrix determined by the zigzag scan (see Figure 4).The inverse operator Z −1 (•) sends a vector of length 64 to a matrix of order 8 with Z −1 • Z being the identity sending a matrix of order 8 to itself, and Z • Z −1 is the operator sending a vector of length 64 to itself.The symbol • stands for the composition operator.

Dither Modulation
Dither Modulation (DM) is a special form of quantization index molulation that is applied in an image watermarking system in order to assign one bit to each transformation coefficient.In case of a uniform scalar quantization, see [24,25], the watermarked signal is given by where ∆ denotes the quantization step size that controls the embedding strength of the watermark bit.In addition, Q ∆ (•) is defined as follows where round(•) denotes the round function to the nearest integer.Moreover, x n represents the signal, d m the dither value, m the message, and L denotes the number of elements of m.In an uncoded case of binary dither modulation with an embedding rate one, the quantizers are constructed with the constraint which complies with the following In particular, in this contribution we have taken For this embedding method, the received signal ŷn is a possibly corrupted version of y n , which is re-quantized with the family of quantizers used during embedding to determine the bit of the embedded message where argmin returns the indices of the minimum values along an axis.

Embedding and Extraction Watermark Algorithm
First, the embedding watermark algorithm scrambles the watermark by the Arnold transform (20) for a control parameter η, with 1 ≤ η ≤ 63, see Figure 3, and then it is organized into a binary sequence { ωi }, i = 1, . . ., 64 × 64.Next, this scheme splits the cover image C into non-overlapping blocks C (k,8) of size 8 × 8, where the number of blocks coincide with the number of watermark bits.On the other hand, it applies the direct moments (17) to each block of 8 × 8. Next, the zigzag scan is applied to the resultant coefficients block, see Figure 4, with the purpose to align frequency coefficients in ascending order.Then, it selects a coefficient of (17), in this case, the coefficient number is 28.Thus, the secret bits are embedded in the selected coefficient by applying the Dither Modulation (DM).Finally, the inverse moment transform (19) is applied in order to reconstruct the image, obtaining the watermarked image W (k,8) .
Algorithm 1 describes the procedure explained in Section 4 at the time of watermarking a cover image C. The extraction process is similar to the embedding process detailed above.

Experimental Analysis
In this section we describe the experimental results of the proposed scheme.Changes in the cover image pixel values appear due to the cover image being altered to embed the secret data.The changes made on the image need to be analyzed since it directly affect the imperceptibility of the output stego image.
For the experimental analysis several color images of size (512 × 512) were used from two different datasets: a first image dataset of 1500 RGB-BMP images, transformed from Caltech birds' dataset in JPEGC format [26] (Dataset I) and a second image dataset of 1500 RGB-BMP images, transformed from NRC dataset in TIFF format [26] (Dataset II).Since the cover images are of size 512 × 512 and the watermark is 64 × 64 bits, see Figure 2, then the watermark bits are distributed in each block throughout the original image.The algorithm proposed in the present work is implemented in Python 3.8.10.
The results of the experimental analysis are displayed in the following figures in which the PSNR values of the watermarked images corresponding to each of the two datasets are considered.More precisely, we show the values of PSNR of Krawtchouk polynomials (K) and the proposed Krawtchouk-Sobolev type polynomials (KSX), where X ∈ {1, 2, 3} determines the value of j in the definition of such polynomials.In addition, a comparison of the proposed method for Krawtchouk moments (KMs, p = 0.5) with respect to the method proposed for Krawtchouk-Sobolev type orthogonal moments (KS1Ms with p = 0.5, λ = µ = 10 −7 , KS2Ms with p = 0.5, λ = µ = 10 −10 , and KS3Ms with p = 0.5, λ = µ = 10 −11 ) is included in this section.
Moreover, a comparison of the proposed moments with respect to the moments proposed by Yamni et al., Fractional Moments of Charlier (FrCMs) [27] and Yamni et al., Fractional Moments of Charlier-Meixner (FrCMMs) [28] is included in this section.The following attacks to measure robustness were applied: Cropping noise, Gaussian noise, Salt & Pepper noise, and Median filter noise.
In order to make a fair comparison with the FrCMs and FrCMMs moments in relation to KMs, KS1Ms, KS2Ms, and KS3Ms, the quantization steps ∆ = 30 and ∆ = 50 were chosen for the experiments, maintaining a PSNR value close to 50 dB.For the moments KMs, KS1Ms, KS2Ms, and KS3Ms, ∆ = 50 was used.The performance of the proposed approach has been studied using the following of statistical measures.

Imperceptibility Test
The measure of the quality of the watermarked image is made in terms of PSNR (Peak Signal to Noise Ratio) of different datasets.PSNR is widespread and a top notch metric is used in order to measure the quality of the watermarked image.It analyzes the mean squared error value, comparing the cover and the stego image [29].
In the first experiment, we use the PSNR as a measure to evaluate the level of imperceptibility and distortion as well as to measure the difference between cover and watermarked images.The experimental results showed that the proposed moments produced good quality watermarked images with good PSNR values, see Figure 5, which is in correspondence with the heuristic values of PSNR.On the other hand, in Figure 5, it is possible to observe that as the quantization step increases, the average PSNR decreases.Moreover, this experiment showed that for the two datasets, the results of imperceptibility corresponding to the KMs, KS1Ms, KS2Ms, and KS3Ms are similar.This is interesting, since a priori no differences are shown.However, the next study demonstrates the strength of KS1Ms, KS2Ms, and KS3Ms in relation to KMs.

Robustness Test
The robustness is measured as the bit error rate (BER) corresponding to incorrectly formed binary values of the watermark image.The BER value is calculated by using the equation BER where ω(n) and ω(n) are binary bits (0 or 1) of the original watermark and the extracted watermark.Moreover, L is the number of bits of the watermark.
In order to evaluate the robustness, the following attacks were applied: Cropping noise, Gaussian noise, Salt and Pepper noise, and Median filter noise.Their parameters appear in Table 1.In this experiment, it is shown in the results displayed in Figures 6-8, that robustness of the watermarking scheme based on KS1Ms, KS2Ms, and KS3Ms is much higher than that of the schemes based on KMs, KMs, and FrCMs.Moreover, the KMs do not resist well to the attacks performed in this contribution since the BER values are higher, see Figures 9-10.On the other hand, for Salt & Pepper noise displayed in Figure 11, the moments FrCMs and FrCMMs seem to be more robust with respect to the schemes based on KS1Ms, KS2Ms, KS3Ms, and KMs.
The BER values are close to zero, obtained after applying the attacks (Cropping noise and Gaussian noise), corresponding to KS1Ms, KS2Ms, and KS3Ms.This means that the extracted watermarks are recognizable and very similar to the original watermarks, see Figures 9 and 10.
The noises (salt & pepper noise and median filter noise) were more aggressive in all cases, so that the studied moments are less robust to these attacks, see Figures 8 and 11

Discussion
In this work, we have proposed a new procedure to create watermarked images by using Krawtchouk-Sobolev type polynomials.The results obtained undertake a promising future direction of research in which the variation of the parameters involved in the definition of the polynomials can vary in order to give optimal results, compromising a secure watermarking scheme and the similarity of the cover and the watermarked image.
A future work in this direction is to obtain optimized values for the parameters involved in the definition of the Sobolev type polynomials.According to the results obtained, the case of j = 2 seems to give better results and should be analyzed separately.

Definition 4 .
Let {K (j) n (x)} n≥0 be the sequence of monic Krawtchouk-Sobolev orthogonal polynomials defined by(6) and let(15) be the norm of such polynomials.The weighted Krawtchouk-Sobolev type polynomial K (j) n (x) is defined by

Figure 4 .
Figure 4. Path followed in a matrix to transform it into a vector via Z .

Figure 9 .
Figure 9. Extracted watermarks under Cropping attacks.The first row corresponds to KS1Ms, KS2Ms, and KS3Ms while the second row corresponds to KMs, FrCMs, and FrCMMs.