明 細 書
カード識別装置、カード識別方法、プログラム、ならびに、情報記録媒体 技術分野
[0001] 本発明は、タツチパネルに載せられたカードに設けられたスリットをタツチペン等の 指示体でなぞってカードの種類を識別する際に、カードの位置決めが容易なカード 識別装置、カード識別方法、これらをコンピュータにて実現するプログラムを記録した コンピュータ読取可能な情報記録媒体、ならびに、当該プログラムに関する。
背景技術
[0002] 従来から、トランプや花札などの現実のカードを用いたゲームを模したコンピュータ 用カードゲームの技術が提案されている。このようなコンピュータ用カードゲームの技 術は、たとえば以下の文献に開示されている。
特許文献 1:特開 2000— 157744
[0003] [特許文献 1]には、各種のカードを現実のカードとしてではなぐコンピュータによつ て表現される情報として表現することで、複雑なルールのカードゲームであっても、コ ンピュータにゲームの勝敗を判断させることで、初心者でも簡単にゲームを楽しめる ようにした技術が開示されている。
[0004] 一方で、現実のカードに対しては、カードに印刷されたバーコードを認識したり、力 ードに貼付された磁気テープに記録される情報を読み取ることでカードの種類を識 別する技術が提案されてレ、る。
[0005] しかしながら、バーコードリーダや磁気カード読取装置は一般に高価であり、携帯 ゲーム装置などに組み込むことができない場合も多い。一方で、携帯ゲーム装置な どの安価なハードウェアにおいても、タツチペンおよびタツチパネルにより、ペン入力 を可能としたものが提供されつつある。
発明の開示
発明が解決しょうとする課題
[0006] したがって、現実のカードの種類をコンピュータに識別させるために、安価なハード ウェアで、ユーザの操作負担を小さくし、簡易に入力ができるようにしたカードの識別
技術が強く求められている。
[0007] この際、カードにスリットを設けてタツチパネルに載せ、このスリットをタツチペン等の 指示体でなぞることでカードの種類を識別する手法が考えられる力 S、カードの大きさ は必ずしもタツチパネルの大きさに一致しないため、カードの位置決めを正確に行う 技休テも求められている。
[0008] 本発明は、上記のような課題を解決するもので、タツチパネルに載せられたカード に設けられたスリットをタツチペン等の指示体でなぞってカードの種類を識別する際 に、カードの位置決めが容易なカード識別装置、カード識別方法、これらをコンビュ ータにて実現するプログラムを記録したコンピュータ読取可能な情報記録媒体、なら びに、当該プログラムを提供することを目的とする。
課題を解決するための手段
[0009] 以上の目的を達成するため、本発明の原理にしたがって、下記の発明を開示する
[0010] 本発明の第 1の観点に係るカード識別装置は、複数のスリットを有するカードの種 類を識別するカード識別装置であって、タツチパネル部、画像表示部、基準スリット判 定部、スリット領域表示制御、値スリット同定部、カード識別部を備え、以下のように構 成すること力 Sでさる。
[0011] ここで、当該複数のスリットのうちの 1つのスリットは、非対称な所定の形状を有する 基準スリットであり、当該複数のスリットのうち当該基準スリット以外のスリットのそれぞ れは、当該基準スリットに対する相対位置があらかじめ定められた複数の最長スリット 領域のいずれかに重複なく含まれるように位置および長さが定められた値スリットであ り、当該複数の値スリットの位置および長さの組合せは、当該カードの種類に対応付 けられる。
[0012] すなわち、本発明にて識別されるカードには、複数のスリットが設けられており、そ の一つが基準スリット、残りが値スリットとなる。また、値スリットのそれぞれは、基準スリ ットに対して相対的に定められた複数の最長スリット領域のいずれかに割り当てられ、 その位置と長さとが、カードによって異なるものとする。
[0013] 基準スリットの形状としては、たとえば L字形などを採用することができる。最長スリツ
ト領域は所定の長さの線分(細い長方形)とし、値スリットの形状は、最長スリット領域 の一部をなす線分(細レ、長方形)とするのが典型的である。
[0014] そして、タツチパネル部は、当該カードのスリットをなぞるタツチペン等の指示体が接 触移動する軌跡の入力を受け付ける。
典型的には、ユーザは、タツチパネル部の表面にカードを載せて一方の手で固定 し、他方の手でタツチペンを操作して、スリットをタツチペンでなぞり、タツチパネルを 押圧操作して、接触させたまま移動させることによって、軌跡を入力する。入力される タツチペンの軌跡は、開始点、通過点、終了点の座標列によって表現することができ る。なお、指示体には、タツチペンのかわりに、指の爪、ヘアピン、楊枝などを用いて も良い。以下では理解を容易にするため、タツチペンを例示して説明する。
[0015] 一方、画像表示部は、タツチパネル部を透過して画像を表示する。
すなわち、タツチパネル部は透明もしくは半透明で、画像表示部の画像表示面に 貝占り付けられており、タツチパネル部を透力もて画像表示部に表示される画像が見え る。このように、タツチパネル部と画像表示部が一体化した構成は、タッチスクリーンと 呼ば'れることあある。
[0016] さらに、基準スリット判定部は、タツチパネル部により入力を受け付けられた軌跡力 当該基準スリットの形状にマッチするか否力、を判定する。
カードのスリットには、基準スリットとィ直スリットとが用意されている力 S、本発明では、ュ 一ザは、まず基準スリットをなぞる必要がある。すると、本装置は、タッチスクリーンに 対して重ねられたカードの位置や向きを判別し、以降の処理では、ここで判別された 位置や向きに基づいて、処理を行うのである。
[0017] さらに、基準スリット判定部によりマッチすると判定された場合、スリット領域表示制 御部は、画像表示部に、当該複数の最長スリット領域の形状を、入力を受け付けられ た当該基準スリットの形状にマッチする軌跡の位置を基準として、当該あらかじめ定 められた相対位置に表示させる。
[0018] 基準スリットの位置や向きが判明すれば、値スリットが含まれる最長スリット領域の位 置も決定すること力できる。したがって、最長スリット領域に相当する画像を画像表示 部に表示する。
[0019] ユーザは、この画像とカードの値スリットが重なっているときは、カードの固定がしつ 力、りしており、ずれていないことがわかる。また、この画像とカードの値スリットが重なつ ていないときは、入力の途中でカードの位置や向きがずれてしまったことがわかる。
[0020] さらに、タツチパネル部により入力を受け付けられた軌跡力 表示された複数の最 長スリット領域のいずれかに含まれる場合、値スリット同定部は、当該軌跡の位置およ び長さから、当該最長スリット領域に含まれる値スリットの位置および長さを同定する
[0021] すなわち、タツチパネルにおける軌跡の入力は、最長スリット領域に対するもののみ を処理の対象とし、それ以外の領域に軌跡が入力された場合は、当該入力は、値ス リットをなぞった入力とは解釈しないのである。この場合は、当該入力は、単純に無視 することとしても良いし、他の処理を開始する契機として扱っても良い。
[0022] さらに、表示された複数の最長スリット領域のすべてについて、当該最長スリット領 域に含まれる値スリットの位置および長さが同定された場合、カード識別部は、同定 された値スリットの位置および長さの組合せにより、当該カードの種類を識別する。
[0023] 上記のように、基準スリットの形状はカードの種類によらず共通であり、ィ直スリットの 位置および形状はカードの種類によって異なるから、各値スリットの位置および形状 がすべて同定されれば、そのカードの種類を取得することができるのである。
[0024] 本発明によれば、タツチパネルにカードを重ねてカードのスリットをなぞることによつ てカードを識別する場合に、当該カードの位置や姿勢の自由度を高くすることができ 、ユーザの好みの位置や姿勢でスリットを用いた入力ができるようになる。
[0025] また、本発明のカード識別装置は、以下のように構成することができる。すなわち、 当該カードのいずれにおいても、当該複数の値スリットのうち、いずれ力、 1つの値スリ ット(以下「主値スリット」という。)は、当該主値スリットを含むように位置および長さが 定められた最長スリット領域よりも長さが短ぐ当該複数の値スリットのうち、当該主値 スリット以外の値スリット(以下「副値スリット」という。)は、当該副値スリットを含むように 位置および長さが定められた最長スリット領域に長さが一致する。
[0026] たとえば、まんがのキャラクターの着せ替え遊びを行うようなカードを考える。カード は、(1)キャラクター本体のカード、(2)帽子のカード、(3)上半身のカード、(4)下半
身のカード、(5)靴のカードの 5種類に大分類することができる。本発明では、この 5 種類のそれぞれに対して、最長スリット領域を一つ割り当てる。したがって、値スリット の数は 5個となり、主値スリットは 1個、副値スリットは 4個となる。
[0027] たとえば、キャラクター本体のカードは、 1番目の値スリットが主値スリットであり、帽 子のカードは、 2番目の値スリットが主値スリットであり、……のように、カードの大分類 に応じて、何番目のスリットが主値スリットとなる力、、があらかじめ定められている。
[0028] そして、主値スリットの位置および長さは、最長スリット領域よりも小さくなつており、 それ以外の副値スリットは、最長スリット領域と同じ形になっている。
[0029] さらに、当該基準スリットに対して定められる相対的な位置が異なる最長スリット領 域に主値スリットを有する複数のカードが重ねられてタツチパネル部の表面に載せら れ、当該複数のカードの基準スリットおよび値スリットの共通部分が当該指示体によつ てなぞられて接触移動する軌跡の入力がタツチパネル部により受け付けられた場合 、値スリット同定部が主値スリットの位置および長さを同定するごとに、カード識別部 は、同定された主値スリットの位置および長さにより、当該複数のカードのうち、当該 主値スリットを有するカードの種類を識別する。
[0030] 異なる分類のカードを複数枚重ねて着せ替えを完成させると、 1番目の値スリットを なぞれば、その位置および長さによってただちにキャラクター本体のカードの種類が 判明し、 2番目の値スリットをなぞれば、その位置および長さによってただちに頭飾り のカードの種類が判明し、……のように、値スリット 1つをなぞるだけで、当該値スリット に対する最長スリット領域に対応付けられた大分類のカードの種類が判明するので ある。
[0031] 本発明によれば、複数のカードを重ねてその値スリットの共通部分をなぞる場合に 、値スリットの位置および長さに制限を課すことによって、 1つの値スリットをなぞるだ けで、重ねられたカードのうちの 1枚の種類がただちに判明し、簡易で軽快なカード の識另を fiうこと力 Sできるようになる。
[0032] また、本発明のカード識別装置は、消去部をさらに備え、基準スリット判定部により マッチすると判定された場合、消去部は、値スリット同定部により値スリットの位置およ び長さが同定されていれば、当該同定された値スリットの位置および長さを消去する
ように構成することカでさる。
[0033] 入力途中でカードがずれていることに気付いたり、スリットの全長をなぞらずに途中 でペンを離してしまったことに気付いた場合には、入力をやり直したいことがある。本 発明では、もう一度基準スリットをなぞると、入力のやり直しが始まるようにするもので ある。このようにすると、基準スリットの位置がもう一度判定され、新たに判定された位 置に基づいて、最長スリット領域の形状を表す画像が再描画されることになる。
[0034] 本発明によれば、ユーザは、基準スリットをタツチペンでなぞり直すことによって、ス リットの再入力を開始する旨を指示することができ、ユーザは、簡易な操作で容易に 入力のやり直しを fiうことができるようになる。
[0035] また、本発明のカード識別装置は、入力済スリット表示制御部をさらに備え、入力済 スリット表示制御部は、当該値スリットの位置および長さが同定されるごとに、画像表 示部に、当該最長スリット領域のうち、当該同定された値スリットの位置および長さの 形状を、当該基準スリットの形状にマッチする軌跡の位置を基準として表示させるよう に構成することができる。
[0036] すなわち、すでにユーザによってなぞられた値スリットには、同定された位置および 長さの形状を表示することによって、当該値スリットは入力済みである旨が提示される のである。たとえば、最長スリット領域の形状を表示する色と、同定された値スリットの 位置および長さの形状表示する色と、を、異なるものとするなど、両者を異なる体裁で 表示することが望ましい。
[0037] 本発明によれば、ユーザは、過去になぞった値スリットの位置および形状が望み通 りに同定されているか否かを確認しながら入力することができるとともに、まだなぞつ て!/、な!/、値スリットが!/、ずれであるかを簡単に判別することができ、容易に入力を行う ことカでさるようになる。
[0038] また、本発明のカード識別装置において、当該複数の最長スリット領域には、当該 基準スリットの形状にマッチされた後に入力を受け付ける順序があらかじめ定められ 、スリット領域表示制御部は、当該定められた順序により、次に軌跡の入力を受け付 けて値スリットの位置および形状を同定すべき最長スリット領域の形状を強調表示す るように構成することカでさる。
[0039] たとえば、上記のカードの大分類(1)〜(5)の順に入力することが定められている 場合には、基準スリットがなぞられた後は値スリット(1 )の最長スリット領域が強調表示 され、値スリット(1 )がなぞられた後は値スリット(2)の最長スリット領域が強調表示さ れ、……のように、ユーザに入力すべき順序を提示するのである。
[0040] 本発明によれば、ユーザは、スリットをなぞるべき順序を簡易に判別することができ 、入力忘れなどのミスを防止することができるようになる。
[0041] また、本発明のカード識別装置は、警告出力部をさらに備え、警告出力部は、入力 を受け付けられた軌跡が表示された複数の最長スリット領域のいずれにも含まれない 場合、警告メッセージを出力するように構成すること力できる。
[0042] まず、基準スリットの位置が判別できなければ、最長スリット領域は表示されないの で、その旨の警告メッセージが出力される。また、カードがずれた場合などには、最長 スリット領域とは異なる場所がタツチペンでなぞられることとなるので、その旨の警告メ ッセージが出力される。
[0043] 警告メッセージは、典型的にはブザー音や警告音などで出力されるが、タツチスタリ ーンの他に表示画面が存在する場合には、当該他の表示画面に警告メッセージを 表示することとしても良い。また、最長スリット領域の形状を点滅させて表示したり、色 を変更して表示することによって警告メッセージとしても良レ、。
[0044] 本発明によれば、ユーザ力 Sスリットをなぞる操作が失敗した旨を、ユーザにわかりや すく提示することカでさるようになる。
[0045] 本発明のその他の観点に係るカード識別方法は、複数のスリットを有するカードの 種類を識別し、タツチパネル工程、基準スリット判定工程、スリット領域表示制御工程 、値スリット同定工程、カード識別工程を備え、以下のように構成する。
[0046] ここで、当該カード識別方法は、タツチパネル部、タツチパネル部を透過して画像を 表示する画像表示部、基準スリット判定部、スリット領域表示制御部、値スリット同定 部、カード識別部を有するカード識別装置にて実行されるのが典型的である。以下こ れを例にあげて説明する。
[0047] まず、当該複数のスリットのうちの 1つのスリットは、非対称な所定の形状を有する基 準スリットであり、当該複数のスリットのうち当該基準スリット以外のスリットのそれぞれ
は、当該基準スリットに対する相対位置があらかじめ定められた複数の最長スリット領 域のいずれかに重複なく含まれるように位置および長さが定められた値スリットであり 、当該複数の値スリットの位置および長さの組合せは、当該カードの種類に対応付け られる。
[0048] さらに、タツチパネル工程では、タツチパネル部力 タツチパネル部の表面に載せら れた当該カードのスリットをなぞる指示体が接触移動する軌跡の入力を受け付ける。
[0049] そして、基準スリット判定工程では、基準スリット判定部が、タツチパネル工程にて入 力を受け付けられた軌跡力 当該基準スリットの形状にマッチするか否かを判定する
[0050] 一方、基準スリット判定工程によりマッチすると判定された場合、スリット領域表示制 御工程では、スリット領域表示制御部が、画像表示部に、当該複数の最長スリット領 域の形状を、入力を受け付けられた当該基準スリットの形状にマッチする軌跡の位置 を基準として、当該あらかじめ定められた相対位置に表示させる。
[0051] さらに、タツチパネル工程にて入力を受け付けられた軌跡力 表示された複数の最 長スリット領域のいずれかに含まれる場合、値スリット同定工程では、値スリット同定部 1S 当該軌跡の位置および長さから、当該最長スリット領域に含まれる値スリットの位 置および長さを同定する。
[0052] そして、表示された複数の最長スリット領域のすべてについて、当該最長スリット領 域に含まれる値スリットの位置および長さが同定された場合、カード識別工程では、 カード識別部力 同定された値スリットの位置および長さの組合せにより、当該カード の種類を識別する。
[0053] 本発明のその他の観点に係るプログラムは、コンピュータを上記のカード識別装置 として機能させ、コンピュータに上記のカード識別方法を実行させるように構成する。
[0054] また、本発明のプログラムは、コンパクトディスク、フレキシブルディスク、ハードディ スク、光磁気ディスク、ディジタルビデオディスク、磁気テープ、半導体メモリ等のコン ピュータ読取可能な情報記憶媒体に記録することができる。
[0055] 上記プログラムは、プログラムが実行されるコンピュータとは独立して、コンピュータ 通信網を介して配布 ·販売することができる。また、上記情報記憶媒体は、コンビユー
タとは独立して配布 ·販売することができる。
発明の効果
[0056] 本発明によれば、タツチパネルに載せられたカードに設けられたスリットをタツチぺ ン等の指示体でなぞってカードの種類を識別する際に、カードの位置決めが容易な カード識別装置、カード識別方法、これらをコンピュータにて実現するプログラムを記 録したコンピュータ読取可能な情報記録媒体、ならびに、当該プログラムを提供する こと力 Sでさる。
図面の簡単な説明
[0057] [図 1]プログラムを実行することにより、本発明のカード識別装置の機能を果たす典型 的な情報処理装置の概要構成を示す模式図である。
[図 2] (a)、(b)は、本発明のカード識別装置にて利用されるカードの形状の例を示す 説明図である。
[図 3]最長スリット領域とこれに含まれる値スリットとの関係を示す説明図である。
[図 4]本実施形態に係るカード識別装置の概要構成を示す説明図である。
[図 5]カード識別装置にて実行されるカード識別方法の処理の流れを示すフローチヤ ートである。
[図 6] (a)は、基準スリットの位置と向きおよび液晶ディスプレイの位置の関係を示す 説明図であり、(b)は、基準スリットの位置と向きが同定された後に、液晶ディスプレイ に表示される最長スリット領域の様子を示す説明図である。
[図 7] (a)、(b)は、同定された値スリットの位置および長さを示す画像が表示される様 子を示す説明図である。
[図 8]値スリット、最長スリット領域、中心線、許容領域、入力済軌跡画像の位置関係 を示す説明図である。
[図 9]残った座標列が 2つのグループに分類される様子を示す。
[図 10]2つのグループのそれぞれから得られた 2つの端点対の同定結果を示す説明 図である。
[図 l l] (a)〜(f)は、本実施形態における表示手法の一例を示す説明図である。 符号の説明
101 情報処理装置
102 CPU
103 RAM
104 ROM
105 入力装置
106 画像処理部
107 液晶ディスプレイ 108 音声処理部
109 スピーカ
110 カセットリーダ
111 ROMカセット
201 カード
202 基準スリット
203 値スリット
204 最長スリット領域
401 カード識別装置
402 タツチパネル部
403 画像表示部
404 基準スリット判定部
405 スリット領域表示制御部
406 値スリット同定部
407 カード識別部
408 消去部
409 入力済スリット表示制御部
410 警告出力部
601 最長スリット領域の画像
602 中心線
603 許容領域
611 基準スリットの画像
701 入力済軌跡画像
801 点
802 線分
803 X車由
804 y車由
発明を実施するための最良の形態
[0059] 以下に本発明の実施形態を説明する。以下では、理解を容易にするため、ゲーム 用の情報処理装置を利用して本発明が実現される実施形態を説明するが、以下に 説明する実施形態は説明のためのものであり、本願発明の範囲を制限するものでは ない。したがって、当業者であればこれらの各要素もしくは全要素をこれと均等なもの に置換した実施形態を採用することが可能であるが、これらの実施形態も本発明の 範囲に含まれる。
実施例 1
[0060] 図 1は、プログラムを実行することにより、本発明のカード識別装置の機能を果たす 典型的な情報処理装置の概要構成を示す模式図である。以下、本図を参照して説 明する。
[0061] 本情報処理装置 101は、 CPU (Central Processing Unit) 102と、 RAM (Random A ccess Memory) 103と、 ROM (Read Only Memory) 104と、入力装置 105と、画像処 理部 106と、液晶ディスプレイ 107と、音声処理部 108と、スピーカ 109と、カセットリ ーダ 110と、を備える。
[0062] CPU 102は、本情報処理装置 101の各部の制御を行う。 RAM 103の記憶域、 ROM 104の記憶域、カセットリーダ 110に揷入された ROMカセット 111の記憶域 は、いずれも、 CPU 102が管理する 1つのメモリ空間にマップされており、 CPU 1 02は、それぞれの記憶域がマップされるアドレスを読み出せば、それぞれに記憶さ れている情報を取得することができる。また、 RAM 103の記憶域には、書き込みも 可能である。
[0063] このほか、 CPU 102が画像処理部 106や音声処理部 108に対して各種の指示を
行う際や、これらのほか、入力装置 105から情報を取得する際の、窓口となるレジスタ も、当該メモリ空間にマップされており、所定のアドレスにコマンドを表すデータ書き 込みを行えば指示をすることができ、所定のアドレスからデータを読み出せば、情報 を取得すること力できる。
[0064] 情報処理装置 101の電源が投入されると、 CPU 102は、カセットリーダ 110に揷 入された ROMカセット 111の記憶域がマップされたアドレスから開始されるプロダラ ムを実行する。 RAM 103は、一時的な記憶域として種々の目的に使用される。 RO M 104には、情報処理装置 101が提供する BIOS(Basic Input/Output System)ル 一チンが記録されており、 ROMカセット 111内のプログラムから、適宜呼び出すこと ができる。
[0065] 入力装置 105は、方向を表す指示入力を受け付けるボタン、各種の操作を区別す る指示入力を受け付けるボタンからの入力をメモリ空間にマップされたレジスタに反 映させるほか、液晶ディスプレイ 107の表面に貼り付けられたタツチパネルが押圧さ れているか否か、および押圧されているときのその座標の入力も受け付ける。
[0066] 液晶ディスプレイ 107は、画像処理部 106によって管理される。メモリ空間にマップ されたタイルを記憶するための記憶領域や、オブジェクト属性メモリを記憶するための 記憶領域が用いられる。 CPU 102が、計算により生成した値を書き込んだり、カセ ットリーダ 110に揷入された ROMカセット 111から適切に情報を転送すると、液晶デ イスプレイ 107にスプライト画像が表示されることとなる。
[0067] このほか、液晶ディスプレイ 107に表示される画像を画素単位で管理するフレーム ノ ッファを利用することもでき、液晶ディスプレイ 107においてある色をある位置に表 示した!/、場合には、フレームバッファ内のその位置に相当する場所にその色に相当 する数値を書き込むと、適切なタイミングで液晶ディスプレイ 107にビットマップ画像 が表示される。
[0068] たとえば、 16ビットカラー表示 320 X 200ドットの液晶ディスプレイ 107の場合、画 素 1つ分の色は 2バイトで表現される。そこで、 320 X 200個の要素(各 2バイト)を持 つ配列をフレームバッファとして RAM 103内に用意し、当該配列の要素を 1対 1に 液晶ディスプレイ 107の画素に対応させる。当該配列の要素に色を表す 16ビットの
値を書き込み、適切なタイミングで (たとえば、垂直同期割り込みが発生する周期で) フレームバッファの内容を液晶ディスプレイ 107に反映させるように、画像処理部 106 にて制御を行う。
[0069] 液晶ディスプレイ 107の数は 1つまたは複数とするのが一般的である。本実施形態 では、複数の液晶ディスプレイが存在し、一方 (本図上方)の液晶ディスプレイ 107は 表示専用とし、他方 (本図下方)の液晶ディスプレイ 107にはタツチパネルが貼り付け られている。
[0070] したがって、タツチペンでタツチパネルを押圧操作することにより、対応する液晶デ イスプレイ 107の位置を表す座標値が入力される。すなわち、タツチパネルと液晶デ イスプレイ 107とは一体となって、タッチスクリーンとして機能する。
[0071] なお、本情報処理装置 101は、典型的な携帯ゲーム装置として利用されるものであ る力 本発明の技術は、マウスおよびキーボードと CRT (Cathode Ray Tube)を用い て入力と出力を行うような汎用コンピュータで動作する各種のアプリケーションに適用 することも可能であり、そのような実施形態も本発明の範囲に含まれる。
[0072] 図 2は、本発明のカード識別装置にて利用されるカードの形状の例を示す説明図 である。以下、本図を参照して説明する。
[0073] カード 201には、非対称な形状を有する基準スリット 202と、 5つの値スリット 203と が設けられている。本実施形態のカードでは、基準スリット 202は L字型の形状をして おり、基準スリット 202の長辺に平行に値スリット 203が設けられている。
[0074] 基準スリット 202の長辺と短辺は長さが異なる。たとえば、本図(a)に表示される力 ードの面が「表」であるとしたとき、基準スリット 202の長辺の端点から短辺の端点へ進 むと、なぞった軌跡は「左折」することになる。基準スリット 202の短辺の端点から長辺 の端点へ進むと、なぞった軌跡は「右折」することになる。このカードを裏返した場合、 基準スリット 202の長辺の端点から短辺の端点へ進むと、なぞった軌跡は「右折」する ことになる。基準スリット 202の短辺の端点から長辺の端点へ進むと、なぞった軌跡は 「左折」することになる。したがって、基準スリット 202の軌跡の長辺と短辺の位置関係 を調べれば、カード 201の裏表が判明する。
[0075] また、基準スリット 202のカード 201全体に対する相対的な位置や向きはあらかじめ
決められているから、基準スリット 202の長辺と短辺の位置や向きから、カード 201全 体の位置や向きを同定することができる。
[0076] 値スリット 203のそれぞれは、基準スリット 202の長辺と同じ長さで等間隔に配置さ れた最長スリット領域 204 (本図では太点線で示す)に含まれるように配置されている
〇
[0077] 本例では、最長スリット領域 204の長さは、ある単位長(図中細点線の桝目の辺の 長さ)の 4倍となっている。そして、値スリット 203の長さは、当該単位長の 1倍〜 4倍の いずれかの長さをとる。
[0078] また、本実施形態では、基準スリット 202および各値スリット 203の間隔、ならびに基 準スリット 202の短辺の長さも当該単位長となっている。
[0079] 本図(a)に示す例において、カード 201の基準スリット 202に近い方から遠い方へ、 順に値スリット 203を見ると、その長さは順に単位長単位で、 3、 2、 1、 2、 2となってお り、カード 201の上端からの開始位置は順に単位長単位で、 1、 1、 3、 0、 1となってい
[0080] なお、基準スリット 202の形状、当該単位長の長さ、値スリット 203の数や長さ、最長 スリット領域 204の長さ、これらの間隔などは、用途に応じて適宜変更が可能である。
[0081] さて、上述のように、スリットを設けたカードは、単独で用いる場合もあるし、複数枚 を重ねてスリット同士の共通部分をなぞるようにして用いる場合もある。本図には、そ の両者の例を示している。
[0082] すなわち、本図(a)は、カード 201を単独で用いる態様を示すもので、値スリット 20
3のそれぞれは、当該単位長の 1倍〜 4倍のいずれかの値を任意にとることが可能で ある。
[0083] 一方、本図(b)は、カード 201を最大 5枚(これは値スリットの数に等しい。)まで重 ねて利用するもので、 5つの値スリット 203のうち 1つだけが単位長の 1倍〜 3倍のい ずれかの長さをとり、残りの 3つの値スリット 203は単位長の 4倍(最長スリット領域 204 と同じ長さ。)となっている。前者の 1つの値スリット 203を主値スリット、後者の 3つの 値スリット 203を副値スリットと呼ぶ。
[0084] 基準スリット 202から見て、主値スリットが何番目の値スリット 203に該当する力、、によ
つて、当該カード 201の種類の大分類を識別することができる。また、主値スリットの 位置および長さによって、当該大分類における当該カード 201の詳細な種類を識別 すること力 Sでさる。
[0085] たとえば、カード 201の種類を
( 1 )キャラクター本体のカード
(2)帽子のカード
(3)上半身のカード
(4)下半身のカード
(5)靴のカード
の 5種類に大分類する場合を考える。
[0086] 上記のように、主値スリットが何番目の値スリット 203に相当する力、、によって、カー ド 201の種類の大分類を識別することができるのであるから、本実施形態では、以下 のような対応関係を設定する。
( 1 )主値スリットが 1番目の値スリット 203ならば、そのカードはキャラクター本体の力 ード
(2)主値スリットが 2番目の値スリット 203ならば、そのカードは帽子のカード
(3)主値スリットが 3番目の値スリット 203ならば、そのカードは上半身のカード
(4)主値スリットが 4番目の値スリット 203ならば、そのカードは下半身のカード
(5)主値スリットが 5番目の値スリット 203ならば、そのカードは靴のカード
[0087] たとえば、本図(b)に示すカード 201は、 2番目のィ直スリット 203力 S主ィ直スリットとなつ ているから、当該カード 201は帽子のカードであることがわ力、る。
[0088] そして、当該値スリット 203の主値スリットの位置(基準スリット 202から見て何番目か 、および、最長スリット領域 204のどの位置に配置される力 によって、帽子の種類が 示される。
[0089] 図 3は、最長スリット領域とこれに含まれる値スリットとの関係を示す説明図である。
以下、本図を参照して説明する。
[0090] 本図においては、理解を容易にするため、最長スリット領域 204を点線で、値スリツ ト 203を実線で表記するとともに、値スリット 203の最長スリット領域 204における位置
および長さに対応付けられる番号(1〜 10)を斜体で示している。
[0091] 本実施形態では、最長スリット領域 204は単位長の 4倍の長さを有し、値スリット 20 3は、単位長の 1倍〜 4倍の長さを有する。 1つの最長スリット領域 204に対して値スリ ット 203は連続した 1つのスリットとなっており、途中でスリットが複数の領域に区切ら れることはない。
[0092] したがって、ィ直スリット 203の種類は、本図に示すように、
(1)単位長の 4倍のもの … 1種類
(2)単位長の 3倍のもの … 2種類
(3)単位長の 2倍のもの … 3種類
(4)単位長の 1倍のもの … 4種類
合計、 10種類となる。一般に、単位長の m倍の長さを有する最長スリット領域 204に 対しては、値スリット 203で表現できる値の種類は、 m(m+l)/2種類である。
[0093] 図 2 (a)に示す例では、ィ直スリット 203は 5つある力、ら、カード 201の種類は合計で 10 5 = 100000種類まで表現できる。カード 201の種類力 Sもっと少なくて良い場合には、こ のようにして得られる数値の一部をチェックサムのように用いて、値スリット 203による 入力が正しく行われているかチェックすることも可能である。
[0094] 図 2 (b)に示す例では、単位長 4倍の値スリット 203は副値スリットとして利用される ので、主値スリット 203として利用できるのは 9種類であり、着せ替えカードの帽子の 種類も 9種類、ということになる。したがって、 5枚のカードを重ねる着せ替えの全組み 合わせの種類は、 95 = 59049通りである。
[0095] なお、最長スリット領域 204の単位長のそれぞれを 1ビットに対応させて、値スリット 2 03として分断されたものも可能とする態様を採用することもできる。この態様では、分 断されたスリットの入力忘れが生じやすい、スリットとスリットの間が切れやすい、という 欠点もあるが、値の種類として 21 "通り(スリットがなくなってしまうものを除くと 2m-l通り。 )を表現できるという利点がある。したがって、用途に応じて適宜使い分けが可能であ
[0096] 図 4は、本実施形態に係るカード識別装置の概要構成を示す説明図である。以下 、本図を参照して説明する。
[0097] 本実施形態に係るカード識別装置 401は、タツチパネル部 402、画像表示部 403、 基準スリット判定部 404、スリット領域表示制御部 405、値スリット同定部 406、カード 識別部 407、消去部 408、入力済スリット表示制御部 409、警告出力部 410、記憶部 411を備え、上記情報処理装置 101にて、 ROMカセット 111から読み込んだプログ ラムを CPU 102に実行させることによって、実現される。
[0098] 入力された座標列認識結果や途中の状況など、各種のデータは、一般的なコンビ ユータにおける処理と同様、 RAM 103等により構成される記憶部 411に一時的に 己' I思 cれ 。
[0099] 図 5は、当該カード識別装置にて実行されるカード識別方法の処理の流れを示す フローチャートである。以下、本図を参照して説明する。
[0100] まず、 CPU 102は、 RAM 103に用意された入力済値配列 Mを初期化する(ステ ップ S501)。本実施形態では、値スリット 203の数は 5つであるから、当該配列 Mは、 5要素の配列(各要素は、 M[0]〜M[4])となる。
[0101] 本実施形態では、図 3に示すように、各値スリット 203の位置および長さに対して 1 〜; 10の番号を割り当てている。そこで、この番号を、当該値スリット 203をなぞった際 の位置および長さを示す数値として採用することとし、未入力の場合には 0によってこ れを表すこととする。
[0102] したがって、本ステップにおいては、 RAM 103もしくは CPU 102が有するレジス タに割り当てられたカウンタ変数 iを 0から 4まで変化させて、 M[i]— 0を実行する。ここ で、「―」は代入を意味する。
[0103] ついで、 CPU 102は、入力装置 105のタツチパネルの押圧操作の状況を、メモリ 空間にマップされたレジスタにアクセスして監視し、タツチペンがタツチパネルに触れ てから触れたまま移動してタツチパネルを離れるまでの軌跡情報を取得する (ステツ プ S502)。
[0104] したがって、タツチパネルを有する入力装置 105は、タツチパネル部 402として機能 する。なお、監視を行う間、タツチペンの移動の軌跡をリアルタイムで液晶ディスプレ ィ 107に表示して反映させると、ユーザは確認がしゃすくなる。
[0105] ついで、 CPU 102は、入力された軌跡の座標歹 IJが、基準スリット 202の形状のマ
ツチするか否かを判定する(ステップ S 503)。
[0106] したがって、 CPU 102は、入力装置 105と共働して、基準スリット判定部 404とし て機能する。
[0107] このマッチにつ!/、ては、各種の文字認識、図形認識、パターン認識の技術を適用 できる力 本実施形態で採用する態様については、後述する。
[0108] さて、本実施形態では、基準スリット 202の形状は、単位長の 1倍の長さの短辺と単 位長の 4倍の長さの長辺を持つ L字形である。したがって、ステップ S503におけるマ ツチ処理によって、カード 201の単位長力 入力装置 105のタツチパネルで何ドット 分に相当する力、、を調べること力 Sできる。
[0109] この情報は、情報処理装置 101に何種類力、バリエーションが存在し、液晶ディスプ レイ 107および入力装置 105のタツチパネルの DPI (dots per inch)値が何種類かあ りうる場合に、利用することができる。また、当該 DPI値が一種類しかありえないような ハードウェアでは、ドット単位でのカード 201の単位長をあらかじめ知得することがで きる力、ら、その値を用いてマッチするか否かの判断を行っても良レ、。
[0110] マッチしない場合(ステップ S503 ; No)、 CPU 102は、画面に軌跡が表示される 場合には当該軌跡を消去する等の処理を行って表示の初期状態に戻し (ステップ S 504)、音声処理部 108に指示を出して警告音を出力させ (ステップ S505)、ステツ プ S502に戻る。したがって、 CPU 102は、音声処理部 108などと共働して、警告 出力部 410として機能する。
[0111] なお、警告出力部 410では、警告メッセージを上方の液晶ディスプレイ 107に表示 するなどの手法を採用しても良い。
[0112] 一方、マッチする場合 (ステップ S503 ; Yes)、タツチパネルの座標系における基準 スリット 202の向きと位置が同定されるので、これに基づいて、最長スリット領域 204の 位置を計算する(ステップ S 506)。
[0113] 本実施例では、図 2および図 3を参照しながら説明したように、最長スリット領域 204 の長さは、いずれも単位長の 4倍になっている。また、図 2に示すように、基準スリット 202の長辺の端点から基準スリット 202の隅を見る(すなわち、図 2上方から図 2下方 へ視線が進むように本図を見る)と、基準スリット 202の短辺は左側に伸びているが、
最長スリット領域 204は、これとは反対側 (右側)に配置されている。基準スリット 202 力も直近の最長スリット領域 204までの間隔、および、最長スリット領域 204同士の間 隔は、いずれも単位長に等しい。すなわち、最長スリット領域 204は、等間隔に配置 されることになる。
[0114] したがって、基準スリット 202の向きと位置が決まれば、最長スリット領域 204のそれ ぞれの向きと位置も計算が可能できる。この計算手法の詳細についても、マッチの手 法と同様に後述する。
[0115] さらに、計算された最長スリット領域 204の位置に基づいて、液晶ディスプレイ 107 に対して、当該最長スリット領域 204に相当する部分に画像を表示する(ステップ S5 07)。
[0116] したがって、 CPU 102は、画像処理部 106および液晶ディスプレイ 107と共働し て、スリット領域表示制御部 405として機能する。
[0117] 図 6は、基準スリット 202の位置と向きが同定された後に、液晶ディスプレイ 107に 表示される最長スリット領域 204の様子を示す説明図である。以下、本図を参照して 説明する。
[0118] 本図(a)は、カード 201が液晶ディスプレイ 107上のタツチパネルに重ねて配置さ れている状況で、液晶ディスプレイ 107に表示された画像がどのように見える力、を表 すものであり、本図(b)は、本図(a)の状況からカード 201を外した様子を示すもので ある。
[0119] 基準スリット 202の位置と向きが同定されると、液晶ディスプレイ 107には、本図(b) に示すように、最長スリット領域 204を表す画像 601と基準スリットを表す画像 611が 表示される。
[0120] 最長スリット領域 204を表す画像 601は、中心線 602 (本図では白色に描かれてい る。)と、許容領域 603 (本図では濃い灰色に描かれている。 )とが、異なる色で表示さ れる。
[0121] 中心線 602の長さは、基準スリット 202と同じ長さである。また、中心線 602には、単 位長ごとに太さを変更する装飾が施されており、ユーザは、この装飾を見ることで、値 スリット 203の単位長を確認することができる。
[0122] 一方、基準スリットを表す画像 611は、 L字形の縁取された図形である。本図では、 縁が薄い灰色、中心が白色に描かれている。
[0123] 本図(a)に示すように、液晶ディスプレイ 107上のタツチパネルにカード 201を重ね た場合には、値スリット 203を通して最長スリット領域 204を表す画像 601 (本図(a)で は、煩雑にならないように、符号「601」は表記を省略している。)の一部が見えている 。このほか、基準スリット 202を通して、基準スリットを表す画像 611 (本図(a)では、煩 雑にならな!/、ように、符号「611」は表記を省略して!/、る。 )の一部も見えて!/、る。
[0124] 本図に示すように、中心線 602の太さを基準スリット 202より幾分細くしておくと、基 準スリット 202からは、中心線 602と許容領域 603の両方が見えることになる。
[0125] したがって、ィ直スリット 203力、ら中心泉 602と許容領域 603力 S見えており、中心泉 60 2が基準スリット 203の中央に見えていれば、カード 201の基準スリット 202をなぞつ て以降、カード 201の位置がずれていないことになる。したがって、ユーザは、値スリ ット 203からのぞいて見える画像 601を見ることで、カード 201がずれていないかどう かを確認しながら入力を進めることができるようになる。
[0126] ついで、 CPU 102は、入力装置 105のタツチパネルの押圧操作の状況を、メモリ 空間にマップされたレジスタにアクセスして監視し、タツチペンがタツチパネルに触れ てから触れたまま移動してタツチパネルを離れるまでの軌跡情報を取得する (ステツ プ S508)。本処理は、ステップ S501におけるものと同様である。
[0127] さらに、得られた軌跡情報が、いずれかの最長スリット領域 204に含まれるか否かを 判定する(ステップ S509)。当該判定についても、基準スリット 202とのマッチと同様 の技術を適用することができ、その詳細については後述する。
[0128] 得られた軌跡情報がいずれかの最長スリット領域 204に含まれる場合 (ステップ S5 09; Yes)、当該最長スリット領域 204が何番目のものであるかを調べる(ステップ S 51 0)。結果が潘目であるとする。
[0129] さらに、 j番目の最長スリット領域 204において、得られた軌跡情報の位置および長 さ力 図 3に示す値スリット 203の何番目のものであるかを調べる(ステップ S511)。 結果が k番目であるとする。
[0130] そして、 \ ] 1^を実行し(ステップ3512)、 j番目の最長スリット領域 204に対する値
スリット 203の位置および長さを表す番号が kであることを RAM 103に登録する。
[0131] したがって、 CPU 102は、入力装置 105等と共働して、値スリット同定部 406とし て機能する。
[0132] さらに、 CPU 102は、画像処理部 106を制御して、 j番目の最長スリット領域 204 に対して同定された k番目の値スリット 203の位置および長さに基づいて、当該同定 された位置および長さを示す画像を液晶ディスプレイ 107に表示する(ステップ S51 3)。
[0133] 図 7は、同定された値スリット 203の位置および長さを示す画像が表示される様子を 示す説明図である。図 8は、値スリット 203、最長スリット領域 204、中心線 602、許容 領域 603、入力済軌跡画像 701の位置関係を示す説明図である。本図は、図 7に示 すものの一部を拡大したものである。以下、これらの図を参照して説明する。
[0134] これらの図では、図 6 (a)と同様に、カード 201のィ直スリット 203を通して、最長スリッ ト領域 204を表す画像 601の中心線 602と許容領域 603が見えている。
[0135] また、 1番目と 3番目のィ直スリット 203については、すでにユーザがなぞり終えている 。そこで、なぞり終えたことをわ力、りやすくするために、なぞった軌跡の端点に円を配 置し、円同士を太線で連結した、鉄亜鈴のような形状の入力済軌跡画像 701を表示 している。
[0136] タツチペンは、中心線 602に沿って移動するから、入力済軌跡画像 701は、最長ス リット領域 204を表す画像 601の中心線 602に重なるように表示されることになる。
[0137] また、入力済軌跡画像 701は、同定された位置および長さに基づいて表示される ため、当該入力済軌跡画像 701の長さは、単位長の整数倍となる。
[0138] 図 7 (b)に示す例では、この入力済軌跡画像 701は、 1番目の値スリット 203とほと んど同じ長さとなっており、 1番目の値スリット 203を正しくなぞったことが確認できる。
[0139] また、 4番目の値スリット 203についてもユーザはなぞり終えている力 入力済軌跡 画像 701は、 4番目の値スリット 203よりも短く表示されている。これは、ユーザのなぞ り方が不十分で、値スリット 203の途中でタツチペンをタツチパネルから離してしまつ たことによるものである。
[0140] このように、ユーザは、入力済軌跡画像 701が表示されている様子を見ることによつ
て、値スリット 203をなぞる入力処理が正しく処理されたことを確認することができる。
[0141] また、どの値スリット 203についてなぞる処理を行い、どの値スリット 203については なぞる処理を行って!/、な!/、か、を入力済軌跡画像 701が表示されて!/、るか否かによ つて容易に確認、できるようになる。
[0142] したがって、 CPU 102は、画像処理部 106および液晶ディスプレイ 107と共働し て、入力済スリット表示制御部 409として機能する。
[0143] そして、 5つの最長スリット領域 204に対する値スリット 203の位置および長さの同定 がすべて終了したかを判定する(ステップ S514)。本実施形態では、 i = 0, 1, · · · , 4 のすべてについて M[i]≠0であれば、位置および長さの同定がすべて終了しているこ とになる。
[0144] ここで、いずれかが終了していなければ(ステップ S514 ; No)、ステップ S506に戻
[0145] 一方、すべての同定が終了していれば(ステップ S514 ; Yes)、 CPU 102は、 m[0 コ, m[l], · · · , m[4]の値から、カード 201の種類を識別して出力し(ステップ S515)、本 処理を終了する。したがって、 CPU 102は、カード識別部 407として機能する。
[0146] 識別の手法については、たとえば図 2 (a)に示すように、カード 201を単独で利用す る場合には、 m[0], m[l], · · · , m[4]のそれぞれから 1を減算した値を十進数 5桁の数 値と見て、カード 201の種類を表す番号を取得すれば良い。
[0147] また、図 2 (b)に示すような 5枚まで重ねて使用するタイプのカードの場合には、
(1) m[0]によりキャラクター本体のカードの種類を、
(2) m[l]により帽子のカードの種類を、
(3) m[2]により上半身のカードの種類を、
(4) m[3]により下半身のカードの種類を、
(5) m[4]により靴のカードの種類を、
それぞれ識別することができる。なお、 M[i]=10である場合、当該 i番目の大分類の力 ードは重ねられていなかったことになる。
[0148] 一方、ステップ S508において得られた軌跡情報力 S、いずれの最長スリット領域 204 にも含まれない場合 (ステップ S509 ; No)、当該軌跡情報が、基準スリット 202の形
状のマッチするか否かを判定する(ステップ S516)。当該マッチの判断には、ステツ プ S503におけるものと同様の処理を行うことができる。
[0149] マッチする場合(ステップ S516 ;Yes)、 i = 0, 1, · · · , 4のそれぞれについて M[i]— 0 を実行して配歹 IJMをクリアし、過去に同定された値スリット 203の位置および長さの情 報を消去して(ステップ S517)、ステップ S506に戻る。したがって、 CPU 102は、 R AM 103と共働して、消去部 408として機能する。
[0150] このように、ユーザは、基準スリット 202をもう一度なぞるだけで、ィ直スリット 203の入 力のやり直しを fiうことが簡単にできる。
[0151] 一方、マッチしない場合 (ステップ S516 ; No)、警告出力部 410が警告音出力ゃ警 告メッセージ表示などを行って当該入力は無効である旨をユーザに通知し (ステップ S518)、ステップ S506に戻る。
[0152] このように、本実施形態によれば、カード 201を入力装置 105のタツチパネルに重 ねて基準スリット 202および値スリット 203をタツチペンでなぞる際に、値スリット 203を なぞる入力がどこまで進んだ力、、正しく処理されている力、を容易に確認することができ 、また、基準スリット 202をなぞるだけで、入力のやり直しを指示することができるように なり、ユーザは、基準スリット 202および値スリット 203をなぞるだけで、容易にカード 2 01の種類をカード識別装置 401に識別させることができるようになる。
[0153] (各種のマッチ'判定の手法)
以下では、タツチペンをタツチパネルに触れさせて力、ら移動させてタツチパネルを 離すまでの軌跡情報が、 n個の座標の列
(X,y ), (X,y ), (X,y ), · · · , ,y )
0 0 1 1 2 2 n- 1 n- 1
として得られたものとする。
[0154] 一般にスリット状のものをペンでなぞる場合、人によって、一方の端から他方の端ま でペンでなぞるだけの人、 2つの端の間でペンを何回か往復させる人、ペンの置き始 めがスリットの途中の人、スリットの端の人など、種々の入力のやり方がありうる。
[0155] したがって、本カード識別装置 401においても、これらの種々の入力のやり方に対 応する必要がある。以下では、各種のマッチ ·判定の方法について、詳細に述べる。
[0156] まず、最も単純な場合として、線分状の値スリット 203の入力を認識する場合を考え
る。また、ここでは、値スリット 203における最長スリット領域 204の位置および形状が 、既に判明しているものとする。
[0157] まず、座標列
(X,y ), (X,y ), (X,y ), ·· ·, ,y )
0 0 1 1 2 2 n- 1 n- 1
は、最長スリット領域 204が判明していれば、これに含まれるはずである。したがって 、所定の許容誤差範囲内で最長スリット領域 204に含まれない座標が存在する場合 には、その座標を座標列から除去して無視する。
[0158] なお、許容誤差範囲内に含まれない座標の個数や割合が所定の閾値を超える場 合には、マッチは失敗したものとしても良い。また、後述するように、基準スリット 202 の認識の際には、最長スリット領域 204は未定であるので、このような除去処理などは 行わなレ、。
[0159] 以下では、すべての座標が最長スリット領域 204に含まれているものとして説明する
〇
[0160] この場合、座標列
(x ,y ), (x ,y ), (x ,y ), ···, {x ,y )
0 0 1 1 2 2 n- 1 n- 1
は、入力誤差がなければ、ある直線 y = ax + b上に並ぶはずである。この直線のパラ メータ a, bを求めるには、いわゆる最小自乗法を用いることができる。
[0161] すなわち、
a = [∑ XV - nxy]/ L∑ Χ _ ηχ〕;
i=0 i i i i i=0 i i
b = E[y] - aE[x];
E [x ] = ∑ x/n;
1 i i=0 i
E[y] = ∑ y/n
i i i=0 i
のような計算によって、 a, bを求める。
[0162] 次に、この直線の一部をなす線分の端点を求めるには、 の中から、最大値 X と最小値 X を抽出する。
max mm
x = max [x ];
x = min [x ]
max i i
[0163] すると、端点の座標は、
(x , ax +b), (x , ax +b)
min min max max
となる。
[0164] 一方で、最長スリット領域 204の位置および形状はすでに判明している。たとえば、 最長スリット領域 204の端点の座標が、それぞれ、
(P , Q ), (P , Q )
mm mm max max
である場合を考える。
[0165] 上記実施形態では、最長スリット領域 204の長さは単位長の 4倍であるから、正しい 入力がされていれば、入力された端点の座標
, ax +bノ, , ax +b)
min min max max
は、 k = 0, · · · , 4のそれぞれについて、
((kP + (4-k)P )/4, (kQ + (4-k)Q )/4)
min max min max
により求められる 5つの座標を持つ点の、いずれかの近傍に配置されているはずであ
[0166] したがって、これらの点同士の距離を求めて、これが所定の誤差範囲内に存在する かどうかを調べ、存在するようであれば、マッチが成功したものとする。
[0167] そして、得られるマッチ結果の位置は、
((kP + (4-k)P )/4, (kQ + (4-k)Q )/4)
mm max mm max
により求められる 5つの座標を持つ点のうち、上記
, ax +bノ, , ax +b)
mm min max max
にマッチする 2つの点の位置、ということになる。また、その長さは、当該マッチした 2 つの点の位置から求めることができる。
[0168] 最小自乗法を用いる手法は、線分形状とのマッチングをとる際には単純かつ容易 な手法である。
[0169] なお、最小自乗法による場合、その改良として、得られた a, bのパラメータに基づい て、各座標の誤差を求め、この誤差が所定の許容範囲を超えている座標については 無視して計算をやり直したり、この誤差が所定の許容範囲を超えている座標の個数 や割合が所定の閾値を超えている場合はマッチを失敗させる、等の手法を適用する
ことあでさる。
[0170] また、上記の計算においては、 X座標を基準に考えている力 S、 X座標と y座標の役割 を入れかえて計算を行っても良い。典型的には、座標の分布が横長であれば、上記 のように X軸基準で、座標の分布が縦長であれば、 y軸基準で行うように、基準を切り 替える処理を行うと、傾き aが無限大になってしまう現象(0除算)が生じなくなる。
[0171] 上記のように、線分形状の値スリット 203の認識は、比較的容易である。一方、上記 実施形態の基準スリット 202の認識にお!/、ては、基準スリット 202の形状が L字形であ
[0172] そこで、上記のような単純な最小自乗法ではなぐ 2次元空間で L字形の基準図形 の向きおよび位置を変化させて、その基準図形と入力各点との自乗距離を最小にす るように配置を行うことによって、上記の手法と同様にマッチングを行うこともできる。こ のほか、本実施形態においては、以下のような比較的単純な手法を採用することもで きる。
[0173] まず、座標列
(X,y ), (X,y ), (X,y ), · · · , ,y )
0 0 1 1 2 2 n- 1 n- 1
は、入力誤差がなければ、 L字形の 2つの線分のいずれかの上に乗っているはずで ある。そこで、座標列に含まれる隣り合う 3つの点の座標
(x ,y ), { ,y ), (χ ,y )
1 i i+1 i+1 i+2 i+2
について、
線分 (x
i,y )-(x
i i+2,y )と、
i+2
点 (x
i+1,y )と、
i+1
の距離が、許容誤差 ε以下であるか否かを判定し、許容誤差 ε以下である場合には 、座標列から、真中の点の座標
(x ,y )
i+1 i+1
を削除する。これを、削除する点の座標がなくなるまで繰り返す。
[0174] このようにすれば、 L字形を構成する線分の端点と描き始め、描き終わりの点だけが 残るはずである。
[0175] なお、このような座標の除去処理は、上記の値スリット 203のマッチングでも採用す
ること力 Sできる。除去処理を行うことによって、最小自乗法で考慮しなければならない 点の数の大幅な抑制が期待できる。
[0176] 残った座標列を、
(X ,Υ ), (X ,Υ ), (X ,Υ ), · · · , (X ,Υ ) (m≤n)
0 0 1 1 2 2 m- 1 m- 1
とすると、これに含まれる線分は、
(X
0,Υ )-(χ
0 1,Υ ),
1
(X
1,Υ )-(χ
1 2,Υ ),
2
(X ,Υ )-(χ,Υ ), · · · ,
2 2 3 3
(X
m-2,Υ )-(χ
m-2 m_l,Υ )
m - 1
である。
[0177] そこで、これらの線分の傾きが 1未満力、 1以上力、 (一般的には、 X軸となす角が、所 定の閾角度 Θを用いて、(Θ -45° )〜(θ +45° )か、そうでないか。)によって、 2つの グループに分類する。
[0178] 図 9は、残った座標列が 2つのグループに分類される様子を示す説明図である。
[0179] 本図に示すように、座標列の点 801を結ぶ線分 802は、傾きが所定の範囲かどうか
、すなわち、本図において、傾きが X軸 803に近いか、それとも y軸 804に近いか、に よってグループ化される。また、本図では、傾きが X軸 803に近い側の線分 802は点 泉で、 y車由 804ίこ近! 則の泉分 802 (ま実泉で、描!/、て!/、る。
[0180] 上記のように、 L字形では、短辺と長辺が直交するから、この 2つのグループは、一 方が短辺に、他方が長辺に相当するはずである。そこで、それぞれのグループにつ いて、上記の値スリット 203の場合と同様に、最小自乗法による端点の同定を行う。
[0181] なお、ここに至るまでに、点列の座標の数が大幅に減らされているから、最小自乗 法による計算量も抑制される。
[0182] 図 10は、 2つのグループのそれぞれから得られた 2つの端点対の同定結果を示す 説明図である。以下、本図を参照して説明する。
[0183] 本図に示すように、一方の線分 802のグループからは、 2つの端点 A, Bが得られて おり、他方の線分 802のグループからは、他の 2つの端点 C, Dの対が得られている。
[0184] 多くの場合には、 A, Bのいずれかと、 C, Dのいずれかとは一致するが、最小自乗法
の誤差、 L字形の角における入力誤差や癖、 L字型の長辺および短辺の傾きなどの 特性から、 4つの点 A, B, C, Dがいずれも一致しない場合もありうる。以下では、より 一般的に、 4つの点 A, B, C, Dがいずれも一致しない場合を例にあげて考える。
[0185] まず、線分 ABと線分 CDは、 L字形の短辺と長辺に対応するはずである。したがって 、線分 ABの長さと線分 CDの長さとの比を求め、この比が本実施形態の L字形の形状 である長短の比である 1 : 4に対して、所定の許容誤差範囲内に含まれているか否か を調べる。許容誤差範囲内に含まれていなければ、マッチしない、と判断する。
[0186] 次に、直線 ABと直線 CDとがなす角 Θ力 直角に対して所定の許容誤差範囲内に 含まれているか否かを調べる。許容誤差範囲内に含まれていなければ、マッチしな い、と判断する。
[0187] さらに、
距離 AC
距離 AD
距離 BC
距離 BD
のうち最小のものが、所定の許容誤差範囲より大きいか否力、を調べる。距離が最小と なる点の組合せが、 L字形の角の近傍に配置される点のはずだからである。本図に ぉレ、ては、距離 BCが最小距離となって!/、る。
[0188] なお、上記のように、 A, Bのいずれかと、 C, Dのいずれかが一致するときは、ここで いう最小距離は 0になる。
[0189] そして、この最小距離が、許容誤差範囲より大きければ、マッチしなレ、、と判断する
[0190] ここまでの条件がクリアされれば、上記の最小距離をなす点のいずれか (もしくは、 両者の重心としても良い。)がし字形の角の点の位置に相当し、残りの 2点の位置が L 字形の長辺と短辺の端点の位置に相当することになる。また、短辺と長辺の位置関 係によって、カードの表裏を同定することもできる。
[0191] この後の判断についてである力 S、第 1の手法では、上記の条件をすベてクリアした 場合に、マッチを成功させる。すると、線分 ABの長さと、線分 CDの長さと、のうち、短
い方が、「単位長」となる。
[0192] たとえば、情報処理装置 101における入力装置 105のタツチパネルの解像度(DPI 値)が機種によって異なる場合には、同じ基準スリット 202をなぞった場合であっても 、座標列から得られる「単位長」は異なるものとなる。したがって、基準スリット 202のマ ツチングによって、当該情報処理装置 101における「単位長」を決めることができる。
[0193] 第 2の手法では、情報処理装置 101における入力装置 105のタツチパネルの解像 度(DPI値)が固定の場合に利用できるものである。この場合は、「単位長」も一定とな
[0194] そこで、さらなるマッチング条件として、線分 ABの長さと、線分 CDの長さと、のうち、 短い方が、「単位長」に対して、所定の許容誤差範囲内にあるか否力、を判定し、許容 誤差範囲内にあればマッチする、と判断し、なければマッチしない、と判断する手法 である。
[0195] このようにして、 L字形の基準スリット 202をなぞった場合の認識、線分型の値スリツ ト 203をなぞった場合の認識ができるようになる力 上記の手法のほか、各種の図形 認識の手段を採用しても良い。
実施例 2
[0196] 上記の実施形態では、基準スリット 202をなぞることによって同定された位置に基づ いて、各最長スリット領域 204のそれぞれの位置を同定し、これらを表す画像 601とし て、複数の中心線 602と許容領域 603とを表示していた。
[0197] しかしながら、なぞるべき値スリット 203に入力順序が定められている場合もある。た とえば、基準スリット 202に近い方から順になぞる、などの手法である。このような手法 では、入力忘れが防止しやすいなどの利点がある。
[0198] このように、値スリット 203に入力順序が定められている場合には、その順序をユー ザに提示することが望ましい。そこで、本実施形態では、当該順序をユーザに提示す る手法を提供する。
[0199] 図 11は、本実施形態における表示手法の一例を示す説明図である。以下、本図を 参照して説明する。なお、本図においては、理解を容易にするため、符号を省略して いる。
[0200] 本図(a)は、基準スリット 202をなぞった直後の表示の様子を示すものであり、本図
(b)以降は、それ以降、当該所定の順序で値スリット 203をなぞっていった場合の表 示の様子を順に示すものである。
[0201] 本図に示すように、次になぞるべき最長スリット領域 204の画像 601では、中心線 6
02を強調表示し、それ以外の最長スリット領域 204の画像 601では、中心線 602を 普通表示することとしている。
[0202] 本図では、強調表示の際には中心線 602を目立つように実線で描画し、普通表示 の際には中心線 602を目立つように点線で描画している。
[0203] なお、強調表示の手法としては、たとえば、最長スリット領域 204の明度を変化させ たり、点滅させたり、色を変更したりなど、種々の手法を採用することができる。
[0204] 本実施形態では、入力が進むにつれ、入力済軌跡画像 701が、基準スリット 202の 方から順に増えている力 これは、入力すべき順序に応じたものである。
[0205] 本実施形態によれば、強調表示により次になぞるべき値スリット 203をユーザに提 示することで、正しい順序での入力をユーザに促すことができるようになる。
[0206] なお、本願においては、 日本国特許出願 特願 2006— 279614号を基礎とする優 先権を主張するものとし、指定国の法令が許す限り、当該基礎出願の内容を本願に 取り込むものとする。
産業上の利用可能性
[0207] 以上説明したように、本発明によれば、タツチパネルに載せられたカードに設けられ たスリットをタツチペン等の指示体でなぞってカードの種類を識別する際に、カードの 位置決めが容易なカード識別装置、カード識別方法、これらをコンピュータにて実現 するプログラムを記録したコンピュータ読取可能な情報記録媒体、ならびに、当該プ ログラムを提供すること力 Sできる。