Mobile devices are a ubiquitous technology, and many researchers are trying to implement three-dimensional (3D) displays on mobile devices for a variety of applications. We investigate a method to store compressed and encrypted elemental images (EIs) used for 3D integral imaging displays in multiple quick-response (QR) codes. This approach allows user friendly access, readout, and 3D display with mobile devices. We first compress the EIs and then use double-random-phase encryption to encrypt the compressed image and store this information in multiple QR codes. The QR codes are then scanned using a commercial Smartphone to reveal the encrypted information, which can be decrypted and decompressed. We also introduce an alternative scheme by applying photon counting to each color channel of the EIs prior to the aforementioned compression and encryption scheme to generate sparsity and nonlinearity for improved compression and security. Experimental results are presented to demonstrate both 3D computational reconstruction and optical 3D integral imaging display with a Smartphone using EIs from the QR codes. This work utilizing compressed QR encoded EIs for secure integral imaging displays using mobile devices may enable secure 3D displays with mobile devices.
© 2014 Optical Society of America
Integral imaging, a promising three-dimensional (3D) imaging technique, has been extensively investigated in disciplines as diverse as entertainment, medical sciences, robotics, manufacturing, and defense [1–9]. Photon counting has been incorporated with integral imaging [6,7] to reconstruct a 3D image from a photon-starved environment. Recently, double-random-phase encryption (DRPE) with photon counting has been incorporated with integral imaging . It was shown that integral imaging can provide better security performance along with the ability to secure 3D information. The DRPE technique [10–18] is able to encrypt and decrypt an image. There have been numerous improvements to the encryption system to enhance security [12–14] in the system. One encryption scheme involves applying a photon-counting technique to the amplitude of the encrypted image generating a photon-limited image [6,7,15,17]. This technique limits the number of photons arriving at a pixel. As a result, the decrypted image is sparse, noise-like, and difficult to visually authenticate. In , a binary image was encrypted and compressed using the full-phase DRPE with photon counting and an iterative Huffman coding technique, respectively, and stored in a quick-response (QR) code. The QR code was then scanned by a QR reader built in commercial Smartphones revealing the data. The scanned data were then decompressed and decrypted revealing a noise-like decrypted image that can be authenticated using nonlinear correlation filters [19–21]. In this Letter, we propose a method to securely store a RGB elemental image (EI) in a QR code by combining run-length encoding (RLE)  with the Huffman coding compression  scheme along with DRPE . By storing data in a QR code [24–26], it is possible to reduce the amount of information needed to transfer the EI. We can store multiple EIs in QR codes that can be used in 3D integral imaging reconstruction [1–9]. In addition, we present an alternative scheme by first applying photon counting on the EI followed by RLE, Huffman coding, and encryption to generate sparsity and nonlinearity due to Poisson transformation for improved compression and security. Both computational and optical reconstruction of the EIs is presented.
Integral imaging [1–9] can produce a 3D image of a scene by recording multiple two-dimensional (2D) images of different perspectives of the scene, known as EIs. This is achieved by using various pickup methods such as an array of image sensors or a camera with a lenslet array, as shown in Fig. 1(a). Reconstruction of the 3D scene from the recorded EIs can be performed optically, as shown in Fig. 1(b), or computationally. Optical reconstruction is performed by projecting the EIs through a lenslet array to the image plane forming a 3D scene. Computational reconstruction uses a virtual pinhole array to inversely project the EIs to the image plane to obtain the reconstructed scene as follows [4,6,9]:
DRPE is used to encrypt the input image . One-dimensional (1D) notation will be used in explaining the encryption method. To implement the encryption scheme, let and denote the spatial and frequency domains, respectively, be the primary input image, and and represent random noises that are uniformly distributed over the interval [0,1]. The encrypted image is
The decryption process is the reverse of the encryption process. The Fourier transform of the DRPE image, , is multiplied by the complex conjugate image of the phase mask, . The Fourier transform is taken once more. The intensity of the image can then be recorded, which produces the decrypted image, , if the primary input image is real and positive.
RLE  is a lossless compression technique that represents a series of repeated data by stating the number of times the data are repeated followed by the repeated integer. For example, [8 8 8 8 8] is represented by [5 8]. Huffman coding  is a dictionary-based compression technique that can be combined with RLE to allow for sufficiently small images to be stored in a QR code. By combining the two compression methods, less information is stored in the QR code, improving the ability of a Smartphone to scan the QR code .
We compress each channel of the RGB image using RLE followed by Huffman coding. The DRPE [Eq. (2)] is used to encrypt each channel of the compressed image. Due to the ciphered images being complex, both the real and imaginary parts must be retained. As a result, both are stored in separate QR codes, which are generated using the ZXing project . In addition, the encrypted images are rounded to one decimal place to minimize the amount of necessary information stored in the image. Each ciphered channel of the RGB image can then be stored in separate QR codes. Moreover, we can use the same encryption keys for each color channel. For a single RGB image, six QR codes are used in our experiments. The EI must be sufficiently small so that the compressed and encrypted data can be stored in a single QR code.
Once the QR code has been scanned, the data can be successfully decrypted if the decryption keys are known. In addition, the image can be decompressed if the dictionary associated with the Huffman code compression is known; no dictionary is required to decompress the RLE algorithm.
Figure 2(a) depicts a pixel input RGB image. For brevity, the red channel of the RGB image is explained. The process can be repeated for the other channels. Figure 2(b) shows a QR code that stores the real part of the ciphered input image, while Fig. 2(c) shows the imaginary part of the ciphered input image. Figures 2(d) and 2(e) display the compressed and encrypted data stored in the QR codes using the iPhone SCAN application. After decompressing and decrypting the necessary data, the three color channels of the decrypted image are combined to form the decrypted RGB image as shown in Fig. 2(f).
To determine the degree of degradation (if any) due to DRPE combined with RLE and Huffman coding compression schemes, the mean squared error (MSE) is calculated as
It is possible to store multiple encrypted and compressed images in multiple QR codes as shown in Fig. 3. Each QR code can be scanned allowing for every EI to be recovered. Thus, this approach can have applications in integral imaging reconstruction by storing the EIs in QR codes.
A 3D integral imaging experiment was conducted for computational integral imaging reconstruction. Each EI used identical encryption and decryption keys. Moreover, identical encryption keys were used in the spatial and frequency domains. Four pixel RGB EIs, shown in Fig. 4(a), were generated using 3Ds Max. The 3D scene consists of a green “3” and red letter “D” located 65 and 115 mm away from a lenslet array. These images were compressed using RLE followed by Huffman coding compression and then encrypted with DRPE. These EIs were decrypted and decompressed revealing the original EIs.
Computational reconstruction results using Eq. (1) were obtained. Figure 4(b) depicts the computational reconstruction at 65 mm focused on “3,” while Fig. 4(c) depicts computational results at 115 mm focused on “D.”
Storing a large quantity of EIs in multiple QR codes may prove burdensome and inconvenient. Regardless, with improving camera resolution and hardware of Smartphones, it will be possible in the future to store more information in QR codes. Thus, it may be feasible to store a prodigious number of encrypted and compressed EIs in QR codes. An optical experiment was carried out using the proposed compression and encryption scheme to secure EIs for 3D display. Using 3Ds Max, RGB EIs, similar to the EIs shown in Fig. 4(a), were used, which were each pixels. As before, each EI used identical encryption and decryption keys. These images were then compressed using RLE followed by Huffman coding compression and encrypted with DRPE. Each EI had identical encryption keys for both the spatial and frequency domains. These EIs were then decrypted and decompressed revealing the EIs. An HTC One Smartphone was used to display the optical reconstruction. Figure 5 depicts the experimental setup for optical reconstruction using an HTC One Smartphone and a lenslet array. Table 1 presents the experimental parameters.
Figure 6(a) depicts the 3D optical reconstruction using the primary EIs, while Fig. 6(b) depicts the 3D optical reconstruction using the decompressed and decrypted EIs. The reconstruction results using our proposed method are as good as the conventional method. There is no visible loss of information due to compression, encryption, and QR encoding.
Storing data in QR codes holds many practical advantages due to not requiring any specialized hardware to scan the QR code. Moreover, Smartphones are a ubiquitous technology. The proposed technique of storing QR codes can potentially be modified by creating a video barcode as described in  to allow a faster user experience when scanning multiple QR codes.
We now introduce an alternative compression and security approach. We first apply photon counting [6,7,15,17] to each channel of an RGB EI, . Photon counting is described by a statistical method for a limited number of photons that arrive at a pixel. Thus, the lower the total number of photons in the image, the fewer the number of photons that arrive at a pixel. By reducing the number of photons, it is possible to have more sparsity, improving the RLE compression scheme used prior to Huffman coding. Also, the nonlinear transformation introduced by photon counting improves the security. Photon counting can be modeled as a Poisson distribution:
A RGB EI array with each EI being pixels, similar to the EI depicted in Fig. 7(a), was used for 3D photon-counting imaging compression and security. The object chosen was a color gradient teapot generated by 3Ds Max.
Photon counting was applied to each channel of the RGB EI as shown in Fig. 7(b) using 3000 photons or about eight photons per pixel on each channel of the RGB image. RLE is then applied, followed by Huffman coding and DRPE. The image was then decrypted and decompressed. Optical reconstruction using an HTC phone (see Table 1) was used to reconstruct the image [see Eq. (1)]. Figure 7(c) depicts the optical reconstruction showing the original EI, while Fig. 7(d) depicts the optical reconstruction using the photon-limited EI. The MSE [see Eq. (3)] was calculated to determine the degree of degradation for each individual color channel. For comparison, both images were normalized to [0,255]. The MSE for the red color channel was calculated as 62.94, the green channel was 1.07, and the blue channel was 19.73. Thus, there was some degree of degradation; however, visually the 3D optical reconstruction of the photon-counted image can still be discerned.
A comparison of the compression with and without photon counting was conducted. It was found that for a sufficiently lower number of photons, the photon-counting method helped to improve the compression scheme. Using the EIs in Figs. 7(c) and 7(d), the total length of the Huffman code following RLE was compared. It was found that the red channel was 21.7% shorter and the blue channel was 18.53% shorter; there were no green channel components in the test image. These results show that photon counting may allow for larger EIs to be stored in QR codes after compression and encryption.
We have presented a method and experiments for secure integral imaging as a potential approach to store EIs in QR codes for 3D displays. The compressed and encrypted EIs using DRPE can be stored in multiple QR codes to be scanned by a commercial Smartphone revealing the encrypted and compressed EIs. This data can then be decrypted and decompressed to obtain the original EIs for secure 3D integral imaging displays. We also present an alternative compression and security scheme by applying photon counting to the input image followed by compression and encryption. By using photon counting, the compression and security system improve at the cost of diminished image quality. Future work may include alternative algorithms for encrypting the EIs, compressing the EIs, and video scanning the QR codes.
1. G. Lippmann, C. R. Acad. Sci. 146, 446 (1908).
2. H. E. Ives, J. Opt. Soc. Am. 21, 171 (1931). [CrossRef]
3. F. Okano, H. Hoshino, J. Arai, and I. Yuyama, Appl. Opt. 36, 1598 (1997). [CrossRef]
4. S. Hong, J. Jang, and B. Javidi, Opt. Express 12, 483 (2004). [CrossRef]
5. F. Okano, J. Arai, K. Mitani, and M. Okui, Proc. IEEE 94, 490 (2006). [CrossRef]
6. B. Tavakoli, B. Javidi, and E. Watson, Opt. Express 16, 4426 (2008). [CrossRef]
7. M. Cho and B. Javidi, Opt. Lett. 38, 3198 (2013). [CrossRef]
8. L. Yang, M. McCormick, and N. Davies, Appl. Opt. 27, 4529 (1988). [CrossRef]
9. X. Xiao, B. Javidi, M. Martinez-Corral, and A. Stern, Appl. Opt. 52, 546 (2013). [CrossRef]
10. P. Réfrégier and B. Javidi, Opt. Lett. 20, 767 (1995). [CrossRef]
11. B. Javidi and J. L. Horner, Opt. Eng. 33, 1752 (1994). [CrossRef]
12. A. Carnicer, M. Montes-Usategui, S. Arcos, and I. Juvells, Opt. Lett. 30, 1644 (2005). [CrossRef]
13. Y. Frauel, A. Castro, T. J. Naughton, and B. Javidi, Opt. Express 15, 10253 (2007). [CrossRef]
14. O. Matoba and B. Javidi, Opt. Lett. 24, 762 (1999). [CrossRef]
15. E. Pérez-Cabré, M. Cho, and B. Javidi, Opt. Lett. 36, 22 (2011). [CrossRef]
16. J. F. Barrera, A. Mira, and R. Torroba, Opt. Express 21, 5373 (2013). [CrossRef]
17. A. Markman, B. Javidi, and M. Tehranipoor, IEEE J. Photonics 6, 1 (2014).
18. J. F. Heanue, M. C. Bashaw, and L. Hesselink, Appl. Opt. 34, 6012 (1995). [CrossRef]
19. F. Sadjadi and B. Javidi, Physics of Automatic Target Recognition (Springer, 2007).
20. B. Javidi, Appl. Opt. 28, 4518 (1989). [CrossRef]
21. F. Dubois, Appl. Opt. 32, 4365 (1993). [CrossRef]
22. R. Bose, Information Theory, Coding, and Cryptography (Tata McGraw-Hill, 2002).
23. D. Huffman, Proc. IRE 40, 1098 (1952). [CrossRef]
24. “QR code minimum size,” http://www.qrstuff.com.
26. X. Liu, D. Doermann, and H. Li, IEEE Trans. Multimedia 10, 361 (2008).