# A Robust and Secure Watermarking Approach Based on Hermite Transform and SVD-DCT
## 4 Proposed HT, DCT, and SVD and Block-Based Watermarking Method
### Watermarking Extraction Process  
Since the watermarking approach is symmetric, the extraction stage is similar to the process shown in Figure 10, with the only change that the inverse operations are applied. Thus, the steps of extracting both the LOGO and the plaintext MetaData from the watermarked image are explained next:  
* SVD-based extraction process:
* Perform the Hermite transform decomposition to \(I(x,y)_{\text{marked}}\).
* Select the low-spatial-frequency Hermite coefficient \(M=I_{0,0}\).
* Divide \(M\) into blocks of size \(4\times 4\), obtaining the multidimensional array \(B\) composed of \(L\) blocks.
* Apply the DCT to each block of \(B\), obtaining \(C=\text{DCT}\{B\}\).
* Extract the matrices \(W_{1}\) and \(W_{2}\) using the SVD-based Algorithm 2.
* LOGO image extraction:
* Convert array \(W_{1}\in\mathbb{R}^{1\times L_{bin}}\) into a matrix \(W_{A}\in\mathbb{R}^{k_{1}\times k_{2}}\).
* Decrypt \(idx_{JS}\) through the inverse ECA using \(\text{key}_{2}=\left[\begin{smallmatrix}N_{\text{line}}\\ k\end{smallmatrix}\right]\), obtaining \(idx_{JS}\) indexes.
* Apply the inverse JST to \(W_{A}\) using \(idx_{JS}\) indexes to obtain the LOGO image.
* Image MetaData extraction:
* Remove the extra zeros of \(W_{2}\in\mathbb{R}^{1\times L_{bin}}\) to obtain the array \(W_{2}^{\prime}\in\mathbb{R}^{1\times P}\).
* Perform the bitwise operation between \(W_{2}^{\prime}\) and \(\text{key}_{3}\) to obtain \(V_{H}\): \[V_{H}=(W_{2}^{\prime})\text{XOR}(\text{key}_{3}).\] (22)
* Decode \(V_{H}\) using the \((7,4)\) Hamming code to obtain the binary array \(V\).
* Convert the binary array \(V\) to an alphanumeric array, obtaining the the image MetaData as a character string.
```
Input:\(C\in\mathbb{R}^{4\times 4\times L}\), \(\text{idx}_{HVS}\in\mathbb{R}^{1\times L}\), \(\alpha\) and \((\text{U}IM_{1,2},\text{V}M_{1,2},\text{U}M_{4,2},\text{V}M_{4,2},\text{U}M_{2, 2},\text{V}M_{2,2},\text{U}M_{3,2},\text{V}M_{3,2})\in\) \(\mathbb{R}^{2\times 2\times L_{\text{diag}}}\) Output:\(W_{1}\in\mathbb{R}^{1\times L_{\text{diag}}}\) and \(W_{2}\in\mathbb{R}^{1\times L_{\text{diag}}}\) /* Watermarks' output arrays' initialization \(W_{1}\) and \(W_{2}\): */ \(W_{1}\leftarrow[0]_{1\times L_{\text{diag}}}\); \(W_{2}\leftarrow[0]_{1\times L_{\text{diag}}}\); /* Counter initialization: */ \(j\gets 1\); while\(j\leq L_{\text{diag}}\)do /* Reading the HSV indexes: */ \(i\leftarrow\text{idx}_{HVS}(j)\); /* Reading each marked block: */ \(\text{temp}\gets C\{i\}\);  Divide \(\text{temp}\in\mathbb{R}^{4\times 4}\) into four sub-blocks of \(2\times 2\): \(\text{temp}\leftarrow\left[\begin{smallmatrix}b_{1}&b_{2}\\ b_{3}&b_{4}\end{smallmatrix}\right]\); /* First singular-value decomposition: */ \([U_{dummy},SE_{1,2},V_{dummy}]\gets SVD(b_{1})\); \([U_{dummy},SE_{2,2},V_{dummy}]\gets SVD(b_{2})\); \([U_{dummy},SE_{3,2},V_{dummy}]\gets SVD(b_{3})\); \([U_{dummy},SE_{4,2},V_{dummy}]\gets SVD(b_{4})\); /* Sub-block \(b_{1}\): */ \([U_{dummy},SE_{1,1},V_{dummy}]\gets SVD(SE_{1,2})\); \(W_{1}\gets UIM_{1,2}\{i\}*SE_{1,2}*VM_{1,2}\{i\}^{\top}\); /* \(W_{r1}\leftarrow(W_{r1}-SE_{1,1})/\alpha\); /* Sub-block \(b_{4}\): */ \([U_{dummy},SE_{4,1},V_{dummy}]\gets SVD(SE_{4,2})\); \(W_{4}\gets UIM_{4,2}\{i\}*SE_{4,2}*VM_{4,2}\{i\}^{\top}\); \(W_{r4}\leftarrow(W_{4}-SE_{4,1})/\alpha\); /* Extracting \(W_{1}\): */ if\(\sum_{x,y}\left(W_{r1}\right)\
eq 0\ OR\sum_{x,y}\left(W_{r4}\right)\
eq 0\)then \(W_{1}\{j\}\gets 255\);  end if /* Sub-block \(b_{2}\): */ \([U_{dummy},SE_{2,1},V_{dummy}]\gets SVD(SE_{2,2})\); \(W_{l2}\gets UIM_{2,2}\{i\}*SE_{2,2}*VM_{2,2}\{i\}^{\top}\); \(W_{r2}\leftarrow(W_{l2}-SE_{2,1})/\alpha\); /* Sub-block \(b_{3}\): */ \([U_{dummy},SE_{3,1},V_{dummy}]\gets SVD(SE_{3,2})\); \(W_{l3}\gets UIM_{3,2}\{i\}*SE_{3,2}*VM_{3,2}\{i\}^{\top}\); \(W_{r3}\leftarrow(W_{l3}-SE_{3,1})/\alpha\); /* Extracting \(W_{2}\): */ if\(\sum_{x,y}\left(W_{r2}\right)\
eq 0\ OR\sum_{x,y}\left(W_{r3}\right)\
eq 0\)then \(W_{2}\{j\}\gets 1\);  end if /* Increment counter: */ \(j\gets j+1\);  end while
```  
**Algorithm 2**SVD-based extraction algorithm.