JP2020134557A - Character data generation device, method, and program - Google Patents

Character data generation device, method, and program Download PDF

Info

Publication number
JP2020134557A
JP2020134557A JP2019023545A JP2019023545A JP2020134557A JP 2020134557 A JP2020134557 A JP 2020134557A JP 2019023545 A JP2019023545 A JP 2019023545A JP 2019023545 A JP2019023545 A JP 2019023545A JP 2020134557 A JP2020134557 A JP 2020134557A
Authority
JP
Japan
Prior art keywords
character
deformation
amount
deformation amount
font
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
JP2019023545A
Other languages
Japanese (ja)
Other versions
JP7171145B2 (en
Inventor
宮本 雅之
Masayuki Miyamoto
雅之 宮本
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.)
Wacom Co Ltd
Original Assignee
Wacom Co Ltd
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 Wacom Co Ltd filed Critical Wacom Co Ltd
Priority to JP2019023545A priority Critical patent/JP7171145B2/en
Publication of JP2020134557A publication Critical patent/JP2020134557A/en
Application granted granted Critical
Publication of JP7171145B2 publication Critical patent/JP7171145B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To provide a character data generation device capable of generating character data where confusion when visualized is suppressed in comparison with when deforming fonts for each character at random, a method, and a program.SOLUTION: A character data generation device 10 includes: a deformation amount determining part 24 determining a deformation amount showing the degree of deformation of font every character configuring an acquired character sequence; and a character generation part 26 generating character data 34 showing a font arrangement after deformation by applying deformation processing to font data showing original fonts by using the determined deformation amount. The deformation amount determining part 24 sequentially determines a deformation amount of a designated character by using the deformation amount of other characters which is earlier in an arrangement order than the designated character designated in a character string. Thus, a user interface (SF-UI; Soft Feel/Stress Free User Interface) which has soft touch/causes no stress is realized.SELECTED DRAWING: Figure 4

Description

本発明は、文字データ生成装置、方法及びプログラムに関する。 The present invention relates to a character data generator, a method and a program.

特許文献1には、乱数を用いて文字毎の角度をランダムに決定し、その角度分だけ回転又は傾斜させる変形処理を元のフォントデータに対して施すことで、表現のばらつきがある個性的な文字データを出力する装置が開示されている。 In Patent Document 1, the angle of each character is randomly determined using a random number, and the original font data is subjected to a transformation process of rotating or tilting by that angle, so that the original font data has a unique expression. A device that outputs character data is disclosed.

特開平09−305161号公報Japanese Unexamined Patent Publication No. 09-305161

ところが、回転角度又は傾斜角度を含む変形量が一様分布に従うように、文字毎の変形量をランダムに決定すると、フォントの変形に起因するノイズパワースペクトル(NPS)が周波数によらず一定である、いわゆる「ホワイトノイズ」的な表現になってしまう。この場合、観察者は、出力された文字列を画像として視認する際に雑然さを覚える可能性がある。 However, if the amount of deformation for each character is randomly determined so that the amount of deformation including the rotation angle or tilt angle follows a uniform distribution, the noise power spectrum (NPS) due to the deformation of the font is constant regardless of the frequency. , So-called "white noise" expression. In this case, the observer may feel cluttered when visually recognizing the output character string as an image.

本発明の目的は、文字毎のフォントをランダムに変形する場合と比べて、視認時の雑然さが抑制された文字データを生成可能な文字データ生成装置、方法及びプログラムを提供することである。 An object of the present invention is to provide a character data generation device, method and program capable of generating character data in which clutter at the time of visual recognition is suppressed as compared with the case where a font for each character is randomly transformed.

第1の本発明における文字データ生成装置は、文字列を取得する文字列取得部と、前記文字列取得部により取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する変形量決定部と、前記変形量決定部により決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する文字生成部と、を備え、前記変形量決定部は、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定する。 The character data generation device of the first invention has a character string acquisition unit that acquires a character string, and a deformation amount that indicates the degree of deformation of the font for each character that constitutes the character string acquired by the character string acquisition unit. By using the deformation amount determination unit to be determined and the deformation amount determined by the deformation amount determination unit to perform transformation processing on the font data indicating the original font for each character, a character indicating the font arrangement after transformation is performed. A character generation unit for generating data is provided, and the transformation amount determination unit uses a transformation amount of another character whose arrangement order is earlier than the specified character specified in the character string to generate the specified character. The amount of deformation is determined sequentially.

第2の本発明における文字データ生成方法は、文字列を取得する取得ステップと、取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する決定ステップと、決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する生成ステップと、を1つ又は複数のコンピュータが実行し、前記決定ステップでは、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定する。 The second character data generation method in the present invention is determined by an acquisition step of acquiring a character string and a determination step of determining a deformation amount indicating the degree of font deformation for each character constituting the acquired character string. One or more computers perform a generation step of generating character data indicating a font arrangement after transformation by performing transformation processing on font data indicating the original font for each character using the above-mentioned transformation amount. In the determination step, the transformation amount of the designated character is sequentially determined by using the transformation amount of another character whose arrangement order is earlier than the designated character specified in the character string.

第3の本発明における文字データ生成プログラムは、文字列を取得する取得ステップと、取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する決定ステップと、決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する生成ステップと、を1つ又は複数のコンピュータに実行させ、前記決定ステップでは、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定する。 The third character data generation program of the present invention is determined by an acquisition step of acquiring a character string and a determination step of determining a deformation amount indicating the degree of font deformation for each character constituting the acquired character string. A generation step of generating character data indicating a font array after transformation by performing transformation processing on font data indicating the original font for each character using the above-mentioned transformation amount is performed on one or more computers. In the determination step, the transformation amount of the designated character is sequentially determined by using the transformation amount of another character whose arrangement order is earlier than the designated character specified in the character string.

本発明によれば、文字毎のフォントをランダムに変形する場合と比べて、視認時の雑然さが抑制された文字データを生成することができる。 According to the present invention, it is possible to generate character data in which clutter at the time of visual recognition is suppressed as compared with the case where the font for each character is randomly transformed.

本発明の一実施形態における文字データ生成装置の電気的なブロック図である。It is an electric block diagram of the character data generation apparatus in one Embodiment of this invention. 図1の文字データ生成装置の動作説明に供されるフローチャートである。It is a flowchart provided for the operation explanation of the character data generation apparatus of FIG. 文字座標系の定義の一例を示す図である。It is a figure which shows an example of the definition of a character coordinate system. 変形量の決定方法の一例を示す図である。It is a figure which shows an example of the method of determining a deformation amount. 文字列画像の変化を模式的に示す図である。It is a figure which shows the change of the character string image schematically.

以下、本発明における文字データ生成装置について、文字データ生成方法及び文字データ生成プログラムとの関係において好適な実施形態を挙げ、添付の図面を参照しながら説明する。なお、この発明は、後述する実施形態に限定されるものではなく、この発明の主旨を逸脱しない範囲で自由に変更できることは勿論である。 Hereinafter, the character data generation device of the present invention will be described with reference to the accompanying drawings with reference to preferred embodiments in relation to the character data generation method and the character data generation program. It should be noted that the present invention is not limited to the embodiments described later, and of course, the present invention can be freely changed without departing from the gist of the present invention.

<文字データ生成装置10の構成>
図1は、本発明の一実施形態における文字データ生成装置10の電気的なブロック図である。文字データ生成装置10は、後述する文字データ34を生成して出力するコンピュータであり、柔らかな感触をもった/ストレスを感じさせないユーザ・インターフェース(SF−UI;Soft Feel/Stress Free User Interface)を実現する装置である。この文字データ生成装置10は、具体的には、通信部12と、入力部14と、表示部16と、制御部18と、記憶部20とを含んで構成される。
<Configuration of character data generation device 10>
FIG. 1 is an electrical block diagram of the character data generation device 10 according to the embodiment of the present invention. The character data generation device 10 is a computer that generates and outputs character data 34, which will be described later, and provides a user interface (SF-UI; Soft Feel / Stress Free User Interface) that has a soft feel / does not feel stress. It is a device to realize. Specifically, the character data generation device 10 includes a communication unit 12, an input unit 14, a display unit 16, a control unit 18, and a storage unit 20.

通信部12は、外部装置に対して電気信号を送受信するための通信インターフェースである。これにより、文字データ生成装置10は、元のフォントを示すフォントデータを外部装置から受信可能であり、自身が生成した文字データ34を外部装置に向けて送信可能である。 The communication unit 12 is a communication interface for transmitting and receiving electric signals to and from an external device. As a result, the character data generation device 10 can receive font data indicating the original font from the external device, and can transmit the character data 34 generated by itself to the external device.

入力部14は、マウス、キーボード、タッチセンサ、又はマイクロフォンを含んで構成される。表示部16は、液晶ディスプレイ、OLED(Organic Electro-Luminescence Display)を含む表示装置から構成される。入力部14による入力機能及び表示部16による表示機能を組み合わせることで、グラフィカル・ユーザ・インターフェース(GUI)を構築可能である。 The input unit 14 includes a mouse, a keyboard, a touch sensor, or a microphone. The display unit 16 includes a liquid crystal display and a display device including an OLED (Organic Electro-Luminescence Display). A graphical user interface (GUI) can be constructed by combining the input function by the input unit 14 and the display function by the display unit 16.

制御部18は、CPU(Central Processing Unit)又はGPU(Graphics Processing Unit)のプロセッサによって構成されている。制御部18は、記憶部20に格納されたプログラムを読み出し実行することで、文字列取得部22、変形量決定部24、文字生成部26、及び出力処理部28の各機能を遂行可能である。 The control unit 18 is composed of a processor of a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). The control unit 18 can execute the functions of the character string acquisition unit 22, the deformation amount determination unit 24, the character generation unit 26, and the output processing unit 28 by reading and executing the program stored in the storage unit 20. ..

記憶部20は、制御部18が各構成要素を制御するのに必要なプログラム及びデータを記憶している。記憶部20は、非一過性であり、かつ、コンピュータ読み取り可能な記憶媒体で構成されている。ここで、コンピュータ読み取り可能な記憶媒体は、光磁気ディスク、ROM、CD−ROM、フラッシュメモリ等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置である。 The storage unit 20 stores programs and data necessary for the control unit 18 to control each component. The storage unit 20 is composed of a non-transient and computer-readable storage medium. Here, the computer-readable storage medium is a portable medium such as a magneto-optical disk, ROM, CD-ROM, flash memory, or a storage device such as a hard disk built in a computer system.

なお、記憶部20には、文字のフォントに関するデータベース(以下、フォントDB30)が構築されると共に、入力データ32、文字データ34、及び複数のパラメータセット36が格納されている。 The storage unit 20 is constructed with a database related to character fonts (hereinafter referred to as font DB 30), and stores input data 32, character data 34, and a plurality of parameter sets 36.

<文字データ生成装置10の動作>
この実施形態における文字データ生成装置10は、以上のように構成される。続いて、文字データ生成装置10の動作(ここでは、文字データ34の生成及び出力)について、図2のフローチャート及び図3〜図5を参照しながら説明する。
<Operation of character data generation device 10>
The character data generation device 10 in this embodiment is configured as described above. Subsequently, the operation of the character data generation device 10 (here, generation and output of the character data 34) will be described with reference to the flowchart of FIG. 2 and FIGS. 3 to 5.

図2のステップS1において、文字列取得部22は、文字列を含む入力データ32を記憶部20から読み出すことで、対象である文字列を取得する。この入力データ32は、入力部14からのユーザの入力操作を通じて得られたデータであってもよいし、外部装置から供給されたデータであってもよい。 In step S1 of FIG. 2, the character string acquisition unit 22 acquires the target character string by reading the input data 32 including the character string from the storage unit 20. The input data 32 may be data obtained through a user input operation from the input unit 14, or may be data supplied from an external device.

ステップS2において、制御部18は、ステップS1で取得された文字列の種類に応じて、変形量の決定アルゴリズムを選択する。ここで、「変形量」とは、フォントの変形度合いを示す量であり、具体例として、2次元アフィン変換における変換パラメータ(θ,γ1,γ2,s1,s2)が挙げられる。なお、θは回転角度、γ1はX軸方向の拡縮率、γ2はY軸方向の拡縮率、s1はX軸方向のシフト量、s2はY軸方向のシフト量にそれぞれ相当する。 In step S2, the control unit 18 selects an algorithm for determining the amount of deformation according to the type of the character string acquired in step S1. Here, the "deformation amount" is an amount indicating the degree of deformation of the font, and specific examples thereof include conversion parameters (θ, γ1, γ2, s1, s2) in the two-dimensional affine transformation. Note that θ corresponds to the rotation angle, γ1 corresponds to the scaling factor in the X-axis direction, γ2 corresponds to the scaling factor in the Y-axis direction, s1 corresponds to the shift amount in the X-axis direction, and s2 corresponds to the shift amount in the Y-axis direction.

図3は、文字座標系の定義の一例を示す図である。すべてのフォントを正方形状の画像領域40内で表現する場合、この画像領域40に対応する二次元座標系(つまり、文字座標系;X−Y)を定義する。この文字座標系の原点Oは画像領域40の中心に、X軸は横方向、Y軸は縦方向にそれぞれ相当する。X軸,Y軸のスケールは、画像領域40をなす4つの頂点の座標が(−1,−1),(1,−1),(−1,1),(1,1)となるように正規化されている。なお、1つの文章内で複数種別の文字が混在する場合を考慮し、文字の種別毎に画像領域40のサイズ(一辺の長さ)を異ならせてもよい。 FIG. 3 is a diagram showing an example of the definition of the character coordinate system. When all the fonts are represented in the square image area 40, a two-dimensional coordinate system (that is, a character coordinate system; XY) corresponding to the image area 40 is defined. The origin O of this character coordinate system corresponds to the center of the image area 40, the X-axis corresponds to the horizontal direction, and the Y-axis corresponds to the vertical direction. The scale of the X-axis and Y-axis is such that the coordinates of the four vertices forming the image area 40 are (-1, -1), (1, -1), (-1, 1), and (1, 1). Is normalized to. In consideration of the case where a plurality of types of characters are mixed in one sentence, the size (length of one side) of the image area 40 may be different for each type of character.

この文字座標系において、2次元アフィン変換後の座標(X’,Y’)は、変換前の座標(X,Y)及び変換パラメータ(θ,γ1,γ2,s1,s2)を用いて、次の(1)式及び(2)式で与えられる。
X’= γ1・Xcosθ+γ2・Ysinθ+s1 ・・・(1)
Y’=−γ1・Xsinθ+γ2・Ycosθ+s2 ・・・(2)
In this character coordinate system, the coordinates (X', Y') after the two-dimensional affine transformation are as follows using the coordinates (X, Y) before the transformation and the transformation parameters (θ, γ1, γ2, s1, s2). It is given by the equations (1) and (2) of.
X'= γ1, Xcosθ + γ2, Ysinθ + s1 ... (1)
Y'=-γ1, Xsinθ + γ2, Ycosθ + s2 ... (2)

ところで、上記した変形量をランダムに決定すると、フォントの変形に起因するノイズパワースペクトルが周波数によらず一定である、いわゆる「ホワイトノイズ」的な表現になってしまう。この場合、観察者は、出力された文字列を画像として視認する際に雑然さを覚える可能性がある。そこで、変形量の決定アルゴリズムとして、視認時の雑然さを抑制可能な手法を選択することが望ましい。その一例として、人間が心地よさを感じる「1/fゆらぎ」を発現する疑似1/fゆらぎ付与法や、人間の筆記傾向を学習した人工知能(AI)を用いた推論法等が挙げられる。 By the way, if the above-mentioned deformation amount is randomly determined, a so-called "white noise" expression is obtained in which the noise power spectrum caused by the deformation of the font is constant regardless of the frequency. In this case, the observer may feel cluttered when visually recognizing the output character string as an image. Therefore, as an algorithm for determining the amount of deformation, it is desirable to select a method that can suppress clutter at the time of visual recognition. Examples of this include a pseudo 1 / f fluctuation imparting method that expresses "1 / f fluctuation" that makes humans feel comfortable, and an inference method that uses artificial intelligence (AI) that has learned human writing tendencies.

図2のステップS3において、制御部18は、未指定であって文字列の先頭に最も近い1つの文字(以下、「指定文字」という)を指定する。このステップS3を初めて実行する場合、指定文字は、文字列の先頭の文字である。 In step S3 of FIG. 2, the control unit 18 designates one character (hereinafter, referred to as “designated character”) that is not specified and is closest to the beginning of the character string. When this step S3 is executed for the first time, the designated character is the first character of the character string.

ステップS4において、変形量決定部24は、ステップS3で指定された指定文字よりも配列順が前である他の文字(1つ又複数の文字)の変形量を用いて、この指定文字の変形量を決定する。以下、この決定方法について、図4を参照しながら詳細に説明する。 In step S4, the transformation amount determining unit 24 uses the transformation amount of another character (one or more characters) whose arrangement order is earlier than the designated character specified in step S3 to transform the designated character. Determine the amount. Hereinafter, this determination method will be described in detail with reference to FIG.

図4(a)は、間欠カオス法を用いた変形量の決定方法を示す図である。グラフの横軸は(i−1)番目の決定量P(i−1)を示すとともに、グラフの縦軸はi番目の決定量P(i)を示す。ここで、決定量Pは、[0,1]の範囲で正規化された変形量に相当する。例えば、変換パラメータs1(X軸方向のシフト量)がとり得る範囲を(−0.2≦s1≦0.2)と定めた場合、P=0の値がs1=−0.2(範囲の下限値)に、P=1の値がs1=0.2(範囲の上限値)にそれぞれ対応する。 FIG. 4A is a diagram showing a method of determining the amount of deformation using the intermittent chaos method. The horizontal axis of the graph indicates the (i-1) th determination amount P (i-1), and the vertical axis of the graph indicates the i-th determination amount P (i). Here, the determination amount P corresponds to the deformation amount normalized in the range of [0,1]. For example, when the range that the conversion parameter s1 (shift amount in the X-axis direction) can take is defined as (-0.2 ≤ s1 ≤ 0.2), the value of P = 0 is s1 = -0.2 (range). The lower limit value) corresponds to the value of P = 1 corresponding to s1 = 0.2 (upper limit value of the range).

変形量決定部24は、この不連続的な写像に基づいて、(i−1)番目の文字の変形量からi番目の変形量を逐次的に決定する。これにより、フォントの変形に起因するノイズパワースペクトルが周波数に対して反比例する「1/fゆらぎ」が発現する。1つの指定文字に対して複数の変形量を決定する場合、変形量決定部24は、カオスを発生可能な写像関数を用いて、それぞれの変形量を独立して決定してもよい。なお、疑似1/fゆらぎ付与法は、上記した間欠カオス法に限られず、例えば、セルラーオートマトン、1/2階積分法を含む様々な手法を採用してもよい。 Based on this discontinuous mapping, the deformation amount determining unit 24 sequentially determines the i-th deformation amount from the deformation amount of the (i-1) th character. As a result, "1 / f fluctuation" in which the noise power spectrum caused by the deformation of the font is inversely proportional to the frequency appears. When determining a plurality of deformation amounts for one designated character, the deformation amount determination unit 24 may independently determine each deformation amount by using a mapping function capable of generating chaos. The pseudo 1 / f fluctuation imparting method is not limited to the above-mentioned intermittent chaos method, and various methods including, for example, a cellular automaton and a 1/2-order integration method may be adopted.

図4(b)は、学習器38を用いた変形量の決定方法を示す図である。この学習器38は、i番目の文字の特徴量、(i−1)番目の文字の特徴量及び変形量を入力し、i番目の変形量を出力する。本図の例では、学習器38は、(i−1)番目の文字情報のみを入力可能であるが、さらに前の文字を含む複数の文字情報を同時に入力可能に構成されてもよい。 FIG. 4B is a diagram showing a method of determining the amount of deformation using the learning device 38. The learner 38 inputs the feature amount of the i-th character, the feature amount of the (i-1) -th character, and the deformation amount, and outputs the i-th deformation amount. In the example of this figure, the learner 38 can input only the (i-1) th character information, but may be configured to be able to input a plurality of character information including the preceding character at the same time.

文字の変形量は、上記した変換パラメータ(θ,γ1,γ2,s1,s2)のうち少なくとも1つのパラメータである。また、文字の特徴量の具体例として、[1]文字全体の特徴量(重心の座標、ストローク数、ストロークの分布を含む)、[2]ストローク毎の特徴量(始点の座標、終点の座標、長さ、曲率を含む)、[3]文字の種別(平仮名・片仮名・漢字・句読点・記号を含む)等が挙げられる。 The character deformation amount is at least one of the above-mentioned conversion parameters (θ, γ1, γ2, s1, s2). Further, as specific examples of the character feature amount, [1] the feature amount of the entire character (including the coordinates of the center of gravity, the number of strokes, and the stroke distribution), and [2] the feature amount for each stroke (coordinates of the start point and coordinates of the end point). , Length, curvature included), [3] Character types (including hiragana, katakana, kanji, punctuation marks, symbols) and the like.

一例として、文字の特徴量に「文字の種別」を含む学習器38を学習させることで、複数の種別が混在する1つの文章内で文字サイズの大小を使い分けてもよい。具体的には、日本語の文章中で、漢字の直後にある平仮名のサイズ(拡縮率γ1,γ2)を小さくすることで、文章全体の見栄えを良くすることができる。 As an example, by learning the learning device 38 including the "character type" in the character feature amount, the size of the character size may be used properly in one sentence in which a plurality of types are mixed. Specifically, by reducing the size of the hiragana (scale ratio γ1, γ2) immediately after the kanji in a Japanese sentence, the appearance of the entire sentence can be improved.

学習器38の演算規則は、学習パラメータの集合体であるパラメータセット36の値によって定められる。パラメータセット36は、例えば、ユニットの活性化関数を記述する係数、ユニット間の結合強度を含む「可変パラメータ」と、学習モデルのアーキテクチャを特定するための「固定パラメータ」(いわゆるハイパーパラメータ)から構成される。ハイパーパラメータの例として、各層を構成するユニットの個数、中間層の数が挙げられる。 The calculation rule of the learner 38 is determined by the value of the parameter set 36, which is a set of learning parameters. The parameter set 36 is composed of, for example, "variable parameters" including coefficients describing the activation function of units, bond strengths between units, and "fixed parameters" (so-called hyperparameters) for specifying the architecture of the learning model. Will be done. Examples of hyperparameters include the number of units constituting each layer and the number of intermediate layers.

パラメータセット36を決定するための機械学習の手法は、深層学習を含むニューラルネットワークの他に、ロジスティック回帰モデル、サポートベクターマシン(SVM)、ディシジョンツリー、ランダムフォレスト、ブースティング法を含む様々な手法を採用してもよい。 Machine learning methods for determining the parameter set 36 include neural networks including deep learning, as well as various methods including logistic regression model, support vector machine (SVM), decision tree, random forest, and boosting method. It may be adopted.

また、機械学習のための教師データは、人間の筆記によるストロークを記述するインクデータから生成されてもよい。このインクデータの形式(すなわち、インク記述言語)は、WILL(Wacom Ink Layer Language)、InkML(Ink Markup Language)又はISF(Ink Serialized Format)のいずれであってもよい。 Further, the teacher data for machine learning may be generated from ink data that describes strokes written by humans. The format of the ink data (that is, the ink description language) may be either WILL (Wacom Ink Layer Language), InkML (Ink Markup Language), or ISF (Ink Serialized Format).

特に、パラメータセット36は、文字列が示す言語の種類(例えば、日本語・英語・中国語)毎に、あるいは文字列の書字方向(つまり、縦書き/横書き)毎に準備されてもよい。なぜならば、言語の種類又は書字方向に応じて人間による筆記の傾向が異なるからである。 In particular, the parameter set 36 may be prepared for each type of language indicated by the character string (for example, Japanese, English, Chinese), or for each writing direction of the character string (that is, vertical writing / horizontal writing). .. This is because the tendency of human writing differs depending on the type of language or the writing direction.

図2のステップS5において、制御部18は、文字列を構成するすべての文字を指定したか否かを確認する。未指定の文字が少なくとも1つある場合(ステップS5:NO)、ステップS3に戻って、以下、ステップS3〜S5を順次繰り返す。一方、すべての文字が指定済みである場合(ステップS5:YES)、次のステップS6に進む。 In step S5 of FIG. 2, the control unit 18 confirms whether or not all the characters constituting the character string have been specified. When there is at least one undesignated character (step S5: NO), the process returns to step S3, and steps S3 to S5 are sequentially repeated thereafter. On the other hand, if all the characters have been specified (step S5: YES), the process proceeds to the next step S6.

ステップS6において、文字生成部26は、ステップS4で逐次的に決定された変形量を用いて、変形後のフォント配列を示す文字データ34を生成する。具体的には、文字生成部26は、文字列を構成する文字毎に、フォントDB30からフォントデータを読み出した後、このフォントデータに対して変形処理を施し、得られた文字画像を所定の位置に配置する画像処理を行う。例えば、ラスタ形式のフォントデータを用いる場合、文字生成部26は、画像データを構成する画素毎に2次元アフィン変換を行う。 In step S6, the character generation unit 26 generates character data 34 indicating the font arrangement after the transformation by using the transformation amount sequentially determined in step S4. Specifically, the character generation unit 26 reads font data from the font DB 30 for each character constituting the character string, then performs transformation processing on the font data, and places the obtained character image at a predetermined position. Perform image processing to place in. For example, when using raster format font data, the character generation unit 26 performs two-dimensional affine transformation for each pixel constituting the image data.

一方、ベクトル形式のフォントデータを用いる場合、文字生成部26は、ストロークの形状を示す特徴点グループに対して2次元アフィン変換を行った後、変換後の特徴点グループに基づいてラスタライズ処理を行う。このラスタライズ処理を行う際に、1つの文字を構成するストローク、あるいは1本のストローク上の位置に応じて線幅を変化させてもよい。これにより、フォントの部分的な潰れ、欠損、断線、かすれ等を演出可能となり、人間の筆記により近い表現を行うことができる。 On the other hand, when font data in vector format is used, the character generation unit 26 performs two-dimensional affine transformation on the feature point group indicating the shape of the stroke, and then performs rasterization processing based on the converted feature point group. .. When performing this rasterization process, the line width may be changed according to the strokes constituting one character or the position on one stroke. As a result, it is possible to produce partial crushing, missing, disconnection, faintness, etc. of the font, and it is possible to perform an expression closer to human writing.

ステップS7において、出力処理部28は、ステップS6で生成された文字データ34を出力する出力処理を行う。この出力処理は、文字データ34を外部装置に送信する処理であってもよいし、表示部16に可視情報を表示させる処理であってもよい。 In step S7, the output processing unit 28 performs output processing for outputting the character data 34 generated in step S6. This output process may be a process of transmitting character data 34 to an external device, or a process of displaying visible information on the display unit 16.

図5は、文字列画像42,44の変化を模式的に示す図である。より詳しくは、図5(a)は変形前の文字列画像42を示すとともに、図5(b)は変形後の文字列画像44を示している。両図から理解されるように、観察者は、変形前の文字列画像42に対して機械的・無機質的な印象を受ける一方、変形後の文字列画像44に対して人間的・有機質的な印象を受ける。 FIG. 5 is a diagram schematically showing changes in the character string images 42 and 44. More specifically, FIG. 5 (a) shows the character string image 42 before the deformation, and FIG. 5 (b) shows the character string image 44 after the deformation. As can be understood from both figures, the observer has a mechanical / inorganic impression on the character string image 42 before deformation, while it is human / organic on the character string image 44 after deformation. I get an impression.

以上のようにして、文字データ生成装置10の動作が終了する。フォントの変形処理を通じて、「人間らしさ」を訴求した文字が具現化される。その結果、柔らかな感触をもったストレスを感じさせないUI(つまり、SF−UI)を実現することができる。 As described above, the operation of the character data generation device 10 is completed. Characters that appeal to "humanity" are embodied through font transformation processing. As a result, it is possible to realize a UI (that is, SF-UI) that has a soft feel and does not feel stress.

<文字データ生成装置10による効果>
以上のように、文字データ生成装置10は、文字列を取得する文字列取得部22と、取得された文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する変形量決定部24と、決定された変形量を用いて、元のフォントを示すフォントデータに対する変形処理を施すことで、変形後のフォント配列を示す文字データ34を生成する文字生成部26と、を備える。そして、変形量決定部24は、文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、指定文字の変形量を逐次的に決定する。
<Effect of character data generator 10>
As described above, the character data generation device 10 has a character string acquisition unit 22 for acquiring a character string and a deformation amount determination unit for determining a deformation amount indicating the degree of font deformation for each character constituting the acquired character string. 24 and a character generation unit 26 that generates character data 34 indicating a font arrangement after transformation by performing transformation processing on font data indicating the original font using the determined transformation amount. Then, the deformation amount determining unit 24 sequentially determines the deformation amount of the designated character by using the deformation amount of another character whose arrangement order is earlier than the designated character designated in the character string.

また、文字データ生成装置10を用いた方法及びプログラムによれば、1つ又は複数のコンピュータが、文字列を取得する取得ステップ(S1)と、取得された文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する決定ステップ(S4)と、決定された変形量を用いて、元のフォントを示すフォントデータに対する変形処理を施すことで、変形後のフォント配列を示す文字データ34を生成する生成ステップ(S6)と、を実行する。そして、決定ステップ(S4)では、文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、指定文字の変形量を逐次的に決定する。 Further, according to the method and program using the character data generation device 10, one or more computers acquire the character string in the acquisition step (S1), and the font is set for each character constituting the acquired character string. Character data 34 indicating the font arrangement after transformation is performed by performing transformation processing on the font data indicating the original font using the determination step (S4) for determining the transformation amount indicating the degree of transformation and the determined transformation amount. The generation step (S6) for generating the above is executed. Then, in the determination step (S4), the transformation amount of the designated character is sequentially determined by using the transformation amount of another character whose arrangement order is earlier than the designated character specified in the character string.

このように、配列順が前である他の文字の変形量を用いて指定文字の変形量を逐次的に決定するので、既に筆記された文字の変形度合いを視認しながら次の文字の筆記バランスを取ろうとする人間の筆記パターンを模擬可能となり、文字毎のフォントをランダムに変形する場合と比べて、視認時の雑然さが抑制された文字データ34を生成することができる。 In this way, since the amount of deformation of the specified character is sequentially determined using the amount of deformation of other characters whose arrangement order is earlier, the writing balance of the next character is visually observed while visually recognizing the degree of deformation of the already written character. It is possible to simulate the writing pattern of a human being who is trying to take, and it is possible to generate character data 34 in which clutter at the time of visual recognition is suppressed as compared with the case where the font for each character is randomly transformed.

また、変形量決定部24は、指定文字の特徴量、他の文字の特徴量及び変形量を入力とし、指定文字の変形量を出力とする学習器38を含んで構成されてもよい。特に、学習器38は、人間の筆記によるストロークを記述するインクデータから生成された教師データを用いて機械学習がなされることが好ましい。これにより、機械学習を通じて人間の潜在的な筆記パターンを抽出可能となり、「人間らしさ」が文字の変形量に適切に反映されやすくなる。 Further, the deformation amount determining unit 24 may be configured to include a learning device 38 that inputs the feature amount of the designated character, the feature amount of another character, and the deformation amount, and outputs the deformation amount of the designated character. In particular, it is preferable that the learner 38 performs machine learning using teacher data generated from ink data that describes strokes written by humans. This makes it possible to extract potential human writing patterns through machine learning, and makes it easier for "humanity" to be appropriately reflected in the amount of character deformation.

また、変形量決定部24は、文字列が示す言語の種類に応じた学習器38を用いて、変形量を決定してもよい。これと併せて又はこれとは別に、変形量決定部24は、文字列の書字方向に応じた学習器38を用いて、変形量を決定してもよい。言語の種類又は書字方向に応じて筆記の傾向が異なる点を考慮することで、人間らしさがさらに反映されやすくなる。 Further, the deformation amount determination unit 24 may determine the deformation amount by using the learning device 38 according to the type of the language indicated by the character string. In addition to this or separately, the deformation amount determining unit 24 may determine the deformation amount by using the learning device 38 according to the writing direction of the character string. By considering the fact that the writing tendency differs depending on the type of language or the writing direction, it becomes easier to reflect humanity.

また、変形量決定部24は、疑似1/fゆらぎ付与法を用いて、指定文字の直前にある文字の変形量から指定文字の変形量を決定してもよい。これにより、人間が心地よさを感じる「1/fゆらぎ」を擬似的に発現することができる。 Further, the deformation amount determining unit 24 may determine the deformation amount of the designated character from the deformation amount of the character immediately before the designated character by using the pseudo 1 / f fluctuation imparting method. As a result, it is possible to simulate "1 / f fluctuation" that humans feel comfortable with.

また、変形量決定部24は、変形量として、2次元アフィン変換に関する少なくとも1つの変換パラメータを決定し、文字生成部26は、元のフォントに対して2次元アフィン変換を施すことで文字データ34を生成してもよい。これにより、簡単な線形演算によって、文字の識別性を保ちながら文字の調子を変化させることができる。 Further, the deformation amount determination unit 24 determines at least one conversion parameter related to the two-dimensional affine transformation as the deformation amount, and the character generation unit 26 performs the two-dimensional affine transformation on the original font to perform the character data 34. May be generated. As a result, the tone of the character can be changed while maintaining the distinctiveness of the character by a simple linear operation.

10 文字データ生成装置、12 通信部、14 入力部、16 表示部、18 制御部、20 記憶部、22 文字列取得部、24 変形量決定部、26 文字生成部、28 出力処理部、30 フォントDB、32 入力データ、34 文字データ、36 パラメータセット、38 学習器、40 画像領域、42,44 文字列画像。 10 character data generator, 12 communication unit, 14 input unit, 16 display unit, 18 control unit, 20 storage unit, 22 character string acquisition unit, 24 deformation amount determination unit, 26 character generation unit, 28 output processing unit, 30 fonts DB, 32 input data, 34 character data, 36 parameter set, 38 learner, 40 image area, 42,44 character string image.

Claims (10)

文字列を取得する文字列取得部と、
前記文字列取得部により取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する変形量決定部と、
前記変形量決定部により決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する文字生成部と、
を備え、
前記変形量決定部は、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定することを特徴とする文字データ生成装置。
The character string acquisition part that acquires the character string and
A deformation amount determining unit that determines the amount of deformation indicating the degree of deformation of the font for each character constituting the character string acquired by the character string acquisition unit.
Using the deformation amount determined by the deformation amount determination unit, a character generation unit that generates character data indicating a font arrangement after transformation by performing transformation processing on the font data indicating the original font for each character. ,
With
The deformation amount determining unit is characterized in that the deformation amount of the designated character is sequentially determined by using the deformation amount of another character whose arrangement order is earlier than the designated character specified in the character string. Character data generator.
前記変形量決定部は、前記指定文字の特徴量、前記他の文字の特徴量及び変形量を入力とし、前記指定文字の変形量を出力とする学習器を含んで構成されることを特徴とする請求項1に記載の文字データ生成装置。 The deformation amount determining unit is characterized in that it includes a learning device that inputs the feature amount of the designated character, the feature amount and the deformation amount of the other character, and outputs the deformation amount of the designated character. The character data generation device according to claim 1. 前記学習器は、人間の筆記によるストロークを記述するインクデータから生成された教師データを用いて機械学習がなされることを特徴とする請求項2に記載の文字データ生成装置。 The character data generation device according to claim 2, wherein the learning device performs machine learning using teacher data generated from ink data for describing strokes written by humans. 前記変形量決定部は、前記文字列が示す言語の種類に応じた前記学習器を用いて、前記変形量を決定することを特徴とする請求項2又は3に記載の文字データ生成装置。 The character data generation device according to claim 2 or 3, wherein the deformation amount determining unit determines the deformation amount by using the learning device according to the type of language indicated by the character string. 前記変形量決定部は、前記文字列の書字方向に応じた前記学習器を用いて、前記変形量を決定することを特徴とする請求項2又は3に記載の文字データ生成装置。 The character data generation device according to claim 2 or 3, wherein the deformation amount determining unit determines the deformation amount by using the learning device according to the writing direction of the character string. 前記変形量決定部は、疑似1/fゆらぎ付与法を用いて、前記指定文字の直前にある文字の変形量から前記指定文字の変形量を決定することを特徴とする請求項1に記載の文字データ生成装置。 The first aspect of the present invention, wherein the deformation amount determining unit determines the deformation amount of the designated character from the deformation amount of the character immediately before the designated character by using the pseudo 1 / f fluctuation imparting method. Character data generator. 前記疑似1/fゆらぎ付与法は、間欠カオス法であることを特徴とする請求項6に記載の文字データ生成装置。 The character data generation device according to claim 6, wherein the pseudo 1 / f fluctuation imparting method is an intermittent chaos method. 前記変形量決定部は、前記変形量として、2次元アフィン変換に関する少なくとも1つの変換パラメータを決定し、
前記文字生成部は、元のフォントに対して2次元アフィン変換を施すことで前記文字データを生成する
ことを特徴とする請求項1〜7のいずれか1項に記載の文字データ生成装置。
The deformation amount determining unit determines at least one conversion parameter related to the two-dimensional affine transformation as the deformation amount.
The character data generation device according to any one of claims 1 to 7, wherein the character generation unit generates the character data by performing a two-dimensional affine transformation on the original font.
文字列を取得する取得ステップと、
取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する決定ステップと、
決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する生成ステップと、
を1つ又は複数のコンピュータが実行し、
前記決定ステップでは、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定することを特徴とする文字データ生成方法。
The get step to get the string and
A determination step for determining the amount of deformation indicating the degree of deformation of the font for each character constituting the acquired character string, and a determination step.
A generation step of generating character data indicating a font array after transformation by performing transformation processing on the font data indicating the original font for each character using the determined transformation amount.
Is run by one or more computers
The determination step is characterized in that the transformation amount of the designated character is sequentially determined by using the transformation amount of another character whose arrangement order is earlier than the designated character specified in the character string. Data generation method.
文字列を取得する取得ステップと、
取得された前記文字列を構成する文字毎にフォントの変形度合いを示す変形量を決定する決定ステップと、
決定された前記変形量を用いて、元のフォントを示すフォントデータに対する変形処理を文字毎に施すことで、変形後のフォント配列を示す文字データを生成する生成ステップと、
を1つ又は複数のコンピュータに実行させ、
前記決定ステップでは、前記文字列において指定された指定文字よりも配列順が前である他の文字の変形量を用いて、前記指定文字の変形量を逐次的に決定することを特徴とする文字データ生成プログラム。
The get step to get the string and
A determination step for determining the amount of deformation indicating the degree of deformation of the font for each character constituting the acquired character string, and a determination step.
A generation step of generating character data indicating a font array after transformation by performing transformation processing on the font data indicating the original font for each character using the determined transformation amount.
To run on one or more computers
The determination step is characterized in that the transformation amount of the designated character is sequentially determined by using the transformation amount of another character whose arrangement order is earlier than the designated character specified in the character string. Data generator.
JP2019023545A 2019-02-13 2019-02-13 Character data generator, method and program Active JP7171145B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019023545A JP7171145B2 (en) 2019-02-13 2019-02-13 Character data generator, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019023545A JP7171145B2 (en) 2019-02-13 2019-02-13 Character data generator, method and program

Publications (2)

Publication Number Publication Date
JP2020134557A true JP2020134557A (en) 2020-08-31
JP7171145B2 JP7171145B2 (en) 2022-11-15

Family

ID=72278501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019023545A Active JP7171145B2 (en) 2019-02-13 2019-02-13 Character data generator, method and program

Country Status (1)

Country Link
JP (1) JP7171145B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230077536A (en) * 2021-11-25 2023-06-01 이유 Service providing apparatus and method for creating font based on music

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110444A (en) * 1992-09-29 1994-04-22 Hitachi Inf Syst Ltd Character processor and character output method
JPH0721164A (en) * 1993-06-18 1995-01-24 Matsushita Electric Ind Co Ltd Character string image generating device
JPH1166047A (en) * 1997-08-14 1999-03-09 Casio Comput Co Ltd Character output device and storage medium
JP2003233825A (en) * 2002-02-06 2003-08-22 Victor Co Of Japan Ltd Document processor
CN102156688A (en) * 2011-05-19 2011-08-17 深圳市万兴软件有限公司 Character transforming effect processing method and device
JP2018077677A (en) * 2016-11-09 2018-05-17 日本電信電話株式会社 Character string converting device, model learning device, method, and program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10217645B2 (en) 2014-07-25 2019-02-26 Versum Materials Us, Llc Chemical mechanical polishing (CMP) of cobalt-containing substrate

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110444A (en) * 1992-09-29 1994-04-22 Hitachi Inf Syst Ltd Character processor and character output method
JPH0721164A (en) * 1993-06-18 1995-01-24 Matsushita Electric Ind Co Ltd Character string image generating device
JPH1166047A (en) * 1997-08-14 1999-03-09 Casio Comput Co Ltd Character output device and storage medium
JP2003233825A (en) * 2002-02-06 2003-08-22 Victor Co Of Japan Ltd Document processor
CN102156688A (en) * 2011-05-19 2011-08-17 深圳市万兴软件有限公司 Character transforming effect processing method and device
JP2018077677A (en) * 2016-11-09 2018-05-17 日本電信電話株式会社 Character string converting device, model learning device, method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230077536A (en) * 2021-11-25 2023-06-01 이유 Service providing apparatus and method for creating font based on music
KR102583309B1 (en) 2021-11-25 2023-09-26 이유 Service providing apparatus and method for creating font based on music

Also Published As

Publication number Publication date
JP7171145B2 (en) 2022-11-15

Similar Documents

Publication Publication Date Title
Cao et al. Do-conv: Depthwise over-parameterized convolutional layer
Lopes et al. A learned representation for scalable vector graphics
JP7011146B2 (en) Image processing device, image processing method, image processing program, and teacher data generation method
US20230419592A1 (en) Method and apparatus for training a three-dimensional face reconstruction model and method and apparatus for generating a three-dimensional face image
AU2019202063A1 (en) Synthesizing new font glyphs from partial observations
JP2019028094A (en) Character generation device, program and character output device
JP7282932B2 (en) Font generation model training method, library creation method, device and equipment
US20140267302A1 (en) Method and apparatus for personalized handwriting avatar
US11113578B1 (en) Learned model-based image rendering
JPWO2018203374A1 (en) Line drawing automatic coloring program, line drawing automatic coloring device and program for graphical user interface
Agarwal et al. Synthesis of realistic facial expressions using expression map
JP6298422B2 (en) Character string processing technology for graphic display of man-machine interface
JP2008140385A (en) Real-time representation method and device of skin wrinkle at character animation time
JP7171145B2 (en) Character data generator, method and program
US11461874B2 (en) Graphics processing using matrices of transformations
Ko et al. Korean font synthesis with GANs
US10403038B2 (en) 3D geometry enhancement method and apparatus therefor
CN114037644A (en) Artistic digital image synthesis system and method based on generation countermeasure network
Fujita et al. Perceptual font manifold from generative model
JP5076138B2 (en) Pattern generation method, program and apparatus using self-organizing map
Miyata et al. Design of cursive handwriting characters using esthetic evaluation
JPWO2020183656A1 (en) Data generation method, data generation device and program
JP7482551B2 (en) MENTAL IMAGE VISUALIZATION METHOD, MENTAL IMAGE VISUALIZATION DEVICE, AND PROGRAM
JP4691659B2 (en) Image recognition apparatus, image recognition method, and program
Zhao et al. AmbiGen: Generating Ambigrams from Pre-trained Diffusion Model

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20200124

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20200128

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221018

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20221101

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221101

R150 Certificate of patent or registration of utility model

Ref document number: 7171145

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150