## 3 Main Scheme
### Algorithm III. Meaningful Shares Scheme
Repeat Steps 1-4 until all pixels are processed in \(n\) meaningful shares, then return\(M_{0},M_{1},\ldots,\ M_{n-1}\). ```  
**Algorithm 3** [Method 1] **Average encryption**  
The time complexity of Method 1 is \(O(wln)\). Next, we will list some experimental results to better understand each of our proposed methods. Figure 5 shows two secret images, and five camouflage images used in the following experiments, and Figure 6 shows the experimental results of Method 1. The size of each image is 720 \(\times\) 720 pixels. In Method 1, the white part of the secret images in the restored images are affected by the camouflaged images. Therefore, in order to remove the influence of the camouflage images, we make the pixels involved in camouflage appear black when restored in Method 2: Enhanced encryption. Algorithm 4 shows Method 2 as follows. ```
Input:\(N\) secret images \(S_{0},\ S_{1},\ \ldots,\ S_{N-1}\), \(n\) meaningless shares \(C_{0},\ C_{1},\ \ldots,\ C_{n-1},\ n\) camouflage images \(D_{0},\ D_{1},\ \ldots,\ D_{n-1}\), all of them with size \(w\times h\), and a positive integer \(p\). Output:\(n\) meaningful shares \(M_{0},\ldots,\ M_{n-1}\) with size \(w\times h\). 1. Let \(X=\left\lceil n/2\right\rceil\), \(Y=\left\lceil n/2\right\rceil\), and randomly select a pixel \((i,j)\{0\leq i\leq w,\ 0\leq j\leq h\}\). 2. \(Z=\text{random}\ (0,\ N-1)\). 3. Define a number \(d=\text{random}\ (0,\ 1)\), which is \(1\) with probability \(\gamma\). 4. If\(d=0\)then For\(k=0\)to\(p\)do For\(r=0\)to\(n-1\)do \(M_{r}((i+k\times w/p)\ \%\ w,j)=C_{r}((i+k\times w/p)\ \%\ w,j)\). else For\(k=0\)to\(p\)do For\(r=0\)to\(n-1\)do \(M_{r}((i+k\times w/p)\ \%\ w,j)=D_{r}((i+k\times w/p)\ \%\ w,j)\). For\(k=0\)to\(p\)do If\((M_{0}((i+k\times w/p)\%w,\ j)\oplus...\ \oplus M_{X-1}((i+k\times w/p)\% w,\ j) \oplus...\ \oplus M_{N-1}((i+k\times w/p)\% w,\ j)\oplus...\ \oplus M_{n-1}((i+(k+Z)\times w/p)\% w,\ j)\
eq 1)\), then  Let\(f=\text{random}(0,\ n-1)\). If\((f<X)\)then \(M_{f}((i+k\times w/p)\ \%\ w,\ j)=\overline{M_{f}((i+k\times w/p)\ \%\ w,\ j)}\). else \(M_{f}((i+(k+Z)\times w/p)\ \%\ w,\ j))=\overline{M_{f}((i+(k+Z)\times w/p)\ \%\ w,\ j)}\). 5. Repeat Steps 1-4 until all pixels are processed in \(n\) meaningful shares, then return\(M_{0},M_{1},\ldots,\ M_{n-1}\). Figure 5: (a,b) Secret images \(S_{0}\), \(S_{1}\), (c–g) Camouflage images \(D_{0}\), \(\ldots,D_{4}\). Figure 6: Experimental results by Method 1 for (5, 5) with \(p=45,\ \gamma=0.5\). (a,b) Restored images \(R_{0}\), \(R_{1}\), (c–g) Shares \(M_{0}\), \(\ldots,M_{4}\). The difference between Method 1 and Method 2 is the change in statement in Step 4, so the time complexity of Method 2 is still \(O(whn)\). Figure 7 shows the flow chart of Method 2 Steps 1-4, and Figure 8 shows the experimental results of Method 2. Next, we introduce Method 3: Favor encryption, which focuses on encrypting the first secret image so that the first secret image is as completely restored as possible. In Methods 1 and 2, although each recovered image is partially recoverable, the chance of each secret being chosen to be recoverable decreases as the number of \(N\) increases. Sometimes the user needs to specify that a certain secret image has a higher restored visual quality. We propose Method 3 to solve this problem, and the restoration of this image is as good as in Algorithm 1. However, other unselected secret images will be slightly less recovered. Algorithm 5 shows Method 3 as follows. The difference between Method 3 and the previous two methods is that we delete the previous Step 2 and modify Step 3. The time complexity of Method 3 is also \(O(whn)\). The flow chart of Method 3 Steps 1-3 is shown in Figure 9, and the experimental results of Method 3 is illustrated in Figure 10.

Figure 8: Experimental results by Method 2 for (5, 5) with \(p=45,\ \gamma=0.5\). (**a**,**b**) Restored images \(R_{0}\), \(R_{1}\) (**c**–**g**) Shares \(M_{0},\ldots,M_{4}\). Figure 7: The flow chart of Method 2 Steps 1–4. **Algorithm 5.