Generation of Moire-Like Images Using Gaussian Filter

A non-photorealistic rendering method to automatically generate moire-like images from photographic images using bilateral filter has been proposed. Moire-like images are expressed by superimposing moire-like patterns on photographic images. We propose a method to improve the conventional method and generate moire-like images using Gaussian filter, unsharp mask and inverse filter. Compared with the conventional method, the proposed method can suppress the degradation of image quality  of the background photographic images of moire-like images. Moreover, the proposed method can generate moire-like patterns having a texture different from the conventional method. To verify the effectiveness of the proposed method, we conduct an experiment using several photographic images and visually confirm the results. In addition, we conduct an experiment by changing the parameter values in the proposed method and visually confirm the changes in moire-like images.


Introduction
A non-photorealistic rendering [1]∼ [7] method to automatically generate moire-like images from photographic images has been proposed [8]∼ [10]. Moire-like images are expressed by superimposing moire-like patterns on photographic images. The conventional method is implemented by iterative calculation using bilateral filter [11] [12] and unsharp mask. The bilateral filter smoothes fine brightness changes while preserving the edges. When bilateral filter is repeatedly applied to photographic images, the fine texture is lost in the region of the same brightness, resulting in a solid expression. Similarly, photographic images in the background of moire-like images are also expressed as solid paint. Therefore, it is desired to suppress the degradation of image quality of the background photographic images.
Therefore, we propose a method to generate moire-like images that suppresses the degradation of image quality of the background photographic images. The proposed method is implemented by iterative calculation using Gaussian filter, unsharp mask and inverse filter [13] [14]. The conventional method expresses moire-like patterns by emphasizing the staircasing effect [15] [16] of bilateral filter using unsharp mask, while the proposed method uses the staircasing effect of Gaussian filter. Since Gaussian filter has low edge preservation and moire-like patterns generated by the staircasing effect of Gaussian filter are clearly expressed, the proposed method uses inverse filter instead of unsharp mask at the end of iterative calculation. In additon, the proposed method has the feature that not only the degradation of image quality of the background photographic images can be suppressed, but also moire-like im-ages with a texture different from the conventional method can be generated. To verify the effectiveness of the proposed method, we conducted an experiment to visually examine the changes in moire-like images generated by changing the parameter values in the proposed method and an experiment using several photographic images. The experimental result show that the proposed method can have less degradation of image quality of the background photographic images than the conventional method, and can change the expression, width and density of moire-like patterns by changing the parameter values.

Proposed Method
The proposed method is executed in three steps: the first step is to process iteratively with Gaussian filter, the second step is to process iteratively with Gaussian filter and unsharp mask, and the third step is to process with Gaussian filter and inverse filter. The flow chart of the proposed method is shown in Figure 1.
Details of the procedure in Fig. 1 are explained below.
Step 0 The input pixel values for spatial coordinates (i, j) of a photographic image are defined as f i, j . The pixel values f (t) i, j of the image at the t-th iteration number have value of U gradation from 0 to U − 1, where Step 1 The output pixel values f (t) i, j in Gaussian filter are calculated by the following equations.
where W is a parameter related to the window size and the window size is 2W + 1, and σ = W/3. The reason for setting σ = W/3 is that the calculation of Equation (1) is hardly affected by the pixel values outside the window of the parameter W.
Step 1 is repeated T 1 times.
Step 2 Let the pixel values i, j in unsharp mask using Gaussian filter are calculated by the following equation.
i, j is less than 0, then g (t) i, j must be set to 0. If i, j is greater than U − 1, then g (t) i, j must be set to U − 1.
Step 2 is repeated T 2 times.
Step 3 Let the pixel values The output pixel values h i, j in inverse filter using Gaussian filter are calculated by the following equation.
where a is a positive constant. If h i, j is less than 0, then h i, j must be set to 0. If h i, j is greater than U − 1, then h i, j must be set to U − 1. An image composed of the pixel values h i, j is the moire-like image.

Experiments
Two experiments were conducted: the first experiment was to check the changes in moire-like patterns generated by changing the values of the parameters T 1 , T 2 , W and a in the proposed method, and second experiment was to apply the proposed method to eight photographic images. The first experiment used Lenna image shown in Figure 2, and the second experiment used eight photographic images shown in Figure 3. All photographic images used in the experiments were 512 * 512 pixels and 256 gradation. In the following experiments, the values of the parameters T 1 , T 2 , W and a were set to 10, 10, 20 and 0.4, respectively. The reason for setting the values of these parameters is that moirelike images were generated relatively well by trial and error.

Experiment with changing the values of the parameters
Moire-like images by changing the value of the iteration number T 1 were visually confirmed using Lenna image. The value of T 1 was set to 5, 10, 15 and 20. The values of other parameters T 2 , W and a were set to 10, 20 and 0.4, respectively. The results of the experiment are shown in Figure 4. As the value of T 1 became larger, finer changes in moire-like patterns were reduced and moire-like patterns were expressed more smoothly.
Moire-like images by changing the value of the iteration number T 2 were visually confirmed using Lenna image. The value of T 2 was set to 5, 10, 15 and 20. The values of other parameters T 1 , W and a were set to 10, 20 and 0.4, respectively. The results of the experiment are shown in Figure 5. As the value of T 2 increased, moire-like patterns gradually became clear. When the value of T 2 was about 10, there were gradation in moire-like patterns, and when the value of T 2 was about 20, moire-like patterns were expressed in binary. The value of T 2 may be set according to the usage purpose of the user.
Moire-like images by changing the value of the parameter W were visually confirmed using Lenna image. The value of W was set to 10, 20, 30 and 40. The values of other  parameters T 1 , T 2 and a were set to 10, 10 and 0.4, respectively. The results of the experiment are shown in Figure 6.
As the value of W became larger, moire-like patterns were expressed more smoothly and greatly. eters T 1 , T 2 and W were set to 10, 10 and 20, respectively. The results of the experiment are shown in Figure 7. As the value of a became larger, moire-like patterns were made darker.

Experiment using eight photographic images
The proposed method was applied to eight photographic images shown in Figure 3. Since moire-like patterns were vi- sually recognized well in the previous experiment, the values of the parameters T 1 , W and a were respectively set to 10, 20 and 0.4, and the value of the iteration number T 2 was 10 and 20. The results of the experiment in case of T 2 = 10 and T 2 = 20 are shown in Figure 8 and Figure  9, respectively. Moire-like patterns of Figure 8 had gradation, and moire-like patterns of Figure 9 were expressed in binary. All moire-like images in Figures 8 and 9 could automatically generate moire-like patterns over the entire image. And, moire-like images in the literatures [8]∼ [10] were expressed as if the background photographic images were solid paint, while moire-like images in Figures 8 and 9 showed less degradation of image quality of the background photographic images. Further, moire-like images in Figures

Conclusion
We proposed a non-photorealistic rendering method to automatically generate moire-like images from photographic images using Gaussian filter. The proposed method expressed moire-like patterns by emphasizing the staircasing effect of Gaussian filter using unsharp mask. To verify the effectiveness of the proposed method, an experiment to visually confirm moire-like patterns generated by changing the values of the parameters was performed using Lenna image, and an experiment was performed using eight pho-tographic images. As a result of the experiments, the proposed method could change the expression, width and density of moire-like patterns by changing the parameter values, and could have less degradation of image quality of the background photographic images than the conventional method.
A subject for future study is to expand the proposed method for application to color photographic images and videos.