目的在现阶段采用计算机模拟绘制真实铅笔画往往不能够逼近真实效果,主要原因之一是没有考虑到真实铅笔画中的色调较灰度图像有着更明显的暗灰亮层次变化的特性,基于这一问题提出一种新的铅笔画自动生成算法。方法一方面在外轮廓提取中采取了LAB空间色差图与纹理图结合的方法,取代了传统基于梯度图的方法;另一方面保留了纹理色调连续变化的特点,且为了体现色调的分层效果提出了反正切色调分化模型,其核心思想是基于图像暗灰亮图层的像素比例来自适应地调整像素灰度值以达到色调分层的目的。结果本文算法能够避开噪点的影响更好地展示细节,同时解决了直接分层结果中色调变化突然的缺陷,实现了亮度分层与色调连续变化的结合。结论新算法在最终效果上较其他算法的优势体现在两方面,一是轮廓线的连续性更好,对比度更强,其次是纹理的效果能够同时兼顾连续性和分层,这是其他算法做不到的,本文算法适用于所有不同分辨率的彩色或灰度图像,且分辨率越高效果越好。
Objective At its present stage, pencil drawing using a computer cannot approximate reality primarily because tone in real penciling has more obvious characteristics in dark, grey, and bright layers' changing than in a greyscale image. To address this problem, a novel pencil drawing automatic generation method is proposed. Method The new method re- places traditional gradient image method to combine a LAB space color difference image and a texture image as features for outer outline extraction. It also allows thetexture's constant hue to change in the rendering process. An aretangent hue dif- ferentiation model is likewise proposed to reflect the hue layered effect. The core idea, based on the dark, grey and bright layers' pixelratio, is to adjust the pixel grey value to achieve layering tones. Result The new method avoids noise impact and displays detailsbetter. It not only resolves the sudden color change in direct stratification but also achieves integration between brightness stratification and continuous huechanges. Conclusion The final effect shows that the new algorithm has two advantages over other algorithms. First, the outline is more continuous and clear. Second, the effect of texture can achieveboth consistency and layering, which cannot be achieved by other algorithms. The proposedalgorithm can be applied to either colorful or grey images of various resolutions; the higher the resolution is, the better the effect is.