## 2 Our Proposed Methods
### Concurrent Image Conversion and Adaptive Message Embedding
In addition, the overall real embedding rate is always larger than the one requested by the end user, yet our scheme ensures determining an optimal base, thereby producing a stego image with the minimal expected mean squared error. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & & & & & & & & & & & & & & \\ \hline \(P_{E}\) & \(N_{P_{E}}\) & \(F\) & \(M_{P_{E}}\) & \(b_{R}\) & \(b_{G}\) & \(b_{B}\) & \(EMSE(B)\) & \(F\) & \(M_{P_{E}}\) & \(b_{R}\) & \(b_{G}\) & \(b_{B}\) & \(EMSE(B)\) \\ \hline \(\leq\)119 & 0 & - & - & - & - & - & - & - & - & - & - & - \\
120 & 1 & 10,086 & 10,143 & 21 & 21 & 23 & 39.111 & 32,768 & 32.768 & 32 & 32 & 32 & 32 & 85.500 \\
121 & 1380 & 5043 & 5202 & 17 & 17 & 18 & 25.056 & 16,384 & 16,875 & 25 & 25 & 27 & 54.889 \\
122 & 15,766 & 2523 & 2535 & 13 & 13 & 15 & 15.556 & 8192 & 8400 & 20 & 20 & 21 & 34.556 \\
123 & 24,177 & 1261 & 1331 & 11 & 11 & 10.000 & 4096 & 4096 & 16 & 16 & 16 & 21.500 \\
124 & 38,229 & 631 & 576 & 8 & 9 & 9 & 6.278 & 2048 & 2197 & 13 & 13 & 13 & 14.000 \\
125 & 77,910 & 316 & 343 & 7 & 7 & 7 & 4.000 & 1024 & 1100 & 10 & 10 & 11 & 9.000 \\
**126** & **108,287** & **158** & **175** & **5** & **5** & **7** & **2.667** & **512** & **512** & **8** & **8** & **8** & **5.500** \\
127 & 79,791 & 79 & 80 & 4 & 4 & 5 & 1.667 & 256 & 294 & 6 & 7 & 7 & 3.722 \\
128 & 26,106 & 40 & 45 & 3 & 3 & 5 & 1.111 & 128 & 150 & 5 & 5 & 6 & 2.389 \\
129 & 9609 & 20 & 27 & 3 & 3 & 3 & 0.667 & 64 & 64 & 4 & 4 & 1.500 \\
130 & 3231 & 10 & 12 & 2 & 2 & 3 & 0.556 & 32 & 36 & 3 & 3 & 4 & 0.944 \\
131 & 1819 & 5 & 6 & 1 & 2 &  
* **Step 4:** Message decomposition. Given a general \(n\)-tuple optimal base \(\mathbf{B}=(b_{1},\ b_{2},\ \dots,\ b_{n})\) and an M-ary secret message, \(S_{M}\), where \(M=\prod_{i=1}^{n}b_{i}\), we can decompose \(S_{M}\) into \(n\) secret digits \((d_{1},\ d_{2},\ \dots,\ d_{n})\) using Equation (5): \[d_{i}= \begin{cases}S_{M}\ mod\ b_{i},&\text{if}\ i=1\\ \left\lfloor\frac{S_{M}}{\prod_{j=1}^{i-1}b_{j}}\right\rfloor\ mod\ b_{i},& \text{if}\ 2\leq i\leq n\end{cases} \] (5)  
In this paper, we produce a 3-tuple optimal base \(\mathbf{B}=(b_{R},\ b_{G},\ b_{B})\), so we set \(n=3\) in Equation (5) to decompose an \(M_{P_{E}}\)-ary secret message, \(S_{M_{P_{E}}}\), into three digits, \((d_{1},\ d_{2},\ d_{3})\). As an example, given \(\mathbf{B}=(5,\ 5,\ 7)\) and a 175-ary secret message, \(S_{175}=89\), we can decompose 89 into 3 digits as follows. First, we let \(i=1\) and derive \(d_{1}=89\ mod\ 5=4\). Next, we derive \(d_{2}=\left\lfloor\frac{89}{5}\right\rfloor mod\ 5=2\). Finally, \(i=3\), we obtain \(d_{3}=\left\lfloor\frac{89}{5\times 5}\right\rfloor mod\ 7=3\). Consequently, the three digits decomposed by \(\mathbf{B}=(5,\ 5,\ 7)\) are \((d_{1},\ d_{2},\ d_{3})=(4,\ 2,\ 3)\). * **Step 5:** Message embedding. Once we have obtained \((d_{1},\ d_{2},\ d_{3})\), we can embed them into \((P_{R},\ P_{G},\ P_{B})\) by the aid of the optimal base \((b_{R},\ b_{G},\ b_{B})\), thus producing a 3-tuple stego pixel components,\((P_{R}^{\prime},\ P_{G}^{\prime},\ P_{B}^{\prime})\). The concept of embedding \((d_{1},\ d_{2},\ d_{3})\) is producing \((P_{R}^{\prime},\ P_{G}^{\prime},\ P_{B}^{\prime})\) so that three digits can later be extracted using the modulus operator. In addition, we need to minimize the distortion, \(\left|(P_{R}^{\prime},\ P_{G}^{\prime},\ P_{B}^{\prime})-(P_{R},\ P_{G},\ P_{B})\right|\), caused by the message embedding. We take the component \(P_{R}\) and the digit \(d_{1}\) as an example to illustrate the digit embedding, which utilizes Equations (6)-(8) to produce the stego component \(P_{R}^{\prime}\): \[r_{R}=P_{R}\ mod\ b_{R}\] (6) \[v_{R}=\left[(d_{1}-r_{R})+b_{R}\right]\ mod\ b_{R}\] (7) \[P_{R}^{\prime}= \begin{cases}P_{R},&\text{if}\ v_{R}=0\\ P_{R}+v_{R},&\text{if}\ 0<v_{R}<\left\lfloor\frac{b_{B}}{2}\right\rfloor\\ P_{R}+v_{R}-\ b_{R},&\text{if}\ \left\lfloor\frac{b_{B}}{2}\right\rfloor\leq v_{R}<b_{R} \end{cases}