# CN104268915A - 一种手写汉字的实时轮廓美化方法 - Google Patents

## Info

Publication number
CN104268915A
CN104268915A CN201410484141.5A CN201410484141A CN104268915A CN 104268915 A CN104268915 A CN 104268915A CN 201410484141 A CN201410484141 A CN 201410484141A CN 104268915 A CN104268915 A CN 104268915A
Authority
CN
China
Prior art keywords
profile
follow
curve
pen section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410484141.5A
Other languages
English (en)
Other versions
CN104268915B (zh
Inventor

Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201410484141.5A priority Critical patent/CN104268915B/zh
Publication of CN104268915A publication Critical patent/CN104268915A/zh
Application granted granted Critical
Publication of CN104268915B publication Critical patent/CN104268915B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

## Description

1、笔刷模型建模

2、笔段轮廓生成

$\left\{\begin{array}{c}{q}_{0}={p}_{i-2}\\ {q}_{1}=\frac{1}{2}\left({p}_{i-2}+{p}_{i-1}\right)\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\---\left(1\right)$

$\left\{\begin{array}{c}{q}_{0}=\frac{1}{2}\left({p}_{i-3}+{p}_{i-2}\right)\\ {q}_{1}={p}_{i-2}\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\---\left(2\right)$

$\left[\begin{array}{ccc}{w}_{i}& 0& {x}_{i}\\ 0& {w}_{i}& {y}_{i}\\ 0& 0& 1\end{array}\right];$

${C}_{\mathrm{head}}=\left\{{P}_{0,i}^{\mathrm{break}}+{Q}_{0,i}\right\},{j}_{0,1}

${C}_{\mathrm{end}}=\left\{{P}_{4,i}^{\mathrm{break}}+{Q}_{4,i}\right\},{j}_{4,1}

${C}_{\mathrm{left}}\stackrel{\mathrm{Bezierfitting}}{←}\left\{{p}_{{0,j}_{0,1}},{p}_{{1,j}_{1,1}}{p}_{{2,j}_{2,1}}{p}_{{3,j}_{3,1}}{p}_{{4,j}_{4,1}}\right\}---\left(5\right)$
${C}_{\mathrm{right}}\stackrel{\mathrm{Bezierfitting}}{←}\left\{{p}_{{0,j}_{0,1}},{p}_{{1,j}_{1,1}}{p}_{{2,j}_{2,1}}{p}_{{3,j}_{3,1}}{p}_{{4,j}_{4,1}}\right\}---\left(6\right)$

1、笔刷轮廓合并

$\left\{\begin{array}{c}{C}_{\mathrm{merged},\mathrm{head}}={C}_{\mathrm{lead},\mathrm{head}}\\ {C}_{\mathrm{merged},\mathrm{left}}={C}_{\mathrm{lead},\mathrm{left}}+{C}_{\mathrm{follow},\mathrm{left}}\\ {C}_{\mathrm{merged},\mathrm{tail}}={C}_{\mathrm{follow},\mathrm{tail}}\\ {C}_{\mathrm{merged},\mathrm{right}}={C}_{\mathrm{follow},\mathrm{left}}+{C}_{\mathrm{lead},\mathrm{right}}\end{array}\right\---\left(7\right)$

$\left\{\begin{array}{c}{p}_{\mathrm{lead},3}={p}_{\mathrm{follow},3}\\ {p}_{\mathrm{lead},3}-{p}_{\mathrm{lead},2}=k\left({p}_{\mathrm{lead},1}-{p}_{\mathrm{lead},0}\right)\end{array}\right\---\left(8\right)$

2、轮廓冗余消除

$\stackrel{‾}{R}\left(t\right)=\left\{\begin{array}{cc}\underset{i=0}{\overset{n}{\mathrm{Σ}}}{p}_{i}{B}_{i}^{n}\left(\frac{t}{\mathrm{λ}}\right)& 0≤t≤\mathrm{λ}\\ \underset{i=0}{\overset{n}{\mathrm{Σ}}}{Q}_{i}{B}_{i}^{n}\left(\frac{t-\mathrm{λ}}{1-\mathrm{λ}}\right)& 0≤t≤\mathrm{λ}\end{array}\right\---\left(10\right)$

$\mathrm{ϵ}=\frac{d\left(R,\stackrel{‾}{R}\right)}{L\left(R\right)}---\left(11\right)$

$\mathrm{ρ}=\frac{{\mathrm{Cout}}_{\mathrm{old}}-{\mathrm{Cout}}_{\mathrm{merged}}}{{\mathrm{Cout}}_{\mathrm{old}}}---\left(12\right)$

1、由于轮廓美化这种美化方法将美化分解为笔段美化和笔画合并两个过程，从而保证了美化效果的联机实时，避免书写时的视觉跳跃。
2、这种方法能够良好地保留汉字书法形状和线条，体现书法的灵气。
3、这种轮廓美化的方法采用了多项式函数表示的轮廓极大地降低了存储量，提高了渲染速度。
4、由于这种轮廓美化的方法采用的是Bezier曲线拟合，所以具有Bezier曲线的几何不变性以及仿射不变性，给编辑带来了极大的便利。
5、基于速度的宽度控制方法生成了良好的书法效果，且笔画轮廓能够逼真地表现笔画外观；由Bezier曲线组成的笔画轮廓具有渲染快速、仿射不变等优点，方便文字信息的储存与处理；笔段美化细分了美化运算的颗粒度，同时矢量化的笔段轮廓渲染快速，使而实现了美化效果的实时显示，提高了用户体验。

1、笔刷模型建模

2、宽度控制模型

${w}_{n}={w}_{\mathrm{max}}-\mathrm{α}\left({w}_{\mathrm{max}}-{w}_{\mathrm{min}}\right){v}_{n}^{\mathrm{λ}}$

3、笔段轮廓生成

$\left\{\begin{array}{c}{q}_{0}={p}_{i-2}\\ {q}_{1}=\frac{1}{2}\left({p}_{i-2}+{p}_{i-1}\right)\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\$

$\left\{\begin{array}{c}{q}_{0}=\frac{1}{2}\left({p}_{i-3}+{p}_{i-2}\right)\\ {q}_{1}={p}_{i-2}\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\$

$\left[\begin{array}{ccc}{w}_{i}& 0& {x}_{i}\\ 0& {w}_{i}& {y}_{i}\\ 0& 0& 1\end{array}\right];$

${C}_{\mathrm{head}}=\left\{{P}_{0,i}^{\mathrm{break}}+{Q}_{0,i}\right\},{j}_{0,1}

${C}_{\mathrm{end}}=\left\{{P}_{4,i}^{\mathrm{break}}+{Q}_{4,i}\right\},{j}_{4,1}

${C}_{\mathrm{left}}\stackrel{\mathrm{Bezierfitting}}{←}\left\{{p}_{{0,j}_{0,1}},{p}_{{1,j}_{1,1}}{p}_{{2,j}_{2,1}}{p}_{{3,j}_{3,1}}{p}_{{4,j}_{4,1}}\right\}$
${C}_{\mathrm{right}}\stackrel{\mathrm{Bezierfitting}}{←}\left\{{p}_{{0,j}_{0,1}},{p}_{{1,j}_{1,1}}{p}_{{2,j}_{2,1}}{p}_{{3,j}_{3,1}}{p}_{{4,j}_{4,1}}\right\}$

1.笔刷轮廓合并

$\left\{\begin{array}{c}{C}_{\mathrm{merged},\mathrm{head}}={C}_{\mathrm{lead},\mathrm{head}}\\ {C}_{\mathrm{merged},\mathrm{left}}={C}_{\mathrm{lead},\mathrm{left}}+{C}_{\mathrm{follow},\mathrm{left}}\\ {C}_{\mathrm{merged},\mathrm{tail}}={C}_{\mathrm{follow},\mathrm{tail}}\\ {C}_{\mathrm{merged},\mathrm{right}}={C}_{\mathrm{follow},\mathrm{left}}+{C}_{\mathrm{lead},\mathrm{right}}\end{array}\right\$

$\left\{\begin{array}{c}{p}_{\mathrm{lead},3}={p}_{\mathrm{follow},3}\\ {p}_{\mathrm{lead},3}-{p}_{\mathrm{lead},2}=k\left({p}_{\mathrm{lead},1}-{p}_{\mathrm{lead},0}\right)\end{array}\right\$

2.轮廓冗余消除

$\stackrel{‾}{R}\left(t\right)=\left\{\begin{array}{cc}\underset{i=0}{\overset{n}{\mathrm{Σ}}}{p}_{i}{B}_{i}^{n}\left(\frac{t}{\mathrm{λ}}\right)& 0≤t≤\mathrm{λ}\\ \underset{i=0}{\overset{n}{\mathrm{Σ}}}{Q}_{i}{B}_{i}^{n}\left(\frac{t-\mathrm{λ}}{1-\mathrm{λ}}\right)& 0≤t≤\mathrm{λ}\end{array}\right\$

$\mathrm{ϵ}=\frac{d\left(R,\stackrel{‾}{R}\right)}{L\left(R\right)}$

## Claims (5)

1.一种手写汉字的实时轮廓美化方法，其特征在于，包括以下步骤：
S1.笔段轮廓生成：通过建立笔刷模型及根据笔段轮廓生成算法生成笔段轮廓；
S2.笔画轮廓生成：通过笔段轮廓的合并以及冗余轮廓的消除两大过程生成笔画轮廓。
2.根据权利要求1所述的手写汉字的实时轮廓美化方法，其特征在于，步S1中，所述的笔段轮廓生成时采用了建立笔刷模型的处理方法：采用多段的三次Bezier曲线对笔刷轮廓进行拟合，合成封闭的笔刷轮廓，先利用图像学知识获取给定笔刷图片的轮廓点序列，然后利用曲线分裂技术，寻找点序列的分裂点，这些点称为笔刷的轮廓点，接着针对每一小段序列，拟合成三次Bezier曲线，最后将相邻的Bezier曲线光滑并接，即可得到封闭的笔刷轮廓。
3.根据权利要求1所述的手写汉字的实时轮廓美化方法，其特征在于，步骤S1中，所述的笔段轮廓生成具体的方法为：寻找3阶贝塞尔曲线的四个点以及笔段轮廓生成的算法，假设在时刻i，设备采集到采样点Pi，如果i为3的倍数，我们可以利用最近的三个点生成Bezier曲线；于是可以通过下列规则生成Bezier曲线四个点q0,q1,q2,q3

$\left\{\begin{array}{c}{q}_{0}={p}_{i-2}\\ {q}_{1}=\frac{1}{2}\left({p}_{i-2}+{p}_{i-1}\right)\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\;$

$\left\{\begin{array}{c}{q}_{0}=\frac{1}{2}\left({p}_{i-3}+{p}_{i-2}\right)\\ {q}_{1}={p}_{i-2}\\ {q}_{2}={p}_{i-1}\\ {q}_{3}=\frac{1}{2}\left({p}_{i-1}+{p}_{i}\right)\end{array}\right\;$

4.根据权利要求1所述的手写汉字的实时轮廓美化方法，其特征在于，步骤S2中，所述的笔段轮廓合并的具体操作为：

$\left\{\begin{array}{c}{C}_{\mathrm{merged},\mathrm{head}}={C}_{\mathrm{lead},\mathrm{head}}\\ {C}_{\mathrm{merged},\mathrm{left}}={C}_{\mathrm{lead},\mathrm{left}}+{C}_{\mathrm{follow},\mathrm{left}}\\ {C}_{\mathrm{merged},\mathrm{tail}}={C}_{\mathrm{follow},\mathrm{tail}}\\ {C}_{\mathrm{merged},\mathrm{right}}={C}_{\mathrm{follow},\mathrm{left}}+{C}_{\mathrm{lead},\mathrm{right}}\end{array}\right\$

$\left\{\begin{array}{c}{p}_{\mathrm{lead},3}={p}_{\mathrm{follow},3}\\ {p}_{\mathrm{lead},3}-{p}_{\mathrm{lead},2}=k\left({p}_{\mathrm{lead},1}-{p}_{\mathrm{lead},0}\right)\end{array}\right\$

5.根据权利要求1所述的手写汉字的实时轮廓美化方法，其特征在于，步骤S2中，所述的冗余轮廓消除的操作是消除冗余Bezier曲线，也就是采用数量尽量少的曲线集代替原有的曲线集，具体实现方法如下：对于笔画轮廓中相邻的两条Bezier曲线P(u)与Q(v)，对应的控制点为Pi与Qi(i＝0,1,…,n)，寻找Bezier曲线R(t)，对应的控制点为Ri，使其与之间的距离在区间[0,1]达到最小，其中定义为：
$\stackrel{‾}{R}\left(t\right)=\left\{\begin{array}{cc}\underset{i=0}{\overset{n}{\mathrm{Σ}}}{P}_{i}{B}_{i}^{n}\left(\frac{t}{\mathrm{λ}}\right)& 0≤t≤\mathrm{λ}\\ \underset{i=0}{\overset{n}{\mathrm{Σ}}}{Q}_{i}{B}_{i}^{n}\left(\frac{t-\mathrm{λ}}{1-\mathrm{λ}}\right)& \mathrm{λ}≤t≤1\end{array}\right\;$

$\mathrm{ϵ}=\frac{d\left(R,\stackrel{‾}{R}\right)}{L\left(R\right)}$

$\mathrm{ρ}=\frac{{\mathrm{Cout}}_{\mathrm{old}}-{\mathrm{Cout}}_{\mathrm{merged}}}{{\mathrm{Cout}}_{\mathrm{old}}}$

CN201410484141.5A 2014-09-19 2014-09-19 一种手写汉字的实时轮廓美化方法 Active CN104268915B (zh)

## Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410484141.5A CN104268915B (zh) 2014-09-19 2014-09-19 一种手写汉字的实时轮廓美化方法

## Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410484141.5A CN104268915B (zh) 2014-09-19 2014-09-19 一种手写汉字的实时轮廓美化方法

## Publications (2)

Publication Number Publication Date
CN104268915A true CN104268915A (zh) 2015-01-07
CN104268915B CN104268915B (zh) 2017-08-25

# Family

## Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410484141.5A Active CN104268915B (zh) 2014-09-19 2014-09-19 一种手写汉字的实时轮廓美化方法

## Country Status (1)

CN (1) CN104268915B (zh)

## Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108269296A (zh) * 2017-12-22 2018-07-10 北京壹人壹本信息科技有限公司 图片处理方法、移动终端及装置
CN109409211A (zh) * 2018-09-11 2019-03-01 北京语言大学 汉字骨架笔段的处理方法和系统
CN111815743A (zh) * 2020-07-14 2020-10-23 深圳市昇利扬科技有限公司 一种数字墨水手写笔迹美化的方法
CN114356201A (zh) * 2021-12-23 2022-04-15 科大讯飞股份有限公司 一种书写美化方法、装置、设备和可读存储介质

## Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699516A (zh) * 2009-10-30 2010-04-28 华南理工大学 一种手写汉字美化的笔画渲染方法
CN101699518A (zh) * 2009-10-30 2010-04-28 华南理工大学 一种基于轨迹分析的手写汉字的美化方法
US20130147809A1 (en) * 2011-12-12 2013-06-13 Samsung Electronics Co., Ltd. Method and apparatus for calligraphic beautification of handwritten characters

## Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699516A (zh) * 2009-10-30 2010-04-28 华南理工大学 一种手写汉字美化的笔画渲染方法
CN101699518A (zh) * 2009-10-30 2010-04-28 华南理工大学 一种基于轨迹分析的手写汉字的美化方法
US20130147809A1 (en) * 2011-12-12 2013-06-13 Samsung Electronics Co., Ltd. Method and apparatus for calligraphic beautification of handwritten characters

## Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HAILONG LI ET AL.: "Calligraphy Beatification Method for Chinese Handwritings", 《2012 FOURTH INTERNATIONAL CONFERENCE ON DIGITAL HOME》 *

## Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108269296A (zh) * 2017-12-22 2018-07-10 北京壹人壹本信息科技有限公司 图片处理方法、移动终端及装置
CN109409211A (zh) * 2018-09-11 2019-03-01 北京语言大学 汉字骨架笔段的处理方法和系统
CN111815743A (zh) * 2020-07-14 2020-10-23 深圳市昇利扬科技有限公司 一种数字墨水手写笔迹美化的方法
CN114356201A (zh) * 2021-12-23 2022-04-15 科大讯飞股份有限公司 一种书写美化方法、装置、设备和可读存储介质

## Also Published As

Publication number Publication date
CN104268915B (zh) 2017-08-25

## Similar Documents

Publication Publication Date Title
CN110211192B (zh) 一种基于深度学习的三维模型到二维图像的渲染方法
CN103559732B (zh) 一种生成毛笔笔迹的方法
CN104268915A (zh) 一种手写汉字的实时轮廓美化方法
CN101853523A (zh) 一种采用草图创建三维人脸模型的方法
CN103500037A (zh) 一种轨迹平滑的方法及装置
CN103473572B (zh) 一种手写汉字美观度的评价方法
CN111127596B (zh) 一种基于增量Voronoi序列的分层油画笔刷绘制方法
CN110310351A (zh) 一种基于草图的三维人体骨骼动画自动生成方法
CN104899896B (zh) 一种基于子空间特征的多任务学习目标跟踪方法
CN104821005A (zh) 可模拟笔势风格的汉字书法作品书写过程动态复现的方法
CN106155540B (zh) 电子毛笔笔形处理方法和装置
CN111815743A (zh) 一种数字墨水手写笔迹美化的方法
CN101697234A (zh) 一种基于笔画分段建模的手写汉字隶书美化方法
CN110084890A (zh) 基于混合现实的机械臂文字复写方法及装置
Alexe et al. Shape modeling by sketching using convolution surfaces
Luo et al. Simpmodeling: Sketching implicit field to guide mesh modeling for 3d animalmorphic head design
Deng et al. Sketch2pq: freeform planar quadrilateral mesh design via a single sketch
CN102938157A (zh) 一种基于圆域b样条曲线的风格化手绘生成方法与系统
CN109857322A (zh) 一种基于安卓的画笔宽度控制方法和装置
Mi et al. The droplet virtual brush for Chinese calligraphic character modeling
CN106951166B (zh) 笔迹绘制方法及装置
CN102496178B (zh) 基于单视点图像的烟雾三维密度场的生成方法
CN101916451A (zh) 书法特定风格渲染的方法
Seki et al. Sketch-based 3d hair posing by contour drawings

## Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant