Hadamard Error-Correcting Codes and Their Application in Digital Watermarking

In communication technologies such as digital watermarking, wireless sensor networks (WSNs), and visual light communication (VLC), error-correcting codes are crucial. The Enhanced Hadamard Error-Correcting Code (EHC), which is based on 2D Hadamard Basis Images, is a novel error correction technique that is presented in this study. This technique is used to evaluate the effectiveness of the video watermarking scheme. Even with highly sophisticated embedding techniques, watermarks usually fail to resist such comprehensive attacks because of the extraordinarily high compression rate of approximately 1:200 that is frequently employed in video dissemination. It can only be used in conjunction with a sufficient error-correcting coding method. This study compares the efficacy of the well-known Reed–Solomon Code with this novel technique, the Enhanced Hadamard Error-Correcting Code (EHC), in maintaining watermarks in embedded videos. The main idea behind this newly created multidimensional Enhanced Hadamard Error-Correcting Code is to use a 1D Hadamard decoding approach on the 2D base pictures after they have been transformed into a collection of one-dimensional rows. Following that, the image is rebuilt, allowing for a more effective 2D decoding procedure. Using this technique, it is possible to exceed the theoretical error-correcting capacity threshold of ⌊dmin−12⌋ bits, where dmin is the Hamming distance. It may be possible to achieve better results by converting the 2D EHC into a 3D format. The new Enhanced Hadamard Code is used in a video watermarking coding scheme to show its viability and efficacy. The original video is broken down using a multi-level interframe wavelet transform during the video watermarking embedding process. Low-pass filtering is applied to the video stream in order to extract a certain frequency range. The watermark is subsequently incorporated using this filtered section. Either the Reed–Solomon Correcting Code or the Enhanced Hadamard Code is used to protect the watermarks. The experimental results show that EHC far outperforms the RS Code and is very resilient against severe MPEG compression.


Introduction
In sensors applications such as wireless sensor networks (WSNs) or visible light communications (VLCs) the error-correcting codes play a very important role.For example, in wireless sensor networks, the data are transmitted from a field of distributed sensors, which monitors different parameters of the environment, for example, temperature, humidity, and wind, to the central sever, which collects and processes all these data.Signals can be falsified during the transmission, by bad weather conditions or some other obstacles, like a battery weakness of the sensors.Therefore, an efficient error-correcting code technique is required to secure the correct recovery of sensor data at the central server.In some publications, this problem has already been addressed [1][2][3].The same problem occurs The Hadamard matrix H n of order n is defined as an n × n matrix with elements 1 and −1.It fulfills the following equation: where I n is an identity matrix.
To construct this type of matrix there are several approaches.The Sylvester Construction Method will be discussed here.For alternative methods and more details please refer to [12,13].
The Sylvester Construction Method is a recursive procedure for the generation of Hadamard matrices of order 2 n .The procedure starts with a matrix H 1 = (1), and then generates other matrices through the following recursive algorithm: where 2 ≤ k ∈ N.
Sensors 2024, 24, 3062 3 of 19 Here is an example of the generation of the Hadamard matrix H 4 : It is important to mention here that there are other constructions of Hadamard matrices, such as Walsh-Paley matrices, but these are not used in the Hadamard Error-Correcting Code.

Generation of Hadamard Code
The n-bit one-dimensional Hadamard Code can be generated through the following steps: Step 1: Generate an n × n Hadamard matrix H n ;.
Step 2: With the Hadamard matrix H n , build a new matrix C 2n ; Step 3: The rows of the matrix C 2n are the codewords of the Hadamard Code and are denoted as { h i |h i = C 2n (i, :)} i=2n i=1 ; however, the −1 should be substituted with 0. Example: The generation of a Hadamard Code [8, 4, 4] is required.In the first step, a Hadamard matrix H 8 is generated: In the second step is the construction of the matrix: Currently, the 16 rows of the matrix C 16 , each containing an 8-bit codeword, define the Hadamard Code.The binary Hadamard Code [8,4,4] is displayed in Table 1, where 0 is used in the place of −1.

Message Word
Hadamard Vector

Decoding of Hadamard Code
In order to comprehend the decoding process, it is necessary to examine the codewords of the Hadamard Code.As previously stated, the rows of the Hadamard matrix C 2n , which are orthogonal to one another, are the codewords.A similar Hadamard spectrum can be constructed, represented by the n-dimensional vector s i by taking the i-th row, which is the n-dimensional codeword vector h i .
Aside from component i, every element in this vector s i is zero.As a result, matching codewords can be decoded simply by looking at the received codewords' Hadamard spectrum.The codeword is represented by the component of the spectrum vector with the highest value.
Take the following for instance: Considering the Hadamard matrix C 2n , namely the third row (message word: 0010), the vector of the Hadamard spectrum is The spectrum vector s 3 only differs from zero in its third component, namely Sensors 2024, 24, 3062

of 19
This indicates that the row in the Code Book (Table 2) is determined via the position i 3 .The message word [0 0 1 0] is associated with the decoded codeword, which is located in the third row of the Hadamard matrix C 2n .The inverse row to the third row is row number eleven.The decoding process of this row delivers [8,4,4] half-mode Hadamard Code.

Message
Hadamard Vector Codeword Also, in this case, the third component of the spectrum vector s 11 is different from zero.However, it is negative.
The decoding algorithm is defined as follows: Step 1: Convert the codeword into the Hadamard vector by substituting the zeros with −1.
Step 2: Build the Hadamard spectrum using the Hadamard vector.
Step 3: Find the component with the largest absolute value.This component number defines the codeword.
Step 4: If the component value is negative, inverse the codeword.In the example above, the third component has the largest absolute value abs(s 11 (3)) = 8.The corresponding codeword is h 3 .However, the spectrum value is negative ( s 11 = −8), and, therefore, the codeword, h 3 , must be inversed, which then becomes the codeword h 11 .
If one error occurs inside the codeword h 3 , the third component of the spectrum vector continues to have the highest value.Without restricting the generality, an error in the first component of the vector h 3 can be assumed: The decoding procedure delivers The value of the third component of the Hadamard spectrum vector is still the greatest one.Despite the one error that occurs, it is still possible to decode the message word.
If there are two errors, it becomes difficult to decode the codewords with complete certainty.The following example illustrates this.Consider a codeword with two errors, The two last components of the vector h 3 are flipped.The decoding procedure delivers The components 1, 3, and 7 have the same value, namely Therefore, in this case (two errors), this codeword cannot be decoded unambiguously.Generally, the error-correcting capability t of any code with the Hamming distance d min , can be calculated according to the formula In the case of the Hadamard Code [8,4,4] the Hamming distance is d min = 4 and, therefore, t = 1.Another method for the calculation of the error-correcting capability of the Hadamard Code is where n is the length of the codeword.
The following conclusions apply: • The Hadamard Code [8,4,4] is 8-bit long and can transmit 16 different messages.Only one error can be recovered unambiguously.

•
General rule for the Hadamard Code: if the length of the Hadamard Code is n, then n 4 − 1 2 errors can be corrected.In the case of n = 8, only one error can be corrected.

One-Dimensional Half-Mode Hadamard Code
Interesting results concerning error correction abilities can be achieved if only one Hadamard matrix generates the Hadamard Code.
Instead of using Equation (3) for the generation of the code, the following equation is used: In this case, we encode only n messages instead of 2n (see Table 2), but the number of correcting bits can be increased significantly.In addition to one error, now it is possible to correct seven or eight errors in one codeword.
The following example shows the case of 8-bit errors.This means, for example, that a Hadamard vector h and all bits are flipped (burst error).The same decoding procedure as before is now applied by building the Hadamard spectrum vector: The component with the greatest absolute value defines the message word.In our case, abs(s 3 (3)) = 8.According to Without restricting the generality, in the case of 7-bit errors, the original Hadamard vector h and the component with the greatest absolute value defines the message word.Here, the third component has the greatest absolute value, abs(s 3 (3)) = 6, which means that, according to the Code Book in Table 2, the received message word is [0 1 0].
In contrast to the full mode, only the absolute values of components are considered.

Two-Dimensional Hadamard Error-Correcting Code
The so-called Hadamard basis images can be used to extend the Hadamard Code.These basic images are utilized as codewords instead of Hadamard vectors.
By multiplying their columns and rows, the Hadamard matrix can be used to create the orthogonal basis image functions.The general guideline for creating a basic image is For example, in the case of a 4 × 4 Hadamard matrix, A basis image A 31 is By replacing −1 with "black" and 1 with "white", the basis image can be visualized, as depicted in Figure 1.
Sensors 2024, 24, x FOR PEER REVIEW 7 of 19 For example, in the case of a 4 × 4 Hadamard matrix, A basis image  is By replacing −1 with "black" and 1 with "white", the basis image can be visualized, as depicted in Figure 1.A Hadamard matrix  has thirty-two of these basis images.Figure 2 shows them all, as determined using Equation (18).It consists of two sets of sixteen basis images of Hadamard matrices, which are inverted versions of each other.A Hadamard matrix H 4 has thirty-two of these basis images.Figure 2 shows them all, as determined using Equation (18).It consists of two sets of sixteen basis images of Hadamard matrices, which are inverted versions of each other.A Hadamard matrix  has thirty-two of these basis images.Figure 2 shows them all, as determined using Equation (18).It consists of two sets of sixteen basis images of Hadamard matrices, which are inverted versions of each other.The 2D Hadamard spectrum of such basis images, indicated with S, is required for the decoding process.They can be computed using the formula where  is an  ×  Hadamard matrix,  is the transposed one, and  are the basis images.Since the transposed and the original matrices are equal,  =  , the calculation can be simplified.
The decoding process is identical to that of the one-dimensional scenario.The 2D spectrum, which is computed using Equation (21), is taken into consideration.The equivalent basis image is represented via the one non-zero element in the spectrum.This process is demonstrated in the example that follows.With basis image  from Equation (20), the spectrum may be computed as follows: The 2D Hadamard spectrum of such basis images, indicated with S, is required for the decoding process.They can be computed using the formula where H n is an n × n Hadamard matrix, H T n is the transposed one, and A lm are the basis images.Since the transposed and the original matrices are equal, H n = H T n , the calculation can be simplified.
The decoding process is identical to that of the one-dimensional scenario.The 2D spectrum, which is computed using Equation (21), is taken into consideration.The equivalent basis image is represented via the one non-zero element in the spectrum.This process is demonstrated in the example that follows.With basis image A 31 from Equation (20), the spectrum may be computed as follows: The encoded basis image is defined by the location of the largest element in the matrix.S(3,1) = 16 in this instance; the remaining elements are all zeros.It indicates that the codeword is a basis image represented by a coefficient A 31 .An error-correcting code may be built using the spectral coefficients to identify the basis images.According to Equation (21), the codewords, which are patterns of basis images, may be definitively deciphered by identifying the largest absolute coefficient value inside the Hadamard spectrum matrix.In [14], Wassermann and Dziech first introduced the corresponding basis images.They are mapped into a one-dimensional pulse stream by simply concatenating the image's rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of d min = 8 bits.Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).

Message Basis Image Matrix Element Codeword
1 0 0 0 0 rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).

Message Basis Image Matrix Element Codeword
1 0 0 0 0 S(1,1) 0000000000000000 ,4) 0000111111110000 rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).

Message Basis Image Matrix Element Codeword
1 0 0 0 0 S(1,1) 0000000000000000 ,4) 0000111111110000 rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).

Message Basis Image Matrix Element Codeword
1 0 0 0 0 S(1,1) 0000000000000000 ,4) 0000111111110000 rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).

Message Basis Image Matrix Element Codeword
1 0 0 0 0 S(1,1) 0000000000000000 ,4) 0000111111110000 rows in order to create the codewords.The Code Book for the 2D Hadamard Code, which was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).was created using 4 × 4 Hadamard matrix basis images, is displayed in Table 3.It is really a Hadamard Code with codewords that are 16 bits long, possessing a Hamming distance of  = 8 .Three mistakes can be fixed by it.Ultimately, we obtain a standard onedimensional Hadamard Code, but as we shall see later, the codewords can be interpreted as pictures, providing a fresh perspective on the code.[16,5,8] with Basis Images (cf.[17,18]).Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.

S(4,4) 0110100110010110
Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.
Any corruption on the codewords automatically produces corrupted basis images.The analysis of codeword errors could be shifted to an analysis of distorted basis images.Figure 3 presents such a corrupted basis image.Any distortion affecting the codewords is transferred into the corresponding corruption of basis images.If the number of errors does not exceed three, it is possible to completely recover the original pattern.This can be better understood by examining the following distorted basis image.
The Hadamard spectrum, derived from Equation (21), is The greatest spectrum component is S(3,1), which has an absolute value of 10.The associated message word may be read out from the Code Book and, according to Table 4, has the value (1 1 0 0 0).If the number of errors does not exceed three, it is possible to completely recover the original pattern.This can be better understood by examining the following distorted basis image.
The Hadamard spectrum, derived from Equation ( 21), is The greatest spectrum component is S(3,1), which has an absolute value of 10.The associated message word may be read out from the Code Book and, according to Table 4, has the value (1 1 0 0 0).

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.
As discussed earlier, the error correction of a code is determined by Hamming dis-0.560.90

Enhanced Hadamard Code
The Enhanced Hadamard Code provides the possibility to surpass the theoretical threshold of the error correction capacity of the Hadamard Code described in Equations ( 14) and (15).The first publication of this method was mentioned in [1].This method was applied in video watermarking techniques.
As discussed earlier, the error correction of a code is determined by Hamming distance d min , and the total number of errors that can be corrected is In the case of the Hadamard Code [16,5,8], an error-correcting capability of t = 3 bit can be determined.With the Enhanced Hadamard Code, it is possible to correct more than three bits.
The fundamental concept behind the improved Hadamard Code is the mapping of 2D basis images into a set of 1D rows, which are then used in a 1D decoding process.Following this, the image is reassembled, making it possible to use the 2D decoding technique Equation ( 21) more effectively.
To show the functionality of the Enhanced Hadamard Code, we consider a Hadamard Code [64,7,32].The codewords are 64-bit-long and they can encode 2 7 = 128 different messages.The Hamming distance is d min = 32, which means that the code can correct 15 errors.These codewords can be interpreted via basis images of the size 8 × 8 of the 2D Hadamard transform.Without the restriction of any generality, we consider the basis image A 71 .
The corresponding image is depicted in Figure 4.The algorithm's stages can be explained as follows: • The tainted basis image (A) is broken down into its individual rows (B).

•
The 1D Hadamard decoding process is executed to every row.Rows that contain only one error are decoded error-free; all their errors are removed.In the example, these are rows No. 6 and 8.In Part (C), these rows are depicted error-free.

•
The rows are reassembled (D).There are 15 fewer mistakes in the updated pattern than there were in the previous one.

•
The Hadamard decoding procedure is applied according to Equation ( 21) and the Code Book from Table 3.An error-free pattern is the end product: (E).
A simulation is conducted to evaluate the error correction capabilities of the improved and standard Hadamard Error-Correcting Codes using codewords of length n = 64.Figure 7 illustrates the results.The x-axis represents the amount of bit mistakes, while the y-axis represents the proportion of repaired codewords.The improved 2D Hadamard Code is shown with a solid line, whereas the conventional 2D Hadamard Code is represented with a dashed line.The standard Hadamard Error-Correcting Code, as explained in Section 2.1, possesses the following characteristics: If the number of mistake bits falls between the range of [1, n/4 − 1] to [3n/4 + 1, n], this system is capable of completely correcting all erroneous codewords of length n, achieving a 100% success rate.If n = 64, the conventional Hadamard Code is capable of correcting mistakes when their quantity falls between the ranges of 1 to 15 and 49 to 64.With the Enhanced Hadamard Correcting Code, errors that exceed these limitations can be fixed.In the instance of 16 mistakes, 92% of all potential error patterns inside the codeword can be corrected.Even with 17 faults, there is still a possibility to rectify 83% of all error patterns.In the case of the Standard Hadamard Code, no mistakes can be rectified when there are 48 errors.However, the Enhanced Hadamard Code is capable of correcting faults in this scenario.It has the ability to rectify 92% of mistake patterns.
proved and standard Hadamard Error-Correcting Codes using codewords of length n = 64.Figure 7 illustrates the results.The x-axis represents the amount of bit mistakes, while the y-axis represents the proportion of repaired codewords.The improved 2D Hadamard Code is shown with a solid line, whereas the conventional 2D Hadamard Code is represented with a dashed line.The standard Hadamard Error-Correcting Code, as explained in Section 2.1, possesses the following characteristics: If the number of mistake bits falls between the range of [1, n/4 − 1] to [3n/4 + 1, n], this system is capable of completely correcting all erroneous codewords of length n, achieving a 100% success rate.If n = 64, the conventional Hadamard Code is capable of correcting mistakes when their quantity falls between the ranges of 1 to 15 and 49 to 64.With the Enhanced Hadamard Correcting Code, errors that exceed these limitations can be fixed.In the instance of 16 mistakes, 92% of all potential error patterns inside the codeword can be corrected.Even with 17 faults, there is still a possibility to rectify 83% of all error patterns.In the case of the Standard Hadamard Code, no mistakes can be rectified when there are 48 errors.However, the Enhanced Hadamard Code is capable of correcting faults in this scenario.It has the ability to rectify 92% of mistake patterns.

Enhanced 3D Hadamard Error-Correcting Code
Diluting the Enhanced Hadamard Code into three dimensions was first mentioned in [14], and this can enhance the performance of the Hadamard Code.Instead of utilizing basis images, basis cubes (extensions of basis images) might be employed to create a comprehensive Code Book.
A Hadamard cube is created by extending a basis image into the third dimension by the multiplication of the basis image pattern with Hadamard vectors.

Enhanced 3D Hadamard Error-Correcting Code
Diluting the Enhanced Hadamard Code into three dimensions was first mentioned in [14], and this can enhance the performance of the Hadamard Code.Instead of utilizing basis images, basis cubes (extensions of basis images) might be employed to create a comprehensive Code Book.
A Hadamard cube is created by extending a basis image into the third dimension by the multiplication of the basis image pattern with Hadamard vectors.
The basis image is denoted as A ml , while H k (:) represents the k Hadamard vector.As an illustration, consider the pattern A 41 .
With the help of the corresponding Hadamard vector H 2 = [1 − 1 1 − 1], the generation of the cube D 412 could be realized, as shown in Figure 8.
With the help of the corresponding Hadamard vector  = [1 − 1 1 − 1], the generation of the cube D412 could be realized, as shown in Figure 8.The decoding process and the related error correction both function in a similar manner to the correction process outlined in Section 2. Prior to application, the cube is disassembled layer by layer starting from the front side.The upgraded 2D Hadamard decoding algorithm is used on each layer.A simulation was conducted to evaluate and compare the performance of the 3D Hadamard Code with the Standard Hadamard Code of length n = 512.The cubes have dimensions of 8 units in length, 8 units in width, and 8 units in height.Figure 9 displays the results.The decoding process and the related error correction both function in a similar manner to the correction process outlined in Section 2. Prior to application, the cube is disassembled layer by layer starting from the front side.The upgraded 2D Hadamard decoding algorithm is used on each layer.A simulation was conducted to evaluate and compare the performance of the 3D Hadamard Code with the Standard Hadamard Code of length n = 512.The cubes have dimensions of 8 units in length, 8 units in width, and 8 units in height.Figure 9 displays the results.
With the help of the corresponding Hadamard vector  = [1 − 1 1 − 1], the generation of the cube D412 could be realized, as shown in Figure 8.The decoding process and the related error correction both function in a similar manner to the correction process outlined in Section 2. Prior to application, the cube is disassembled layer by layer starting from the front side.The upgraded 2D Hadamard decoding algorithm is used on each layer.A simulation was conducted to evaluate and compare the performance of the 3D Hadamard Code with the Standard Hadamard Code of length n = 512.The cubes have dimensions of 8 units in length, 8 units in width, and 8 units in height.Figure 9 displays the results.

Utilization of Enhanced Hadamard Code in Watermarking Technology and Its Outcomes
Digital watermarking is a promising emerging technique that presents numerous potential applications [15].The issue of safeguarding intellectual property rights for audiovisual data from unauthorized use or tampering can be effectively addressed with the implementation of watermarking technology [16].An essential element is an errorcorrecting code.The error-correcting algorithm employed in the watermarking technique is crucial for the survival of watermarks, particularly when watermarked video sequences are subjected to intense compression.These strategies are chosen to demonstrate the efficacy of an Enhanced Hadamard Error-Correcting Code (EHC).In order to highlight the effectiveness of EHC, it was compared to the widely recognized Reed-Solomon Code [17], itself employed in the identical watermarking scheme.

Proposed Scheme for Embedding Watermarks
The suggested watermarking approach operates in the spectral domain and employs an interframe discrete wavelet transform (DWT) on video sequences [14,18], together with an intraframe discrete cosine transform (DCT) for the embedding process [19,20].Figure 10 provides a comprehensive illustration of the entire encoding process.The original video stream's luminance channel is deconstructed using a multi-level interframe DWT with the Haar wavelet, resulting in a raw format.The video stream is subjected to a block-wise discrete cosine transform (DCT) after being filtered with a low-pass filter.The DCT spectrum is utilized to determine specific coefficients that are then employed in the embedding process with 3D Hadamard-coded watermarks.The embedding mechanism itself is implemented using Quadrature Index Modulation (QIM) techniques [21,22].
ing code.The error-correcting algorithm employed in the watermarking technique is crucial for the survival of watermarks, particularly when watermarked video sequences are subjected to intense compression.These strategies are chosen to demonstrate the efficacy of an Enhanced Hadamard Error-Correcting Code (EHC).In order to highlight the effectiveness of EHC, it was compared to the widely recognized Reed-Solomon Code [17], itself employed in the identical watermarking scheme.

Proposed Scheme for Embedding Watermarks
The suggested watermarking approach operates in the spectral domain and employs an interframe discrete wavelet transform (DWT) on video sequences [14,18], together with an intraframe discrete cosine transform (DCT) for the embedding process [19,20].Figure 10 provides a comprehensive illustration of the entire encoding process.The original video stream's luminance channel is deconstructed using a multi-level interframe DWT with the Haar wavelet, resulting in a raw format.The video stream is subjected to a block-wise discrete cosine transform (DCT) after being filtered with a low-pass filter.The DCT spectrum is utilized to determine specific coefficients that are then employed in the embedding process with 3D Hadamard-coded watermarks.The embedding mechanism itself is implemented using Quadrature Index Modulation (QIM) techniques [21,22].The process of decoding is illustrated in Figure 11.During the decoding process, the embedded video sequence passes through the same multi-level interframe discrete wavelet transform (DWT) and intraframe discrete cosine transform (DCT) as it did during the encoding process.Once the appropriate DCT coefficients have been chosen, the inverse QIM (IQIM) is implemented.The system transmits the deciphered codewords in the form of a pulse The process of decoding is illustrated in Figure 11.During the decoding process, the embedded video sequence passes through the same multi-level interframe discrete wavelet transform (DWT) and intraframe discrete cosine transform (DCT) as it did during the encoding process.
ing code.The error-correcting algorithm employed in the watermarking technique is crucial for the survival of watermarks, particularly when watermarked video sequences are subjected to intense compression.These strategies are chosen to demonstrate the efficacy of an Enhanced Hadamard Error-Correcting Code (EHC).In order to highlight the effectiveness of EHC, it was compared to the widely recognized Reed-Solomon Code [17], itself employed in the identical watermarking scheme.

Proposed Scheme for Embedding Watermarks
The suggested watermarking approach operates in the spectral domain and employs an interframe discrete wavelet transform (DWT) on video sequences [14,18], together with an intraframe discrete cosine transform (DCT) for the embedding process [19,20].Figure 10 provides a comprehensive illustration of the entire encoding process.The original video stream's luminance channel is deconstructed using a multi-level interframe DWT with the Haar wavelet, resulting in a raw format.The video stream is subjected to a block-wise discrete cosine transform (DCT) after being filtered with a low-pass filter.The DCT spectrum is utilized to determine specific coefficients that are then employed in the embedding process with 3D Hadamard-coded watermarks.The embedding mechanism itself is implemented using Quadrature Index Modulation (QIM) techniques [21,22].The process of decoding is illustrated in Figure 11.During the decoding process, the embedded video sequence passes through the same multi-level interframe discrete wavelet transform (DWT) and intraframe discrete cosine transform (DCT) as it did during the encoding process.Once the appropriate DCT coefficients have been chosen, the inverse QIM (IQIM) is implemented.The system transmits the deciphered codewords in the form of a pulse Once the appropriate DCT coefficients have been chosen, the inverse QIM (IQIM) is implemented.The system transmits the deciphered codewords in the form of a pulse stream.The original watermark is extracted using the Enhanced Hadamard Error-Correcting Code.

Multi-Level DWT
The method employed for delivering a low-pass filtered video involved the utilization of a multi-level interframe discrete wavelet transform (DWT) with the Haar wavelet.Figure 12 depicts the operational principle of this transformation.During the initial stage, the two successive frames are combined by calculating their average.In the second level, the frames from the first level are averaged, and this process continues for subsequent levels.In this particular watermarking system, discrete wavelet transform (DWT) levels ranging from 12 to 16 are employed.
The method employed for delivering a low-pass filtered video involved the utilization of a multi-level interframe discrete wavelet transform (DWT) with the Haar wavelet.Figure 12 depicts the operational principle of this transformation.During the initial stage, the two successive frames are combined by calculating their average.In the second level, the frames from the first level are averaged, and this process continues for subsequent levels.In this particular watermarking system, discrete wavelet transform (DWT) levels ranging from 12 to 16 are employed.

Choice of Embedded Coefficients
In order to carry out the embedding process, certain coefficients from the discrete cosine transform (DCT) spectrum of the discrete wavelet transform (DWT)-filtered video sequence need to be chosen.Figure 13 displays the coefficients that meet the criteria for watermarking.Most of these items originate from the yellow region.

Choice of Embedded Coefficients
In order to carry out the embedding process, certain coefficients from the discrete cosine transform (DCT) spectrum of the discrete wavelet transform (DWT)-filtered video sequence need to be chosen.Figure 13 displays the coefficients that meet the criteria for watermarking.Most of these items originate from the yellow region.
tion of a multi-level interframe discrete wavelet transform (DWT) with the Haar wavelet.Figure 12 depicts the operational principle of this transformation.During the initial stage, the two successive frames are combined by calculating their average.In the second level, the frames from the first level are averaged, and this process continues for subsequent levels.In this particular watermarking system, discrete wavelet transform (DWT) levels ranging from 12 to 16 are employed.

Choice of Embedded Coefficients
In order to carry out the embedding process, certain coefficients from the discrete cosine transform (DCT) spectrum of the discrete wavelet transform (DWT)-filtered video sequence need to be chosen.Figure 13 displays the coefficients that meet the criteria for watermarking.Most of these items originate from the yellow region.

Investigation of Robustness with 3D Enhanced Hadamard Error-Correcting Code
The experiment utilized an HDTV video sequence with a resolution of 1080 × 1920 and a frame rate of 25 frames per second.The video was recorded with an AVCHD camera.The watermarking procedure was exclusively carried out on the luminance channel, following the conversion of RGB into the YCrCb color space.This choice was made due to the superior resilience of the luminance channel against distortions compared to other channels.An investigation was conducted to determine the number of embedded watermark bits that remain intact after compression attacks, without generating noticeable degradation.The deterioration of the watermarked output video was quantified using the SSIM (Structural Similarity) index.SSIM relies on the visual perception of the human eye, making it more effective in expressing distortion compared to established approaches such as PSNR (Peak Signal-to-Noise Ratio) or MSE (Mean Square Error) [23].
Here is the description of the coding procedure of watermarks for the luminance channel of HDTV video with a resolution of 1080 × 1920.
The encoder procedure starts after DWT filtering and DCT.The following steps have to be conducted: 1.
Read 10 bits from the watermark.This determines the message word.

2.
According to the Code Book, find the corresponding basic images and the associated codeword.The codeword in this case has a length of 512 bits.
Embed the codeword into the selected coefficients through QIM (Quantization Index Modulation).
The chosen error-correcting code is the Enhanced 3D Hadamard Code with dimensions of 8 × 8 × 8, resulting in a codeword length of 512 bits.According to the explanations in Chapter 2, the message code length is 10 bits.The Hadamard Code is denoted with the expression [codeword, message word, Hamming distance] and can be expressed as 2 m , m + 1, 2 m−1 .The size of each DCT block is 8 × 8, and a total of 16 coefficients are taken from each block.Using this, it is simple to compute the total number of embedded watermark bits for each frame.
The variables H and W represent the height and width of the frame, respectively.The letter B represents the size of the block in the DCT transform.The letter M represents the length of the message code.The letter W represents the length of the codeword in the 3D Hadamard Code, and the letter C represents the number of selected spectral coefficients.
Table 4 displays the findings of the capacity and robustness assessments.The compression assaults were executed using the H.264 codec, with various compression ratios.The approach successfully operates on the unprocessed video, resulting in an original data rate of 1.2 Gbit/s.A checkerboard pattern measuring 30 × 30 pixels was utilized as a watermark.
The watermarks were sequentially put into the frames.The Delta Quantization Index Modulation (QIM) determined the magnitude of the quantization intervals and was adjusted to a value of 11.The Delta value typically indicates the level of noise distortion present in the host video.
The video series was compressed using varying compression ratios.Even when compressed to 5 Mbit/s, which has a compression ratio of 1:240, it is still possible to recover all watermarks without any errors.The quality comparison between the originally compressed video and the embedded and compressed version reveals only a minimal change.The SSIM index for the video in this example is 98%.

An Analysis of the 3D Enhanced Hadamard Code Compared to the Reed-Solomon Code
A comparative analysis was conducted to demonstrate the efficacy of the Enhanced Hadamard Code (EHC) by comparing it with the widely recognized Reed-Solomon Code.The Reed-Solomon Code is widely recognized as an error-correcting code and is extensively utilized in many consumer electronics applications such as CDs, DVDs, Blu-rays, QR Codes, and data transmissions.
In order to achieve comparability between the Reed-Solomon Code and the Enhanced Hadamard Code, it is necessary to provide two parameters: the symbol length and the level of redundancy.The symbol length, also known as the block length, is equivalent to a 9-bit message.The 3D Enhanced Hadamard Code utilizes a Code Book in which each 9-bit message is assigned a 512-bit codeword represented by a cube.The Reed-Solomon Code utilizes a Code Book in which each 9-bit message is associated with a string of 4599 bits.This string consists of 512 symbols, with each symbol being 9 bits in length.The Reed-

Figure 5
Figure5shows an image that has been distorted by noise.The error matrix in question comprises a total of 17 errors, which surpasses the predetermined threshold of 15 errors.

Figure 5
Figure5shows an image that has been distorted by noise.The error matrix in question comprises a total of 17 errors, which surpasses the predetermined threshold of 15 errors.

Figure 5
Figure5shows an image that has been distorted by noise.The error matrix in question comprises a total of 17 errors, which surpasses the predetermined threshold of 15 errors.

Figure 6
Figure 6 illustrates the operational capabilities of the improved Hadamard decoding technique.

Figure 5 .
Figure 5. Original Basis Image A 41 , Error Mask, and Corrupted Pattern.

Figure 6
Figure 6 illustrates the operational capabilities of the improved Hadamard decoding technique.

Figure 5
Figure5shows an image that has been distorted by noise.The error matrix in question comprises a total of 17 errors, which surpasses the predetermined threshold of 15 errors.

Figure 6
Figure 6 illustrates the operational capabilities of the improved Hadamard decoding technique.

Figure 6 .
Figure 6.Enhanced Hadamard Decoding Procedure on Error Mask and on Corrupted Basis Image.

Figure 7 .
Figure 7.Comparison of error-correcting capabilities between the Standard Hadamard Code (shown with the dashed line) and the 8 × 8 2D Enhanced Hadamard Code.

Figure 7 .
Figure 7.Comparison of error-correcting capabilities between the Standard Hadamard Code (shown with the dashed line) and the 8 × 8 2D Enhanced Hadamard Code.

Figure 9 .
Figure 9.Comparison of error-correcting capabilities between the Standard Hadamard Code (ablue line) and the 3D Enhanced Hadamard Code (b-black line).

Figure 9 .
Figure 9.Comparison of error-correcting capabilities between the Standard Hadamard Code (ablue line) and the 3D Enhanced Hadamard Code (b-black line).

Figure 9 .
Figure 9.Comparison of error-correcting capabilities between the Standard Hadamard Code (a-blue line) and the 3D Enhanced Hadamard Code (b-black line).

Figure 12 .
Figure 12.The Multi-Level Interframe Discrete Wavelet Transform (DWT).At the initial stage, the two successive frames are combined by taking their average.At level two, the frames from level one are averaged consecutively and this process continues.

Figure 12 .
Figure 12.The Multi-Level Interframe Discrete Wavelet Transform (DWT).At the initial stage, the two successive frames are combined by taking their average.At level two, the frames from level one are averaged consecutively and this process continues.

Figure 12 .
Figure 12.The Multi-Level Interframe Discrete Wavelet Transform (DWT).At the initial stage, the two successive frames are combined by taking their average.At level two, the frames from level one are averaged consecutively and this process continues.

Figure 13 .
Figure 13.Selected coefficients of the DCT spectrum are presented in yellow.

Table 2 ,
the corresponding message word of the third row is [0 1 0].

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 3 .
Part of the Code Book for

Table 4 .
Results of watermark measurements.

Table 4 .
Results of watermark measurements.

Table 4 .
Results of watermark measurements.

Table 4 .
Results of watermark measurements.

Table 4 .
Results of watermark measurements.

Table 4 .
Results of watermark measurements.