JP2004054584A - Method and device for automatically adding line attribute - Google Patents

Method and device for automatically adding line attribute Download PDF

Info

Publication number
JP2004054584A
JP2004054584A JP2002211049A JP2002211049A JP2004054584A JP 2004054584 A JP2004054584 A JP 2004054584A JP 2002211049 A JP2002211049 A JP 2002211049A JP 2002211049 A JP2002211049 A JP 2002211049A JP 2004054584 A JP2004054584 A JP 2004054584A
Authority
JP
Japan
Prior art keywords
line
attribute
size
added
path data
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.)
Pending
Application number
JP2002211049A
Other languages
Japanese (ja)
Inventor
Takeshi Saito
斎藤 豪
Eika Cho
張 英夏
Masayuki Nakajima
中嶋 正之
Akane Kani
可兒 茜
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.)
Rikogaku Shinkokai
Original Assignee
Rikogaku Shinkokai
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 Rikogaku Shinkokai filed Critical Rikogaku Shinkokai
Priority to JP2002211049A priority Critical patent/JP2004054584A/en
Publication of JP2004054584A publication Critical patent/JP2004054584A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To add/correct line attributes emphasizing an object with respect to line drawing configured of a two-dimensional free curve such as a curve computer-inputted with handwriting with no width by applying visually natural feelings in the same way as the similar line drawing is handwritten by a professional painter with an ink pen or brush. <P>SOLUTION: In this method for adding line attributes, the size of line attributes to be added to line drawing is preliminarily set corresponding to the kind of the line attributes to be added to the line drawing and the size of the curvature of the line drawing, and path data expressing the skeleton of an object are inputted, and the path data are automatically divided into a straight part and a curved part, and the curvature is calculated along the traveling direction of the curved part, and the preliminarily set line attributes are added to the path data according to the curvature along the traveling direction. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、アニメーション画像等の線画に対して、インクペンや筆で描いた場合と同様な線の強弱表現等の線属性を付加する場合に有用な線属性の自動付加方法及び装置に関する。又、本発明は、アニメーション画像等の線画に対して、インクペンや筆で描いた場合と同様な線の強弱表現等の線属性を付加する場合に有用な線属性の付加及び修正方法にも関する。
【0002】
【従来の技術】
a1) 米国特許USP5、611、036号には、Berend等により、画像の対象物に、形状と属性を付与する方法及び装置が開示されている。
a2) 米国特許USP5、850、228号には、Hasegawa等により、文字のスケルトン・データを、自動抽出し、変換して、文字フォントを発生させる装置が開示されている。
【0003】
【発明が解決しようとする課題】
上記a1)の方法では、スケルトンを表すパスデータと、付加する属性データとは、完全に独立して、それぞれ定義されているので、汎用性はあるが、線画の製作に、時間がかかり、又、絵心の無い人には、満足な線属性を付与することが、非常に困難であった。
更に、上記a2)の方法では、スケルトンが表すパスデータは、主として、文字データを対象としているので、アニメーションや漫画等の線画には、直接、応用しにくいといった問題点があった。
よって、本発明は上述の様な事情に鑑みて成されたものであり、本発明の目的は、CADデータ、2次元濃淡画像、入力デバイスにより手書きでコンピュータ入力した曲線等のコンピュータで人工的に生成し入力した幅のない線画に対して、インクペンや筆で同様な線画を手書きした場合に当該線画に付加できる線の幅、カラー、濃淡情報等の線属性と同様な見た目に自然な感じを与え、対象物を強調する線属性を自動的に付加する方法及び装置を提供することにある。
又、本発明の目的は、CADデータ、2次元濃淡画像、入力デバイスにより手書きでコンピュータ入力した曲線等のコンピュータで人工的に生成し入力した幅のない線画に対して、インクペンや筆で同様な線画を手書きした場合に当該線画に付加できる線の幅、カラー、濃淡情報等の線属性と同様な見た目に自然な感じを与え、対象物を強調する線属性を付加すると共に、簡単に修正作業が可能な方法を提供することにもある。
【0004】
【課題を解決するための手段】
本発明は、線属性の自動付加方法に関し、本発明の上記目的は、
予め線画に付加する線属性の種類、及び、当該線画の曲率の大きさに応じて付加する線属性の大きさを設定する工程と、
対象物の輪郭を表現するパスデータを入力する工程と、
前記パスデータを、直線部と曲線部とに自動分割する工程と、
前記曲線部の進行方向に沿って曲率を演算する工程と、
前記パスデータに、前記進行方向に沿った曲率に応じて、前記予め設定した線属性を付加する工程と、を含むことによって達成される。
【0005】
【発明の実施の形態】
以下、図面に基づいて、本発明の好適な実施例について、詳細に説明する。
図1は、本発明の線属性の自動付加装置を実現するコンピュータ・システム(パーソナル・コンピュータを含み、以下、PCと略す)10の1例であり、マイクロプロセッサ(以下、MPUと略す)12と、MPU12が実行するプログラムを記憶すると共に、読み書きするデータを記憶する記憶手段(RAM,ROMを含む)14と、CRT,液晶表示手段等の表示手段24に接続され、表示手段24に表示する画像データを記憶するフレーム・メモリ16と、外部の読み書きする入出力装置に接続され、入出力装置の動作を制御する入出力制御手段18とが、内部の共通バス20を介して、相互に接続されるようになっている。
しかして、入出力制御手段18には、ハード・ディスク、CD,MO、DVD等の外部大容量記憶手段22と、ペン&タブレットや、マウス、トラック・ボール、ジョイスティック等からなる、ポインティング手段(座標入力手段)26aと、数値データ、コマンドや制御信号等を入力するキーボード26bと、演算結果を印刷するプリンタ28と、カラー写真等を入力するスキャナ30と、LAN、インターネット等のネットワークを介した通信手段等とが接続され、フレーム・メモリ16に書き込まれたカーソル・シンボルが、ポインティング手段26aから出力される座標データに応答して、MPU12の制御のもとに表示手段24の画面上を指定された位置/方向に移動するようになっている。
【0006】
かかる構成において、本発明の線属性の自動付加方法を、図2のフローチャートに従って説明する。先ず、対象物のスケルトンを表現するパスデータC(s)を入力する前に、初期化作業として、以下のパラメータ/関数を初期設定する(ステップS2)。尚、初期設定したパラメータ/関数は、後で、インタラクティブに修正可能である。
d1) 入力線画に付加する線属性の種類、及び、当該線画の曲率κ(s)の大きさに応じて付加する線属性の横断方向の長さ(大きさ)に変換する関数f(κ(s))を、図3に示すように、横軸を曲率κ(s)とした単調増加関数で設定する。上記線属性の種類としては、線の幅、濃度情報、カラー情報の少なくとも1つを含む属性が指定可能である。
又、関数f(κ(s))は、曲率半径の逆数である曲率κ(s)に比例し、最小の大きさWmin及びこのときの値κmin(s)と、最大の大きさWmaxを指定すると、曲率κ(s)が、κmin(s)の値の場合最小値Wminとなり、単調増加すると共に、最大値Wmaxに、漸近する曲線で指定できるようになっている。尚、単調増加する曲線の勾配は、任意に調節可能であり、sは、パスデータの始点ss、終点se間の道のり変数である。
例えば、図9に示すパラメータ調節メニュ−画面のスライド・バーB2を左右に移動させることにより、関数f(κ(s))の単調増加する勾配を調節可能であり、又、図9に示すパラメータ調節メニュ−画面のスライド・バーB3を左右に移動させることにより、関数f(κ(s))の最大値Wmaxを調節可能であり(同図のB3では、最大値=6.0に設定されている)、図9に示すパラメータ調節メニュ−画面のスライド・バーB4を左右に移動させることにより、関数f(κ(s))の最小値Wminを調節可能である(同図のB4では、最小値=2.0に設定されている)。
d2) 上記付加属性の大きさ関数f(κ(s))に対する規格化関数w(l(s))を、図4に示すように設定する。この関数w(l(s))は、パスデータC(s)の始点、終点間の道のり変数sを、0.0(=sで、始点)と1.0(=sで、終点)で、正規化した場合、始端部位では、関数w(l(s))の値を、0.0から所定の大きさ(例えば、=1.0)まで漸増し、終端部位では、所定の大きさ(例えば、=1.0)から0.0まで漸減させ、始端部及び終端部の形状に変化を付加させる範囲を、図4に示すように、パスデータC(s)の始点、及び/又は、終点間の全体の道のりに対する割合(%)で設定するものである。
例えば、図9に示すパラメータ調節メニュ−画面のスライド・バーB7を左右に移動させることにより、関数w(l(s))の増加/減少する範囲を調節可能である(同図のB7では、全体の道のりに対し、始端部で、25%の範囲を、0.0から1.0まで漸増させ、又、終端部で、25%の範囲を、例えば、1.0から0.0まで漸減させ、始端部及び終端部の形状に変化を付加するように設定されている)。d3) 付加属性の大きさ関数f(κ(s))を付加する位置を、パスデータC(s)の道のり変数sの進行方向に対して、横断方向にオフセット移動させる付加属性の中心位置オフセット関数h(f(κ(s)))を、図5に示すように設定する。
尚、パスデータC(s)の直線部では、付加する線属性の大きさf(κ(s))は、パスデータの進行方向に垂直な方向に対して、左右対称になるように付加する(1例を図6に示す)のが好ましく、パスデータC(s)の曲線部では、付加する線属性の大きさf(κ(s))は、パスデータの進行方向に垂直な方向に対して、外側となる左側又は右側の一方の側に寄せて付加する(1例を図7に示す)のが好ましい。
例えば、図9に示すパラメータ調節メニュ−画面のスライド・バーB9を左右に移動させることにより、関数h(f(s))のオフセット量を調節可能である(同図のB9では、関数f(κ(s))の最小値Wminに対する割合で、関数h()の大きさを設定するようになっており、現在は、関数h()=1.0*Wminの割合で、曲線部位で、完全に外側に、付加する属性値を、オフセット設定するようになっている)。
d4) d1−3)の関数f(κ(s))を付加する位置を、パスデータC(s)の直線部及び曲線部で、それぞれ、異なるオフセット量で、横断方向に移動させた場合、パスデータC(s)の直線部と曲線部との接合部で、いわゆる、段差が発生する。かかる段差を解消し、パスデータC(s)の直線部と曲線部との接合部が滑らかに変化して、接続するように、パスデータC(s)の直線部と曲線部との接合部の範囲fslide及び接続形状g(s)を、図8に示すように設定する。
例えば、図9に示すパラメータ調節メニュ−画面のスライド・バーB7を左右に移動させることにより、関数w(l(s))の増加/減少する範囲を調節可能である(同図のB7では、全体の道のりに対し、始端部で、25%の範囲を、0.0から1.0まで漸増させ、又、終端部で、25%の範囲を、例えば、1.0から0.0まで漸減させ、始端部及び終端部の形状に変化を付加するように設定されている)。
【0007】
かくして、初期設定処理が終了する(尚、default値を使用する場合は、上記処理S2はスキップ可能である)と、次に、対象物のスケルトン(線画)を表現するパスデータC(s)を入力する処理に移る(ステップS4)。
ポインティング手段26aとして、例えば、マウスを利用した場合には、図9に示すパラメータ調節メニュ−画面のスライド・バーB1を左右に移動させることにより、マウスから出力される座標データのサンプリング個数の間隔を調節可能である(同図のB1では、50個毎に、座標値を入力するように設定されている)。又、ポインティング手段26aにより入力した線画の概念図を図10(同図では、自由曲線C(s)は、1本)に、簡単なサンプル例を図11(A)(同図では、自由曲線C(s)は、2本)に、イラスト図の例を図16(同図では、自由曲線C(s)は、13本)に、それぞれ示す。
幅の無い線画パスデータC(s)は、2次元自由曲線で表現され、sは、曲線の媒介変数であり、自由曲線が、点列で入力された場合には、かかる点列を通過する曲線であっても、かかる点列は通過せず、制御節点として入力された曲線であってもよく、曲率κ(s)が演算可能なものであれば、任意のものが利用可能である。以下の例では、入力された点列を通過するスプライン(spline)曲線の例を示すが、このほか、ノン・ユニフォーム・レーショナル・B・スプライン(Non−Uniform Rational B−spline=NURBS)曲線、べジェ曲線及び、これらの曲線を連続的につないだ複合曲線等、種々の曲線が利用可能である。
【0008】
上記幅の無い線画パスデータC(s)の入力処理が終了すると、次に、パスデータC(s)を、始点から終点まで、所定の単位長さで離散化処理する(ステップS6)。図10の自由曲線C(s)の例では、パスデータC(s)の始点(s=s0)から終点(s=se)まで、所定の単位長さ(例えば、描画画面上で、1画素単位)で、曲線の道のりsに沿って、離散化処理する(ステップS6)。
【0009】
次に、所定の単位長さで離散化処理したパスデータC(s)に対し、以下に示す、数1〜数6により、付加属性の大きさf(κ(s))及び付加位置を演算し(ステップS8)、続いて、ステップS8の結果を参照し、付加属性を付加する中心位置及び、左右端位置を判定し、中心リストT(n)、及び、左右端リストL(n),R(n)に登録し記憶する(ステップS10)。則ち、パスデータC(s)は、以下の条件e1)〜e3)により、曲線部、直線部、及び、これらの接合部に、それぞれ、曲率関数の大きさに応じて、自動分割される。
先ず、点C(s)における曲率をκ(s)とし、道のりsの法線方向を、図12に示すようなべクトルN(s)で表すと、付加属性の大きさf(κ(s))は、曲率をκ(s)の大きさに応じて、以下の3つの場合に、分類できる。
【0010】
e1) Wmin < f(κ(s)) である、曲線部では、パスデータの法線方向に、以下の数1、数2で演算される大きさを付加する。
【数1】

Figure 2004054584
【数2】
Figure 2004054584
尚、付加属性の大きさf(κ(s))を付加する位置は、上記中心位置オフセット関数h(s)により、種々の位置に調節可能であるが、パスデータC(s)の曲線部では、付加する線属性の位置は、パスデータの進行方向に垂直な方向であって、曲線部の外側にはみ出すように(1例を、図6及び図10に示す)、左側又は右側の一方の側に寄せて付加すると、いわゆる、「入り」や「抜き」と共に、曲線を強調する強弱感を、自然な視覚感覚で付加でき、好ましい。
又、上記例では、パスデータに沿ったs=nの位置での演算結果を、以下のように記憶する。
中心リストT(n) = C(s)   ・・・(1)
左端リストL(n) = Cnew1    ・・・(2)
右端リストR(n) = Cnew2    ・・・(3)
又は
左端リストL(n) = Cnew2    ・・・(4)
右端リストR(n) = Cnew1    ・・・(5)
尚、上記式2、式3と式4、式5の選択は、法線べクトルN(s)の方向による。
【0011】
e2) 0.0 < f(κ(s)) < Wminである、曲線部と直線部との接合部では、パスデータの法線方向に、以下の数3、数4で演算される大きさを付加する。
【数3】
Figure 2004054584
【数4】
Figure 2004054584
又、上述と同様にして、パスデータに沿ったs=nの位置での演算結果を、式1〜式5により記憶する。
【0012】
e3) 0.0 = < f(κ(s)) である、直線部では、パスデータの法線方向に、以下の数5、数6で演算される大きさを付加する。
【数5】
Figure 2004054584
【数6】
Figure 2004054584
尚、付加属性の大きさf(κ(s))を付加する位置は、上記中心位置オフセット関数h(s)により、種々の位置に調節可能であるが、パスデータC(s)の直線部では、付加する線属性の位置は、パスデータの進行方向に垂直な方向に、左右対称となるように(1例を、図6に示す)付加すると、自然なバランス感覚を付加でき、好ましい。
又、上述と同様にして、パスデータに沿ったs=nの位置での演算結果を、式1〜式5により記憶する。
【0013】
上記段落10乃至段落12の処理を、パスデータC(n)の始点(n=s0)から終点(n=se)まで、曲線の道のりsに沿って繰り返す(ステップS12)と、次に、左右端リストL(n),R(n)に登録した輪郭データの平滑化処理を行う(ステップS14)。
かかる平滑化処理は、リストL(n),R(n)で表される輪郭線と、中心線C(n)との、各位置nでの曲率べクトルの角度差、又は、内積を、始端から終端まで演算し、各べクトルの方向が、所定の値よりも大きく異なっていると判定される場合には、当該不一致部位の周囲の領域(近傍の区間)に対して、線の膨張量を平滑化し、輪郭線を滑らかにする。例えば、
各べクトルの方向が異なる不一致領域の輪郭線の区間を、O(s)(リストL(n)及びR(n))とすると、先ず、中心線C(s)との距離D(s)を演算する。
D(s) = dist(C(s)−O(s))  ・・・(6)
又、中心線C(s)から輪郭線O(s)への、単位べクトルを、V(s)に記憶する。
V(s) = unit−Vect(fromC(s) to O(s))  ・・・(7)
次に、平滑化フィルタF(s)を、距離関数D(s)に畳み込み演算する。
D(s)new = D(s)・convolution・F(s)  ・・・(8)
最後に、次式により、輪郭線の平滑化を、終了する。
O(s) = C(s) + D(s)new・V(s)  ・・・(9)
例えば、図9に示すパラメータ調節メニュ−画面のスライド・バーB5を左右に移動させることにより、フィルタ関数F(s)の平滑化範囲を調節可能であり(同図のB5では、現在、10画素の範囲で、フィルタ演算するように設定されている)、又、図9に示すパラメータ調節メニュ−画面のスライド・バーB6を左右に移動させることにより、フィルタ関数F(s)の最大重み係数を調節可能である(同図のB6では、現在、最大重み=2.0で、フィルタ演算するように設定されている)。
【0014】
次に、予め生成し登録しておいた濃度プロファイルに従って、付加属性の輪郭の内部領域を、指定された付加属性で塗りつぶす(ステップS16)。しかして、登録濃度プロファイルには、以下の3種類のモードが、現在、用意されている。
g1) paint=1で、輪郭線内部の領域を、全て、指定された単一色で塗りつぶすモード。
g2) paint=2で、輪郭線内部の領域を、小領域L(n)、R(n)、L(n+1)、R(n+1)で分割し、かかる小領域単位で、図13(A)に示すような濃度プロファイル・パターンにマッピングし、アフィン(affine)変換により、各小領域を、指定された濃度プロファイルで塗りつぶすモード。
g3) paint=3で、上記paint=2の濃度プロファイル情報を、3次元の高低情報(深さ情報)とみなし、輪郭線内部の領域を、小領域L(n)、R(n)、L(n+1)、R(n+1)で分割し、かかる小領域単位で、図13(A)に示すような深さパターンにマッピングし、アフィン(affine)変換により、各小領域を、指定された3次元深さモデルに変換するモード。
【0015】
全ての付加属性の輪郭の内部領域を、指定された付加属性で塗りつぶすと、塗りつぶし結果を、表示手段24の画面へ表示する(ステップS18)。
又、表示手段24へ表示された塗りつぶし結果を観察し、関数f()、w()、g()、又は、h()を修正したい場合には(ステップS20)、例えば、図9に示すパラメータ調節メニュ−画面を開き、所望の関数f()、w()、g()、又は、h()の調節用パラメータを修正し(ステップS22)、上記ステップS6へ戻る。
更に、表示手段24へ表示された塗りつぶし結果を観察し、関数f()、w()、g()、又は、h()の修正処理は不要であるが、変換され表示された線画の特定部位を局所的に修正処理したい場合には、例えば、表示された線画の該当する特定の局所部位を、ポインティング手段26aで局所的にタッチする(ステップS30)と、表示された線画の特定の局所部位を、修正処理することが出来る。
具体的には、例えば、局所的にタッチされた線画のパスデータに対応する曲率関数κ(s)や、規格化関数w(l(s))を表示し(ステップS32a)、該当する特定の局所部位の関数値κ(s)やw(l(s))を、ポインティング手段26aで、増加、又は、減少せしめ、局所的にマニュアル修正処理し(ステップS34a)、上記ステップS6へ戻り、上記処理を繰り返す。
又、局所的にタッチされた線画のパスデータに対応する曲率関数κ(s)や、規格化関数w(l(s))の表示はせずに、予め所定の修正量を設定登録しておき(ステップS32b)、該当する特定の局所部位の関数値κ(s)やw(l(s))を、上記所定の修正量だけ、ポインティング手段26aでタッチした場合、自動的に、増加、又は、減少せしめ、局所的にマニュアル修正処理し(ステップS34b)、上記ステップS6へ戻り、上記処理を繰り返してもよい。
上記局所的修正処理により、「入り」、「抜き」感と共に、線画の強弱感の自然に強調された画像が、素人でも、名人並みの腕前で、短時間かつ容易に製作可能となる。
【0016】
【実施例】
図11の(A)〜(F)に、非常に簡単な線画に対する、本発明の効果を示す。同図(A)は、手書き入力した幅のないオリジナル線画(原画)であり、この線画に、一様な大きさ(太さ)の付加属性を付与すると、同図(B)の画像が得られるが、ぎこちなく不自然な感じの線画となっている。
又、本発明で提案する左右非対称な大きさの付加属性を原画に付与するため、オフセット関数h(f(κ(s)))=1.0で、付加属性の大きさf(κ(s))を、原画に重ねて表示すると、同図(C)が得られ、その内部を、同一色で塗りつぶすと、同図(D)が得られる。
更に、本発明で提案する左右対称な大きさの付加属性を原画に付与するため、オフセット関数h(f(κ(s)))=0.0で、付加属性の大きさf(κ(s))を、原画に重ねて表示すると、同図(E)が得られ、その内部を、同一色で塗りつぶすと、同図(F)が得られる。
【0017】
次に、図16の手書き入力した幅のないオリジナル線画(原画)に対する本発明の効果を示すと、この線画に、一様な大きさ(太さ)の付加属性を付与すると、図17(A)の画像が得られるが、どことなく不自然で、硬い感じの画像となっている。
又、本発明で提案する始端、終端を、漸増/漸減処理し、オフセット関数h(f(κ(s)))=0.0で、一様な大きさの付加属性を付与し、その内部を、同一色で塗りつぶすと、図17(B)が得られ、曲線の強弱感は無いが、「入り」、「抜き」のある、画像が得られている。
次に、本発明で提案する左右非対称な大きさの付加属性を原画に付与するため、オフセット関数h(f(κ(s)))=1.0で、付加属性の大きさf(κ(s))を、曲率κ(s)に応じて付与し、その内部を、同一色で塗りつぶすと、図18(A)の画像が得られ、曲線の「入り」、「抜き」と共に、曲線の強弱感に富んだ、自然な視覚感のする画像が得られている。
更に、本発明で提案する左右対称な大きさの付加属性を原画に付与するため、オフセット関数h(f(κ(s)))=0.0で、付加属性の大きさf(κ(s))を、曲率κ(s)に応じて付与し、その内部を、同一色で塗りつぶすと、図18(B)の画像が得られ、曲線の「入り」、「抜き」と共に、曲線の強弱感に富んだ、自然な視覚感のする別の画像が得られている。
更に又、本発明で提案する左右非対称な大きさの付加属性を原画に付与した場合の別の効果を観察するため、オフセット関数h(f(κ(s)))=1.0で、付加属性の大きさf(κ(s))の最大値を、変化させ、その内部を同一色で塗りつぶした効果を観察すると、Wmax=3画素に設定した場合、図19(A)に示す画像が得られ、Wmax=5画素に設定した場合、図19(B)に示す画像が得られた。図19の結果からは、対象物により、最適な線幅があるように感じられる。
【0018】
次に、表示手段24へ表示された塗りつぶし結果を観察し、関数f()、w()、g()、又は、h()の修正処理は不要であるが、変換され表示された線画の特定部位を局所的に修正処理した例を、図20及び図21を参照して説明する。
先ず、図20(A)に示すパスデータC(s)に対して、上述と同様にして、オフセット関数h(f(κ(s)))=1.0で、かつ、一様な濃度で内部領域を塗りつぶした例を、図20(B)に示す。
続いて、例えば、表示された属性付加処理後の線画の該当する特定の局所部位を、ポインティング手段26aで局所的にタッチする(ステップS30)と、表示された線画の特定の局所部位を含む2次元自由曲線に対応した規格化関数w(l(s))が、表示され(ステップS32a)、道のり関数l(s)の始端からほぼ中央中点付近までの関数w(l(s))の形状を、ポインティング手段26aで、増加せしめ、図21に示すような形状に、局所的にマニュアル修正処理を追加した(ステップS34a)後、上記ステップS6へ戻り、上記処理を繰り返して、再び、属性付加した線画を表示手段24に表示すると、図20(C)に示すような画像が得られ、同様にして、所望の局所部位を、任意に増加/減少修正処理することが可能である。
【0019】
次に、本発明の付加属性として濃度情報を付加した1例を、図22乃至図24を参照して説明すると、先ず、図示しない手書きの幅のない線画パスデータC(s)に対して、上述と同様にして、オフセット関数h(f(κ(s)))=1.0で、かつ、一様な濃度で内部領域を塗りつぶした例を、図22に示す。
続いて、例えば、図13(A)に示すような濃度パターンで、上記内部領域を塗りつぶすと、図23に示すような濃度情報で内部領域を塗りつぶした画像が得られる。
更に、この濃度情報を、高さ情報(深さ情報)に変換して、斜め上方からの光源で、かかる3次元立体を照射し、得られる画像を、図24に示す。
【0020】
【発明の効果】
以上説明したように、本発明によれば、CADデータ、2次元濃淡画像、ポインティング手段により手書きでコンピュータ入力した曲線等のコンピュータで人工的に生成し入力た2次元自由曲線からなる幅のない線画に対して、インクペンや筆で同様な線画を、プロの画家が手書きした場合に当該線画に付加できる線の幅、カラー、濃淡情報等の線属性と同様な見た目に自然な感じを与え、対象物を強調する線属性を自動的に付加し、又、自動付加後の線属性を局所的に容易に手動修正することができる。
従って、プロの画家にとっても、又、絵心のない普通の人にとっても、簡単で、操作しやすく、線属性の付加処理や、その修正処理が、直感的で、結果の非常に分かりやすい線属性付加方法及び装置を提供することができる。
【図面の簡単な説明】
【図1】本発明のシステム全体の構成の1例を示すブロック図である。
【図2】本発明の線属性付加工程の1例を示すフローチャートである。
【図3】本発明の線属性の大きさ変換関数f(κ(s))の1例を示す図である。
【図4】本発明の線属性の規格化関数w(l(s))の1例を示す図である。
【図5】本発明の線属性の中心位置オフセット関数h(f(κ(s))の1例を示す図である。
【図6】本発明の直線部と曲線部との境界段差の1例を示す図である。
【図7】本発明の直線部と曲線部との境界段差部を滑らかに接合した1例を示す図である。
【図8】本発明の直線部と曲線部との段差部接続関数g(f(κ(s)))の1例を示す図である。
【図9】本発明のパラメータ設定メニュ−画面の1例を示す図である。
【図10】本発明のパスデータC(s)の1例を示す図である。
【図11】本発明の線属性付加処理を、簡単な線画に対して、実施した1例を示す図である。
【図12】本発明の法線べクトルN(s)の1例を示す図である。
【図13】本発明の濃度情報で輪郭線の内部を塗りつぶす処理の1例を示す図である。
【図14】その濃度プロファイルの1例を示す図である。
【図15】本発明の付加した線属性の修正処理の1例を示すフローチャートである。
【図16】本発明の線属性付加処理を行う前のオリジナル線画の1例を示す図である。
【図17】上記オリジナル線画に、均一な属性を付加した例(A)、及び、「入り」、「抜き」のみが付加された例(B)である。
【図18】上記オリジナル線画に、大きさが左右で不均一な強弱(h()=1)のある属性を付加した例(A)、及び、大きさが左右で均一な強弱(h()=0)のある属性を付加した例(B)である。
【図19】上記オリジナル線画に、大きさが3ピクセルで、左右で不均一な強弱のある属性を付加した例(A)、及び、大きさが5ピクセルで、左右で不均一な強弱のある属性を付加した例(B)である。
【図20】本発明の線属性付加後の、手動修正処理の1例を示す図である。
【図21】その規格化関数w(l(s))の手動修正後の1例を示す図である。
【図22】本発明の別の線画に対して、均一な濃度情報の線属性を付加した1例を示す図である。
【図23】上記均一な濃度情報に替えて、濃度プロファイル情報の線属性を付加した1例を示す図である。
【図24】上記濃度プロファイル情報を深さ情報に変換して線属性を付加した1例を示す図である。
【符号の説明】
10 コンピュータ・システム
12 マイクロプロセッサ(MPU)
14 記憶手段(RAM,ROMを含む)
16 フレーム・メモリ
18 入出力制御手段
20 共通バス
22 外部大容量記憶手段
24 表示手段
26a ポインティング手段
26b キーボード
28 プリンタ
30 スキャナ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method and an apparatus for automatically adding a line attribute useful for adding a line attribute such as a dynamic expression of a line to a line drawing such as an animation image, which is similar to the case of drawing with an ink pen or a brush. The present invention also relates to a method of adding and modifying a line attribute useful for adding a line attribute such as a dynamic expression of a line to a line drawing such as an animation image, which is similar to the case of drawing with an ink pen or a brush. .
[0002]
[Prior art]
a1) U.S. Pat. No. 5,611,036 discloses a method and apparatus for assigning a shape and an attribute to an image object by Berend et al.
a2) U.S. Pat. No. 5,850,228 discloses a device for automatically extracting and converting character skeleton data and generating a character font by Hasegawa et al.
[0003]
[Problems to be solved by the invention]
In the method a1), the path data representing the skeleton and the attribute data to be added are completely independently defined, so that they have versatility, but it takes a long time to produce a line drawing. It is very difficult to give a satisfactory line attribute to a person with no pictorial heart.
Furthermore, in the method a2), since the path data represented by the skeleton is mainly for character data, there is a problem that it is difficult to apply directly to line drawings such as animations and cartoons.
Therefore, the present invention has been made in view of the above-mentioned circumstances, and an object of the present invention is to artificially generate a computer such as a CAD data, a two-dimensional gray-scale image, a curve input manually by a computer using an input device, or the like. When a similar line drawing is drawn by hand with an ink pen or a brush for a line drawing with no width generated and input, it looks natural like the line attributes such as line width, color, and shading information that can be added to the line drawing. It is an object of the present invention to provide a method and an apparatus for automatically adding a line attribute that emphasizes an object.
Further, the object of the present invention is to apply a similar method to a CAD image, a two-dimensional gray-scale image, and a line drawing without a width artificially generated and input by a computer, such as a curve manually input by a computer using an input device, using an ink pen or a brush. Gives a natural look to line attributes such as line width, color, shading information, etc. that can be added to the line drawing when handwriting the line drawing, adds a line attribute that emphasizes the object, and easily corrects it To provide a possible method.
[0004]
[Means for Solving the Problems]
The present invention relates to a method for automatically adding a line attribute.
Setting the type of the line attribute to be added to the line drawing in advance, and the size of the line attribute to be added according to the magnitude of the curvature of the line drawing;
Inputting path data representing the contour of the object;
Automatically dividing the path data into a straight line portion and a curved portion;
Calculating a curvature along the traveling direction of the curved portion,
Adding the preset line attribute to the path data in accordance with the curvature along the traveling direction.
[0005]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 shows an example of a computer system (including a personal computer, hereinafter abbreviated as a PC) 10 for realizing an automatic line attribute adding apparatus according to the present invention, and a microprocessor (hereinafter abbreviated as an MPU) 12. And a storage unit (including a RAM and a ROM) 14 for storing a program to be executed by the MPU 12 and data to be read and written, and an image to be displayed on the display unit 24 which is connected to a display unit 24 such as a CRT or a liquid crystal display unit. A frame memory 16 for storing data and an input / output control means 18 connected to an external input / output device for reading / writing and controlling the operation of the input / output device are mutually connected via an internal common bus 20. It has become so.
The input / output control means 18 includes external mass storage means 22 such as a hard disk, CD, MO, and DVD, and pointing means (coordinates) including a pen & tablet, a mouse, a track ball, and a joystick. Input means) 26a, a keyboard 26b for inputting numerical data, commands, control signals, and the like, a printer 28 for printing operation results, a scanner 30 for inputting color photographs and the like, and communication via a network such as a LAN or the Internet. The cursor symbol written in the frame memory 16 is designated on the screen of the display means 24 under the control of the MPU 12 in response to the coordinate data output from the pointing means 26a. Move to the position / direction that was set.
[0006]
In such a configuration, a method of automatically adding a line attribute according to the present invention will be described with reference to the flowchart of FIG. First, before inputting the path data C (s) representing the skeleton of the object, the following parameters / functions are initialized as initialization work (step S2). The initially set parameters / functions can be interactively modified later.
d1) A function f (κ () () that converts the line attribute to be added to the input line drawing into a transverse length (size) of the line attribute to be added according to the magnitude of the curvature κ (s) of the line drawing. s)) is set by a monotonically increasing function with the horizontal axis being the curvature κ (s), as shown in FIG. As the type of the line attribute, an attribute including at least one of line width, density information, and color information can be designated.
The function f (κ (s)) is proportional to the curvature κ (s), which is the reciprocal of the radius of curvature, and specifies the minimum size Wmin, the value κmin (s) at this time, and the maximum size Wmax. Then, the curvature κ (s) becomes the minimum value Wmin in the case of the value of κmin (s), monotonically increases, and can be specified by a curve that asymptotically approaches the maximum value Wmax. The slope of the monotonically increasing curve can be arbitrarily adjusted, and s is a path variable between the start point ss and the end point se of the path data.
For example, the monotonously increasing gradient of the function f (κ (s)) can be adjusted by moving the slide bar B2 on the parameter adjustment menu screen shown in FIG. 9 to the left or right, and the parameter shown in FIG. The maximum value Wmax of the function f (κ (s)) can be adjusted by moving the slide bar B3 on the adjustment menu screen to the left and right (the maximum value is set to 6.0 in B3 in the same figure). The minimum value Wmin of the function f (κ (s)) can be adjusted by moving the slide bar B4 on the parameter adjustment menu screen shown in FIG. The minimum value is set to 2.0).
d2) A normalization function w (l (s)) for the size function f (κ (s)) of the additional attribute is set as shown in FIG. This function w (l (s)) calculates the path variable s between the start point and the end point of the path data C (s) by 0.0 (= s, start point) and 1.0 (= s, end point). In the case of normalization, the value of the function w (l (s)) is gradually increased from 0.0 to a predetermined size (for example, = 1.0) at the start portion, and the predetermined size is set at the end portion. As shown in FIG. 4, the range in which the shape is gradually decreased from (for example, = 1.0) to 0.0 and the shape of the start end and the end is added is the start point of the path data C (s) and / or , As a percentage (%) of the entire distance between the end points.
For example, the range in which the function w (l (s)) increases / decreases can be adjusted by moving the slide bar B7 on the parameter adjustment menu screen shown in FIG. 9 to the left or right (in B7 in FIG. At the beginning, the range of 25% is gradually increased from 0.0 to 1.0, and at the end, the range of 25% is gradually reduced from 1.0 to 0.0, for example. To change the shapes of the start end and the end.) d3) The center position offset of the additional attribute in which the position to which the size function f (κ (s)) of the additional attribute is added is shifted in the transverse direction with respect to the traveling direction of the path variable s of the path data C (s). The function h (f (κ (s))) is set as shown in FIG.
In the linear portion of the path data C (s), the size f (κ (s)) of the line attribute to be added is added so as to be symmetrical with respect to a direction perpendicular to the traveling direction of the path data. (One example is shown in FIG. 6). In the curved part of the path data C (s), the size f (κ (s)) of the line attribute to be added is in a direction perpendicular to the traveling direction of the path data. On the other hand, it is preferable to add it to one of the left side or the right side which is the outside (an example is shown in FIG. 7).
For example, the offset amount of the function h (f (s)) can be adjusted by moving the slide bar B9 on the parameter adjustment menu screen shown in FIG. 9 left and right (in FIG. 9B, the function f ( The magnitude of the function h () is set by the ratio of κ (s)) to the minimum value Wmin. Currently, the ratio of the function h () = 1.0 * Wmin, The attribute value to be added is set to offset completely outside.)
d4) When the position at which the function f (κ (s)) of d1-3) is added is shifted in the transverse direction by different offset amounts in the linear part and the curved part of the path data C (s), respectively. A so-called step occurs at the joint between the straight line portion and the curved line portion of the path data C (s). The junction between the straight line portion and the curved line portion of the path data C (s) is changed so that such a step is eliminated and the joint portion between the straight line portion and the curved line portion of the path data C (s) changes smoothly and connects. The range fslide and the connection shape g (s) are set as shown in FIG.
For example, the range in which the function w (l (s)) increases / decreases can be adjusted by moving the slide bar B7 on the parameter adjustment menu screen shown in FIG. 9 to the left or right (in B7 in FIG. At the beginning, the range of 25% is gradually increased from 0.0 to 1.0, and at the end, the range of 25% is gradually reduced from 1.0 to 0.0, for example. To change the shapes of the start end and the end.)
[0007]
Thus, when the initial setting process is completed (when the default value is used, the above process S2 can be skipped), the path data C (s) expressing the skeleton (line drawing) of the object is then changed. The process proceeds to an input process (step S4).
For example, when a mouse is used as the pointing means 26a, by moving the slide bar B1 of the parameter adjustment menu screen shown in FIG. Adjustment is possible (in B1 in the figure, it is set so that a coordinate value is input for every 50). A conceptual diagram of a line drawing input by the pointing means 26a is shown in FIG. 10 (in FIG. 10, a free curve C (s) is one), and a simple sample example is shown in FIG. C (s) is shown in FIG. 16 and an example of an illustration is shown in FIG. 16 (in this figure, 13 free curves C (s) are shown).
The line drawing path data C (s) having no width is represented by a two-dimensional free curve, and s is a parameter of the curve. When the free curve is input as a sequence of points, the free curve passes through the sequence of points. Even if it is a curve, it may not be such a sequence of points and may be a curve input as a control node, and any one can be used as long as the curvature κ (s) can be calculated. In the following example, an example of a spline curve passing through the input point sequence is shown. In addition, a non-uniform relational B-spline (Non-Uniform Rational B-spline = NURBS) curve, Various curves are available, such as a Je curve and a composite curve connecting these curves continuously.
[0008]
When the input processing of the line image path data C (s) having no width is completed, next, the path data C (s) is discretized by a predetermined unit length from the start point to the end point (step S6). In the example of the free curve C (s) in FIG. 10, a predetermined unit length (for example, one pixel on the drawing screen) from the start point (s = s0) to the end point (s = se) of the path data C (s) In step S6, a discretization process is performed along the path s of the curve.
[0009]
Next, for the path data C (s) discretized by a predetermined unit length, the size f (κ (s)) of the additional attribute and the additional position are calculated by the following equations 1 to 6. (Step S8) Then, referring to the result of Step S8, the center position where the additional attribute is added and the left and right end positions are determined, and the center list T (n) and the left and right end list L (n), Register and store in R (n) (step S10). That is, the path data C (s) is automatically divided into a curved part, a straight part, and a joint part thereof according to the following conditions e1) to e3) according to the magnitude of the curvature function. .
First, when the curvature at the point C (s) is κ (s), and the normal direction of the road s is represented by a vector N (s) as shown in FIG. 12, the size of the additional attribute f (κ (s) ) Can be classified into the following three cases according to the magnitude of κ (s).
[0010]
e1) In the curved part where Wmin <f (κ (s)), a size calculated by the following equations 1 and 2 is added in the normal direction of the path data.
(Equation 1)
Figure 2004054584
(Equation 2)
Figure 2004054584
The position at which the size f (κ (s)) of the additional attribute is added can be adjusted to various positions by the center position offset function h (s), but the curve portion of the path data C (s) can be adjusted. Then, the position of the line attribute to be added is in a direction perpendicular to the traveling direction of the path data and protrudes outside the curved portion (one example is shown in FIGS. 6 and 10). Is preferable, because it is possible to add a dynamic sense of emphasizing a curve together with the so-called "enter" and "pull" with a natural visual sense.
In the above example, the calculation result at the position of s = n along the path data is stored as follows.
Center list T (n) = C (s) (1)
Left end list L (n) = Cnew1 (2)
Right end list R (n) = Cnew2 (3)
Or
Left end list L (n) = Cnew2 (4)
Right end list R (n) = Cnew1 (5)
The selection of the above formulas 2, 3 and 4 and 5 depends on the direction of the normal vector N (s).
[0011]
e2) At the junction of the curved part and the straight part, where 0.0 <f (κ (s)) <Wmin, the magnitude calculated by the following equations 3 and 4 in the normal direction of the path data Is added.
[Equation 3]
Figure 2004054584
(Equation 4)
Figure 2004054584
In the same manner as described above, the calculation result at the position of s = n along the path data is stored by Expressions 1 to 5.
[0012]
e3) In the linear portion where 0.0 = <f (κ (s)), a size calculated by the following Expressions 5 and 6 is added in the normal direction of the path data.
(Equation 5)
Figure 2004054584
(Equation 6)
Figure 2004054584
The position at which the size f (κ (s)) of the additional attribute is added can be adjusted to various positions by the center position offset function h (s), but the linear portion of the path data C (s) can be adjusted. Then, it is preferable to add a line attribute to be added symmetrically in the direction perpendicular to the traveling direction of the path data (one example is shown in FIG. 6), so that a natural sense of balance can be added.
In the same manner as described above, the calculation result at the position of s = n along the path data is stored by Expressions 1 to 5.
[0013]
When the processing of the above paragraphs 10 to 12 is repeated along the curve s from the start point (n = s0) to the end point (n = se) of the path data C (n) (step S12), The contour data registered in the end lists L (n) and R (n) are smoothed (step S14).
This smoothing process calculates the angle difference or inner product of the curvature vector at each position n between the contour lines represented by the lists L (n) and R (n) and the center line C (n). From the beginning to the end, if it is determined that the direction of each vector is significantly different from the predetermined value, the line expansion is performed on the area around the mismatched part (the neighborhood section). Smooth the volume and smooth the contours. For example,
Assuming that the section of the contour line of the non-coincidence area in which the direction of each vector is different is O (s) (lists L (n) and R (n)), first, the distance D (s) from the center line C (s) Is calculated.
D (s) = dist (C (s) -O (s)) (6)
Also, the unit vector from the center line C (s) to the contour line O (s) is stored in V (s).
V (s) = unit-Vect (fromC (s) to O (s)) (7)
Next, the smoothing filter F (s) is convolved with the distance function D (s).
D (s) new = D (s) · convolution · F (s) (8)
Finally, smoothing of the contour line is ended by the following equation.
O (s) = C (s) + D (s) new · V (s) (9)
For example, the smoothing range of the filter function F (s) can be adjusted by moving the slide bar B5 on the parameter adjustment menu screen shown in FIG. 9 to the left or right. Is set so as to perform the filter operation within the range of), and by moving the slide bar B6 of the parameter adjustment menu screen shown in FIG. 9 to the left and right, the maximum weight coefficient of the filter function F (s) can be changed. It is adjustable (in B6 in the figure, it is set so that the filter operation is performed with the maximum weight = 2.0 at present).
[0014]
Next, according to the density profile generated and registered in advance, the internal region of the outline of the additional attribute is painted with the specified additional attribute (step S16). Thus, the following three modes are currently prepared in the registered density profile.
g1) A mode in which all areas inside the outline are painted in a designated single color when paint = 1.
g2) When paint = 2, the area inside the contour is divided into small areas L (n), R (n), L (n + 1), and R (n + 1), and FIG. A mode in which each small area is filled with a designated density profile by affine transformation by mapping to a density profile pattern as shown in FIG.
g3) When paint = 3, the density profile information of paint = 2 is regarded as three-dimensional height information (depth information), and the area inside the contour is defined as small areas L (n), R (n), and L (n). (N + 1) and R (n + 1) are divided into small area units, mapped to a depth pattern as shown in FIG. 13 (A), and each small area is designated by designated affine (affine) transformation. Mode to convert to dimensional depth model.
[0015]
When the inner area of the outline of all the additional attributes is filled with the specified additional attribute, the result of the filling is displayed on the screen of the display unit 24 (step S18).
In addition, when the result of the filling displayed on the display means 24 is observed and the function f (), w (), g (), or h () is to be corrected (step S20), for example, as shown in FIG. The parameter adjustment menu screen is opened, the parameters for adjusting the desired function f (), w (), g (), or h () are corrected (step S22), and the process returns to step S6.
Further, the result of the filling displayed on the display means 24 is observed, and the correction processing of the functions f (), w (), g (), or h () is unnecessary. When it is desired to locally correct the part, for example, when the pointing part 26a locally touches a specific local part corresponding to the displayed line drawing (step S30), the specific local part of the displayed line drawing is touched. The site can be corrected.
Specifically, for example, a curvature function κ (s) and a normalization function w (l (s)) corresponding to the path data of the line drawing that is locally touched are displayed (step S32a), and the corresponding specific The function value κ (s) or w (l (s)) of the local part is increased or decreased by the pointing unit 26a, and locally manually corrected (step S34a), and the process returns to step S6. Repeat the process.
Also, the curvature function κ (s) and the normalization function w (l (s)) corresponding to the path data of the line drawing that has been locally touched are not displayed, and a predetermined correction amount is set and registered in advance. Every other step (step S32b), if the function value κ (s) or w (l (s)) of the corresponding specific local part is touched by the pointing unit 26a by the predetermined correction amount, the value is automatically increased. Alternatively, the number may be decreased and manual correction processing may be locally performed (step S34b), and the process may return to step S6 and repeat the above processing.
By the above-described local correction processing, an image in which the feeling of “drawing in” and “pulling out” and the feeling of the strength of the line drawing are naturally emphasized can be easily and quickly produced even by an amateur with the skill of a master.
[0016]
【Example】
FIGS. 11A to 11F show the effect of the present invention on a very simple line drawing. FIG. 7A shows an original line drawing (original image) having no width input by handwriting. When an additional attribute having a uniform size (thickness) is added to this line drawing, the image shown in FIG. However, it is awkward and unnatural line drawing.
In addition, in order to add the left-right asymmetric size of the additional attribute proposed in the present invention to the original image, the offset function h (f (κ (s))) = 1.0 and the additional attribute size f (κ (s )) Is superimposed on the original image, and FIG. 14C is obtained. When the inside is filled with the same color, FIG. 14D is obtained.
Further, in order to add the left-right symmetric size of the additional attribute proposed in the present invention to the original image, the offset function h (f (κ (s))) = 0.0 and the size of the additional attribute f (κ (s) )) Is displayed superimposed on the original image, and FIG. 17E is obtained. When the inside is filled with the same color, FIG.
[0017]
Next, the effect of the present invention with respect to the original line drawing (original image) having no width input by handwriting shown in FIG. 16 will be described. If an additional attribute having a uniform size (thickness) is added to this line drawing, FIG. ) Is obtained, but the image is somewhat unnatural and hard.
In addition, the start and end points proposed in the present invention are gradually increased / decreased, and an offset function h (f (κ (s))) = 0.0, and an additional attribute having a uniform size is given. Is painted in the same color, and FIG. 17 (B) is obtained, and an image with “in” and “out” is obtained although there is no sense of the strength of the curve.
Next, in order to add an additional attribute having a left-right asymmetric size proposed in the present invention to the original image, the offset function h (f (κ (s))) = 1.0 and the additional attribute size f (κ ( s)) is given according to the curvature κ (s), and the inside thereof is filled with the same color to obtain an image of FIG. 18A. An image with a strong visual sense and a natural visual feeling is obtained.
Further, in order to add the left-right symmetrical additional attribute proposed in the present invention to the original image, the offset function h (f (κ (s))) = 0.0 and the additional attribute size f (κ (s )) According to the curvature κ (s) and filling the inside with the same color, the image of FIG. 18 (B) is obtained, and the strength of the curve along with “enter” and “pull” of the curve Another image with a rich and natural visual feeling is obtained.
Furthermore, in order to observe another effect when the additional attribute of the left-right asymmetric size proposed in the present invention is added to the original image, the offset function h (f (κ (s))) = 1.0 Observing the effect of changing the maximum value of the attribute size f (κ (s)) and filling the inside with the same color, when Wmax = 3 pixels, the image shown in FIG. When Wmax = 5 pixels was obtained, the image shown in FIG. 19B was obtained. From the results in FIG. 19, it is felt that there is an optimum line width depending on the object.
[0018]
Next, the result of the filling displayed on the display means 24 is observed, and the correction processing of the functions f (), w (), g (), or h () is unnecessary. An example in which a specific part is locally corrected will be described with reference to FIGS.
First, for the path data C (s) shown in FIG. 20A, the offset function h (f (κ (s))) = 1.0 and uniform density FIG. 20B shows an example in which the internal area is filled.
Subsequently, for example, when the pointing device 26a locally touches a specific local part corresponding to the displayed line drawing after the attribute addition processing (step S30), the specific local part of the displayed line drawing including the specific local part is displayed. A normalized function w (l (s)) corresponding to the two-dimensional free curve is displayed (step S32a), and the function w (l (s)) from the starting point of the road function l (s) to near the center of the center is displayed. The shape is increased by the pointing means 26a, and a manual correction process is locally added to the shape as shown in FIG. 21 (step S34a). Then, the process returns to step S6, repeats the above process, and returns the attribute again. When the added line drawing is displayed on the display means 24, an image as shown in FIG. 20C is obtained. Similarly, it is possible to arbitrarily increase / decrease a desired local region. That.
[0019]
Next, an example in which density information is added as an additional attribute according to the present invention will be described with reference to FIGS. 22 to 24. First, with respect to unillustrated handwritten line drawing path data C (s) having no width. FIG. 22 shows an example in which the offset area h (f (κ (s))) = 1.0 and the internal area is painted with a uniform density in the same manner as described above.
Subsequently, for example, when the above-mentioned inner region is painted out with a density pattern as shown in FIG. 13A, an image in which the inner region is painted with the density information as shown in FIG. 23 is obtained.
Further, the density information is converted into height information (depth information), and the three-dimensional solid is irradiated with a light source obliquely from above, and an image obtained is shown in FIG.
[0020]
【The invention's effect】
As described above, according to the present invention, a line drawing without width consisting of a two-dimensional free curve artificially generated and input by a computer, such as CAD data, a two-dimensional grayscale image, and a curve manually input by a computer using a pointing means. When a professional artist paints a similar line drawing with an ink pen or a brush, it gives the same natural appearance as line attributes such as line width, color, and shading information that can be added to the line drawing. A line attribute that emphasizes an object can be automatically added, and the line attribute after the automatic addition can be locally and easily corrected manually.
Therefore, both for professional painters and for ordinary people without pictorial minds, the process of adding and modifying line attributes is intuitive and very easy to understand. An additional method and apparatus can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of the configuration of the entire system of the present invention.
FIG. 2 is a flowchart illustrating an example of a line attribute adding step according to the present invention.
FIG. 3 is a diagram illustrating an example of a size conversion function f (κ (s)) of a line attribute according to the present invention.
FIG. 4 is a diagram illustrating an example of a line attribute normalization function w (l (s)) according to the present invention.
FIG. 5 is a diagram illustrating an example of a center position offset function h (f (κ (s)) of a line attribute according to the present invention.
FIG. 6 is a diagram illustrating an example of a boundary step between a straight line portion and a curved portion according to the present invention.
FIG. 7 is a diagram showing an example of the present invention in which a boundary step portion between a straight line portion and a curved portion is smoothly joined.
FIG. 8 is a diagram illustrating an example of a step connection function g (f (κ (s))) between a straight line portion and a curved portion according to the present invention.
FIG. 9 is a diagram showing an example of a parameter setting menu screen of the present invention.
FIG. 10 is a diagram showing an example of path data C (s) of the present invention.
FIG. 11 is a diagram showing an example in which the line attribute addition processing of the present invention is performed on a simple line drawing.
FIG. 12 is a diagram showing an example of a normal vector N (s) of the present invention.
FIG. 13 is a diagram illustrating an example of a process of filling the inside of a contour line with density information according to the present invention.
FIG. 14 is a diagram showing an example of the density profile.
FIG. 15 is a flowchart illustrating an example of a process of correcting an added line attribute according to the present invention.
FIG. 16 is a diagram illustrating an example of an original line drawing before performing a line attribute adding process according to the present invention.
FIG. 17 shows an example (A) in which uniform attributes are added to the original line drawing, and an example (B) in which only “enter” and “pull” are added.
FIG. 18 shows an example (A) in which an attribute having strength (h () = 1) having unevenness in size is added to the original line drawing, and strength (h ()) having size uniform in left and right. = 0) is an example (B) in which an attribute is added.
FIG. 19 shows an example (A) in which an attribute having a size of 3 pixels and unevenness in the left and right directions is added to the original line drawing, and FIG. This is an example (B) in which an attribute is added.
FIG. 20 is a diagram illustrating an example of a manual correction process after adding a line attribute according to the present invention.
FIG. 21 is a diagram showing an example of the normalized function w (l (s)) after manual correction.
FIG. 22 is a diagram showing an example in which a line attribute of uniform density information is added to another line image of the present invention.
FIG. 23 is a diagram illustrating an example in which a line attribute of density profile information is added instead of the uniform density information.
FIG. 24 is a diagram showing an example in which the density profile information is converted into depth information and a line attribute is added.
[Explanation of symbols]
10 Computer system
12 Microprocessor (MPU)
14 Storage means (including RAM and ROM)
16 frame memory
18 I / O control means
20 common bus
22 External mass storage means
24 display means
26a pointing means
26b keyboard
28 Printer
30 Scanner

Claims (7)

線属性の自動付加方法であって、
予め線画に付加する線属性の種類、及び、当該線画の曲率の大きさに応じて付加する線属性の大きさを設定する工程と、
対象物のスケルトンを表現するパスデータを入力する工程と、
前記パスデータを、直線部と曲線部とに自動分割する工程と、
前記曲線部の進行方向に沿って曲率を演算する工程と、
前記パスデータに、前記進行方向に沿った曲率に応じて、前記予め設定した線属性を付加する工程と、を含むことを特徴とする線属性の自動付加方法。
A method for automatically adding line attributes,
Setting the type of the line attribute to be added to the line drawing in advance, and the size of the line attribute to be added according to the magnitude of the curvature of the line drawing;
Inputting path data representing the skeleton of the object;
Automatically dividing the path data into a straight line portion and a curved portion;
Calculating a curvature along the traveling direction of the curved portion,
Adding the preset line attribute to the path data in accordance with the curvature along the traveling direction.
前記パスデータに対して、予めパスデータの始点、終点間の道のりを変数とし、前記付加属性の大きさに関する規格化関数を設定する工程と、
前記パスデータに、前記進行方向に沿った曲率に応じて、前記予め設定した線属性を付加する工程が、前記付加属性の大きさに関する規格化関数により、前記付加属性の大きさを修正する工程を更に含む請求項1に記載の線属性の自動付加方法。
For the path data, a path between the start point and the end point of the path data is set as a variable, and a normalization function related to the size of the additional attribute is set.
The step of adding the preset line attribute to the path data in accordance with the curvature along the traveling direction, the step of correcting the size of the additional attribute by a normalization function relating to the size of the additional attribute 2. The method for automatically adding a line attribute according to claim 1, further comprising:
前記付加属性の大きさを付加する位置を移動させる付加属性の中心位置オフセット関数を設定する工程と、
前記パスデータに、前記進行方向に沿った曲率に応じて、前記予め設定した線属性を付加する工程が、前記オフセット関数により、前記付加属性の大きさを付加する位置を修正する工程を更に含む請求項1又は2に記載の線属性の自動付加方法。
Setting a center position offset function of the additional attribute to move the position of adding the size of the additional attribute,
The step of adding the preset line attribute to the path data according to the curvature along the traveling direction further includes a step of correcting a position at which the size of the additional attribute is added by the offset function. The method for automatically adding a line attribute according to claim 1.
前記直線部では、前記付加する線属性の大きさが、前記線の進行方向に垂直な方向に対して、左右対称になるように付加する工程を更に含む請求項1乃至3のいずれか1項に記載の線属性の自動付加方法。4. The method according to claim 1, further comprising the step of adding the size of the line attribute to be added so that the size of the line attribute to be added is symmetric with respect to a direction perpendicular to the traveling direction of the line. Automatic addition method of line attribute described in. 前記直線部と前記曲線部との接合部において、前記付加する線属性の大きさが連続するように補正する工程を更に含む請求項1乃至4のいずれか1項に記載の線属性の自動付加方法。The automatic addition of the line attribute according to any one of claims 1 to 4, further comprising a step of correcting the size of the line attribute to be added to be continuous at a joint portion between the straight line portion and the curved portion. Method. 前記線属性の種類が、線の幅、濃度情報、カラー情報の少なくとも1つを含む請求項1乃至5のいずれか1項に記載の線属性の自動付加方法。The method according to claim 1, wherein the type of the line attribute includes at least one of line width, density information, and color information. 前記線画が、漫画、又は、アニメーション画像である請求項1乃至6のいずれか1項に記載の線属性の自動付加方法。The method according to any one of claims 1 to 6, wherein the line drawing is a cartoon or an animation image.
JP2002211049A 2002-07-19 2002-07-19 Method and device for automatically adding line attribute Pending JP2004054584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002211049A JP2004054584A (en) 2002-07-19 2002-07-19 Method and device for automatically adding line attribute

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002211049A JP2004054584A (en) 2002-07-19 2002-07-19 Method and device for automatically adding line attribute

Publications (1)

Publication Number Publication Date
JP2004054584A true JP2004054584A (en) 2004-02-19

Family

ID=31934385

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002211049A Pending JP2004054584A (en) 2002-07-19 2002-07-19 Method and device for automatically adding line attribute

Country Status (1)

Country Link
JP (1) JP2004054584A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100901276B1 (en) 2007-12-17 2009-06-09 한국전자통신연구원 Apparatus for proccessing an effect using style line
JP2010092481A (en) * 2008-10-06 2010-04-22 Arm Ltd Graphics processing system
WO2013118190A1 (en) * 2012-02-10 2013-08-15 三菱電機株式会社 Gradation drawing device
US8743135B2 (en) 2008-10-06 2014-06-03 Arm Limited Graphics processing systems
US8928667B2 (en) 2008-10-06 2015-01-06 Arm Limited Rendering stroked curves in graphics processing systems

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100901276B1 (en) 2007-12-17 2009-06-09 한국전자통신연구원 Apparatus for proccessing an effect using style line
US8085270B2 (en) 2007-12-17 2011-12-27 Electronics And Telecommunications Research Institute Apparatus for proccessing drawn-by-human-hand effect using style lines
JP2010092481A (en) * 2008-10-06 2010-04-22 Arm Ltd Graphics processing system
US8743135B2 (en) 2008-10-06 2014-06-03 Arm Limited Graphics processing systems
US8928667B2 (en) 2008-10-06 2015-01-06 Arm Limited Rendering stroked curves in graphics processing systems
US8928668B2 (en) 2008-10-06 2015-01-06 Arm Limited Method and apparatus for rendering a stroked curve for display in a graphics processing system
WO2013118190A1 (en) * 2012-02-10 2013-08-15 三菱電機株式会社 Gradation drawing device
JPWO2013118190A1 (en) * 2012-02-10 2015-05-11 三菱電機株式会社 Gradient drawing device
US9607430B2 (en) 2012-02-10 2017-03-28 Mitsubishi Electric Corporation Gradation drawing device

Similar Documents

Publication Publication Date Title
US6628295B2 (en) Modifying a stylistic property of a vector-based path
US8760467B2 (en) Distortion of raster and vector artwork
US5611036A (en) Apparatus and method for defining the form and attributes of an object in an image
EP0950988B1 (en) Three-Dimensional image generating apparatus
CN109544669B (en) Diffusion coloring using weighted color points
US8144171B2 (en) Scale-dependent rendering of natural media styles
US5892691A (en) Method, apparatus, and software product for generating weighted deformations for geometric models
US7412360B2 (en) Method and apparatus for shape deformation and placement
EP1748391A2 (en) Three-dimensional animation of soft tissue of characters using controls associated with a surface mesh
JP4404650B2 (en) Makeup simulation device, makeup simulation method, makeup simulation program
JPH06507743A (en) Image synthesis and processing
JP2003256865A (en) Method and program for generating two-dimensional image with cartoon-like expression from stereoscopic object data
Miranda et al. Sketch express: A sketching interface for facial animation
JPH08101922A (en) Picture editing and forming device and picture editing and forming method
JP4308343B2 (en) Curve smoothing
Kang et al. A unified scheme for adaptive stroke-based rendering
JP2004054584A (en) Method and device for automatically adding line attribute
JP2000285222A (en) Eye makeup simultaion system
US6281902B1 (en) Three-dimensional image creating apparatus
JPH08297751A (en) Method and device for three-dimensional model generation
JP3770840B2 (en) Method and system for generating and processing harmonized point networks
CN117853320B (en) Image mapping method, system and storage medium based on multimedia control
Van den Bergh et al. Interactively morphing irregularly shaped images employing subdivision techniques
Nealen Interfaces and algorithms for the creation, modification, and optimization of surface meshes
JPH0955881A (en) Picture shading method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050617

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20071023

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071206

RD13 Notification of appointment of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7433

Effective date: 20071206

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20071023

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080813

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080826

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090113