Computer Engineering and Applications ›› 2012, Vol. 48 ›› Issue (35): 156-160.

Previous Articles     Next Articles

Pencil sketch render method based on HTML5 platform

LI Heng1, DU Xiaorong1, CHEN Qiwen2, XU Yan3   

  1. 1.Institute of Power Electronics and Control Technology, Sun Yat-Sen University, Zhuhai, Guangdong 519082, China
    2.Foshan Productivity Center, Foshan, Guangdong 528000, China
    3.Hainan Mobile Communications Company Limited, Haikou 570125, China
  • Online:2012-12-11 Published:2012-12-21

基于HTML5平台的铅笔画风格渲染

李  恒1,杜晓荣1,陈启文2,徐  燕3   

  1. 1.中山大学 电力电子及控制技术研究所,广东 珠海 519082
    2.佛山市生产力促进中心,广东 佛山 528000
    3.中国移动通信集团海南有限公司,海口 570125

Abstract: A non-photorealistic pencil sketch render method is achieved by improving the pencil texture simulation algorithm which is based on motion blur filter. By using Unsharp Mask(USM) sharpening which is based on Gaussian blur, the input image can be sharpened into a pencil sketch base map. Pencil texture can be generated by the motion blur algorithm. After sharpen filtering, merging the motion-blurred image with the edge-extracted one, the pencil sketch effect is achieved. This method is realized on the HTML5 platform. The result shows that it is a fast approach and very realistic, as well as hierarchic. It proves to be suitable in Web application.

Key words: non-photorealistic rendering, pencil sketching, HTML5, motion blur, sharpening filter

摘要: 通过改进基于运动模糊滤镜的铅笔纹理仿真算法,提出了一种新的非真实感铅笔画风格渲染方法。对输入图像进行基于高斯模糊的虚光蒙版(Unsharp Mask,USM)锐化得到铅笔画基图,采取自主实现的运动模糊算法根据基图生成铅笔纹理,进行锐化滤波处理并与边缘提取处理图融合,得到铅笔画风格绘制效果,同时在HTML5平台实现了铅笔画风格渲染的方法。实验结果表明,该方法生成速度快,渲染效果逼真而且有层次感,适合于Web应用领域。

关键词: 非真实感绘制(NPR), 铅笔画, HTML5, 运动模糊, 锐化滤波