Storage and reconstruction of multiple color images with a phase-only hologram

An optical method for storing and recovering multiple color images is presented in this paper. In the storing process, the red, green, and blue components of a color image are separated and respectively quantized. Then the three quantized components are combined as a gray image. Multiple gray images are modulated with corresponding blazed gratings and superposed in a phase-only hologram. In the recovering process, a spatial filter is used to extract all the gray images from the hologram, and the gray scales of the gray images are then converted to the pre-defined colors. The simulation shows that 206 color images can be stored in a phase-only hologram of a size of 512 by 512 pixels and reconstructed from the hologram with high fidelity.


Introduction
Optical encryption/decryption techniques based on the wavelength, phase, angle, and etc have been extensively used in information encryption and storage [1][2][3][4]. Luisa et al proposed a smart image-packaging optical technique and stored 12 gray images in modulated speckle patterns [5]. Mosso et al demonstrated encryption/ decryption of a video with 4-f system [6], and used a sinusoidal transmission grating to superpose 22 encrypted gray images into a single hologram. Aldossari proposed a spectral fusion method to store gray images of close resemblance [7], and 26 gray images were compressed in the spectrum of a size of N×N pixels. Sorayda et al introduced an opto-digital protocol to handle data for multiple-image storage [8], and recovered 16 gray images with a single operation. Tao et al proposed a method to store 198 gray images in a phase mask [9]. However, all these approaches were used to store and reconstruct gray images only.
Color images are more widely used in information area. Zhang et al proposed a method to convert a color image to an indexed image [10]. Chen et al proposed a method based on the fractional Fourier transform and wavelength multiplexing, and one color image was stored [11]. He et al realized the storage of four color images with an orthogonal composite grating [12]. Mosso et al introduced a pure optical dynamical color image encryption method to implement 30 color images at one time [13]. Obviously, the proposed techniques have limited storage capacity for color images.
In this paper we will propose an optical method to store color images with ultra-high storage capacity. The proposed method will have potential applications in the fields of information encryption, data storage, and so on. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

Quantization of color image
In the quantization process, the color of each pixel in a color image is determined by the values of the red (R), green (G), and blue (B) components. A color image can be decomposed into the three components, which will be quantized respectively. The three quantized components can then be combined as a quantized color image.
The R, G, and B components of a color image will be quantized with equation (1).
where r(i, j), g(i, j), and b(i, j) represent the values of the three components of a pixel of a color image, respectively. r′(i, j), g′(i, j), and b′(i, j) are the quantized values of the three components, respectively. In the first part of equation (1), if r(i, j)=g(i, j)=b(i, j), the values of the components are rounded into multiples of 7, so 36 gray colors are formed. In the second part of equation (1), as the quantized value of each component in a pixel has six possible values, i.e., 0, 51, 102, 153, 204, and 255, in the range of 0-255, 6×6×6=216 combinations of the three components can be formed. Moreover, we randomly select four colors from the remaining colors of the original image f (x, y). Hence, 36+216+4=256 quantized colors are formed totally. The quantized color image f′(x, y) with 256 colors will be used to represent the original color image f (x, y). As we know, a gray image has 256 gray scales, which will be mapped to the 256 quantized colors. In this way, the quantized color image f′(x, y) can be converted to a gray image h(x, y).   R=G=B. The four randomly selected colors are then arranged in the blue-frame boxes. Finally, the remaining 210 colors are arranged. The order of the arrangement is shown with dots, which stand for the starting points of the columns. We will use the gray scale of 0 to represent the color (0, 0, 0), the gray scale of 1 to represent the color (7, 7, 7), and so on. We will allocate the gray values to the quantized colors according to the orders of the colors in the color mapping structure. In this way, the 256 colors are represented with the 256 gray scales.

Image superposition and reconstruction
The storing and recovering process is based on references [6,9]. The transmission function of a blazed grating can be written as equation (2), where λ is the wavelength of the illuminating light, θ is the blazed angle of the grating, and x is the variable of the horizontal distance expressed in equation (3), where d represents the period of the grating. Equation (4) shows the ith grating used for the modulation of the input image, where imrotate [] γ is a function that rotates the whole grating by an angle of γ. Since the grating has the same pixel dimensions as the gray image, all the modulated images can be superposed in a same-sized hologram. The modulation and superposition of the input images can be described in equation (5), where h i (x, y) represents the ith input gray image, which is transformed from the quantized color image f i (x, y) according to the order of the color in the mapping structure of figure 2. A(x, y) and exp[jf(x, y)] are the amplitude and phase terms of the superposed element, respectively. As a phase-only element will be more conveniently fabricated than a complex-amplitude one, we will use the phase term, i.e., phase-only hologram, to represent the superposed element. The frequency spectrum of the phase-only hologram can be expressed in equation (6), where f x and f y stand for the coordinates of the frequency domain, and FT represents the Fourier transform. The spectrum M( f x , f y ) of the hologram contains many diffraction spots, which are corresponding to the input images. With a selection of varying blazed angles and the rotating angles for the gratings, the location distributions of the diffraction spots in the Fourier plane can be determined in advance. In our simulation, a series of blazed gratings with different blazed angles and orientations were used to modulate the input images. The images were modulated with the corresponding gratings and superposed as a same-sized complex-amplitude distribution, whose phase term was saved as a phase-only hologram. As an example, 206 color images were extracted from a video and used as input images. The first 12 frames of the 206 color images extracted from a video are shown in figure 3(a), and the 12 gray images converted from the 12 color images are shown in figure 3(b). Figure 4 shows the superposition and reconstruction processes of the gray images. In the simulation, seven blazed gratings with blazed angles 5.73°, 9.65°, 12.41°, 15.64°, 18.78°, 21.81°, and 24.23°were used in the superposition. Firstly, the blazed grating of 5.73°rotates by 36°a step for an input image, so the diffraction spots of 10 images will be distributed along a circle with a radius of 50 pixels. Secondly, the blazed grating of 9.65°r otates by 20°a step for an input image, so the diffraction spots of 18 images will be allocated in a larger circle. In such a way, a total of 206 gray images can be modulated and superposed in a hologram of 512×512 pixels. The phase distribution of the 206 superposed images is shown in figure 5. Figure 6(a) shows the diffraction spots of the 206 superposed images in the frequency domain, where each diffraction spot corresponds to a gray image. The spatial filter comprising 206 circular apertures is shown in figure 6(b). The filtered gray image obtained from a diffraction spot is written in equation (7), where h i ′(x, y) represents the ith filtered gray image, FT −1 the inverse Fourier transform, and M( f x , f y ) the spectrum of the hologram. S i ( f x , f y ) is the ith spatial filter expressed in equation (8), where fcx i and fcy i represent the coordinates of the center of the ith spatial filter whose location is identical to that of the corresponding diffraction spot in the Fourier plane, and R i is the radius of the ith filtering aperture. To obtain more spectral information and avoid spectral fusion of the images, we set the value of R i based on the spacing between the adjacent diffraction spots. The diameter of each of the apertures of the filter is set as 30 pixels in our simulation. The value of S i ( f x , f y ) ranges from 0 to 1. Figure 7 shows the first 12 of the 206 recovered gray images. The gray image h′(x, y) with fractional values was firstly rounded and saved as h″(x, y), and then the recovered color image was obtained from h″(x, y) with the mapping structure. Figure 8 shows the first 12 of the 206 recovered color images. It can be seen in figure 8 that most of the color information is recovered, although the colors of the recovered images have a little difference from the quantized color images. The reason is that only the phase of the complex amplitude of the superposed element was used, and the gray values of the filtered gray images were rounded at the recovering process.
We will use the peak signal to noise ratio (PSNR) between the color image and the recovered one to evaluate the quality of the whole process. PSNR is expressed in equation (9), where N is the number of the sampling points, and I i (x, y) represents the intensity of a component of the input image and I i ″(x, y) represents the intensity of the corresponding component of the recovered image. The PSNRs of the three components are calculated based on equation (9), respectively. In figure 9 each of the PSNR values of the recovered color images is obtained by calculating the average of the PSNRs of the three components. Figure 9 shows the PSNRs of the recovered color images. It can be seen from figure 9 that the PSNRs of the 206 images are about 11. Although the PSNRs are not high, the most information of the images has been recovered. If the total size of the distributed diffraction spots in the Fourier plane is set as N pixels×N pixels and the aperture size of the filter is n pixels, the maximum storage capacity can be estimated with (N/n) 2 . In our simulation, N=512 and n=30, so the maximum number of the  color images that can be stored in a 512 pixels×512 pixels hologram is (512/30) 2 ∼291. The optical system for our proposed method can be referred to [9].

Summary
In this paper we have proposed a method for the quantization and superposition of multiple color images. A color image can be quantized with 256 colors and represented with a gray image, and multiple images are modulated and superposed with blazed gratings. In our simulation, the data size of the 206 color images is about 206×768 kilo-bytes and the phase hologram has a data size of 256 kilo-bytes, so the compression ratio of the hologram is about 618:1. The color images can be reconstructed from a phase-only hologram. The simulation results showed that 206 color images were stored in a same-sized hologram and reconstructed with high fidelity. The technique can be applied in the research fields such as information storage, optical encryption, and data transmission.