# Imperceptible-Visible Watermarking to Information Security Tasks in Color Imaging
## 3 Proposed Framework  
In the new improved IVW algorithm, a watermark pattern with several characteristics such as owner logotype or QR code can be embedded to provide in color copyright  
Figure 4: Histogram of the watermarked region. (**a**) Histogram of the watermarked region by Equation (2), (**b**) histogram of the watermarked region by Equation (3). Figure 5: Histogram of the watermarked region by Equation (5). minimalize the visual degradation, instead of using a smoothing operation, the pixels with the most dispersed values are selected, and its values are replaced by others nearest to the mean value \(\mu^{*}\); this strategy minimizes the variance and homogenizes the embedding region; empirical analysis shows that 10% of the pixels in \(R\) can be used without affecting the visual content. 2. Appropriate color channel selection. Once the largest homogeneous region \(R\) is obtained, an appropriate color channel is selected to embed the corresponding watermark \(W\). According to the previously mentioned, the mean values of each color channel of the embedding region in an \(RGB\) color model (\(\mu_{RR}\), \(\mu_{RG}\), and \(\mu_{RB}\)) are obtained by Equation (10), and the appropriate color channel must satisfy Equation (11); for example, if the optimal mean value is satisfied by \(\mu_{R}=\mu_{RG}\), in which \(\mu_{RG}\) is the minimum or maximum mean value, the appropriate color channel corresponds to the green one. \[\left\{ \begin{array}{l}\mu_{RR}=\frac{1}{M\times N}\sum\limits_{i=1}^{M\times N }R_{R}(p_{i}),\\ \mu_{RG}=\frac{1}{M\times N}\sum\limits_{i=1}^{M\times N}R_{G}(p_{i}),\\ \mu_{RB}=\frac{1}{M\times N}\sum\limits_{i=1}^{M\times N}R_{B}(p_{i}),\end{array} \right.\] (10) \[\mu_{R}=\left\{ \begin{array}{l}\min(\mu_{RR},\ \mu_{RG},\ \mu_{RB}),\ \ if\ \min(\mu_{RR},\ \mu_{RG},\ \mu_{RB}) \geq JNDL(\min(\mu_{RR},\ \mu_{RG},\ \mu_{RB})),\\ \max(\mu_{RR},\ \mu_{RG},\ \mu_{RB}),\ \ otherwise,\end{array} \right.\] (11) where JNDL(x) corresponds to luminance-based JND [29; 30]. 3. Embedding strategy. In the proposed algorithm, the empirical embedding strength \(T\) is improved by the just noticeable difference (JND), which represents the maximum luminance variation perceived by the HVS [29; 30]. In the literature, several JND algorithms in the spatial and frequency domain have been reported to estimate a numerical value [30; 31]. Its use is typically defined by the application [31; 32; 33; 34], which in the proposed algorithm concerns the image watermarking. An embedding strength that allows embedding imperceptibly a visible watermark pattern is required; in this way, the JNDL function [29] is considered to estimate the embedding strength and ensure the watermark imperceptibility of the new improved IVW algorithm. Thus, if the appropriate color channel to embed the watermark pattern depends on ensuring that the largest homogeneous region \(R\) has a variance value nearest to 0, the JNDL-based embedding strength can be obtained with respect to the corresponding mean value \(\mu_{R}\), as shown in Equation (12). \[JNDL(\mu_{R})=\left\{ \begin{array}{l}-\frac{1}{8}\mu_{R}+6,\ \ \ \ \ \ \ \mu_{R}\in(0,32)\\ -\frac{1}{32}\mu_{R}+3,\ \ \ \ \ \mu_{R}\in(33,64)\\ \frac{1}{96}\mu_{R}+\frac{1}{3},\ \ \ \ \ \ \mu_{R}\in(65,255)\end{array} \right.,\ \ 0\leq\mu_{R}\leq 255.\] (12)  
Once the largest homogeneous and its appropriate color channel are selected, an embedding strategy based on the JNDL is adopted to embed imperceptibly the binary watermark \(W\). The embedding strategy is given by two ways given by Equations (13) and (14), which are satisfied when \(\mu_{R}=\min(\mu_{RR},\ \mu_{RG},\ \mu_{RB})\) or \(\mu_{R}=\max(\mu_{RR},\ \mu_{RG},\ \mu_{RB})\), respectively. \[R_{w}(p_{i})=\left\{ \begin{array}{l}\max(0,\mu_{R}-\Delta),\ \ if\ w_{i}=0\,\\ \min(\mu_{R},255),\ \ \ \ otherwise\,\end{array} \right. \tag{13}\]  
\[R_{w}(p_{i})=\left\{\begin{array}{l}\max(0,\mu_{R}),\\(\mu_{R}\).