大分工業高等専門学校紀要

第 51 号(平成 26 年 11 月)

GENERATING WATERCOLOR PAINTING-LIKE IMAGESBY USING BILATERAL FILTER

Toru HIRAOKA1
1Department of Information Engineering, National Institute of Technology, Oita College

We propose a non-photorealistic rendering method for generating watercolor-like images from color
photographs. The proposed method is performed in two steps. First, images with flow patterns created bytracing with a brush are generated with an anisotropic filter. Second, watercolor-like images are generatedby coloring that corresponds to the absolute values of the color differences between the image processedby the bilateral filter and the original image. To evaluate performance of the proposed method forgenerating watercolor-like images, we conduct experiments using example images.
Key Words : watercolor, non-photorealistic rendering, bilateral filter, anisotropic filter

1. INTORODUCTION
Non-photorealistic
rendering (NPR)
fortransformation of photographic images to pager
mosaic, oil painting, pencil drawing, watercolor, andother modes of imagery has been the subject ofmany studies1)2)3). Here we focus on NPRtransformation to watercolor paintings, which are
generally characterized by brush strokes andblurring of paint in pale tones. Many methods havebeen proposed for NPR transformation towatercolors, including the use of three-dimensional
geometrical models4)5), incorporation of artists'
techniques in the form of painting rules6) ,application of color diffusion processing by cellular
automaton modeling of color-partitioned regions7),
rounding by dilation of extracted color regions, andcoloring by variation in morphology and distanceand by alpha blending8).
We propose an NPR technique incorporating abilateral filter (BF) 9), which is a type of nonlinearsmoothing filter, to generate watercolor-like images
from photographic images. In the first step of thistwo-step technique, the photographic image istransformed to a smooth, flowing image with ananisotropic filter 10) which is then processed by theBF to obtain enhanced strokes that appear to havebeen drawn by brush together with the blurring ofpale tones. In the second step, coloring is
implemented in accordance with the absolute valueof differences found between the image obtained by
the BF processing and the original image. In thisFig.1 Lena Image.

coloring process, the regions of image edge contours
are colored with less coloring than the regions
having smaller changes in intensity. As an effect ofthe BF, moreover, textures resembling impulse noise
tend to resist coloring. The end result is an image
that conveys an impression distinct from those ofwatercolor-like images obtained by existing
methods.
The effectiveness of the proposed method wasinvestigated experimentally. Variations in thewatercolor-like image generated from the Lena
image shown in Fig.1 were obtained by varying theBF parameters, and watercolor-like images werealso generated from several other photographic
images to assess their visual effects.

2. METHOD―18―

The proposed method is implemented by using大分工業高等専門学校紀要

第 51 号(平成 25 年 11 月)

the BF asiwd( t 1)
R ,i , j



iw

 e

 (( i  k ) 2  ( j l ) 2 )   ( d R( t,)i , j  d R( t,)k , l ) 2k i  w l  j  w
iw

iw

 ed R(t,)k ,l (( i  k ) 2  ( j l ) 2 )   ( d R( t,)i , j  d R( t,)k , l ) 2(1)k i  w l  j  w

where  and  are positive constants.
Parameter  regulates the effect of thedistance from coordinates (i, j ) , so that theinfluence of pixels at a given distancedecreases with increasing values  . Parameter regulates the effect of the absolute value ofthe difference from the pixel value d R(t,)i , j atcoordinates (i, j ) , so that the influence ofa given pixel having a substantial
difference in the absolute value decreases
with increasing values of  . The value ofw , representing the window size, was set
at w  10 throughout the following
experiments.
The term d R(T,i), j represents the pixel value
in the image obtained by T iterations of theBF.
(2) For each pixel in the image, determined R(T,i), j  d R( 0,i), j and denote it as f R ,i , j . With
the minimum and maximum values off R ,i , j , denoted as min R and maxR
respectively, transform f R ,i , j to g R ,i , jand thus to the pixel values of a 255-tone
image having values from 0 to 255 by

Fig.2 Image after anisotropic filter processing.

two main processes. The photographic image is firsttransformed by anisotropic filtering, and theresulting image is then transformed by the BF. The
processing is essentially the same for red, green, andblue images of the colored image, and thewatercolor-like image is obtained by merging thesethree.
(1) Anisotropic Filter Processing
In the first process, the anisotropic filter imparts
smoothing perpendicular to gradients renderedanisotropic by BF spatial weighting based on
pixel-value gradients. It preserves the edges andgenerates enhanced striping. (For details on thisprocess, see Reference 10)). The image in Fig.2,obtained by the anisotropic filtering of the 512*512
pixel 256-tone Lena image, illustrates its effective
transformation to smooth, flowing images, asevident particularly in the hair and hat plumeregions.
(2) Bilateral Filter Processing
In the second process, the absolute values of thecolor differences between the image obtained with
the BF and the original image are determined, andcoloring is then implemented in correspondencewith these values. The procedure in the proposed
method is as follows.
(1) For coordinates (i, j ) in the color image
obtained in the first process, d R(t,)i , j , d G(t,)i , j andd B(t,)i , j are the values of the red, green, andblue pixel values, respectively. The termt ( 0,1,2, ) is the iteration number andd R( 0,i), j , d G( 0,i), j and d B( 0,i), j are the initial
iteration values of the pixels in the color
image obtained in the first process. In
this paper, we describe the red image
pixel processing, which is essentially thesame for the green and blue images.
Compute the pixel value d R(t,i ,1j) by usingg R ,i , j  min R g R ,i , j  2551  maxR  min R (2)(3) Merge images g R ,i , j , g G ,i , j and g B ,i , j toobtain the watercolor-like image.

3. EXPERIMENTS
We first applied the proposed method to the512*512 pixel 255-tone Lena image and assessedthe variations induced in the generated
watercolor-like image by changes in the processparameters. We next applied the method to several
other 512*512 pixel 255-tone images and assessed
the watercolor-like images generated.
(1) Effect of Parameters on the Lena Image
We first assessed the variation in thewatercolor-like images created by changing thenumber of BF iterations T with values of 0.01 for―19―

大分工業高等専門学校紀要

第 51 号(平成 25 年 11 月)

Fig.3 Variation in water color-like images with iteration.
( T  10,20,30,40 )Fig.5 Variation in water color-like images with  .
(   0.01 ,   0.1,0.01,0.001 )Fig.4 Variation in water color-like images with  .
(   0.1 ,   0.1,0.01,0.001 )Fig.6 Variation in water color-like images with  .
(   0.001 ,   0.1,0.01,0.001 ) and 0.01 for  in all cases. Fig.3 shows theresults for T  10 , 20, 30, and 40 in the upper left,
upper right, lower left, and lower right panels,respectively. The generated images show thatincreasing the value of T deepens the colors in thewatercolor-like image and increases the coloredregions. The results indicate that approximately 30

iterations (thus, T  30 ) is appropriate, though thenumber also depends on the photographic image tobe transformed.
We next varied the values of  and  with
the T set at 30 in all cases and assessed thevariation in the generated watercolor-like images.
The results for  at 0.1, 0.01, and 0.001 are shown―20―大分工業高等専門学校紀要

第 51 号(平成 25 年 11 月)

Fig.7 Water color-like images (Airplane).

Fig.10 Water color-like images (Sailboat).

watercolor-like image is characterized by enhanced
strokes that appear to be drawn by brush together
with the expression of blurring in pale tones. They
also indicate that watercolor-like images generated
by the proposed method convey a distinctive
impression that is unlike those generated by othermethods.
Fig.8 Water color-like images (Mandrill).

4. CONCLUSION

Fig.9 Water color-like images (Pepper).

in Fig.4 to Fig.6, respectively. In each of these threefigures, the upper left, upper right, and lower panels
show the images obtained for  at 0.1, 0.01, and0.001, respectively. Taken together, these images
show that the colors are deepened and the colored
regions are increased by lowering the values of and  . The results indicate that values of 0.01 to0.001 are appropriate for both  and  .
(2) Assessment with Other Images
We next applied the proposed method to fourother mages for   0.01 ,   0.01 , and T  30 .
The results are shown in Fig.7 to Fig.10. In each ofthese three figures, the left panel shows the input
image and the right panel shows the generated
watercolor-like image. In all three cases, theWe proposed a method of generatingwatercolor-like images from photographic images
by NPR with the incorporation of BF and describedexperiments that verified the effectiveness of themethod. The first set of experiments, performed
with the Lena image, showed the variations that canbe created in the generated watercolor-like imagesby changing the BF parameter values. In the second
set, the proposed method was applied to several
other photographic images and confirmed the visualeffects of the generated watercolor-like images.
The results show that the proposed method cancreate the enhanced brush strokes and paint blurringin pale tones that are characteristic expressions ofwatercolor painting, and that the generated images
convey an impression that is different from thoseobtained by previously existing methods ofwatercolor-like image generation.

REFERENCES
1）D. Makino, K. Inoue, K. Hara and K. Urahama: Generating
paper mosaic images taking into account thickness andtexture of paper, The journal of the institute of image
information and television engineers, Vol. 60, No. 12, pp.
2038-2041, 2006.
2) K. Inoue, W. Kanemori and K. Urahama: Generation of
oil-painting-like images by anisotropic smoothing and bump―21―大分工業高等専門学校紀要

第 51 号(平成 25 年 11 月)

mapping, The journal of the institute of electronics,information and communication engineers, Vol. J87-A, No.
8, pp. 1560-1562, 2004.
3) K. Inoue and K. Urahama: Generating pencil drawing imagesof 3D objects, The journal of the institute of image
information and television engineers, Vol. 60, No. 10, pp.
1648-1651, 2006.
4) Y. Sato, T. Fujimoto, K. Muraoka and N. Chiba:
Watercolor-painting-like rendering method based onstrokes, IPSJ SIG-GCAD, Vol. 89, pp. 95-100, 2001.
5) C. Yan, M. Chi, and T. Lee: Stylized rendering using samples
of a painted image, IEEE Trans. Visualization & ComputerGraphics, Vol. 14, pp. 468-480, 2007.
6) H. Johan, R. Hashimoto and T. Nishita: Creating watercolor
style images taking into account painting techniques, The
journal of the society for art and science, Vol. 3, No. 4, pp.
207-215, 2004.

7) Y. Sato, T. Fujimoto and N. Chiba: Watercolor painting-like
image processing based on cellular automaton model ofpaint behavior and paper texture, The institute ofelectronics, information and communication engineers
technical report, Vol. 105, No. 162, pp. 45-50, 2005.
8) Y. Inoshima and T. Yosida: Water-color-like painting for realpicture, The institute of image information and televisionengineers technical report, Vol. 32, No. 38, pp. 85-90, 2008.
9) C. Tomasi and R. Manduchi: Bilateral filtering for gray andcolor images, Proc. ICCV, pp. 839-846, 1988.
10) D. Makino, K. Inoue, K. Hara and K. Urahama: Generating
pencil drawings and oil paintings using anisotropic filters,
The journal of the institute of image information andtelevision engineers, Vol. 58, No. 10, pp. 1470-1475, 2004.

―22―(Received September 30, 2014)