1 Introduction

Along with the rapid development of Internet and universal application of multimedia technology, multimedia data including audio, image, and video have been transmitted over insecure channels. In particular, the use of images is an ascending need because it is the main data information provided by most of the advanced sensors of today like infrared cameras, optical cameras, millimeter wave cameras, radar images, X-ray images, etc. In order to maintain security or privacy, digital images need to be protected before transmission or distribution. Secret sharing scheme (SSS) and information hiding are two important methods to protect secret. Herein, we review part of them that is relevant to the present work.

In recent years, secret image sharing techniques have attracted considerable attention to scientists and engineers as another branch alongside conventional cryptography to protect sensitive images from rapacious behaviors. It distributes a secret image among some participants through splitting the secret image into noise-like pieces (also called shares, stego-images or shadow images, are the images that already carried secret after sharing) and recovering the secret by collecting sufficient authorized participants (shadow images).

Until now, various SSSs [14] for digital images have been developed in order to promote communication security. The literature on secret image sharing is quit rich. Shamir’s polynomial-based schemes and visual secret sharing (VSS), that is also called visual cryptography scheme (VCS), are the primary branches in this field. Some approaches [58] realize the secret image sharing based on Shamir’s polynomial and Lagrange interpolation, and they have the properties of (\(k,\, n)\) threshold, meaningful shadow images, lossless recovery, and no pixel expansion.

Shamir [1] introduced an SSS called a (\(k, n)\) threshold scheme. The (\(k,\, n)\) (\(k \le n)\) threshold secret sharing mechanism, also called threshold-based VCS, is to partition the secret information into \(n\) shares and share them among \(n\) participants and needs at least \(k\) shares to recover the secret information. Notably, less than \(k\) participants cannot reveal any information of the secret image by inspecting their shares. The main merits of the VCS proposed by Naor and Shamir are simple recovery, which is the decryption of secret image is completely based on human visual system (HVS) without any additional computation, and alternative order of the shadow images. However, it suffers from meaningless shadow images, lossy recovery, and pixel expansion [2, 3]. Based on the pioneer work of Naor and Shamir, many schemes [915] have been developed to overcome the above disadvantages. The previous schemes based on traditional visual cryptography (VC) have the properties of (\(k,\, n)\) threshold, simple computation complexity, and alternative order of shadow images.

However, Shamir’s polynomial-based approaches suffer from complex recovery and known order of the shadow images. In addition, most of the previous schemes based on traditional VC suffer from pixel expansion, lossy recovered secret image, and low quality of shadow images.

Information hiding technique is another important method to protect secret information. It uses redundant data and random component of carriers (called cover images if images are selected, cover images are the selected original images that are used to cover secret but not carry secret), such as image [16, 17] and video [18], to embed secret messages into the carrier through the way that could not be perceptible. It has properties of meaningful shadow images, no pixel expansion, and lossless recovery. However, it suffers from no (\(k,\, n)\) threshold.

Recently, in [3], Wu et al. have proposed (\(n,\, n)\) threshold scheme via combining Arnold permutation, error diffusion, and Boolean operation. And, in [4], Li et al. have proposed a visual sharing (\(k,\, n)\) scheme via combining Arnold permutation, error diffusion, and maximum likelihood estimation (MLE). In the two schemes, error diffusion technology is applied to generate meaningful shadow images, and Arnold Permutation technology to improve the security and make the shadow images as homogeneously as possible. Both of them satisfy simple recovery computation, alternative order of shadow images in recovery, meaningful shadow images, lossless recovery of binary secret image, avoiding the pixel expansion, and (\(n,\, n)\) or (\(k,\,n)\) threshold. However, the two schemes suffer from the low quality of shadow images and complex generating computation of shadow images for applying error diffusion and permutation technologies.

In this paper, we propose two different secret image sharing schemes, (\(n_1 ,n_1 )\) and (\(k,n_2 )\) thresholds, based on least significant bits matching (LSBM). LSBM is applied in the proposed two SSSs to improve the visual quality of shadow images and decrease the computational complexity by combining Boolean operations and MLE instead of error diffusion technology in [3, 4], respectively. The proposed two schemes have several advantages, such as simple generation and recovery computation, alternative order of shadow images in recovery, meaningful shadow images, lossless recovery of binary secret image, and avoiding the pixel expansion. In another aspect, they have better quality and lower computation. Experimental results show the feasibility and effectiveness of the proposed schemes.

The outline of this paper is as follows. In Sect. 2, the related preliminaries are given. The proposed schemes are presented in Sect. 3. Section 4 is devoted to experimental results and analysis. Finally, Sect. 5 concludes this paper.

2 Preliminaries

This section introduces the related methods applied in the proposed schemes.

2.1 LSBM

LSBM is an effective steganographic method [1922]. LSBM checks whether the secret bit matches the least significant bit (LSB) value of the cover image pixels. If not, then there is a random increment/decrement, as in Eq. (1), of the value of the cover image pixel (\(C_p )\), otherwise the pixel value remains unmodified.

$$\begin{aligned} SC_p = \left\{ \begin{array}{l} C_p +1\quad \text{ if } \text{ random }>0\;\text{ or }\;C_p =0 \\ C_p -1\quad \text{ if } \text{ random }\le 0\;\text{ or }\;C_p =255 \\ \end{array} \right. \end{aligned}$$
(1)

where \(random\) is a random number ranging from \(-1\) to 1. \(SC_p \)denotes the modified pixel of the shadow image.

2.2 MLE

MLE is one kind of estimation the parameters of a statistical model. MLE seeks the parameter values that are most likely to have produced the observed distribution. It begins with the mathematical expression known as a likelihood function of the sample data. Clearly, the likelihood of a set of data is the probability of obtaining that particular set of data given the chosen probability model [23]. This expression contains the unknown parameters. Those values of the parameter that maximize the sample likelihood are known as the MLE. Figure 1 is an example for the MLE decoding. By MLE, we decode 00011\(\rightarrow \) 0. But if only 4 bits are received, such as 0011, it could not decode by MLE.

Fig. 1
figure 1

Example of MLE decoding

3 The proposed schemes

In this section, a (\(n_1 ,n_1 )\, (n_1 \ge 3,n_1 \in Z^{+})\) SSS with enhanced quality is first introduced. In this approach, the binary secret image is shared among \(n_1 \) grayscale cover images. Then, a (\(k,n_2 ) \,(3\le k\le n_2 ,\;n_2 \in Z^{+},k\in 2Z^{+}+1)\) scheme is presented applying MLE, and the secret image is recovered from \(k\) shadow images. The proposed (\(n_1 ,n_1 )\) scheme based on Boolean operation has better shadow images quality and security, but not a general (\(k,n_2 )\) threshold scheme. While the proposed (\(k,n_2 )\) scheme based on MLE has general (\(k,n_2 )\) threshold scheme, good quality of shadow images, and acceptable security.

The binary secret image is denoted as \(S\) with pixel value \(S(i,\,j)\). Here, \(S\) is the sharing secret image. The source grayscale cover images are denoted as \(C_p ,1\le p\le n\left( {n_1 \;or\;n_2 } \right) ,p\in Z^{+}\). The shadow images are denoted as \(SC_p \). Assume \(t_{k}\) is the least equal bits number in the same location for \(k\) shadow images, that could be decoded correctly in recovering phase based on MLE, \(t_{n_2 } \) is for \(n_2 \) shadow images in sharing phase.

3.1 (\(n_1 ,n_1\)) scheme

In this section, we propose (\(n_1 ,n_1 )\) threshold SSS. (\(n_1 ,n_1 )\) threshold means that the secret image is shared among \(n_1 \) cover images and collecting \(n_1 \) shadow images to recover the secret image. The generation architecture is shown in Fig. 2, and the algorithms of generation and recovery of the (\(n_1 ,n_1 )\) scheme are given in Algorithms 1 and 2 as below.

Fig. 2
figure 2

Shadow images generation architecture of proposed (\(n_1 ,n_1 )\) scheme

figure a
figure b

3.2 (\(k,n_2\)) scheme

(\(k,n_2 )\) threshold means that the secret image is shared among \(n_2 \) cover images and collecting at least \(k\) shadow images to recover the secret image. The MLE theory analysis of the proposed LSBM (\(k,n_2 )\) scheme is described as follows.

First, since from Fig. 1 \(k\) should be odd, \(t_k \) should be greater than \(\frac{k}{2}\) for decoding correctly; hence, Eq. (2) should be satisfied to perform MLE, and \(k\) LSBs of shadow images could be decoded correctly if Eq. (3) satisfies. In the extreme case (in the recovered phase with \(k\) shadow images, another \(n_2 -k\) shadow images will not be used), the number of lost LSBs of shadow images \(n_2 -k\) is equal to the change number of the determinant number (\(t_{n_2 } -t_k )\) to ensure correct decoding as shown in Eq. (4). Based on Eqs. (24), we obtain Eq. (5).

$$\begin{aligned}&\! k\in 2Z^{+}+1,n_2 \in Z^{+},k\le n_2\end{aligned}$$
(2)
$$\begin{aligned}&\! t_k =\left\lceil {\frac{k}{2}} \right\rceil \end{aligned}$$
(3)
$$\begin{aligned}&\! n_2 -k=t_{n_2 } -t_k \end{aligned}$$
(4)
$$\begin{aligned}&\! t_{n_2 } =\left\lceil {n_2 -\frac{k}{2}} \right\rceil , \quad t_{n_2 } ,n_2 \in Z^{+},k\in 2Z^{+}+1,k\le n_2 \nonumber \\ \end{aligned}$$
(5)

The generation architecture is shown in Fig. 3, and the algorithms of generation and recovery of the (\(k,n_2 )\) scheme are given in Algorithms 3 and 4 as below.

Fig. 3
figure 3

Shadow images generation architecture of proposed (\(k,n_2 )\) scheme

Fig. 4
figure 4

Images illustration of proposed (2, 2) scheme

figure c
figure d

3.3 Remarks

Here, we remark some insights gleaned from the schemes in Table 1.

Table 1 Insights gleaned from the proposed schemes

4 Experimental results and analysis

In this section, we have conducted experiments and analysis to evaluate the effectiveness of the proposed schemes. First, the images are illustrated to show the effectiveness of the schemes. Then, the comparisons of the proposed schemes with related schemes are presented, especially [3, 4] since the two proposed schemes are the improvements of these schemes. In addition, schemes in [3, 4] have good features in SSS, such as alternative order of shadow images in recovery, meaningful shadow images, lossless recovery of binary secret image, avoiding the pixel expansion, (\(n,\,n)\) or (\(k,\,n)\) thresholds, and so on.

Herein, average flipping rate (AFR) [24], histogram similarity (HS), and normalized correlation (NC) [2527] are used to evaluate the quality of the shadow images and to be the similarity measurement between the original grayscale cover images and the shadow images.

The binary secret image and standard grayscale images with size \(256\times 256\) are used to test the efficiency of the proposed schemes.

4.1 Image illustrations and HS of the proposed schemes

4.1.1 (\(n_1 ,n_1\)) scheme

In the experiments, we use (\(2, 2\)) threshold to test the efficiency of the proposed (\(n_1 ,n_1 )\) scheme. One binary secret image and two grayscale images are used as the cover images as shown in Fig.  4a–c. Figure 4e, f show the corresponding two shadow images. From HVS we cannot see the difference between the original grayscale cover images and the shadow images, the visual quality of the shadow images will be evaluated detailedly later. The recovered secret binary image with the two shadow images is shown in Fig. 4d, and it is the same as the binary secret image. The recovered secret image is lossless, since mean square error (MSE), as shown in Eq. (6), of Fig. 4a, d is equal to 0.

MSE, Eq. (6), is used to measure the mean square error between the cover image and shadow image.

$$\begin{aligned} MSE=\frac{1}{M\times N}\sum _{i=1}^M {\sum _{j=1}^N {[I^{\prime }(i,j)-I(i,j)]^{2}} } \end{aligned}$$
(6)

The HS of original grayscale image \(I\) and modified grayscale image \(I^{\prime }\) can be calculated by Eq. (8). \(p_i \) is the normalized histogram of \(I\) computed by Eq. (7).

$$\begin{aligned}&\!\!\!\! p_i =\frac{T_i}{T},\quad {i}=0,1,2,\ldots ,\,255\end{aligned}$$
(7)
$$\begin{aligned}&\!\!\!\! HS(I,{I}^{\prime })=\sum _{i=1}^{255} {\min \left( {P_i ,P_i ^{\prime }} \right) } \end{aligned}$$
(8)

where \(T\) is the total number of pixels in image \(I,\,T_{i}\) is the number of pixels with value \(i\).

\(HS\in \left[ {0,1} \right] ,\) and bigger HS will indicate more similar between original grayscale image \(I\) and modified grayscale image \(I^{\prime }\).

Figure 5 shows the histogram analysis of the proposed (\(n_1 ,n_1 )\) scheme for the original (Fig. 4a, b) and recovered (Fig. 4d) or shadow (Fig. 4e) image separately. The HS of the original cover grayscale image (Fig. 4b) and shadow (Fig. 4e) image is shown in Fig. 6, the degree of similarity, calculated by Eq. (8), of Fig. 4b, e is 98.4659 %, the average degree of the two shadow images is 98.4598 % and very close to 1.

Fig. 5
figure 5

Histogram analysis of proposed \((n_1 ,n_1 )\) scheme

Fig. 6
figure 6

HS of Fig. 4b, e

The histogram of the recovered image (Fig. 4d) is the same with the original binary secret image (Fig. 4a), and the histogram of the shadow image(Fig. 4e) is approximately the same with the original grayscale cover image (Fig. 4b).

As observed during the above tests and illustrations, we can see the following merits for the proposed (\(n_1 ,n_1 )\) :

  1. 1.

    The shadow images of the proposed (\(n_1 ,n_1 )\) scheme are meaningful with perfect quality.

  2. 2.

    The recovery secret image is the same with the original secret image, and the recovery is lossless.

  3. 3.

    Since the shadow images have the same size with the binary secret image \(M \times N\) binary secret image \(S,\) the proposed (\(n_1 ,n_1 )\) scheme has no pixel expansion.

4.1.2 (\(k,n_2\)) scheme

In the experiments, we use (\(3, 4)\) threshold setting to test the efficiency of the proposed (\(k,n_2 )\) scheme. One binary secret image and four grayscale images are used as the cover images as shown in Fig. 7a–e. Figure 7g–i shows the corresponding four shadow images. From HVS, we also cannot see the difference between the original grayscale cover images and the shadow images. And recovered secret binary image with the first 3 shadow images (also the same result with the other 3 shadow images) is shown in Fig. 7f, it is the same as the binary secret image. The recovered secret image is lossless, since MSE, as shown in Eq. (6), of Fig. 7a, f is equal to 0.

Fig. 7
figure 7

Images illustration of proposed (\(3, 4\)) scheme

Figure 8 shows the histogram analysis of the proposed (\(k,n_2 )\) scheme for the original (Fig. 7a, b) and recovered (Fig. 7f) or shadow (Fig. 7g) image separately. The HS of the original cover grayscale image (Fig. 7b) and shadow image (Fig. 7g) is shown in Fig. 9, the degree of similarity of Fig. 7b, g is 98.111 %, the average degree is 97.92635 % of the four shadow images and close to 1.

Fig. 8
figure 8

Histogram analysis of proposed (\(k,n_2 )\) scheme

Fig. 9
figure 9

HS of Fig. 7b, g

The histogram of the recovered image (Fig. 7f) is the same with the original binary secret image (Fig. 7a), and the histogram of the shadow image (Fig. 7g) is similar to the original grayscale cover image (Fig. 7b).

As observed during the above tests and illustrations, we can see the following merits for the proposed (\(k,n_2 )\) :

  1. 1.

    The shadow images of the proposed (\(k,n_2 )\) scheme are meaningful with good quality.

  2. 2.

    The recovery secret image is the same with the original secret image, and the recovery is lossless.

  3. 3.

    Since the shadow images have the same size with the binary secret image \(M \times N\) binary secret image \(S, \)the proposed (\(k,n_2 )\) scheme has no pixel expansion.

4.2 Comparisons of AFR [24]

In a (\(k,\,n)\), SSS based on error diffusion technique, let \(r\) be the sharing secret bits per sharing time, \(m\) denotes the pixel expansion, let \(s\) be the flipping bits for \(n\) cover images per sharing time, which can be calculated by Eq. (9).

$$\begin{aligned} s=f(n,k,m,r) \end{aligned}$$
(9)

where \(f\) is depend on the secret sharing method based on error diffusion techniques. AFR could be defined [24] as Eq. (10).

$$\begin{aligned} \text{ AFR }=\frac{s}{nt}=\frac{f(n,k,m,r)}{ntg} \end{aligned}$$
(10)

where \(g\) denotes the average gray level of the original grayscale cover images.

\(\text{ AFR }\in \left( {0,1} \right) ,\) and smaller AFR will indicate better visual quality of shadow images [11] theoretically before sharing.

In the proposed schemes, we assume that pixel values of the original grayscale cover images and the shadow images are random and independent with each other, which are reasonable since randomly selecting standard images and error diffusion technology, and since there is no pixel expansion, we have \(m=1,r=1,g=128\).

For the proposed (\(n_1 ,n_1 )\) scheme, the flipping number in the \(n_1 \) bits is computed by Eq. (11).

$$\begin{aligned} s= \left\{ \begin{array}{ll} 0\quad if\;S(i,j)=C_{i_1 }^1 (i,j)\oplus C_{i_2 }^1 (i,j)\cdots \oplus C_{i_{n_1 } }^1 (i,j)&{}\quad p=\frac{1}{2} \\ 1\quad if\;S(i,j)\ne C_{i_1 }^1 (i,j)\oplus C_{i_2 }^1 (i,j)\cdots \oplus C_{i_{n_1 } }^1 (i,j)&{}\quad p=\frac{1}{2} \\ \end{array} \right. \nonumber \\ \end{aligned}$$
(11)

\(s=0\) or \(s=1\) with the same probability \(\frac{1}{2}\), since the cover images are random and independent with each other.

Thus, we could gain the AFR of the proposed (\(n_1 ,n_1 )\) scheme in Eq. (12).

$$\begin{aligned} \text{ AFR }=\frac{0\times \frac{1}{2}+1\times \frac{1}{2}}{128n_1 }=\frac{1}{256n_1 } \end{aligned}$$
(12)

For the proposed (\(k,n_2 \)) scheme, From Eq. (5), we obtain Eq. (13) from dividing the left and right equations by \(n_2 \). Since assuming the \(n_2 \) cover images are independent with each other. Then, the \(n_2 \) bits in the same position with one secret bit of each cover image are nearly random. That is, the number of bits 0 and 1 is both \(n_2 \)/2, then the flipping number \(s\) in the \(n_2 \) bits is \(s=f(n_2 ,k,m,r)=t_{n_2 } -\frac{n_2 }{2}\); thus, we use Eqs. (10) and (5) to obtain Eq. (14).

$$\begin{aligned}&\!\!1-\frac{t_{n_2 } }{n_2 }<\frac{k}{2n_2 }\Rightarrow 1-\frac{k}{2n_2 }<\frac{t_{n_2 } }{n_2 }\end{aligned}$$
(13)
$$\begin{aligned}&\!\! \text{ AFR } = \frac{t_{n_2 } -\frac{n_2 }{2}}{128n_2 }=\frac{1}{128}\frac{t_{n_2 } }{n_2 }-\frac{1}{256}\nonumber \\&\qquad \!\!\quad = \frac{\left\lceil {n_2 -\frac{k}{2}} \right\rceil }{128n_2 }-\frac{1}{256}>\frac{1}{128}\left( 1-\frac{k}{2n_2 }\right) \nonumber \\&\quad \qquad \quad \!\!\quad \quad -\frac{1}{256}=\frac{1}{256}(1-\frac{k}{n_2 }) \end{aligned}$$
(14)

Applying the same index computation method, AFR of Wu’s (\(n_1 ,n_1 )\) scheme and Li’s (\(k,n_2 )\) scheme could also be calculated shown in Table 2, where we can find that the propose schemes have lower AFR that indicates better visual quality of shadow images.

Table 2 AFR comparisons between proposed (\(n_1 ,n_1 )\) scheme and Wu’s (\(n_1 ,n_1 )\) scheme, proposed (\(k,n_2 )\) scheme and Li’s (\(k,n_2 )\) scheme

4.3 Comparisons of NC

The NC is an evaluation metric that evaluates the quality between the original embedded secret image and the extracted secret image. NC is defined by Eq. (15).

$$\begin{aligned} \text{ NC }(I,{I}^{\prime })\!=\!\frac{1}{\sum \nolimits _{i=1}^M {\sum \nolimits _{j{=}1}^N {I^{2}(i,j)} } }\sum _{i=1}^M {\sum _{j=1}^N {I(i,j){\times } {I}^{\prime }(i,j)} }\nonumber \\ \end{aligned}$$
(15)

where \(M,\,N\) is the total number of pixels in the image, \(I(i,j)\) and \({I}^{\prime }(i,j)\) are the values of the \((i,j)\)pixel in original and recovered image of size \(M \times N\), respectively.

Using Fig. 4a as the secret image, Table 3 compares \(NC\) of shadow images between the proposed scheme and the method in Ref. [3] with \(n_1 = 2, 3,\ldots , 11\). \(NC\) for the shadow image 1 and the average \(NC\) for the \(n_1 \) shadow images are illustrated in Table 3. As can be seen from Table 3, \(NC\) of the proposed \((n_1 ,n_1 )\) scheme is closer to 1 than Wu’s scheme.

Table 3 NC comparisons between proposed (\(n_1 ,n_1 )\) scheme and Wu’s (\(n_1 ,n_1 )\) scheme

Using Fig. 7a as the secret image, Table 4 compares \(NC\) of shadow images between the proposed scheme and the method in Ref. [4] with \(n_2 = 3, 4,{\ldots }, 11\) under \(k =3\). \(NC\) for the shadow image 1 and the average \(NC\) for the \(n_2 \) shadow images are illustrated in Table 4. As can be seen from Table 4, \(NC\) of the proposed (\(k,n_2 )\) scheme is closer to 1 than Li’s scheme.

Table 4 NC comparisons between proposed (\(k,n_2 )\) scheme and Li’s (\(k,n_2 )\) scheme

In addition:

  • Since Wu’s and Li’s schemes embed the secret bits into binary images, the errors are diffused to adjacent pixels while the proposed schemes embed the secret bits into the LSBM of the grayscale images. Therefore, the quality of the shadow images in proposed schemes is better.

  • Since error diffusion and permutation technologies are applied in the generation phase, hence Wu’s and Li’s schemes have higher complex computation than the proposed schemes.

4.4 General discussion

In the light of the above-mentioned simulation results, we can see that the proposed schemes achieve more properties of secret image sharing scheme. The properties comparisons between the proposed schemes and other relative SSSs are shown in Table 5. From Table 5, we can see that the proposed schemes outperform the state-of-the-art schemes in the literature. Furthermore, the proposed schemes have good quality of shadow images, which are easily extended to other information hiding and secret sharing methods. The first scheme is suitable for (\(n_1 ,n_1 )\, (2\le n_1 ,\;n_1 \in Z^{+})\) applications with perfect shadow images quality and security, while the second scheme for (\(k,n_2 )\, (3\le k\le n_2 ,\;n_2 \in Z^{+},k\in 2Z^{+}+1)\) applications with high quality of shadow images and acceptable security.

Table 5 Property comparison with relative schemes

5 Conclusion

Two different secret image sharing schemes, (\(n_1 ,n_1 )\) and (\(k,n_2 )\) threshold, based on information hiding theory have been proposed in this paper. The proposed schemes have several merits compared with previous schemes such as better quality of meaningful shadow images with lower computation, good expansibility, lossless, and alternative order recovery and no pixel expansion. Simulations results and analysis show that the proposed schemes outperform the recently proposed schemes.