Image moment-based stroke placement
暂无分享,去创建一个
Michio Shiraishi and Yasushi Yamaguchi University of Tokyo fshira,yamag@graco.c.u-tokyo.ac.jp Painterly rendering algorithms synthesize the images with a hand-crafted touch from a source image of a real scene. The current major scheme is based on Haeberli’s method[1,2,3], which paints brush strokes on a canvas successively. In our approach, each rectangular stroke is controlled by several attributes, namely, color C, location (xc;yc), orientationθ, width w and lengthl . We propose an alternative method to determine these attributes so that the stroke nicely approximates a local region of the source image. Algorithm All stroke attributes are computed with the following steps. 1. Preparation Firstly, a tentative location is given for a stroke (Fig. 1(a)). The stroke color C is sampled from the source image at the location (Fig. 1(b)). The source image is cropped with a square at the point (Fig. 1(c)). This cropped image Cw is to be approximated by the stroke. 2. Color Difference Image Generation A color difference imageis a gray-scale image, obtained from Cw andC (Fig. 1(d)). Its pixel valueI(x;y) is larger if the corresponding Cw(x;y) is closer to the stroke color C. I(x;y) is given by: I(x;y) = f (d(C;Cw(x;y))): Here,d(C1;C2)2R is the Cartesian distance of two colors, C1 andC2, in the CIE-L u v color space.f (d)2 [0;1] is the function that maps the color distance d to the pixel intensity of the color difference image. In our current implementation,f (d) is:
[1] Peter Litwinowicz,et al. Processing images and video for an impressionist effect , 1997, SIGGRAPH.
[2] Barbara J. Meier. Painterly rendering for animation , 1996, SIGGRAPH.
[3] Paul A. Beardsley,et al. Computer Vision for Interactive Computer Graphics , 1998, IEEE Computer Graphics and Applications.
[4] Paul Haeberli,et al. Paint by numbers: abstract image representations , 1990, SIGGRAPH.