Generation of Stripe Patchwork Images Preserving Hue and Saturation in HLS Color Space

Non-photorealistic rendering methods have been proposed for generating stripe-patchwork (SP) images from grayscale photographic images. However, when the conventional methods are applied to each of Red (R), Green (G) and Blue (B) of color photographic images, SP patterns between RGB are shifted. Therefore, this paper proposes a method for generating color SP (CSP) images without causing the shifts. The proposed method processes lightness in HLS color space. In addition, CSP images generated by the proposed method can preserve hue and saturation of color photographic images. Experiments using various color photographic images were performed to verify the effectiveness of the proposed method, and show that CSP images can be generated without CSP pattern shifts between RGB and with little change in hue and saturation. In addition, CSP patterns that changed by changing the parameters in the proposed method were visually confirmed.


Introduction
Many non-photorealistic rendering (NPR) methods have been proposed for transforming images, videos and threedimensional data into non-photorealistic images [1] [2]. Since NPR includes everything except realistic rendering in the field of computer graphics, there are various methods for various styles and applications. One of such NPRs is a method for generating stripe-patchwork (SP) images from photographic images [3]∼ [6]. SP images imitate stripe patchwork, and have SP patterns that are partially changed by the shading and edges in photographic images. SP images of the conventional method [3] generated using inverse filter [7] [8] and k-means clustering, and SP images of the conventional method [4] generated using inverse filter and smoothing filter. SP images of the conventional method [4] had higher lightness and edge reproducibility of photographic images than SP images of the conventional method [3]. The literature [5] proposed a method for speeding up the conventional method [4] using lookup table and sampling. The conventional method [6] controlled the direction of SP patterns by adding the process of selecting pixels in the window of the smoothing filter to the conventional method [4]. All conventional methods [3]∼ [6] were applied to grayscale photographic images. This paper considers a method for applying the conventional method [4] to color photographic images. It is considered that color SP (CSP) images have a better visual effect than SP images. However, when the conventional method [4] is applied to each of RGB of color photographic images to generate CSP images, CSP patterns are shifted. Therefore, by performing processing on the lightness in HLS color space, the shifts of CSP patterns are eliminated. In addition, the proposed method has a feature of the preserving hue and saturation of color photographic images. To verify the effectiveness of the proposed method, experiments were conducted using various color photographic image. And, experiments were conducted to visually examine changes in CSP images generated by changing the values of the parameters in the proposed method. The experimental results showed that CSP patterns did not shift and the hue and saturation of color photographic images were preserved to some extent.
The rest of this paper is organized as follows. Section 2 describes the proposed method for generating CSP images. Section 3 shows experimental results, and reveals the effectiveness of the proposed method. Finally, Section 4 concludes this paper.

Proposed Method
The proposed method is executed by an iterative processing with four steps. In Step 1, color photographic images in RGB color space are converted to HLS color space. In Step 2, the lightness values in HLS color space are converted using smoothing filter. In Step 3, the smoothed lightness values are restored using inverse filter. In Step 4, it is converted to RGB color space using the restored lightness values and the hue and saturation values of color photographic images.
Steps 2 to 4 are repeated. A flow chart of the proposed method is shown in Figure 1.
The detailed procedure in Figure 1 is shown as follows.
Step 1 The pixel values on coordinates (i, j) of color photographic image in RGB color space are defined as f R,i, j , The values of the hue, lightness and saturation in HLS color space obtained by converting color photographic image in RGB color space are defined as f H,i, j , f L,i, j and f S ,i, j , respectively. The conversion from RGB color space to HLS color space is calculated as the following equations.
Step 2 The lightness values f (t−1) L,i, j are smoothed using smoothing filter within window size W, where t is the iteration number and where s (t) i, j are the smoothed lightness values, and k and l are the positions in the window.
Step 3 The smoothed lightness values s (t) i, j are restored using inverse filter.
where g (t) i, j are the restored lightness values. If the restored lightness values g (t) i, j are less than f L,i, j − a, then g (t) i, j must be set to f L,i, j − a, where a is the positive constant. If the restored lightness values g (t) i, j are greater than f L,i, j + a, then g (t) i, j must be set to f L,i, j + a.
Step 4 The pixel values f (t) R,i, j , f (t) G,i, j and f (t) B,i, j in RGB color space are converted using the hue values f H,i, j , the lightness values g (t) i, j and the saturation values f S ,i, j as the following equations.
B,i, j must be set to M − 1, respectively.
The lightness values f (t) L,i, j are calculation as the following equations.
Steps 2 to 4 are repeated T times. An image composed of the pixel values f (T ) R,i, j , f (T ) G,i, j and f (T ) B,i, j is a CSP image.

Experiments
Two experiments were mainly conducted. In the first experiment, the changes of CSP images generated by changing the values of the parameters in the proposed method were visually confirmed using Lenna image shown in Figure 2. In the second experiment, CSP images generated by applying the proposed method to various color photographic images shown in Figure 3 were visually verified. All images used in the experiments were 512 * 512 pixels and 256 gradation. 3.1 Experiments with changing the values of the parameters CSP images generated by changing the value of the iteration number T were visually confirmed using the Lenna image. The value of the iterative number T was set to 5, 10, 20, and 40. The values of the other parameters W and a were set to 6 and 60, respectively. The results of the experiment are shown in Figure 4. As the value of the iterative number T was larger, CSP patterns became clearer and converge at about 40 times. Thus, the value of the iterative number T should be set to around 40. CSP images generated by changing the value of the window size W were visually confirmed using the Lenna image. The value of the window size W was set to 2, 4, 6, and 8. The values of the other parameters T and a were set to 40 and 60, respectively. The results of the experiment are shown in Figure 5. As the value of the window size W was larger, CPS patterns became wider. The value of the win- dow size W may be changed according to the purpose of use of the user.
The CSP images generated by changing the value of the parameter a were visually confirmed using the Lenna image. The value of the window size a was set to 20, 40, 60, and 80. The values of the other parameters T and W were set to 40 and 6, respectively. The results of the experiment are shown in Figure 6. As the value of the parameter a was larger, CPS patterns became darker and clearer. The value of the parameter a may be changed according to the purpose of use of the user.

Experiments using various photographic images
The proposed method was applied to eight photographic images shown in Figure 7. The values of the parameters T , W and a were set to 40, 6 and 60 with reference to the result of the previous experiments, respectively. The results of the experiment are shown in Figure 7. In all CSP images, CSP patterns between RGB did not shit and the hue and saturation were preserved.

Conclusion
This paper proposed an NPR method for generating CSP images from color photographic images. The proposed method was implemented by an iterative calculation of applying smoothing filter and inverse filter to the lightness in HLS color space. By conducting experiments using various color photographic images, it found that the shifts of CSP patterns between RGB do not occur and the hue and saturation of color photographic images can be preserved. In addition, by conducting experiments to change the values of the parameters in the proposed method, it found that the width and density of CSP patterns can be changed.
A subject for future study is to apply the proposed method to videos and three-dimensional data.