节点文献

基于图像的非真实感绘制技术的研究

Research on Image-based Non-photorealistic Rendering

【作者】 王会芹

【导师】 陈镜超;

【作者基本信息】 东华大学 , 控制理论与控制工程, 2010, 博士

【摘要】 在计算机图形学的发展历史中,真实感图形绘制一直是贯穿其中的一支主旋律。人们要求它能够提供具有更强真实感、更贴近现实世界的场景,其成功与否的标准就是计算机生成的图片在多大程度上接近于照相机所拍摄的照片。然而,有些研究者们意识到,真实感图形并不一定总能提供最好的表达。在某些时候,人们反而更需要利用计算机生成一些不同于照片的图形,例如在建筑学、医学、多媒体动画等领域,人们往往不需要完全精确地绘制图形,而是希望有选择性地突出用户所关注的某些重点,或者更好地表现艺术作品的某些特质。因此,计算机非真实感绘制技术应运而生,人们要求它利用计算机生成具有手绘风格的图形,不再强调它所模拟的场景对于现实世界的保真度。非真实感绘制的主要目的在于表现图形的艺术特质、模拟艺术作品或者作为真实感图形的有效补充,其度量成功的度量标准则是由计算机生成的图像与手工创造的图像之间的接近程度。计算机非真实感绘制的出现丰富了计算机图形学的内容,弥补了真实感绘制的不足。计算机非真实感绘制是计算机科学与人类艺术的有效融合,它以计算机作为工具,通过搭建各种数学模型并设计各种算法来模拟某些艺术形式。它更强调人们的主观感受,而不是追求图像的真实感,旨在给人以美的享受。然而对艺术手法的模拟意味着也要对人类的思考和推理特别是创造性思维的模拟,这些仅凭数学模型和算法几乎是不可能实现的,因此,计算机图形学所能做的只是模拟艺术处理的结果。现有的计算机非真实感绘制技术主要可以分为两类:一类是基于几何的非真实感绘制技术,它以三维场景的几何模型作为输入;一类是基于图像的非真实感绘制技术,它以原始数字图像作为其输入。基于几何的非真实感绘制系统可以获取三维场景的形状、光照和表面纹理等几何信息,通过对三维模型进行投影、透视、变形等各种处理,并利用不同的表现手法,最终得到具有艺术风格的图形。它的缺点是在某些情况下对系统所需几何模型的创建和修改比较复杂甚至难以实现。而基于图像的非真实感绘制系统虽然无法得到物体的几何信息,但是却降低了其所需输入的复杂性。它可以采用照片或者计算机生成的图像作为输入,通过将不同的笔划纹理作用于原图,或者利用数字图像处理的相关技术,如图像滤波、特征增强、边缘检测、图像分割等等,将图像处理成具有特殊的视觉效果。在基于图像的非真实感绘制领域中,艺术风格的生成与转换一直是一个研究热点,其中对照片进行各种风格的二值化处理就是一项重要的内容。本论文重点研究了基于图像的二值化风格处理技术,主要包括基于图像的线条画和点画的生成技术以及线条画图像间的变形技术。首先,系统地阐述了非真实感绘制的重要性和所面临的挑战,给出了本课题研究的目的和意义,指明了本课题的主要研究内容和创新点。其次,对基于图像的非真实感绘制技术作了综述性介绍。介绍了基于图像的非真实感绘制的原理和特点,它与基于几何的绘制技术的区别及优势,以及目前的主要实现方法;并着重介绍了基于图像的非真实感绘制的研究现状。然后,对现有的线条画生成算法进行了研究。线条画作为一种艺术形式,因其独特的表现力和抽象性被广泛应用于美术创作、科技文献插图、工艺美术及平面广告设计等领域。目前,关于几何空间的线条画生成技术和基于笔划的线条画生成技术的研究比较多,而本文重点研究的是基于图像的无笔划的线条画生成方法。首先,为了削弱原始图像中由于光线或阴影所带来的不良影响,本文对原始图像进行了微分或自商处理得到相应的灰度特征图像;这些特征图像中像素的灰度值的分布近似于正态分布,其中,灰度的期望值反映了图像的整体明暗程度,灰度均方差则反映了灰度值的聚集程度以及特征信息量的多少。利用这些统计信息可以将图像中的特征像素和非特征像素区分开来。由于在一些情况下利用现有的自商图像算法所生成的线条画效果并不很好,例如,结果图像与原始图像的亮度不一致、噪音会随着特征的增强而增强等。本文对这些问题进行了分析和改进,利用传统滤波器在滤波同时会使图像边缘变得模糊,而各项异性滤波器却能够在滤波的同时保存图像边缘信息的特点,分别将它们应用在线条画生成的不同阶段,并结合图像的灰度变换,从而在结果图像中能够很好的将特征线条抽取出来。接着,分析了点画作品与数字半调技术之间的区别与联系,通过对传统点画技术的总结和对手工点画作品的仔细观察,发现传统点画技术致力于产生随机且均匀的点,如Voronoi点画法;而手工点画中点的分布与图像的形状特征有密切关系,点的排列并非完全随机。因此,与手工点画作品相比,传统点画法所给出的点的分布往往不太合理,生成的点画图像特征不是很突出,另外迭代过程也非常耗时。本文针对这些问题,研究了如何快速且合理的产生点的分布,以便更好的模拟手工点画作品,提出了基于数学形态学的点画法。该方法先将图像的特征区域提取出来,将特征区域和其它区域区别处理,有效地突出特征信息。为了使点的分布既能保持均匀随机又能与所在区域的形状保持一致,本文根据数学形态学原理,对点画区域逐层腐蚀,并在腐蚀的同时进行采样,同时设计了相应的密度函数,用于计算不同灰度区域点的密度,通过点的密集程度来反映图像的色调。与此同时,Kim等人也注意到了点画作品中点的分布问题,他提出了一种特征引导点画法,利用偏置线引导点的分布,然后利用Voronoi迭代来松弛这些点,虽然点画质量较好,但迭代过程仍然非常耗时。针对该问题,本文又对Kim等人的特征引导点画法进行了分析和改进。我们仍然利用特征偏置线来引导点画图像中的点的分布,不同的是,直接在偏置线上进行均匀采样,一次性确定点的位置,避免了极其耗时的迭代过程,从而极大地提高了绘制速度。在色调处理上采取了不同于Kim的表现形式,他使用的是不同半径的实心圆,有一定的局限性,而我们则利用阈值矩阵的映射法,通过合理设置阈值矩阵来控制点的形状与大小,可以较好地表现256级灰度的图像,使得点画整体效果非常好,从而产生更加接近人类手工作品的点画效果。最后,分析了现有图像变形技术,包括基于网格的变形、基于控制线段的变形以及基于散乱点的变形。这些技术过多地关注于如何利用已定义好的特征对应关系产生自然连贯的图像过渡,而将繁琐的特征对应关系的指定过程交给用户交互式地完成。如果用户不够专业,或者用户指定的不够精确,则会引起图像的扭曲。为了减轻用户的负担,本文提出了一种新的线条画自动变形方法。该方法更加倾向于在两幅缺少共同特征的线条画之间进行变形,因为此时对两幅图像间对应关系的指定会比较灵活。为了自动地确定图像的变形路径,我们先抽取了源图像和目标图像的骨架,这些骨架都是单像素宽度;然后将骨架图像表示为若干曲线段的集合,每条曲线段由一系列呈线性关系的骨架点组成;要确定源骨架图像和目标骨架图像之间对应关系,还需对某些包含骨架点较多的曲线段进行分割,使得两幅图像拥有相等的曲线段数量;通过计算各个曲线段的重心坐标以及每个重心点在整个点集中的相对位置,对两个重心集合中的点分别进行了重新排序,最终确定源曲线段和目标曲线段之间的对应关系;两幅骨架图像之间的变形可以通过曲线段插值实现;最后,计算出各骨架点在其对应原图中的线条宽度,将其作为半径,在骨架变形点处绘制不同半径的实心圆,来表现线条画的风格,最终达到线条画变形的效果。本论文围绕基于图像的非真实感绘制技术,对其中的基本原理和方法进行了深入的研究。分别讨论了计算机非真实感绘制中的线条画生成、点画绘制以及线条画变形等问题,对传统方法进行了改进,并提出了新的模型和绘制技术。实验结果表明,这些方法能够更加快速有效地模拟手工作品。当然,就现在的技术水准而言,计算机模拟的结果与艺术家手工绘制的作品质量还有一定差距,还需要我们进一步深入研究。

【Abstract】 Realistic rendering was always the main melody in the development history of computer graphics. It is required to supply scenes close to reality. The criterion of its success is to what degree computer-generated images approaching to those taken by cameras. But some researchers found realistic images were not always the best ways of expression. On the contrary, people sometimes need computer to generate images which are different from photos. For example, in architecture, medical and multimedia area, we don’t need accurately rendering. We want to make major points which people care about prominent, or to better present artistic features. So the technique of non-photorealistic rendering (NPR) emerges as the times require. It is expected to generate non-photorealistic images that appear to been drawn by hand. In contrast to traditional computer graphics, which focused on reality, the purpose of NPR is to express artistic styles, to mimic artistic works or to complement the realistic graphics. For NPR, the criterion of success is how close the images produced by computer are to the works drawn by artists. NPR enriches computer graphics and can be a good supplement to realistic graphics.As a combination of computer and art, NPR use computer to mimic artistic style by various mathematics models and algorithms. It emphasizes people’s subjective feelings and enjoyment of beauty, not the fidelity to the real world. It means we must simulate people’s thinking and reasoning, especially creative thoughts, which are almost impossible to be implemented by algorithms. So what we can do is to only simulate the result of artistic processing.Now, NPR methods can be categorized into object-based methods and image-based methods. The former takes 3D models as input and the latter takes digital images as input. The object-based NPR system can obtain geometry information such as color, texture and shape. The artistic style images are generated by projecting, morphing, or other processing on 3D models. The disadvantage of object-based NPR is the creation or modification to geometry models may be very difficult or even impossible. As to image-based NPR, although there is no 3D information, the cost of input is decreased. Many image processing techniques, such as image filtering, feature enhancing, edge detecting, or image segmenting, etc. can be used to process photos into ones with special visual effect.It is important in NPR that transforming styles between different images, such as processing a photo into various binary styles. This paper emphasizes on the processing technologies of image-based binary stylized, including image-based sketching and stippling generation and image morphing between two binary sketching images.First, we introduced the importance of NPR and the challenges that NPR would confront. We gave out the motive, the significance, the main contents and the innovations of our study. Then, we listed the basic concepts and principles about image-based NPR were listed. We also explored the major implementation methods and the difference between image-based NPR and object-based NPR. We described the current research status of image-based NPR.Next, we studied the existing image-based sketching style generation methods. Because of its special expressive force, sketching images are widely applied in artistic creation, illustrations of scientific literature, industrial arts, and graphic advertisement etc. However, the traditional methods don’t work very well in some cases. So, we proposed a new image-based sketching style generation method according to the different effects of various image filters and the statistic information of difference image’s gray values. We produced gray feature images by self-difference or self-quotient where the effects of illumination were almost removed. From the histogram of gray feature images, we found that intensity values’ distributions were approximate to normal distribution. Mean value reflects the whole brightness of an image and square deviation reflects the gray value’s clustering degree. According to the statistical information, feature pixels can be distinguished from others and sketching image can be obtained by preserving the primary features only. Because traditional self-quotient image (SQI) method can’t generate sketching image very well in some cases, we improved the existing SQI method of NPR. Since traditional filter may blur boundary of image while anisotropy filter can preserve edge information, we use these two kinds of filter in different phases of our algorithm. Combining with the function of gray value transformation, we can extract feature lines from self-quotient image excellently.Then, we pointed out the difference and relationship between stippling works and halftoning images. Through analysis of traditional stippling generation methods and observation to artistic stippling works, we found that traditional algorithms always focused on generating uniform dots randomly. In fact the dots in artistic works are not always random, which have close relationship with graph shapes. For example, the dots distribution generated by traditional voronoi stippling method was not very reasonable. Features were not prominent and the process of iteration was time consuming. In view of this, we proposed a stippling method based on mathematical morphology. In order to outstand image’s characteristic, feature regions were extracted and processed differently from the way to other regions. Dot density in a region was computed by a function which was designed previously. The tone of image was expressed by applying different densities in different regions. Based on the principle of mathematical morphology, we sampled pixels by erosion stippling regions layer upon layer. Thus, the sampled dots were kept uniform, random and in accordance with region’s shape. At the same time, stippling speed is faster than before.In order to further study the technique of stippling style generation. We improved Kim’s feature-guided stippling method that used offset lines guiding stipples distribution. Instead of dots relaxation, we sampled stipples straightly on the offset lines, so that the speed was increased greatly. In traditional methods, tone was always expressed by various dots densities, thus the process of iteration or density function was needed. Here we replaced round dots with black regions which have various sizes and shapes. They were generated by a threshold matrix with 256 degrees. Using various dots as substitutions for sampled pixels on offset lines, we can obtain stippling image more quickly. Also, the generated images have better visual effect. Using this method we can produce stippling images closer to hand works more quickly and more reasonably. Finally, we analyzed the existing image morphing techniques. It was found that researchers pay much attention to generating transition sequences with prescribed features correspondence. But the process of feature prescription preformed by user interactively was always very tedious. Distortion may appear if users were not very professional or the prescription was not very accurate. We proposed a skeleton based morphing method between sketching images. It focused on morphing between images with little corresponding features. In this case, morphing would be more flexible. Skeletons of original image and destination image were extracted respectively and were represented with sets of curves. These curves were all one pixel width. They were composed of skeleton pixels with linear relationship. The number of curves in original set should be equal to that in destination set, so some long curves were equal divided. We computed centroid of every curve and their relative position in the set. The correspondence between original set and target set was determined automatically by our algorithm. Skeleton transition was done by interpolation between original curves and their corresponding target curves. In order to generate sketching effect, we used line width of every skeleton pixel in two images as radius. By rendering filled circles with various radiuses instead of skeleton points, we obtain binary mid-sequences with sketching style.Focusing on image-based NPR techniques, we further studied the basic principles and implementation methods. We discussed the techniques of sketching style generation, stippling rendering and sketching image morphing. Some traditional methods were improved, some new models and rendering methods were proposed. Experiments show that these new methods can be used to mimic hand works more conveniently. Of course, there has a certain gap between images generated by computer and hand works created by artists. It need us work harder to narrow this gap.

  • 【网络出版投稿人】 东华大学
  • 【网络出版年期】2010年 08期
节点文献中: 

本文链接的文献网络图示:

本文的引文网络