JP2011150619A - Electronic equipment - Google Patents
Electronic equipment Download PDFInfo
- Publication number
- JP2011150619A JP2011150619A JP2010012888A JP2010012888A JP2011150619A JP 2011150619 A JP2011150619 A JP 2011150619A JP 2010012888 A JP2010012888 A JP 2010012888A JP 2010012888 A JP2010012888 A JP 2010012888A JP 2011150619 A JP2011150619 A JP 2011150619A
- Authority
- JP
- Japan
- Prior art keywords
- stroke
- writing
- coordinate data
- unit
- erasing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
Description
本発明は、手書き入力可能な電子機器に関する。 The present invention relates to an electronic device capable of handwriting input.
従来より、ペンや指などの指示物で画面上の位置を指示することによって文字や図形を手書き入力可能な電子機器が知られている。このような電子機器では、指示物に指示された位置の軌跡(ストローク)が入力される。例えば、画面に表示された画像に文字「T」を書き込む場合には、使用者が指示物によって縦棒と横棒の二つの書込ストロークを入力することにより、画像に「T」が書き込まれる。 2. Description of the Related Art Conventionally, electronic devices that can input characters and figures by handwriting by indicating a position on a screen with an indicator such as a pen or a finger are known. In such an electronic device, the locus (stroke) of the position designated by the indicator is input. For example, when writing the letter “T” on the image displayed on the screen, the user inputs two writing strokes of a vertical bar and a horizontal bar with an instruction, whereby “T” is written on the image. .
このような電子機器の一種として、消去ストロークを入力することにより、当該消去ストロークと交差する書込ストロークを消去可能なものが知られている。このような電子機器としては、特許文献1の段落0005に記載のように、消去ストロークを構成する一連の位置(座標点)のうち隣同士の二点を結ぶ線分と、書込ストロークを構成する一連の位置のうち隣同士の二点を結ぶ線分との交差を総当りで判定し、当該書込ストロークを消去するか否かを決定するものが一般的である。
As one type of such an electronic device, one that can erase a writing stroke that intersects the erasing stroke by inputting the erasing stroke is known. As such an electronic device, as described in paragraph 0005 of
しかし、交差の判定のための演算量は膨大であり、位置検出のサンプリング期間が短いほど多くなり、画面が広いほど多くなる。
そこで、本発明は、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる電子機器の提供を目的としている。
However, the amount of calculation for determining the intersection is enormous, and increases as the sampling period for position detection is shorter, and increases as the screen is wider.
Therefore, an object of the present invention is to provide an electronic apparatus that can reduce the amount of calculation for erasing a writing stroke that intersects an erasing stroke.
本発明に係る電子機器は、複数の単位領域に分割され、画像が表示される画面と、前記画面内の指示された位置を繰り返し検出して座標データを出力するタブレットと、前記画面内の位置の指示の開始から終了までの間に検出される一連の位置で構成される軌跡をストロークとし、前記画像に書き込まれる前記ストロークを書込ストロークとしたとき、前記タブレットから出力された座標データのうち、前記書込ストロークを構成する位置の座標データを順次格納する書込バッファと、前記書込ストロークを消去するための前記ストロークを消去ストロークとしたとき、前記タブレットから出力された座標データのうち、前記消去ストロークを構成する位置の座標データを順次格納する消去バッファと、前記書き込みバッファに格納された座標データのうち、消去されていない前記書込ストロークを構成する一連の位置の座標データを用いて、消去されていない前記書込ストロークが書き込まれた前記画像を生成する画像生成部と、前記一連の位置の座標データが前記消去バッファに格納されると、消去されていない前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを対象ストロークとして特定する候補特定部と、前記対象ストロークとして特定された前記書込ストロークの各々について、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のいずれかにおいて、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、前記一部判定処理の結果が肯定の前記書込ストロークを消去する一部判定消去部とを備え、前記一部判定消去部は、一つの前記書込ストロークに係る前記一部判定処理において、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のうち一つの前記単位領域について、前記書込バッファに格納されている座標データのうち、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データと、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定することを特徴とする。
一般に、消去ストロークと交差する書込ストロークを消去する場合、ある書込ストロークを消去するか否かの判定は、消去ストロークを構成する総ての線分と当該書込ストロークを構成する総ての線分とを総当りで比較して行われる。これに対して、本発明では、画面が複数の単位領域に分割され、当該書込ストロークを構成する線分のうち当該単位領域内の線分と、消去ストロークを構成する線分のうち当該単位領域内の線分とが総当りで比較され、前者の線分のいずれかと後者の線分のいずれかとが交差する場合には、当該書込ストロークが消去される。したがって、本発明によれば、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる。
An electronic apparatus according to the present invention includes a screen that is divided into a plurality of unit areas and displays an image, a tablet that repeatedly detects a designated position in the screen and outputs coordinate data, and a position in the screen Of the coordinate data output from the tablet when the trajectory composed of a series of positions detected from the start to the end of the instruction is a stroke and the stroke written in the image is a writing stroke. A writing buffer for sequentially storing coordinate data of positions constituting the writing stroke, and when the stroke for erasing the writing stroke is an erasing stroke, among the coordinate data output from the tablet, An erasure buffer for sequentially storing coordinate data of positions constituting the erasure stroke, and a position stored in the write buffer. Among the data, an image generation unit that generates the image in which the writing stroke that has not been erased is written using coordinate data of a series of positions that constitute the writing stroke that has not been erased, and the series of data When the coordinate data of the position is stored in the erasure buffer, the writing stroke that enters at least one unit area among the unit areas that the erasing stroke enters among the writing strokes that are not erased. In each of the unit areas in which the writing stroke and the erasing stroke enter together for each of the candidate specifying unit specified as the target stroke and the writing stroke specified as the target stroke, the writing stroke One of the line segments that connect the series of positions adjacent to each other, and the erasing stroke A partial determination process is performed to determine whether or not any of the line segments connecting the series of constituent positions adjacent to each other intersects, and the writing stroke in which the result of the partial determination process is affirmative is erased A partial determination erasure unit, wherein the partial determination erasure unit is configured to include a part of the unit area in which the write stroke and the erasure stroke enter together in the partial determination process related to one write stroke. For one unit area, out of the coordinate data stored in the write buffer, the coordinate data of the position in the unit area of the series of positions constituting the write stroke and the erase stroke are configured. The coordinate data of the position in the unit area among the series of positions to be identified, and using the identified coordinate data, the coordinate data in the series of positions constituting the writing stroke A round robin is used to determine whether or not there is an intersection between a line segment that connects positions in the unit area adjacent to each other, and a line segment that connects positions in the unit area adjacent to each other among the series of positions constituting the erasing stroke. It is characterized by that.
Generally, when erasing a writing stroke that intersects with an erasing stroke, whether or not to erase a certain writing stroke is determined by determining all the lines constituting the erasing stroke and all the lines constituting the writing stroke. This is done by comparing the line segment with the brute force. On the other hand, in the present invention, the screen is divided into a plurality of unit areas, and the line segment in the unit area among the line segments constituting the writing stroke and the unit among the line segments constituting the erasing stroke. The line segments in the area are compared brute force, and if any of the former line segment and any of the latter line segment intersect, the writing stroke is erased. Therefore, according to the present invention, it is possible to reduce the amount of calculation for erasing the writing stroke that intersects the erasing stroke.
この電子機器において、1又は複数の前記書込ストロークの集合をセッションとしたとき、前記書込ストロークは1又は複数の前記セッションのいずれか一つに属し、前記候補特定部は、前記セッションに外接する矩形で囲まれた領域をセッション領域としたとき、前記一連の位置の座標データが前記消去バッファに格納されると、当該一連の位置で構成される前記消去ストロークに外接する矩形で囲まれた領域と重なる前記セッション領域を特定し、特定した前記セッション領域に係る前記セッションに属する前記書込ストロークを特定するセッション特定部と、前記セッション特定部で特定された前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを前記対象ストロークとして特定する対象ストローク特定部とを備えることが好ましい。
この電子機器によれば、消去ストロークに外接する矩形で囲まれた領域と重ならないセッション領域に係るセッションに属する書込ストロークについて、消去ストロークと当該書込ストロークとが共に進入する単位領域は存在しないとみなすことができる。これは、上記の演算量の更なる削減に寄与する。もちろん、セッション特定部と対象ストローク特定部とを備えず、総ての書込ストロークについて、消去ストロークが進入する単位領域のうち当該書込ストロークが進入する単位領域を特定するようにしてもよい。なお、各セッションには、当該セッションに係る条件を満たす一連の書込ストロークのみが属する。例えば、画面内の位置の指示の終了から開始までの期間が一定の基準時間より短い一連の書込ストロークが同一のセッションに属するようにしてもよい。
In this electronic apparatus, when a set of one or more writing strokes is a session, the writing stroke belongs to one of the one or more sessions, and the candidate specifying unit circumscribes the session. When the coordinate data of the series of positions is stored in the erasure buffer, the area enclosed by the rectangles to be enclosed is surrounded by a rectangle circumscribing the erasure stroke composed of the series of positions. A session specifying unit that specifies the session region that overlaps with a region, specifies the writing stroke belonging to the session related to the specified session region, and the erasure among the writing strokes specified by the session specifying unit The writing straw that enters at least one of the unit areas in which a stroke enters. It is preferable to provide a target stroke identification unit that identifies as the target stroke.
According to this electronic apparatus, there is no unit area where both the erase stroke and the write stroke enter the write stroke belonging to the session related to the session area that does not overlap the area surrounded by the rectangle circumscribing the erase stroke. Can be considered. This contributes to further reduction in the amount of computation. Of course, the session specifying unit and the target stroke specifying unit may not be provided, and the unit area into which the writing stroke enters may be specified among all the writing strokes in the unit area into which the erasing stroke enters. Note that each session includes only a series of writing strokes that satisfy the conditions relating to the session. For example, a series of writing strokes in which the period from the end to the start of the position instruction in the screen is shorter than a certain reference time may belong to the same session.
この電子機器において、前記セッション特定部に特定された前記書込ストロークのうち、前記対象ストロークとして特定されなかった前記書込ストロークの各々について、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する全部判定処理を実行し、前記全部判定処理の結果が肯定の前記書込ストロークを消去する全部判定消去部とを備え、前記全部判定消去部は、一つの前記書込ストロークに係る前記全部判定処理において、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定するようにしてもよい。
この電子機器によれば、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについても、消去ストロークとの交差の有無を判定することができるから、消去の精度が向上する。もちろん、全部判定消去部を備えず、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについては消去しないようにしてもよい。この場合、演算量が削減される。
In this electronic apparatus, for each of the writing strokes not specified as the target stroke among the writing strokes specified by the session specifying unit, a series of positions constituting the writing stroke are adjacent to each other. All determination processing is performed to determine whether any of the connecting line segments and any of the line segments connecting the series of positions constituting the erasing stroke adjacent to each other, and the result of the all determination processing is An all-determination erasing unit that erases the affirmative writing stroke, and the all-determination erasing unit determines the series of positions constituting the writing stroke in the all-determination process relating to one writing stroke. Whether or not there is a crossover between the line segment connecting adjacent lines and the line segment connecting the series of positions constituting the erasing stroke adjacent to each other It may be.
According to this electronic apparatus, it is possible to determine whether or not a writing stroke that does not enter any of the unit areas to which the erasing stroke enters can determine whether or not it intersects with the erasing stroke, thereby improving the erasing accuracy. Of course, it is also possible not to provide a complete determination erasure unit and not to erase a writing stroke that does not enter any unit area into which the erasing stroke enters. In this case, the calculation amount is reduced.
上記の各電子機器において、前記全部判定消去部は、前記一部判定処理の判定結果が肯定でない前記書込ストロークの各々についても前記全部判定処理を実行する、ようにしてもよい。
この電子機器によれば、消去の精度が向上する。もちろん、全部判定消去部が、前記一部判定処理の判定結果が肯定でない前記書込ストロークのいずれについても前記全部判定処理を実行しない、ようにしてもよい。つまり、一部判定処理の判定結果が肯定でない書込ストロークについては消去しないようにしてもよい。この場合、演算量が削減される。
In each of the electronic devices described above, the all determination erasure unit may execute the all determination processing for each of the writing strokes for which the determination result of the partial determination processing is not positive.
According to this electronic device, the erasure accuracy is improved. Of course, the complete determination erasure unit may not execute the complete determination process for any of the writing strokes for which the determination result of the partial determination process is not positive. In other words, the writing stroke for which the determination result of the partial determination process is not affirmative may not be erased. In this case, the calculation amount is reduced.
<1.構成>
図1は、本発明の一実施形態に係る電子機器100の外観を示す平面図である。この図に示すように、電子機器100は、画像が表示される画面11を備え、画面11内の位置を指示するペン200によって操作される。ペン200による位置の指示は、ペン200を画面11に接触または近接させるペンダウン操作によって開始し、ペン200を画面11から遠ざけるペンアップ操作によって終了する。
<1. Configuration>
FIG. 1 is a plan view showing an appearance of an
電子機器100は、ペンダウン操作からペンアップ操作までのペン200の軌跡を入力する。入力した軌跡の扱いは、電子機器100の動作モード(書込モード/消去モード)に応じて異なる。書込モードでは、図1に示すように、入力した軌跡が書き込まれた画像が画面11に表示される。消去モードでは、図2に示すように、入力した軌跡に交差する軌跡が消去された画像が画面11に表示される。なお、消去モードにおいて入力された軌跡は、各図において破線で示されているが、実際には表示されない。
The
図1に示すように、画面11には、動作モードを切り替えるための切替ボタン21が表示される。電子機器100の使用者は、ペン200を操作して切替ボタン21を押すことにより、電子機器100の動作モードを切り替えることができる。切替ボタン21を押すためのペン200の操作の内容は任意である。例えば、切替ボタン21上でのペンダウン操作によって切替ボタン21が押されるようにしてもよいし、切替ボタン21上でのペンアップ操作によって切替ボタン21が押されるようにしてもよい。
As shown in FIG. 1, a
図3は、電子機器100の電気的な構成を示すブロック図である。この図に示すように、電子機器100は、表示部10と、タブレット30と、CPU(Central Processing Unit)40と、ROM50(Read Only Memory)と、RAM(Random Access Memory)60と、VRAM(Video RAM)70と、ストレージ80とを備える。
FIG. 3 is a block diagram illustrating an electrical configuration of the
表示部10は、例えばLCD(液晶ディスプレイ)であり、画面11を有し、VRAM70に記憶された画像データで示される画像を画面11に表示する。タブレット30は、画面11内の位置のうち、ペン200によって指示された位置を繰り返し検出し、検出した位置の座標を示す座標データを順次出力する。これらの座標データはCPU40へ供給される。
The
ストレージ80は、ハードディスク等の書き換え可能な不揮発性の記憶装置であり、各種のデータを記憶する。RAM60は、CPU40のワークメモリとして機能し、後述の書込データWD及び消去データEDを記憶する。ROM50はCPU40に実行されるプログラムを記憶している。CPU40は、RAM60をワークメモリとして上記プログラムを実行することによって各種の処理を実行する。
The
CPU40が実行する処理には、VRAM70に画像データを記憶させる処理や、タブレット30からの座標データに基づいて動作モードを切り替える処理、タブレット30からの座標データに基づいて書込データWD及び消去データEDを更新する処理、ストレージ80との間でデータを読み書きする処理などが含まれる。
The processing executed by the
ここで、「ストローク」、「セッション」及び「単位領域」について説明する。
「ストローク」は、ペンダウン操作からペンアップ操作までのペン200の軌跡であり、詳しくは、ペンダウン操作からペンアップ操作までの間にタブレット30で検出される一連の位置で構成される軌跡である。ストロークのうち、画面11に表示される画像に書き込まれるストロークが「書込ストローク」であり、書込ストロークを消去するためのストロークが「消去ストローク」である。書込ストロークは、複数の書込ストロークを個々に識別するストローク番号を用いて管理される。
Here, “stroke”, “session”, and “unit area” will be described.
The “stroke” is a trajectory of the
「セッション」は1又は複数の書込ストロークの集合であり、書込ストロークは1又は複数のセッションのいずれか一つに属する。各セッションには、当該セッションに係る条件を満たす一連の書込ストロークのみが属する。本実施形態では、原則として、同一のセッションには、ペンアップ操作からペンダウン操作までの期間が予め定められた基準時間よりも短い一連の書込ストロークが属する。 A “session” is a set of one or more writing strokes, and the writing stroke belongs to one of the one or more sessions. Each session includes only a series of writing strokes that satisfy the conditions relating to the session. In this embodiment, in principle, a series of writing strokes in which a period from a pen-up operation to a pen-down operation is shorter than a predetermined reference time belongs to the same session.
例えば、図1では、先頭の「This is a pen.」を構成する総ての書込ストロークが一つのセッションに含まれ、次の「This is a pen. This is a pen. This is a pen.」を構成する総ての書込ストロークが別のセッションに含まれ、末尾の「This is a pen. Thi」を構成する総ての書込ストロークが更に別のセッションに含まれる。 For example, in FIG. 1, all writing strokes constituting the first “This is a pen.” Are included in one session, and the next “This is a pen. This is a pen.” All writing strokes constituting "" are included in another session, and all writing strokes constituting the last "This is a pen. Thi" are included in another session.
ただし、本実施形態では、ある書込ストロークのペンアップ操作と次の書込ストロークのペンダウン操作との間に動作モードが切り替えられた場合には、当該ペンアップ操作から当該ペンダウン操作までの期間が基準時間よりも短くても、これら二つの書込ストロークは、互いに異なるセッションに属する。なお、セッションは、複数のセッションを個々に識別するセッション番号を用いて管理される。 However, in this embodiment, when the operation mode is switched between the pen-up operation of a certain writing stroke and the pen-down operation of the next writing stroke, the period from the pen-up operation to the pen-down operation is Even if it is shorter than the reference time, these two writing strokes belong to different sessions. The sessions are managed using session numbers that individually identify a plurality of sessions.
「単位領域」は、画面11内の領域である。画面11と単位領域Aとの関係は、図4に示す通りである。この図には、図2の左側の画面11の一部が拡大されて示されている。図4に示すように、CPU40は、画面11を、54行42列の単位領域Aに分割して管理する。単位領域Aは、54行42列の単位領域Aを個々に識別する単位領域番号を用いて管理される。例えば、第2行第1列の単位領域Aの単位領域番号は「43」である。以降、kを自然数とし、単位領域番号がkの単位領域Aを「単位領域Ak」と記す。もちろん、単位領域Aの行数および列数は54行42列に限られない。
The “unit area” is an area in the
図5は、RAM60に記憶される書込データWD及び消去データEDの内容を例示する図であり、図4に対応している。書込データWDは、書込ストローク及びセッションに関するデータであり、座標データc1,c2,…と、書込ストロークデータWS1,WS2,…と、セッションデータSS1,SS2,…とを含む。
FIG. 5 is a diagram illustrating the contents of the write data WD and the erase data ED stored in the
座標データc1,c2,…は、書込モードにおいてタブレット30から順次出力された座標データであり、RAM60内の書込バッファWBに順次格納される。書込バッファWBは、座標データを一つずつ格納する複数の単位記憶領域を連ねた記憶領域であり、これらの単位記憶領域には、先頭から順にアドレス「w1」、「w2」、…が付与されている。つまり、書込モードにおいてタブレット30からk番目に出力された座標データckは、アドレスが「wk」の単位記憶領域に格納される。
The coordinate data c1, c2,... Are coordinate data sequentially output from the
書込ストロークデータWSkは、書込バッファWBに格納された座標データのうち、ストローク番号が「k」の書込ストローク(書込モードにおいてk番目に入力されたストローク)を構成する一連の位置の座標データを特定する。この特定には、書込バッファWBにおけるアドレスが用いられる。例えば、書込ストロークデータWS1は、ストローク番号が「1」の書込ストローク(図4における「T」の横棒)を構成する一連の位置の座標データc1〜c51の格納位置の先頭アドレス「w1」と末尾アドレス「w51」とを示す。 The writing stroke data WSk is a series of positions constituting the writing stroke having the stroke number “k” (the kth input stroke in the writing mode) among the coordinate data stored in the writing buffer WB. Specify coordinate data. For this specification, an address in the write buffer WB is used. For example, the write stroke data WS1 includes the start address “w1” of the storage position of the coordinate data c1 to c51 of a series of positions constituting the write stroke (the horizontal bar “T” in FIG. 4) having the stroke number “1”. "And the end address" w51 ".
また、書込ストロークデータWSkは、ストローク番号が「k」の書込ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aの各々と、当該単位領域Aに対する当該書込ストロークの進入アドレスとを対応付ける。ある単位領域Aに対するある書込ストロークの進入アドレスとは、当該書込ストロークが当該単位領域Aに進入した直後にタブレット30から出力された座標データの格納位置のアドレスである。
The writing stroke data WSk includes each of the unit areas A including one or more positions in a series of positions constituting the writing stroke whose stroke number is “k”, and the writing stroke for the unit area A. Is associated with the entry address. The entry address of a certain writing stroke with respect to a certain unit area A is the address of the storage position of the coordinate data output from the
例えば、ストローク番号が「1」の書込ストローク(図4における「T」の横棒)を構成する一連の位置のうちの一以上の位置を含む単位領域Aは単位領域A130、A131及びA132であり、これら三つの単位領域Aに対する当該書込ストロークの進入アドレスは「w1」、「w18」及び「w37」であるから、書込ストロークデータWS1は、単位領域番号「130」、「131」、「131」と進入アドレス「w1」、「w18」、「w37」とをそれぞれ対応付ける。 For example, unit areas A including one or more positions in a series of positions constituting a writing stroke having a stroke number “1” (horizontal bar “T” in FIG. 4) are unit areas A130, A131, and A132. Yes, since the entry addresses of the writing strokes for these three unit areas A are “w1”, “w18”, and “w37”, the writing stroke data WS1 includes unit area numbers “130”, “131”, “131” is associated with the entry addresses “w1”, “w18”, and “w37”, respectively.
セッションデータSSkは、セッション番号がkのセッションに含まれる書込スロストロークを示すデータであり、セッション番号「k」と、当該セッションに含まれる総ての書込ストロークのストローク番号とを対応付ける。例えば、セッションデータSS1は、セッション番号が「1」のセッション(図1における先頭の「This is a pen.」)に含まれる総ての書込スロストロークを示し、セッション番号「1」と、当該セッションに含まれる総ての書込ストロークのストローク番号「1」、「2」、…、「14」とを対応付ける。 The session data SSk is data indicating a writing stroke included in the session having the session number k, and associates the session number “k” with the stroke numbers of all writing strokes included in the session. For example, the session data SS1 indicates all the writing strokes included in the session having the session number “1” (the first “This is a pen.” In FIG. 1), and the session number “1” The stroke numbers “1”, “2”,..., “14” of all writing strokes included in the session are associated with each other.
消去データEDは、消去ストロークに関するデータであり、座標データd1,d2,…と、消去ストロークデータESとを含む。座標データd1,d2,…は、消去モードにおいてタブレット30から順次出力された座標データであり、RAM60内の消去バッファEBに順次格納される。消去バッファEBは、座標データを一つずつ格納する複数の単位記憶領域を連ねた記憶領域であり、これらの単位記憶領域には、先頭から順にアドレス「e1」、「e2」、…が付与されている。ただし、消去バッファEBにおける座標データの格納位置は、消去ストローク毎に初期化される。つまり、消去バッファEBへの座標データの格納は、消去ストローク毎に上書きとなる。
The erase data ED is data relating to the erase stroke, and includes coordinate data d1, d2,... And erase stroke data ES. The coordinate data d1, d2,... Are coordinate data sequentially output from the
消去ストロークデータESは、消去バッファEBに格納された座標データのうち、最新の消去ストローク(現在の消去モードにおいて最後に入力されたストローク)を構成する一連の位置の座標データを特定する。この特定には、消去バッファEBにおけるアドレスが用いられる。ここでは、図4における破線が最新の消去ストロークであり、消去ストロークデータESは、当該消去ストロークを構成する一連の位置の座標データd1〜d22の格納位置の末尾アドレス「e22」を示す。 The erase stroke data ES specifies coordinate data of a series of positions constituting the latest erase stroke (the last input stroke in the current erase mode) among the coordinate data stored in the erase buffer EB. For this specification, an address in the erase buffer EB is used. Here, the broken line in FIG. 4 is the latest erase stroke, and the erase stroke data ES indicates the end address “e22” of the storage position of the coordinate data d1 to d22 of a series of positions constituting the erase stroke.
また、消去ストロークデータESは、最新の消去ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aの各々と、当該単位領域Aに対する当該消去ストロークの進入アドレスとを対応付ける。ある単位領域Aに対する消去ストロークの進入アドレスとは、当該消去ストロークが当該単位領域Aに進入した直後にタブレット30から出力された座標データの格納位置のアドレスである。
Further, the erase stroke data ES associates each unit area A including one or more positions among a series of positions constituting the latest erase stroke with the entry address of the erase stroke for the unit area A. The erase stroke entry address for a certain unit area A is the address of the storage position of the coordinate data output from the
ここでは、図4における破線が最新の消去ストロークであるから、最新の消去ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aは、単位領域A174及びA132である。そして、これら二つの単位領域Aに対する消去ストロークの進入アドレスは「e1」及び「e14」である。よって、消去ストロークデータESは、単位領域番号「174」、「132」と進入アドレス「e1」、「e14」とをそれぞれ対応付ける。 Here, since the broken line in FIG. 4 is the latest erase stroke, the unit areas A including one or more positions in the series of positions constituting the latest erase stroke are the unit areas A174 and A132. The entry addresses of the erase strokes for these two unit areas A are “e1” and “e14”. Therefore, the erase stroke data ES associates the unit area numbers “174” and “132” with the entry addresses “e1” and “e14”, respectively.
なお、CPU40は、書込バッファWBに格納された座標データのうち、消去されていない書込ストロークを構成する一連の位置の座標データを用いて、消去されていない書込ストロークが書き込まれた画像を生成する画像生成部として機能し、生成した画像の画像データをVRAM70に書き込む。また、CPU40は、使用者の指示に従って、RAM60上のデータをストレージ80に記憶させたり、ストレージ80に記憶されたデータを読み出したりすることができる。
Note that the
<2.動作>
前述したように、CPU40は、タブレット30からの座標データに基づいて書込データWD及び消去データEDを更新する。この更新の様子について、書込ストロークが書き込まれていない画像に「T」の横棒と縦棒を書き込んでから「T」の横棒を消去する場合を例に挙げて説明する。ただし、初期の動作モードは書込モードであるものとする。
<2. Operation>
As described above, the
まず使用者が、「T」の横棒(書込ストロークWST1)を入力するようにペン200を操作する。具体的には、図6に示すように、単位領域A130においてペンダウン操作を行い、単位領域A131を通過するようにペン200を動かし、単位領域A132においてペンアップ操作を行う。
First, the user operates the
この際、CPU40は、タブレット30から順次供給された座標データc1〜c51を書込バッファWBに順次格納する。また、CPU40は、書込データWDを更新することにより、現在のセッションのセッション番号「1」と書込ストロークWST1のストローク番号「1」とを対応付ける。
At this time, the
また、CPU40は、書込データWDを更新することにより、書込ストロークWST1について、ペンダウン操作の直後に供給された座標データの格納位置のアドレスを先頭アドレスとし、ペンアップ操作の直前に供給された座標データの格納位置のアドレスを末尾アドレスとする。
また、CPU40は、座標データが供給される度に、書込ストロークWST1が単位領域Aに進入したか否か、すなわちペン200が単位領域Aに進入したか否かを判定し、この判定の結果が肯定の場合には、書込データWDを更新することにより、書込ストロークWST1について、当該単位領域Aの単位領域番号と、当該座標データの格納位置のアドレス(進入アドレス)とを対応付ける。この判定の結果は、ペンダウン操作の直後に座標データが供給されたときにも肯定となる。
つまり、CPU40は、書込ストロークWST1について、「w1」を先頭アドレスとし、「w51」を末尾アドレスとし、単位領域番号「130」、「131」、「132」と進入アドレス「w1」、「w18」、「w37」とをそれぞれ対応付ける書込ストロークデータWS1をRAM60に書き込む。
Further, the
Further, every time coordinate data is supplied, the
That is, with respect to the writing stroke WST1, the
次に使用者が、「T」の縦棒(書込ストロークWST2)を入力するようにペン200を操作する。具体的には、図7に示すように、単位領域A131においてペンダウン操作を行い、単位領域A173を通過するようにペン200を動かし、単位領域A215においてペンアップ操作を行う。ただし、「T」の横棒のペンアップ操作から「T」の縦棒のペンダウン操作までの期間は前述の基準時間よりも短いものとする。
Next, the user operates the
この際、CPU40は、タブレット30から順次供給された座標データc52〜c91を書込バッファWBに順次格納する。また、CPU40は、書込データWDを更新することにより、現在のセッションのセッション番号「1」と、書込ストロークWST1のストローク番号「2」とを対応付ける。また、CPU40は、書込ストロークWST2について、「w52」を先頭アドレスとし、「w91」を末尾アドレスとし、単位領域番号「132」、「173」、「215」と進入アドレス「w52」、「w68」、「w86」とをそれぞれ対応付ける書込ストロークデータWS2をRAM60に書き込む。
At this time, the
次に使用者が、図1の切替ボタン21を操作し、電子機器100の動作モードを、書込モードから消去モードへ切り替える。これにより、その旨の操作信号がCPU40に供給される。CPU40は、この操作信号の供給を受けると、書込データWDを更新することにより、図8に示すように、セッション番号「1」とストローク番号「1」及び「2」とを対応付けるデータをセッションデータSS1とする。
Next, the user operates the
次に、使用者が、書込ストロークWST1と交差する消去ストロークESTを入力するようにペン200を操作する。具体的には、図8に示すように、単位領域A174においてペンダウン操作を行い、単位領域A132においてペンアップ操作を行う。この際、CPU40は、タブレット30から順次供給された座標データd1〜c22を消去バッファEBに順次格納する。
Next, the user operates the
また、CPU40は、消去データEDを更新することにより、消去ストロークESTについて、ペンアップ操作の直前に供給された座標データの格納位置のアドレスを末尾アドレスとする。
また、CPU40は、座標データが供給される度に、消去ストロークESTが単位領域Aに進入したか否か、すなわちペン200が単位領域Aに進入したか否かを判定し、この判定の結果が肯定の場合には、消去データEDを更新することにより、消去ストロークESTについて、当該単位領域Aの単位領域番号と、当該座標データの格納位置のアドレス(進入アドレス)とを対応付ける。この判定の結果は、ペンダウン操作の直後に座標データが供給されたときにも肯定となる。
つまり、CPU40は、消去ストロークESTについて、「e22」を末尾アドレスとし、単位領域番号「174」、「132」と進入アドレス「e1」、「e14」とをそれぞれ対応付ける消去ストロークデータESをRAM60に書き込む。
Further, the
Further, every time the coordinate data is supplied, the
That is, for the erase stroke EST, the
そして、CPU40は、消去ストロークESTに交差する書込ストロークWST1を消去する消去処理を行う。この消去処理により、図9に示すように書込データWD及び消去データEDが更新される。具体的には、セッションデータSS1が、セッション番号「1」とストローク番号「1」とを対応付けるデータとなり、書込ストロークデータWS1及び消去ストロークデータESが削除される。つまり、書込ストロークWST1が消去される。
Then, the
<3.消去処理>
以降、消去処理の内容について、図10〜図13を参照して説明する。図10〜図12は、消去処理の流れを示す図であり、同一の番号が付された接続点で接続されて一つのフローチャートを構成する。図13は電子機器100の状態の一例を模式的に示す図である。以降の説明では、基本的には、図10〜図12を参照して一般的に説明し、適宜、図13を参照して具体的に説明する。
<3. Erase process>
Hereinafter, the contents of the erasure process will be described with reference to FIGS. FIG. 10 to FIG. 12 are diagrams showing the flow of the erasing process, and they are connected at connection points assigned the same numbers to form one flowchart. FIG. 13 is a diagram schematically illustrating an example of the state of the
図10に示すように、消去処理では、CPU40は、まず、消去ストロークが入力されたか否かを判定し(S1)、この判定の結果が否定(NO)の場合には、処理をステップS1に戻す。消去ストロークが入力され、ステップS1の判定の結果が肯定(YES)となると、CPU40は、消去データEDを参照し、消去ストロークの矩形領域を特定する(S2)。消去ストロークの矩形領域とは、消去ストロークに外接する矩形に囲まれた領域であり、図13では消去ストロークESTに外接する矩形に囲まれた矩形領域αである。
As shown in FIG. 10, in the erasing process, the
次にCPU40は、最初のセッションを対象セッションとし(S3)、対象セッションのセッション領域と消去ストロークの矩形領域とが重なっているか否かを判定する(S4)。図13の場合には、セッション番号が「1」のセッションが対象セッションとなり、当該セッションに外接する矩形で囲まれた領域がセッション領域β1となり、矩形領域αとセッション領域β1とが重なっているか否かが判定される。なお、セッション領域β1は、書込データWDを参照して特定される。
Next, the
対象セッションの矩形領域と消去ストロークの矩形領域とが重なっており、ステップS3の判定の結果が肯定となると、CPU40は、対象セッションに属する最初の書込ストロークを対象ストロークとし(S7)、消去ストロークの最初の単位領域Aを対象単位領域とする(S8)。図13の場合には、書込ストロークWST1が対象ストロークとなり、消去ストロークESTが進入した単位領域Aのうち、消去ストロークESTが最初に進入した単位領域A215が対象単位領域となる。
If the rectangular area of the target session and the rectangular area of the erasing stroke overlap, and the result of the determination in step S3 is affirmative, the
次にCPU40は、書込データWDを参照し、対象ストロークが対象単位領域に進入しているか否かを判定する(S9)。この判定の結果が否定の場合、CPU40は、消去ストロークの次の単位領域Aがあるか否かを判定する(S10)。消去ストロークの次の単位領域Aとは、消去ストロークの単位領域Aのうち、当該消去ストロークが対象単位領域の次に進入する単位領域Aである。ステップS10の判定の結果が肯定の場合、CPU40は、消去ストロークの次の単位領域Aを対象単位領域とし(S11)、処理をステップS9に戻す。つまり、図13の場合には、対象単位領域は、単位領域A215、A173、A174、A132という順に変わる。
Next, the
対象ストロークが対象単位領域に進入しており、ステップS9の判定の結果が肯定となると、CPU40は、図11に示すように、書込データWD及び消去データEDを参照し、書込側開始アドレスと消去側開始アドレスを決定する(S12)。具体的には、対象ストロークについて対象単位領域に対応付けられた進入アドレスを書込側開始アドレスとし、消去ストロークについて対象単位領域に対応付けられた進入アドレスを消去側開始アドレスとする。図13の場合には、書込ストロークWST1について単位領域A132に対応付けられた進入アドレス「w52」が書込側開始アドレスとなり、消去ストロークESTについて単位領域A132に対応付けられた進入アドレス「e31」が消去側開始アドレスとなる。
If the target stroke has entered the target unit area and the result of determination in step S9 is affirmative, the
次にCPU40は、書込データWDを参照し、対象ストロークの次の単位領域Aがあるか否かを判定し(S13)、この判定の結果が肯定の場合には、対象ストロークについて対象単位領域の次の単位領域Aと対応付けられた進入アドレスの直前のアドレスを書込側終了アドレスとし(S14)、この判定の結果が否定の場合には、対象ストロークの末尾アドレスを書込側終了アドレスとする(S15)。図13の場合にはステップS13の判定の結果が否定となり、書込ストロークWST1の末尾アドレス「w51」が書込側終了アドレスとなる。
Next, the
次にCPU40は、消去データEDを参照し、消去ストロークの次の単位領域Aがあるか否かを判定し(S16)、この判定の結果が肯定の場合には、消去ストロークについて対象単位領域の次の単位領域Aと対応付けられた進入アドレスの直前のアドレスを消去側終了アドレスとし(S17)、この判定の結果が否定の場合には、消去ストロークの末尾アドレスを消去側終了アドレスとする(S18)。図13の場合にはステップS16の判定の結果が否定となり、消去ストロークESTの末尾アドレス「e44」が消去側終了アドレスとなる。
Next, the
一方、図10のステップS10の判定の結果が否定の場合、すなわち、対象ストロークと消去ストロークとの双方が進入している単位領域が残っていない場合、CPU40は、図11に示すように、書込側開始アドレスと消去側開始アドレスを決定する(S19)。具体的には、書込データWDを参照して対象ストロークの先頭アドレスを書込側開始アドレスとする一方、消去ストロークの先頭アドレス(「e1」)を消去側開始アドレスとする。次にCPU40は、書込データWD及び消去データEDを参照し、対象ストロークの末尾アドレスを書込側終了アドレスとし、消去ストロークの末尾アドレスを消去側終了アドレスとする(S20)。
On the other hand, if the result of the determination in step S10 in FIG. 10 is negative, that is, if there is no unit area in which both the target stroke and the erasing stroke have entered, the
書込側開始アドレス、書込側終了アドレス、消去側開始アドレス及び消去側終了アドレスが決定されると、CPU40は、書込側開始アドレスの座標データを書込側第1座標データとし(S21)、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスであるか否かを判定する(S22)。この判定の結果が肯定の場合、CPU40は、消去側開始アドレスの座標データを消去側第1座標データとし(S23)、消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスであるか否かを判定する(S24)。
When the write side start address, write side end address, erase side start address and erase side end address are determined, the
この判定の結果が肯定の場合、CPU40は、書込側第1座標データの格納位置の次の格納位置に格納された座標データを書込側第2座標データとする一方、消去側第1座標データの格納位置の次の格納位置に格納された座標データを消去側第2座標データとする(S25)。そしてCPU40は、書込側第1座標データに係る位置と書込側第2座標データに係る位置とを結ぶ線分(書込側線分)と、消去側第1座標データに係る位置と消去側第2座標データに係る位置とを結ぶ線分(消去側線分)とが交差するか否かを判定する(S26)。
If the result of this determination is affirmative, the
この判定の結果が肯定の場合、CPU40は、対象ストロークを消去する(S27)。具体的には、対象ストロークに係るデータがRAM60から削除されるように書込データWDを更新する。なお、本実施形態では、書込ストロークについて先頭アドレスと末尾アドレスが保持されるから、書込バッファWBから座標データを削除する必要はない。
If the result of this determination is affirmative, the
一方、ステップS26の判定の結果が否定の場合、CPU40は、消去側第2座標データを消去側第1座標データとし(S28)、処理をステップS24へ戻す。よって、対象ストロークが消去されるか、消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスでなくなるかするまで、ステップS24〜S28の処理が繰り返し実行される。
On the other hand, when the result of the determination in step S26 is negative, the
消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスでなくなり、ステップS24の判定の結果が否定となると、CPU40は、書込側第2座標データを書込側第1座標データとし(S29)、処理をステップS22へ戻す。よって、対象ストロークが消去されるか、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスでなくなるかするまで、ステップS22〜S29の処理が繰り返し実行される。
When the address of the storage position next to the storage position of the erase side first coordinate data is not the address before the erase side end address and the result of the determination in step S24 is negative, the
つまり、CPU40は、書込バッファWBの書込側開始アドレスから書込側終了アドレスまでの一連の座標データである書込側座標データと、消去バッファEBの消去側開始アドレスから消去側終了アドレスまでの一連の座標データである消去側座標データとを用いて、書込側座標データに係る一連の位置を隣同士で結ぶ線分と、消去側座標データに係る一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定し、1回でも交差する場合には、対象ストロークを消去する。
That is, the
例えば、図13の場合には、座標データc1が示す位置と座標データc2が示す位置とを結ぶ線分を書込側線分とし、まず当該書込側線分と座標データd1が示す位置と座標データd2が示す位置とを結ぶ消去側線分との交差の有無を判定し、次に当該書込側線分と座標データd2が示す位置と座標データd3が示す位置とを結ぶ消去側線分との交差の有無を判定し、…、次に当該書込側線分と座標データd43が示す位置と座標データd44が示す位置とを結ぶ消去側線分との交差の有無を判定し、次に、座標データc1が示す位置と座標データc2が示す位置とを結ぶ線分を書込側線分とし、…というように線分の交差の有無が順次判定され、結局、書込ストロークWST1が消去される。 For example, in the case of FIG. 13, a line segment connecting the position indicated by the coordinate data c1 and the position indicated by the coordinate data c2 is set as a write side line segment. First, the position and coordinate data indicated by the write side line segment and the coordinate data d1 are used. It is determined whether or not there is an intersection with the erase side line connecting the position indicated by d2, and then the intersection of the write side line segment and the erase side line connecting the position indicated by the coordinate data d2 and the position indicated by the coordinate data d3. Next, it is determined whether or not there is an intersection between the write side line segment, the position indicated by the coordinate data d43, and the erase side line segment connecting the position indicated by the coordinate data d44, and then the coordinate data c1 is The line segment connecting the indicated position and the position indicated by the coordinate data c2 is defined as the writing side line segment, and the presence / absence of the intersection of the line segments is sequentially determined, and as a result, the writing stroke WST1 is erased.
対象ストロークが消去されるか、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスでなくなるかして、ステップS22の判定結果が否定となると、CPU40は、次の書込ストロークがあるか否かを判定する(S30)。この判定の結果は、対象セッションに対象ストロークとなっていない書込ストロークが残っている場合に肯定となり、他の場合に否定となる。
If the target stroke is erased, or the address of the storage position next to the storage position of the writing side first coordinate data is no longer the address before the writing side end address, the determination result in step S22 is negative. The
ステップS30の判定の結果が肯定の場合、CPU40は、次の書込ストロークを対象ストロークとし(S31)、処理をステップS8へ戻す。つまり、対象セッションに属する総ての書込ストロークについて、上記の処理が行われる。なお、図13の場合には、対象セッションに対象ストロークとなっていない書込ストロークWST2が残っているから、書込ストロークWST2が対象ストロークとなる。対象ストロークが書込ストロークWST2の場合、ステップS12の処理が2回行われた後にステップS19の処理が行われるが、対象ストロークは消去されない。
If the determination result of step S30 is affirmative, the
一方、ステップS30の判定の結果が否定の場合、CPU40は、対象セッションの次のセッションがあるか否かを判定し(S5)、この判定の結果が肯定の場合には、次のセッションを対象セッションとし(S6)、処理をステップS4に戻す。つまり、総てのセッションについて、上記の処理が行われる。ただし、図13の場合には、セッション領域β2もβ3も矩形領域αと重ならないから、セッション番号が「1」のセッションとは異なるセッションについて線分の交差の有無が判定されることはない。
On the other hand, if the result of the determination in step S30 is negative, the
そして、次のセッションがなくなり、ステップS5の判定の結果が否定となると、CPU40は、消去ストロークに係るデータがRAM60から削除されるように消去データEDを更新し、処理をステップS1へ戻す。なお、本実施形態では、消去ストロークについて末尾アドレスが保持されるから、消去バッファEBから座標データを削除する必要はない。
When there is no next session and the result of the determination in step S5 is negative, the
以上説明したように、CPU40は、一連の位置の座標データが消去バッファEBに格納されると、消去されていない書込ストロークのうち、消去ストロークが進入する単位領域Aのうち少なくとも一つの単位領域Aに進入する書込ストロークを対象ストローク(ステップS9の判定の結果が肯定となる書込ストローク)として特定する候補特定部と、対象ストロークとして特定された書込ストロークの各々について、当該書込ストロークと消去ストロークとが共に進入する単位領域Aのいずれかにおいて、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、消去ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、当該一部判定処理の結果が肯定の書込ストロークを消去する一部判定消去部として機能する。
さらに、CPU40は、一部判定消去部として、一つの書込ストロークに係る一部判定処理において、当該書込ストロークと消去ストロークとが共に進入する単位領域Aのうち一つの単位領域Aについて、書込バッファWBに格納されている座標データのうち、当該書込ストロークを構成する一連の位置のうち当該単位領域A内の位置の座標データと、消去ストロークを構成する一連の位置のうち当該単位領域A内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する一連の位置のうち当該単位領域A内の位置を隣同士で結ぶ線分と、消去ストロークを構成する一連の位置のうち当該単位領域A内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する。
よって、本発明によれば、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる。
As described above, when coordinate data of a series of positions is stored in the erasure buffer EB, the
Further, as a partial determination erasure unit, the
Therefore, according to the present invention, it is possible to reduce the amount of calculation for erasing the writing stroke that intersects the erasing stroke.
また、CPU40は、消去ストロークを構成する一連の位置の座標データが消去バッファに格納されると、消去されていない書込ストロークのうち、当該一連の位置で構成される消去ストロークに外接する矩形で囲まれた領域(矩形領域)と重なるセッション領域を特定し、特定したセッション領域に係るセッションに属する書込ストロークを特定するセッション特定部と、セッション特定部で特定された書込ストロークのうち、消去ストロークが進入する単位領域Aのうち少なくとも一つの単位領域Aに進入する書込ストロークを対象ストロークとして特定する対象ストローク特定部として機能する。
よって、電子機器100によれば、消去ストロークに外接する矩形で囲まれた領域と重ならないセッション領域に係るセッションに属する書込ストロークについて、ステップS7以降の処理を行わずに済む。これは、上記の演算量の更なる削減に寄与する。
Further, when the coordinate data of a series of positions constituting the erase stroke is stored in the erase buffer, the
Therefore, according to the
また、CPU40は、セッション特定部に特定された書込ストロークのうち、対象ストロークとして特定されなかった書込ストローク(ステップS10の判定の結果が否定となる書込ストローク)の各々について、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、消去ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する全部判定処理を実行し、当該全部判定処理の結果が肯定の書込ストロークを消去する全部判定消去部として機能し、当該全部判定消去部として、一つの書込ストロークに係る全部判定処理において、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分と、消去ストロークを構成する一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する。
よって、電子機器100によれば、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについても、消去ストロークとの交差の有無が判定されるから、消去の精度が向上する。
In addition, the
Therefore, according to the
また、CPU40は、全部判定消去部として、前述の一部判定処理の判定結果が肯定でない書込ストロークの各々についても全部判定処理を実行する。僅かではあるが、一部判定処理の判定結果が肯定でない書込ストロークと消去ストロークとが交差する可能性があるから、電子機器100によれば消去の精度が向上する。
Further, the
なお、本実施形態では、ストレージ80に記憶されたデータについても、書込ストロークを消去することができる。この機能の実現方法としては、CPU40が、書込データWD及び消去データEDとバッファのアドレスに相当する識別情報とをストレージ80に記憶させ、この識別情報を用いて座標データにアクセスする方法が挙げられる。
In the present embodiment, the writing stroke can be erased for the data stored in the
<4.変形例>
本発明は、上述した実施形態に限らず、上述した実施形態を変形して得られる各種の変形例やその組み合わせを範囲に含みうる。そのような変形例を以下に例示する。
例えば、セッション特定部と対象ストローク特定部とを備えず、総ての書込ストロークについて、消去ストロークが進入する単位領域のうち当該書込ストロークが進入する単位領域を特定するようにしてもよい。
また例えば、全部判定消去部を備えず、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについては消去しないようにしてもよい。この変形例によれば、演算量が削減される。
また例えば、全部判定消去部が、一部判定処理の判定結果が肯定でない書込ストロークのいずれについても全部判定処理を実行しないようにしてもよい。つまり、一部判定処理の判定結果が肯定でない書込ストロークについては消去しないようにしてもよい。この変形例によれば、演算量が削減される。
<4. Modification>
The present invention is not limited to the above-described embodiment, and may include various modifications obtained by modifying the above-described embodiment and combinations thereof. Such a modification is illustrated below.
For example, the session specifying unit and the target stroke specifying unit may not be provided, and the unit region where the writing stroke enters may be specified among all the writing strokes among the unit regions where the erasing stroke enters.
Further, for example, the entire determination erasure unit may not be provided, and a writing stroke that does not enter any unit area in which the erasing stroke enters may not be erased. According to this modification, the amount of calculation is reduced.
Further, for example, the all determination erasing unit may not execute the all determination process for any writing stroke for which the determination result of the partial determination process is not affirmative. In other words, the writing stroke for which the determination result of the partial determination process is not affirmative may not be erased. According to this modification, the amount of calculation is reduced.
100……電子機器、200……ペン、10……表示部、11……画面、21……切替ボタン、30……タブレット、40……CPU、60……RAM、A……単位領域、EB……消去バッファ、EST……消去ストローク、WB……書込バッファ、WSTk……書込ストローク、ck,dk……座標データ、wk,ek……アドレス、α……矩形領域、β1〜β3……セッション領域。
100 …… Electronic device, 200 …… Pen, 10 …… Display, 11 …… Screen, 21 …… Switch button, 30 …… Tablet, 40 …… CPU, 60 …… RAM, A …… Unit area, EB ... Erase buffer, EST ... Erase stroke, WB ... Write buffer, WSTk ... Write stroke, ck, dk ... Coordinate data, wk, ek ... Address, α ... Rectangle area, β1-β3 ... ... session area.
Claims (4)
前記画面内の指示された位置を繰り返し検出して座標データを出力するタブレットと、
前記画面内の位置の指示の開始から終了までの間に検出される一連の位置で構成される軌跡をストロークとし、前記画像に書き込まれる前記ストロークを書込ストロークとしたとき、前記タブレットから出力された座標データのうち、前記書込ストロークを構成する位置の座標データを順次格納する書込バッファと、
前記書込ストロークを消去するための前記ストロークを消去ストロークとしたとき、前記タブレットから出力された座標データのうち、前記消去ストロークを構成する位置の座標データを順次格納する消去バッファと、
前記書き込みバッファに格納された座標データのうち、消去されていない前記書込ストロークを構成する一連の位置の座標データを用いて、消去されていない前記書込ストロークが書き込まれた前記画像を生成する画像生成部と、
前記一連の位置の座標データが前記消去バッファに格納されると、消去されていない前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを対象ストロークとして特定する候補特定部と、
前記対象ストロークとして特定された前記書込ストロークの各々について、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のいずれかにおいて、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、前記一部判定処理の結果が肯定の前記書込ストロークを消去する一部判定消去部とを備え、
前記一部判定消去部は、一つの前記書込ストロークに係る前記一部判定処理において、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のうち一つの前記単位領域について、前記書込バッファに格納されている座標データのうち、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データと、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する、
ことを特徴とする電子機器。 A screen on which an image is displayed divided into a plurality of unit areas;
A tablet that repeatedly detects the indicated position in the screen and outputs coordinate data;
When the locus composed of a series of positions detected from the start to the end of the position indication in the screen is a stroke, and the stroke written in the image is a writing stroke, it is output from the tablet. A write buffer for sequentially storing coordinate data of positions constituting the write stroke among the coordinate data;
When the stroke for erasing the writing stroke is an erasing stroke, among the coordinate data output from the tablet, an erasing buffer that sequentially stores coordinate data of positions constituting the erasing stroke;
Of the coordinate data stored in the write buffer, the coordinate data of a series of positions constituting the write stroke not erased is used to generate the image in which the write stroke not erased is written. An image generator;
When the coordinate data of the series of positions is stored in the erasure buffer, the writing that enters at least one unit area of the unit areas that the erasing stroke enters among the writing strokes that are not erased. A candidate identifying unit that identifies the included stroke as the target stroke;
For each of the writing strokes specified as the target stroke, in any one of the unit regions where the writing stroke and the erasing stroke enter together, the series of positions constituting the writing stroke are adjacent to each other. Executing a partial determination process for determining whether or not one of the line segments connecting with each other and one of the line segments connecting the series of positions constituting the erasing stroke adjacent to each other, and performing the partial determination process A partial determination erasing unit for erasing the writing stroke with a positive result of
The partial determination erasure unit is configured to perform the write operation on one unit area of the unit areas in which the write stroke and the erase stroke enter together in the partial determination process related to one write stroke. Among the coordinate data stored in the buffer, the coordinate data of the position in the unit area among the series of positions constituting the writing stroke and the unit of the series of positions constituting the erasing stroke Specifying the coordinate data of the position in the area, and using the specified coordinate data, the line segment connecting the positions in the unit area adjacent to each other in the series of positions constituting the writing stroke, and the erasing Determining the presence or absence of intersection with the line segment connecting the positions in the unit area adjacent to each other among the series of positions constituting the stroke,
An electronic device characterized by that.
前記候補特定部は、
前記セッションに外接する矩形で囲まれた領域をセッション領域としたとき、前記一連の位置の座標データが前記消去バッファに格納されると、当該一連の位置で構成される前記消去ストロークに外接する矩形で囲まれた領域と重なる前記セッション領域を特定し、特定した前記セッション領域に係る前記セッションに属する前記書込ストロークを特定するセッション特定部と、
前記セッション特定部で特定された前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを前記対象ストロークとして特定する対象ストローク特定部とを備える、
ことを特徴とする請求項1に記載の電子機器。 When a set of one or more of the writing strokes is a session, the writing stroke belongs to any one of the one or more of the sessions,
The candidate specifying unit
When an area surrounded by a rectangle circumscribing the session is defined as a session area, a rectangle circumscribing the erasure stroke constituted by the series of positions when the coordinate data of the series of positions is stored in the erasure buffer. A session identifying unit that identifies the session region that overlaps with the region surrounded by, and identifies the writing stroke belonging to the session associated with the identified session region;
A target stroke specifying unit that specifies, as the target stroke, the writing stroke that enters at least one of the unit areas that the erasing stroke enters among the writing strokes specified by the session specifying unit. With
The electronic device according to claim 1.
前記全部判定消去部は、一つの前記書込ストロークに係る前記全部判定処理において、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する、
ことを特徴とする請求項2に記載の電子機器。 Among the writing strokes specified by the session specifying unit, for each of the writing strokes not specified as the target stroke, any of line segments connecting a series of positions constituting the writing stroke adjacent to each other And an all-determination process that determines whether or not one of the line segments that connect the series of positions constituting the erasing stroke intersects each other, and the result of the all-determination process is affirmative An all judgment erasing unit that erases the stroke,
The all determination erasure unit, in the all determination process related to one of the writing strokes, the line segment connecting the series of positions constituting the writing stroke next to each other, and the series of the erasing strokes Judgment of round-robin presence or absence of intersection with the line segment that connects the positions next to each other,
The electronic device according to claim 2.
ことを特徴とする請求項1乃至3のうちいずれか一項に記載の電子機器。
The all determination erasure unit also executes the all determination processing for each of the writing strokes for which the determination result of the partial determination processing is not positive.
The electronic device according to any one of claims 1 to 3, wherein
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012888A JP5482225B2 (en) | 2010-01-25 | 2010-01-25 | Electronics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012888A JP5482225B2 (en) | 2010-01-25 | 2010-01-25 | Electronics |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011150619A true JP2011150619A (en) | 2011-08-04 |
JP5482225B2 JP5482225B2 (en) | 2014-05-07 |
Family
ID=44537516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010012888A Expired - Fee Related JP5482225B2 (en) | 2010-01-25 | 2010-01-25 | Electronics |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5482225B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021033805A (en) * | 2019-08-28 | 2021-03-01 | 株式会社リコー | Display unit, display method, and display program |
WO2021225033A1 (en) * | 2020-05-07 | 2021-11-11 | ブラザー工業株式会社 | Editing program |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775429A (en) * | 2017-03-08 | 2017-05-31 | 青岛海信电器股份有限公司 | A kind of method and apparatus based on setting-out storage on touch-screen |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60129829A (en) * | 1983-12-16 | 1985-07-11 | インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション | Electronic type hand-writing real time erasion |
JPH0636073A (en) * | 1992-07-16 | 1994-02-10 | Toshiba Corp | Handwriting editing device |
JPH09258716A (en) * | 1996-03-25 | 1997-10-03 | Sanyo Electric Co Ltd | Stroke information processing method |
JP2000259335A (en) * | 1999-03-12 | 2000-09-22 | Seiko Epson Corp | Method and processor for handwriting information deletion, and storage medium recording handwriting information delletion program |
JP2001014096A (en) * | 1999-06-25 | 2001-01-19 | Toshiba Corp | Pen input device and character input method in the device |
-
2010
- 2010-01-25 JP JP2010012888A patent/JP5482225B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60129829A (en) * | 1983-12-16 | 1985-07-11 | インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション | Electronic type hand-writing real time erasion |
JPH0636073A (en) * | 1992-07-16 | 1994-02-10 | Toshiba Corp | Handwriting editing device |
JPH09258716A (en) * | 1996-03-25 | 1997-10-03 | Sanyo Electric Co Ltd | Stroke information processing method |
JP2000259335A (en) * | 1999-03-12 | 2000-09-22 | Seiko Epson Corp | Method and processor for handwriting information deletion, and storage medium recording handwriting information delletion program |
JP2001014096A (en) * | 1999-06-25 | 2001-01-19 | Toshiba Corp | Pen input device and character input method in the device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021033805A (en) * | 2019-08-28 | 2021-03-01 | 株式会社リコー | Display unit, display method, and display program |
JP7467842B2 (en) | 2019-08-28 | 2024-04-16 | 株式会社リコー | Display device, display method, and display program |
WO2021225033A1 (en) * | 2020-05-07 | 2021-11-11 | ブラザー工業株式会社 | Editing program |
JP2021177273A (en) * | 2020-05-07 | 2021-11-11 | ブラザー工業株式会社 | Editing program |
JP7419959B2 (en) | 2020-05-07 | 2024-01-23 | ブラザー工業株式会社 | editing program |
Also Published As
Publication number | Publication date |
---|---|
JP5482225B2 (en) | 2014-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4560062B2 (en) | Handwriting determination apparatus, method, and program | |
US9141134B2 (en) | Utilization of temporal and spatial parameters to enhance the writing capability of an electronic device | |
US9360955B2 (en) | Text entry for electronic devices | |
CN109407954B (en) | Writing track erasing method and system | |
JP5536690B2 (en) | Touch drawing display device and operation method thereof | |
CN104238768A (en) | Handwriting input apparatus and control method | |
US20040196255A1 (en) | Method for implementing a partial ink layer for a pen-based computing device | |
JP5482225B2 (en) | Electronics | |
JP3292752B2 (en) | Gesture processing device and gesture processing method | |
US20090253505A1 (en) | Method for controlling selection of multiple objects displayed on a display device | |
CN109358799B (en) | Method for adding handwritten annotation information input by user on handwriting equipment | |
JPH10124239A (en) | Tabelt input device | |
CN106371644B (en) | Method and device for simultaneously writing by multiple persons on screen | |
WO2022160619A1 (en) | Handwriting recognition method and apparatus, handwriting recognition system and interactive board | |
CN106933486B (en) | Touch implementation method and device for android system | |
JP5278058B2 (en) | Display device | |
JP2917187B2 (en) | Vector data erasure method | |
JP5801920B2 (en) | Touch drawing display device and operation method thereof | |
JPH09258716A (en) | Stroke information processing method | |
JP2012243230A (en) | Display control device and program | |
JP7388483B2 (en) | Display control device, display control method, and program | |
JP3658947B2 (en) | GRAPH DISPLAY DEVICE, GRAPH DISPLAY CONTROL METHOD, AND RECORDING MEDIUM CONTAINING GRAPH DISPLAY CONTROL PROGRAM | |
JP3578917B2 (en) | Image processing apparatus, image processing system, image processing method, and computer-readable recording medium | |
JP2001243421A (en) | Character processor and character processing method | |
JPH064713A (en) | Handwritten character input device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130709 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130710 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130902 |
|
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: 20140121 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140203 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5482225 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |