JP4325332B2 - Pen-type data input device and program - Google Patents

Pen-type data input device and program Download PDF

Info

Publication number
JP4325332B2
JP4325332B2 JP2003323291A JP2003323291A JP4325332B2 JP 4325332 B2 JP4325332 B2 JP 4325332B2 JP 2003323291 A JP2003323291 A JP 2003323291A JP 2003323291 A JP2003323291 A JP 2003323291A JP 4325332 B2 JP4325332 B2 JP 4325332B2
Authority
JP
Japan
Prior art keywords
pen
trajectory information
data input
writing
input device
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
Application number
JP2003323291A
Other languages
Japanese (ja)
Other versions
JP2005092437A (en
Inventor
敬一 櫻井
明彦 長坂
毅 松岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2003323291A priority Critical patent/JP4325332B2/en
Publication of JP2005092437A publication Critical patent/JP2005092437A/en
Application granted granted Critical
Publication of JP4325332B2 publication Critical patent/JP4325332B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Position Input By Displaying (AREA)
  • Image Analysis (AREA)

Description

本発明は、筆記者により筆記された文字又は図形をコンピュータに取り込むための装置及びプログラムに関する。   The present invention relates to an apparatus and a program for capturing characters or figures written by a writer into a computer.

現在、個人携帯用端末機またはコンピュータ応用機器にペンの筆記内容を入力するためにLCD(Liquid Crystal Display)タブレットやデジタイザタブレットのような2次元センサ配列を含む入力装置が広く使われている。このような入力装置は、比較的大面積の2次元センサ配列を必要とするために、別の感知平面が必要である。したがって、携帯し難くて所定の空間を占め、またコスト面でも短所がある。   Currently, an input device including a two-dimensional sensor array, such as an LCD (Liquid Crystal Display) tablet or a digitizer tablet, is widely used for inputting pen writing contents into a personal portable terminal or a computer application device. Since such an input device requires a two-dimensional sensor array having a relatively large area, a separate sensing plane is required. Therefore, it is difficult to carry, occupies a predetermined space, and has a disadvantage in terms of cost.

よって、従来においてこのような問題を解消するために、物理的タブレットなしに一般の平面上で単一電子ペンだけを利用した。このとき、この単一電子ペンが文書入力が可能であれば、従来のペン入力装置に比べて広い入力空間を提供されるために自然な筆記入力が可能なので非常に効果的である。   Therefore, conventionally, in order to solve such a problem, only a single electronic pen is used on a general plane without a physical tablet. At this time, if this single electronic pen can input a document, it is very effective because a natural input can be made because a wide input space is provided compared to a conventional pen input device.

このような自己運動感知方式の電子ペンを利用した文書または絵の入力のためには、ある基準座標系に対する電子ペンチップの位置座標を連続的に求められなければならない。
しかし、大部分の筆記動作はペンを筆記面と接触させたダウン状態で行い、移動する場合にはペンを筆記面と接触しないアップ状態となる。ペンの連続的な座標値を求めるためには、接触または非接触状態でもその位置値を精密に測定できる手段を必要とする。
In order to input a document or a picture using such a self-motion sensing type electronic pen, the position coordinate of the electronic pen tip with respect to a certain reference coordinate system must be continuously obtained.
However, most writing operations are performed in a down state in which the pen is in contact with the writing surface, and when moving, the pen is in an up state in which the pen is not in contact with the writing surface. In order to obtain a continuous coordinate value of a pen, a means capable of accurately measuring the position value even in a contact or non-contact state is required.

従来の電子ペン状の入力装置のタイプには、外部座標測定法、内部座標測定法、及び紙面座標印刷法の大きく3種類ある。
外部座標測定法とは、ペン外部でペンチップの座標を測定する方式のことであり、例えば、3角測量方式(特許文献1)、電磁波(特許文献2)、または超音波(特許文献3)の飛行時間差を利用する方式などがある。
There are three types of conventional electronic pen-like input devices: an external coordinate measuring method, an internal coordinate measuring method, and a paper surface coordinate printing method.
The external coordinate measurement method is a method of measuring the coordinates of the pen tip outside the pen. For example, a triangulation method (Patent Document 1), an electromagnetic wave (Patent Document 2), or an ultrasonic wave (Patent Document 3). There are methods that use the time difference of flight.

しかし、前記方式はペンから発信信号を送って外部から受信する形になっているために、携帯用端末機のような装置では、端末機の本体に受信部を装着しなければならないので携帯が不便な短所がある。
内部座標測定法とは、ペン内部でペンチップの座標を測定する内蔵方式で、ペン内部でペンチップの運動を感知する方式であって、初期にはペン内部に装着された2軸または3軸加速度センサを利用して二重積分を通じて電子ペンの位置運動を求める方式(特許文献4、特許文献5、特許文献6)が提案された。
However, since the above method is such that a transmission signal is transmitted from the pen and received from the outside, in a device such as a portable terminal, the receiver must be attached to the main body of the terminal, so There are inconvenient disadvantages.
The internal coordinate measurement method is a built-in method for measuring the coordinates of the pen tip inside the pen, and is a method for sensing the movement of the pen tip inside the pen. Initially, a 2-axis or 3-axis acceleration sensor mounted inside the pen. The system (patent document 4, patent document 5, patent document 6) which calculates | requires the position motion of an electronic pen through double integration using this was proposed.

しかし、加速度センサをペンチップに装着し難い問題点があり、一定の高さに装着する場合にはペン中心軸の傾斜角に対する影響を考慮しないため大きな位置誤差を招く恐れがある。また、加速度信号を二重積分することによって累積誤差が増加するので、正確な運動を測定し難い短所がある。   However, there is a problem that it is difficult to mount the acceleration sensor on the pen tip. When the acceleration sensor is mounted at a certain height, the influence on the tilt angle of the pen center axis is not taken into consideration, which may cause a large position error. In addition, since the accumulated error increases due to double integration of the acceleration signal, there is a disadvantage that it is difficult to measure accurate motion.

このようなペンの傾斜角に対する影響を補正するためにA.TCross社(特許文献7)で2軸以上の加速度センサ素子をペンチップに移動させ、信号処理部はペンの上部に移動させる方法を提案しているが、センサ素子及び信号処理部が分離されていて電気的な雑音の影響が大きくて、ペン先端にインクを装着できない問題点がある。   In order to correct the influence on the tilt angle of the pen, A.TCross (Patent Document 7) proposes a method of moving the acceleration sensor element of two or more axes to the pen tip and moving the signal processing unit to the upper part of the pen. However, since the sensor element and the signal processing unit are separated and the influence of electrical noise is large, there is a problem that ink cannot be attached to the tip of the pen.

一方、Seiko社(特許文献8)では傾斜角補正のために2軸加速度と2ジャイロを利用して加速度は二重積分でその位置を求め、ペンの角速度を単積分してペンの傾斜角を測定する方式を提案している。また、Richo社(特許文献9、特許文献10)ではペン内部に3軸加速度センサと3軸ジャイロセンサを内蔵して一般的な3次元筆記運動をするペンチップの位置を求める方法を提示している。   On the other hand, Seiko Co., Ltd. (Patent Document 8) uses biaxial acceleration and 2-gyro to correct the tilt angle, finds the position of the acceleration by double integration, and calculates the tilt angle of the pen by simply integrating the angular velocity of the pen. A method of measuring is proposed. In addition, Richo (Patent Documents 9 and 10) presents a method for obtaining the position of a pen tip that performs a general three-dimensional writing motion by incorporating a three-axis acceleration sensor and a three-axis gyro sensor inside the pen. .

しかし、入力する平面が常に重力方向に垂直でなければならないために使用上の制約があり、前記慣性センサ(加速度センサ、ジャイロ)を利用する方式において加速度は二重積分、角速度は単積分を通じてペンの位置及び角度を求めるが、センサ信号の雑音やドリフトにより加速度系の場合は時間の自乗累乗、ジャイロの場合には時間に比例する形に累積誤差が増加して精密なペンチップの運動を推定し難い問題点がある。   However, since the input plane must always be perpendicular to the direction of gravity, there is a limitation in use. In the method using the inertial sensor (acceleration sensor, gyro), acceleration is pen-integrated through double integration and angular velocity is pen-integrated through single integration. The position and angle of the sensor are estimated, but due to noise and drift of the sensor signal, the accumulative error increases in proportion to the square of the time in the acceleration system and proportional to the time in the case of the gyro to estimate the precise pen tip movement. There are difficult problems.

前記累積誤差を減らすために、最近インターセンス社では3軸加速度センサ及び3軸ジャイロを使用したペン装置に超音波センサを追加して、慣性センサ(加速度、角速度)から発生する位置累積誤差を減らす技術を提示している。しかし、このような外部センサの追加は携帯性に悪いという問題点がある。   In order to reduce the accumulated error, Intersense recently added an ultrasonic sensor to a pen device using a three-axis acceleration sensor and a three-axis gyro to reduce the position accumulated error generated from the inertial sensor (acceleration, angular velocity). Presenting technology. However, there is a problem that the addition of such an external sensor is not portable.

また、これらの改善を行ったものとして、特許文献11では3軸の加速度センサに加えて、電子ペンの中心軸の筆記面に対する傾斜角及び筆記面に対する高さを測定するための光学式3次元測定装置を設けて、この筆記面との高さを用いて、3軸加速度センサからの位置座標を補正することによって精度を高めたものがある。   In addition, as a result of these improvements, in Patent Document 11, in addition to a three-axis acceleration sensor, an optical three-dimensional measurement for measuring the tilt angle of the center axis of the electronic pen with respect to the writing surface and the height with respect to the writing surface. Some have improved the accuracy by providing a measuring device and correcting the position coordinates from the triaxial acceleration sensor using the height of the writing surface.

しかし、この方法では高さ方向に関しては精度よく位置検出を行うが、筆記面に接した状態での移動量検出は加速度センサにて測定を行わざるを得ないので、細かい文字の入力などには適しない。
紙面座標印刷法とは、紙面上一面に細かい点で座標の記録を行い、この座標をペンに実装された2次元イメージセンサ(カメラ)にて読み込み、その座標にてペンの軌跡を算出する方法であって、特許文献12などが提案されている。この方法では紙面上に書かれた座標を読み込むことで、ペンの軌跡を検出するので正確である。
However, this method accurately detects the position in the height direction, but the movement amount detection in contact with the writing surface must be measured with an acceleration sensor. Not suitable.
The paper coordinate printing method is a method in which coordinates are recorded with fine points on one surface of the paper, the coordinates are read by a two-dimensional image sensor (camera) mounted on the pen, and the locus of the pen is calculated based on the coordinates. And patent document 12 etc. are proposed. This method is accurate because the locus of the pen is detected by reading the coordinates written on the paper.

しかし、この方法では予め座標を書いた紙においてのみ動作が可能であり、普通の一般紙では自由にペンの軌跡がとれない問題があった。
米国特許第5166668号明細書 米国特許第5977958号明細書 米国特許第4478674号明細書 米国特許第5247137号 国際公開WO第94/09447号パンフレット 米国特許第5587558号明細書 米国特許第5434371号明細書 特開平6−67799号公報 米国特許第5902968号明細書 米国特許第5981884号明細書 特開2003−029915号公報 国際公開第WO92/17859号パンフレット
However, this method can operate only on the paper on which the coordinates are written in advance, and there is a problem that the locus of the pen cannot be taken freely on ordinary ordinary paper.
US Pat. No. 5,166,668 US Pat. No. 5,977,958 U.S. Pat. No. 4,478,674 US Pat. No. 5,247,137 International Publication WO 94/09447 Pamphlet US Pat. No. 5,587,558 US Pat. No. 5,434,371 JP-A-6-67799 US Pat. No. 5,902,968 US Pat. No. 5,981,884 JP 2003-029915 A International Publication No. WO92 / 17859 Pamphlet

以上より、従来の電子ペンは、様々な問題点を抱えており、必ずしも満足のいくものではなかった。
そこで、本発明では、加速度センサやイメージセンサを利用した新しいペンの軌跡取得方式を採用したペン型データ入力装置、およびそのプログラムを提供する。
As described above, the conventional electronic pen has various problems and is not always satisfactory.
Therefore, the present invention provides a pen-type data input device employing a new pen trajectory acquisition method using an acceleration sensor or an image sensor, and a program thereof.

請求項1に係るペン型データ入力装置は、筆記対象媒体に筆記した文字又は図形を、電子データとして取得するペン型データ入力装置において、該ペン型データ入力装置を移動させた場合に生じる加速度を周期的に検出する加速度検出手段と、該加速度検出手段により検出される加速度に基づいて当該ペン型データ入力装置の移動速度を計算する速度計算手段と、この速度計算手段により速度が計算される毎に速度の値を更新しながら保存する速度保存手段と、この速度保存手段で保存された前回速度の値と前記計算手段で計算された現在速度の値に基づいて、前記ペン型データ入力装置の移動した軌跡を示す軌跡情報を取得する第1の軌跡情報取得手段と、インクを用いて前記筆記対象媒体に前記文字又は前記図形を筆記する筆記手段と、該筆記手段により筆記された前記文字又は前記図形を撮像する撮像手段と、該撮像手段により撮像された複数の前記文字又は前記図形の画像に基づいて、前記筆記手段により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を取得する第2の軌跡情報取得手段と、前記筆記対象媒体に対して該ペン型データ入力装置のペン先が接しているか離れているかを検出する検出手段と、該検出手段により前記ペン先が離れていると検出された場合に前記第1の軌跡情報取得手段を選択し、前記ペン先が接していると検出された場合に前記第2の軌跡情報取得手段を選択して前記軌跡情報を取得する選択手段と、前記ペン先が前記筆記対象媒体に接したことが前記検出手段によって検出されたことにより、前記速度保存手段により保存された速度の値を0に補正する補正手段と、を備えることを特徴とする。 The pen-type data input device according to claim 1 is a pen-type data input device that acquires, as electronic data, a character or a figure written on a writing target medium, and an acceleration generated when the pen-type data input device is moved. Periodically detecting acceleration detecting means, speed calculating means for calculating the moving speed of the pen-type data input device based on the acceleration detected by the acceleration detecting means, and each time the speed is calculated by the speed calculating means Based on the previous speed value stored by the speed storing means and the current speed value calculated by the calculating means, the pen-type data input device First trajectory information acquisition means for acquiring trajectory information indicating the trajectory moved, and writing means for writing the character or the graphic on the writing target medium using ink; An imaging unit that images the character or the graphic written by the writing unit, and the character or the graphic written by the writing unit based on a plurality of images of the character or the graphic captured by the imaging unit Second trajectory information acquisition means for acquiring trajectory information indicating the trajectory of the pen, detection means for detecting whether the pen tip of the pen-type data input device is in contact with or away from the writing target medium, and the detection The first trajectory information acquisition unit is selected when it is detected by the means that the pen tip is separated, and the second trajectory information acquisition unit is selected when the pen tip is detected as touching. a selecting means for obtaining the locus information and the speed of the nib by it in contact with said writing target medium is detected by said detecting means, stored by the speed storage unit Characterized in that it comprises a correcting means for correcting the value to 0, the.

このように構成することによって、ペンが紙面から離れている場合には加速度検出手段を用いて電子ペンの軌跡を解析し、ペンが紙面に接している場合には撮像手段を用いてペンの軌跡を解析することができ、さらにペンが筆記面上に置かれたときには、加速度検出手段から得た加速度に基づいて演算される速度の累積誤差を補正することができる。With this configuration, when the pen is away from the paper surface, the trajectory of the electronic pen is analyzed using the acceleration detecting unit, and when the pen is in contact with the paper surface, the pen trajectory is used using the imaging unit. Further, when the pen is placed on the writing surface, it is possible to correct the accumulated error of the speed calculated based on the acceleration obtained from the acceleration detecting means.

また、請求項2に記載の発明によれば、前記第2の軌跡情報取得手段は、前記撮像手段により今回撮像された前記画像と前回撮影された前記画像との比較をして、該比較結果に基づいて前記筆記手段により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を生成することを特徴とするAccording to the invention of claim 2 , the second trajectory information acquisition unit compares the image captured this time by the imaging unit with the image captured last time, and compares the result. and generating the character or locus information indicating a locus of the figure is written by said writing means based on.

このように構成することによって、連続的に撮影した画像間の差より、軌跡情報を求めることができる。
また、請求項3に記載の発明によれば、前記第2の軌跡情報取得手段は、前記筆記手段により筆記している場合、前記第1の軌跡情報取得手段により今回取得した軌跡情報と前回取得した軌跡情報とに基づいて、前記比較をする範囲を決定することを特徴とする
By configuring in this way, the trajectory information can be obtained from the difference between continuously captured images.
According to a third aspect of the present invention, when the second trajectory information acquisition means is writing by the writing means, the trajectory information acquired this time by the first trajectory information acquisition means and the previous acquisition. based on the trajectory information, and determines the range of the comparison.

このように構成することによって、2つの画像の比較の範囲を筆記している部分付近に限定することで処理の迅速化、処理負担の軽減が図れる。
また、請求項4に記載の発明によれば、前記ペン型データ入力装置は、さらに、前記第1又は前記第2の軌跡情報取得手段により取得した前記軌跡情報を外部装置に送信する送信手段を備えることを特徴とする
By configuring in this way, it is possible to speed up the processing and reduce the processing load by limiting the comparison range of two images to the vicinity of the portion where writing is performed.
According to a fourth aspect of the present invention, the pen-type data input device further includes transmission means for transmitting the trajectory information acquired by the first or second trajectory information acquisition means to an external device. It is characterized by providing.

このように構成することによって、電子ペンで筆記した内容を無線通信等を介してホストコンピュータに送信することができる。
また、請求項5に記載の発明によれば、前記ペン型データ入力装置は、前記外部装置と通信が接続されている場合は、前記送信手段により前記軌跡情報を送信し、前記外部装置と前記通信が切断されている場合は、前記軌跡情報を保持することを特徴とする
With this configuration, the content written with the electronic pen can be transmitted to the host computer via wireless communication or the like.
According to the invention described in claim 5, when the pen-type data input device is connected to the external device, the pen-type data input device transmits the trajectory information by the transmitting means, and the external device and the If the communication is disconnected, characterized by holding the trajectory information.

このように構成することによって、ホストコンピュータと通信可能な状態にある場合には、電子ペンで筆記した内容をリアルタイムで無線通信等を介してホストコンピュータに送信することができ、通信不可能な状態にある場合には電子ペンに内蔵されているメモリにその内容を記憶させておくことができる。   By configuring in this way, when the communication with the host computer is possible, the content written with the electronic pen can be transmitted to the host computer via wireless communication or the like in real time, and the communication is impossible. In such a case, the contents can be stored in a memory built in the electronic pen.

本発明を用いると、撮像手段で撮影された画像と加速度検出手段で検出された加速度とを解析することで、精度良いペンの移動検出が可能となり、またペンが筆記面上に置かれたときには、加速度検出手段から得た加速度に基づいて演算される速度の累積誤差を補正することができる。 By using the present invention, it is possible to accurately detect the movement of the pen by analyzing the image taken by the imaging means and the acceleration detected by the acceleration detecting means, and when the pen is placed on the writing surface. The accumulated error of the speed calculated based on the acceleration obtained from the acceleration detecting means can be corrected.

(実施形態1)
本実施形態における電子ペンの特徴は、以下の3つの機能を有していることである。
(1)筆圧に応じてインクの量を電子で制御を行い、ペン字の太さが調整できる。
(2)普通紙に書いた文字や図形のペン軌跡と筆圧を記憶することができる。
(3)無線通信にて上記ペン軌跡をパーソナルコンピュータ(以下、PCという)に転送を行うことができる。それでは、本実施形態について以下に説明する。
(Embodiment 1)
The feature of the electronic pen in the present embodiment is that it has the following three functions.
(1) The amount of ink can be controlled electronically according to the writing pressure, and the thickness of the pen character can be adjusted.
(2) The pen trajectory and writing pressure of characters and figures written on plain paper can be stored.
(3) The pen locus can be transferred to a personal computer (hereinafter referred to as PC) by wireless communication. The present embodiment will be described below.

図1は、本実施形態における電子ペン1の構成図である。筆圧に応じてペン字の太さが調整できるように、インクジェット17とインクを紙面上に吹き付けるためのインクジェットノズル2を有している。ノズル2は直接紙面上と接しないように、ペン先3がノズル2の隣に実装されている。このペン先3からインクは出ることはなく、ペン1で図形を書いたときに違和感の無いような材料を選んで実装するものとする。   FIG. 1 is a configuration diagram of an electronic pen 1 in the present embodiment. The inkjet 17 and the inkjet nozzle 2 for spraying ink onto the paper surface are provided so that the thickness of the pen character can be adjusted according to the writing pressure. A pen tip 3 is mounted next to the nozzle 2 so that the nozzle 2 does not directly contact the paper surface. Ink does not come out from the pen tip 3, and a material that does not feel uncomfortable when a figure is written with the pen 1 is selected and mounted.

ペン先3の根元には圧力センサ4が実装されており、ペン先3にかかる圧力をこのセンサ4で検出する。これにより、圧力に応じてペン字の太さを調整できるようにしている。さらに、この電子ペン1はカラーインクカートリッジ5を装着できるようになっており、インクカートリッジ5には黒インクだけではなくフルカラーの色が作成可能なようにCMYK(シアン、マゼンタ、イエロー、ブラック)の4種類の色を含んでいる。ペン1の色は選択制御が可能になっており、ペン1の色に応じたインクとインクの量が前述したインクジェット17によって、ノズル2を介して筆記面に吹き付け選択された色になるように描画される。   A pressure sensor 4 is mounted at the base of the pen tip 3, and the pressure applied to the pen tip 3 is detected by the sensor 4. As a result, the thickness of the pen character can be adjusted according to the pressure. Further, the electronic pen 1 can be equipped with a color ink cartridge 5, and the ink cartridge 5 is made of CMYK (cyan, magenta, yellow, black) so that not only black ink but also a full color can be created. Includes four different colors. The color of the pen 1 can be selected and controlled so that the ink and the amount of ink corresponding to the color of the pen 1 are selected by being sprayed onto the writing surface via the nozzle 2 by the inkjet 17 described above. Drawn.

また、ペン1の軌跡を検出するために3軸加速センサ6を有しており、加速センサの精度不足を補うために、紙面に描かれた図形を読み出すためのレンズ7、CMOSイメージセンサ8も有している。また、読み出された画像を処理したり、ペン軌跡などを計算したりするためのプロセッサ9と計算された軌跡や筆圧などを記憶するためのメモリ10も有する。電子回路を動作させるための電池11も実装されている。RF通信回路13は、ホストコンピュータへペンの軌跡等の情報を送信するための回路である。   In addition, a triaxial acceleration sensor 6 is provided to detect the locus of the pen 1, and a lens 7 and a CMOS image sensor 8 for reading a figure drawn on a paper surface are also provided to compensate for the insufficient accuracy of the acceleration sensor. Have. In addition, a processor 9 for processing the read image or calculating a pen locus and the like and a memory 10 for storing the calculated locus and writing pressure are also provided. A battery 11 for operating the electronic circuit is also mounted. The RF communication circuit 13 is a circuit for transmitting information such as a pen locus to the host computer.

次に、電子ペン1の描画の動作を図2、図3を用いて説明する。
図2は、本実施形態におけるインクジェットの制御ブロック図を示す。同図は、本実施形態における電子ペン1の構成図である図1の一部ブロックを信号の流れを加えて詳細な回路図にしたものである。本実施形態にかかる電子ペン1を用いて紙(筆記物)に描画を行う場合には、通常のペンと同じようにペン先3を筆記物に当てて滑らして描画を行えばよい。
Next, the drawing operation of the electronic pen 1 will be described with reference to FIGS.
FIG. 2 is a control block diagram of inkjet in the present embodiment. FIG. 2 is a detailed circuit diagram of the partial block of FIG. 1, which is a configuration diagram of the electronic pen 1 in the present embodiment, with a signal flow added thereto. When drawing on paper (written material) using the electronic pen 1 according to the present embodiment, the drawing may be performed by sliding the pen tip 3 against the written material in the same manner as a normal pen.

ペン先3は圧力センサ4と直結しており、ペン先3にかかる圧力がそのまま圧力センサ4に到達できるよう実装されている。したがって、ユーザ(筆記者)がペン1を使用するとき、その筆圧を圧力センサ4で検出できるようになっている。本実施形態での圧力センサ4はピエゾ抵抗型圧力センサを用いており、圧力に応じて抵抗値の変わる性質の材料を用いている。   The pen tip 3 is directly connected to the pressure sensor 4 and is mounted so that the pressure applied to the pen tip 3 can reach the pressure sensor 4 as it is. Therefore, when the user (writer) uses the pen 1, the writing pressure can be detected by the pressure sensor 4. The pressure sensor 4 in the present embodiment uses a piezoresistive pressure sensor, and uses a material whose resistance value changes according to the pressure.

センサ4には定電流を流して、センサ4端の電圧をプロセッサ9内のAD変換器902で圧力値に応じたデジタル値を得ている。このデジタル圧力値はCPU901で読み出される。CPU901はこの数値に応じて、カラーインクカートリッジ5からインクジェット17に送られるインクの量の調整を行う。インク量の調整は次のような方法で行う。   A constant current is passed through the sensor 4, and the voltage at the end of the sensor 4 is obtained by the AD converter 902 in the processor 9 in accordance with the pressure value. This digital pressure value is read by the CPU 901. The CPU 901 adjusts the amount of ink sent from the color ink cartridge 5 to the inkjet 17 in accordance with this numerical value. The ink amount is adjusted by the following method.

まず、黒色を描画するときに使う黒インク(K)の量を1としたときの、現在の描画を行おうとしている色(C1)を作成するためのCMYKのインク混合比をKc,Km,Ky,Kkとする。
この混合比については、予め描画したい色に最も近い色になるためのインク混合比を調べておき、その混合比を導出する方法のプログラミングを行うか、またはそれぞれの色に対応するインクの混合比をメモリなどに記憶されることで容易に混合比は得ることはできる。
First, assuming that the amount of black ink (K) used for drawing black is 1, the ink mixing ratio of CMYK for creating the current color (C1) to be drawn is set to Kc, Km, Let Ky, Kk.
As for this mixing ratio, the ink mixing ratio for obtaining the color closest to the color to be drawn is examined in advance, and programming of a method for deriving the mixing ratio is performed, or the mixing ratio of the ink corresponding to each color is performed. Is stored in a memory or the like, so that the mixing ratio can be easily obtained.

次に、ペン先3にかかる最大の圧力の値をPmaxとし、現在のペン圧力をPとすると、それぞれインクの混合比はKc*P/Pmax,Km*P/Pmax,Ky*P/Pmax,Kk*P/Pmaxとなる。これらの混合比に応じてCPU901はインクカートリッジ5からインクジェット17に流れるように、各弁103(103a,103b,103c,103d)を制御する。小型の弁は通常流出量をアナログ的に中間値を制御できないので、弁の開いている時間(開)とOFF時間(閉)を高速に制御することで中間量を作成する。   Next, assuming that the maximum pressure value applied to the pen tip 3 is Pmax and the current pen pressure is P, the ink mixing ratios are Kc * P / Pmax, Km * P / Pmax, Ky * P / Pmax, respectively. Kk * P / Pmax. In accordance with these mixing ratios, the CPU 901 controls each valve 103 (103a, 103b, 103c, 103d) so as to flow from the ink cartridge 5 to the inkjet 17. Since a small valve cannot normally control the intermediate value of the outflow amount in an analog manner, the intermediate amount is created by controlling the valve open time (open) and OFF time (close) at high speed.

図3は、本実施形態におけるデューティ変調によるペンの線の太さ制御を示す。同図は、3種類の開閉時間に応じて紙面上のインクの径(ペン時の太さ)を変化させるためのデューティ変調を示す。
図3(a)は筆圧が小さいときのデューティ変調を示し、この場合、インクの流出量が少ないので、細い線(図3(a)右図)を描くことができる。図3(b)は筆圧が中間のときのデューティ変調を示し、この場合、インクの流出量が中程度であるので、中間の太さの線(図3(b)右図)を描くことができる。図3(c)は筆圧が大きいときのデューティ変調を示し、この場合、インクの流出量が多いので、太い線を描くことができる(図3(c)右図)。
FIG. 3 shows pen line thickness control by duty modulation in this embodiment. This figure shows duty modulation for changing the diameter of ink on the paper (thickness at the time of pen) according to three types of opening and closing times.
FIG. 3A shows the duty modulation when the writing pressure is low. In this case, since the amount of outflow of ink is small, a thin line (the right figure in FIG. 3A) can be drawn. FIG. 3B shows duty modulation when the writing pressure is intermediate. In this case, since the outflow amount of ink is medium, an intermediate thickness line (the right figure in FIG. 3B) is drawn. Can do. FIG. 3C shows duty modulation when the writing pressure is large. In this case, since the amount of ink flowing out is large, a thick line can be drawn (the right diagram in FIG. 3C).

このようにデューティ変調により、弁103の開閉時間を制御することによって、ペンの圧力に応じてインクジェットノズル2からインクを噴出すことが可能になるから、所望の色のペンの太さが制御可能である。
次に、本実施形態における電子ペン1を用いて普通紙に描画を行った場合、その描画内容を記録するためにペン1の軌跡解析を行う。
By controlling the opening / closing time of the valve 103 by duty modulation in this way, it becomes possible to eject ink from the inkjet nozzle 2 in accordance with the pressure of the pen, so that the thickness of the pen of a desired color can be controlled. It is.
Next, when drawing is performed on plain paper using the electronic pen 1 in the present embodiment, a trajectory analysis of the pen 1 is performed in order to record the drawing contents.

図4は、本実施形態における3軸加速度センサ6を用いた位置検出回路の構成を示したものであり、ペン1の基本的な軌跡解析を行うための装置を示したブロック図である。本実施形態の電子ペン1を用いて、紙(筆記物)への描画の動作を前述したが、その描画したときのペン1の軌跡を解析し、データとして取得が可能になっている。   FIG. 4 shows a configuration of a position detection circuit using the triaxial acceleration sensor 6 in the present embodiment, and is a block diagram showing an apparatus for performing a basic trajectory analysis of the pen 1. Although the drawing operation on the paper (written material) using the electronic pen 1 of the present embodiment has been described above, the locus of the pen 1 when the drawing is performed can be analyzed and acquired as data.

3軸加速度センサ6は、ペン1の動きに応じて加速度を検出する装置である。これを用いてペン1の座標を特定するには、ペン1の位置を計算するのに加速度から2重積分を行うことで求めることができる。
3軸加速度センサ6は、空間3軸方向それぞれに加速度を検出できるピエゾ抵抗などを利用した加速度センサ601(X軸),602(Y軸),603(Z軸)で構成され、それぞれの加速度センサ601,602,603は直角に3軸方向(図4は、それぞれの軸の方向をX,Y,Z軸とした)に配置される。
The triaxial acceleration sensor 6 is a device that detects acceleration according to the movement of the pen 1. In order to specify the coordinates of the pen 1 using this, the position of the pen 1 can be calculated by performing double integration from the acceleration.
The triaxial acceleration sensor 6 includes acceleration sensors 601 (X-axis), 602 (Y-axis), and 603 (Z-axis) using piezoresistors that can detect acceleration in each of three spatial directions. Reference numerals 601, 602, and 603 are arranged at right angles in three axial directions (in FIG. 4, the directions of the respective axes are X, Y, and Z axes).

現在MEMS(マイクロ−エレクトロ−メカニカル−システム)で作られた低コストの2軸加速度センサが開発されているので、そのデバイスを2つ用いて3軸加速度センサとして構成しても良い。ピエゾ抵抗は加速度に応じて抵抗値が変わるので、抵抗に定電流を流すことで加速度を電圧値として読み出すことができるようにして、それぞれの電圧値を、セレクタ604を介して、プロセッサ9内のAD変換器902で加速度の値を時分割に連続に読み出せるように構成される。   Currently, a low-cost two-axis acceleration sensor made of MEMS (micro-electro-mechanical system) has been developed, so two devices may be used to form a three-axis acceleration sensor. Since the resistance value of the piezoresistor changes according to the acceleration, the acceleration can be read out as a voltage value by passing a constant current through the resistor, and the respective voltage values are stored in the processor 9 via the selector 604. The AD converter 902 is configured to be able to continuously read acceleration values in a time division manner.

本実施形態ではペン1の軌跡を解析する他の手段として、イメージセンサ8も有している。図4左下に示しているものは筆記面20である。電子ペン1ではこのような筆記面20の画像はレンズ7にてCMOSイメージセンサ8に集光され、イメージセンサ8にて画像データに変換される。本実施形態ではこの画像データはDMA(Direct Memory Accessing)回路903にてメモリ10に送られる。これによってCPU901から画像データを操作することが可能になる。   In the present embodiment, the image sensor 8 is also provided as another means for analyzing the locus of the pen 1. What is shown in the lower left of FIG. In the electronic pen 1, the image on the writing surface 20 is condensed on the CMOS image sensor 8 by the lens 7 and converted into image data by the image sensor 8. In this embodiment, this image data is sent to the memory 10 by a DMA (Direct Memory Accessing) circuit 903. As a result, the image data can be operated from the CPU 901.

ちなみに、CMOSセンサ8は秒100枚の周期(10m秒間隔)で画像データのサンプリングを行い、順番にメモリに送り出すように構成されている。
図5は、本実施形態における3軸加速度センサ6を用いたプロセッサ9での座標位置を得るアルゴリズムを示す。プロセッサ9では、Taskと呼ばれる単位の処理を複数実行することが可能なようにプログラムされている。
Incidentally, the CMOS sensor 8 is configured to sample the image data at a cycle of 100 sheets per second (at intervals of 10 milliseconds) and sequentially send them to the memory.
FIG. 5 shows an algorithm for obtaining a coordinate position in the processor 9 using the triaxial acceleration sensor 6 in the present embodiment. The processor 9 is programmed so as to be able to execute a plurality of processes called “Task”.

このTask、すなわちTask1では、まず、3軸加速度センサ6からそれぞれの軸の現在の加速度を読み出す(ステップS1、以下ステップをSという)。変数aはそれぞれの軸の加速度の値を有する3次元のベクトルである。加速度aを積分して速度v(3次元ベクトル)を計算する(S2)。すなわち、加速度aを積分するとv’+aTが得られ(v’は前回の速度であり、Tは時間である)、これを速度vとする。さらに積分して3軸絶対位置Px(3次元ベクトル)を計算する(S3)。すなわち、前回の絶対位置Pxに今回移動した距離(v’+v)T/2を加算したものを、Pxとする。このプログラムでは、誤差を少なくするために速度の値として前回の値の平均を用いている(S3)ため、以前の値をv’として保存しておく(S4)。   In this Task, that is, Task 1, first, the current acceleration of each axis is read from the triaxial acceleration sensor 6 (Step S <b> 1, Step is hereinafter referred to as S). The variable a is a three-dimensional vector having acceleration values for the respective axes. The velocity v (three-dimensional vector) is calculated by integrating the acceleration a (S2). That is, if the acceleration a is integrated, v '+ aT is obtained (v' is the previous speed and T is time), and this is the speed v. Further integration is performed to calculate a three-axis absolute position Px (three-dimensional vector) (S3). That is, a value obtained by adding the distance (v ′ + v) T / 2 moved this time to the previous absolute position Px is defined as Px. In this program, since the average of the previous value is used as the speed value in order to reduce the error (S3), the previous value is stored as v '(S4).

その後、T秒経過するまで待機する(S5)。これはこのTaskのみ処理を行うと他のTaskの処理ができないためである。その後は上記の処理S1−S5を繰り返す。Pxのメモリ内容を読み出すことで、常に現在の位置Pxが読み出し可能になる。このPxは、同時に実行可能な後述するTask2からアクセスすることができる。   Then, it waits until T second passes (S5). This is because if only this task is processed, other tasks cannot be processed. Thereafter, the above processes S1-S5 are repeated. By reading the memory contents of Px, the current position Px can always be read. This Px can be accessed from Task 2 described later, which can be executed simultaneously.

しかしながら、この方法だけでペンの軌跡を得た場合には、通常の加速度センサの加速度検出間隔時間は数m秒であるために検出時間間の加速度変化の誤差が生じる。座標を得るのに積分を行うためにこの誤差も積分されるので、かなり大きな誤差を生じることになる。現状の加速度センサでは、100DPI(Dot Per Inch)の分解能の軌跡を得るのは困難である。   However, when a pen trajectory is obtained only by this method, an acceleration detection interval time of a normal acceleration sensor is several milliseconds, and an error in acceleration change between detection times occurs. This error is also integrated to perform the integration to obtain the coordinates, resulting in a fairly large error. With the current acceleration sensor, it is difficult to obtain a resolution locus of 100 DPI (Dot Per Inch).

そのため、本実施形態ではカメラを用いてその問題を解決する。すなわち、カメラで撮影した画像を解析することにより、ペンの移動距離を算出する。前述したように筆記者が紙面上に文字図形を描画しているときは、圧力センサにて筆記しているか否かの検出が可能である。   Therefore, in this embodiment, the problem is solved using a camera. That is, the moving distance of the pen is calculated by analyzing an image photographed by the camera. As described above, when the writer is drawing a character figure on the paper surface, it is possible to detect whether or not the writing is performed by the pressure sensor.

図6は、本実施形態におけるカメラで撮影した文字の筆記例を示す。ここで、カメラとは、本実施形態において少なくともレンズ7とイメージセンサ8とからなる撮像系をいう。同図において、筆記者が電子ペン1で「あ」の文字を描画している途中の連続(10m秒間隔)で撮影された2つの画像図6(a),(b)を示している。   FIG. 6 shows a writing example of characters photographed by the camera in the present embodiment. Here, the camera refers to an imaging system including at least the lens 7 and the image sensor 8 in the present embodiment. FIG. 6 shows two images (a) and (b) taken continuously (at intervals of 10 milliseconds) while the writer is drawing the character “A” with the electronic pen 1.

電子ペン1では、このような筆記面20の画像はレンズ7にてCMOSイメージセンサ8に集光され、イメージセンサ8にて画像データに変換される。そして、この画像データはDMA(Direct Memory Accessing)回路903を介して、メモリ10に送られる。   In the electronic pen 1, such an image on the writing surface 20 is condensed on the CMOS image sensor 8 by the lens 7 and converted into image data by the image sensor 8. The image data is sent to the memory 10 via a DMA (Direct Memory Accessing) circuit 903.

これによってCPU901から画像データを操作することが可能になる。ちなみにCMOSセンサ8は秒100枚の周期(10m秒間隔)で画像データのサンプリングを行い、順番にメモリに送り出すように構成されている。この連続する2つの画像から図7、図8のアルゴリズムによってペンの移動距離du,dvが計算できる。   As a result, the image data can be operated from the CPU 901. Incidentally, the CMOS sensor 8 is configured to sample the image data at a cycle of 100 sheets per second (at intervals of 10 milliseconds) and sequentially send them to the memory. The pen movement distances du and dv can be calculated from the two consecutive images by the algorithm shown in FIGS.

図7は、本実施形態における画像データに基づくペン座標位置解析タスクのアルゴリズムを示す。前述した3軸加速センサ8で計算される座標系X,Y,Zと区別するために、カメラの画像から計算される紙面上の2次元の座標系をU,V座標とする。また、本実施形態においては、このタスクはTask2という。   FIG. 7 shows an algorithm of a pen coordinate position analysis task based on image data in the present embodiment. In order to distinguish from the coordinate system X, Y, Z calculated by the three-axis acceleration sensor 8 described above, a two-dimensional coordinate system on the paper surface calculated from the camera image is set as U, V coordinates. In this embodiment, this task is called Task2.

まず、電子ペン1が紙面20と接している状態(以下、ペンダウンという)か、または紙面20から離れた状態(以下、ペンアップという)かを判別する(S10)。これの判断は、圧力センサ4の検出結果に基づいて行う。ペンアップの状態の場合には、S10で「No」へ進み、ペンダウンされるのを待つ。ペンダウンされると、S10で「Yes」へ進む。   First, it is determined whether the electronic pen 1 is in contact with the paper surface 20 (hereinafter referred to as pen-down) or away from the paper surface 20 (hereinafter referred to as pen-up) (S10). This determination is made based on the detection result of the pressure sensor 4. In the case of the pen-up state, the process proceeds to “No” in S10 and waits for the pen-down. When the pen is down, the process proceeds to “Yes” in S10.

次に、カメラより画像が入力されるのを待つ(S11)。カメラより画像が入力されるまでは、S11で「No」へ進み、カメラより画像が入力されると、S11で「Yes」へ進む。次に、入力される2つの画像を照合(マッチング)する事前処理として、画像サイズの縮小を行う(S12)。これは、入力される画像をそのままマッチングするのには画素数が多いので入力画像から縮小画像を作成する処理を行う(これについては、後述する)。   Next, it waits for an image to be input from the camera (S11). Until an image is input from the camera, the process proceeds to “No” in S11. When an image is input from the camera, the process proceeds to “Yes” in S11. Next, image size reduction is performed as pre-processing for matching (matching) two input images (S12). In this method, since the number of pixels is large in order to match an input image as it is, a process of creating a reduced image from the input image is performed (this will be described later).

次に、マッチングの計算ルーチンの呼び出し(S13)、周期的に撮影された画像のうち、今回入力された画像と前回のタイミングで入力された画像の2つの画像に基づいて移動ベクトルDuを算出する(これについては、後述する)。こうして、直前のペン座標Puに移動ベクトルDuを加算して現在の座標位置が更新される。   Next, the matching calculation routine is called (S13), and the movement vector Du is calculated based on two images, the image input at this time and the image input at the previous timing, among the periodically photographed images. (This will be described later). In this way, the current coordinate position is updated by adding the movement vector Du to the immediately preceding pen coordinate Pu.

図8は、図7のS13のマッチングと移動ベクトルDuの計算のアルゴリズムを示す。このアルゴリズムでは、マッチングは、対比する2枚の画像について、対応する画素同士の画素値の差分の総和を算出することで行う。マッチングを行う画像間の距離(2枚の画像のズレ量)の範囲は引数で渡すようにしている。同図のRANGEは、電子ペン1が移動可能と思われる範囲の最大値(単位は画素数)を示しており、U軸側はDu_Begin〜Du_End、V軸側はDv_Begin〜Dv_Endによって範囲が指定できる。ここでは、画像サンプリング間で通常のペン速度において移動可能な最大の距離RANGEの範囲でマッチングできるよう、Du,Dvともに−Rangeから+Rangeを指定している(Du_Begin=−RANGE、Du_End=+RANGE、Dv_Begin=−RANGE、Dv_End=+RANGE)。   FIG. 8 shows an algorithm for the matching of S13 in FIG. 7 and the calculation of the movement vector Du. In this algorithm, matching is performed by calculating the sum of differences in pixel values between corresponding pixels for two images to be compared. The range of the distance between images to be matched (the amount of deviation between two images) is passed as an argument. The RANGE in the figure shows the maximum value of the range in which the electronic pen 1 is considered to be movable (the unit is the number of pixels). The range can be specified by Du_Begin to Du_End on the U axis side and Dv_Begin to Dv_End on the V axis side . In this example, −Range to + Range are specified for both Du and Dv so that matching is possible within the range of the maximum distance RANGE that can be moved at normal pen speed between image samplings (Du_Begin = −RANGE, Du_End = + RANGE, Dv_Begin). = −RANGE, Dv_End = + RANGE).

S20,S21は、この引数で指定された2枚の画像間での移動距離(縦、横方向のズレ量)du,dvの範囲を順番に設定している。
そして、S22で、2枚の画像のマッチングを以下に示す式の計算により行っている。
In S20 and S21, the ranges of the movement distances (vertical and horizontal deviation amounts) du and dv between the two images designated by this argument are set in order.
In S22, the matching of the two images is performed by calculating the following equation.

Figure 0004325332
Figure 0004325332

p(n,u,v)は今回の画像nの座標u,vの画素値であって、p(n−1,u−du,v−dv)は、前回の画像n−1において座標点(u,v)から(du,dv)離れた画素の値である。画素値は8ビットで示され、黒が0で白が最大値255を取るものとする。MU,MVはこれらの画像のU,V軸方向の画像サイズであり、マッチングされる画像の範囲を示す。D(du,dv)は2枚の画像を移動距離du,dvずらした状態で、重なった画素同士の画素値の差分の合計した結果を表す。対応する画素の値が同じであるとき差は0になるので、算出されたDが大きいほど(0に近いほど)2枚の画像は類似していることになる。   p (n, u, v) is the pixel value of the coordinates u, v of the current image n, and p (n-1, u-du, v-dv) is a coordinate point in the previous image n-1. This is the value of a pixel that is (du, dv) away from (u, v). The pixel value is represented by 8 bits, and black is 0 and white has a maximum value of 255. MU and MV are image sizes in the U and V axis directions of these images, and indicate the range of images to be matched. D (du, dv) represents the result of summing up the differences in pixel values of the overlapping pixels in a state where the two images are shifted by the movement distances du and dv. Since the difference is 0 when the corresponding pixel values are the same, the larger the calculated D is, the closer the two images are.

S22の計算処理は、dvおよびduを以下に示すdu,dvの範囲で1画素ずつ変化させて、前回の画像をずらしながら繰り返し実行される(S20〜S24)。   The calculation process of S22 is repeatedly executed while changing dv and du one pixel at a time in the range of du and dv shown below and shifting the previous image (S20 to S24).

Figure 0004325332
Figure 0004325332

S20からS24で繰り返し行われた計算が終了すると、S25で、計算されたDの最大値(最も0に近いもの)が探し出される。このときのdu,dvで前回の画像を取らしたときが最もこれらの2枚の画像が類似しているといえるから、このときの値が2つの画像間でペンが移動したベクトルDuを表すと決定する(S26)。このようにして得た移動ベクトルの値を前回までの座標位置データに加算することで、逐次ペンの位置の座標Pu(=Pu+Du)を計算することができる。   When the calculation repeatedly performed from S20 to S24 is completed, the calculated maximum value of D (the one closest to 0) is searched for in S25. Since it can be said that these two images are most similar when the previous image is taken with du and dv at this time, the value at this time represents a vector Du in which the pen moves between the two images. Determine (S26). By adding the value of the movement vector thus obtained to the previous coordinate position data, the coordinates Pu (= Pu + Du) of the pen position can be calculated sequentially.

次に、カメラの分解能について検討してみる。図8のアルゴリズムを用いて、入力される画像から移動距離が画素単位で計算できる。したがって、ペンの軌跡を記憶するのに必要とする以上にカメラの分解能があればよい。通常、ペンの軌跡を再現するのに100DPIぐらいが望ましいといわれているので、1mmあたり4本以上の走査ラインをもつようにイメージセンサと光学設計を行えばよい。   Next, consider the resolution of the camera. Using the algorithm of FIG. 8, the moving distance can be calculated in units of pixels from the input image. Therefore, it is sufficient if the resolution of the camera is more than necessary for storing the pen trajectory. Usually, it is said that about 100 DPI is desirable to reproduce the pen trajectory, so the image sensor and the optical design should be designed so that there are four or more scanning lines per mm.

本実施形態では、画角12mmで、イメージセンサは480×480を用いた。ここで必要以上の解像度であるのは、後述する他の動作に使用する理由からである。マッチングを行うのにこの画像数はオーバスペックなので、マッチングを行う画像は、図7のS12で解像度程度128×128まで画素数を落としている。   In this embodiment, the angle of view is 12 mm, and the image sensor is 480 × 480. The reason why the resolution is higher than necessary here is because it is used for other operations described later. Since this number of images is over-spec for matching, the number of pixels of the image to be matched is reduced to about 128 × 128 resolution in S12 of FIG.

次に、移動距離の補正について検討してみる。本実施形態で使用したカメラにより撮影した画像をマッチングして軌跡を解析する方法の場合、ペンがいったん筆記面を遠く離れて、再度、紙面上に置かれた場合、その紙面を離れている間、カメラではもはや紙面上の筆記画像が入手できなくなるため、「もはや、以前の軌跡点との相対座標を求めることはできない」という問題がある。   Next, let us consider correction of the movement distance. In the case of the method of analyzing the locus by matching the images taken by the camera used in this embodiment, when the pen is once separated from the writing surface and placed on the paper surface again, while the paper is leaving the paper surface Since the handwritten image on the paper can no longer be obtained with the camera, there is a problem that “the relative coordinates with the previous locus point can no longer be obtained”.

本実施形態では、この問題を解決するために、前述した3軸加速度センサ6により検出した加速度に基づいて算出された座標位置と合わせることで、ペンが筆記面から離れて移動したときも紙面上の移動座標を推測することを可能にする。まず、3軸加速度による位置座標の計算するタスク(Task1)の改良を行う。   In the present embodiment, in order to solve this problem, the coordinate position calculated based on the acceleration detected by the triaxial acceleration sensor 6 described above is used to match the pen position even when the pen moves away from the writing surface. Makes it possible to guess the moving coordinates of. First, the task (Task 1) for calculating the position coordinates by the triaxial acceleration is improved.

図9は、図5のTask1の改良されたアルゴリズムである。S30〜S33及びS38はそれぞれ、図5のS1〜S5と同様の処理である。それ以外の処理S34〜S37は、筆記面(紙面)が3軸絶対座標でどこに位置しているかの計算を行うものである。それでは、本アルゴリズムについて詳述する。   FIG. 9 is an improved algorithm of Task 1 of FIG. S30 to S33 and S38 are the same processes as S1 to S5 in FIG. The other processes S34 to S37 calculate where the writing surface (paper surface) is located in the triaxial absolute coordinates. Now, this algorithm will be described in detail.

まず、S30〜S33の処理を行う。これらはそれぞれ、図5のS1〜S4と同様の処理である。次に、ペン1が紙面20にダウンしているか否かを判断する(S34)。ペン1が紙面20にダウンしていない場合には(S34で「No」へ進む)、S38へ進む。ペン1が紙面20にダウンしている場合には(S34で「Yes」へ進む)、3軸パラメータ補正要求があるか否かを判断する(S35)。この3軸パラメータ補正要求があるか否かとは、後述する図12のS55で3軸絶対座標のパラメータ補正要求が行われたか否かということである。   First, the process of S30-S33 is performed. These are the same processes as S1 to S4 in FIG. Next, it is determined whether or not the pen 1 is down on the paper surface 20 (S34). When the pen 1 is not down on the paper surface 20 (the process proceeds to “No” in S34), the process proceeds to S38. If the pen 1 is down on the paper surface 20 (proceed to "Yes" in S34), it is determined whether or not there is a triaxial parameter correction request (S35). Whether or not there is a triaxial parameter correction request means whether or not a triaxial absolute coordinate parameter correction request has been made in S55 of FIG.

この補正要求がない場合にはS37へ進み(S35で「No」へ進む)、この補正要求がある場合にはS36の処理を行う(S35で「Yes」へ進む)。後述する紙面上の座標計算を行うタスク(Task2)においてペンダウンが起きた際、その時のペン速度はゼロであるので、ペンの速度変数v´を0にする(S36)。この速度は加速度センサ6を積分して計算したものであるので、図5では誤差の累積が生じて実際の速度と合っていない可能性があったが、このS36の処理によって、この誤差の累積をクリアすることができる。 If there is no correction request, the process proceeds to S37 (the process proceeds to “No” in S35), and if there is a correction request, the process of S36 is performed (the process proceeds to “Yes” in S35). When a pen down occurs in a task (Task 2) for calculating coordinates on the paper, which will be described later, since the pen speed is zero, the pen speed variable v ′ is set to 0 (S36). Since this speed is calculated by integrating the acceleration sensor 6, there is a possibility that an error is accumulated in FIG. 5 and does not match the actual speed. Can be cleared.

次にペンダウンしているときは、紙面の基底ベクトルの作成を行う(S37)。S37の処理後、所定の時間経過するのを待つ(S38)。この処理は、図5のS5と同様である。
図10は、3軸絶対空間と紙面座標との関係を示す図である。すなわち、X,Y,Z軸での3軸加速度から計算される絶対座標の座標系を示す。紙面20で表された四角形領域は、絶対空間上での紙面の位置を示したものである。紙面20上のEu,Evベクトルは、紙面20の座標系を作る基底ベクトルである。
Next, when the pen is down, a paper basis vector is created (S37). After the process of S37, it waits for a predetermined time to elapse (S38). This process is the same as S5 in FIG.
FIG. 10 is a diagram illustrating the relationship between the three-axis absolute space and the paper surface coordinates. That is, a coordinate system of absolute coordinates calculated from triaxial acceleration on the X, Y, and Z axes is shown. A rectangular area represented by the paper surface 20 indicates the position of the paper surface in the absolute space. Eu and Ev vectors on the paper surface 20 are basis vectors for creating a coordinate system of the paper surface 20.

紙面20上では点P1,P2間の線が描画されたときの例を示している。このベクトルがXYZ座標系ではPxとし、紙面20上の座標系ではPuと定義する。X,Y,Z軸とU,V軸との関係は線形であるので次式の関係が成り立つ。   An example in which a line between points P1 and P2 is drawn on the paper surface 20 is shown. This vector is defined as Px in the XYZ coordinate system and as Pu in the coordinate system on the paper surface 20. Since the relationship between the X, Y, and Z axes and the U and V axes is linear, the following relationship is established.

Figure 0004325332
Figure 0004325332

いま、2点において2つの座標の対応点が(x1,y1,z1)→(u1,v1),(x2,y2,z2)→(u2,v2)であるとすると(B−1)式から   If the corresponding points of the two coordinates are (x1, y1, z1) → (u1, v1), (x2, y2, z2) → (u2, v2) at two points,

Figure 0004325332
Figure 0004325332

の関係が成り立つ。これより、 The relationship holds. Than this,

Figure 0004325332
Figure 0004325332

この結果、基底ベクトルEu,Evは、(B−3)式で求められた係数を用いて(B−1)式の(u,v)にそれぞれ(1,0),(0,1)を代入して得られるので、次式のようになる。 As a result, the basis vectors Eu and Ev are respectively set to (1, 0) and (0, 1) in (u, v) of the equation (B-1) using the coefficients obtained in the equation (B-3). Since it is obtained by substituting, it becomes as follows.

Figure 0004325332
Figure 0004325332

Figure 0004325332
Figure 0004325332

図11は、図9のS37の紙面の基底ベクトルの作成の詳細アルゴリズムを示す。まず、現在の紙面座標のペン位置Puを入手する。これは別タスクTask2にて計算されているので、すでに計算済みの最新のPuを読み出すものとする(S40)。
次に、2種類の座標の対応点数のサンプル数Nsを調べる(S41)。これは予めTask1の開始時に「0」に初期化されているものとする。初期化後、初めてこの処理が行われる場合はNs=0であるので、S42に分岐される。ここで、今回の紙面座標系のペン位置Puを(u1,v1)に、3軸加速度座標系のPxの座標値を(x1,y1,z1)に保存し(S42)、対応点数Nsを1に書き換え(S43)、本フローは終了する。
FIG. 11 shows a detailed algorithm for creating the basis vector of the page in S37 of FIG. First, the pen position Pu of the current page coordinate is obtained. Since this is calculated in another task Task2, it is assumed that the latest Pu that has already been calculated is read (S40).
Next, the number of samples Ns corresponding to the two types of coordinates is checked (S41). It is assumed that this is initialized to “0” at the start of Task 1 in advance. When this process is performed for the first time after initialization, since Ns = 0, the process branches to S42. Here, the pen position Pu of the current paper surface coordinate system is stored at (u1, v1), the coordinate value of Px of the three-axis acceleration coordinate system is stored at (x1, y1, z1) (S42), and the corresponding point number Ns is set to 1. (S43), this flow ends.

その後、再度引き続きペン1が紙面にダウンした状態で再度、本処理が呼ばれた場合(図9のS37)は、同様にS40でPuを入手後、Nsは「1」であるので、S41でS44に分岐される。今回の座標の対応点は、Puを(u2,v2)、Pxを(x2,y2,z2)に保存して(S44)、(B−5)式のΔを計算する(S45)。   Thereafter, when this processing is called again with the pen 1 still down on the paper surface (S37 in FIG. 9), after obtaining Pu in S40, Ns is “1”, so in S41. Branches to S44. For the corresponding point of the current coordinate, Pu is stored in (u2, v2), Px is stored in (x2, y2, z2) (S44), and Δ in the equation (B-5) is calculated (S45).

このΔは、2点のベクトル(u1,v1),(u2,v2)の外積であって、後で求め
る基底ベクトルの計算の精度を上げるためにも、この値が大きいほうが望ましい。そのため、このΔが予め決められた所定の値より大きいか否かを判断する(S46)。このΔが
、この所定の値に達していない場合または所定の値以下の場合は、2点目のサンプルは基底ベクトルを求めるのにふさわしくないと判断し、その後の処理をせずに終了する。
This Δ is an outer product of two vectors (u1, v1) and (u2, v2), and it is desirable that this value be larger in order to improve the accuracy of calculation of a basis vector to be obtained later. Therefore, it is determined whether or not Δ is larger than a predetermined value (S46). If this Δ does not reach the predetermined value or is equal to or smaller than the predetermined value, it is determined that the second sample is not suitable for obtaining the basis vector, and the process is terminated without performing the subsequent processing.

他方、このΔが所定量を超えた場合には、基底ベクトルを精度よく計算できるので、今
回のサンプルを有効として、サンプル数Nsを「2」にする(S47)。そして、(B−4)式にて基底ベクトルEu,Evを計算し(S48)、終了する。
On the other hand, if Δ exceeds a predetermined amount, the basis vector can be calculated with high accuracy, so that the current sample is valid and the number of samples Ns is set to “2” (S47). Then, the base vectors Eu and Ev are calculated by the equation (B-4) (S48), and the process ends.

その後、再度引き続きペン1が紙面にダウンした状態で再度、本処理が呼ばれた場合(図9のS27)は、同様にS40でPuを入手後、Nsは「2」であるので、S41でNs>1と判断され、終了する。
以上より、S37において、現在の絶対座標PxとTask2から計算される紙面上の座標Puの参照を行い、これらの2つの座標を対で記憶を行っておいて、過去数点の座標対からEu,Evを求めることができる。本実施形態ではEu,Evの計算をTask1で行ったが、もちろんTask2で行っても構わない。これによって、ペン1を用いて紙面20上に書いている間に基底ベクトルが計算できることになる。
Thereafter, when this processing is called again with the pen 1 still down on the paper surface (S27 in FIG. 9), after obtaining Pu in S40, Ns is “2”, so in S41. It is determined that Ns> 1, and the process ends.
As described above, in S37, the coordinates Pu on the paper surface calculated from the current absolute coordinates Px and Task2 are referred to, these two coordinates are stored in pairs, and Eu from the past several coordinate pairs. , Ev. In the present embodiment, calculation of Eu and Ev is performed with Task1, but of course, it may be performed with Task2. As a result, the basis vector can be calculated while writing on the paper surface 20 with the pen 1.

次に、ペンが紙面20上を離れて再度紙面20上にダウンしたときに、その地点の紙面上座標の求め方を図12で説明する。
図12は、図7のTask2に修正を加えたアルゴリズムである。タスクが開始されると、まだ1度もペンが紙面上にダウンしていないことを示すFirstDownフラグをYesにし、またペンの状態を示しているPenStatusはペンアップ状態PEN_UPに初期化する(S50)。
Next, when the pen leaves the paper surface 20 and goes down again on the paper surface 20, how to obtain the coordinates on the paper surface at that point will be described with reference to FIG.
FIG. 12 shows an algorithm obtained by modifying Task 2 in FIG. When the task is started, the FirstDown flag indicating that the pen has never been down on the paper is set to Yes, and PenStatus indicating the pen state is initialized to the pen-up state PEN_UP (S50). .

次に、ペン圧センサ4によりペン圧を検出し、ペン1が筆記している状態(ペンダウン状態)であるかどうかの判定を行う(S51)。ペン1がダウン状態であるときは、過去のペン状態をチェックする(S52)。初めてのペンダウンの場合のPenStatusは、PEN_UPである。   Next, the pen pressure is detected by the pen pressure sensor 4, and it is determined whether or not the pen 1 is writing (pen down state) (S51). When the pen 1 is in the down state, the previous pen state is checked (S52). PenStatus for the first pen down is PEN_UP.

S52で、「PenStatus=PEN_UP」であるときは、PenStatusをPEN_DOWNの状態にして(S53)、ペンダウンした紙面20上の位置の3軸絶対座標を読み出す(S54)。ここでは、Task1で求めたPxをPxdに代入する。次に、前述したように、速度誤差のリセットを行うために、3軸絶対座標のパラメータ(速度)の補正要求を行う(S55)。   If “PenStatus = PEN_UP” in S52, PenStatus is set to PEN_DOWN (S53), and the three-axis absolute coordinates of the position on the pen-down paper surface 20 are read (S54). Here, Px obtained by Task 1 is substituted into Pxd. Next, as described above, in order to reset the speed error, a correction request for the parameter (speed) of the three-axis absolute coordinate is made (S55).

そして、ペンがこの紙面20において初めてのダウンであるか否かのチェックをFirstDownフラグを参照することで行う(S56)。初めてであるときは(S56で「Yes」に進む)、FirstDownフラグのクリア(FirstDown=No(S61))と紙面座標位置の初期化(Pu=0(S62))のみ行う。そして、紙面20上にダウンしたその紙面座標位置を保存する(Pu_down=Pu)(S60)。   Then, it is checked by referring to the FirstDown flag whether the pen is down for the first time on the paper surface 20 (S56). When it is the first time (proceeding to "Yes" in S56), only the FirstDown flag is cleared (FirstDown = No (S61)) and the paper surface coordinate position is initialized (Pu = 0 (S62)). Then, the paper surface coordinate position down on the paper surface 20 is stored (Pu_down = Pu) (S60).

その後、再び処理はループされ、ペンが紙面に描画されている間はS50,S51を経由し、「PenStaus=PEN_DOWN」(S52)であるのでS63に分岐される。
次に、画像が入力されたか否かについて判定される(S63)。前述したように画像イメージデータは定期的(10m秒ごと)に撮影が行われており(図6参照)、画像入力がなされるまで再びループを行い待機される(S63で「No」へ進む)。新しい画像が入力されると(S63で「Yes」に進む)、入力される画像をそのまま画像間のマッチング計算を行うには画素数が多いので、入力画像から縮小画像を作成する(S64)。
Thereafter, the processing is looped again. While the pen is being drawn on the paper surface, the process passes through S50 and S51. Since “PenStatus = PEN_DOWN” (S52), the process branches to S63.
Next, it is determined whether or not an image has been input (S63). As described above, the image data is taken periodically (every 10 milliseconds) (see FIG. 6), and loops again and waits until image input is made (proceed to “No” in S63). . When a new image is input (proceed to "Yes" in S63), a reduced image is created from the input image because the number of pixels is large in order to perform matching calculation between the input images as they are (S64).

次に、S65で画像マッチング処理ルーチンを呼び出し、移動ベクトルDuを得る(詳細の動作は図8で既に説明した)。そして、過去のペン座標Puに差分ベクトルDuを加算して座標位置の更新がされる(S66)。
このように筆記者が紙面20上に描画している間は、画像マッチングを行うことでペンの軌跡と筆圧の追跡が可能である。筆記者がペンアップを行うと、ペン圧がなくなり、その結果、S51でペン圧の判定はアップと判断され、S67の処理へ分岐される。
Next, an image matching processing routine is called in S65 to obtain a movement vector Du (detailed operation has already been described with reference to FIG. 8). Then, the coordinate position is updated by adding the difference vector Du to the past pen coordinates Pu (S66).
As described above, while the writer is drawing on the paper surface 20, it is possible to track the pen trajectory and the pen pressure by performing image matching. When the writer performs pen-up, the pen pressure disappears. As a result, the pen pressure is determined to be up in S51, and the process branches to S67.

初めてのペンアップ状態であるか否かがPenStatusに基づいて判定され(S67)、初めてである場合は、PenStatusをPEN_UPにし(S68)、そのときの3軸絶対座標を保存する(S69)。ここでは、Task1で求めたPxをPxuに代入する。その後、紙面座標のアップ位置を保存する(S70)。ここでは、PuをPu_upに代入する。ペンアップ後、ペン1の空中での移動量の計測はTask1によってなされる。   Whether or not the pen-up state is the first time is determined based on PenStatus (S67). If this is the first time, PenStatus is set to PEN_UP (S68), and the three-axis absolute coordinates at that time are stored (S69). Here, Px obtained by Task 1 is substituted into Pxu. Thereafter, the up position of the paper surface coordinates is stored (S70). Here, Pu is substituted into Pu_up. After pen-up, the amount of movement of the pen 1 in the air is measured by Task 1.

再度、ペンが紙面上にダウンした場合は、S56で2回目以降と判断され、前回のペンアップした座標と現在の絶対座標の値とを用いて移動ベクトル(du,dv)がS57−S59で計算される。まず、S54で取得した3軸絶対座標PxdからS70で取得した3軸絶対座標Pxuを差し引いたものを空中絶対移動ベクトルDxとする(S57)。   If the pen goes down on the paper again, it is determined in S56 that the second time or later, and the movement vector (du, dv) is determined in S57-S59 using the previous pen-up coordinate and the current absolute coordinate value. Calculated. First, an aerial absolute movement vector Dx is obtained by subtracting the 3-axis absolute coordinate Pxu acquired in S70 from the 3-axis absolute coordinate Pxd acquired in S54 (S57).

次に、空中絶対移動ベクトルDxを紙面上の座標に変換するための処理を行う。Eu,EvはU,V座標のU成分、V成分の単位ベクトルそれぞれのX−Y−Z座標系に対応するベクトルである。いま、X−Y−Z系の空中絶対移動Dxを、U−V座標系に変換することは、DxベクトルをEu,Evに分解することに他ならない。したがって、Dx=(x,y,z),Eu=(xu,yu,zu),Ev=(xv,yv,zv)とすると、求めるDxのUV座標系の成分(du,dv)は、   Next, a process for converting the aerial absolute movement vector Dx into coordinates on the paper is performed. Eu and Ev are vectors corresponding to the XYZ coordinate systems of the U and V component unit vectors of the U and V coordinates, respectively. Now, converting the X-Y-Z system absolute air movement Dx to the U-V coordinate system is nothing other than decomposing the Dx vector into Eu and Ev. Therefore, if Dx = (x, y, z), Eu = (xu, yu, zu), Ev = (xv, iv, zv), the component (du, dv) of the UV coordinate system of Dx to be obtained is

Figure 0004325332
Figure 0004325332

Figure 0004325332
Figure 0004325332

で求まる。
そして、再度ペンダウンしたときの紙面座標位置Puは、S70でペンアップしたときの座標にS58で求めた(du,dv)を加算すればよい(S59)。このPuをPu_downとして保存する(S60)。このようにして3軸の絶対座標から紙面座標の移動ベクトルが計算することができる。
It is obtained by
Then, the paper surface coordinate position Pu when pen-down is performed again may be obtained by adding (du, dv) obtained in S58 to the coordinates when pen-up is performed in S70 (S59). This Pu is stored as Pu_down (S60). In this way, the movement vector of the paper surface coordinates can be calculated from the absolute coordinates of the three axes.

次に、本実施形態におけるペンの軌跡のホスト転送について説明する。上述した方法によって、ペン1が紙面20上で描画を行ったとき、リアルタイムにペンの軌跡と筆圧をメモリに保存を行った。このメモリ内容を無線がサービスされているときにはリアルタイムで内容を読み出し無線でPC等のホストへ送り出して、また無線がサービスされていないときは、無線がサービスされるまでメモリ10に保存したままにしておき、無線がサービスされたときに保存しておいたデータを一気に呼び出し、PC等のホストへ転送を行う。   Next, the pen trajectory host transfer in this embodiment will be described. When the pen 1 performs drawing on the paper surface 20 by the method described above, the pen trajectory and writing pressure are stored in the memory in real time. The contents of the memory are read out in real time when the radio is being serviced and sent to a host such as a PC by radio. When the radio is not being serviced, it is stored in the memory 10 until the radio is serviced. In addition, the data stored when the radio is serviced is called at once and transferred to a host such as a PC.

これは無線の性格上、通信が不安定になったりするので、それを考慮した設計を施している。また、もちろん、ホスト側がなんらなの理由で動作していない場合、たとえば、出張先でホストであるPCを持たずにペンだけ持ち出しておいて、出張先で議事などを筆記した内容はペンの中にデータを保存しておき、帰社後オフィスのPCにて読み出すことが可能である。なお、本実施形態では、無線によりPCでデータを転送したが、これに限らずに有線でもよい。   This is because the wireless nature makes communication unstable, so it is designed with that in mind. Of course, if the host does not operate for some reason, for example, you can take out only the pen without having the host PC at the business trip and write the proceedings on the business trip in the pen. Data can be saved and read out on the office PC after returning to work. In the present embodiment, data is transferred wirelessly by a PC. However, the present invention is not limited to this and may be wired.

以上より、カメラで撮影した画像と3軸加速度センサ信号を用いることで、精度のよい電子ペンの移動検出が行える。
(実施形態2)
本実施形態では、限定マッチングによる高速化について述べる。図7または図12において入力されたカメラ画像のマッチング(S13またはS65)を行うときに、図8よりカメラの画像サンプリング間でペンが動くと思われる最大の範囲内の距離で全てのマッチングがなされていた。
As described above, the movement of the electronic pen can be detected with high accuracy by using the image photographed by the camera and the triaxial acceleration sensor signal.
(Embodiment 2)
In this embodiment, speeding up by limited matching will be described. When matching the camera images input in FIG. 7 or FIG. 12 (S13 or S65), all matching is performed at a distance within the maximum range that the pen is supposed to move between image sampling of the camera from FIG. It was.

本実施形態では、加速度センサ6から得られた3軸の絶対座標や速度からペン1の移動方向、移動量などを推測し、マッチングする範囲の限定を行い、専用のハードウェアなどを追加せずに高速にマッチングを計算することが可能もなる。
つまり2枚のサンプリングされた画像間で、移動した絶対座標ベクトルをDxとすると、図12のS57,S58と同じ方法で、内積計算を行うことで、紙面座標系(U−V軸)の紙面軸上の移動ベクトルDu=(du,dv)が計算できる。このdu,dvの近傍の範囲で画像マッチングと移動ベクトルを求めればよい。この値が2枚の画像間で移動したおよその移動ベクトルであるので、この近傍で画像マッチングを行えば、効率よく移動ベクトルが求まる。
In the present embodiment, the moving direction and the moving amount of the pen 1 are estimated from the absolute coordinates and speed of the three axes obtained from the acceleration sensor 6, the matching range is limited, and no dedicated hardware is added. It is also possible to calculate matching at high speed.
In other words, if the absolute coordinate vector moved between the two sampled images is Dx, the inner surface is calculated by the same method as S57 and S58 in FIG. An on-axis movement vector Du = (du, dv) can be calculated. What is necessary is just to obtain | require an image matching and a movement vector in the range of the vicinity of this du and dv. Since this value is an approximate movement vector moved between the two images, if the image matching is performed in the vicinity, the movement vector can be obtained efficiently.

図13は、本実施形態における限定マッチングを用いたプロセッサ9での座標位置を得るアルゴリズムを示す。S80〜S84の各処理はそれぞれ、図7のS10〜S14と同様である。このとき、S83で図8のアルゴリズムを呼び出すときにこのDu_Begin=du−δ,Du_End=du+δ,Dv_Begin=dv−δ,Dv_End=dv+δ(δは近傍でRANGEに比較して十分小さな値)の引数を渡せばよい。これにより、マッチングする量はかなり削減される。   FIG. 13 shows an algorithm for obtaining the coordinate position in the processor 9 using the limited matching in this embodiment. Each process of S80 to S84 is the same as S10 to S14 of FIG. At this time, when calling the algorithm of FIG. 8 in S83, Du_Begin = du−δ, Du_End = du + δ, Dv_Begin = dv−δ, Dv_End = dv + δ (δ is sufficiently small compared to RANGE in the vicinity). Just pass an argument. This significantly reduces the amount of matching.

以上より、過去の撮影画像と今回の撮影画像とを比較し、移動マッチングを行う上で、加速度センサから得られる情報を用いることで、およそのペン移動方向を知ることにより、移動方向が予測できるので、2つの画像のマッチングする方向や移動量を限定できるのでマッチング時間を短時間で行える。   As described above, the movement direction can be predicted by comparing the past photographed image with the current photographed image and using the information obtained from the acceleration sensor to perform the movement matching and knowing the approximate pen movement direction. Therefore, the matching direction and the amount of movement of the two images can be limited, so that the matching time can be shortened.

(実施形態3)
本実施形態では、ペンの傾き補正による高精度マッチングを説明する。
図14は、本実施形態におけるペン1の動きの一例を示す。同図において、ペン1が紙面上に沿って動かされるときは、ペン軸と紙面がなす傾きを保持したまま、紙面上に沿って移動する2次元的な移動のほかに、ペン軸の指す位置はそのままでペン軸と紙の傾きが変化する動きもある。
(Embodiment 3)
In the present embodiment, high-precision matching based on pen tilt correction will be described.
FIG. 14 shows an example of the movement of the pen 1 in the present embodiment. In the same figure, when the pen 1 is moved along the paper surface, the position indicated by the pen shaft in addition to the two-dimensional movement that moves along the paper surface while maintaining the inclination formed by the pen shaft and the paper surface. There is also a movement in which the tilt of the pen axis and the paper changes as it is.

図8に示したペンの移動推測を行うための画像マッチングは、ペンが2次元方向の移動しか想定されていない。これは、通常筆記中のペン軸の傾きは、さほど変化が無く、移動量の分解能しかが必要としない。画像マッチングする場合には無視できる。
しかし、文字の細部の軌跡を記録するには、カメラの解像度をあげるのと同時にこのペン軸の傾きも考慮したマッチングを行う必要がある。2枚の画像間で距離とペン軸の傾きを変えながら画像マッチングするには大量の計算が必要になり、リアルタイムでは非現実的である。
The image matching for estimating the movement of the pen shown in FIG. 8 assumes only the movement of the pen in a two-dimensional direction. This is because the inclination of the pen axis during normal writing does not change much, and only the resolution of the movement amount is required. It can be ignored when matching images.
However, in order to record the trajectory of the details of the character, it is necessary to perform matching in consideration of the inclination of the pen axis as well as increasing the resolution of the camera. To match images while changing the distance and the tilt of the pen axis between two images, a large amount of calculation is required, which is unrealistic in real time.

本実施形態では、この問題を解決するために、位置座標の検出のために設けた3軸加速度センサ6の他にもうひとつの3軸加速センサまたは3軸ジャイロの実装を行い、これら2つの加速度を用いて、ペンの角加速度を得て、その結果、ペンの傾きの変化の検出を行う。   In this embodiment, in order to solve this problem, another three-axis acceleration sensor or three-axis gyro is mounted in addition to the three-axis acceleration sensor 6 provided for detecting the position coordinates, and these two accelerations are mounted. Is used to obtain the angular acceleration of the pen, and as a result, the change in the tilt of the pen is detected.

これにより、2つの効果が得られるようになった。1つはペンの傾きが得られるので、前述のアルゴリズムではペン浮上中のペン回転が行われると、ペンの空中の軌跡が正確に得られない問題があったが、この問題を解決することができた。
また、もう1つは、ペンの描画中もペンの傾きの変化が検出でき、ペン軸の傾きの変化も推測できるようになる。よって、上記の2枚の画像マッチングにおいて、移動距離に加えて、ペンの傾きもマッチングする範囲を制限できるので、所定時間内に範囲内の画像マッチングが可能になった。
As a result, two effects can be obtained. One is that the tilt of the pen can be obtained, so the above algorithm has a problem that the pen trajectory in the air cannot be obtained accurately when the pen is rotated while the pen is flying. This problem can be solved. did it.
The other is that a change in the tilt of the pen can be detected even while the pen is being drawn, and a change in the tilt of the pen axis can be estimated. Therefore, in the above-described two image matching, since the range in which the tilt of the pen is matched in addition to the moving distance can be limited, image matching within the range can be performed within a predetermined time.

以上より、加速度センサまたは3軸ジャイロをさらにもう1つ設け、ペンの回転角度の測定を行うことで、ペンが紙面上を離れて移動を行った場合の移動ベクトルの精度を向上させ、かつ、ペンが紙面上で描画を行う際の画像マッチングでペン軸の傾きも考慮して測定を行うことで、ペンの移動ベクトルの推測を向上させることができる。   As described above, by providing another acceleration sensor or another three-axis gyro and measuring the rotation angle of the pen, the accuracy of the movement vector when the pen moves away from the paper surface is improved, and By performing measurement in consideration of the inclination of the pen axis in image matching when the pen performs drawing on the paper surface, it is possible to improve the estimation of the pen movement vector.

(実施形態4)
図8のS22における類似度計算処理で、類似度を2枚の画像の画素の値の絶対値誤差をとっているので、2枚の画像が白(背景)から黒(線の色)の違いも、黒から白への変化も同じように扱われる。
(Embodiment 4)
In the similarity calculation processing in S22 of FIG. 8, the similarity is calculated by taking the absolute value error of the pixel values of the two images, so that the two images are different from white (background) to black (line color). But the change from black to white is treated in the same way.

したがって、2枚の画像の差において、新たに描画した線が多いと類似度が離れていくことになるので、S22において単純な2枚間の類似度をとるのではなく、背景色(白)から黒(線の色)への変化は、2画像間で類似しないので、その画素値の変化を計測の対象外とした方がより正確な移動距離が抽出できる。   Accordingly, in the difference between the two images, if there are a lot of newly drawn lines, the similarity will be separated. Therefore, in S22, the similarity between the two images is not simply taken, but the background color (white). Since the change from 1 to black (line color) is not similar between the two images, the movement distance can be extracted more accurately if the change in the pixel value is excluded from the measurement target.

つまり、実施形態1では、「類似しない」として扱われて類似度が低くなるように作用していたのだか、白から黒への変化は、用紙に新たに文字が書かれた部分であり、この部分を「類似しない」とすると評価が、新たに文字を多く書かれるとマッチング得点が悪くなるという弊害が発生するので、この部分は類似度評価に考慮しないように作用させた方が、正しくマッチングできる。   That is, in the first embodiment, the change from white to black is treated as “not similar” and the similarity is lowered, or the character is newly written on the paper, If this part is set to “not similar”, the evaluation will cause a negative effect that the matching score will be worse if many new characters are written. Therefore, it is better to operate this part without considering it in the similarity evaluation. Can be matched.

よって、S13を下記の式で計算を行う。   Therefore, S13 is calculated by the following formula.

Figure 0004325332
Figure 0004325332

Figure 0004325332
Figure 0004325332

以上より、本実施形態では、実施形態1より正確な移動距離を抽出することができる。   As described above, in this embodiment, it is possible to extract a movement distance that is more accurate than in the first embodiment.

実施形態1における電子ペンの構成図である。1 is a configuration diagram of an electronic pen in Embodiment 1. FIG. 実施形態1におけるインクジェットの制御ブロック図である。FIG. 2 is a control block diagram of inkjet in Embodiment 1. 実施形態1におけるディーティ変調によるペンの線の太さ制御を示す図である。5 is a diagram illustrating pen line thickness control by duty modulation in Embodiment 1. FIG. 実施形態1における3軸加速度センサを用いた位置検出回路の構成を示す図である。FIG. 3 is a diagram illustrating a configuration of a position detection circuit using a triaxial acceleration sensor in the first embodiment. 実施形態1における3軸加速度センサを用いた座標位置を得るアルゴリズムを示す図である。It is a figure which shows the algorithm which obtains the coordinate position using the triaxial acceleration sensor in Embodiment 1. FIG. 実施形態1におけるカメラで撮影した文字の筆記例を示す図である。It is a figure which shows the example of writing of the character image | photographed with the camera in Embodiment 1. FIG. 実施形態1における画像データに基づくペン座標位置解析タスクのアルゴリズムを示す。6 shows an algorithm of a pen coordinate position analysis task based on image data in the first embodiment. 実施形態1における画像マッチングのアルゴリズムを示す図である。3 is a diagram illustrating an image matching algorithm according to Embodiment 1. FIG. 実施形態1における図5のアルゴリズムを改良したアルゴリズムを示す図である。It is a figure which shows the algorithm which improved the algorithm of FIG. 5 in Embodiment 1. FIG. 実施形態1における3軸絶対空間と紙面座標との関係を示す図である。FIG. 3 is a diagram illustrating a relationship between a three-axis absolute space and paper plane coordinates in the first embodiment. 実施形態1における基底ベクトルの作成アルゴリズムを示す図である。FIG. 6 is a diagram illustrating a basis vector creation algorithm in the first embodiment. 実施形態1における図7のTask2に修正を加えたアルゴリズムを示す図である。It is a figure which shows the algorithm which added correction to Task2 of FIG. 7 in Embodiment 1. FIG. 実施形態2における限定マッチングによる座標位置を得るアルゴリズムを示す図である。It is a figure which shows the algorithm which acquires the coordinate position by limited matching in Embodiment 2. FIG. 実施形態3における電子ペンの動きの一例を示す図である。FIG. 10 is a diagram illustrating an example of movement of an electronic pen according to a third embodiment.

符号の説明Explanation of symbols

1 電子ペン
2 インクジェットノズル
3 ペン先
4 圧力センサ
5 カラーインクカートリッジ
6 3軸加速センサ
7 レンズ
8 CMOSイメージセンサ
9 プロセッサ
10 メモリ
11 電池
13 RF通信回路
17 インクジェット
20 紙面
103(103a、103b、103c、103c) 弁
604 セレクタ
901 CPU
902 AD変換器
903 DMA


DESCRIPTION OF SYMBOLS 1 Electronic pen 2 Inkjet nozzle 3 Pen tip 4 Pressure sensor 5 Color ink cartridge 6 Triaxial acceleration sensor 7 Lens 8 CMOS image sensor 9 Processor 10 Memory 11 Battery 13 RF communication circuit 17 Inkjet 20 Paper surface 103 (103a, 103b, 103c, 103c ) Valve 604 Selector 901 CPU
902 AD converter 903 DMA


Claims (7)

筆記対象媒体に筆記した文字又は図形を、電子データとして取得するペン型データ入力装置において、
該ペン型データ入力装置を移動させた場合に生じる加速度を周期的に検出する加速度検出手段と、
該加速度検出手段により検出される加速度に基づいて当該ペン型データ入力装置の移動速度を計算する速度計算手段と、
この速度計算手段により速度が計算される毎に速度の値を更新しながら保存する速度保存手段と、
この速度保存手段で保存された前回速度の値と前記計算手段で計算された現在速度の値に基づいて、前記ペン型データ入力装置の移動した軌跡を示す軌跡情報を取得する第1の軌跡情報取得手段と、
インクを用いて前記筆記対象媒体に前記文字又は前記図形を筆記する筆記手段と、
該筆記手段により筆記された前記文字又は前記図形を撮像する撮像手段と、
該撮像手段により撮像された複数の前記文字又は前記図形の画像に基づいて、前記筆記手段により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を取得する第2の軌跡情報取得手段と、
前記筆記対象媒体に対して該ペン型データ入力装置のペン先が接しているか離れているかを検出する検出手段と、
該検出手段により前記ペン先が離れていると検出された場合に前記第1の軌跡情報取得手段を選択し、前記ペン先が接していると検出された場合に前記第2の軌跡情報取得手段を選択して前記軌跡情報を取得する選択手段と、
前記ペン先が前記筆記対象媒体に接したことが前記検出手段によって検出されたことにより、前記速度保存手段により保存された速度の値を0に補正する補正手段と、
を備えることを特徴とするペン型データ入力装置。
In a pen-type data input device that acquires characters or figures written on a writing target medium as electronic data,
Acceleration detecting means for periodically detecting acceleration generated when the pen-type data input device is moved;
Speed calculating means for calculating the moving speed of the pen-type data input device based on the acceleration detected by the acceleration detecting means ;
A speed storing means for updating the speed value every time the speed is calculated by the speed calculating means;
First trajectory information for acquiring trajectory information indicating the trajectory moved by the pen-type data input device based on the previous speed value stored by the speed storing means and the current speed value calculated by the calculating means. Acquisition means;
Writing means for writing the character or the figure on the writing target medium using ink;
Imaging means for imaging the character or the figure written by the writing means;
Second trajectory information acquisition means for acquiring trajectory information indicating a trajectory of the character or the graphic written by the writing means based on a plurality of images of the character or the graphic imaged by the imaging means;
Detecting means for detecting whether the pen tip of the pen-type data input device is in contact with or away from the writing target medium;
The first trajectory information acquisition unit is selected when the detection unit detects that the pen tip is separated, and the second trajectory information acquisition unit is detected when the pen tip is detected to be in contact. Selecting means for acquiring the trajectory information by selecting
Correction means for correcting the value of the speed stored by the speed storage means to 0 when the detection means detects that the pen tip is in contact with the writing target medium;
A pen-type data input device.
前記第2の軌跡情報取得手段は、前記撮像手段により今回撮像された前記画像と前回撮影された前記画像との比較をして、該比較結果に基づいて前記筆記手段により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を生成することを特徴とする請求項1に記載のペン型データ入力装置。   The second trajectory information acquisition unit compares the image captured this time by the imaging unit with the previously captured image, and based on the comparison result, the character or the character written by the writing unit The pen-type data input device according to claim 1, wherein trajectory information indicating the trajectory of the figure is generated. 前記第2の軌跡情報取得手段は、前記筆記手段により筆記している場合、前記第1の軌跡情報取得手段により今回取得した軌跡情報と前回取得した軌跡情報とに基づいて、前記比較をする範囲を決定することを特徴とする請求項2に記載のペン型データ入力装置。   The second trajectory information acquisition means, when writing by the writing means, a range for the comparison based on the trajectory information acquired this time by the first trajectory information acquisition means and the trajectory information acquired last time. The pen-type data input device according to claim 2, wherein the pen-type data input device is determined. 前記ペン型データ入力装置は、さらに、
前記第1又は前記第2の軌跡情報取得手段により取得した前記軌跡情報を外部装置に送信する送信手段を備えることを特徴とする請求項1に記載のペン型データ入力装置。
The pen-type data input device further includes:
The pen-type data input device according to claim 1, further comprising: a transmission unit that transmits the trajectory information acquired by the first or second trajectory information acquisition unit to an external device.
前記ペン型データ入力装置は、前記外部装置と通信が接続されている場合は、前記送信手段により前記軌跡情報を送信し、前記外部装置と前記通信が切断されている場合は、前記軌跡情報を保持することを特徴とする請求項4に記載のペン型データ入力装置。   The pen-type data input device transmits the trajectory information by the transmission means when communication with the external device is connected, and the trajectory information when the communication with the external device is disconnected. The pen-type data input device according to claim 4, wherein the pen-type data input device is held. 筆記対象媒体に筆記した文字又は図形を電子データとして取得するペン型データ入力装置内のコンピュータに、該電子データを取得させる処理を実行させるためのデータ入力プログラムにおいて、
該ペン型データ入力装置を移動させた場合に生じる加速度を周期的に検出する加速度検出処理と、
該加速度検出処理により検出される加速度に基づいて当該ペン型データ入力装置の移動速度を計算する速度計算処理と、
この速度計算処理により速度が計算される毎に速度の値を更新しながら保存する速度保存処理と、
この速度保存処理で保存された前回速度の値と前記計算手段で計算された現在速度の値に基づいて、前記ペン型データ入力装置の移動した軌跡を示す軌跡情報を取得する第1の軌跡情報取得処理と、
インクを用いて前記筆記対象媒体に前記文字又は前記図形を筆記する筆記処理と、
該筆記処理により筆記された前記文字又は前記図形を撮像する撮像処理と、
該撮像処理により撮像された複数の前記文字又は前記図形の画像に基づいて、前記筆記処理により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を取得する第2の軌跡情報取得処理と、
前記筆記対象媒体に対して該ペン型データ入力装置のペン先が接しているか離れているかを検出する検出処理と、
該検出処理により前記ペン先が離れていると検出された場合に前記第1の軌跡情報取得処理を選択し、前記ペン先が接していると検出された場合に前記第2の軌跡情報取得処理を選択して前記軌跡情報を取得する選択処理と、
前記ペン先が前記筆記対象媒体に接したことが前記検出処理によって検出されたことにより、前記速度保存処理により保存された速度の値を0に補正する補正処理と、
をコンピュータに実行させるためのデータ入力プログラム。
In a data input program for causing a computer in a pen-type data input device that acquires characters or figures written on a writing target medium as electronic data to execute processing for acquiring the electronic data,
Acceleration detection processing for periodically detecting acceleration generated when the pen-type data input device is moved;
A speed calculation process for calculating the moving speed of the pen-type data input device based on the acceleration detected by the acceleration detection process ;
A speed saving process that saves while updating the speed value every time the speed is calculated by this speed calculation process,
First trajectory information for acquiring trajectory information indicating the trajectory moved by the pen-type data input device based on the previous speed value saved in the speed saving process and the current speed value calculated by the calculating means. Acquisition process,
A writing process for writing the character or the figure on the writing target medium using ink;
An imaging process for imaging the character or the graphic written by the writing process;
A second trajectory information acquisition process for acquiring trajectory information indicating a trajectory of the character or the graphic written by the writing process based on a plurality of images of the character or the graphic captured by the imaging process;
A detection process for detecting whether the pen tip of the pen-type data input device is in contact with or away from the writing target medium;
The first trajectory information acquisition process is selected when it is detected that the pen tip is separated by the detection process, and the second trajectory information acquisition process is performed when it is detected that the pen tip is in contact. A selection process for obtaining the trajectory information by selecting
A correction process for correcting the value of the speed stored by the speed storage process to 0 by detecting that the pen tip is in contact with the writing target medium by the detection process;
Data input program for causing a computer to execute.
前記第2の軌跡情報取得処理は、前記撮像処理により今回撮像された前記画像と前回撮影された前記画像との比較をして、該比較結果に基づいて前記筆記処理により筆記された前記文字又は前記図形の軌跡を示す軌跡情報を生成することを特徴とする請求項6に記載のデータ入力プログラム。   In the second trajectory information acquisition process, the image captured this time by the imaging process and the image captured last time are compared, and the characters or characters written by the writing process based on the comparison result are compared. The data input program according to claim 6, wherein trajectory information indicating the trajectory of the figure is generated.
JP2003323291A 2003-09-16 2003-09-16 Pen-type data input device and program Expired - Fee Related JP4325332B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003323291A JP4325332B2 (en) 2003-09-16 2003-09-16 Pen-type data input device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003323291A JP4325332B2 (en) 2003-09-16 2003-09-16 Pen-type data input device and program

Publications (2)

Publication Number Publication Date
JP2005092437A JP2005092437A (en) 2005-04-07
JP4325332B2 true JP4325332B2 (en) 2009-09-02

Family

ID=34454407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003323291A Expired - Fee Related JP4325332B2 (en) 2003-09-16 2003-09-16 Pen-type data input device and program

Country Status (1)

Country Link
JP (1) JP4325332B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100855471B1 (en) * 2006-09-19 2008-09-01 삼성전자주식회사 Input device and method for providing movement information of the input device
JP5060798B2 (en) * 2007-02-23 2012-10-31 任天堂株式会社 Information processing program and information processing apparatus
JP2009223839A (en) * 2008-03-19 2009-10-01 Ricoh Co Ltd Pen type input device and handwriting input method
JP5463790B2 (en) * 2009-08-18 2014-04-09 ソニー株式会社 Operation input system, control device, handheld device, and operation input method
JP2011248494A (en) * 2010-05-25 2011-12-08 Nippon Telegr & Teleph Corp <Ntt> Picture synthesizing apparatus, picture synthesizing method and program for the same
JP5771117B2 (en) * 2011-10-26 2015-08-26 日本放送協会 Moving distance measuring device and photographing camera
JP5984259B2 (en) * 2012-09-20 2016-09-06 株式会社ワコム Position detection device
JP7006242B2 (en) * 2017-12-20 2022-01-24 カシオ計算機株式会社 Printing equipment, printing methods and programs

Also Published As

Publication number Publication date
JP2005092437A (en) 2005-04-07

Similar Documents

Publication Publication Date Title
US7952561B2 (en) Method and apparatus for controlling application using motion of image pickup unit
EP1441279A2 (en) Input device integrating inertial sensors
CN101601276B (en) Jiggle measuring system and jiggle measuring method
KR100947405B1 (en) Implement for Optically Inferring Information from a Planar Jotting Surface
US6212296B1 (en) Method and apparatus for transforming sensor signals into graphical images
KR100465241B1 (en) Motion recognition system using a imaginary writing plane and method thereof
JP5463790B2 (en) Operation input system, control device, handheld device, and operation input method
US9261953B2 (en) Information processing apparatus for displaying virtual object and method thereof
KR100777107B1 (en) apparatus and method for handwriting recognition using acceleration sensor
US20120013578A1 (en) Pen-shaped pointing device and shift control method thereof
CN111344654B (en) Determining writing direction by inertial sensor
US20170102790A1 (en) Navigation trace calibrating method and related optical navigation device
CN102868811B (en) Mobile phone screen control method based on real-time video processing
JP4325332B2 (en) Pen-type data input device and program
US20150116285A1 (en) Method and apparatus for electronic capture of handwriting and drawing
US7999957B2 (en) Input position setting method, input position setting device, input position setting program, and information input system
KR20010052283A (en) Control device and method of controlling an object
JP4292927B2 (en) Pen-type data input device and program
JP6201282B2 (en) Portable electronic device, its control method and program
KR102242154B1 (en) System for digital pen with handwriting and memo function
JP2005092436A (en) Code information read-out device, program therefor, and pen type data input unit using the same
KR100446610B1 (en) Pen-type computer input device
US20230394721A1 (en) Information processing apparatus, program, and system
CN110207687B (en) Object attitude measurement method, measurement device, electronic apparatus, and storage medium
KR100480792B1 (en) Method and appratus for inputting information spatially

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081028

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090324

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090414

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: 20090519

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090601

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees