Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Anti-loss-compression image encryption based on computational ghost imaging using discrete cosine transform and orthogonal patterns

Open Access Open Access

Abstract

As an emerging imaging technique, computational ghost imaging (CGI) has its unique application in image encryption. However, the long imaging time and high requirement of transmitting data, both in the size of data and vulnerability of lossy compression, limit its application in the practical communications. Using discrete cosine transform to sparse bucket signals of CGI, we here propose a method by transforming the bucket signals from the sensing matrix domain to the space domain, enhancing the ability of the bucket signals (i.e., encrypted image) to resist the lossy compression. Based on the principle of CGI, we first propose to use gradient descent to find an orthogonal matrix as the encryption key, then test the performance of our method at different quality factors and undersampling rates. Both simulations and experimental results demonstrate that our encryption method shows great resistance to the traditional lossy compression methods and has good performance in the undersampling conditions. Our method provides a convenient way to transmit the bucket signals of CGI by the format that involves lossy compression and thus camouflages itself while significantly reducing the amount of data being transmitted.

© 2022 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. Introduction

Information security has great importance to our modern society. Exposing to the Internet, the important images and pictures stored in electrical devices may face a high risk to be stolen and causing serious trouble. As a result, multiple image encryption methods have been proposed. Computational ghost imaging (CGI) is an emerging imaging method in recent years, using the single-pixel detector (SPD) instead of the traditional multiple-pixel detector (i.e., CCD/CMOS), combining a set of patterns and reconstruction algorithms, to obtain the object image indirectly. Because of its merit of decryption-like imaging process, it provides a new way to image encryption.

The idea of ghost imaging was firstly proposed by Klyshko [1], and experimentally achieved by Pittman et. al. [2], where two optical paths and two detectors were required. Later, Shapiro proposed an imaging modality, called computational ghost imaging (CGI), where the illustration patterns were generated and controlled by the computer and only one single-pixel detector is needed in experiment [3]. In order to improve the imaging quality and efficiency, orthogonal patterns, such as Hadamard, Fourier, and Wavelet basis were frequently applied in the CGI [4,5]. Meanwhile, based on the imaging principle of CGI, relevant optical encryption schemes were proposed, where the bucket signals detected by single-pixel detector act as the cipher text and the computer-generated illumination patterns are keys [610].

Recently, many pieces of research have been proposed to improve the quality and convenience of the application of CGI on image encryption. To combine CGI with other emerging encryption methods, for example, the RSA algorithm [11,12], watermarking [1317], deep learning [18] and metasurface [19,20], different encryption schemes are fruited. However, conventional CGI may faced a problem of needing a huge amount of data (both patterns and bucket signals) to be transmitted, limiting its application if sending data was highly cost. Compressive ghost imaging [21] was proposed to solve this problem in an undersampling condition by involving compressive sensing (CS). CS is based on the property that the natural image has a sparse region in the domain of such as Total Variation (TV) or Discrete Cosine Transformation (DCT), and hence reduces the uncertainty of the target image, resulting in high efficiency of the reconstruction of GI ever under the super Sub-Nyquist sample rate. One way was to choose a set of pre-defined patterns and develop a different algorithms to reconstruct the images [2130] . Xianye Li, et. al. [24] proposed a method to sparse the image based on the Haar wavelet by row scanning and used it to design a method to distribute second-order encryption. Liansheng Sui, et. al. [25] recently tested a method using speckle patterns and sparse reconstruction in the encryption, obtaining a significant result to reduce the pressure on the key management and data transmission. Lihua Gong, et. al. [26] proposed an encryption method based on the chaotic system and CS, generating the keys by SHA-256 algorithm, obtained impressive results on the undersampling and turbulent condition. Huazheng Wu et. al. [27] introduced DCTGI, using a set of one-dimensional DCT patterns to extract two-dimensional images, and tested its performance on the hand-written numbers. In addition to choosing the different patterns, arranging the existing patterns differently provided another way widely used in recent works [3137], especially for the Hadamard pattern credit to its availability on the high-frequency Digital Micromirror Device (DMD) or Spatial Light Modulator (SLM). By projecting the important patterns firstly, the reconstructed result can become closer to the target image at the undersampling condition. C. Zhuoran, et. al. [32] firstly proposed a simple arrangement involving the Walsh function. Wen-Kai Yu [33] gave an arranging method called Cake-cutting, applying those low-frequency patterns first, and therefore got a relatively lower error rate and higher resolution. M. J. Sun, et. al. [34] introduced a method called "Russian Doll", ordering the patterns based on different resolutions, projecting the patterns that appeared in the low-resolution basis first, allowing the user to terminate the imaging process at any time to obtain differently resolution of reconstructed image [35]. Integrating the methods proposed above, Pedro G. Vaz, et. al. [36] tested the results between different methods, namely Natural, Walsh, Cake-cutting, High Frequency, and Random. Moreover, in 2020, Xiao yu, et. al. [37] also proposed a method using Total Variation (TV) to order the patterns of Hadamard basis. Similar to CS, selective computational ghost imaging (SCGI) [38] was another way to improve the efficieny of the imaging process and be used in the encryption.

To capture, encrypt, store, or transmit the bucket data of GI more efficiently, multiple coding methods are proposed [3942]. On the other hand, sending the encoded information in the picture format is still a common way, because it allows the data to camouflage itself as a not-encrypted image and in many commercial occasion the format of the image is restricted. The most efficient way is to involve lossy compression, such as Joint Photographic Experts Group (JPEG) algorithm. However, to transmit image using JPEG and linear block code as an offset [43], although the lossy compression can significantly reduce the transmission time, it can also increase the noise level. That is because many encryption methods and algorithms are based on a fact that humans are more sensitive to the low-frequency domain of the image, thereby hiding the extra information to the high-frequency domain of images. However, when the lossy compression designed by the same fact to reduce the high-frequency part such as JPEG algorithm was involved, most of the algorithms above may resulted in relatively worse performance.

Here, we present an image encryption method that can be applied to different sizes of images by using a set of pre-determined orthogonal patterns as the key built by Gradient Descent (GD), then transforming the image by DCT to resist the lossy compression. Following these ideas, our method gives a new way to capture and encrypt the image of an arbitrary size, and significantly reduce the amount of data to be transmitted, hence increasing the efficiency of transmitting data than the traditional CGI encryption methods. It is shown through the simulations that the image can still be reconstructed even at an extreme compression of JPEG than sending the encrypted image directly. Furthermore, with a SPD and projector set up in the optical experiment, we demonstrate this method also has the ability to capture both binary and grayscaled images with complex details as well. Moreover, our experiment also involves a comparison between the orthogonal patterns found by GD and those obtained by Gram-Schmidt Orthogonalization, showing a merit of GD when the rank of the matrix is low.

2. Working principle

2.1 Building sensing matrix

The target images of 64 pixels $\times$ 64 pixels are used for the testing of this method. A sensing matrix is built to act as the encryption key based on the CGI principle. Ranging in $(-1,1)$, this matrix is derived from GD, an optimizing method [44,45] that is widely used in the optimization problem to minimize a cost function (CF) that uses multiple independent variables as the arguments such as convolutional neural network. The schematic diagram of building a sensing matrix is shown in Fig. 1.

 figure: Fig. 1.

Fig. 1. The working sequence to produce the sensing matrices (patterns) from a random $\{-1,1\}$ matrix with 1/8 height and 1/8 width of the target matrices. "Kron" means "Kronecker Product"

Download Full Size | PDF

First of all, we use GD to generate an orthogonal matrix as the key, denoted as $K_k^{(m/8)\times (n/8)}$ with 1/8 height and 1/8 width of the target matrix $M^{m\times n}_N$ (here $m=n=64$ and are divisible by 8). The process of GD is described in Algorithm 1. We use stochastic gradient descent (SGD) as the optimizer, and we use PyTorch 1.9.1 with CUDA 11.1 on Python 3.9.1 as the framework to optimize the matrix. The iterations require a matrix input and a learning rate (LR), and output a one-step optimized matrix. For the input, we randomly generate an initial matrix ranging in $\{-1,1\}$, denote as $K_1^{(m/8)\times (n/8)}$. For the CF, We not only require the target matrix to be orthogonal but also require the absolute values inside the matrix to be closer to ensure a good experimental performance (See "Experimental data"). Therefore, the CF is set to be the linear combination of these 2 criteria, namely

$$CF = P\times \sqrt{|K_kK_k^{T}|^{2}-|mI|^{2}} + (1-P)\times \sqrt{||K_k|-J|^{2}},$$
where $I$ is the identity matrix, $J$ is the all-ones matrix, $P$ is the coefficients of these 2 factors, and we set the coefficient $m$ as the trace of the matrix. After the iterations, we can obtain the target matrix, denoted as $K_k^{(m/8)\times (n/8)}$, ranging in $(-1,1)$, where $k$ is the epoch of the iteration and is sufficiently large. From the experiments, we find that the coefficients of $P=0.8$ and $1-P = 0.2$ are the most suitable, because the matrix generated by this combination not only have perfect orthogonality but also does not change the values of the matrix it generated than the initial matrix dramatically. For the coefficients of the epochs, the experiment showed that when the LR was 0.1 and $k$ reached around 200,000, the target matrix $K_k^{(m/8)\times (n/8)}$ can be considered under 8-bit accuracy.

oe-30-9-14073-i001

Then, The optimized orthogonal matrix $K_k^{(m/8)\times (n/8)}$ generated from a random basis will be used as the key of the encryption. After obtaining the key, the sensing matrix $M^{m\times n}$ is generated by applying the Kronecker product of it and a Hadamard matrix.

$$M^{m\times n} = K_k^{(m/8)\times (n/8)} \otimes \text{Hadamard}(8).$$
Because both the $K_k^{(m/8)\times (n/8)}$ and Hadamard matrix are orthogonal, the sensing matrix is also orthogonal. Then, by repeating the outer product the $i^{th}$ row and $j^{th}$ column of $M^{m\times n}$, just like the generation of a Hadamard matrix [4], namely
$$M_{i,j}^{m\times n} = i^{th}\text{row} \otimes j^{th}\text{column},$$
a set of the patterns are generated, denoted as $M_{i,j}^{m\times n}$, where $i, j$ represents the index of patterns.

2.2 Encryption process

A simulation of the data by the computer program can be used to test the methods under well control. To proceed the encryption process based on the CGI, the bucket signal matrix $I^{m\times n}$ of each pattern is calculated by the dot product

$$I^{m, n} = \sum_{i,j} M_{m,n}^{i,j} \cdot T^{i,j},$$
where $T^{m,n}$ represents for the target image with $m\times n$ pixels.

In many works, for example, the optical encryption based on CS using the idea of quick response (QR) code proposed by Shengmei Zhao, et. al. [46], the bucket signals are directly transmitted as the data stream. By this method, the amount of data can be directly reduced by the decline of patterns. However, if we want to transmit the bucket signals as an image, although we can compress the data by the mainstream coding methods, for example, portable network graphics (PNG) or ZIP, it is harder to compress it furthermore. That is because the data of bucket signals are distributed around different frequencies, if we involve mainstream lossy compression methods such as JPEG, the useful data stored in the high-frequency region will be sharply lost as the increment of compression. Here, we propose to use inverse-DCT to sparse the bucket data to the low-frequency region by transforming it to the space domain.

The method to sparse the bucket signal by DCT is shown in Fig. 2 (a). Firstly, we divide the bucket signal matrix $I^{m\times n}$ into different $8\times 8$ regions, denoting each $8\times 8$ region as $I^{u\times v}$ (here $u=v=8$). Then, we apply the inverse-DCT to each $8\times 8$ region twice in two dimensions respectively:

$$I^{u,y} = I^{u,1} + 2 \sum_{v=2}^{8} I^{u,v} \cos\left(\frac{\pi(2y+1)v}{16}\right),$$
$$I^{x,y} = I^{1,y} + 2 \sum_{u=2}^{8} I^{u,y} \cos\left(\frac{\pi(2x+1)u}{16}\right).$$
This process transforms the bucket matrix of one $8\times 8$ region from $I^{u\times v}$ in the sensing matrix’s domain to $I^{x\times y}$ (here $x=y=8$) in the space domain, and hence sparse the bucket image. Finally, combining each $8\times 8$ region, we would obtain a new bucket signal matrix ready to transmit, denoted as $I^{p\times q}$ (here $p=q=64$). The DCT is calculated using the SciPy package.

 figure: Fig. 2.

Fig. 2. The working sequence from the target image to the cipher image. (a) The image encryption and transformation of bucket signals from sensing matrix’s domain into the space domain using inverse-DCT. (b) The cipher image at different quality factor / compression rate.

Download Full Size | PDF

After the cipher image is transformed, we can compress it using JPEG algorithm, which is the most popular method of lossy compression. The degree of compression in the JPEG algorithm is defined by the quality factor (QF) ranging from 0 to 100. The QF is corresponding to a $8\times 8$ matrix filled up with 64 quantization steps determining the compression of each frequency, and the lower the QF, the more compressed the picture is. Figure 2 (b) shows the compressed image at different QFs and the corresponding compression rates defined by the ratio of the compressed image size to the image size without compression (i.e., QF = 100).

2.3 Decryption process

The receiver would obtain 2 images: the key matrix $K_k^{(m/8)\times (n/8)}$ and the cipher matrix $I^{p\times q}$. The receiver’s operation is shown in Fig. 3. Firstly, the receiver extracts the key matrix to a set of patterns as the same as the encryption process in Fig. 1. Then, the receiver split the cipher matrix reading from the compressive cipher.jpg picture into $8\times 8$ regions, and apply the DCT to each of them twice in two dimensions:

$$I^{x,v} = 2 \sum_{y=1}^{8} I^{x,y} \cos\left(\frac{\pi(2y+1)v}{16}\right),$$
$$I^{u,v} = 2 \sum_{x=1}^{8} I^{x,v} \cos\left(\frac{\pi(2x+1)u}{16}\right).$$
Finally, combining them back, the receiver would obtain a matrix in the sensing matrix’s domain. To control the performance of the method on the transmitting process, we use linear dependent (LD) method to retrieve the image by
$$O^{m,n} = \sum_{i,j} M_{i,j}^{m,n} * I^{i,j}.$$

 figure: Fig. 3.

Fig. 3. Decryption process for the receiver. The yellow area includes all the contents that the receiver would get, and the green box gives the example the receiver would finally reconstructed.

Download Full Size | PDF

To evaluate the imaging reconstruction, the root of mean square error ($RMSE$) is employed here. $RMSE$ is the measurement of how the reconstruction image is absolutely different from the target image, defined by

$$RMSE(O^{m\times n}, T^{m\times n}) = \sqrt{\frac 1{m\times n}\sum_{m,n}(O^{m\times n}-T^{m\times n})^{2}}.$$

3. Simulation results

Using the method above, we obtain the CGI bucket signals with DCT and use them to recover the target image after they undergo JPEG compression algorithm in different QFs firstly. We test its merit in contrast to using the Hadamard matrix and without using DCT at different QFs, which are shown in Fig. 4. Then, we test its performance in the undersampling condition, i.e. different sorting method, and the results are shown in Fig. 5. Here, the target image is chosen as "Baboon" in the simulations.

 figure: Fig. 4.

Fig. 4. Simulation results in different quality factors. OT = original target image only being compressed at this rate as a reference, RS = retrieved image using sensing matrix and DCT, RH = retrieved image using Hadamard matrix and DCT, RN = retrieved image using sensing matrix but without DCT. (a) The yellow box shows the comparison between OT, RS and RH in low compression ratio. (b) The orange box shows the comparison between OT, RS and RN in high compression ratio. (c) The green box shows the RMSE versus the quality factor of the images in yellow and orange boxes.

Download Full Size | PDF

 figure: Fig. 5.

Fig. 5. Simulation results in different quality factors and undersampling rates. UR = undersampling rate. (a) The yellow box shows the image quality of different quality factors at different undersampling rates. (b) The green box gives the plot of the $RMSE$ versus the corresponding sampling rate.

Download Full Size | PDF

In Fig. 4(a), the comparison of the original target image being compressed directly (i.e., OT), the retrieved image using the sensing matrix and DCT built above (i.e., RS), and the retrieved image using Hadamard as the sensing matrix instead (i.e., RH) are shown in the yellow box. To clearly demonstrate the differences between them, the simulation is tested in a relatively low (ranging from 0 to 50) QF. The $RMSE$ result is shown in the upper diagram of Fig. 4(c). The $RMSE$ result indicates that the sensing matrix $M^{m\times n}$ can reach a similar result as the Hadamard matrix, while means that our method successfully adds an encryption key $K_k^{(m/8)\times (n/8)}$ to Hadamard matrix but without lowing the reconstruction quality. That is because the process of inserting the key matrix to the sensing matrix still keeps the orthogonality of the original one. Meanwhile, the comparison between OT and RS shown in Fig. 4(a) shows that our method can obtain a clear image compared with the original image at the same QF. Even at an extremely low QF, e.g. 1 or 5, the retrieved image can also provide the overall shape of the target image. Whereas at this rate, even compressing the original image would lose almost all the information, while in the RS row, the areas of the bright and dark areas are still clear. In this way, the amount of data that needed to be transmitted can be greatly reduced by directly sending them by the compressed JPEG file, rather than sending the bucket signals directly.

The comparison of image quality between using and not using DCT to sparse the cipher image is given in Fig. 4(b), the orange box. The result is tested at a relatively high QF, ranging from 50 to 100. It is because the image quality of not using DCT is decaying rapidly, and only when the rate is high enough it can enable us to successfully retrieve the image. The bottom diagram of $RMSE$ in the green box shows that the amount of noise without using DCT is greatly larger than those using DCT to protect the high-frequency information at almost every quality. The simulation result shows that the ability of RN to resist the lossy compression is very low compared with RS and OT, indicating that the DCT transforming the image from the sensing matrix’s domain to the space domain can provide an overwhelmingly protection of the information located at the high-frequency region than transmitting the image in the sensing matrix’s domain directly.

To test the performance in the condition of undersampling, in our simulation, we use "cake-cutting (CC)" introduced by Wen-Kai Yu [33] as the method to sort the patterns. This method is originally designed for the black-white patterns like Hadamard, but using this idea, we firstly binarization the patterns, then count the number of "block" in it, and sort the patterns into a new sequence of patterns based on the number of those "blocks". The undersampling rate $r$ means that we only project the first $N=r(m\times n)$ patterns in this sequence, and set the the rest pixels in the bucket signal matrix $I^{m\times n}$ to 0.

Figure 5 gives the simulation result of the undersampling test for our method (i.e., RS). The yellow box contains the retrieved images at different QFs and undersampling rates. Because we have shown the result of those without undersampling (rate = 1), here we provide the images at 0.95 instead. The green box provides the $RMSE$ curves of the QFs in the representative undersampling rates shown in the yellow diagram. The reconstructed images in yellow box show that, both lossy compression and undersampling can significantly affect the image quality, but it is more sensitive to undersampling. As for the tolerance of the undersampling, we can see that, under an undersampling rate of 0.2, it is difficult to distinguish any shapes in the image, although some details are still available, for example, the "eyes" of the "baboon". We can conclude that below the undersampling rate of 0.2, it is hard to obtain the information from the image directly. Moreover, the quality of the undersampling rate is increasing with the decrease of the QF, because the quality of the image would be worse at a relatively low QF, shown in Fig. 5(b). The diagram of $RMSE$ at different QFs shows an overall trend of image quality to be decreasing with the decrease of the undersampling rate, obtaining the same result of the direct images shown in the yellow box. All of the $RMSE$s are relatively high at the low QFs. As the increment of the QF, they fluctuated to a stable value.

In the Fig. 4 (c) and Fig. 5 (b), the RMSE curves were fluctuating violently when the compression rate was low. By normalizing the transformed bucket signal into an image file ranging from 0 to 255, the values of the lowest and highest pixels were lost. Therefore, when calculating the RMSE between the original image and the retrieved image, we re-normalized the retrieved image by its maximum and minimum value. As shown in Fig. 4 (a), when the image had experienced a serious lossy compression, the image is distorted dramatically. Therefore, the location of the maxima and minima may be totally different even at similar compression rates, and thus the scales of the normalization were different. The result is the fluctuation of the RMSE curve at the lower compression rate. In this case, only the trend of the RMSE was useful. For the integrity of the experimental data, we reserved these RMSE values in the diagram.

We also test the robustness of the proposed imaging method by giving a random bias to the bucket signals. Before the bucket signals are transformed by inverse-DCT, they are multiplied a random bias defined as below:

$$\text{Bucket signal}' = \text{Bucket signal} \times (1+rand(-\text{Bias rate}, \text{Bias rate})).$$
The result of robustness with different bias noise is provided in the Fig. 6. It shows that the overall shape of the retrieved image is not significantly changed when different biases are introduced, indicating the scheme we proposed has a good robustness.

 figure: Fig. 6.

Fig. 6. Simulation results of the robustness test. The bucket signals are multiplied by a bias before compression into jpg picture. The retrieved images under some representative bias rates are given.

Download Full Size | PDF

4. Experimental results

4.1 Experiment setup and methods

A standard CGI experimental setup is used to test the performance of this method. Figure 7 provides the schematic of our experimental setup. The sequence of patterns is projected by a commercial digital projector (Epson, EP-970). The target image is printed and located at the focal plane of the projector. The SPD (Thorlabs, PDA100A2) is set near the target image, and a computer-hosted data-acquisition card (NI, PCIe-6251) is used to record the bucket signals, controlled by NI LabVIEW SignalExpress.

 figure: Fig. 7.

Fig. 7. Experimental setup. The elements are fixed in the optical table. The projector is in front of the target image, which is printed and attached to a board. The SPD is near the target image, connected with a data-acquisition card, and hence connected with the computer.

Download Full Size | PDF

The total 4096 patterns are required for our $64\times 64$ target image, where the pattern elements range in $(-1,1)$, similar to the Hadamard case. In our method, some of the patterns will result in a relatively low bucket signal value, which is in a noise level. To solve these problems, each pattern is split into 2 sub-patterns, containing positive and negative information of the original patterns only, and then being inverted:

$$M_+^{m\times n} = 1-\max(0,M^{m\times n}),$$
$$M_-^{m\times n} = 1+\min(0,M^{m\times n}),$$
where $M_+^{m\times n}$ and $M_-^{m\times n}$ represent the positive and negative sub-patterns. Therefore, there is a total of 8192 patterns to be projected.

When retrieving the image in the experiment, the bucket signals of each pattern are calculated from the bucket signals of sub-patterns by the differences between them:

$$I^{m\times n} = I_-^{m\times n}-I_+^{m\times n}.$$
Then, apply the transforming method introduced above to transform the bucket signals $I^{m\times n}$ to a sparse image $I^{p\times q}$. By this way, the matrices we obtain is equivalent to those obtained by the simulation.

4.2 Experimental data

The experiment setup, as shown in Fig. 7, is used to test two target images independently. One is a grayscale picture of "Peppers", and the other is a binary UM icon of University of Macau. All of the results in the comparison of the compressing and undersampling are shown in Fig. 8, in which the yellow box shows both images at the different QFs ranging from 10 to 100, the orange box shows both images at some undersampling rates ranging from 0.2 to 0.95, the blue box provides the original digital copy of these images as a reference, and the green box shows the diagram of $RMSE$ of two images respectively.

 figure: Fig. 8.

Fig. 8. Experimental results. (a) The yellow box shows the result of two images with respect to the quality factor. (b) The orange box shows the result concerning the undersampling rate. (c) The blue box provides two original images of targets. (d) The green box gives the plots of the $RMSE$ versus quality factor at different undersampling rate of each target.

Download Full Size | PDF

In the yellow box, the experiment at different QFs shows a similar result as the simulation, demonstrating a great resistance to the lossy compression, no matter the image is grayscaled or binary. The shape of the Peppers and the characters are still distinguishable at a QF = 25, and the area of the bright part is still clear at 10. The experiments of undersampling in the orange box give a higher noise level. At 0.2, any information of the target image is hard to be recognized from the noises; at 0.5, some of the strokes are shown in the image, though the grayscale image is still hard to distinguish. At 0.8, both grayscale and the black-white image are clear, and at 0.95, it is little difference between the perfectly retrieved image. It manifests that both grayscaled and binary image shows a similar result, and the binary image has a more stable trend. The overall trend at the high QF is clear that the $RMSE$ is downward as the increment of the undersampling rate, where the value between 0.95 and 1 is similar, indicating that it is no matter to truncate about $5\%$ during the CGI imaging process. As for the trend of the curves shown in the green box, neither stable nor monotone, the $RMSE$ with respect to the QF is not showing a clear upward or downward trend. One reason is when the image is already far away from the image, the $RMSE$ value is static to show the correlation with the target image. Another reason is that the quantization table used by the JPEG algorithm is empirical and not continuous, and hence may have different matching degrees to a sparse picture. The result shown in the experiment indicates that in its application, our method can also have a good performance to resist the lossy compression.

In addition, we test the performance of finding a key matrix using GD instead of other mainstream orthogonalization methods, for instance, the Gram-Schmidt orthogonalization of the reference light [47,48]. However, when the size of the matrix is relatively low (here is $8\times 8$), the Schmidt method may bring more elements near 0 in comparison to the total amount of pixels in the image, resulting in the darkening of the group of patterns. In the simulation, because the patterns and bucket data are stored as floating digital, the index doesn’t influence the accuracy. While, in the experiment, because the detector is sensitive to the intensity of light from the background noise, i.e. $SNR$, those "0" pixels would sharply decrease the brightness, resulting in worse image quality. In contrast, GD becomes a better method because of the controllability of the differences between each element in the key matrix. Unlike Schmidt, we can generate the key matrix where the absolute value ranges in $(0.3,1)$ and significantly increase the signal obtained by the detector. The result of the experiment shows in Fig. 9. By comparing the image quality, it manifests that GD can obtain a better image than using Gram-Schmidt orthogonalization. Therefore, We use GD method to find the key matrix in the experiment above.

 figure: Fig. 9.

Fig. 9. Experimental comparison of different ways to generate the key matrix of the sensing matrix by their performance in the experiment. Schmidt = generate by Schmidt Orthogonalization, GD = generate by GD.

Download Full Size | PDF

5. Security analysis

As an encryption method, the performance of security is pivotal. It must ensure that only the correct key can obtain the correct decrypted image. Here, we use several kinds of incorrect keys to test the decryption, and the results are shown in Fig. 10. Firstly, we test the partially corrupted key. If the correct key is corrupted by 10%, the retrieved image would have a huge error in the brightness. Further, if it is corrupted by 20%, the "baboon" would hardly be distinguished from the retrieved image. Then, we test other different keys. If we use another orthogonal key or Hadamard patterns as the key, we would obtain a totally distorted image, where no information can not be obtained from the retrieved image, although it has an image-like contrast. Finally, if we test a random key, we would obtain a random image, and no information is able to be read from the retrieved image. Above all, only the correct key with 20% tolerance can successfully retrieve the image. Hence, the security of this scheme is promised.

 figure: Fig. 10.

Fig. 10. The simulation of decrypted images with different keys. Correct = using the correct key, 10% = using the correct key but there are 10% (i.e. 6) pixels are wrong, 20% = using the correct key but there are 20% (i.e. 13) pixels are wrong, orthogonal = using another randomly generated orthogonal key, Hadamard = using Hadamard patterns as the key, random = using another randomly generated non-orthogonal key.

Download Full Size | PDF

6. Conclusion

In summary, we have proposed a method to encrypt the image by CGI, transforming the bucket signal to concentrate them to the high-frequency domain, enabling it to resist lossy compression. The amount of data in conventional CGI encryption to be transmitted is relatively high, and this method has provided an effective way to reduce the data amount and transmit data without lossy compression. In this method, the CGI bucket signals (cipher text) can be transmitted in a more friendly format of the image to camouflage itself, hence protecting information security more efficiently. It has also been important to note that this method uses a key of 1/64 times the target image size, significantly lowering the pressure to send the encryption key. To capture and send an image using the concept of CGI, we have firstly generated a key matrix by GD and used it to obtain a set of patterns. Then, the DCT in each $8\times 8$ grid to transform the bucket signal to the space domain has been done to the matrix for the preparation of sending it. The receiver can extract the key and bucket signal matrix, and use the LD method to obtain the target image. Moreover, it is also possible to apply this method to multi-image encryption. In our scheme, the key and the cipher image are all in grayscale. Therefore, we can overlap three cipher images, corresponding to the red, green, and blue channels, to encrypt three images at once.

In the simulations, we have tested the performance of this method in contrast to the Hadamard matrix as a sensing matrix and without using DCT at the lossy compression of the JPEG algorithm. The result has shown that the method to construct the sensing matrix successfully inserts the encryption key to the image without losing the image quality than the Hadamard matrix; and the process of DCT has been able to significantly protect the data lost from the lossy compression. We have also tested the undersampling condition using the CC method. The result has shown the distinguishablility of the image is above an undersampling rate of 0.5. In experiment, our method has been tested with both grayscaled and binary images, and the result has shown a similar trend as the simulation of the lossy compression and undersampling condition, only the noise level of the undersampling is slightly higher than the simulation result. In addition, we have also examined the differences in generating the key matrix between Schmidt and GD. The result has demonstrated that the GD has a better result if the size of the key matrix is low. The experiment results has proven that the technique proposed in this work would have a good result in its application, especially in those schemes restricting the data amount or the format of the encrypted image.

Funding

Multi-Year Research Grant of University of Macau (MYRG2020-00082-IAPME); Science and Technology Development Fund from Macau SAR (FDCT) (0062/2020/AMJ).

Disclosures

The authors declare no conflicts of interest.

Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

References

1. D. Klyshko, “Combine epr and two-slit experiments: Interference of advanced waves,” Phys. Lett. A 132(6-7), 299–304 (1988). [CrossRef]  

2. T. B. Pittman, Y. H. Shih, D. V. Strekalov, and A. V. Sergienko, “Optical imaging by means of two-photon quantum entanglement,” Phys. Rev. A 52(5), R3429–R3432 (1995). [CrossRef]  

3. J. H. Shapiro, “Computational ghost imaging,” Phys. Rev. A 78(6), 061802 (2008). [CrossRef]  

4. Z. Zhang, X. Wang, G. Zheng, and J. Zhong, “Hadamard single-pixel imaging versus fourier single-pixel imaging,” Opt. Express 25(16), 19619–19639 (2017). [CrossRef]  

5. T. Lu, Z. Qiu, Z. Zhang, and J. Zhong, “Comprehensive comparison of single-pixel imaging methods,” Opt. Lasers Eng. 134, 106301 (2020). [CrossRef]  

6. P. Clemente, V. Durán, V. Torres-Company, E. Tajahuerce, and J. Lancis, “Optical encryption based on computational ghost imaging,” Opt. Lett. 35(14), 2391–2393 (2010). [CrossRef]  

7. L.-J. Kong, Y. Li, S.-X. Qian, S.-M. Li, C. Tu, and H.-T. Wang, “Encryption of ghost imaging,” Phys. Rev. A 88(1), 013852 (2013). [CrossRef]  

8. Y. Liu, P. Yu, Y. Li, and L. Gong, “Exploiting light field imaging through scattering media for optical encryption,” OSA Continuum 3(11), 2968–2975 (2020). [CrossRef]  

9. L. Sui, C. Du, M. Xu, A. Tian, and A. Asundi, “Information encryption based on the customized data container under the framework of computational ghost imaging,” Opt. Express 27(12), 16493–16506 (2019). [CrossRef]  

10. J. Du, Y. Xiong, C. Wu, and C. Quan, “Optical image encryption with high efficiency based on variable-distance ghost imaging,” Optik 252, 168484 (2022). [CrossRef]  

11. K. Yi, Z. Leihong, and Z. Dawei, “Optical encryption based on ghost imaging and public key cryptography,” Opt. Lasers Eng. 111, 58–64 (2018). [CrossRef]  

12. H.-C. Liu and W. Chen, “Optical ghost cryptography and steganography,” Opt. Lasers Eng. 130, 106094 (2020). [CrossRef]  

13. L. Sui, Y. Cheng, A. Tian, and A. K. Asundi, “An optical watermarking scheme with two-layer framework based on computational ghost imaging,” Opt. Lasers Eng. 107, 38–45 (2018). [CrossRef]  

14. J. Wang and Z. Du, “A method of processing color image watermarking based on the haar wavelet,” J. Vis. Commun. Image Represent. 64, 102627 (2019). [CrossRef]  

15. L. Wang, S. Zhao, W. Cheng, L. Gong, and H. Chen, “Optical image hiding based on computational ghost imaging,” Opt. Commun. 366, 314–320 (2016). [CrossRef]  

16. S. Yuan, D. A. Magayane, X. Liu, X. Zhou, G. Lu, Z. Wang, H. Zhang, and Z. Li, “A blind watermarking scheme based on computational ghost imaging in wavelet domain,” Opt. Commun. 482, 126568 (2021). [CrossRef]  

17. X. Sun, S. Zhang, R. Ma, Y. Tao, Y. Zhu, D. Yang, and Y. Shi, “Natural speckle-based watermarking with random-like illuminated decoding,” Opt. Express 28(21), 31832–31843 (2020). [CrossRef]  

18. L. Zheng, R. Xiong, J. Chen, and D. Zhang, “Optical image compression and encryption transmission-based ondeep learning and ghost imaging,” Appl. Phys. B 126(1), 1–10 (2020). [CrossRef]  

19. P. Zheng, Q. Dai, Z. Li, Z. Ye, J. Xiong, H.-C. Liu, G. Zheng, and S. Zhang, “Metasurface-based key for computational imaging encryption,” Sci. Adv. 7(21), eabg0363 (2021). [CrossRef]  

20. Z. Li, G. Dong, D. Yang, G. Li, S. Shi, K. Bi, and J. Zhou, “Efficient dielectric metasurface hologram for visual-cryptographic image hiding,” Opt. Express 27(14), 19212–19217 (2019). [CrossRef]  

21. O. Katz, Y. Bromberg, and Y. Silberberg, “Compressive ghost imaging,” Appl. Phys. Lett. 95(13), 131110 (2009). [CrossRef]  

22. R. Zhu, G.-s. Li, and Y. Guo, “Block-compressed-sensing-based reconstruction algorithm for ghost imaging,” OSA Continuum 2(10), 2834–2843 (2019). [CrossRef]  

23. J. Liu, J. Zhu, C. Lu, and S. Huang, “High-quality quantum-imaging algorithm and experiment based on compressive sensing,” Opt. Lett. 35(8), 1206–1208 (2010). [CrossRef]  

24. X. Li, X. Meng, Y. Yin, Y. Wang, X. Yang, X. Peng, W. He, G. Dong, and H. Chen, “Multilevel image authentication using row scanning compressive ghost imaging and hyperplane secret sharing algorithm,” Opt. Lasers Eng. 108, 28–35 (2018). [CrossRef]  

25. L. Sui, Z. Pang, Y. Cheng, Y. Cheng, Z. Xiao, A. Tian, K. Qian, and A. Anand, “An optical image encryption based on computational ghost imaging with sparse reconstruction,” Opt. Lasers Eng. 143, 106627 (2021). [CrossRef]  

26. L. Gong, K. Qiu, C. Deng, and N. Zhou, “An image compression and encryption algorithm based on chaotic system and compressive sensing,” Opt. Lasers Eng. 115, 257–267 (2019). [CrossRef]  

27. H. Wu, X. Meng, Y. Wang, Y. Yin, X. Yang, W. He, G. Dong, and H. Chen, “High compressive ghost imaging method based on discrete cosine transform using weight coefficient matching,” J. Mod. Opt. 66(17), 1736–1743 (2019). [CrossRef]  

28. H. Wu, X. Zhang, J. Gan, C. Luo, and P. Ge, “High-quality correspondence imaging based on sorting and compressive sensing technique,” Laser Phys. Lett. 13(11), 115205 (2016). [CrossRef]  

29. W.-K. Yu, M.-F. Li, X.-R. Yao, X.-F. Liu, L.-A. Wu, and G.-J. Zhai, “Adaptive compressive ghost imaging based on wavelet trees and sparse representation,” Opt. Express 22(6), 7133–7144 (2014). [CrossRef]  

30. H. Wu, R. Wang, G. Zhao, H. Xiao, D. Wang, J. Liang, X. Tian, L. Cheng, and X. Zhang, “Sub-nyquist computational ghost imaging with deep learning,” Opt. Express 28(3), 3846–3853 (2020). [CrossRef]  

31. L. Wang and S. Zhao, “Fast reconstructed and high-quality ghost imaging with fast walsh–hadamard transform,” Photonics Res. 4(6), 240–244 (2016). [CrossRef]  

32. Z. Cai, H. Zhao, M. Jia, G. Wang, and J. Shen, “An improved hadamard measurement matrix based on walsh code for compressive sensing,” in 2013 9th International Conference on Information, Communications & Signal Processing, (IEEE, 2013), pp. 1–4.

33. W.-K. Yu, “Super sub-nyquist single-pixel imaging by means of cake-cutting hadamard basis sort,” Sensors 19(19), 4122 (2019). [CrossRef]  

34. M.-J. Sun, L.-T. Meng, M. P. Edgar, M. J. Padgett, and N. Radwell, “A russian dolls ordering of the hadamard basis for compressive single-pixel imaging,” Sci. Rep. 7, 1–7 (2017). [CrossRef]  

35. C. Zhou, T. Tian, C. Gao, W. Gong, and L. Song, “Multi-resolution progressive computational ghost imaging,” J. Opt. 21(5), 055702 (2019). [CrossRef]  

36. P. G. Vaz, D. Amaral, L. R. Ferreira, M. Morgado, and J. Cardoso, “Image quality of compressive single-pixel imaging using different hadamard orderings,” Opt. Express 28(8), 11666–11681 (2020). [CrossRef]  

37. X. Yu, R. I. Stantchev, F. Yang, and E. Pickwell-MacPherson, “Super sub-nyquist single-pixel imaging by total variation ascending ordering of the hadamard basis,” Sci. Rep. 10, 1–11 (2020). [CrossRef]  

38. M. Zafari, R. kheradmand, and S. Ahmadi-Kandjani, “Optical encryption with selective computational ghost imaging,” J. Opt. 16(10), 105405 (2014). [CrossRef]  

39. R. Zhu, H. Yu, Z. Tan, R. Lu, S. Han, Z. Huang, and J. Wang, “Ghost imaging based on y-net: a dynamic coding and decoding approach,” Opt. Express 28(12), 17556–17569 (2020). [CrossRef]  

40. D. Duan and Y. Xia, “Real-time pseudocolor coding thermal ghost imaging,” J. Opt. Soc. Am. A 31(1), 183–187 (2014). [CrossRef]  

41. H. Ye, L. Zhang, J. Chen, K. Wang, D. Zhang, and S. Zhuang, “Information transmission based on a fourier transform and ascending coding temporal ghost imaging algorithm,” Laser Phys. 30(12), 125202 (2020). [CrossRef]  

42. Y. Kang, L. Zhang, H. Ye, M. Zhao, S. Kanwal, C. Bai, and D. Zhang, “One-to-many optical information encryption transmission method based on temporal ghost imaging and code division multiple access,” Photonics Res. 7(12), 1370–1380 (2019). [CrossRef]  

43. X. Dong, F. Cao, S. Zhao, and B. Zheng, “Improvement of ghost imaging on orbital angular momentum by using jpeg & linear block codes,” in 2011 International Conference on Wireless Communications and Signal Processing (WCSP), (IEEE, 2011), pp. 1–4.

44. S. Ruder, “An overview of gradient descent optimization algorithms,” arXiv preprint arXiv:1609.04747 (2016).

45. I. Hoshi, T. Shimobaba, T. Kakue, and T. Ito, “Optimized binary patterns by gradient descent for ghost imaging,” IEEE Access 9, 97320–97326 (2021). [CrossRef]  

46. S. Zhao, L. Wang, W. Liang, W. Cheng, and L. Gong, “High performance optical encryption based on computational ghost imaging with qr code and compressive sensing technique,” Opt. Commun. 353, 90–95 (2015). [CrossRef]  

47. P. Yin, L. Yin, B. Luo, G. Wu, and H. Guo, “Ghost imaging with gram-schmidt orthogonalization,” in Imaging and Applied Optics 2018 (3D, AO, AIO, COSI, DH, IS, LACSEA, LS&C, MATH, pcAOP), (Optical Society of America, 2018), p. CTh4A.2.

48. B. Luo, P. Yin, L. Yin, G. Wu, and H. Guo, “Orthonormalization method in ghost imaging,” Opt. Express 26(18), 23093–23106 (2018). [CrossRef]  

Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (10)

Fig. 1.
Fig. 1. The working sequence to produce the sensing matrices (patterns) from a random $\{-1,1\}$ matrix with 1/8 height and 1/8 width of the target matrices. "Kron" means "Kronecker Product"
Fig. 2.
Fig. 2. The working sequence from the target image to the cipher image. (a) The image encryption and transformation of bucket signals from sensing matrix’s domain into the space domain using inverse-DCT. (b) The cipher image at different quality factor / compression rate.
Fig. 3.
Fig. 3. Decryption process for the receiver. The yellow area includes all the contents that the receiver would get, and the green box gives the example the receiver would finally reconstructed.
Fig. 4.
Fig. 4. Simulation results in different quality factors. OT = original target image only being compressed at this rate as a reference, RS = retrieved image using sensing matrix and DCT, RH = retrieved image using Hadamard matrix and DCT, RN = retrieved image using sensing matrix but without DCT. (a) The yellow box shows the comparison between OT, RS and RH in low compression ratio. (b) The orange box shows the comparison between OT, RS and RN in high compression ratio. (c) The green box shows the RMSE versus the quality factor of the images in yellow and orange boxes.
Fig. 5.
Fig. 5. Simulation results in different quality factors and undersampling rates. UR = undersampling rate. (a) The yellow box shows the image quality of different quality factors at different undersampling rates. (b) The green box gives the plot of the $RMSE$ versus the corresponding sampling rate.
Fig. 6.
Fig. 6. Simulation results of the robustness test. The bucket signals are multiplied by a bias before compression into jpg picture. The retrieved images under some representative bias rates are given.
Fig. 7.
Fig. 7. Experimental setup. The elements are fixed in the optical table. The projector is in front of the target image, which is printed and attached to a board. The SPD is near the target image, connected with a data-acquisition card, and hence connected with the computer.
Fig. 8.
Fig. 8. Experimental results. (a) The yellow box shows the result of two images with respect to the quality factor. (b) The orange box shows the result concerning the undersampling rate. (c) The blue box provides two original images of targets. (d) The green box gives the plots of the $RMSE$ versus quality factor at different undersampling rate of each target.
Fig. 9.
Fig. 9. Experimental comparison of different ways to generate the key matrix of the sensing matrix by their performance in the experiment. Schmidt = generate by Schmidt Orthogonalization, GD = generate by GD.
Fig. 10.
Fig. 10. The simulation of decrypted images with different keys. Correct = using the correct key, 10% = using the correct key but there are 10% (i.e. 6) pixels are wrong, 20% = using the correct key but there are 20% (i.e. 13) pixels are wrong, orthogonal = using another randomly generated orthogonal key, Hadamard = using Hadamard patterns as the key, random = using another randomly generated non-orthogonal key.

Equations (14)

Equations on this page are rendered with MathJax. Learn more.

C F = P × | K k K k T | 2 | m I | 2 + ( 1 P ) × | | K k | J | 2 ,
M m × n = K k ( m / 8 ) × ( n / 8 ) Hadamard ( 8 ) .
M i , j m × n = i t h row j t h column ,
I m , n = i , j M m , n i , j T i , j ,
I u , y = I u , 1 + 2 v = 2 8 I u , v cos ( π ( 2 y + 1 ) v 16 ) ,
I x , y = I 1 , y + 2 u = 2 8 I u , y cos ( π ( 2 x + 1 ) u 16 ) .
I x , v = 2 y = 1 8 I x , y cos ( π ( 2 y + 1 ) v 16 ) ,
I u , v = 2 x = 1 8 I x , v cos ( π ( 2 x + 1 ) u 16 ) .
O m , n = i , j M i , j m , n I i , j .
R M S E ( O m × n , T m × n ) = 1 m × n m , n ( O m × n T m × n ) 2 .
Bucket signal = Bucket signal × ( 1 + r a n d ( Bias rate , Bias rate ) ) .
M + m × n = 1 max ( 0 , M m × n ) ,
M m × n = 1 + min ( 0 , M m × n ) ,
I m × n = I m × n I + m × n .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.