文献阅读 - Combining Sketch and Tone for Pencil Drawing Production

本文介绍了一种结合素描线条与色调的铅笔画生成方法,通过两个阶段实现:首先,利用卷积框架生成素描特征,模拟笔尖运动;然后,引入色调模式和参数直方图模型调整色调,尤其关注重纹理区域和物体轮廓的渲染。该方法适用于生成彩铅素描,对高纹理和噪声区域具有较好的稳定性。
摘要由CSDN通过智能技术生成

Combining Sketch and Tone for Pencil Drawing Production


C. W. Lu, L. Xu, J. Y. Jia, Combining Sketch and Tone for Pencil Drawing Production, NPAR (2012) Best Paper

reimplementation


摘要

组合色调与线条结构(combining the tone and stroke structures)

铅笔画先验信息(prior knowledge on pencil drawing)

1 引言

铅笔画合成(pencil drawing synthesis)方法:(1)二维图像渲染(2D image-based rendering);三维模型渲染(3D model-based rendering)。

素描(sketch):缺乏细节的速写作品(a quickly finished work without a lot of details),用于描绘整体构图(global shape)和主要轮廓(main contours);影线(hatching):在相应区域中用平行暗线条描绘色调或阴影(tone or shading)。

在这里插入图片描述
本文提出一种二阶段线条、色调管理(a two-stage system with important stroke and tone management):

(1)素描(sketch):采用卷积框架线条生成(put stroke generation into a convolution framework)获取素描特征(capture the essential characteristics of pencil sketch)、模拟笔尖快速移动(simulate rapid nib movement in drawing)

(2)影线(hatching):引入色调模式(tonal patterns)(没有主方向的密集线条(dense pencil strokes without dominant directions)),防止产生伪影(artifacts);提出参数直方图模型用于色调调整(parametric histogram models are proposed to adjust the tone)

(3)全局最优指数模型(exponential model with global optimization):色调调整、改善重纹理区域(heavily textured regions)和物体轮廓的渲染效果(object contours)

将该方法应用于彩色图像的亮度通道(luminance channel)可生成彩铅素描(color pencil drawing)。

2 相关工作

以往工作一般是根据局部结构确定线条和影线的方向(determines orientation of strokes and hatches based on local structures),但在高纹理或噪声区域中(highly textured or noisy regions),该方法并不稳定(unstable)。

3 模型

本文提出的基于图像的铅笔素描方法(Fig. (2))包括两个步骤:(1)线条生成(pencil stroke generation);(2)色调绘制(pencil tone drawing)。

线条表达场景构图(general structures of the scene);色调侧重(focus)形状(shapes)和阴影(shadow,)。后者用于增强全局光照(depict global illumination)、阴影区域(accentuate shading and dark regions)的表现力。

在这里插入图片描述

3.1 线条(Line Drawing with Strokes)

在素描中,线条(stroke)的属性包括:线宽(thickness)、起伏(wiggliness)、明暗(brightness);线条通常结束于弯曲点(points of curvature)或交叉点(junctions)且几乎没有连续长曲线。

在这里插入图片描述
分类(classification)

输入图像灰度图(grayscale)的梯度(gradient)为:

G = ( ( ∂ x I ) 2 + ( ∂ y I ) 2 ) 1 2 (1) \mathbf{G} = \left( (\partial_{x} \mathbf{I})^{2} + (\partial_{y} \mathbf{I})^{2} \right)^{\frac{1}{2}} \tag {1} G=((xI)2+(yI)2)21(1)

其中, I \mathbf{I} I为灰度图(grayscale input); ∂ x \partial_{x} x ∂ y \partial_{y} y表示梯度算子(gradient operators),可通过前向差分(forward difference)计算。实际图像(natural image)的梯度图(gradient map)通常是有噪的且不包含用于线条生成的连续边缘(continuous edges immediately ready for stroke generation)。

线条方向估计(the estimation of line direction for each pixel)

(1)选择间隔为 45 ° 45 \degree 45°的8个参考方向(eight reference directions at 45 degrees apart),记为线段(line segments) { L i } ,   i ∈ { 1 , … , 8 } \left\{ \mathscr{L}_{i} \right\}, \ i \in \left\{ 1, \dots, 8 \right\} { Li}, i{ 1,,8}。某个方向的响应图(the response map for a certain direction)为:

G i = L i ∗ G (2) \mathbf{G}_{i} = \mathscr{L}_{i} * \mathbf{G} \tag {2} Gi=LiG(2)

其中, L i \mathscr{L}_{i} Li为第 i i i上方向的线段,并表示成卷积核形式(convolution kernel);线段长度取值(经验值(empirically))为输入图像长(宽)的 1 30 \frac{1}{30} 301 ∗ * 表示卷积算子(convolution operator),计算梯度在各方向上投影,构造滤波器响应图 G i \mathbf{G}_{i} Gi(groups gradient magnitudes along direction i i i to form the filter response map G i \mathbf{G}_{i} Gi)。

分类(classification):按梯度在所有方向上投影的最大值对梯度分类(classification is performed by selecting the maximum value among the responses in all directions),

C i = { G ( p ) if  arg max ⁡ i G i = i 0 otherwise (3) \mathbf{C}_{i} = \begin{cases} \mathbf{G}(p) & \text{if }\argmax_{i} \mathbf{G}_{i} = i \\ 0 & \text{otherwise} \end{cases} \tag {3} Ci=G(p)0if iargmaxGi=iotherwise(3)

其中, p p p为像素索引; C i \mathbf{C}_{i} Ci为方向 i i i的幅度图(magnitude map),如Fig. (4),且满足 ∑ i = 1 8 C i = G \sum_{i = 1}^{8} \mathbf{C}_{i} = \mathbf{G} i=18Ci=G。分类策略的鲁棒性高(very robust against different types of noise),对噪声不敏感(no matter whether the gradient of the current pixel is noise contaminated or not)。

■■

原文Eq. (3)为

C i = { G ( p ) if  arg min ⁡ i G i = i 0 otherwise \mathbf{C}_{i} = \begin{cases} \mathbf{G}(p) & \text{if }\argmin_{i} \mathbf{G}_{i} = i \\ 0 & \text{otherwise} \end{cases} Ci=G(p)0if iargminGi=iotherwise

有误

在这里插入图片描述

线条生成(line shaping)

给定集合 C i \mathbf{C}_{i} Ci,在各像素点处,线条生成表示为:

S ′ = ∑ i = 1 8 L i ∗ C i \mathbf{S}^{\prime} = \sum_{i = 1}^{8} \mathscr{L}_{i} * \mathbf{C}_{i} S=i=18LiCi

沿给定方向进行卷积平滑,能够连接原始梯度图中不相连的边缘像素(convolution aggregates nearby pixels along direction L i \mathscr{L}_{i} Li, which links edge pixels that are even not connected in the original gradient map)。 S ′ \mathbf{S}^{\prime} S经逆向处理并归一化后得到输出线条图(pencil stroke map) S \mathbf{S} S(inverting pixel values and mapping them to [ 0 , 1 ] [0, 1] [0,1])。

在这里插入图片描述
讨论(discussion)

生成线条时,该方法考虑了边缘形状和邻域像素(edge shape and neighborhood pixel support),能够准确捕捉素描特征(sketch nature)。

  • 卷积能够沿长线条在交叉点处的端点(the convolution step extends the ends of two lines at the junction point)。由于定向卷积只考虑直线上的像素(directional convolution only aggregates pixels along strictly straight lines),因此只有原始边缘图(the original edge map)中的长直线(long straight lines)才会被延长

  • 由于直线中心区域的像素受两侧像素的影响,因此线条中心区域的笔墨比两端更重(pixels at the center of a long line would receive pixel values from both sides, which make the line center darker than the ends)。

  • 通过连接原始边缘图中不相连的像素,模仿人类画线过程,提高鲁棒性(link pixels that are not necessarily connected in the original edge map when nearby pixels are mostly aligned along the straight line, imitating human line drawing process and resisting noise)。

在这里插入图片描述
由于自然图像的纹理区域可能包含大量细节(natural images contain many textured surfaces with fine details),导致其梯度图中存在大量噪声(Fig. (7)),本文所提方法能够有效处理有噪梯度图。

在这里插入图片描述

3.2 色调(Tone Drawing)

影线(hatching),即稠密线条(dense strokes),用于表现阴影(shadow, shading)和较暗物体。本节给出一种纹理渲染(render pencil texture)方案。

色调图生成(tone map generation)

首先,根据原始灰度输入的信息,确定各像素色调值(determine the tone value for each pixel leveraging information in the original grayscale input)。

本文提出一种参数模型用于拟合素描的色调分布(a parametric model to fit tone distributions of pencil sketch)。自然图像的色调通常变化明显(highly variable tones),而素描色调直方图(a sketch tone histogram)服从特定定模式(certain patterns)。这是因为素描有两种基本色调:(1)高光区域(bright regions);(2)阴影区域(heavy strokes)。在两种基本色调之间是过渡区域,用于丰富画面层次感(mild tone strokes are produced to enrich the layer information)。

在这里插入图片描述
基于模型的色调转移(model-based tone transfer)

拟合色调分布(target tone distribution)参数模型(a parametric model):

p ( v ) = 1 Z ∑ i = 1 3 w i p i ( v ) (4) p(v) = \frac{1}{Z} \sum_{i = 1}^{3} w_{i} p_{i}(v) \tag {4} p(v)=Z1i=13wipi(v)(4)

其中, v v

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Robust controller design involves the synthesis of a controller that can handle uncertainties and disturbances in a system. This is typically done by formulating the problem as an optimization problem, where the goal is to find a controller that minimizes a cost function subject to constraints. One approach to robust controller design involves combining prior knowledge with data. Prior knowledge can come from physical laws, engineering principles, or expert knowledge, and can help to constrain the search space for the controller design. Data, on the other hand, can provide information about the behavior of the system under different conditions, and can be used to refine the controller design. The combination of prior knowledge and data can be done in a number of ways, depending on the specific problem and the available information. One common approach is to use a model-based design approach, where a mathematical model of the system is used to design the controller. The model can be based on physical laws, or it can be derived from data using techniques such as system identification. Once a model is available, prior knowledge can be incorporated into the controller design by specifying constraints on the controller parameters or the closed-loop system response. For example, if it is known that the system has a certain level of damping, this can be used to constrain the controller design to ensure that the closed-loop system response satisfies this requirement. Data can be used to refine the controller design by providing information about the uncertainties and disturbances that the system is likely to encounter. This can be done by incorporating data-driven models, such as neural networks or fuzzy logic systems, into the controller design. These models can be trained on data to capture the nonlinearities and uncertainties in the system, and can be used to generate control signals that are robust to these uncertainties. Overall, combining prior knowledge and data is a powerful approach to robust controller design, as it allows the designer to leverage both physical principles and empirical data to design a controller that is robust to uncertainties and disturbances.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值