JP5253675B2 - Character string arrangement device, character string arrangement candidate decision method, and character string arrangement candidate decision program - Google Patents
Character string arrangement device, character string arrangement candidate decision method, and character string arrangement candidate decision program Download PDFInfo
- Publication number
- JP5253675B2 JP5253675B2 JP2012547598A JP2012547598A JP5253675B2 JP 5253675 B2 JP5253675 B2 JP 5253675B2 JP 2012547598 A JP2012547598 A JP 2012547598A JP 2012547598 A JP2012547598 A JP 2012547598A JP 5253675 B2 JP5253675 B2 JP 5253675B2
- Authority
- JP
- Japan
- Prior art keywords
- character string
- character
- arrangement
- unit
- cost function
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
- Instructional Devices (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
Description
この発明は、例えば地名等の文字列を地図画面上に配置して表示する文字列配置装置、文字列配置候補決定方法、及び文字列配置候補決定用プログラムに関する。 The present invention relates to a character string arrangement device, a character string arrangement candidate determination method, and a character string arrangement candidate determination program that arrange and display a character string such as a place name on a map screen.
地名等の文字列を地図画面に配置して表示する従来の技術としては、例えば特許文献1に開示されるものがある。特許文献1では、道路や河川、鉄道等の名前の文字列を、地図画面で道路や河川、鉄道を表すリンクに沿って配置するにあたり、文字列の可読性を考慮して、画面上で文字列の配置を開始する文字列配置開始点を決定している。
As a conventional technique for arranging and displaying a character string such as a place name on a map screen, there is one disclosed in
特許文献1に代表される従来の技術では、道路の名前等の文字例を表示する際、図1に示すように、表示画面100上で複数の道路リンク101を接続して道路を表現し、この道路の名前等の情報を示す文字列102を、道路リンク101上に設けた文字列配置開始点103を起点として、道路リンク101に沿って配置している。この場合、文字列配置開始点103を設ける位置によっては、文字列同士が重なり合ったり、文字列を道路リンクに沿って変形しなければならず、文字列の可読性が低下する。
In the conventional technique represented by
例えば、図2は、図1の道路リンク101が示す道路に交差する道路があり、その道路の道路リンク101に沿って文字配置開始点103aを起点として文字列102aを配置したことにより、文字列102と文字列102aとが重なり合う場合を示している。この場合、重なった部分の文字は非常に読みにくく、可読性が悪くなる。
また、図3は、隣り合った道路リンク101をある程度の角度をもって互いに接続して道路の湾曲部分を表現しており、この湾曲部分に近い道路リンク101に文字列配置開始点103Aを設けたために、文字列102が道路リンク101に沿って変形された場合を示している。この場合も、文字列中の文字の連続性が損なわれて可読性が悪くなり、一瞥して文字列の内容を把握しにくくなる。For example, in FIG. 2, there is a road that intersects the road indicated by the
Further, FIG. 3 represents the curved portion of the road by connecting
そこで、特許文献1に代表される従来の技術では、文字列同士の重複と文字列が沿う道路の湾曲度合いとをそれぞれ関数化して、これらの関数値が示す特性が最も小さい位置、つまり、文字列同士の重複と道路の湾曲度合いとが生じない位置を特定して、この位置に文字列配置開始点を変更する。
図4は、文字列同士の重複を示す関数を説明する図である。図4(a)に示す例では、複数の道路が交差しており、それぞれの道路の道路リンク101に沿って、文字列102,102a,102bが、文字列配置開始点103,103a,103bをそれぞれ起点として配置されている。
図4(b)に示す関数overlap(i)は、図4(a)における文字列同士の重複の数を表す関数である。例えば、文字列102,102bは、文字列102aのみとそれぞれ重なり合うので、overlap(i)=1となり、文字列102aは、文字列102,102bの双方と重なり合うので、overlap(i)=2となる。Therefore, in the conventional technique represented by
FIG. 4 is a diagram for explaining a function indicating duplication of character strings. In the example shown in FIG. 4A, a plurality of roads intersect with each other, and the
The function overlap (i) shown in FIG. 4B is a function representing the number of overlapping character strings in FIG. For example, since the
また、図5は、文字列が沿う道路の湾曲度合いを示す関数を説明するための図である。図5に示すように、道路ノードを介して複数の道路リンクを接続した道路において、道路ノードの線形近似AveLine(i)を求めることにより、図5中に破線で示すAveLine(i)で表現される直線から、道路の湾曲によってどの程度はずれているかを、図5中に黒塗りの三角形で示す部分の面積の和をAveLine(i)で示される直線の長さで除算した値であるflat(i)で表している。
これら関数overlap(i),flat(i)を用い、下記式(1)に示すようなコスト関数fの値が最小になる位置に文字列配置開始点を変更する。
なお、文字列配置開始点の変更処理は、通常オフラインで行い、変更後の文字列配置開始点を記憶装置に記憶しておく。オンラインでは、この記憶装置に記憶しておいた文字列配置開始点を起点として文字列を配置する。下記式(1)において、α1,α2は、コスト関数fに対する各関数overlap(i),flat(i)の値の寄与の度合いを調整するパラメータである。
f=α1overlap(i)+α2flat(i) ・・・(1)FIG. 5 is a diagram for explaining a function that indicates the degree of curve of the road along which the character string follows. As shown in FIG. 5, by obtaining a linear approximation AveLine (i) of a road node on a road in which a plurality of road links are connected via road nodes, it is expressed by AveLine (i) indicated by a broken line in FIG. 5. 5 is a value obtained by dividing the sum of the areas indicated by the solid triangles in FIG. 5 by the length of the straight line indicated by AveLine (i). i).
Using these functions overlap (i) and flat (i), the character string arrangement start point is changed to a position where the value of the cost function f is minimized as shown in the following equation (1).
The character string arrangement start point changing process is normally performed offline, and the changed character string arrangement start point is stored in the storage device. On-line, character strings are arranged starting from the character string arrangement start point stored in the storage device. In the following formula (1), α 1 and α 2 are parameters for adjusting the degree of contribution of the values of the functions overlap (i) and flat (i) to the cost function f.
f = α 1 overlap (i) + α 2 flat (i) (1)
また、特許文献1に代表される従来の技術は、地図の向きが変化しても文字列の配置が変化しない場合を前提としている。例えば、図6(a)に示すように、地図の向きが北(ノースアップ)で文字列102が道路リンク101の北側に沿って配置されている場合において、図6(b)に示すように地図の向きを南(サウスアップ)に変更しても、同様に道路リンク101の北側に文字列102が配置される。
Moreover, the conventional technique represented by
一方、実際のカーナビゲーションシステムでは、地図の向きが自車の進行方向に応じて変化する場合(ヘディングアップ)がある。例えば、図7(a)に示すように、北に向かって自車が走行していれば、地図の向きは北になり、図7(b)に示すように自車の進行方向が南西に変われば、地図の向きは南西となる。この場合において、従来のカーナビゲーションシステムでは、文字列の可読性を保つために、いかなる地図の向きであっても、文字を左読みできる上向きに表示させている。 On the other hand, in an actual car navigation system, the direction of the map may change according to the traveling direction of the own vehicle (heading up). For example, as shown in FIG. 7 (a), if the vehicle is traveling toward the north, the direction of the map is north, and the traveling direction of the vehicle is southwest as shown in FIG. 7 (b). If it changes, the orientation of the map will be southwest. In this case, in the conventional car navigation system, in order to maintain the readability of the character string, the character is displayed upward so that it can be read to the left in any map orientation.
例えば、図8(a)に示すように、道路リンク101を挟んだ両側の一方が地図の向きになっても、この道路リンク101に沿って配置される文字列102が上向きになるように、向きの異なる文字列102の文字列配置パターンを、道路リンク101を挟んだ両側に対応してパターン1,2として保存しておく。ここで、図8(b)に示すように、自車が北に進行していると地図の向きは北になるので、パターン1の文字列配置を用いることにより、文字列102が上向きに配置される。また、地図の向きが南になれば、図8(c)に示すようにパターン2の文字列配置に切り替わる。
このように地図の向きに応じて文字列の配置を切り替える場合、特許文献1に代表される従来の技術を適用すると、文字列の可読性を損なう場合が生じるという課題があった。For example, as shown in FIG. 8A, even if one of the both sides of the
Thus, when switching the arrangement of the character string according to the direction of the map, there is a problem in that the readability of the character string may be impaired when the conventional technique represented by
従来では、ある一方向の地図の向きでの文字列配置について可読性の高い向きの位置に文字列の配置位置が変更される。
この場合、例えば図9(a)に示すように、地図の向きが北のときに文字列の配置を変更すると文字列102,102aは重なり合わないが、図9(b)に示すように、地図の向きが南に変わると、文字を左読みできるように、文字列102aの配置が上向きに切り替わるため、文字列102と文字列102aが重複する。
このような不具合を避けるために、文字列同士の重複や文字列の変形表示が起こらない文字列配置開始点を地図の向きごとに決定しておけばよいが、1つの文字列に対して、文字列配置開始点に関する情報を地図の向きの数だけ用意する必要があり、膨大な記憶領域が必要とされる。Conventionally, the arrangement position of a character string is changed to a position having a high readability for a character string arrangement in a certain one-way map direction.
In this case, for example, as shown in FIG. 9 (a), the
In order to avoid such inconveniences, it is sufficient to determine the character string arrangement start point for each direction of the map so that duplication of character strings and deformation display of the character string do not occur. It is necessary to prepare as many pieces of information about the character string arrangement start point as the number of map directions, and a huge storage area is required.
この発明は、上記のような課題を解決するためになされたもので、用意すべき情報量の増大を招くことなく、可読性を損なわずに文字列を表示画面に配置することができる文字列配置装置、文字列配置候補決定方法、及び文字列配置候補決定用プログラムを得ることを目的とする。 The present invention has been made to solve the above-described problems, and does not cause an increase in the amount of information to be prepared and can be arranged on a display screen without losing readability. It is an object to obtain a device, a character string arrangement candidate determination method, and a character string arrangement candidate determination program.
この発明に係る文字列配置装置は、表示画面上に配置する文字列のデータを取得する文字列データ取得部と、文字列データ取得部によって取得された文字列の配置を開始する表示画面上の位置候補を作成する位置候補作成部と、位置候補作成部で作成された位置候補を起点として表示画面上の相対する方向で読みがそれぞれ順方向となるように文字列を配置して、各配置の文字列同士の位置関係に基づいて、当該文字列の可読性に影響を与える因子を評価するコスト関数値を算出するコスト関数値算出部と、コスト関数値が最小の位置候補を、文字列の配置開始位置を変更する際の位置候補として記憶する記憶部とを備える。 A character string arrangement device according to the present invention includes a character string data acquisition unit that acquires data of a character string to be arranged on a display screen, and a character string acquisition unit that starts arrangement of the character string acquired by the character string data acquisition unit. Position candidate creation section that creates position candidates, and character strings are arranged in such a way that readings are forward in opposite directions on the display screen starting from the position candidates created by the position candidate creation section. A cost function value calculating unit that calculates a cost function value that evaluates a factor that affects the readability of the character string based on the positional relationship between the character strings, and a position candidate having the smallest cost function value And a storage unit that stores a position candidate when changing the arrangement start position.
この発明によれば、表示画面上の方向が変化しても、用意すべき情報量の増大を招くことなく、可読性を損なわずに文字列を配置することができるという効果がある。 According to this invention, even if the direction on the display screen changes, there is an effect that the character string can be arranged without impairing the readability without causing an increase in the amount of information to be prepared.
以下、この発明をより詳細に説明するため、この発明を実施するための形態について、添付の図面に従って説明する。
実施の形態1.
図10は、この発明の実施の形態1による文字列配置装置の構成を示すブロック図である。実施の形態1の文字列配置装置1は、例えばナビゲーション装置等に利用される地図表示装置を構成する装置であって、地図上の道路等を表現するリンクに沿ってその名称等の情報を示す文字列を配置する。以降の説明では、文字列配置装置1が、道路の名称等を示す文字列を当該道路の道路リンクに沿って配置する場合について述べる。
文字列配置装置1の構成としては、図10に示すように、文字列データ取得部2、文字列配置開始候補点作成部3、最小コスト関数値算出部4及び出力文字列配置開始候補点記憶部5を備える。Hereinafter, in order to describe the present invention in more detail, modes for carrying out the present invention will be described with reference to the accompanying drawings.
FIG. 10 is a block diagram showing the configuration of the character string arrangement device according to
As shown in FIG. 10, the character
文字列データ取得部2は、外部の記憶装置から文字列データを取得する構成部である。なお、文字列データとは、例えば、地図表示に利用される地図データに含まれ、地図画面に表示する道路名の文字列、文字列が沿う道路リンクを示す道路リンクデータ、及び地図画面で文字列の配置を開始する位置を示す文字列配置開始点を含むデータである。
文字列配置開始候補点作成部3は、文字列データ取得部2により文字列データから取得された文字列の文字列配置開始点を変更する場合に、地図画面で当該文字列の配置を開始する点の候補(以下、文字列配置開始候補点と呼ぶ)を作成する構成部である。The character string
The character string arrangement start candidate
最小コスト関数値算出部4は、文字列配置開始候補点作成部3で作成された文字列配置開始候補点を起点として、これに対応する文字列を上向き配置及び下向き配置したとき、文字列の可読性に影響を与える因子として、各配置の文字列同士の重複を示す関数、文字列の変形表示の要因となる隣り合う道路リンクがなす角度を示す関数、及び文字列データに予め設定された文字列配置開始点と文字列配置開始候補点との距離を示す関数の値を足し合わせたコスト関数値を算出し、当該コスト関数値が最小となる文字列配置開始候補点を求める構成部である。
なお、この発明では、ある一定の地図の向きの画面(表示画面上の一方向)において、対象の文字列が沿う道路リンクを境として分けられた一方で当該文字列を左読みできる向きの配置を上向き配置とする。また、上向き配置での画面の地図の向きが逆になった際(表示画面上の一方向に相対する方向)に、道路リンクを境として分けられたもう一方側で当該文字列を左読みできる向きの配置を下向き配置とする。The minimum cost function
In the present invention, on a screen with a certain map orientation (one direction on the display screen), the layout is such that the character string can be read to the left while it is divided on the road link along the target character string. Is placed upward. In addition, when the orientation of the map on the screen in the upward orientation is reversed (direction opposite to one direction on the display screen), the character string can be read to the left on the other side separated from the road link. The orientation arrangement is the downward arrangement.
出力文字列配置開始候補点記憶部5は、最小コスト関数値算出部4で算出されたコスト関数値が最小となる文字列配置開始候補点を記憶する記憶部である。
文字列配置装置1は、出力文字列配置開始候補点記憶部5に格納された文字列配置開始候補点を用いることで、いかなる地図の向きにおいても文字列同士の重複や道路の湾曲に応じた文字列の変形が起こらない位置に当該文字列を配置することが可能となる。The output character string arrangement start candidate
The character
なお、文字列データ取得部2、文字列配置開始候補点作成部3、及び最小コスト関数値算出部4は、例えば、この発明の趣旨に従う文字列配置用プログラムをコンピュータに実行させることにより、ハードウェアとソフトウェアとが協働した具体的な手段として実現される。つまり、上記構成部2〜4の各機能は、上記文字列配置用プログラムを構成する各プログラムモジュールに規定される。また、出力文字列配置開始候補点記憶部5は、例えば、上記のコンピュータに搭載された記憶装置の記憶領域上に構築される。記憶装置としては、ハードディスク装置、半導体メモリ、CDやDVD等の記憶メディアのドライブ装置等が挙げられる。
Note that the character string
図11は、図10中の文字列配置開始候補点作成部の構成を示すブロック図である。図11において、文字列配置開始候補点作成部3は、文字列データ取得部2で取得された文字列の文字列配置開始候補点を作成する構成部であり、候補点作成部6、文字列上向き配置部7、文字列下向き配置部8及び候補点削除部9を備える。
候補点作成部6は、文字列データ取得部2で文字列データから取得された文字列と道路リンクに関する情報に基づいて、当該文字列の文字列配置開始候補点を作成する構成部である。例えば、文字列が沿う1つ又は複数の連続した道路リンク上の所定の間隔の位置を当該文字列の文字列配置開始候補点とする。FIG. 11 is a block diagram showing the configuration of the character string arrangement start candidate point creation unit in FIG. In FIG. 11, the character string arrangement start candidate
The candidate
文字列上向き配置部7は、候補点作成部6で作成された文字列配置開始候補点を起点として道路リンクに沿って文字列を上向きに仮配置して、文字と道路リンクの重複、文字が所定値以上の配置間隔であるか、及び文字列内の文字同士の重複を判定し、この判定結果から、文字列の上向き配置の可否を判定する構成部である。
文字列下向き配置部8は、候補点作成部6で作成された文字列配置開始候補点を起点として道路リンクに沿って文字列を下向きに仮配置して、文字と道路リンクの重複、文字が所定値以上の配置間隔であるか、及び文字列内の文字同士の重複を判定し、この判定結果から、文字列の下向き配置の可否を判定する構成部である。
候補点削除部9は、候補点作成部6で作成された文字列配置開始候補点のうち、文字列上向き配置部7及び文字列下向き配置部8によって、上向き配置又は下向き配置のいずれかで文字列が配置不可と判定された文字列配置開始候補点を削除する構成部である。The character string
The character string
The candidate
図12は、図11の文字列上向き配置部の構成を示すブロック図である。図12において、文字列上向き配置部7は、文字配置候補点作成部10a、開始文字配置候補点決定部11a、上向き用文字配置順序決定部12a、上向き用文字仮配置部13a、判定処理部14a及び文字位置登録部15aを備える。
文字配置候補点作成部10aは、候補点作成部6で作成された文字列配置開始候補点を起点として上向き配置する文字列の各文字を配置する位置の候補(以下、文字配置候補点と呼ぶ)を作成する構成部である。例えば、文字列配置開始候補点から所定の間隔で道路リンクに沿って並ぶ位置を文字配置候補点とする。FIG. 12 is a block diagram showing the configuration of the character string upward arrangement portion of FIG. In FIG. 12, a character string
The character placement candidate
開始文字配置候補点決定部11aは、文字配置候補点作成部10aで作成された文字配置候補点のうちから、上向き配置する文字列の文字配置の開始点となる文字配置候補点を探索して決定する構成部である。
上向き用文字配置順序決定部12aは、開始文字配置候補点決定部11aで決定された文字配置の開始点となる文字配置候補点が存在する道路リンクの単位ベクトルの偏角に基づいて、当該文字列の文字配置順序を順方向又は逆方向のいずれにするかを決定する構成部である。ここで、順方向とは文字列を左読みできる文字の配置順序であり、逆方向とは文字列の読みが右読みになる配置順序である。The starting character placement candidate
The upward character arrangement
上向き用文字仮配置部13aは、上向き用文字配置順序決定部12aで決定された文字配置順序で、当該文字列の各文字を、開始文字配置候補点決定部11aで決定された文字配置の開始点から順に各文字配置候補点に仮配置する構成部である。
判定処理部14aは、上向き用文字仮配置部13aで仮配置された文字について、当該文字と道路リンクとの重複、当該文字とその直前に仮配置された文字とが所定値以上の配置間隔であるか及び当該文字とその直前に仮配置された文字との重複を判定し、この判定結果から当該文字の配置可否を判定する構成部である。
文字位置登録部15aは、判定処理部14aで配置可能と判定された文字の位置の座標情報を文字位置として登録する記憶部である。The upward character
The
The character
図13は、図11の文字列下向き配置部の構成を示すブロック図である。図13において、文字列下向き配置部8は、文字配置候補点作成部10b、開始文字配置候補点決定部11b、下向き用文字配置順序決定部16b、下向き用文字仮配置部17b、判定処理部14b、及び文字位置登録部15bを備える。
文字配置候補点作成部10bは、候補点作成部6で作成された文字列配置開始候補点を起点として下向き配置する文字列の各文字を配置する文字配置候補点を作成する構成部である。例えば、上向き用文字仮配置部13aと同様に、文字列配置開始候補点から所定の間隔で道路リンクに沿って並ぶ位置を文字配置候補点とする。FIG. 13 is a block diagram showing the configuration of the character string downward arrangement portion of FIG. In FIG. 13, the character string
The character placement candidate
開始文字配置候補点決定部11bは、文字配置候補点作成部10bで作成された文字配置候補点のうちから、下向き配置する文字列の文字配置の開始点となる文字配置候補点を探索して決定する構成部である。
下向き用文字配置順序決定部16bは、開始文字配置候補点決定部11bで決定された文字配置の開始点となる文字配置候補点が存在する道路リンクの単位ベクトルの偏角に基づいて、当該文字列の文字配置順序を順方向又は逆方向のいずれにするかを決定する構成部である。The starting character placement candidate point determination unit 11b searches for a character placement candidate point serving as a starting point for character placement of a character string to be placed downward from the character placement candidate points created by the character placement candidate
The downward character arrangement
下向き用文字仮配置部17bは、下向き用文字配置順序決定部16bで決定された文字配置順序で、当該文字列の各文字を、開始文字配置候補点決定部11bで決定された文字配置の開始点から順に各文字配置候補点に仮配置する構成部である。
判定処理部14bは、下向き用文字仮配置部17bにより仮配置された文字について、当該文字と道路リンクとの重複、当該文字とその直前に仮配置された文字とが所定値以上の配置間隔であるか及び当該文字とその直前に仮配置された文字との重複を判定し、この判定結果から当該文字の配置可否を判定する構成部である。
文字位置登録部15bは、判定処理部14bで配置可能と判定された文字の位置の座標情報を文字位置として登録する記憶部である。The downward character
For the character temporarily arranged by the downward character
The character
図14は、図12又は図13の判定処理部の構成を示すブロック図である。図14において、判定処理部14a,14bは、文字と道路の重複判定部18、文字間隔判定部19及び文字同士の重複判定部20を備える。
判定処理部14aの文字と道路の重複判定部18は、上向き用文字仮配置部13aに仮配置された文字について、当該文字を含む文字列が沿う道路リンクとの重複有無を判定する構成部である。判定処理部14bの文字と道路の重複判定部18では、下向き用文字仮配置部17bに仮配置された文字について、当該文字を含む文字列が沿う道路リンクとの重複有無を判定する構成部である。FIG. 14 is a block diagram illustrating a configuration of the determination processing unit illustrated in FIG. 12 or 13. In FIG. 14, the
The character and road duplication determination unit 18 of the
判定処理部14aの文字間隔判定部19は、上向き用文字仮配置部13aによって仮配置された文字と1つ前に仮配置された文字との間隔が所定の文字間隔よりも狭いか広いかを判定する構成部である。また、判定処理部14bの文字間隔判定部19は、下向き用文字仮配置部17bに仮配置された文字と1つ前に仮配置された文字との間隔が所定の文字間隔よりも狭いか広いかを判定する構成部である。
判定処理部14aにおける文字同士の重複判定部20は、上向き用文字仮配置部13aに仮配置された文字と1つ前に仮配置された文字との重複を判定する構成部である。判定処理部14bの文字同士の重複判定部20は、下向き用文字仮配置部17bによって仮配置された文字と1つ前に仮配置された文字との重複を判定する構成部である。The character
The character overlap
図15は、図10の最小コスト関数値算出部の構成を示すブロック図であり、図15(a)は最小コスト関数値算出部の構成を示しており、図15(b)は、図15(a)中の文字列同士の重複関数算出部の構成を示している。
図15(a)において、最小コスト関数値算出部4は、文字列同士の重複関数算出部21、道路リンク角度関数算出部22、距離関数算出部23及び関数値足し合わせ部24を備える。また、図15(b)に示すように、文字列同士の重複関数算出部21は、文字列上向き配置部25a、文字列下向き配置部25b及び文字列重複算出部25cを備える。15 is a block diagram showing the configuration of the minimum cost function value calculation unit in FIG. 10, FIG. 15 (a) shows the configuration of the minimum cost function value calculation unit, and FIG. 15 (b) shows the configuration of FIG. The structure of the duplication function calculation part of the character strings in (a) is shown.
In FIG. 15A, the minimum cost function
文字列同士の重複関数算出部21は、文字列データ取得部2で文字列データから取得された各文字列について、文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点を起点としてそれぞれ配置した場合における文字列同士の重複を、当該文字列同士の重複を示す関数を用いて判定する構成部である。
道路リンク角度関数算出部22は、文字列データから取得された文字列が沿う道路リンクがなす角度を示す関数Angle(i)の値を算出する構成部である。
距離関数算出部23は、文字列データ取得部2で文字列データから取得された文字列の文字列配置開始点と、文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点との距離を示す関数Dist(i)の値を算出する構成部である。The character string duplication
The road link angle function calculation unit 22 is a component that calculates a value of a function Angle (i) that indicates an angle formed by a road link along which a character string acquired from character string data follows.
The distance
文字列上向き配置部25aは、文字列データ取得部2で文字列データから取得された各文字列について、文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点を起点として上向き配置する構成部である。
また、文字列下向き配置部25bは、文字列データ取得部2で文字列データから取得された各文字列について、文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点を起点として下向き配置する構成部である。
文字列重複算出部25cは、文字列上向き配置部25aにより上向き配置された文字列同士の重複、文字列下向き配置部25bにより下向き配置された文字列同士の重複、及び文字列上向き配置部25aと文字列下向き配置部25bによって上向き配置及び下向き配置された文字列同士の重複判定で求められた文字列同士の重複数を用いて、文字列同士の重複を示す関数OverlapString(i)の値を算出する構成部である。The character string
In addition, the character string
The character string
関数値足し合わせ部24は、関数OverlapString(i)、関数Angle(i)及び関数Dist(i)を足し合わせてなるコスト関数f(i)の値を、文字列データ取得部2で文字列データから取得された文字列の文字列配置開始点及び文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点にそれぞれ配置した文字列について算出し、当該コスト関数f(i)の値が最小となる点を最終的な文字列配置開始候補点とする構成部である。この最終的な文字列配置開始候補点が、出力文字列配置開始候補点記憶部5に記憶される。Function value adding
次に動作について説明する。
図16は、実施の形態1の文字列配置装置による動作の流れを示すフローチャートである。この図16に沿って、文字列配置開始候補点を取得する処理の概要を説明する。
先ず、文字列データ取得部2が、地図データベース等の外部記憶装置から文字列データを取得し、当該文字列データに含まれる全ての文字列と、それぞれの文字列に対応する道路リンク及び文字列配置開始点を抽出する(ステップST1)。
次に、文字列配置開始候補点作成部3が、文字列データ取得部2によって取得された各文字列がそれぞれ沿う道路リンクにおける文字列配置開始候補点を作成する(ステップST2)。このとき、文字列配置開始候補点作成部3によって、各文字列の文字ごとに文字列配置開始候補点での配置可否が判定される。
この後、最小コスト関数値算出部4が、文字列配置開始候補点作成部3に作成されて配置可能と判定された各文字列配置開始候補点について、文字列同士の重複の度合い、文字列の変形表示の要因となる当該文字列が沿う道路リンクのなす角度、及び当該文字列配置開始候補点と文字列データに予め設定された文字列配置開始点との差の度合いを示す距離をそれぞれ示す関数からなるコスト関数を算出し、このコスト関数値が最小となる文字列配置開始候補点(文字列位置)を取得する(ステップST3)。Next, the operation will be described.
FIG. 16 is a flowchart showing a flow of operations performed by the character string arrangement device according to the first embodiment. The outline of the process of acquiring the character string arrangement start candidate point will be described with reference to FIG.
First, the character string
Next, the character string arrangement start candidate
Thereafter, the minimum cost function
なお、以降では、文字列データ取得部2によって文字列データから文字列0と文字列1の2つの文字列が取得されたものとし、文字列0と文字列1、これらにそれぞれ対応する道路リンク及び文字列配置開始点は、下記のように規定されているものとして説明する。
図17は、文字列0と文字列1がそれぞれ沿う道路リンク及び文字列配置開始候補点を示す図であり、地図の向きが北(ノースアップ)である地図画面において、東西方向をx軸、南北方向をy軸とした二次元座標系を設定している。
文字列0が沿う道路リンクは、ノードA(0,20)、ノードB(10,20)、ノードC(10,10)及びノードD(30,10)を、それぞれリンク(図17中に破線で示すリンク)で結んで構成される。また、文字列データに予め設定された文字列0の文字列配置開始点はI(12,10)であるものとする。
また、文字列1が沿う道路リンクは、ノードE(30,0)、ノードD(30,10)及びノードF(30,30)を、それぞれリンク(図17中に実線で示すリンク)で結んで構成される。文字列データに予め設定された文字列1の文字列配置開始点はJ(30,12)であるものとする。In the following, it is assumed that the character string
FIG. 17 is a diagram showing a road link and a character string arrangement start candidate point along which
The road links along the
Further, the road links along the
図18は、文字列0と文字列1にそれぞれ含まれる文字のサイズを示す図であり、図18(a)は文字列0の文字のサイズを示しており、図18(b)は文字列1の文字のサイズを示している。図18(a)に示すように、文字列0に含まれる“文”、“字”、“列”、“0”の各文字は、縦幅が5で横幅が3である。また、図18(b)に示すように、文字列1に含まれる“文”、“字”、“列”、“1”の各文字についても、同様に縦幅が5で横幅が3であるものとする。
上記の道路リンクと文字列0及び文字列1の各文字との間隔RCgapは“3”、文字と文字の間隔CCgapは“√2(2の平方根)”であるものとする。FIG. 18 is a diagram showing the sizes of characters included in the
It is assumed that the distance RCgap between the road link and each character of the
また、文字列配置開始候補点作成部3が、文字列ごとに作成する文字列配置開始候補点の候補点数PATTERN_NUMは5個であり、文字列の各文字を配置する文字配置候補点の間隔DIF_CAND_POINTが“2”であるものとし、文字列同士の重複数に関する閾値OverlapStringThresholdが“5”であるものとする。The character string arrangement start candidate
さらに、後述するコスト関数値を算出する際のパラメータα1,α2,α3を全て“1”とする。文字列配置装置1として機能するコンピュータにより処理可能な上述の間隔RCgap,CCgap,DIF_CAND_POINT等の最大値は“MAX”とする。
なお、上述した各パラメータの値は、文字列データにおいて文字列ごとに予め設定されているものとする。Further, all the parameters α 1 , α 2 , α 3 for calculating cost function values described later are set to “1”. The maximum value of the above-mentioned intervals RCgap, CCgap, DIF_CAND_POINT, etc. that can be processed by the computer functioning as the character
In addition, the value of each parameter mentioned above shall be preset for every character string in character string data.
次に、文字列配置開始候補点を取得する処理の詳細を説明する。
(1)文字列配置開始候補点の作成処理
図19は、実施の形態1の文字列配置装置による文字列配置開始候補点の作成の流れを示すフローチャートであり、図16中のステップST2の処理の詳細を示している。文字列配置開始候補点作成部3の構成については、図11を参照する。
先ず、候補点作成部6は、文字列データ取得部2から文字列データに含まれる全ての文字列、これらの文字列に対応する道路リンク及び文字列配置開始点を入力する。ここで、文字列データ取得部2から入力した各文字列を、0から文字列データに含まれる文字列の数−1までの値をとり得るインデックス番号iの文字列(i)で表現する。
候補点作成部6は、文字列データ取得部2から入力された文字列のうち、i=0の文字列(0)から順に以降の処理を実施する(ステップST1a)。Next, details of the process of acquiring the character string arrangement start candidate point will be described.
(1) Character String Arrangement Start Candidate Point Creation Process FIG. 19 is a flowchart showing a flow of creating a character string arrangement start candidate point by the character string arrangement apparatus according to the first embodiment, and the process of step ST2 in FIG. Details are shown. Refer to FIG. 11 for the configuration of the character string arrangement start candidate
First, the candidate
Candidate
候補点作成部6は、文字列(i)が沿う道路リンクにおいて、文字列(i)の候補点数PATTERN_NUM(ここでは、5個)分の文字列配置開始候補点を作成する(ステップST2a)。すなわち、候補点作成部6は、文字列(i)が沿う道路リンクに関するデータから当該道路リンクの全長LinkLengthを取得し、文字列(i)の文字列配置開始候補点の間隔CandDifを下記式から算出する。
CandDif=LinkLength/PATTERN_NUMThe candidate
CandDif = LinkLength / PATTERN_NUM
文字列0について、図17に示すノードA〜Dがリンクで接続された道路リンクの全長LinkLengthを“40”とすると、候補点数PATTERN_NUMは5個であることから、文字列配置開始候補点の間隔CandDif=40/5=8となる。
続いて、候補点作成部6は、文字列(i)が沿う道路リンクの初めのノードから、当該道路リンクに沿って間隔CandDifで候補点数PATTERN_NUMの分だけ文字列配置開始候補点を作成する。
なお、文字列(i)が沿う道路リンクの初めのノードは、文字列配置開始候補点になり得るが、文字列(i)が沿う道路リンクの終わりのノードは文字列配置開始候補点にはならないようにする。
このようにすることで、図20に示すように、文字列0が沿う道路リンク(図20中に破線で示す)上に、文字列配置開始候補点Q0(0,20)、Q1(8,20)、Q2(10,14)、Q3(14,10)、Q4(22,10)が作成される。
各文字列配置開始候補点は、0から候補点数PATTERN_NUMまでの値をとり得るインデックス番号jの文字列配置開始候補点(j)で表現する。
つまり、文字列配置開始候補点(0)がQ0、文字列配置開始候補点(1)がQ1、文字列配置開始候補点(2)がQ2、文字列配置開始候補点(3)がQ3、文字列配置開始候補点(4)がQ4となる。
候補点作成部6は、ステップST2aで作成した文字列配置開始候補点のうち、j=0の文字列配置開始候補点(0)から順に処理を実施する(ステップST3a)。For the
Subsequently, the candidate
The first node of the road link along the character string (i) can be a character string arrangement start candidate point, but the end node of the road link along the character string (i) is a character string arrangement start candidate point. Do not become.
In this way, as shown in FIG. 20, the character string arrangement start candidate points Q0 (0, 20), Q1 (8, 20), Q2 (10, 14), Q3 (14, 10), and Q4 (22, 10) are created.
Each character string arrangement start candidate point is represented by a character string arrangement start candidate point (j) having an index number j that can take a value from 0 to the number of candidate points PATTERN_NUM.
That is, the character string arrangement start candidate point (0) is Q0, the character string arrangement start candidate point (1) is Q1, the character string arrangement start candidate point (2) is Q2, the character string arrangement start candidate point (3) is Q3, The character string arrangement start candidate point (4) is Q4.
Candidate
次に、文字列上向き配置部7が、文字列配置開始候補点(j)から文字列(i)を上向き配置して、文字列(i)の配置可否を判定する(ステップST4a)。
続いて、文字列下向き配置部8が、文字列配置開始候補点(j)から文字列(i)を下向き配置して、文字列(i)の配置可否を判定する(ステップST5a)。これらの処理の詳細については後述する。また、上向き配置による配置可否判定を先に行う場合を示したが、下向き配置による配置可否判定を先に行うようにしてもかまわない。Next, the character string
Subsequently, the character string
候補点削除部9は、文字列上向き配置部7及び文字列下向き配置部8による文字列配置可否の判定結果に基づいて、文字列配置開始候補点(j)が文字列配置可能であるか否かを判定する(ステップST6a)。ここでは、文字列上向き配置部7で文字列(i)を上向き配置した場合、若しくは文字列下向き配置部8で文字列(i)を下向き配置した場合のいずれかで文字列配置不可と判定されていると、この文字列配置開始候補点(j)は、文字列配置不可となる。
文字列配置不可である場合(ステップST6a;NO)、候補点削除部9は、当該文字列配置開始候補点(j)を削除する(ステップST7a)。また、文字列配置可能である場合(ステップST6a;YES)には、当該文字列配置開始候補点(j)を残し、ステップST8aの処理へ移行する。The candidate
When the character string arrangement is impossible (step ST6a; NO), the candidate
ステップST8aにおいて、候補点作成部6が、全ての文字列配置開始候補点(j)について、ステップST4a以降の処理を実施したか否かを判定する。
ここで、インデックス番号jが文字列配置開始候補点の数(PATTERN_NUM=5)未満であり、上記処理が未実施の文字列配置開始候補点(j)がある場合(ステップST8a;YES)、候補点作成部6は、インデックス番号jを+1加算した文字列配置開始候補点(j)を、文字列上向き配置部7に出力する(ステップST9a)。これにより、続く文字列配置開始候補点(j)について、ステップST4a以降の処理が実施される。In step ST8a, the candidate
Here, if the index number j is less than the number of character string arrangement start candidate points (PATTERN_NUM = 5) and there is a character string arrangement start candidate point (j) for which the above processing has not been performed (step ST8a; YES), candidates The
一方、パラメータjの値が文字列配置開始候補点の数(PATTERN_NUM=5)以上となり、上記処理が未実施の文字列配置開始候補点(j)がない場合(ステップST8a;NO)、候補点作成部6は、全ての文字列(i)について、ステップST2a以降の処理を実施したか否かを判定する(ステップST10a)。
ここで、インデックス番号iが文字列数未満で、上記処理が未実施の文字列(i)があれば(ステップST10a;YES)、候補点作成部6は、インデックス番号iを+1加算した文字列(i)を特定し(ステップST11a)、ステップST2a以降の処理を実施する。また、全ての文字列(i)について処理が完了していれば(ステップST10a;NO)、処理を終了する。On the other hand, when the value of the parameter j is equal to or greater than the number of character string arrangement start candidate points (PATTERN_NUM = 5) and there is no character string arrangement start candidate point (j) for which the above processing has not been performed (step ST8a; NO), candidate points The
If the index number i is less than the number of character strings and there is a character string (i) for which the above processing has not been performed (step ST10a; YES), the candidate
次に、文字列上向き配置部7及び文字列下向き配置部8による文字列配置及び配置可否の判定処理の詳細について説明する。
図21は、文字列配置開始候補点に文字列を配置して配置可否を判定する処理の流れを示すフローチャートであり、図19中のステップST4a及びステップST5aの処理に相当する。つまり、文字列上向き配置部7及び文字列下向き配置部8の双方は、図21に示す処理の流れで文字列配置及び配置可否の判定を行う。文字列上向き配置部7及び文字列下向き配置部8の構成については、図7及び図8を参照する。Next, details of the character string arrangement and arrangement availability determination processing by the character string
FIG. 21 is a flowchart showing a flow of processing for determining whether or not to arrange a character string at a character string arrangement start candidate point, and corresponds to the processing of step ST4a and step ST5a in FIG. That is, both the character string
(1−1)文字列の上向き配置及び配置可否判定
図21に沿って、文字列上向き配置部7が文字列配置開始候補点Q0を起点として文字列0を上向きに配置する場合について説明する。
先ず、文字列上向き配置部7の文字配置候補点作成部10aは、図17に示したノードAから、間隔DIF_CAND_POINT(=2)で順に文字配置候補点を作成する(ステップST1b)。例えば、図22(a)に示すように、道路リンク上に文字配置候補点P0〜P20が作成される。図22(b)は文字配置候補点P0〜P20の座標値である。また、文字配置候補点作成部10aに作成された各文字配置候補点を、0から文字配置候補点の数−1までの値をとり得るインデックス番号kの文字配置候補点(k)で表現する。つまり、文字配置候補点P0〜P20は、インデックス番号k=0〜20にそれぞれ相当するので、文字配置候補点(0)〜文字配置候補点(20)で表される。(1-1) Upward Arrangement of Character String and Determination of Arrangeability A case where the character string
First, the character placement candidate
次に、開始文字配置候補点決定部11aが、文字配置を開始する文字配置候補点P’を探索する(ステップST2b)。文字配置候補点P’は、文字配置候補点P0〜P20のうち、文字列配置開始候補点Q0との距離が最小の点である。ここでは、図20と図22(a)から、文字配置候補点P’は、文字配置候補点P0(文字配置候補点(0))となる。
Next, the starting character placement candidate
続いて、上向き用文字配置順序決定部12aは、文字列0が沿う道路リンクを構成するリンクのうち、文字配置候補点P’が存在するリンクを特定し、このリンクの単位ベクトルRoadVec(cosθ,sinθ)の偏角θを用いて、下記式(2)から文字配置順序を順方向か逆方向のどちらにするかを決定する(ステップST3b)。
ここでは、文字配置候補点P’である点P0は、ノードAとノードBとを結ぶリンク(以下、道路リンク{A,B}と表記する)に存在するので、単位ベクトルは(cos0,sin0)となる。そのため、文字配置順序は順方向となる。
なお、ここでの順方向及び逆方向の文字配置順序とは、図23(a)及び図23(b)に示すように、文字列の文字を左読みできる方向が順方向であり、逆に右読みとなる方向が逆方向である。また、文字の配置順序は、0から文字列(i)中の文字数−1までの値をとり得るインデックス番号mで表現する。
if −π/2<θ≦π/2 順方向
else 逆方向 ・・・(2)Subsequently, the upward character arrangement
Here, the point P0 which is the character arrangement candidate point P ′ exists in a link connecting the node A and the node B (hereinafter referred to as a road link {A, B}), so the unit vector is (cos0, sin0). ) Therefore, the character arrangement order is forward.
Note that the forward and reverse character arrangement order here refers to the direction in which the characters in the character string can be read to the left, as shown in FIGS. 23 (a) and 23 (b). The direction for right reading is the reverse direction. The character arrangement order is expressed by an index number m that can take values from 0 to the number of characters −1 in the character string (i).
if −π / 2 <θ ≦ π / 2 Forward direction else Reverse direction (2)
文字配置順序が決定されると、上向き用文字仮配置部13aは、文字配置を開始する文字配置候補点(文字配置候補点P’、k=0)について、文字列0で配置順序m=0の文字から順に、以降の処理を実施する(ステップST4b)。
上向き用文字仮配置部13aは、下記式(3)を用いて配置順序がm番目の文字を文字配置候補点P’に仮配置する(ステップST5b)。
ただし、Pxk,Pykは、k番目の文字配置候補点のx座標、y座標を示し、CharVec(cosφ,sinφ)は、道路リンクから文字への単位ベクトルを示しており、char_heightmは、m番目の文字の縦幅、char_widthmは、m番目の文字の横幅を示している。
また、下記式(3)の(xk BottomLeft,yk BottomLeft)は、文字の左下座標を示しており、(xkm TopLeft,ykm TopLeft)は、文字の左上座標を示している。
さらに(xkm BottomRight,ykm BottomRight)は、文字の右下座標を示しており、(xkm TopRight,ykm TopRight)は、文字の右上座標を示している。
When the character arrangement order is determined, the upward character
The upward character
Where P xk and P yk indicate the x-coordinate and y-coordinate of the k-th character placement candidate point, CharVec (cosφ, sinφ) indicates a unit vector from the road link to the character, and char_height m is The vertical width of the mth character, char_width m , indicates the horizontal width of the mth character.
Also, (x k BottomLeft , y k BottomLeft ) in the following formula (3) indicates the lower left coordinates of the character, and (x km TopLeft , y km TopLeft ) indicates the upper left coordinates of the character.
Further, (x km BottomRight , y km BottomRight ) indicates the lower right coordinate of the character, and (x km TopRight , y km TopRight ) indicates the upper right coordinate of the character.
図24は、文字配置候補点P’への文字の仮配置を説明する図である。文字列0で配置順序が最も若い文字“文”(順方向)を文字配置候補点P’(文字配置候補点P0)に仮配置すると、上記式(3)で表される左下座標、左上座標、右下座標及び右上座標は、図24のようになる。なお、破線の矩形は、文字“文”の外接矩形である。
また、図24において、道路リンクから文字への単位ベクトルCharVec(cosφ,sinφ)は、RoadVec(cosθ,sinθ)の偏角θを用いて下記式(4)から算出される。
if −π/2≦θ<π/2 φ=θ−π/2
if π/2≦θ<3π/2 φ=θ+π/2 ・・・(4)FIG. 24 is a diagram for explaining the temporary arrangement of characters at the character arrangement candidate point P ′. When the character “sentence” (forward direction) having the youngest arrangement order in the
In FIG. 24, the unit vector CharVec (cosφ, sinφ) from the road link to the character is calculated from the following equation (4) using the deflection angle θ of LoadVec (cosθ, sinθ).
if −π / 2 ≦ θ <π / 2 φ = θ−π / 2
if π / 2 ≦ θ <3π / 2 φ = θ + π / 2 (4)
次に、判定処理部14aは、上向き用文字仮配置部13aに仮配置された位置で、文字の可読性が損なわれる状態にあるか否かを判定し(ステップST6b)、この判定結果に基づいて当該仮配置位置への文字配置の可否を判定する(ステップST7b)。ここで、判定処理部14aが、文字配置が可能であると判定した場合(ステップST7b;YES)、当該文字の配置位置を文字位置登録部15aに登録する(ステップST8b)。このとき、当該文字の外接矩形の左下座標、左上座標、右下座標、右上座標の4頂点が文字位置として登録される。
Next, the
次いで、上向き用文字仮配置部13aは、文字列(i)(ここでは、文字列0)の全ての文字について、上述の処理が実施されたか否かを判定する(ステップST9b)。
ここで、文字の配置順序mの値が文字列0の文字数−1と等しくなり、全ての文字について処理が実施された場合(ステップST9b;YES)、ステップST10bへ進む。ステップST10bでは、判定処理部14aが、文字列0の全ての文字について配置可能であることから、文字列0の配置が可能と判定して処理を終了する。Next, the upward character
Here, when the value of the character arrangement order m is equal to the number of characters -1 in the
文字の配置順序mの値が文字列0の文字数−1に至らず、未処理の文字があると判定した場合(ステップST9b;NO)、上向き用文字仮配置部13aは、インデックス番号kの値が文字配置候補点の数に至らず、上記処理が未実施の文字配置候補点(k)があれば、インデックス番号k及びインデックス番号mをそれぞれ+1加算して、次に処理する文字(m=1)を次の文字配置候補点(1)に仮配置する(ステップST11b)。これにより、この配置に対して、ステップST6b以降の処理が実施される。
When the value of the character arrangement order m does not reach the number of characters −1 in the
一方、判定処理部14aが、文字の配置不可であると判定した場合(ステップST7b;NO)、上向き用文字仮配置部13aは、インデックス番号kが文字配置候補点の数に至らず、上記処理が未実施の文字配置候補点(k)があれば、当該文字について次の文字配置候補点(k)に仮配置し、ステップST6bの処理に戻る。また、全ての文字配置候補点(k)について処理が完了していれば、文字列0の配置が不可であると判定して処理を終了する。これらの処理がステップST12bに相当する。
On the other hand, when the
(1−2)判定処理
図25は、判定処理部による文字の配置可否の判定処理の流れを示すフローチャートであり、図21中のステップST6bの処理の詳細を示している。判定処理部14aの構成については、図14を参照する。
先ず、文字と道路の重複判定部18は、上向き用文字仮配置部13aにより文字が仮配置されると、仮配置された位置での文字と道路の重複箇所を探索して、重複の有無を判定する(ステップST1c)。図20に示す例では、文字列0の配置順序mが0番目の文字“文”の外接矩形と当該文字列0が沿う道路リンクである道路リンク{A,B,C,D}との重複が探索される。(1-2) Determination Processing FIG. 25 is a flowchart showing the flow of determination processing for determining whether or not a character can be placed by the determination processing section, and shows details of the processing in step ST6b in FIG. Refer to FIG. 14 for the configuration of the
First, when a character is temporarily arranged by the upward character
図26は、文字と道路の重複判定の流れを示すフローチャートであり、図25中のステップST1cの処理の詳細を示している。
先ず、重複判定対象の道路リンクの各リンクを、0から当該道路リンクのリンク数までの値をとり得るインデックス番号nのリンク(n)で表現する。文字と道路の重複判定部18は、上向き用文字仮配置部13aにより仮配置された文字の文字列が沿う道路リンクのリンクのうち、n=0のリンク(0)から順に処理を実施する(ステップST1d)。
文字と道路の重複判定部18は、上向き用文字仮配置部13aにより仮配置された文字とリンク(n)との重複を探索し(ステップST2d)、この探索結果から重複の有無を判定する(ステップST3d)。ここで、重複がなければ、その旨を判定結果データとして文字と道路の重複判定部18が記憶し(ステップST4d)、重複があれば、その旨を判定結果データとして記憶する(ステップST5d)。FIG. 26 is a flowchart showing the flow of determination of overlap between characters and roads, and shows details of the processing in step ST1c in FIG.
First, each link of a road link to be subjected to duplication determination is expressed by a link (n) having an index number n that can take a value from 0 to the number of links of the road link. The character and road duplication determination unit 18 performs processing in order from the link (0) of n = 0 among the links of the road links along which the character string of the character temporarily arranged by the upward character
The character and road duplication determination unit 18 searches for an overlap between the character temporarily arranged by the upward character
この後、文字と道路の重複判定部18は、重複判定対象の道路リンクの全てのリンクとの重複判定を実施したか否かを判定する(ステップST6d)。ここで、リンクのインデックス番号nの値が、重複判定対象の道路リンクのリンク数に至らず、全てのリンクについて処理が実施されていない場合(ステップST6d;YES)、文字と道路の重複判定部18は、インデックス番号nを+1加算し、次に処理するリンク(n=1)を特定し(ステップST7d)、ステップST2d以降の処理を実施する。また、リンクのインデックス番号nの値が、重複判定対象の道路リンクのリンク数に至り、全てのリンクについて処理が実施された場合(ステップST6d;NO)、処理を終了する。 After that, the character and road duplication determination unit 18 determines whether or not duplication determination with all links of the road links to be subjected to duplication determination has been performed (step ST6d). Here, when the value of the link index number n does not reach the number of links of the road link to be duplicated and the processing has not been performed for all the links (step ST6d; YES), the character and road duplication judgment unit 18 adds +1 to the index number n, specifies the link (n = 1) to be processed next (step ST7d), and performs the processing after step ST2d. Further, when the value of the index number n of the links reaches the number of links of the road link to be determined for duplication, and the processing is performed for all the links (step ST6d; NO), the processing is terminated.
図20に示す例では、先ず、文字列0が沿う道路リンク{A,B,C,D}のうち、リンク{A,B}と文字“文”との重複が判定される。リンク{A,B}と文字“文”とは重複していないと判定される。次に、リンク{B,C}と文字“文”との重複が判定される。同様の処理を繰り返すことにより、道路リンク{A,B,C,D}と文字“文”との重複を判定すると、文字“文”は、道路リンク{A,B,C,D}と重複しないことがわかる。このため、文字と道路の重複判定部18で重複なしと判定される。
文字と道路の重複があれば、仮配置された位置での文字の配置は不可と判定され、重複がなければ、次の文字間隔判定処理へ移行する。In the example shown in FIG. 20, first, of the road links {A, B, C, D} along which the
If there is an overlap between the character and the road, it is determined that the character cannot be placed at the temporarily placed position. If there is no overlap, the process proceeds to the next character interval determination process.
図25の説明に戻る。
文字間隔判定部19は、上向き用文字仮配置部13aにより仮配置されている文字と、1つ前に配置された全ての文字との間隔を算出し、当該文字間隔と所定の閾値を比較して文字間隔が広いか狭いかを判定する(ステップST2c)。
文字間隔の計算方法は、先ず、仮配置されている文字の外接矩形の4頂点と、1つ前に配置された全ての文字の外接矩形の4頂点との頂点間の距離をそれぞれ求める。その後、求めた頂点間の距離のうち、最小の距離を当該文字同士の文字間隔とする。
このとき、仮配置されている文字が配置順序mが0番目の文字である場合、その前に配置された文字はないため、文字間隔をMAXとする。つまり、文字列0では、文字“文”の前に配置された文字はないため、文字間隔はMAXとなる。
次いで、上記文字間隔がCCgap以上であれば“文字間隔広”と判定し、CCgap未満であれば“文字間隔狭”と判定される。文字列0の文字“文”は、文字間隔がMAXであるため、“文字間隔広”となる。なお、閾値となるCCgapは、上述したように文字列データに予め設定された値である。
文字間隔が“文字間隔狭”であれば、仮配置された位置での文字の配置は不可と判定され、“文字間隔広”であれば、次の文字同士の重複判定処理へ移行する。Returning to the description of FIG.
The character
In the calculation method of the character spacing, first, the distances between the vertices of the four vertices of the circumscribed rectangle of the temporarily arranged character and the four vertices of the circumscribed rectangle of all the characters arranged immediately before are respectively determined. Thereafter, the smallest distance among the obtained distances between the vertices is set as the character spacing between the characters.
At this time, if the temporarily placed character is the 0th character in the placement order m, there is no character placed before that, so the character spacing is set to MAX. That is, in the
Next, if the character spacing is greater than or equal to CCgap, it is determined that the character spacing is wide, and if it is less than CCgap, it is determined that the character spacing is narrow. The character “sentence” of the
If the character spacing is “narrow character spacing”, it is determined that the character cannot be placed at the temporarily placed position.
文字同士の重複判定部20は、上向き用文字仮配置部13aによって仮配置されている文字と、1つ前に配置された全ての文字との重複箇所を探索し、重複の有無を判定する(ステップST3c)。ここで、文字同士の重複があると判定されると、仮配置された位置での文字の配置は不可と判定され、重複がなければ、処理を終了する。
仮配置されている文字が配置順序mが0番目の文字である場合、その前に配置された文字はないため、文字同士の重複はない。このため、文字同士の重複なしと判定される。The character
If the temporarily placed character is the 0th character in the placement order m, there is no character placed before that, so there is no overlap between the characters. For this reason, it is determined that there is no overlap between characters.
文字同士の重複判定部20は、上述のようにして最終的に文字同士の重複もない旨を判定すると、仮配置された当該文字位置を文字位置登録部15aに登録する。
文字列0の文字“文”の場合、文字配置候補点P’に文字配置可能と判定されるため、文字位置登録部15aには、文字“文”の外接矩形の左下、左上、右下、右上の4頂点の座標が文字位置として登録される。つまり、図24に示すように、文字位置登録部15aには、文字“文”の左下座標(0,17)、左上座標(0,12)、右下座標(3,17)、右上座標(3,12)が登録される。When the character
In the case of the character “sentence” of the
この後、上向き用文字仮配置部13aによって、配置順序mが1番目の文字“字”が、次の文字配置候補点P1に仮配置される。
図27は、配置順序mが0番目の文字に続いて配置順序mが1番目の文字が仮配置された場合を示す図である。図27において、符号Aを付した外接矩形は、配置順序mが0番目の文字“文”の配置位置であり、符号Bを付した外接矩形は、配置順序mが1番目の文字“字”の配置位置である。配置順序mが0番目の文字“文”は、文字配置を開始する文字配置候補点P’(文字配置候補点P0)を基準に配置されたが、配置順序mが1番目の文字“字”は、文字配置候補点P’の次の文字配置候補点P1を基準に仮配置される。Thereafter, the upward character
FIG. 27 is a diagram illustrating a case where the first character in the arrangement order m is provisionally arranged following the character in the arrangement order m of the 0th character. In FIG. 27, the circumscribed rectangle with the symbol A is the arrangement position of the character “sentence” whose arrangement order m is the 0th character, and the circumscribed rectangle with the symbol B is the character “character” with the first arrangement order m. Is the arrangement position. The character “sentence” whose arrangement order m is 0th is arranged based on the character arrangement candidate point P ′ (character arrangement candidate point P0) at which character arrangement starts, but the first character “character” whose arrangement order m is 1 Are temporarily arranged based on the character arrangement candidate point P1 next to the character arrangement candidate point P ′.
文字列0における次の文字が仮配置されると、文字と道路の重複判定部18が、上述と同様にして文字と道路の重複を判定する。この場合、文字“字”は、道路との重複はなしと判定される。
この後、文字間隔判定部19は、仮配置されている文字“字”と1つ前に配置された文字“文”との文字間隔を求め、この文字間隔に基づいて文字配置の可否を判定する。この場合、文字“文”の外接矩形Aの4つの頂点と文字“字”の外接矩形Bの4つの頂点との各々の距離、すなわち合計16個の頂点間距離が算出される。これら頂点間距離のうち、最小の頂点間距離は“1”となり、この頂点間距離は、閾値CCgap(=√2)以下であるため、“文字間隔狭”と判定される。
従って、文字配置候補点P1に文字“字”を配置することは不可と判定される。When the next character in the
Thereafter, the character
Therefore, it is determined that it is impossible to arrange the character “character” at the character arrangement candidate point P1.
文字配置候補点P1への配置が不可と判定されると、上向き用文字仮配置部13aが、続く文字配置候補点P2に文字“字”を仮配置することで、判定処理部14aは、上述の判定処理を繰り返す。ここで、文字配置候補点P2においても文字“字”の配置不可と判定されると、さらに、文字“字”を次の文字配置候補点P3に仮配置する。
If it is determined that the character placement candidate point P1 cannot be placed, the upward character
図28は、配置順序mが2番目の文字の仮配置の一例を示す図である。図28において、符号A1を付した外接矩形は、配置順序mが0番目の文字“文”の配置位置であり、符号A2を付した外接矩形は、配置順序mが1番目の文字“字”の配置位置である。
また、符号B1を付した外接矩形は、配置順序mが2番目の文字“列”を仮配置した位置である。図28では、文字“列”の外接矩形B1が、文字配置候補点P5を基準として外接矩形A1,A2と同様に、道路リンク{A,B}に平行に仮配置される。FIG. 28 is a diagram illustrating an example of a temporary arrangement of the second character in the arrangement order m. In FIG. 28, the circumscribed rectangle attached with the reference symbol A1 is the arrangement position of the character “sentence” with the arrangement order m being the 0th character, and the circumscribed rectangle attached with the reference symbol A2 is the character “character” with the first arrangement order m. Is the arrangement position.
In addition, the circumscribed rectangle to which the symbol B1 is attached is the position where the second character “string” in the arrangement order m is provisionally arranged. In FIG. 28, the circumscribed rectangle B1 of the character “row” is provisionally arranged in parallel with the road link {A, B}, similarly to the circumscribed rectangles A1 and A2, with the character arrangement candidate point P5 as a reference.
この後、文字と道路の重複判定部18が、文字“列”と道路リンクの重複を判定する。このとき、図28に示すように、文字“列”の外接矩形B1とリンク{B,C}とが重複していることが探索され、重複有りと判定する。従って、文字“列”は、文字配置候補点P5に配置不可となる。 After this, the character / road overlap determination unit 18 determines the overlap between the character “string” and the road link. At this time, as shown in FIG. 28, the circumscribed rectangle B1 of the character “string” and the link {B, C} are searched for overlapping, and it is determined that there is overlapping. Therefore, the character “string” cannot be arranged at the character arrangement candidate point P5.
図29は、配置順序mが2番目の文字の仮配置の別の一例を示す図である。図29において、外接矩形A1は、図28と同様に、配置順序mが0番目の文字“文”の配置位置であり、外接矩形A2は、配置順序mが1番目の文字“字”の配置位置である。
図29に示す例は、上向き用文字仮配置部13aが、配置順序mが2番目の文字“列”の外接矩形B1を、文字配置候補点P5を基準として道路リンク{B,C}に平行に仮配置している。この場合においても、図29に示すように、文字“列”の外接矩形B1とリンク{A,B}とが重複していることが探索され、重複有りと判定する。
従って、文字“列”は、文字配置候補点P5に配置不可となる。FIG. 29 is a diagram illustrating another example of the temporary arrangement of the second character in the arrangement order m. In FIG. 29, the circumscribed rectangle A1 is the arrangement position of the character “sentence” whose arrangement order m is the 0th character, and the circumscribed rectangle A2 is the arrangement of the character “character” whose arrangement order m is the first. Position.
In the example shown in FIG. 29, the upward character
Therefore, the character “string” cannot be arranged at the character arrangement candidate point P5.
図30は、配置順序mが2番目の文字の仮配置のさらに別の一例を示す図である。図30に示す例は、上述の処理を繰り返して、上向き用文字仮配置部13aが、文字“列”の外接矩形B1を文字配置候補点P8に仮配置した場合を示している。この場合、文字と道路の重複判定部18は、文字と道路の重複がないと判定する。
また、文字間隔判定部19は、文字“文”の外接矩形A1及び文字“字”の外接矩形A2と、文字“列”の外接矩形B1との文字間隔(頂点間距離の最小値)は、√2(2の平方根)となるので、閾値CCgap以上であり、文字間隔広と判定する。
しかし、文字同士の重複判定部20が、文字“列”の外接矩形B1が、文字“文”の外接矩形A1と文字“字”の外接矩形A2の双方との重複を探索して重複有りと判定する。
このため、文字“列”は文字配置候補点P8に配置不可と判定される。FIG. 30 is a diagram illustrating still another example of the temporary arrangement of the second character in the arrangement order m. The example shown in FIG. 30 shows a case where the above-described process is repeated and the upward character
In addition, the character
However, the character
Therefore, it is determined that the character “string” cannot be placed at the character placement candidate point P8.
上述の処理を繰り返して文字ごとに配置可否を判定することで、文字列0は、図31に示すように上向き配置すると、可読性を維持して配置可能であることが判定される。
このとき、文字列0の可読性を維持した上向き配置における各文字の文字配置候補点が決定される。図31の例では、文字“文”を文字配置候補点P0、文字“字”を文字配置候補点P3、文字“列”を文字配置候補点P10、文字“0”を文字配置候補点P11に配置する。この場合、文字列0中の全ての文字は、文字配置候補点P0〜P20に対して道路リンクを境にした一方側(上向き)に配置できるため、文字列0は上向き配置が可能である。By determining whether or not the
At this time, the character arrangement candidate point of each character in the upward arrangement maintaining the readability of the
(1−3)文字列の下向き配置及び配置可否判定
文字列上向き配置部7が文字列0を上向き配置して配置可否を判定した後、引き続き、文字列下向き配置部8が、文字列0を下向き配置して配置可否を判定する。
文字列下向き配置部8による文字列0の下向き配置及び配置可否判定の流れは、図21と同様である。
先ず、文字列下向き配置部8の文字配置候補点作成部10bは、文字配置候補点を作成する。この後、開始文字配置候補点決定部11bが、上述と同様にして、文字配置を開始する文字配置候補点を探索する。これにより、文字列配置候補点は、図22(a)に示すようになり、文字配置を開始する文字配置候補点P’は、文字配置候補点P0となる。(1-3) Character String Downward Arrangement and Arrangeability Determination After the character string
The flow of the downward arrangement of the
First, the character placement candidate
次に、下向き用文字配置順序決定部16bが、文字配置候補点P’が存在するリンクの単位ベクトルRoadVec(cosθ,sinθ)を用い、下記式(5)から文字配置順序を決定する。
if −π/2<θ≦π/2 逆方向
else 順方向 ・・・(5)Next, the downward character arrangement
if −π / 2 <θ ≦ π / 2 reverse direction else forward direction (5)
この後、下向き用文字仮配置部17bが、文字列0における配置順序mが0番目の文字“0”を、文字配置候補点P0を基準に仮配置する。なお、仮配置した文字の外接矩形の頂点座標(4頂点)は、下記式(6)から算出される。
Thereafter, the downward character
上記式(6)中のφは、下記式(7)で算出することができる。
if −π/2≦θ<π/2 φ=θ+π/2
if π/2≦θ<3π/2 φ=θ−π/2 ・・・(7)Φ in the above formula (6) can be calculated by the following formula (7).
if −π / 2 ≦ θ <π / 2 φ = θ + π / 2
if π / 2 ≦ θ <3π / 2 φ = θ−π / 2 (7)
次に、判定処理部14bが、文字“0”が文字配置候補点P0に配置可能か否かを判定する。この判定処理は、上述した判定処理部14aの場合と同様であるので、説明を省略する。これにより、文字列0の可読性を維持した下向き配置における各文字の文字配置候補点が決定される。
Next, the
図32は、文字列0の上向き配置及び下向き配置の一例を示す図である。文字列0を、上述の上向き配置及び下向き配置して文字ごとに配置可否判定を繰り返すことで、図32に示すようになる。この場合、文字列0中の全ての文字は、文字配置候補点P0〜P20に対して道路リンクを境にしたもう一方側(下向き)に配置できるため、文字列0は下向き配置が可能である。
FIG. 32 is a diagram illustrating an example of the upward arrangement and the downward arrangement of the
(1−4)配置不可な文字列配置開始候補点の削除処理
文字列配置開始候補点作成部3の候補点削除部9は、上述のようにして上向き配置及び下向き配置での配置可否判定が完了すると、候補点作成部6で作成された文字列配置開始候補点のうちから、文字列を上向き配置又は下向き配置のいずれか一方が配置不可である文字列配置開始候補点を削除する。
図20示す例では、文字列配置開始候補点Q0から、道路リンク{A,B,C,D}に沿って文字列0を上向き配置及び下向き配置できるため、文字列配置開始候補点Q0は、削除されない。
この後、文字列上向き配置部7及び文字列下向き配置部8によって、文字列配置開始候補点Q1を起点として、道路リンク{A,B,C,D}に沿って、文字列0を上向き配置及び下向き配置してそれぞれ配置可否を判定する。
この場合においても、文字列配置開始候補点Q1から、道路リンク{A,B,C,D}に沿って、文字列0を上向き配置及び下向き配置できるため、文字列配置開始候補点Q0は、削除されない。(1-4) Deletion Processing of Character String Arrangement Start Candidate Points That Cannot Be Arranged The candidate
In the example shown in FIG. 20, since the
Thereafter, the character string
Even in this case, since the
次いで、文字列上向き配置部7が、文字列配置開始候補点Q2を起点として道路リンク{A,B,C,D}に沿って、文字列0を上向き配置して配置可否を判定する。
この後、文字列下向き配置部8が、文字列配置開始候補点Q2を起点として道路リンク{A,B,C,D}に沿って、文字列0を下向き配置して配置可否を判定する。
この場合、上述の処理を実施することで、図33に示すように、文字列0の配置順序mが2番目の文字“字”を下向き配置できる。このとき、配置順序mが0番目の文字“0”の文字配置候補点が点P8となり、配置順序mが1番目の文字“列”の文字配置候補点が点P15となり、配置順序mが2番目の文字“字”の文字配置候補点がP18となる。
下向き用文字仮配置部17bによって、配置順序mが3番目の文字“文”が、文字配置候補点P20に仮配置されると、文字と道路の重複判定部18が、文字“文”と道路との重複を判定する。ここでは、文字“文”と道路リンク{A,B,C,D}との重複はないため、重複なしと判定される。
文字と道路との重複が判定されると、文字間隔判定部19が文字間隔を判定する。この場合、文字間隔が“1”であるため、CCgap未満となり、文字間隔狭と判定される。これにより、文字“文”を文字配置候補点P20に配置することはできない。
続いて、下向き用文字仮配置部17bは、文字“文”を次の文字配置候補点に仮配置しようとするが、P20の次の文字配置候補点はない。このため、下向き用文字仮配置部17bは、文字列配置開始候補点Q2を起点にすると、文字列0を道路リンク{A,B,C,D}に沿って配置を不可能であることを候補点削除部9へ通知する。これにより、候補点削除部9は、候補点作成部6で作成された文字列配置開始候補点のうちから、文字列配置開始候補点Q2を削除する。Next, the character string
Thereafter, the character string
In this case, by performing the above-described processing, as shown in FIG. 33, the second character “character” in the arrangement sequence m of the
When the third character “sentence” in the arrangement order m is provisionally placed at the character placement candidate point P20 by the downward character
When the overlap between the character and the road is determined, the character
Subsequently, the downward character
上述の処理を繰り返すことで、文字列0の文字列配置開始候補点はQ0(0,20)、Q1(8,20)となり、文字列1の文字列配置開始候補点は、図34に示すように、Q5(30,0)、Q6(30,6)となる。なお、図34において、破線で示すリンクが文字列0が沿う道路リンク{A,B,C,D}のリンクであり、実線で示すリンクが文字列1が沿う道路リンク{E,D,F}のリンクである。
By repeating the above processing, the character string arrangement start candidate points of the
(2)コスト関数を用いた可読性の評価
上述のようにして、文字列配置開始候補点作成部3により文字列配置開始候補点が作成されると、最小コスト関数値算出部4が、下記式(8)で表されるコスト関数fを用いて当該コスト関数値が最小となる文字列位置を算出する。
ただし、下記式(8)において、Iは文字列の数であり、iは文字列を特定するインデックス番号である。
また、OverlapString(i)は、文字列同士の重複を示す関数、Angle(i)は、道路リンクの最大角度を示す関数、Dist(i)は、文字列配置開始候補点と入力文字列配置開始点との距離を示す関数である。なお、α1,α2,α3は、それぞれの関数値を調整するためのパラメータである。上述したように、パラメータα1,α2,α3は全て“1”であるものとする。
さらに、f(i)=α1OverlapString(i)+α2Angle(i)+α3Dist(i)である。
f=Σ[i=0,I]f(i) ・・・(8)(2) Evaluation of readability using a cost function When a character string arrangement start candidate point is created by the character string arrangement start candidate
However, in the following formula (8), I is the number of character strings, and i is an index number that identifies the character string.
Overlap String (i) is a function indicating the overlap of character strings, Angle (i) is a function indicating the maximum angle of road links, and Dist (i) is a character string arrangement start candidate point and an input character string arrangement. It is a function indicating the distance from the start point. Α 1 , α 2 , and α 3 are parameters for adjusting the respective function values. As described above, it is assumed that the parameters α 1 , α 2 , and α 3 are all “1”.
Further, f (i) = α 1 Overlap String (i) + α 2 Angle (i) + α 3 Dist (i).
f = Σ [i = 0, I] f (i) (8)
図35は、コスト関数値が最小となる文字列配置の算出処理の流れを示すフローチャートであり、図16中のステップST3の処理の詳細を示している。なお、最小コスト関数値算出部4の構成については、図15を参照する。
先ず、文字列配置開始候補点作成部3で配置可能と判定された文字列配置開始候補点の各組み合わせを、0から当該文字列配置開始候補点の組み合わせの数までの値をとり得るインデックス番号naの組み合わせ(na)で表現する。
最小コスト関数値算出部4は、文字列配置開始候補点作成部3から入力された文字列配置開始候補点の全ての組み合わせのうち、na=0である組み合わせ(0)から順に処理を実施する(ステップST1e)。また、コスト関数値の最小値の初期値を、文字列配置装置1として機能するコンピュータで扱える最大の値であるMAXに設定する。FIG. 35 is a flowchart showing the flow of the calculation process of the character string arrangement that minimizes the cost function value, and shows the details of the process of step ST3 in FIG. Note that FIG. 15 is referred to for the configuration of the minimum cost function
First, an index number that can take a value from 0 to the number of combinations of the character string arrangement start candidate points for each combination of the character string arrangement start candidate points determined to be arranged by the character string arrangement start candidate
The minimum cost function
図34に示した具体例では、上述までの処理により、文字列0の文字列配置開始候補点はQ0(0,20)、Q1(8,20)となり、文字列1の文字列配置開始候補点は、図34に示すように、Q5(30,0)、Q6(30,6)となっている。
従って、文字列配置開始候補点の組み合わせは{Q0,Q5},{Q0,Q6},{Q1,Q5},{Q1,Q6}となる。
最小コスト関数値算出部4は、最初に、組み合わせ{Q0,Q5}(組み合わせ(0))に対してコスト関数値を計算する。In the specific example shown in FIG. 34, the character string arrangement start candidate points of
Therefore, combinations of character string arrangement start candidate points are {Q0, Q5}, {Q0, Q6}, {Q1, Q5}, {Q1, Q6}.
The minimum cost function
文字列同士の重複関数算出部21は、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う全ての文字列について、コスト関数fにおける文字列同士の重複関数OverlapString(i)の値をそれぞれ算出する(ステップST2e)。
ここでは、文字列同士の重複関数算出部21が、最初に重複度合いを計算する文字列とその他の文字列との重複度合いを計算する。文字列0から重複度合いを計算する場合は、文字列0以外の文字列である文字列1との重複が探索される。The overlapping
Here, the duplication
次に、道路リンク角度関数算出部22は、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う全ての文字列について、コスト関数fにおける文字列が沿う道路リンクの角度を示す関数Angle(i)の値をそれぞれ算出する(ステップST3e)。ここでは、道路リンク角度関数算出部22が、文字列0が沿う道路リンク{A,B,C,D}の各リンクがなす角度が算出される。
Next, the road link angle function calculation unit 22 indicates the angle of the road link along the character string in the cost function f for all the character strings along the road link corresponding to the combination (na) of the character string arrangement start candidate points. The value of the function Angle (i) is calculated (step ST3e). Here, the road link angle function calculation unit 22 calculates the angle formed by each link of the road links {A, B, C, D} along which the
次いで、距離関数算出部23は、文字列配置開始候補点の組み合わせ(na)の各文字列配置開始候補点と、文字列データ取得部2により文字列データから取得された文字列配置開始点との距離を示す関数Dist(i)の値をそれぞれ算出する(ステップST4e)。ここでは、文字列配置開始候補点Q0,Q1と、文字列0についての文字列配置開始点との距離、及び、文字列配置開始候補点Q5,Q6と、文字列1についての文字列配置開始点との距離が算出される。
Next, the distance
ステップST5eにおいて、文字列同士の重複関数算出部21、道路リンク角度関数算出部22及び距離関数算出部23は、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う全ての文字列(i)について処理したか否かを判定する。
ここで、未実施の文字列(i)があれば(ステップST5e;YES)、インデックス番号iが+1加算されて(ステップST7e)、次の文字列について、ステップST2e以降の処理が繰り返される。In step ST5e, the character string duplication
If there is an unexecuted character string (i) (step ST5e; YES), the index number i is incremented by 1 (step ST7e), and the processing after step ST2e is repeated for the next character string.
未実施の文字列(i)がなくなれば(ステップST5e;NO)、関数値足し合わせ部24が、文字列同士の重複関数算出部21、道路リンク角度関数算出部22及び距離関数算出部23によってそれぞれ算出された関数値を足し合わせて、文字列配置開始候補点の組み合わせ(na)に対応するコスト関数値を算出する(ステップST6e)。
次に、関数値足し合わせ部24は、ステップST6eで算出したコスト関数値が最小であるか否かを判定する(ステップST8e)。
ここでは、前回に判定したコスト関数値と今回判定するコスト関数値が大小比較され、今回判定するコスト関数値が小さければ(ステップST8e;YES)、関数値足し合わせ部24が、最小なコスト関数値と当該コスト関数値に対応する組み合わせ(na)とを更新する(ステップST9e)。If there is no unexecuted character string (i) (step ST5e; NO), the function
Next, the function
Here, the cost function value determined last time and the cost function value determined this time are compared in magnitude, and if the cost function value determined this time is small (step ST8e; YES), the function
今回判定するコスト関数値が大きければ(ステップST8e;NO)、関数値足し合わせ部24は、文字列配置開始候補点の全ての組み合わせ(na)についてコスト関数の算出処理を実施したか否かを判定する(ステップST10e)。ここで、未実施の組み合わせ(na)がなければ(ステップST10e;NO)、処理を終了する。
未実施の組み合わせ(na)があれば(ステップST10e;YES)、インデックス番号naが+1加算されて(ステップST11e)、ステップST2e以降の処理が繰り返される。If the cost function value determined this time is large (step ST8e; NO), the function
If there is an unimplemented combination (na) (step ST10e; YES), +1 is added to the index number na (step ST11e), and the processes after step ST2e are repeated.
(2−1)文字列同士の重複関数値の算出処理
図36は、文字列同士の重複関数値の算出処理の流れを示すフローチャートであり、図35中のステップST2eの処理の詳細を示している。
文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う各文字列を、0から文字列数までの値をとり得るインデックス番号iの文字列(i)で表現する。
また、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う文字列のうち、重複度合いを計算する対象となる文字列以外の各文字列を、0から重複度合いを計算する対象となる文字列以外の文字列の数までの値をとり得るインデックス番号iaの文字列(ia)で表現する。
さらに、文字同士の重複関数算出部21は、文字列同士の重複数をカウントするカウンタを有し、カウンタの値をパラメータcountで表す。(2-1) Duplicate Function Value Calculation Processing Between Character Strings FIG. 36 is a flowchart showing the flow of calculation processing of overlapping function values between character strings, and shows details of the processing of step ST2e in FIG. Yes.
Each character string along the road link corresponding to the combination (na) of character string arrangement start candidate points is represented by a character string (i) with an index number i that can take a value from 0 to the number of character strings.
Further, among character strings along the road link corresponding to the combination (na) of the character string arrangement start candidate points, each character string other than the character string for which the degree of duplication is calculated is calculated from 0 for the degree of duplication. It is expressed by a character string (ia) having an index number ia that can take values up to the number of character strings other than the character string.
Furthermore, the duplication
先ず、文字同士の重複関数算出部21が、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿う文字列のうち、i=0の文字列(0)から順に以降の処理を実施する(ステップST1f)。このとき、カウンタの初期値としてcount=0を設定する。
次に、文字同士の重複関数算出部21の文字列上向き配置部25aは、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿って、文字列(i)を上向き配置する(ステップST2f)。この後、文字列下向き配置部25bが、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿って、文字列(i)を下向き配置する(ステップST3f)。この場合、重複計算の対象となる文字列は文字列0であるので、文字列0を、文字列配置開始候補点Q0を起点として上向き配置及び下向き配置する。
なお、上向き配置及び下向き配置は、図21を用いて説明した内容と同様の処理で実施する。First, the character overlap
Next, the character string
Note that the upward arrangement and the downward arrangement are performed by the same processing as that described with reference to FIG.
同様にして、文字列上向き配置部25aが、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿って、文字列(i)以外の文字列(ia)を上向き配置する(ステップST4f)。なお、ia=0の文字列(0)から順に以降の処理を実施する。
次いで、文字列下向き配置部25bが、文字列配置開始候補点の組み合わせ(na)に対応する道路リンクに沿って、文字列(i)以外の文字列(ia)を下向き配置する(ステップST5f)。この場合、重複計算の対象となる文字列以外の文字列は文字列1であるので、文字列1を、文字列配置開始候補点Q5を起点として上向き配置及び下向き配置する。Similarly, the character string
Next, the character string
ここで、文字列(i)における各文字を、0から文字列(i)の文字数までの値をとり得るインデックス番号laの文字(la)で表現し、文字列(ia)における各文字を、0から文字列(ia)の文字数までの値をとり得るインデックス番号lbの文字(lb)で表現する。文字列重複算出部25cは、文字列(i)の文字のうちのla=0の文字(0)及び文字列(ia)の文字のうちのlb=0の文字(0)から順に以降の処理を実施する(ステップST6f)。
Here, each character in the character string (i) is represented by a character (la) having an index number la that can take a value from 0 to the number of characters in the character string (i), and each character in the character string (ia) is represented by It is represented by a character (lb) having an index number lb that can take a value from 0 to the number of characters of the character string (ia). The character string
次に、文字列重複算出部25cは、文字列(i)の文字(la)と、文字列(i)以外の文字列のうちの1つである文字列(ia)の文字(lb)との重複を判定する(ステップST7f)。ここでは、文字列(i)が文字列0であり、文字列(ia)が文字列1となる。図37は、文字列配置開始候補点Q0を起点として文字列0を上向き配置及び下向き配置し、文字列配置開始候補点Q5を起点として文字列1を上向き配置及び下向き配置した場合を示す図である。文字列重複算出部25cは、文字列0の0番目(la=0)の文字と、文字列1の0番目(lb=0)の文字との重複を判定する。
先ず、文字列0の0番目(la=0)の上向き配置された文字“文”と、文字列1の0番目(lb=0)の上向き配置された文字“文”との重複が調べられる。
次に、文字列0の0番目(la=0)の上向き配置された文字“文”と、文字列1の0番目(lb=0)の下向き配置された文字“1”との重複が調べられる。
同様にして、文字列0の0番目(la=0)の下向き配置された文字“0”と、文字列1の0番目(lb=0)の上向き配置された文字“文”との重複が調べられる。
文字列0の0番目(la=0)の下向き配置された文字“0”と、文字列1の0番目(lb=0)の上向き配置された文字“文”との重複がそれぞれ調べられる。
これらの合計4回の重複調査の結果、重複がなければ、文字列重複算出部25cは、判定結果を重複なしとし、ステップST8fの処理に進む。一方、重複があれば、文字列重複算出部25cは、判定結果を重複ありとし、カウンタのカウント値countを+1加算する(ステップST9f)。
この場合、文字列0の0番目(la=0)の文字と、文字列1の0番目(lb=0)の文字は、重複なしと判定される。Next, the character string
First, the duplication of the 0th (la = 0) upwardly arranged character “sentence” of the
Next, the duplication of the 0th (la = 0) upwardly arranged character “sentence” of the
Similarly, the 0th (la = 0) downwardly arranged character “0” of the
The duplication of the 0th (la = 0) downwardly arranged character “0” of the
If there is no duplication as a result of the duplication investigation four times in total, the character string
In this case, the 0th character (la = 0) in the
ステップST8fにおいて、文字列重複算出部25cは、文字列(ia)における全ての文字(lb)について重複調査したか否かを判定する。ここで、未調査の文字(lb)があれば(ステップST8f;YES)、文字列重複算出部25cは、インデックス番号lbを+1加算し(ステップST10f)、ステップST7fに戻って、文字列0の0番目(la=0)の文字と、次の文字(lb)との重複調査を実施する。
ここでは、文字列0の0番目(la=0)の文字と、文字列1の1番目(lb=1)の文字との重複が調べられる。この場合、図32及び図37に示す配置であることから、文字列0の0番目(la=0)の文字と、文字列1の1番目(lb=1)の文字との重複はなしと判定される。In step ST8f, the character string
Here, the duplication of the 0th character (la = 0) in the
文字列1で未調査の文字(lb)がなくなると(ステップST8f;NO)、文字列重複算出部25cは、文字列(i)における全ての文字(la)について重複調査したか否かを判定する(ステップST11f)。ここで、未調査の文字(la)があれば(ステップST11f;YES)、文字列重複算出部25cは、インデックス番号laを+1加算し(ステップST12f)、ステップST7fに戻って、文字列0の次の文字と、文字列1の文字(lb)との重複調査を実施する。ここでは、文字列0の1番目(la=1)の文字と、文字列1の文字(lb)との重複が調べられる。
When there is no unexamined character (lb) in the character string 1 (step ST8f; NO), the character string
文字列0で未調査の文字(la)がなくなると(ステップST11f;NO)、文字列重複算出部25cは、文字列(i)以外の全ての文字列(ia)について重複調査したか否かを判定する(ステップST13f)。ここで、未調査の文字列(ia)があれば(ステップST13f;YES)、文字列重複算出部25cは、インデックス番号iaを+1加算し(ステップST14f)、ステップST4fに戻って、文字列(ia=1)との重複調査を実施する。この場合、文字列0と文字列1との重複が無いため、カウンタの値である文字列0の重複数は“0”となる。
When there is no unexamined character (la) in the character string 0 (step ST11f; NO), the character string
未調査の文字列(ia)がなくなると(ステップST13f;NO)、文字列重複算出部25cは、重複計算の対象の文字列(i)の重複数を用いて、下記式(9)から文字列同士の重複関数OverlapString(i)の値を算出する(ステップST15f)。
なお、下記式(9)中の重複数(i)は、文字列(i)の重複数である。この場合に、文字列0の重複数は“0”であるため、OverlapString(0)=0となる。同様に他の文字列に対してもOverlapString(i)を算出する。
if 重複数(i)≧OverlapStringThreshold
OverlapString(i)=100
else
OverlapString(i)
=重複数(i)×100/OverlapStringThreshold
・・・(9)When there is no unexamined character string (ia) (step ST13f; NO), the character string
Note that the duplication number (i) in the following formula (9) is the duplication number of the character string (i). In this case, since the overlapping number of the
if Duplicate (i) ≧ Overlap String Threshold
Overlap String (i) = 100
else
Overlap String (i)
= Multiple (i) × 100 / Overlap String Threshold
... (9)
(2−2)道路リンクの角度関数値の算出処理
図38は、道路リンクの角度関数値の算出処理の流れを示すフローチャートであり、図35中のステップST3eの処理の詳細を示している。
文字列配置開始候補点の組み合わせに対応する道路リンクに沿う各文字列を、0から文字列の数までの値をとり得るインデックス番号iの文字列(i)で表現する。
また、文字列(i)が沿う道路リンクを構成する各ノードを、0から当該道路リンクのノード数−2までの値をとり得るインデックス番号lcで特定する。
さらに、道路リンク角度関数算出部22は、文字列(i)が沿う道路リンクがなす角度をAngle(i)で表す。(2-2) Road Link Angle Function Value Calculation Process FIG. 38 is a flowchart showing the flow of the road link angle function value calculation process, and shows the details of the process of step ST3e in FIG.
Each character string along the road link corresponding to the combination of character string arrangement start candidate points is represented by a character string (i) with an index number i that can take a value from 0 to the number of character strings.
Further, each node constituting the road link along which the character string (i) follows is specified by an index number lc that can take a value from 0 to the number of nodes of the road link−2.
Furthermore, the road link angle function calculation unit 22 represents the angle formed by the road link along the character string (i) as Angle (i).
先ず、道路リンク角度関数算出部22が、文字列(i)が沿う道路リンク中のノード(lc)のうち、lc=0から順に以降の処理を実施する(ステップST1g)。このとき、角度Angle(i)=0を設定する。
次に、道路リンク角度関数算出部22は、文字列(i)が沿う道路リンク中の3つのノードを用い、下記式(10)に従って、隣り合う3つのノードのそれぞれに接続する2つのリンクの角度を示すAnglelc(i)を算出する(ステップST2g)。ただし、下記式(10)において、nlc,nlc+1,nlc+2は、文字列(i)が沿う道路リンク中の連続して並ぶ3ノードである。図20の例では、文字列0が沿う道路リンク中で連続して並ぶ3つのノードA,B,Cをそれぞれ結ぶリンク{A,B}とリンク{B,C}が成す角度がπ/2であるので、Angle(0)=50となる。
Anglelc(i)={π−∠(mlc,mlc+1,mlc+2)}×100/π
・・・(10)First, the road link angle function calculation unit 22 performs the following processing in order from lc = 0 among the nodes (lc) in the road link along which the character string (i) follows (step ST1g). At this time, the angle Angle (i) = 0 is set.
Next, the road link angle function calculation unit 22 uses the three nodes in the road link along which the character string (i) follows and uses the following formula (10) to calculate the two links connected to each of the three adjacent nodes. Angle lc (i) indicating the angle is calculated (step ST2g). However, in the following formula (10), n lc , n lc + 1 , and n lc + 2 are three nodes that are continuously arranged in the road link along the character string (i). In the example of FIG. 20, the angle formed by the link {A, B} and the link {B, C} connecting the three nodes A, B, and C successively arranged in the road link along the
Angle lc (i) = {π−∠ (m lc , m lc + 1 , m lc + 2 )} × 100 / π
... (10)
次いで、道路リンク角度関数算出部22は、下記式(11)に示すように、今回算出した関数Anglelc(i)の値が、文字列(i)が沿う道路リンク中で、前回角度関数の算出対象とした3つのノードをそれぞれ結ぶ2つのリンクがなす角度を示す関数値が設定されたAngle(i)よりも大きいか否かを判定する(ステップST3g)。
ここで、Anglelc(i)の値がAngle(i)の値よりも大きければ(ステップST3g;YES)、道路リンク角度関数算出部22は、関数Angle(i)の値を、今回算出した関数Anglelc(i)の値で更新する(ステップST4g)。
なお、初回の場合は、ステップST1gでAngle(i)を“0”に設定するので、i=0のAngle(0)<AngleA(0)である。よって、Angle(i)の値をAngleA(0)の値で更新する。
Angle(i)=max{Anglelc(i)} ・・・(11)Next, the road link angle function calculator 22 calculates the value of the function Angle lc (i) calculated this time in the road link along the character string (i) as shown in the following formula (11). It is determined whether or not the function value indicating the angle formed by the two links connecting the three nodes to be calculated is larger than the set Angle (i) (step ST3g).
Here, if the value of Angle lc (i) is larger than the value of Angle (i) (step ST3g; YES), the road link angle function calculation unit 22 calculates the value of the function Angle (i) as the function calculated this time. Update with the value of Angle lc (i) (step ST4g).
In the case of the first time, Angle (i) is set to “0” in step ST1g, and therefore, i = 0 Angle (0) <Angle A (0). Therefore, the value of Angle (i) is updated with the value of Angle A (0).
Angle (i) = max {Angle lc (i)} (11)
Anglelc(i)の値がAngle(i)以下であるか(ステップST3g;NO)、若しくは、ステップST4gの処理が完了すると、道路リンク角度関数算出部22は、文字列(i)が沿う道路リンク中の全てのノードについて、上記処理を実施したか否かを判定する(ステップST5g)。
ここで、インデックス番号lcが、文字列(i)が沿う道路リンクのノード数−2未満であり、文字列(i)が沿う道路リンクに上記処理が未実施のノードがある場合(ステップST5g;YES)、道路リンク角度関数算出部22は、インデックス番号lcに+1加算して(ステップST6g)、文字列(i)が沿う道路リンク中の次の3つのノードについて、ステップST2g以降の処理を実施する。
図20に示す例では、ノードA,B,Cの次にノードB,C,Dが特定され、これらを結ぶリンク{B,C}とリンク{C,B}との成す角度が、上記式(10)を用いて算出される。この場合は、AngleB(0)=50であるため、Angle(0)=AngleB(0)である。よって、Angle(0)の値は更新されない。If the value of Angle lc (i) is equal to or smaller than Angle (i) (step ST3g; NO), or the processing of step ST4g is completed, the road link angle function calculation unit 22 calculates the road along which the character string (i) follows. It is determined whether or not the above processing has been performed for all nodes in the link (step ST5g).
Here, when the index number lc is less than the number of nodes of road links along which the character string (i) follows −2, and the road link along which the character string (i) follows has a node that has not been subjected to the above processing (step ST5g; YES), the road link angle function calculation unit 22 adds +1 to the index number lc (step ST6g), and performs the processing after step ST2g for the next three nodes in the road link along which the character string (i) follows. To do.
In the example shown in FIG. 20, nodes B, C, and D are specified next to nodes A, B, and C, and the angle formed by the link {B, C} and the link {C, B} connecting them is expressed by the above formula. It is calculated using (10). In this case, since Angle B (0) = 50, Angle (0) = Angle B (0). Therefore, the value of Angle (0) is not updated.
このように、文字列(i)が沿う道路リンク中の全てのノードについて上記処理を実施したと判定されるまで(ステップST5g;NO)、Anglelc(i)を繰り返して、上記式(11)に従ってAngle(i)の値を更新する。図20では、文字列0が沿う道路リンクでの角度を示す関数Angle(0)は50となる。As described above, Angle lc (i) is repeated until it is determined that the above processing has been performed for all the nodes in the road link along which the character string (i) follows (Step ST5g; NO). The value of Angle (i) is updated according to In FIG. 20, the function Angle (0) indicating the angle at the road link along which the
(2−3)文字列配置開始候補点と文字列配置開始点との距離を示す関数値の算出処理
図35中のステップST4eにおける文字列配置開始点と文字列配置開始候補点との距離を示す関数の算出処理についての詳細を説明する。
距離関数算出部23が、下記式(12)に従って、文字列データに予め設定された文字列(i)についての文字列配置開始点(以下、入力文字列配置開始点と呼ぶ)と、文字列配置開始候補点との距離を示す関数Dist(i)の値を算出する。
ただし、下記式(12)における、(Qxi,Qyi)は、文字列(i)の文字列配置開始候補点の位置である。また、(Sxi,Syi)は、文字列(i)の入力文字列配置開始点である。図20に示す場合には、文字列0の文字列配置開始候補点はQ0であるので、(Qx0,Qy0)=Q0(0,20)となる。また、上述したように、文字列0の文字列配置開始点Iは、(Sx0,Sy0)=I(12,10)である。
従って、下記式(12)より、Dist(0)=√244(244の平方根)となる。
(2-3) Calculation processing of function value indicating distance between character string arrangement start candidate point and character string arrangement start point The distance between the character string arrangement start point and the character string arrangement start candidate point in step ST4e in FIG. Details of the calculation processing of the function shown will be described.
The distance
However, (Q xi , Q yi ) in the following formula (12) is the position of the character string arrangement start candidate point of the character string (i). Further, (S xi , S yi ) is an input character string arrangement start point of the character string (i). In the case shown in FIG. 20, since the character string arrangement start candidate point of the
Therefore, Dist (0) = √244 (square root of 244) from the following equation (12).
上述の処理を文字列1に対しても行った後、関数値足し合わせ部24が、上記式(8)に従って、コスト関数値fを算出する。文字列0及び文字列1では下記式の関係となる。
f(0)=OverlapString(0)+Angle(0)+Dist(0)
=50+√244
f(1)=OverlapString(1)+Angle(1)+Dist(1)
=12
よって、コスト関数値fは、f=f(0)+f(1)=62+√244となる。After performing the above-described processing also on the
f (0) = Overlap String (0) + Angle (0) + Dist (0)
= 50 + √244
f (1) = Overlapping String (1) + Angle (1) + Dist (1)
= 12
Therefore, the cost function value f is f = f (0) + f (1) = 62 + √244.
上述の処理を、文字列配置開始候補点の他の組み合わせ{Q0,Q6},{Q1,Q5},{Q1,Q6}に対しても行う。この結果、コスト関数値は、図39に示すようになる。この場合、最小コスト関数値算出手段4は、{Q0,Q6}のとき、コスト関数値fが最小になると判定する。よって、この{Q0,Q6}を出力文字列配置開始候補点記憶領域5に保存する。
The above-described processing is performed for other combinations {Q0, Q6}, {Q1, Q5}, {Q1, Q6} of character string arrangement start candidate points. As a result, the cost function value is as shown in FIG. In this case, the minimum cost function value calculation means 4 determines that the cost function value f is minimum when {Q0, Q6}. Therefore, {Q0, Q6} is stored in the output character string arrangement start candidate
実施の形態1による文字列配置装置1が、画面上に文字列を配置する際、出力文字列配置開始候補点記憶部5に保存された文字列配置開始候補点の組を用いることで、文字列同士の重複が少ない位置に文字列を配置することができる。上述した例では、文字列配置開始候補点の組{Q0,Q6}を文字列配置に用いる。
When the character
以上のように、この実施の形態1によれば、表示画面上に配置する文字列のデータを取得する文字列データ取得部2と、文字列データ取得部2によって取得された文字列の配置を開始する表示画面上の文字列配置開始候補点を作成する文字列配置開始候補点作成部3と、文字列配置開始候補点作成部3で作成された文字列配置開始候補点を起点として表示画面上の相対する方向で読みがそれぞれ順方向となるように文字列を配置して、各配置の文字列同士の位置関係に基づいて、当該文字列の可読性に影響を与える因子(文字列同士の重複、道路リンクのなす角度、及び入力文字列配置開始点と文字列配置開始候補点との距離)を評価するコスト関数値を算出する最小コスト関数値算出部4と、コスト関数値が最小の位置候補を、文字列の配置開始位置を変更する際の文字列配置開始候補点として記憶する出力文字列配置開始候補点記憶部5とを備える。
このように構成することで、例えば、道路に関して上向き配置及び下向き配置した文字列同士の重複を示す関数を含むコスト関数値を最小化すれば、いかなる地図向きでも文字列同士の重複が少ない位置に文字列を配置することができる。
これにより、カーナビゲーションシステムのように自車の位置の変化により地図向きが変わる場合であっても、表示画面中に文字列同士が重複して表示されることを抑制でき、文字列を容易に認識することができる。As described above, according to the first embodiment, the character string
By configuring in this way, for example, by minimizing the cost function value including the function indicating the duplication of the character strings arranged upward and downward with respect to the road, the position where the duplication of the character strings is small in any map orientation. Strings can be placed.
As a result, even if the orientation of the map changes due to a change in the position of the vehicle as in a car navigation system, it is possible to suppress the display of overlapping character strings on the display screen, and the character strings can be easily Can be recognized.
実施の形態2.
上記実施の形態1では、道路リンクを挟んで上向き配置及び下向き配置した文字列ペアの重複を示すコスト関数値を最小化することで、いかなる地図の向きであっても、文字列同士の重複が少ない位置となる文字列配置開始候補点を決定し、文字列配置開始候補点を基に文字列を再配置する装置を示した。
この実施の形態2では、文字列同士の重複だけではなく、文字列とシンボルの重複が少ない位置を文字列配置開始候補点として決定する態様を述べる。また、実施の形態2は、コスト関数fの最小値を求める際に、遺伝的アルゴリズム(Genetic Algorithm;以下、GAと略す)を用いる点も、上記実施の形態1と異なる。
In the first embodiment, by minimizing the cost function value indicating the duplication of the character string pairs arranged upward and downward with the road link in between, the character strings overlap each other regardless of the map orientation. An apparatus has been shown in which character string arrangement start candidate points that are few positions are determined, and character strings are rearranged based on the character string arrangement start candidate points.
In the second embodiment, a mode will be described in which not only overlapping character strings but also a position where there is little overlap between character strings and symbols is determined as a character string arrangement start candidate point. The second embodiment also differs from the first embodiment in that a genetic algorithm (hereinafter referred to as GA) is used when obtaining the minimum value of the cost function f.
図40は、この発明の実施の形態2による文字列配置装置の構成を示すブロック図である。実施の形態2の文字列配置装置1Aは、上記実施の形態1と同様に、例えばナビゲーション装置等に利用される地図表示装置を構成する装置であって、地図上の道路等を表現するリンクに沿ってその名称等の情報を示す文字列を配置する。以降の説明においても、文字列配置装置1Aが、道路の名称等を示す文字列を当該道路の道路リンクに沿って配置する場合について述べる。
図40において、実施の形態2による文字列配置装置1Aは、文字列データ取得部2、文字列配置開始候補点作成部3、出力文字列配置開始候補点記憶部5a、シンボルデータ取得部26、個体初期化部27、個体毎のコスト関数値算出部28、コスト関数値最小個体保存部29、収束判定部30、個体再作成部31、交叉部32、及び突然変異部33を備える。上記構成部27〜33により、GAを用いた最小のコスト関数値の抽出が実行される。FIG. 40 is a block diagram showing a configuration of a character string arrangement device according to
In FIG. 40, a character
文字列データ取得部2は、外部の記憶装置から文字列データを取得する構成部である。なお、文字列データとは、例えば、地図表示に利用される地図データに含まれる、地図画面に表示する道路名の文字列、文字列が沿う道路リンクを示す道路リンクデータ及び地図画面で文字列の配置を開始する位置を示す文字列配置開始点を含むデータである。
シンボルデータ取得部26は、外部の記憶装置からシンボルデータを取得する構成部である。なお、シンボルデータとは、例えば、地図表示に利用される地図データに含まれ、地図画面上で道路上若しくは道路沿いに表示されるシンボルを示すデータ、及び当該シンボルを配置する位置を示すシンボル配置点を含むデータである。ナビゲーション装置であれば、自車の現在位置を示すシンボルが挙げられる。The character string
The symbol
文字列配置開始候補点作成部3は、文字列データ取得部2により文字列データから取得された文字列の文字列配置開始点を変更する場合に、地図画面で当該文字列の配置を開始する点の候補(以下、文字列配置開始候補点と呼ぶ)を作成する構成部である。
個体初期化部27は、文字列配置開始候補点作成部3で作成され配置可能と判定された文字列配置開始候補点の組み合わせから、最初に処理する文字列配置開始候補点の組み合わせを作成する構成部である。このように、文字列配置開始候補点作成部3で作成された文字列配置開始候補点から文字列毎に文字列配置開始候補点を等確率に選択して、最初に処理する個体を決定する処理を、個体の初期化という。この処理の詳細は図44を用いて後述する。The character string arrangement start candidate
The
個体毎のコスト関数値算出部28は、個体毎の文字列配置開始候補点を起点として上向き配置した文字列と下向き配置した文字列とのペアにおいて、文字列の可読性に影響を与える因子として、各配置の文字列同士の重複を示す関数、隣り合う道路リンク同士の角度を示す関数、文字列データから取得された文字列配置開始点と文字列配置開始候補点との距離を示す関数、シンボルと文字列との重複を示す関数の値を足し合わせたコスト関数値をそれぞれ算出し、当該コスト関数値が最小となる個体とそのコスト関数値を求める構成部である。
The cost function
コスト関数値最小個体保存部29は、個体毎のコスト関数値算出部28にて算出されたコスト関数値の最小値及びその個体を保存する構成部であり、保存した個体毎のコスト関数値の最小値のうち、さらに最小なコスト関数及びその個体を出力文字列配置開始候補点記憶部5aに記憶する。出力文字列配置開始候補点記憶部5aは、コスト関数値最小個体保存部29に保存された個体及びそのコスト関数値のうち、最小のコスト関数値及びその個体をを記憶する記憶部である。
The cost function value minimum
収束判定部30は、コスト関数値最小個体保存部29に保存される個体毎のコスト関数値の最小値が一定に収束したか否かを判定する構成部である。
個体再作成部31は、個体初期化部27に初期化された個体、又は自身で前回作成した個体から、所定の選択確率で文字列配置開始候補点を選択することにより、所定数の個体を再作成する構成部である。
交叉部32は、個体再作成部31で作成された個体から所定の確率(交叉確率CROSSOVER)で選択した複数の交叉対象の個体から2つずつ個体をさらに選択し、選択した個体間で文字列配置開始候補点の組み合わせの一部を入れ替える、いわゆる交叉処理を実行する構成部である。
突然変異部33は、個体再作成部31で作成された個体、及び交叉部32で交叉処理が実行された個体の文字列配置開始候補点を、所定の確率(突然変異確率Mutation)で、これら個体に登録されている文字列配置開始候補点のうちから選択した別の文字列配置開始候補点に変換する構成部である。The
The individual recreating
The
The
なお、文字列データ取得部2、文字列配置開始候補点作成部3、出力文字列配置開始候補点記憶部5a、シンボルデータ取得部26、個体初期化部27、個体毎のコスト関数値算出部28、コスト関数値最小個体保存部29、収束判定部30、個体再作成部31、交叉部32、及び突然変異部33は、例えば、この発明の趣旨に従う文字列配置用プログラムをコンピュータに実行させることにより、ハードウェアとソフトウェアが協働した具体的な手段として実現される。つまり、上記構成部2,3,26〜33の各機能は、上記文字列配置用プログラムを構成する各プログラムモジュールに規定される。また、出力文字列配置開始候補点記憶部5aは、例えば、上記のコンピュータに搭載された記憶装置の記憶領域上に構築される。記憶装置としては、ハードディスク装置、半導体メモリ、CDやDVD等の記憶メディアのドライブ装置等が挙げられる。
The character string
図41は、図40中の個体毎のコスト関数値算出部の構成を示すブロック図であり、図41(a)は、個体毎のコスト関数値算出部28の全体構成を示しており、図41(b)は、図41(a)中のシンボルと文字列の重複関数算出部34の構成を示している。図41(a)において、個体毎のコスト関数値算出部28は、文字列同士の重複関数算出部21a、道路リンク角度関数算出部22a、距離関数算出部23a、シンボルと文字列の重複関数算出部34、及び関数値足し合わせ部24aを備える。
また、図41(b)に示すように、シンボルと文字列の重複関数算出部34は、外接矩形作成部35、外接矩形とシンボルの重複判定部36、及び外接矩形とシンボルの重複関数算出部37を備える。41 is a block diagram showing the configuration of the cost function value calculation unit for each individual in FIG. 40, and FIG. 41 (a) shows the overall configuration of the cost function
As shown in FIG. 41 (b), the symbol / character string
文字列同士の重複関数算出部21aは、個体初期化部27で初期化された個体又は個体再作成部31で作成された個体の文字列配置開始候補点を起点としてそれぞれ配置した場合における文字列同士の重複を、当該文字列同士の重複を示す関数を用いて判定する構成部である。
道路リンク角度関数算出部22aは、文字列データから取得された文字列が沿う道路リンクがなす角度を示す関数Angle(i)の値を算出する構成部である。
距離関数算出部23aは、文字列データ取得部2で文字列データから取得された文字列の文字列配置開始点と、個体初期化部27で初期化された個体又は個体再作成部31で作成された個体の文字列配置開始候補点との距離を示す関数Dist(i)の値を算出する構成部である。
関数値足し合わせ部24aは、関数OverlapString(i)、関数Angle(i)、関数Dist(i)及び関数Overlapsymbol(i)を足し合わせてなるコスト関数f(i)の値を、個体初期化部27で初期化された個体又は個体再作成部31で作成された個体の文字列配置開始候補点にそれぞれ配置した文字列について算出し、当該コスト関数f(i)の値が最小となる個体とそのコスト関数値を決定する構成部である。関数値足し合わせ部24aに決定された最小コスト関数値の個体とそのコスト関数値は、コスト関数値最小個体保存部29に保存される。The duplication
The road link angle
The distance
Function value plus combined
シンボルと文字列の重複関数算出部34は、個体初期化部27で初期化された個体又は個体再作成部31で作成された個体の文字列配置開始候補点を起点としてそれぞれ配置した場合における文字列とシンボルとの重複を、文字列とシンボルの重複を示す関数を用いて判定する構成部である。
また、外接矩形作成部35は、処理対象の文字列が沿う道路リンクを介して当該文字列を構成する文字を2文字ずつ上向き配置及び下向き配置し、これら上向き配置及び下向き配置された4つの文字に外接する外接矩形を作成する構成部である。
外接矩形とシンボルの重複判定部36は、シンボルデータ取得部26でシンボルデータから取得された各シンボルと、外接矩形作成部35で作成された外接矩形との重複を判定する構成部である。
外接矩形とシンボルの重複関数算出部37は、外接矩形とシンボルの重複判定部36による重複判定で求められた外接矩形とシンボルの重複数を用いて、外接矩形とシンボルの重複関数Overlapsymbol(i)の値を算出する構成部である。The symbol and character string duplication
In addition, the circumscribed
The circumscribed rectangle and symbol overlap determining
The circumscribed rectangle and symbol
図42は、図40中の個体再作成部の構成を示すブロック図である。図42において、個体再作成部31は、個体順番付け部38及び再作成部39を備える。
個体順番付け部38は、個体初期化部27に初期化された個体、又は自身で前回作成した個体に対して、個体毎のコスト関数値算出部28で算出されたコスト関数値に応じた順番を付与する構成部である。
再作成部39は、個体順番付け部38で付与された順番及びこれに対応するコスト関数値を用いて決定した所定の選択確率で、体初期化部27に初期化された個体又は自身で前回作成した個体から文字列配置開始候補点を選択することにより、所定数の個体を再作成する構成部である。上記選択確率の算出方法は、図52を用いて後述する。42 is a block diagram showing the configuration of the individual re-creation unit in FIG. 42, the
The
The recreating
図43は、図40中の交叉部の構成を示すブロック図である。図43において、交叉部32は、交叉対象個体決定部40、2個体決定部41、交叉位置決定部42、及び2個体交叉部43を備える。
交叉対象個体決定部40は、個体再作成部31で作成された個体から所定の確率(交叉確率CROSSOVER)で、交叉処理を実行する対象である交叉対象個体を選択する構成部である。
2個体決定部41は、交叉対象個体決定部40で選択された交叉対象個体から、交叉処理を実行する個体を2つずつ決定する構成部である。
交叉位置決定部42は、2個体決定部41で決定された2個体のうち、交叉処理を実行する文字列配置開始候補点(個体中の交叉位置)を決定する構成部である。
2個体交叉部43は、2個体決定部41で決定された2個体間で、交叉位置決定部42で決定された交叉位置となる文字列配置開始候補点を入れ替える交叉処理を実行する構成部である。FIG. 43 is a block diagram showing the configuration of the crossing part in FIG. 43, the
The crossover target
The two-
The crossover
The two-
図44は、実施の形態2で扱われる個体の一例を示す図である。図44に示すように、個体とは、文字列配置開始候補点作成部3により文字列ごとに作成されて配置可能と判定された文字列配置開始候補点の組み合わせである。図44の例では、個体0は、文字列0の文字列配置開始候補点Q0,Q1のうちのQ0と、文字列1の文字列配置開始候補点Q5,Q6のうちのQ6とを組み合わせて構成される。
また、個体は、図44に示すように文字列配置開始候補点が原点に近い順に並べられたデータとなる。つまり、個体0は、文字列1の文字列配置開始候補点Q6より文字列0の文字列配置開始候補点Q0が原点に近いので、Q0,Q6の並びが規定されたデータとなる。FIG. 44 is a diagram illustrating an example of an individual handled in the second embodiment. As shown in FIG. 44, an individual is a combination of character string arrangement start candidate points that are created for each character string by the character string arrangement start candidate
Further, as shown in FIG. 44, the individual is data in which the character string arrangement start candidate points are arranged in the order close to the origin. That is, since the character string arrangement start candidate point Q0 of the
次に動作について説明する。
図45は、実施の形態2の文字列配置装置による動作の流れを示すフローチャートである。この図45に沿って、文字列配置開始候補点を取得する処理の概要を説明する。
先ず、文字列データ取得部2が、地図データベース等の外部記憶装置から文字列データを取得し、当該文字列データに含まれる全ての文字列と、それぞれの文字列に対応する道路リンク及び文字列配置開始点を抽出する(ステップST1h)。
次に、シンボルデータ取得部26が、地図データベース等の外部記憶装置からシンボルデータを取得し、当該シンボルデータに含まれる全てのシンボル及びその配置位置を抽出する(ステップST2h)。Next, the operation will be described.
FIG. 45 is a flowchart showing a flow of operations performed by the character string arrangement device according to the second embodiment. The outline of the process of acquiring the character string arrangement start candidate point will be described with reference to FIG.
First, the character string
Next, the symbol
なお、以降では、文字列データ取得部2によって文字列データから文字列0と文字列1の2つの文字列が取得されたものとし、文字列0と文字列1、これらにそれぞれ対応する道路リンク及び文字列配置開始点は、下記のように規定されているものとして説明する。
図46は、文字列0と文字列1が沿う道路リンク、文字列配置開始点及びシンボル位置の関係の一例を示す図であり、地図の向きが北(ノースアップ)である地図画面において東西方向をx軸、南北方向をy軸とした二次元座標系を設定している。
文字列0が沿う道路リンクは、ノードA(0,20)、ノードB(10,20)、ノードC(10,10)及びノードD(30,10)を、それぞれリンク(図46中に破線で示すリンク)で結んで構成される。また、文字列データに予め設定された文字列0の文字列配置開始点はI(12,10)であるものとする。
また、文字列1が沿う道路リンクは、ノードE(30,0)、ノードD(30,10)及びノードF(30,30)を、それぞれリンク(図46中に実線で示すリンク)で結んで構成される。文字列データに予め設定された文字列1の文字列配置開始点はJ(30,12)であるものとする。In the following, it is assumed that the character string
FIG. 46 is a diagram showing an example of the relationship between the road link along the
The road links along which the
In addition, the road links along the
また、文字列0に含まれる“文”、“字”、“列”、“0”の各文字は、縦幅が5で横幅が3であり、文字列1に含まれる“文”、“字”、“列”、“1”の各文字についても同様に縦幅が5で横幅が3であるものとする。
上記の道路リンクと文字列0及び文字列1の各文字との間隔RCgapは“3”、文字と文字の間隔CCgapは“√2(2の平方根)”であるものとする。Each of the characters “sentence”, “character”, “column”, and “0” included in the
It is assumed that the distance RCgap between the road link and each character of the
さらに、文字列配置開始候補点作成部3が、文字列ごとに作成する文字列配置開始候補点の候補点数PATTERN_NUMは5個であり、文字列の各文字を配置する文字配置候補点の間隔DIF_CAND_POINTは“2”であるものとし、文字列同士の重複数に関する閾値OverlapStringThresholdが“5”であるものとする。Furthermore, the character string arrangement start candidate
後述するコスト関数値を算出する際のパラメータα1,α2,α3,α4は全て“1”とする。文字列配置装置1Aとして機能するコンピュータによって処理可能な上述の間隔RCgap,CCgap,DIF_CAND_POINT等の最大値は“MAX”とする。Parameters α 1 , α 2 , α 3 , and α 4 when calculating cost function values to be described later are all set to “1”. The maximum values such as the above-mentioned intervals RCgap, CCgap, and DIF_CAND_POINT that can be processed by the computer functioning as the character
シンボルデータ取得部26によってシンボルデータからシンボル0とシンボル1の2つのシンボルが取得されたものとし、シンボル0の配置位置を、図46中のK(5,20)とし、シンボル1の配置位置をL(30,24)とする。
また、個体初期化部27及び個体再作成部31によって作成される個体の数POPULATION_SIZEを“3”とし、交叉部32で交叉対象の個体として選択する交叉確率CROSSOVERを60%とし、突然変異部33で突然変異処理として文字列配置開始候補点を変換する個体を選択する突然変異確率MUTATIONを5%する。
さらに、収束判定部30で収束判定に利用するCONVERGENCE_CONTINUOUSを“5”とし、CONVERGENCE_RATEを50%とする。
なお、上述した各パラメータ及び確率の値は、文字列データに文字列ごとに予め設定されているものとする。Assume that two symbols,
Further, the number of individuals POPULATION_SIZE created by the
Further, CONVERGENCE_CONTINUOUS used for convergence determination by the
Note that the above-described parameters and probability values are set in advance in the character string data for each character string.
文字列配置開始候補点作成部3は、文字列データ取得部2によって取得された各文字列がそれぞれ沿う道路リンクにおける文字列配置開始候補点を作成する(ステップST3h)。このとき、文字列配置開始候補点作成部3によって、各文字列の文字ごとに文字列配置開始候補点での配置可否が判定される。文字列配置開始候補点の作成及びその配置可否の判定方法は、上記実施の形態1と同様である。この場合、上記実施の形態1と同様に、文字列0の文字列配置開始候補点Q0,Q1と、文字列1の文字列配置開始候補点Q5,Q6が作成される。
The character string arrangement start candidate
次に、個体初期化部27が、文字列配置開始候補点作成部3で作成されて配置可能と判定された文字列配置開始候補点から、POPULATION_SIZE個の文字列配置開始候補点の組み合わせ(個体)を作成する、いわゆる個体の初期化を実施する(ステップST4h)。ここでは、文字列配置開始候補点作成部3で作成された文字列配置開始候補点から、文字列ごとに文字列配置開始候補点を等確率に選択して、最初に処理する個体を決定する。上述した前提として仮定した条件では、文字列0の文字列配置開始候補点としてQ0,Q1が作成され、文字列1の文字列配置開始候補点としてQ5,Q6が作成されているので、文字列毎に文字列配置開始候補点を等確率に選択すると、図47に示す個体0〜2が作成される。
Next, the
個体毎のコスト関数値算出部28は、下記式(13)に従って、個体毎の文字列配置開始候補点を起点として、上向き配置した文字列と下向き配置した文字列とのペアにおける重複、隣り合う道路リンク同士の角度に応じた変形、文字列データ取得部2により文字列データから取得された文字列配置開始点と文字列配置開始候補点との距離、シンボルと文字列との重複をそれぞれ示す各関数を含むコスト関数をそれぞれ算出し、当該コスト関数値が最小となる個体とそのコスト関数値を算出する(ステップST5h)。コスト関数値最小個体保存部29は、個体毎のコスト関数値算出部28にて算出されたコスト関数値の最小値及びその個体を保存する(ステップST6h)。
なお、下記式(13)中のパラメータiは、文字列のインデックス番号を示しており、OverlapString(i)、Angle(i)、Dist(i)、α1,α2,α3は、全て上記式(8)と同様の関数、変数であるものとする。
また、OverlapString(i)は、文字列とシンボルの重複を示す関数であり、α4は、関数Overlapsymbol(i)の値を調整するパラメータである。
ただし、f’(i)=α1OverlapString(i)+α2Angle(i)+α3Dist(i)+α4Overlapsymbol(i)である。
f’=Σ[i]f’(i) ・・・(13)The cost function
Note that the parameter i in the following formula (13) indicates the index number of the character string, and Over String (i), Angle (i), Dist (i), α 1 , α 2 , α 3 are all It is assumed that the functions and variables are the same as those in the above equation (8).
Overlap String (i) is a function indicating the overlap of character strings and symbols, and α 4 is a parameter for adjusting the value of the function Over symbol (i).
Where f ′ (i) = α 1 Overlap String (i) + α 2 Angle (i) + α 3 Dist (i) + α 4 Overlap symbol (i).
f ′ = Σ [i] f ′ (i) (13)
次に、収束判定部30が、コスト関数値最小個体保存部29に保存されている個体毎のコスト関数値の最小値が一定に収束したか否かを判定する(ステップST7h)。
収束判定の方法としては、コスト関数値最小個体保存部29に保存されている個体が、CONVERGENCE_CONTINUOUS回だけ変化しない場合、もしくは、コスト関数値最小個体保存部29に保存されている個体におけるCONVERGENCE_RATE%以上の個体が同じコスト関数値である場合は、コスト関数値の最小値に収束ありと判定する。また、これ以外の場合には、収束なしと判定する。
ここで、収束ありと判定された場合(ステップST7h;YES)、処理を終了する。
また、収束なしと判定された場合(ステップST7h;NO)には、ステップST8hの処理へ進む。Next, the
As a method of convergence determination, when the individual stored in the cost function value minimum
If it is determined that there is convergence (step ST7h; YES), the process ends.
If it is determined that there is no convergence (step ST7h; NO), the process proceeds to step ST8h.
ステップST8hにおいて、個体再作成部31が、個体初期化部27に初期化された個体、又は自身で前回作成した個体から、所定の選択確率で文字列配置開始候補点を選択することにより、所定数の個体を再作成する。個体再作成の方法は、先ず、個体の選択確率を下記式(17)から算出する。
下記式(17)のうち、lは各個体を特定するためのインデックス番号であり、glは個体順番付け部38により順番付けされた個体のコスト関数値の相対的な大きさである。また、Selection_problは、新たな個体として個体lが選択される確率を示している。
In step ST8h, the
In the following formula (17), l is an index number for specifying each individual, and g l is the relative size of the cost function values of the individuals ordered by the
次に、交叉部32が、個体再作成部31で作成された個体から所定の交叉確率CROSSOVERで選択した複数の交叉対象の個体から2つずつ個体をさらに選択し、選択した個体間で文字列配置開始候補点の組み合わせの一部を入れ替える交叉処理を実行する(ステップST9h)。
次いで、突然変異部33が、個体再作成部31で作成された個体及び交叉部32で交叉処理が実行された個体の文字列配置開始候補点を、所定の突然変異確率Mutationで、これら個体に登録されている文字列配置開始候補点のうちから選択した別の文字列配置開始候補点に変換する(ステップST10h)。別の文字列配置開始候補点が、複数ある場合には、その中から等確率に1つを選択する。Next, the
Next, the
この後、個体毎のコスト関数値算出部28が、収束判定部30によって収束なしと判定されており、かつ上述までの処理を所定の反復回数だけ実行したか否かを判定する(ステップST11h)。ここで、収束判定部30によって収束なしと判定されているが、上述までの処理を所定の反復回数だけ実行したと判定される場合(ステップST11h;YES)には、処理を終了する。
また、収束判定部30に収束なしと判定されており、かつ上述までの処理を実行した回数が所定の反復回数に満たないと判定された場合(ステップST11h;NO)、個体毎のコスト関数値算出部28は、個体再作成部31で作成された個体、交叉部32で交叉処理が実行された個体、及び突然変異部33での処理が施された個体を入力して、ステップST5h以降の処理を繰り返す。Thereafter, the cost function
Further, when it is determined that the
(1A)個体毎のコスト関数値の算出処理
図48は、個体毎のコスト関数値の算出処理の流れを示すフローチャートであり、図45中のステップST5hの処理の詳細を示している。
ここで、コスト関数値を算出する対象となる各個体を0から個体数までの値をとり得るインデックス番号nbの個体(nb)で表現する。
また、個体(nb)に対応する道路リンクに沿う各文字列を、0から文字列数までの値をとり得るインデックス番号iの文字列(i)で表現する。(1A) Cost Function Value Calculation Processing for Each Individual FIG. 48 is a flowchart showing the flow of cost function value calculation processing for each individual, and shows details of processing in step ST5h in FIG.
Here, each individual for which a cost function value is calculated is represented by an individual (nb) having an index number nb that can take a value from 0 to the number of individuals.
Also, each character string along the road link corresponding to the individual (nb) is represented by a character string (i) with an index number i that can take a value from 0 to the number of character strings.
文字同士の重複関数算出部21aは、nb=0の個体(0)に対応する文字列(i)のうち、i=0の文字列(0)から順に以降の処理を実施する(ステップST1i)。
先ず、文字同士の重複関数算出部21aは、個体(nb)に対応する文字列(i)について、文字列同士の重複を示す関数OverlapString(i)の値を算出する(ステップST2i)。関数OverlapString(i)の値の算出方法は、上記実施の形態1の文字同士の重複関数算出部21と同様である。
図47に示した個体0、個体1、個体2では、図49の(a)欄に示すように、個体0において文字列0と文字列1で0、個体1において文字列0と文字列1で40、個体2においても文字列0と文字列1で40となる。The character overlap
First, the character overlap
In the individual 0, the
次に、道路リンク角度関数算出部22aが、個体(nb)に対応する文字列(i)について、文字列(i)が沿う道路リンクの角度を示す関数Angle(i)の値を算出する(ステップST3i)。関数Angle(i)の値の算出方法は、上記実施の形態1の道路リンク角度関数算出部22と同様である。
図47に示した個体0、個体1、個体2では、図49の(b)欄に示すように、個体0において文字列0で50、文字列1で0、個体1においても文字列0で50、文字列1で0、個体2においても文字列0で50、文字列1で0となる。Next, the road link angle
In the individual 0,
次いで、距離関数算出部23aが、個体(nb)における各文字列配置開始候補点と、文字列データ取得部2によって文字列データから取得された文字列(i)の文字列配置開始点との距離を示す関数Dist(i)の値を算出する(ステップST4i)。関数Dist(i)の値の算出方法は、上記実施の形態1の距離関数算出部23と同様である。
図47に示した個体0、個体1、個体2では、図49の(c)欄に示すように、個体0において文字列0で√244、文字列1で12、個体1において文字列0で√116、文字列1で6、個体2において文字列0で√116、文字列1で12となる。Next, the distance
In the individual 0, the
この後、シンボルと文字列の重複関数算出部34が、個体(nb)に対応する文字列(i)とシンボルとの重複を示す関数値を算出する(ステップST5i)。この処理の詳細は、図50を用いて後述する。
ステップST6iにおいて、文字列同士の重複関数算出部21a、道路リンク角度関数算出部22a、距離関数算出部23a及びシンボルと文字列の重複関数算出部34は、個体(nb)に対応する全ての文字列(i)について処理したか否かを判定する。
ここで、未実施の文字列(i)があれば(ステップST6i;YES)、インデックス番号iが+1加算されて(ステップST7i)、次の文字列について、ステップST2i以降の処理が繰り返される。Thereafter, the symbol and character string overlap
In step ST6i, the duplication
If there is an unexecuted character string (i) (step ST6i; YES), the index number i is incremented by +1 (step ST7i), and the processing after step ST2i is repeated for the next character string.
未実施の文字列(i)がなくなれば(ステップST6i;NO)、文字列同士の重複関数算出部21a、道路リンク角度関数算出部22a、距離関数算出部23a及びシンボルと文字列の重複関数算出部34は、全ての個体(nb)について処理したか否かを判定する(ステップST8i)。ここで、未実施の個体(nb)があれば(ステップST8i;YES)、インデックス番号nbが+1加算されて(ステップST9i)、次の個体について、ステップST2i以降の処理が繰り返される。未実施の個体(nb)がなければ(ステップST8i;NO)、処理を終了する。
If there is no unexecuted character string (i) (step ST6i; NO), the character string overlap
(1A−1)シンボルと文字列の重複関数値の算出処理
図50は、シンボルと文字列の重複関数値の算出処理の流れを示すフローチャートであり、図48中のステップST5iの処理の詳細を示している。
個体(nb)に対応する各文字列を、0から文字列数までの値をとり得るインデックス番号iの文字列(i)で表現する。
また、上向き配置及び下向き配置した文字列(i)中の各2文字からなる外接矩形を、0から文字列(i)の文字数−1までの値をとり得るインデックス番号ncの外接矩形(nc)で表現する。
さらに、重複度合いを計算する対象となる各シンボルを、0からシンボルの数までの値をとり得るインデックス番号kaのシンボル(ka)で表現する。
さらに、シンボルと文字列の重複関数算出部34は、文字列と重複するシンボルの数をカウントするカウンタを有し、カウンタの値をパラメータcountで表す。(1A-1) Symbol and Character String Duplicate Function Value Calculation Processing FIG. 50 is a flowchart showing the flow of symbol and character string overlap function value calculation processing. The details of the processing of step ST5i in FIG. Show.
Each character string corresponding to the individual (nb) is represented by a character string (i) having an index number i that can take a value from 0 to the number of character strings.
Further, a circumscribed rectangle consisting of two characters in each of the upwardly arranged and downwardly arranged character strings (i) is represented by a circumscribed rectangle (nc) having an index number nc that can take a value from 0 to the number of characters −1 of the character string (i). It expresses with.
Further, each symbol for which the degree of overlap is calculated is represented by a symbol (ka) having an index number ka that can take a value from 0 to the number of symbols.
Furthermore, the symbol and character string
先ず、シンボルと文字列の重複関数算出部34が、nb=0の個体(0)に対応する文字列のうち、i=0の文字列(0)から順に以降の処理を実施する(ステップST1j)。このとき、カウンタの初期値としてcount=0を設定し、nc=0を設定する。
次に、外接矩形作成部31が、個体(0)に対応する道路リンクに沿って文字列(0)を上向き配置する(ステップST2j)。続いて、外接矩形作成部31は、当該道路リンクに沿って文字列(0)を下向き配置する(ステップST3j)。これにより、上記実施の形態1において、図32で示したような配置となる。First, the symbol and character string overlap
Next, the circumscribed
次いで、外接矩形作成部31は、上向き配置及び下向き配置した文字列(i)中の左側の2文字をそれぞれ特定し、これら4つの文字に外接する外接矩形(nc)を作成する(ステップST4j)。図32で示した配置の場合は、図51に示すように、上向き配置及び下向き配置された文字列0の初めの各2文字から、頂点が、T0(0,12)、T1(0,28)、T2(9,28)、T3(9,12)である外接矩形0(nc=0)が作成される。なお、図51において、外接矩形A3が道路リンクbを境に上向き配置及び下向き配置した文字列1の各文字の外接矩形であり、外接矩形B3が道路リンクaを境に上向き配置及び下向き配置した文字列0の各文字の外接矩形である。また、図51に示すK位置のシンボルがシンボル0であり、L位置のシンボルがシンボル1である。図45中のステップST2hの説明で述べたように、シンボル0はK(5,20)に位置し、シンボル1はL(30,24)に位置するものとする。
Next, the circumscribed
この後、外接矩形とシンボルの重複判定部36が、外接矩形(nc)とシンボル(ka)との重複があるか否かを判定する(ステップST5j)。ここでは、先ず、外接矩形とシンボルの重複判定部36が、下記式(14)に示すoverlap1〜overlap4を算出する。なお、下記式(14)中の(xrect TopLeft,yrect TopLeft)は、外接矩形(nc)の左上座標、(xrect BottomLeft,yrect BottomLeft)は、外接矩形(nc)の左下座標、(xrect BottomRight,yrect BottomRight)は、外接矩形(nc)の右下座標、(xrect TopRight,yrect TopRight)は、外接矩形(nc)の右上座標を示している。また、(xsymbol,ysymbol)は、シンボルの座標を示している。
Thereafter, the circumscribed rectangle and symbol overlap determining
続いて、外接矩形とシンボルの重複判定部36は、上記のoverlap1〜overlap4が、下記式(15)を満たす場合には重複ありと判定し、そうでない場合は重複なしと判定する。図51に示した例の場合、overlap1=80、overlap2=72、overlap3=64、overlap4=72となり、下記式(15)を満たす。このため、外接矩形0(nc=0)とシンボル0(ka=0、シンボル(0))とは重複ありと判定される。
overlap1>0&overlap2>0&overlap3>0&overlap4>0 ・・・(15)Subsequently, the circumscribed rectangle and symbol overlap
overlap1> 0 &overlap2> 0 &overlap3> 0 &overlap4> 0 (15)
外接矩形(nc)とシンボル(ka)との重複がないと判定すると、外接矩形とシンボルの重複判定部36は、文字列(i)から作成できる全ての外接矩形(nc)について、上記の処理を実行したか否かを判定する(ステップST6j)。ここで、インデックス番号ncが文字列(i)の文字数−1に至らず、未処理の外接矩形(nc)があると判定される場合(ステップST6j;YES)には、インデックス番号ncが+1加算されて(ステップST7j)、ステップST4jに戻って、次の外接矩形とシンボルの重複が判定される。
If it is determined that there is no overlap between the circumscribed rectangle (nc) and the symbol (ka), the circumscribed rectangle and symbol overlap determining
一方、ステップST5jで外接矩形(nc)とシンボル(ka)との重複があると判定された場合、外接矩形とシンボルの重複判定部36は、文字列(i)と重複するシンボルの数のカウント値countを+1加算する(ステップST8j)。
インデックス番号ncが文字列(i)の文字数−1に至り、未処理の外接矩形(nc)がないと判定された場合(ステップST6j;NO)若しくはステップST8jの処理が完了すると、外接矩形とシンボルの重複判定部36は、全てのシンボル(ka)について上記の処理を実行したか否かを判定する(ステップST9j)。ここで、インデックス番号kaがシンボル数に至り、未処理のシンボル(ka)がないと判定された場合(ステップST9j;NO)、ステップST10jに進む。On the other hand, if it is determined in step ST5j that there is an overlap between the circumscribed rectangle (nc) and the symbol (ka), the circumscribed rectangle and symbol overlap determining
When the index number nc reaches the number of characters −1 of the character string (i) and it is determined that there is no unprocessed circumscribed rectangle (nc) (step ST6j; NO), or when the process of step ST8j is completed, the circumscribed rectangle and symbol The
また、インデックス番号kaがシンボル数に至らず、未処理のシンボル(ka)があると判定された場合(ステップST9j;YES)、インデックス番号kaが+1加算されて(ステップST11j)、ステップST4jに戻り、次のシンボルと文字列(i)の重複が判定される。このとき、図51に示す例では、文字列0とシンボル1(ka=1、シンボル(1))との重複が判定される。先ず、文字列0について上述と同様にして外接矩形0を作成し、外接矩形0とシンボル1との重複が判定される。この場合、シンボル1の座標がL(30,24)であることから、overlap1=480、overlap2=36、overlap3=−336、overlap4=108となり、上記式(15)を満たさない。このため、外接矩形0とシンボル1は重複なしと判定される。
When it is determined that the index number ka does not reach the number of symbols and there is an unprocessed symbol (ka) (step ST9j; YES), the index number ka is incremented by 1 (step ST11j), and the process returns to step ST4j. The overlap between the next symbol and the character string (i) is determined. At this time, in the example shown in FIG. 51, the overlap between the
上述の処理を繰り返して文字列0と重複するシンボルの数を求める。図51の場合は、文字列0と重複するシンボルはシンボル0のみである。文字列(i)と重複するシンボル(ka)の数を文字列とシンボルの重複数とする。従って、文字列0とシンボルの重複数は“1”となる。
この後、外接矩形とシンボルの重複関数算出部37は、下記式(16)を用いて、外接矩形とシンボルの重複関数を算出する(ステップST10j)。なお、下記式(16)中のoverlapsymbol数(i)は、文字列iとシンボルとの重複数を示している。図51の例では、overlapsymbol数(0)が1、overlapsymbol(0)が20となる。
if overlapsymbol数(i)≧OverlapsymbolThreshold
overlapsymbol(i)=100
else
overlapsymbol(i)
=overlapsymbol数(i)×100/(OverlapsymbolThreshold)
・・・(16)The number of symbols overlapping with the
Thereafter, the circumscribed rectangle / symbol overlap
if overlap symbol number (i) ≧ Overlap symbol Threshold
overlap symbol (i) = 100
else
overlap symbol (i)
= Overlap symbol number (i) × 100 / (Overlap symbol Threshold)
... (16)
上述のようにして、同様に、次の文字列、個体に対しても、文字列とシンボルの重複関数を計算する。これにより、図49の(d)欄に示すように、文字列0と文字列1のシンボルとのoverlapsymbol数は、個体0において文字列0で20、文字列1で0、個体1において文字列0で0、文字列1で20、個体2において文字列0で0、文字列1で0となる。In the same manner as described above, a duplication function of a character string and a symbol is calculated for the next character string and individual. As a result, as shown in the column (d) of FIG. 49, the overlap symbol number of the
この後、関数値足し合わせ部24aは、上記式(13)によるコスト関数の足し合わせをする。この場合、各個体のコスト関数fの値は、図49の(e)欄に示すように、個体0で82+√244、個体1で156+√116、個体2で142+√116となる。
コスト関数値最小個体保存部29は、各個体0〜2及びそのコスト関数fの値を保持しており、これらのうち、コスト関数fの値が最も低い個体と、そのコスト関数値を出力文字列配置開始候補点記憶部5aに格納する。上述の例では、個体0のコスト関数fの値が最も低いことから、個体0の文字列配置開始候補点Q0,Q5と、個体0のコスト関数値82+√244が出力文字列配置開始候補点記憶部5aに格納される。Thereafter, the function
The cost function value minimum
(2A)個体再作成処理
ここで、図45中のステップST8hの個体再作成処理について詳細に説明する。
先ず、個体順番付け部38が、コスト関数値最小個体保存部29に保存されている個体に対してコスト関数fの値が大きい順に順番付けする。
上述の例では、個体0のコスト関数fの値が82+√244、個体1のコスト関数fの値が156+√116、個体2のコスト関数fの値が142+√116であることから、個体0は3、個体1は2、個体3は1となる。(2A) Individual Re-creation Process Here, the individual re-creation process in step ST8h in FIG. 45 will be described in detail.
First, the
In the above example, the value of the cost function f of the individual 0 is 82 + √244, the value of the cost function f of the individual 1 is 156 + √116, and the value of the cost function f of the individual 2 is 142 + √116. Is 3,
次に、個体再作成部39が、上記式(17)に従ってPOPULATION_SIZE個の個体を再作成する。上述の例では、個体0の順番が3、個体1の順番が2、個体3の順番が1となることから、図49の(f)欄に示すように、選択確率Selection_probは、個体0で3/6、個体1で1/6、個体2で2/6となる。
以降の説明では、個体初期化部27によって作成された個体から、図49の(f)欄に示す選択確率で新たに個体を作成することで、例えば、図52に示すような個体が新たに作成されたものとする。なお、新たな個体は古い個体から確率的に文字列配置開始候補点を選択して作成されるため、必ずしも毎回、図52に示すような個体が作成されるとは限らない。Next, the
In the following description, by creating a new individual with the selection probability shown in the column (f) of FIG. 49 from the individual created by the
(3A)交叉処理
図53は、交叉処理の流れを示すフローチャートであり、図45中のステップST9hの処理の詳細を示している。交叉部32の構成については図43を参照する。また、個体初期化部27で作成された個体における交叉対象個体の数を0から交叉対象の個体数までの値をとり得るインデックス番号ndで表現する。
先ず、交叉対象個体決定部40が、個体初期化部27で作成された個体から、個体毎に交叉対象であるか否かを決定する(ステップST1k)。ここで、各個体は、CROSSOVER%の確率で交叉対象の個体(nd個)となり(ステップST2k)、100−CROSSOVER%の確率で交叉対象でない個体となる。
図45で述べた前提条件から交叉確率CROSSOVERが60%であるので、個体が交叉対象個体になる確率は60%であり、交叉対象個体にならない確率は40%である。これらの確率で交叉対象個体を選択した結果、個体0と個体2が交叉対象として選択されたものとする。つまり、nd=2である。(3A) Crossover Process FIG. 53 is a flowchart showing the flow of the crossover process, and shows details of the process of step ST9h in FIG. FIG. 43 is referred to for the configuration of the
First, the crossover target
Since the crossover probability CROSSOVER is 60% from the preconditions described in FIG. 45, the probability that an individual becomes a crossover target individual is 60%, and the probability that the individual does not become a crossover target individual is 40%. As a result of selecting the crossover target individuals with these probabilities, it is assumed that
次に、2個体決定部41が、交叉対象個体決定部40によって決定された交叉対象個体の中から、2つの個体を選択する(ステップST3k)。上述の例では、交叉対象個体が2つしかないので、個体0と個体2が選択される。
この後、交叉位置決定部42が、2個体決定部41で選択された2つの個体間での交叉数を決定する(ステップST4k)。ここでは、2つの個体間での交叉数として個体間で入れ替える文字列配置開始候補点(配置開始位置)を特定するので、便宜上交叉数を“交叉位置”と呼ぶ。
交叉位置の決定方法は、図44で示したように、個体は文字列配置開始候補点が原点に近い順に並べられたデータであるので、個体の1番目から(交叉対象の個体に登録されている文字列配置開始候補点の数−1)番目までの文字列配置開始候補点のうち、等確率に1つの文字列配置開始候補点を決定する。
上述の例では、個体0と個体2に登録されている文字列配置開始候補点はそれぞれ2個であるため、交叉位置は1となる。Next, the two-
Thereafter, the crossing
As shown in FIG. 44, the determination method of the crossover position is data in which the individual character string arrangement start candidate points are arranged in order from the origin, so that the individual is registered from the first individual (registered as the crossover target individual). The number of character string arrangement start candidate points is -1) One character string arrangement start candidate point is determined with equal probability among the first character string arrangement start candidate points.
In the above example, the number of character string arrangement start candidate points registered in the
次いで、2個体交叉部43が、交叉位置決定部42で決定された交叉位置から、2個体決定部41で選択された2つの個体間で文字列配置開始候補点を入れ替える、交叉処理を実行する(ステップST5k)。つまり、2つの個体の初めから交叉位置番目の文字列配置開始候補点を互いに入れ替える。上述の例では交叉位置が1であるので、個体0と個体2の1番目の文字列配置開始候補点が入れ替えられる。このようにすることで、図54に示すようになる。
Next, the two-
この後、交叉した個体を交叉対象個体から除外し(ステップST6k)、全ての交叉対象個体について交叉処理を実行するまで(ステップST7k)、ステップST3k以降の処理を繰り返す。上述の例では交叉対象個体は2個であるため、上述の交叉をした後に、処理を終了する。 Thereafter, the crossed individuals are excluded from the crossover target individuals (step ST6k), and the processes after step ST3k are repeated until the crossover processing is executed for all crossover target individuals (step ST7k). In the above example, since there are two crossing target individuals, the processing is ended after the above crossing.
(4A)突然変異処理
ここで、図45中のステップST10hの突然変異処理について詳細に説明する。
ステップST10hにおいて、突然変異部33は、一部の個体の文字列配置開始候補点を別の文字列配置開始候補点に変換する、いわゆる突然変異処理を実行する。
突然変異の方法は、個体に登録されている文字列配置開始候補点をMutation%の確率で別の文字列配置開始候補点に変換する。別の文字列配置開始候補点が複数ある場合は、その中から等確率に1つを選択する。
上述した例では、図55に示すように個体2の文字列0に対応する文字列配置開始候補点Q1を突然変異によって別の文字列配置開始候補点に変換する。個体0〜2において、文字列0に対応する文字列配置開始候補点は、Q1以外ではQ0のみであるため、個体1のQ1はQ0に変わる。(4A) Mutation Processing Here, the mutation processing in step ST10h in FIG. 45 will be described in detail.
In step ST10h, the
In the mutation method, a character string arrangement start candidate point registered in an individual is converted to another character string arrangement start candidate point with a probability of Mutation%. When there are a plurality of other character string arrangement start candidate points, one of them is selected with equal probability.
In the example described above, as shown in FIG. 55, the character string arrangement start candidate point Q1 corresponding to the
突然変異処理を施した後、上述と同様に、個体毎のコスト関数値算出部28が各個体のコスト関数を計算する。上述の例では、各個体のコスト関数fの値は、図56のようになる。コスト関数値最小個体保存部29にはコスト関数の値が最も低い個体が保存される。図56の例では、個体0、個体1が最もコスト関数値が低い個体である。この後、収束判定部30が収束しているか否かを判定する。上述の例では、3つの個体のうち、2つの個体が、コスト関数f値の最小値82+√244であるので収束ありと判定する。これにより、処理が終了する。
After performing the mutation process, the cost function
実施の形態2による文字列配置装置1Aが、画面上に文字列を配置する際、出力文字列配置開始候補点記憶部5aに保存された文字列配置開始候補点の組を用いることで、文字列同士の重複や文字列とシンボルの重複が少ない位置に文字列を配置することができる。上述の例では、文字列配置開始候補点の組{Q0,Q5}を文字列配置に用いる。
When the character
以上のように、この実施の形態2によれば、表示画面上に配置するシンボルのデータを取得するシンボルデータ取得部26を備え、個体毎のコスト関数値算出部28が、文字列配置開始候補点作成部3で作成された位置候補を起点として表示画面上の相対する方向で読みがそれぞれ順方向となるように文字列を配置し、各配置の文字列同士の位置関係及びシンボルデータ取得部26で取得されたシンボルと文字列の位置関係に基づいて、当該文字列の可読性に影響を与える因子(文字列同士の重複、道路リンクのなす角度、入力文字列配置開始点と文字列配置開始候補点との距離、及び文字列とシンボルとの重複)を評価するコスト関数値を算出する。
このように構成することで、文字列とシンボルの重複を示す関数を含んだコスト関数値が最小の文字列配置開始候補点を決定することができ、文字列同士の重複だけでなく、文字列とシンボルの重複も避けた位置に文字配置を変更することができる。
これにより、カーナビゲーションシステムのように自車位置の変化によって地図の向きが変わる場合であっても、画面中に文字列同士若しくは文字列とシンボルが重複して表示されることを抑制することができる。従って、文字列を容易に認識することができる。
また、最小のコスト関数値となる文字列配置開始候補点の組み合わせを決定する処理にGAを用いることにより、文字列数が多くなった場合に上記実施の形態1と比べて少ない計算量で文字配置の変更が可能となる。As described above, according to the second embodiment, the symbol
By configuring in this way, it is possible to determine the character string arrangement start candidate point having the smallest cost function value including the function indicating the duplication of the character string and the symbol, and not only the duplication of the character strings but also the character string The character layout can be changed to a position that avoids duplication of symbols.
As a result, even when the orientation of the map changes due to a change in the position of the vehicle as in a car navigation system, it is possible to suppress the display of overlapping character strings or character strings and symbols on the screen. it can. Therefore, the character string can be easily recognized.
In addition, by using GA for the process of determining the combination of character string arrangement start candidate points that will be the minimum cost function value, when the number of character strings increases, characters can be calculated with a smaller amount of computation than in the first embodiment. The arrangement can be changed.
上記実施の形態1及び上記実施の形態2では、文字列を道路に沿って配置する場合について説明したが、本願発明は、これに限定されるものではない。例えば、線状の地物の画像を示すリンク(線分)であれば、河川や鉄道の線路を示すリンクであってもよく、またある領域を区画する境界を示すリンクであっても適用することが可能である。
In the said
なお、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。 In the present invention, within the scope of the invention, any combination of the embodiments, or any modification of any component in each embodiment, or omission of any component in each embodiment is possible. .
この発明に係る文字列配置装置は、用意すべき情報量の増大を招くことなく、可読性を損なわずに文字列を表示画面に配置することができるので、カーナビゲーションシステムの地図表示画面上での文字列表示に好適である。 The character string arrangement device according to the present invention can arrange the character string on the display screen without deteriorating the readability without causing an increase in the amount of information to be prepared. Suitable for displaying character strings.
1,1A 文字列配置装置、2 文字列データ取得部、3 文字列配置開始候補点作成部、4 最小コスト関数値算出部、5,5a 出力文字列配置開始候補点記憶部、6 候補点作成部、7 文字列上向き配置部、8 文字列下向き配置部、9 候補点削除部、10a,10b 文字配置候補点作成部、11a,11b 開始文字配置候補点決定部、12a 上向き用文字配置順序決定部、13a 上向き用文字仮配置部、14a,14b 判定処理部、15a,15b 文字位置登録部、16b 下向き用文字配置順序決定部、17b 下向き用文字仮配置部、18 文字と道路の重複判定部、19 文字間隔判定部、20 文字同士の重複判定部、21,21a 文字列同士の重複関数算出部、22,22a 道路リンク角度関数算出部、23,23a 距離関数算出部、24,24a 関数値足し合わせ部、25a 文字列上向き配置部、25b 文字列下向き配置部、25c 文字列重複算出部、26 シンボルデータ取得部、27 個体初期化部、28 個体毎のコスト関数値算出部、29 コスト関数値最小個体保存部、30 収束判定部、31 個体再作成部、32 交叉部、33 突然変異部、34 シンボルと文字列の重複関数算出部、35 外接矩形作成部、36 外接矩形とシンボルの重複判定部、37 外接矩形とシンボルの重複関数算出部、38 個体順番付け部、39 再作成部、40 交叉対象個体決定部、41 2個体決定部、42 交叉位置決定部、43 2個体交叉部、100 表示画面、101 道路リンク、102,102a,102b 文字列、103,103a,103b,103A 文字列配置開始点。 DESCRIPTION OF SYMBOLS 1,1A Character string arrangement | positioning apparatus, 2 Character string data acquisition part, 3 Character string arrangement | positioning start candidate point preparation part, 4 Minimum cost function value calculation part, 5, 5a Output character string arrangement | positioning start candidate point memory | storage part, 6 Candidate point preparation Part, 7 character string upward placement part, 8 character string downward placement part, 9 candidate point deletion part, 10a, 10b character placement candidate point creation part, 11a, 11b start character placement candidate point determination part, 12a upward character placement order determination Part, 13a upward character temporary placement part, 14a, 14b determination processing part, 15a, 15b character position registration part, 16b downward character placement order determination part, 17b downward character temporary placement part, 18 character and road overlap judgment part 19 character interval determination unit, 20 character overlap determination unit, 21, 21a Character string overlap function calculation unit, 22, 22a Road link angle function calculation unit, 23, 23 Distance function calculation unit, 24, 24a Function value addition unit, 25a Character string upward arrangement unit, 25b Character string downward arrangement unit, 25c Character string overlap calculation unit, 26 Symbol data acquisition unit, 27 Individual initialization unit, 28 for each individual Cost function value calculation unit, 29 cost function value minimum individual storage unit, 30 convergence determination unit, 31 individual re-creation unit, 32 crossover unit, 33 mutation unit, 34 symbol and character string overlap function calculation unit, 35 circumscribed rectangle Creation unit, 36 circumscribed rectangle and symbol overlap determining unit, 37 circumscribed rectangle and symbol overlap function calculating unit, 38 individual ordering unit, 39 recreating unit, 40 crossover target individual determining unit, 412 individual determining unit, 42 crossover Position determining unit, 432 individual crossing unit, 100 display screen, 101 road link, 102, 102a, 102b character string, 103, 103a, 1 3b, 103A string arrangement starting point.
Claims (11)
前記文字列データ取得部によって取得された文字列の配置を開始する前記表示画面上の位置候補を作成する位置候補作成部と、
前記位置候補作成部で作成された位置候補を起点として前記表示画面上の相対する方向で読みがそれぞれ順方向となるように前記文字列を配置して、前記各配置の文字列同士の位置関係に基づいて、当該文字列の可読性に影響を与える因子を評価するコスト関数値を算出するコスト関数値算出部と、
前記コスト関数値が最小の位置候補を、前記文字列の配置開始位置を変更する際の位置候補として記憶する記憶部とを備えた文字列配置装置。A character string data acquisition unit for acquiring data of a character string to be arranged on the display screen;
A position candidate creation unit for creating a position candidate on the display screen for starting the arrangement of the character string acquired by the character string data acquisition unit;
Positioning the character strings so that readings are forward in opposite directions on the display screen starting from the position candidates created by the position candidate creation unit, and the positional relationship between the character strings of the respective positions A cost function value calculating unit that calculates a cost function value for evaluating a factor that affects the readability of the character string, based on
A character string arrangement device comprising: a storage unit that stores a position candidate having a minimum cost function value as a position candidate when the arrangement start position of the character string is changed.
前記コスト関数値算出部は、前記位置候補作成部で作成された位置候補を起点として、
前記線分群を境とした一方の側に前記表示画面上の一方向で読みが順方向となるように前記文字列を配置するとともに、前記線分群を境とした他方の側に前記表示画面上の前記一方向と相対する方向で読みが順方向となるように当該文字列を配置して、前記各配置の文字列同士の重複を示す関数、前記線分群の線分がなす角度を示す関数、及び当該文字列に設定された配置開始位置と前記位置候補との距離を示す関数の値をそれぞれ算出し、これらを足し合わせた値を、当該文字列の可読性に影響を与える因子を評価するコスト関数値として算出することを特徴とする請求項1記載の文字列配置装置。The position candidate creation unit creates a position candidate for starting the arrangement of the character string along a line segment group indicating a linear image displayed on the display screen,
The cost function value calculation unit starts from the position candidate created by the position candidate creation unit,
The character string is arranged on one side of the line segment group so that the reading is forward in one direction on the display screen, and on the other side of the line segment group on the display screen A function that indicates the overlap between the character strings in each of the arrangements, and a function that indicates the angle formed by the line segments of the line segment group. , And a function value indicating the distance between the arrangement start position set for the character string and the position candidate, respectively, and the sum of these values is used to evaluate a factor that affects the readability of the character string. The character string arrangement device according to claim 1, wherein the character string arrangement device is calculated as a cost function value.
前記コスト関数値算出部は、前記第1及び前記第2の文字列配置部で配置可と判定された位置候補を起点として前記コスト関数値を算出することを特徴とする請求項2記載の文字列配置装置。The position candidate creation unit temporarily arranges the characters in the character string in order so that reading is forward in one direction on the display screen on one side of the line segment group, starting from the position candidate. Then, from the positional relationship between the characters and the characters temporarily provisionally arranged, the first character string arrangement unit for determining whether or not the character string can be arranged for each character, and the other side with the line segment group as a boundary The characters of the character string are temporarily arranged in order so that the reading is in the forward direction in the direction opposite to the one direction on the display screen. A second character string arrangement unit that determines whether or not the character string can be arranged,
3. The character according to claim 2, wherein the cost function value calculation unit calculates the cost function value starting from a position candidate determined to be laid out by the first and second character string arrangement units. Column placement device.
前記コスト関数値算出部は、前記位置候補作成部で作成された位置候補を起点として前記表示画面上の相対する方向で読みがそれぞれ順方向となるように前記文字列を配置し、前記各配置の文字列同士の位置関係、及び前記シンボルデータ取得部で取得されたシンボルと前記文字列の位置関係に基づいて、当該文字列の可読性に影響を与える因子を評価するコスト関数値を算出することを特徴とする請求項1記載の文字列配置装置。A symbol data acquisition unit for acquiring data of symbols arranged on the display screen;
The cost function value calculating unit arranges the character strings so that readings are forward in opposite directions on the display screen starting from the position candidates created by the position candidate creating unit, Calculating a cost function value that evaluates a factor that affects the readability of the character string based on the positional relationship between the character strings and the positional relationship between the symbol acquired by the symbol data acquisition unit and the character string. The character string arrangement device according to claim 1.
前記再作成部で作成された組み合わせから、所定の交叉確率で交叉対象の組み合わせを選択し、選択した組み合わせ間で位置候補を入れ替える交叉を実行する交叉部と、
前記再作成部で作成された組み合わせ、及び前記交叉部で交叉が実行された組み合わせの位置候補を、所定の突然変異確率で、これらの組み合わせに登録されている位置候補のうちから選択した別の位置候補点に変換する突然変異部とをを備え、
前記コスト関数値算出部は、前記文字列ごとの位置候補の組み合わせのコスト関数値が最小に収束するまで、前記再作成部で作成された組み合わせ、前記交叉部で交叉が実行された組み合わせ、及び前記突然変異部での処理が実行された組み合わせのコスト関数値の算出を繰り返すことを特徴とする請求項6記載の文字列配置装置。For the combination of position candidates for each character string created by the position candidate creation unit, ordering is performed according to the size of the cost function value calculated by the cost function value calculation unit, and according to the order of the combination A re-creation unit that creates a new combination of the position candidates for which a cost function value is to be calculated based on the probability distribution created
From the combination created by the re-creation unit, a crossover unit that selects a crossover target combination with a predetermined crossover probability, and performs crossover to replace position candidates between the selected combinations;
The combination created by the re-creating unit and the position candidate of the combination subjected to the crossing by the crossing unit are selected from the position candidates registered in these combinations with a predetermined mutation probability. A mutation part for converting to a position candidate point,
The cost function value calculation unit is a combination created by the re-creation unit until the cost function value of the combination of position candidates for each character string converges to a minimum, a combination in which crossing is performed by the crossing unit, and The character string arrangement device according to claim 6, wherein the calculation of the cost function value of the combination in which the process in the mutation unit is executed is repeated.
前記コスト関数値算出部は、前記位置候補作成部で作成された位置候補を起点として、
前記線分群を境とした一方の側に前記表示画面上の一方向で読みが順方向となるように前記文字列を配置するとともに、前記線分群を境とした他方の側に前記表示画面上の前記一方向と相対する方向で読みが順方向となるように当該文字列を配置して、前記各配置の文字列同士の重複を示す関数、前記線分群の線分がなす角度を示す関数、当該文字列に設定された配置開始位置と前記位置候補との距離を示す関数、及びシンボルと当該文字列との重複を示す関数の値をそれぞれ算出し、これらを足し合わせた値を、当該文字列の可読性に影響を与える因子を評価するコスト関数値として算出することを特徴とする請求項5記載の文字列配置装置。The position candidate creation unit creates a position candidate for starting the arrangement of the character string along a line segment group indicating a linear image displayed on the display screen,
The cost function value calculation unit starts from the position candidate created by the position candidate creation unit,
The character string is arranged on one side of the line segment group so that the reading is forward in one direction on the display screen, and on the other side of the line segment group on the display screen A function that indicates the overlap between the character strings in each of the arrangements, and a function that indicates the angle formed by the line segments of the line segment group. , A function indicating the distance between the arrangement start position set in the character string and the position candidate, and a value of a function indicating the overlap between the symbol and the character string, respectively, and adding these values together, 6. The character string arrangement device according to claim 5, wherein a cost function value for evaluating a factor affecting the readability of the character string is calculated.
前記文字列データ取得部が、表示画面上に配置する文字列のデータを取得する文字列データ取得ステップと、
前記位置候補作成部が、前記文字列データ取得ステップで取得された文字列の配置を開始する前記表示画面上の位置候補を作成する位置候補作成ステップと、
前記コスト関数値算出部が、前記位置候補作成ステップで作成された位置候補を起点として前記表示画面上の相対する方向で読みがそれぞれ順方向となるように前記文字列を配置して、前記各配置の文字列同士の位置関係に基づいて、当該文字列の可読性に影響を与える因子を評価するコスト関数値を算出するコスト関数値算出ステップとを備え、
前記コスト関数値が最小の位置候補を、前記文字列の配置開始位置を変更する際の位置候補とすることを特徴とする文字列配置候補決定方法。In the character string arrangement position candidate determination method of the character string arrangement device including the character string data acquisition unit, the position candidate creation unit, and the cost function value calculation unit,
The character string data obtaining unit obtains character string data to be arranged on the display screen;
The position candidate creation unit creates a position candidate on the display screen for starting the arrangement of the character string acquired in the character string data acquisition step; and
The cost function value calculation unit arranges the character strings so that readings are forward in opposite directions on the display screen starting from the position candidates created in the position candidate creation step, A cost function value calculating step for calculating a cost function value for evaluating a factor that affects the readability of the character string based on the positional relationship between the character strings of the arrangement;
A method for determining a character string arrangement candidate, wherein the position candidate having the smallest cost function value is used as a position candidate for changing the arrangement start position of the character string.
前記文字列データ取得部によって取得された文字列の配置を開始する前記表示画面上の位置候補を作成する位置候補作成部、
前記位置候補作成部で作成された位置候補を起点として前記表示画面上の相対する方向で読みがそれぞれ順方向となるように前記文字列を配置して、前記各配置の文字列同士の位置関係に基づいて、当該文字列の可読性に影響を与える因子を評価するコスト関数値を算出するコスト関数値算出部、
前記コスト関数値が最小の位置候補を、前記文字列の配置開始位置を変更する際の位置候補として記憶する記憶部としてコンピュータを機能させるための文字列配置候補決定用プログラム。A character string data acquisition unit for acquiring data of a character string to be arranged on the display screen;
A position candidate creation unit for creating a position candidate on the display screen for starting arrangement of the character string acquired by the character string data acquisition unit;
Positioning the character strings so that readings are forward in opposite directions on the display screen starting from the position candidates created by the position candidate creation unit, and the positional relationship between the character strings of the respective positions A cost function value calculating unit that calculates a cost function value that evaluates a factor that affects the readability of the character string, based on
A character string arrangement candidate determination program for causing a computer to function as a storage unit that stores a position candidate having the smallest cost function value as a position candidate when changing the arrangement start position of the character string.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2010/007107 WO2012077158A1 (en) | 2010-12-07 | 2010-12-07 | Character string arrangement device, method for determining character string arrangement candidates, and program for determining character string arrangement candidates |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5253675B2 true JP5253675B2 (en) | 2013-07-31 |
JPWO2012077158A1 JPWO2012077158A1 (en) | 2014-05-19 |
Family
ID=46206682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012547598A Expired - Fee Related JP5253675B2 (en) | 2010-12-07 | 2010-12-07 | Character string arrangement device, character string arrangement candidate decision method, and character string arrangement candidate decision program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5253675B2 (en) |
WO (1) | WO2012077158A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114627745A (en) * | 2022-05-16 | 2022-06-14 | 成都航空职业技术学院 | Demonstration system for workshop planning |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0384416A (en) * | 1989-08-28 | 1991-04-10 | Matsushita Electric Ind Co Ltd | On-vehicle map display device |
JPH0456988A (en) * | 1990-06-26 | 1992-02-24 | Furuno Electric Co Ltd | In-figure character display device |
JPH0561927A (en) * | 1991-08-30 | 1993-03-12 | Mitsubishi Electric Corp | Automatic data arranging device |
JPH07244719A (en) * | 1994-03-02 | 1995-09-19 | Pioneer Electron Corp | Plotting area data generating method |
JPH0996540A (en) * | 1995-09-29 | 1997-04-08 | Nissan Motor Co Ltd | Path-guiding device for vehicle |
JP2005189004A (en) * | 2003-12-24 | 2005-07-14 | Aisin Aw Co Ltd | Navigation device |
JP2007156101A (en) * | 2005-12-05 | 2007-06-21 | Navitime Japan Co Ltd | Map display system, map display apparatus and map display method |
-
2010
- 2010-12-07 WO PCT/JP2010/007107 patent/WO2012077158A1/en active Application Filing
- 2010-12-07 JP JP2012547598A patent/JP5253675B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0384416A (en) * | 1989-08-28 | 1991-04-10 | Matsushita Electric Ind Co Ltd | On-vehicle map display device |
JPH0456988A (en) * | 1990-06-26 | 1992-02-24 | Furuno Electric Co Ltd | In-figure character display device |
JPH0561927A (en) * | 1991-08-30 | 1993-03-12 | Mitsubishi Electric Corp | Automatic data arranging device |
JPH07244719A (en) * | 1994-03-02 | 1995-09-19 | Pioneer Electron Corp | Plotting area data generating method |
JPH0996540A (en) * | 1995-09-29 | 1997-04-08 | Nissan Motor Co Ltd | Path-guiding device for vehicle |
JP2005189004A (en) * | 2003-12-24 | 2005-07-14 | Aisin Aw Co Ltd | Navigation device |
JP2007156101A (en) * | 2005-12-05 | 2007-06-21 | Navitime Japan Co Ltd | Map display system, map display apparatus and map display method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114627745A (en) * | 2022-05-16 | 2022-06-14 | 成都航空职业技术学院 | Demonstration system for workshop planning |
CN114627745B (en) * | 2022-05-16 | 2023-05-12 | 成都航空职业技术学院 | Demonstration system for workshop planning |
Also Published As
Publication number | Publication date |
---|---|
JPWO2012077158A1 (en) | 2014-05-19 |
WO2012077158A1 (en) | 2012-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102521884B (en) | Three-dimensional roof reconstruction method based on LiDAR data and ortho images | |
CN110220521B (en) | High-precision map generation method and device | |
CN101807308B (en) | Three-dimensional model segmenting device and method | |
KR101090925B1 (en) | methodology of GIS based accurate centerline map drawing support system using digital maps for stream and road | |
CN105550691B (en) | Adaptive mountain valley ridge line extracting method and system based on scale space | |
Feng | Algorithms for drawing clustered graphs | |
JP2011215874A (en) | Method, program and apparatus for aiding wiring design | |
JP2023002757A (en) | Method, device, and electronic apparatus for creating high precision map | |
JP6132033B2 (en) | Shape determination apparatus, shape determination program, and shape determination method | |
CN113724279A (en) | System, method, equipment and storage medium for automatically dividing traffic cells into road networks | |
Ficzere et al. | Time–space analysis of transport system using different mapping methods | |
CN110689598A (en) | Three-dimensional modeling method and system for multilayer road | |
Lan et al. | Integrating general principles into mixed-integer programming to optimize schematic network maps | |
JP5253675B2 (en) | Character string arrangement device, character string arrangement candidate decision method, and character string arrangement candidate decision program | |
JPH0561407A (en) | Figure processor | |
CN114997003B (en) | Multi-model fusion tunnel construction risk prediction method, system, device and medium | |
CN112379692B (en) | Method, device and equipment for determining unmanned aerial vehicle air route and storage medium | |
Vieth | Point cloud classification and segmentation of catenary systems | |
Bose et al. | Boundary labeling for rectangular diagrams | |
Sun et al. | DriveSceneGen: Generating Diverse and Realistic Driving Scenarios from Scratch | |
Galvão et al. | Route schematization with landmarks | |
Drozdzynski et al. | On constructing a base map for collaborative map generation and its application in urban mobility planning | |
Portnov | Research to justify the perspective use of individual coordinate systems for contiguous objects modelling with the case study of Moscow saints Petersburg railway | |
YIN et al. | Target Geometry Matching Threshold in Incremental Updatingof Road Networks Based on OSTU | |
JP5601588B2 (en) | Road information providing apparatus, road information providing program, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20130319 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130416 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5253675 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160426 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |