1 Introduction

With the development of computer and network technology, people’s awareness of intellectual copyright protection and information security becomes more and more intense, and various information hiding and encryption methods have been exploited [19]. Owing to its high-speed parallel data processing capability, optical information processing technology has attracted much attention in the information security field [813]. Most of the encryption methods involving phase-shifting interferometry have been developed to operate in systems based on Mach–Zehnder interferometers, generally including optical phase retarders and the use of phase masks that usually require accurate alignment of the system [14, 15]. Security of the verification systems is further improved by using the amplitude, phase, wavelength, spatial frequency, and polarization [16]. In addition, optical encryption technique, based on the double random phase encoding, that uses a joint transform correlator (JTC) is attractive in that it does not require the accurate optical alignment and can be implemented in a very simple and robust system [1719], where an advantage of the methods is that the decryption is performed using the same key code, which eliminates the need to produce an exact complex conjugate of the key.

The general model for image hiding can be described as follows: One secret image is embedded into one host image to be transmitted, resulting in that the hidden image containing the secret image and the host image looks like the original host’s form in some domain to achieve the goal of hiding the existence of secret information [20]. This method has been applied to many fields, such as the copyright protection for digital and multimedia works [21], anti-counterfeit of bills and data monitoring [20]. Phase-shifting interferometry [2225] has been introduced into the optical image hiding field [10]. However, the conventional temporal phase-shifting interferometry greatly limits the real-time capability of optical image hiding and increases the amount of data used for transmission because three or more phase-shifting interferograms captured at different times are required. If we do not take any measures, the hidden data will be multiplied relative to the original data after optical image hiding, and this will affect the data transmission and storage efficiency to some extent.

The newly developed theory of compressive sensing (CS) [26, 27] breaks the bondage of the Nyquist–Shannon sampling theorem and provides a new technical approach to hologram compression in optical domain [2830]. Through the appropriate reconstruction algorithms, we can use a small amount of sparse measurements to restore the original signal. Unlike the traditional image data compression, such as JPEG and JPEG2000, CS makes the compression and sampling synchronously and need not retain a large number of redundant information in sampling stage. Moreover, the quality of reconstructed image will be degraded as in the traditional compression methods, which is very sensitive to bit error or packet loss [31]. Recently, many optical imaging methods based on CS have been proposed, in which an acceptable quality of original image can be obtained by using a few sampling data [2830]. Therefore, we can reconstruct the original image from less random measured value with optical image hiding method based on CS, and this will greatly reduce the amount of data and improve the transmission rate.

In this study, we propose an optical image hiding method based on dual-channel simultaneous phase-shifting interferometry (DCSPSI) [32] and CS, and the experiment is implemented to verify the feasibility of the proposed method. First, a secret image was embedded in the host image with our DCSPSI architecture, in which the polarization components and beam splitters are employed to simultaneously generate two interferograms with the phase shifts of π/2 captured by two CCDs. Then, the captured interferograms were further compressed sampling to the less data by CS. At last, the encrypted image can be obtained by CS from small amounts of data, and the original object image will be reconstructed with two-step phase-shifting algorithm and the correct keys. Principle and experimental results are as follows.

2 Fundamental principles

To verify the validity of the proposed method, the principle sketch is shown in Fig. 1. A Mach–Zehnder interferometer-based DCSPSI system was used to perform image hiding. A He–Ne laser was first rotated to the polarization direction through a half-wave plate (HWP) and then was divided into two polarization beams by the polarization beam splitter (PBS) after expanding and collimating as shown in Fig. 1. The transmitted beam with the paralleling polarization direction to x-axis, which was modulated by the original image, was used as the object beam, and the reflected beam with the paralleling polarization direction to y-axis was used as the reference beam and modulated by the host image. Then, the object beam and the reference beam formed the orthogonal common-path superposition in the non-polarized beam splitter (BS1); after transmitting through the quarter wave plate (QWP) and the non-polarized beam splitter (BS2), and then, respectively, the polarizers of P1 and P2 with the intersection angle π/4 of polarization direction, a pair of interferograms captured by CCD1 and CCD2 with the spatial phase shifts of π/2 can be simultaneously obtained by this DCSPSI system.

Fig. 1
figure 1

Principle sketch of optical image hiding based on DCSPSI and CS. HWP, half-wave plate; BE, beam expander; PBS, polarized beam splitter; M1, M2, mirror; BS1, BS2, beam splitter; QWP, quarter wave plate; P1, P2, polarizer

Assuming that complex amplitude distribution of the object image on the CCD was U(xy) = A(xy) exp [(xy)], A(xy) and ϕ(xy), respectively, represent the amplitude and phase of the object image on the CCD, and the complex amplitude distribution of the host image can be described as

$$U_{h} (x,y) = A_{h} (x,y)\exp [i\phi_{h} (x,y)]$$
(1)

where A h (xy) and ϕ h (xy) represent the amplitude and phase of the host image on the CCD, respectively. Then, a pair of interferograms with the phase shifts of π/2 captured by CCD1 and CCD2 can be, respectively, represented as

$$I_{1} (x,y;0) = a(x,y) + b(x,y)\cos \left[ \phi_{h} (x,y) - \phi (x,y) + 0 \right]$$
(2)
$$I_{2} \left(x,y;\frac{\pi}{2}\right) = a(x,y) + b(x,y)\cos \left[ \phi_{h} (x,y) - \phi (x,y) + \frac{\pi}{2} \right]$$
(3)

where a(xy) and b(xy), respectively, denote the background intensity and the modulation amplitude of interferogram.

On the receiving side, the compressive sampling data can be obtained through the inner product between the interferogram I k and the measurement matrix Φ, which can be expressed as

$$y_{k} = \left\langle {\varPhi ,I_{k} } \right\rangle$$
(4)

where 〈 〉 denotes the inner product, ΦR M×N is the measurement matrix, and y k is the compressive sampling data. Then, we can transmit the compressive sampling data through a conventional channel to the computer, in which the image reconstruction and decryption will be performed.

The signal recovery algorithm is the core of CS theory. For the image, the gradients of most images were usually sparse; the total variation (TV) algorithm [33] proposed by Rudin et al. can reconstruct the original image well by solving the gradient of signal. In the work by Candes et al. [26], the TV minimization was used to minimize the gradients of images to preserve the image details in reconstruction algorithm of CS. The TV minimization scheme based on augmented Lagrangian and alternating direction algorithm, shortly “TVAL3” [34], was an optimization algorithm of TV minimization. We can find the minimum value of enhanced Lagrange model by alternating minimization method and then update the Lagrange multiplier by the steepest descent method. The TV minimization can be expressed as

$$\hbox{min} \left\| x \right\|_{TV} \,s.t.\,y = \left\langle {\varPhi ,x} \right\rangle$$
(5)

where

$$||x||_{TV} = \sum\limits_{i,j} {\sqrt {(x_{i + 1,j} - x_{i,j} )^{2} + (x_{i,j + 1} - x_{i,j} )^{2} } } = \sum\limits_{i,j} {|(\nabla x)_{i,j} |}$$
(6)

is the total variation in the image x, revealing the sum of the magnitudes of the gradient; i, j denote the adjacent pixel position. In the operation of iteration algorithm, the value of the total variation can be used as an iterative threshold, and when the iterative value was lower than the threshold, the original image can be reconstructed well. That is to say, TV algorithm was used to select a unique image out of the set of possible images, agreeing with the available data.

The reconstruction process was an inverse problem to estimate the original image from the observations. Hence, this problem can be converted into the minimization of a convex objective function

$$f(x) = \hbox{min} \frac{\mu }{2}\left\| {y - \left\langle {\varPhi ,x} \right\rangle } \right\|_{2}^{2} + \left\| x \right\|_{TV} \quad s.t. \quad \,y = \left\langle {\varPhi ,x} \right\rangle$$
(7)

where \(\left\| {y - \left\langle {x,\varPhi } \right\rangle } \right\|_{2}^{2}\) is the l 2 norm of \(y - \left\langle {x,\varPhi } \right\rangle\). The first penalty, denoting a least-squares term, was small when \(\left\langle {x,\varPhi } \right\rangle\) was consistent with the correlation vector y. The second penalty \(\left\| x \right\|_{TV}\) was the signal’s total variation, and μ>0 was the penalty parameter. Hence, the objective function can be rewritten as

$$f(\hat{I}_{k} ) = \hbox{min} \frac{\mu }{2}\left\| {y_{k} - \left\langle {\varPhi ,\hat{I}_{k} } \right\rangle } \right\|_{2}^{2} + \left\| {\hat{I}_{k} } \right\|_{TV} s.t.\,y_{k} = \left\langle {\varPhi ,\hat{I}_{k} } \right\rangle$$
(8)

From the above theoretical analysis, it is presented that if the receiver got the correct measurement matrix, the interferograms \(\hat{I}_{1}\) and \(\hat{I}_{2}\) can be reconstructed by solving this objective function.

In addition to obtaining the host image diffraction distribution, the wavelength of the He–Ne laser, and the recording distance of the original image, the receiver also can reconstruct the original object image by the interferograms \(\hat{I}_{1}\) and \(\hat{I}_{2}\). First, the background of interferograms can be filtered out by Gaussian high-pass filter [35] and Eqs. (2) and (3) can be, respectively, rewritten as:

$$\hat{I}_{1} (x,y;0) = b(x,y)\cos [\phi_{h} (x,y) - \phi (x,y)]$$
(9)
$$\hat{I}_{2} \left( {x,y;\frac{\pi }{2}} \right) = - b(x,y)\sin [\phi_{h} (x,y) - \phi (x,y)]$$
(10)

According to Eqs. (9) and (10), the phase distribution of original object image on the CCD can be retrieved directly by an arctangent function as:

$$\phi (x,y) \cong - \arctan \left[ {\frac{{\hat{I}_{2} \left( {x,y;\frac{\pi }{2}} \right)}}{{\hat{I}_{1} (x,y;0)}}} \right] + \phi_{h} (x,y)$$
(11)

where the phase distribution ϕ h (xy) of the host image can be obtained in advance with multi-step phase-shifting holography based on Mach–Zehnder interferometry. At last, we can perform the inverse Fresnel propagation to recover the original image through digital means.

3 Numerical simulation and experimental results

We first conducted a series of simulations to verify the feasibility of the proposed method on binary image. As shown in Fig. 2a, b, the sizes of test images were 256 × 256 pixels. The wavelength of the He–Ne laser was 632.8 nm, and the light amplitude ratio between the object beam and reference beam was 0.1:1. The recording distance of the original image to the CCD1 or the CCD2 was 0.2 m, and that of host image was 0.3 m, respectively. One interferogram embedded the hidden image in the host image is shown in Fig. 2c. The result showed that the hidden image has been effectively embedded in the Fresnel diffraction field of the host image to achieve the imperceptibility of the hidden image within the image hiding technology. Figure 2d shows the retrieved image when the phase information of the host image was used.

Fig. 2
figure 2

Simulation results with a binary image. a Original binary image; b host image; c one interferogram embedded the hidden image in the host image; d retrieved image when the phase information of the host image was used

Subsequently, we conducted the experiment to verify the effectiveness of the proposed DCSPSI-based CS method. As shown in Fig. 3a, the size of original image “T” was 0.3 cm × 0.4 cm, and the resolution test target was used as the host image, and the irradiated area on the resolution test target was the three vertical lines on the first domain of group 0, as shown in Fig. 3b. The wavelength of the He–Ne laser used in the experiment was 632.8 nm. The light intensity ratio between the object beam and reference beam was 0.1:0.9, and the recording distances of the original image and host image to CCD1 or CCD2 were 0.71 and 0.70 m, respectively. Two identical CCDs with size of 576 (V) × 768 (H) pixels and pixel size of 10 μm × 10μm were employed to simultaneously capture a pair of interferograms, and the distance between CCD1 and CCD2 to BS is equal. After hiding the object image in the host image, we can obtain a pair of interferograms, looking like the interferogram of the host image, as shown in Fig. 3c. We took 5% measurements from the hidden image and then reconstructed the original image from the compressed hidden image. The corresponding experimental results are shown in Fig. 3d, e. It is found that reconstruction employing 5% measurements is almost the same with 100% measurements, indicating the validity and feasibility of the proposed method. Figure 3f shows the retrieved image by using the wrong phase information of the host image. It was observed that the image retrieved with the wrong key did not give a clear view of the original image.

Fig. 3
figure 3

Experimental results. a Original image; b host image; c one experimental interferogram embedded the hidden image in the host image; the reconstructed images from c with d 100% measurements; e 5% measurements; f reconstructed image by using the wrong phase information of the host image

To evaluate the quality of the reconstructed image and reveal the relationship between the sampling rate and reconstructions, we employed the peak signal-to-noise ratio (PSNR) as the parameter, which was defined as,

$$\begin{aligned} {\text{PSNR}} = 10\log_{10} \left( {{{255^{2} } \mathord{\left/ {\vphantom {{255^{2} } {\text{MSE}}}} \right. \kern-0pt} {\text{MSE}}}} \right), \hfill \\ {\text{MSE}} = \frac{1}{mn}\sum\limits_{i = 0}^{m - 1} {\sum\limits_{j = 0}^{n - 1} {\left[ {I(i,j) - K(i,j)} \right]}^{2} ,} \hfill \\ \end{aligned}$$
(12)

where MSE denotes the mean square error, m and n are the dimension of the image, I(ij) is the pixel value of the recovered original image without compression, and K(ij) is the pixel value of the reconstructed image with compression. The sampling rate can be defined as the ratio of compressive sampling data to the recovered original image data without compression; thus, the data volume will increase as the sampling rate. Figure 4 presents the relationships of the sampling rate and PSNR between the recovered original image without compression and reconstructions with compression. Obviously, we can see that the PSNR of the reconstructed image increased with the sampling rate. If the sampling rate reached 5%, the value of PSNR was equal to 31.85 dB, indicating that the reconstructed image with good quality can be obtained with the proposed method.

Fig. 4
figure 4

Variation of PSNR versus the sampling rate

4 Robustness of the system

In order to study the robustness of the proposed method, a series of typical signal processing operations were carried out in this section. Meanwhile, we used the correlation coefficient (CC) to evaluate the impact of various common distortions and attacks, in which the CC can be defined as follows:

$$CC = \text{cov} (f,f_{0} )(\sigma_{f} ,\sigma_{{f_{0} }} )^{ - 1}$$
(13)

where \(\text{cov} (f,f_{0} )\) denotes the covariance between f and f 0, and f and f 0 are the reconstructed image and original image, respectively. The symbols σ f and \(\sigma_{{f_{0} }}\) denote the standard deviations of f and f 0.

We first chose JPEG compression method to implement the interferograms with different compression ratio to verify that the system has better ability to resist JPEG compression. One of the compressed interferograms with compression ratio 35% and the corresponding reconstructed image are shown in Fig. 5a, b, and the corresponding CC curve is presented in Fig. 5c. First, it was noticeable that the CC increased with the compression ratio, the smaller the compression ratio, the less the damage to interferograms. Second, we rotated the interferograms anticlockwise from 0 to 50°. Figure 6a, b, respectively, presents one interferogram and the reconstructed image when the interferograms were rotated anticlockwise by 5°. It was observed that the reconstructed image gave a clear view of the original image. Figure 6c gives the variation of the CC versus the rotated angle. It was found that the CC was still larger than 0.60 when the rotated angle was <9°. Finally, to verify the effect of filtering on the interferograms, a low-pass Gaussian filter was employed. Figure 7a, b shows one of the interferograms filtered with window size of 4 × 4 pixels and the corresponding constructed image, and the CCs versus the low-pass filter’s window size are shown in Fig. 7c. It was observed that though the value of the CCs was rapidly dropped down, it remained a constant after the filter’s window size was increased to 2 × 2 pixels.

Fig. 5
figure 5

Robustness of this method against JPEG compression attacks. a One of the interferograms for Fig. 3c compressed with the compression ratio 35%; b the corresponding retrieved object image; c the variation of the correlation coefficients between the retrieved image and original image versus the compression ratio

Fig. 6
figure 6

Robustness of the proposed method against rotation attacks. a One of the interferograms rotated anticlockwise by 5° for Fig. 3c; b the reconstructed object image of a; c the variation of the correlation coefficients between the reconstructed image and original image versus the rotation angle

Fig. 7
figure 7

Robustness of the proposed method against low-pass Gaussian filters attacks. a One of the interferograms filtered by a low-pass Gaussian filter with window size of 4 × 4 pixels for Fig. 3c; b the reconstructed image of a; c the variation of the correlation coefficients between the reconstructed image and original image versus the filtering window size

From all the above analysis, we can conclude that the proposed method was robust to the above various common attacks; specially, it was more sensitive to the rotation attacks. The reason was that the value of CCs dropped down to a small value (<0.5) due to relatively slight attack in the rotation attacks. In contrast, the values of CCs under the JPEG compression attacks and low-pass Gaussian filter attacks were all larger than 0.85 regardless of any attack intensity.

In the following robustness experiment, the proposed method will be tested by the known-plaintext attack (KPA) [36, 37] and chosen-plaintext attack (CPA) [38, 39]. Suppose that a pair of the original image and the secret image shown in Fig. 8a, b are obtained by the illegal user. Figure 8c, d is the interferogram embedded the hidden image in the host image and the extracted secret image. Then, the interferogram will be attacked by using the attacks in simulation. First, the attacker can deduce the secret key based on prior knowledge in KPA. In addition, an impulse function is utilized as the chosen plaintext in the CPA. Two extracted images illustrated in Fig. 8e, f were obtained by KPA and CPA, in which the extracted images are noise-like and the secret information cannot be identified entirely. Therefore, the proposed method is robust to the above two kinds of attacks because the decryption process depends not only on the phase distribution of the host image, but also on the measurement matrix.

Fig. 8
figure 8

Experiments of known-plaintext attack and chosen-plaintext attack: a original binary image; b host image; c one interferogram embedded the hidden image in the host image; d extracted image; e the result of known-plaintext attack; and f the result of chosen-plaintext attack

5 Conclusion

In summary, we have presented an optical image hiding method based on DCSPSI and CS. This method can simultaneously obtain two interferograms with the phase shifts of π/2 on two CCDs with DCSPSI system, and then the optical image hiding can be performed by the two-step phase-shifting algorithm, so it can be applied to the encryption of dynamic video. The obtained experimental results demonstrated that the proposed method can reconstruct the original image well with only 5% of the number of measurements, and meanwhile revealed the better robustness against JPEG compression attacks, rotation attacks, and low-pass Gaussian filters attacks. Importantly, the proposed method will supply a useful solution for breaking through the limitation of the large holograms data volume of 3D image and expand its application in 3D image hiding, real-time video security transmission, real-time video surveillance, etc.