A Hybrid Image-Based Method to Generate Sketching Portrait Ling Xu∗ David Mould† School of Computer Science, Carleton University, Canada A BSTRACT transition. In this paper, we describe a hybrid algorithm to create a sketch-like portrait from an input image. First, a user manually selects the face We implement a method for the above characteristics in the fol- region from the input image. We use an image based method to lowing two stages. In the first stage, based on the given input im- render the subjects facial features and enhance the shading areas. age, we use image processing to enhance the shading and feature A stroke based method is then applied to non-face regions to ren- information in the face region. We also blur the image to attain der the silhouette, creases and some dark regions. We show some the objective of blurred background. In the second stage, we place examples of sketching portraits created by our method and make curved strokes to render the silhouette and creases and use straight comparisons to original input images. strokes to render the dark regions. We finally perturb the resulting image with a random value to simulate the granulated look of paper Keywords: Sketch, portrait, NPR. texture. Index Terms: I.4.3 [Image Processing and Computer Vision ]: Enhancement—Filtering; 2.1 Shading and Feature Enhancement 1 I NTRODUCTION In order to manage the shading and feature information, we use the tone management approach introduced by Bae et al [1]. For a Sketching is a classical drawing style that appears in a variety of given input image, we apply a bilateral filter to get the base layer contexts. Computer generated methods are often used to convert and the detail layer. For the base layer which contains the shad- an input image into sketchy styles. But the results are not satisfac- ing information, we want to control the proportion of pixels with tory due to the absence of shading variations, vital to express facial low intensity, medium intensity and high intensity; we achieve this information. with histogram matching. Since the detail layer bears the feature in- formation which is generally contained in the low intensity pixels, we discard the high intensity portion by clipping the high intensity part of the histogram. With a similar method we get the feature enhanced detail layer. The process is shown in Figure 2. Figure 1: The sketch ”Angel for the Madonna of the Rocks”. Commercial image processing tools concentrate on edge and sil- houette features. Our method includes such features as well, but fo- cuses on rendering a shading effect inspired by the sketching style of Leonard da Vinci (as shown in Figure 1) [3], which emphasizes on the shading and facial features and deemphasizes the surround- ings. Our algorithm shares some characteristics with Brooks’s method of mixed media portrait rendering [2] such as segmenta- tion and interest in image detail, but our method involves feature and shading enhancement. 2 A LGORITHM We chose human portrait as our sketch subject due to the great interest from the general public. The objective of our sketching style bears some similar characteristics as Figure 1: Figure 2: The shading and feature enhancement on two layers. - Exaggerated shading in the face region; - Curved strokes describing the silhouette and creases; - Straight-line strokes rendering the dark regions; We then recompose the shading enhanced base layer and the fea- - Background blurred away from the face region with a smooth ture enhanced detail layer. To simulate the effect of a background blurred away from the face region, we blurred the non-face region ∗ e-mail: lxuc@scs.carleton.ca as shown in Figure 3. The face region and non-face region of the † e-mail: mould@scs.carleton.ca original image is segmented manually. 6 Figure 3: The process to blur the non-face region of the shading and feature enhanced image. Figure 5: The process to apply strokes on a blurred image. 2.2 Stroke Rendering The strokes of curves that describe the basic shape such as the sil- houette and creases are obtained by Canny edge detection. The process is shown in Figure 4. Straight lines are used to render the shading and to imitate some quick pencil scratches which often ap- pear in many sketch works. More strokes are placed in low intensity regions of the image. The result is shown in Figure 5. 3 R ESULTS AND D ISCUSSION Figure 6 shows some results obtained by the above method. For some input images with flat shading such as the first image, we successfully enhance the original flat shading to three distinct shad- ing levels such as the dark shading in the areas of eyes and cheeks, medium dark shading in the nose, and highlights in the forehead and chin. For the input images with more obvious highlight regions and dark regions such as the second image, we keep the original well shaded information (such as the nose region) and enhance some features (such as the eye region). Our current algorithm still has some drawbacks. The rendering result depends on the quality of the input image. If the input image is of low resolution, the shading and feature information is difficult to enhance. If the input image contains large areas of flat shading, say a large area of pure white or gray, it is hard for the algorithm to enhance the shading into distinct levels. Another drawback is the segmentation of input image into face region and non-face region. Figure 6: Input images and the output sketch-style portraits. In the current implementation, users need to do the segmentation manually; in principle, face recognition could be used to extract a mask automatically. R EFERENCES [1] S. Bae, S. Paris, and F. Durand. Two-scale tone management for photo- graphic look. ACM Trans. Graph. 25,3, pages 637–645, 2006. [2] S. Brooks. Mixed media painting and portraiture. In IEEE Transactions on Visualization and Computer Graphics, 2006. [3] M. Clayton. Seven Florentine Heads: Fifteenth Century Drawing from the Collection of Her Majesty The Queen. Art Gallery of Ontario, Toronto, 1993. Figure 4: The process to render silhouettes and creases. 7