JP2014048819A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

Publication number
JP2014048819A
JP2014048819A JP2012190313A JP2012190313A JP2014048819A JP 2014048819 A JP2014048819 A JP 2014048819A JP 2012190313 A JP2012190313 A JP 2012190313A JP 2012190313 A JP2012190313 A JP 2012190313A JP 2014048819 A JP2014048819 A JP 2014048819A
Authority
JP
Japan
Prior art keywords
image
handwriting
document
electronic pen
document image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012190313A
Other languages
Japanese (ja)
Other versions
JP6019939B2 (en
Inventor
Hiroshi Tanaka
宏 田中
Yoshinobu Hotta
悦伸 堀田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012190313A priority Critical patent/JP6019939B2/en
Publication of JP2014048819A publication Critical patent/JP2014048819A/en
Application granted granted Critical
Publication of JP6019939B2 publication Critical patent/JP6019939B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To properly eliminate a handwritten part of a document image by using a handwritten image generated from coordinate data by an electronic pen.SOLUTION: An image processor includes: image acquisition means for acquiring a document image of a document including handwriting by an electronic pen; handwriting acquisition means for acquiring coordinate data of the handwriting by the electronic pen; generation means for generating a plurality of handwritten images based on the coordinate data by using a plurality of different line width; retrieval means for retrieving an image of a handwritten part similar to the handwritten image from the document image in each generated handwritten image; selection means for selecting a handwritten image that is the most similar to the image of the handwritten in the document image; and elimination means for eliminating the image of the handwritten part from the document image by using the selected handwritten image.

Description

本発明は、文書画像と筆跡の座標データを処理する画像処理装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program for processing document image and handwriting coordinate data.

近年、紙文書をスキャナ等で画像に変換して、電子文書として保存、再利用するケースが増えている。その理由の一つは、紙の保存容積の削減である。紙文書の電子化により、多くの文書の保管や持ち運びが容易になる。   In recent years, there is an increasing number of cases where paper documents are converted into images by a scanner or the like and stored and reused as electronic documents. One reason for this is the reduction in paper storage volume. The digitization of paper documents makes it easy to store and carry many documents.

また、電子文書を認識して文字コードによる検索を行うことにより、所望の文書が簡単に発見でき、厚い紙資料の束を利用する場合に比べて資料の再利用が容易になるという利点もある。   Also, by recognizing an electronic document and performing a search using a character code, there is an advantage that a desired document can be easily found and the reuse of the material is easier than when using a bundle of thick paper materials. .

会議等で配布される紙資料をスキャンして電子化する場合、会議中に書き込んだ筆跡が不要となる場合がある。例えば、配布資料を複数名で共有して使う場合、書き込みの無い文書画像を参照したい場合である。なお、書き込み自体にも重要な情報が含まれるため、書き込みのある文書画像が必要とされる場合もあり、いずれが必要かは利用者の志向や利用目的に依存する。   When paper materials distributed at a meeting or the like are scanned and digitized, handwriting written during the meeting may be unnecessary. For example, when a distributed material is shared by a plurality of people and used, a document image without writing is referred to. Since important information is also included in writing itself, a document image with writing may be required. Which one is required depends on the user's intention and purpose of use.

書き込み前の文書画像が必要であれば、資料に書き込みを行う前にスキャンして文書画像を生成しておけばよい。しかし、実際には会議等で配布された資料はすぐに会議で使用されるため、会議前にスキャンして文書画像を作成する時間を取れないことが多い。また、会議場所で即座に紙文書をスキャンできる環境(スキャナ装置など)が利用できるとは限らない。   If a document image before writing is necessary, the document image may be generated by scanning before writing on the material. However, since the material distributed at the meeting or the like is actually used at the meeting immediately, it often takes time to scan and create a document image before the meeting. In addition, an environment (such as a scanner device) that can immediately scan a paper document at a meeting place is not always available.

したがって、紙資料をスキャンする際には書き込んだ筆跡が既に存在しており、書き込み前の状態の文書画像が入手できない場合がある。   Therefore, when the paper material is scanned, the written handwriting already exists, and the document image in the state before writing may not be obtained.

また、会議などで配布された資料の内容を後々検索できるように、スキャナで紙資料を読み込んで、文書画像から文字認識をしてキーワードなどの登録を行う場合がある。このとき、紙資料に書き込みなどがあると、行の認識等を誤り、文字認識が適切にできない場合がある。   In addition, in order to be able to search the contents of materials distributed at a meeting or the like later, paper materials may be read by a scanner, characters may be recognized from a document image, and keywords may be registered. At this time, if there is writing or the like on paper material, recognition of the line or the like may be wrong, and character recognition may not be performed properly.

このように、紙資料をスキャナ等で電子化する際に、手書きで書き込んだ(追記した)筆跡を消去したいというニーズがある。筆跡画像を消去する技術として、例えば、文字ストロークの太さや直線性、文字間隔の規則性、文字列画像の周波数成分の分布などを用いてスキャン画像から筆跡画像を検出し、消去するという技術がある。しかしながら、元々の紙資料に手書きの文字等がある場合などには、追記された手書きによる筆跡部分を適切に検出することができず、筆跡画像を適切に消去することができない。   As described above, when a paper material is digitized by a scanner or the like, there is a need to erase a handwritten handwritten (added) handwriting. As a technique for erasing the handwriting image, for example, there is a technique for detecting and erasing the handwriting image from the scan image using the character stroke thickness and linearity, the regularity of the character spacing, the frequency component distribution of the character string image, etc. is there. However, when there are handwritten characters or the like in the original paper material, the handwritten handwritten portion that has been additionally written cannot be detected properly, and the handwritten image cannot be erased appropriately.

一方で、筆跡を座標点データとして取得することができる電子ペン(又はデジタルペンともいう)が存在する。電子ペンとは、紙に筆記すると同時に、筆記した座標の座標点データ(x座標値とy座標値)の系列を取得することのできる筆記装置である。ペン先からは通常のペンと同様にインクが出るため、紙には文字や図形などが書かれるが、同時に筆跡の座標点データを取得することもできる。以下、筆跡の座標点データは単に座標データとも称す。   On the other hand, there are electronic pens (or digital pens) that can acquire handwriting as coordinate point data. The electronic pen is a writing device that can acquire a series of coordinate point data (x coordinate value and y coordinate value) of written coordinates simultaneously with writing on paper. Since ink comes out from the pen tip in the same way as a normal pen, characters and figures are written on the paper, but at the same time, the coordinate point data of the handwriting can be acquired. Hereinafter, the coordinate point data of the handwriting is also simply referred to as coordinate data.

電子ペンには複数の方式があり、例えば超音波発信機を用いたペン、タブレット装置の上に紙を置き、スタイラスペンの先に通常のペン先を装着したもの、微小なドットの専用紙を用いるアノトペンなどがある。   There are several types of electronic pens. For example, a pen using an ultrasonic transmitter, a paper placed on a tablet device, a normal stylus pen attached to the tip of a stylus pen, and a special paper with minute dots. There are anotopens to use.

特開2002−082762号公報JP 2002-082662 A 特開2002−082764号公報Japanese Patent Application Laid-Open No. 2002-082664 特開2008−102782号公報JP 2008-102782 A 特開2007−079506号公報JP 2007-079506 A

ここで、電子ペンから取得された座標データを用いて、文書画像から筆跡部分を消去する場合、電子ペンが有する書き込み位置に関する情報の信頼性が低いという問題点がある。   Here, when the handwriting part is erase | eliminated from a document image using the coordinate data acquired from the electronic pen, there exists a problem that the reliability regarding the information regarding the writing position which an electronic pen has is low.

例えば、打合せ中には資料を前後して参照し、適宜書き込みを行うので、電子ペンが有する書き込みに関するページ情報の信頼性は低い。また、タブレット装置の上に紙を置く場合、用紙固定位置に対する位置で、紙が正しくセットされていなければ、電子ペンの測定位置に誤差が生じる。   For example, during the meeting, the material is referred to before and after and writing is performed as appropriate, so the reliability of the page information related to writing that the electronic pen has is low. Further, when placing paper on the tablet device, if the paper is not set correctly at a position relative to the paper fixing position, an error occurs in the measurement position of the electronic pen.

よって、電子ペンが有する書き込み位置に関する情報は信頼性が低く、書き込み位置に関する情報を筆跡の消去に利用することは難しい。   Therefore, the information regarding the writing position of the electronic pen is low in reliability, and it is difficult to use the information regarding the writing position for erasing the handwriting.

そこで、開示の技術は、電子ペンによる座標データから生成された筆跡画像を用いて、文書画像の筆跡部分を適切に消去することができる画像処理装置、画像処理方法及びプログラムを提供することを目的とする。   Accordingly, the disclosed technique aims to provide an image processing apparatus, an image processing method, and a program that can appropriately erase a handwriting portion of a document image using a handwriting image generated from coordinate data by an electronic pen. And

開示の一態様における画像処理装置は、電子ペンによる筆跡を含む文書の文書画像を取得する画像取得手段と、前記電子ペンによる筆跡の座標データを取得する筆跡取得手段と、複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成する生成手段と、生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索する検索手段と、前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択する選択手段と、選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する消去手段と、を備える。   An image processing apparatus according to an aspect of the disclosure includes an image acquisition unit that acquires a document image of a document including a handwriting by an electronic pen, a handwriting acquisition unit that acquires coordinate data of a handwriting by the electronic pen, and a plurality of different line widths. A generating unit configured to generate a plurality of handwriting images based on the coordinate data; a searching unit configured to search for an image of a handwriting part similar to the handwriting image for each generated handwriting image; and the document image Selecting means for selecting the handwriting image most similar to the image of the handwriting portion, and erasing means for erasing the image of the handwriting portion from the document image using the selected handwriting image.

開示の技術によれば、電子ペンによる座標データから生成された筆跡画像を用いて、文書画像の筆跡部分を適切に消去することができる。   According to the disclosed technique, it is possible to appropriately erase the handwriting portion of the document image using the handwriting image generated from the coordinate data by the electronic pen.

前提技術の筆跡消去処理の流れを説明する図。The figure explaining the flow of the handwriting erasure | elimination process of base technology. 一般化ハフ変換の具体的な手順を説明する図。The figure explaining the specific procedure of generalized Hough conversion. 座標点データから筆跡画像を生成する一例を示す図。The figure which shows an example which produces | generates a handwriting image from coordinate point data. 細い筆跡と太い筆跡とから生成したエッジ画像の一例を示す図。The figure which shows an example of the edge image produced | generated from the thin handwriting and the thick handwriting. 文字の太さによる細線化画像の違いを示す図。The figure which shows the difference in the thinning image by the thickness of a character. 実施例における画像処理装置のハードウェアの一例を示すブロック図。The block diagram which shows an example of the hardware of the image processing apparatus in an Example. 実施例における画像処理装置の機能の一例を示すブロック図。The block diagram which shows an example of the function of the image processing apparatus in an Example. 実施例における筆跡消去処理の流れを説明する図。The figure explaining the flow of the handwriting erasure | elimination process in an Example. 座標データのデータ構造の一例を示す図。The figure which shows an example of the data structure of coordinate data. 筆記状態の意味を説明する図。The figure explaining the meaning of a writing state. 座標点を線分で繋いだ状態の一例を示す図。The figure which shows an example of the state which connected the coordinate point with the line segment. 座標点の間を1画素で埋めた状態の一例を示す図。The figure which shows an example of the state which filled between the coordinate points with 1 pixel. 筆跡の境界が決定された状態の一例を示す図。The figure which shows an example of the state as which the boundary of the handwriting was determined. 線幅wで画素を埋めた状態の一例を示す図。The figure which shows an example of the state which filled the pixel with line | wire width w. 検索の動作例を示す図。The figure which shows the operation example of a search. 線幅毎の検索結果の一例を示す図。The figure which shows an example of the search result for every line width. 単純に背景色で塗りつぶす例を示す図。The figure which shows the example painted simply with a background color. 実施例による塗り潰し処理を説明する図。The figure explaining the filling process by an Example. 塗り潰し色判定を説明する図。The figure explaining the filling color determination. 実施例における筆跡消去処理の一例を示すフローチャート。The flowchart which shows an example of the handwriting deletion process in an Example. 複数の筆跡画像を生成する処理の一例を示すフローチャート。The flowchart which shows an example of the process which produces | generates a some handwriting image. 筆跡消去後の画素埋め処理の一例を示すフローチャート。The flowchart which shows an example of the pixel filling process after handwriting deletion.

まず、実施例の前提となる技術について説明する。前提技術では、座標データから筆跡画像を生成し、スキャナから読み取った文書画像から筆跡画像に近い画像を検索し、検索された部分画像を筆跡画像に基づいて消去する。   First, a technique that is a premise of the embodiment will be described. In the base technology, a handwriting image is generated from coordinate data, an image close to the handwriting image is searched from a document image read from a scanner, and the searched partial image is erased based on the handwriting image.

図1は、前提技術の筆跡消去処理の流れを説明する図である。図1に示すように、電子ペン10を用いて資料に追記で筆記する。このとき、電子ペン10は、資料に筆記した座標データを取得する。   FIG. 1 is a diagram for explaining the flow of the handwriting erasing process of the base technology. As shown in FIG. 1, the electronic pen 10 is used to write on the material by appending. At this time, the electronic pen 10 acquires coordinate data written on the material.

スキャナ装置20は、電子ペン10で追記された資料を読み取り、スキャン画像である文書画像a101を取得する。また、電子ペン10から座標データを取得した装置が、座標データから筆跡画像a102を生成する。   The scanner device 20 reads a material added by the electronic pen 10 and acquires a document image a101 that is a scanned image. Further, the device that has acquired the coordinate data from the electronic pen 10 generates the handwriting image a102 from the coordinate data.

筆跡画像a102を生成した装置は、スキャナ装置20から文書画像a101を取得し、文書画像a101内で筆跡画像a102に類似する部分画像を検索する。装置は、検索された部分画像から筆跡画像a102を用いて筆跡を消去することで、元の資料の文書画像a103を生成することができる。元の資料とは、電子ペン10で筆記された部分を除く元々記載されていた文字や図形などを含む資料をいう。   The apparatus that generated the handwritten image a102 acquires the document image a101 from the scanner apparatus 20, and searches for a partial image similar to the handwritten image a102 in the document image a101. The apparatus can generate the document image a103 of the original material by erasing the handwriting from the retrieved partial image using the handwriting image a102. The original material refers to a material that includes characters, figures, and the like that were originally written excluding the part written with the electronic pen 10.

ここで、電子ペン10で取得できる座標値は、電子ペン10が持つ基準点に対する相対座標である。紙面における座標データは、座標の原点と紙の位置を慎重に合わせることによって得ることができる。   Here, the coordinate values that can be acquired by the electronic pen 10 are relative coordinates with respect to a reference point that the electronic pen 10 has. Coordinate data on the paper surface can be obtained by carefully matching the origin of coordinates and the position of the paper.

しかし、スキャンした文書画像は、スキャン時の紙の位置や角度に微小な変動が生じるため、文書画像の座標系と座標データの座標系は、必ずしも完全に一致するわけではない。紙の位置が数mm程度ずれただけでも筆跡の画素と筆跡の座標値は全く異なる位置を示す。そのため、電子ペン10で取得できる座標値を絶対座標として扱っても、スキャン画像から筆跡に属する画素だけを消去することはできない。   However, since the scanned document image has minute fluctuations in the position and angle of the paper at the time of scanning, the coordinate system of the document image and the coordinate system of the coordinate data do not necessarily coincide completely. Even if the position of the paper is shifted by several millimeters, the handwriting pixels and the handwriting coordinate values are completely different. Therefore, even if the coordinate values that can be acquired with the electronic pen 10 are handled as absolute coordinates, it is not possible to erase only the pixels belonging to the handwriting from the scanned image.

すなわち、電子ペン10を用いて得られる筆跡の位置は、筆跡の大まかな位置と形状が分かるということであり、スキャン画像から筆跡のみを消去するという用途のためには座標の精度は不十分である。   That is, the position of the handwriting obtained using the electronic pen 10 means that the rough position and shape of the handwriting can be understood, and the accuracy of the coordinates is insufficient for the purpose of erasing only the handwriting from the scanned image. is there.

また、通常の電子ペン10は、紙がめくられて変わった場合に、筆記している紙が別の紙に変わったという情報を取得することができない。専用のボタンを設けるなどによってページ移動のタイミングを指定したとしても、複数ページの資料を参照する際には、ページは順番に参照されるとは限らない。例えば10ページ目に書き込んだ直後に、1ページ目に戻ることもあり得る。   In addition, the normal electronic pen 10 cannot acquire information that the writing paper has been changed to another paper when the paper is turned and changed. Even if the page movement timing is specified by providing a dedicated button or the like, pages are not always referred to in order when referring to a plurality of pages of material. For example, it is possible to return to the first page immediately after writing on the tenth page.

そのため、座標データがどのページに書かれているのかを確実に記録するのは困難であり、ユーザにとって煩雑である。したがって、電子ペン10によって得られる座標データは、スキャン画像の原点に対する絶対座標として解釈することはできず、位置合わせの処理が必要となる。   Therefore, it is difficult to reliably record on which page the coordinate data is written, which is troublesome for the user. Therefore, the coordinate data obtained by the electronic pen 10 cannot be interpreted as absolute coordinates with respect to the origin of the scan image, and alignment processing is required.

そこで、着目するのが、一般化ハフ変換を用いた任意図形の検索技術である。一般化ハフ変換は、「D.H. Ballard, "Generalizing the Hough transform to detect arbitrary shapes," Pattern Recogniton, vol.13, no.2, pp.111-122, 1981.」を参照されたい。   Therefore, attention is focused on an arbitrary figure search technique using generalized Hough transform. For generalized Hough transform, see “D.H. Ballard,“ Generalizing the Hough transform to detect arbitrary shapes, ”Pattern Recogniton, vol.13, no.2, pp.111-122, 1981.”.

一般化ハフ変換は、検索したい画像と、検索の対象となる画像の双方からエッジ点を求める。この場合、検索したい画像は、筆跡画像であり、検索対象となる画像はスキャン画像である。求めたエッジ点の位置と方向を投票することによって、任意の図形を検索するものである。図2は、一般化ハフ変換の具体的な手順を説明する図である。
(1)検索画像と対象画像の双方からエッジ点を検出する
(2)対象画像の全エッジ点の方向から、基準点への相対位置に得点を投票する
(3)検索画像の中で投票値の最大値が、検索画像の基準点の位置を示す
通常、エッジ点は、Sobelオペレータで画像の勾配値を求め、一定の閾値を超えた勾配値の位置と方向を格納する。一例としては、特開平09−245167号公報を参照されたい。
In the generalized Hough transform, an edge point is obtained from both an image to be searched and an image to be searched. In this case, the image to be searched is a handwriting image, and the image to be searched is a scanned image. An arbitrary figure is searched for by voting the position and direction of the obtained edge point. FIG. 2 is a diagram for explaining a specific procedure of the generalized Hough transform.
(1) Edge points are detected from both the search image and the target image. (2) The score is voted relative to the reference point from the direction of all edge points of the target image. (3) The vote value in the search image. The maximum value of the image indicates the position of the reference point of the search image. Usually, the edge point is determined by the Sobel operator, and the gradient value of the gradient value exceeding a certain threshold is stored. As an example, refer to Japanese Patent Application Laid-Open No. 09-245167.

図3は、座標点データから筆跡画像を生成する一例を示す図である。検索したい筆跡は、筆跡の座標点データで与えられているので、図3に示すように座標点データから筆跡画像を生成して検索すればよい(例えば特開2011−258129参照)。また、座標点データは、筆跡の曲線を折れ線近似した、線分の集合だとみなすことができるので、各線分から筆跡の方向を求めて、エッジ方向とみなすという方法もある。   FIG. 3 is a diagram illustrating an example of generating a handwriting image from the coordinate point data. Since the handwriting to be searched is given by the coordinate point data of the handwriting, a handwriting image may be generated from the coordinate point data and searched as shown in FIG. 3 (see, for example, JP 2011-258129 A). Further, since the coordinate point data can be regarded as a set of line segments obtained by approximating the curve of the handwriting with a broken line, there is a method in which the direction of the handwriting is obtained from each line segment and regarded as the edge direction.

ここで、スキャンされた文書画像の中に含まれる筆跡を、同じ筆跡の座標点データを用いて検索する場合、筆跡の太さが分からないため、検索の精度が低下する可能性がある。紙文書に書かれた筆跡は、使用した電子ペン10や使用者の書き方によって異なった太さの筆跡となっている。例えば細いボールペンと、水性のサインペンでは線の太さに大きな差がある。それに対して、検索したい筆跡は筆跡の座標点データであるため、線の太さの情報は持っていない。   Here, when searching for the handwriting included in the scanned document image using the coordinate point data of the same handwriting, the thickness of the handwriting is not known, and thus the search accuracy may be reduced. The handwriting written on the paper document has a different thickness depending on the electronic pen 10 used and how the user writes. For example, there is a large difference in line thickness between a thin ballpoint pen and an aqueous sign pen. On the other hand, since the handwriting to be searched is the coordinate point data of the handwriting, it does not have line thickness information.

図4は、細い筆跡と太い筆跡とから生成したエッジ画像の一例を示す図である。図4に示すように、線幅が細い筆跡と太い筆跡とをそれぞれエッジ画像に変換すると、エッジは文字の輪郭に沿っているため、異なった線幅の筆跡は、エッジの位置が大きく異なる。そのため、図4に示すように、座標点データから筆跡画像を生成した場合、生成した筆跡の線幅と、文書中の筆跡の線幅が大幅に異なる場合には検索精度が低下してしまう。   FIG. 4 is a diagram illustrating an example of an edge image generated from a thin handwriting and a thick handwriting. As shown in FIG. 4, when handwriting with a narrow line width and thick handwriting are converted into edge images, the edges are along the outline of the character, and therefore the handwriting with different line widths has greatly different edge positions. Therefore, as shown in FIG. 4, when a handwriting image is generated from the coordinate point data, the search accuracy is reduced when the line width of the generated handwriting and the line width of the handwriting in the document are significantly different.

線幅の違いを吸収するためには、筆跡画像を細線化するという技術が存在する(例えば特開2009−53826参照)。この技術は、筆跡画像の幅を画像処理的に縮小させて、線幅が1になるようにする技術である。   In order to absorb the difference in line width, there is a technique for thinning a handwritten image (see, for example, JP 2009-53826 A). In this technique, the width of the handwriting image is reduced in an image processing manner so that the line width becomes 1.

しかし、一般的な細線化技術では、筆跡の線を高精度で復元することはできず、多くのノイズや不正確なパターンが生成されることが知られている。図5は、文字の太さによる細線化画像の違いを示す図である。図5に示すように、線幅の異なる筆跡をそれぞれ細線化した例では、例えば「筆」の字の一部のように、細かい構造が太い線では崩れてしまう。   However, it is known that a general thinning technique cannot restore a handwriting line with high accuracy, and a lot of noise and inaccurate patterns are generated. FIG. 5 is a diagram illustrating a difference in the thinned image depending on the thickness of the character. As shown in FIG. 5, in an example in which handwriting having different line widths is thinned, a fine structure such as a part of a “brush” character is broken by a thick line.

そのため、比較的小さく書かれた筆跡を検索するのは困難である。ただし、同じ太さの線幅で筆跡画像を生成すれば、文字の一部の潰れ加減も似てくるため、文字が小さく潰れた筆跡画像でも検出することが可能となる。   Therefore, it is difficult to search for handwriting written relatively small. However, if the handwriting image is generated with the same line width, since the crushing of a part of the character is similar, it is possible to detect even a handwriting image in which the character is crushed small.

すなわち、筆跡の線幅が異なれば細かな構造の崩れ方が異なるため、細線化によって同じ幅の筆跡に変換したとしても、やはり異なった線幅の筆跡は検出が困難だということになる。   That is, if the line width of the handwriting is different, the fine structure collapses differently. Therefore, even if the handwriting having the same width is converted by thinning, it is difficult to detect the handwriting having a different line width.

以上のように、文書画像中から追記した筆跡を見つけて消去する機能を実現するために、電子ペン10を用いて取得した座標データを用いて文書画像中の該当する筆跡を見つけようとしても、筆跡の線幅が分からないために検索精度が低下してしまう。   As described above, in order to realize the function of finding and deleting the handwritten handwriting from the document image, even if trying to find the corresponding handwriting in the document image using the coordinate data acquired using the electronic pen 10, Since the line width of the handwriting is not known, the search accuracy is lowered.

書き込みに使用している電子ペン10の種類が予め分かっていれば、筆跡の線幅はある程度は分かる。種類は分かっても、筆記する際の力のかけ具合によって線幅は変化する。また、電子ペン10の先端はインク補充やペンの色、太さを変えるために着脱式となっていることが多く、筆記する際の線の太さは通常は不明である。   If the type of the electronic pen 10 used for writing is known in advance, the line width of the handwriting is known to some extent. Even if the type is known, the line width changes depending on the amount of force applied when writing. Further, the tip of the electronic pen 10 is often detachable in order to replenish ink and change the color and thickness of the pen, and the thickness of the line when writing is usually unknown.

ユーザに線幅を指定させることも原理的には可能であるが、そのような煩雑な操作はユーザにとっての使い勝手を損ねるため、通常の電子ペン10では筆記前にペンの太さを指定するような機能は装備されていない。よって、一般的に市販されている電子ペン10を用いる場合、筆跡の線幅は未知であることが多い。   Although it is possible in principle to let the user specify the line width, such a complicated operation impairs the usability for the user, so the normal electronic pen 10 specifies the pen thickness before writing. The function is not equipped. Therefore, when using the commercially available electronic pen 10, the line width of the handwriting is often unknown.

従って、筆跡の線幅が不明な場合でも、電子ペン10を用いて取得した座標データを用いて追記された筆跡を、スキャンされた文書画像中から見つけ、その筆跡を消去する機能が求められる。   Therefore, even if the line width of the handwriting is unknown, a function for finding the handwritten handwritten using the coordinate data acquired using the electronic pen 10 from the scanned document image and deleting the handwritten hand is required.

そこで、以下に示す実施例では、筆跡の線幅を複数用意し、各線幅の筆跡画像を用いて文書画像内で筆跡部分に最も類似する筆跡画像を選択し、選択された筆跡画像を消去に用いる。以下、実施例について、添付図面を参照しながら説明する。   Therefore, in the embodiment shown below, a plurality of handwriting line widths are prepared, a handwriting image most similar to the handwriting part in the document image is selected using the handwriting image of each line width, and the selected handwriting image is erased. Use. Hereinafter, embodiments will be described with reference to the accompanying drawings.

[実施例]
<ハードウェア>
図6は、実施例における画像処理装置100のハードウェアの一例を示すブロック図である。図6に示す例では、画像処理装置100は、スキャナ装置20、表示装置30、電子ペン10と接続される。
[Example]
<Hardware>
FIG. 6 is a block diagram illustrating an example of hardware of the image processing apparatus 100 according to the embodiment. In the example illustrated in FIG. 6, the image processing apparatus 100 is connected to the scanner device 20, the display device 30, and the electronic pen 10.

電子ペン10は、紙などに筆記することができ、筆記の座標データを同時に取得することができるデバイスである。電子ペン10は、有線又は無線により取得した座標データを画像処理装置100に送信する。電子ペン10は、ペン先が付け替え可能である。電子ペン10として、例えば、超音波型電子ペン、アノトペン、ペンタブレットなどの市販品を適用できる。   The electronic pen 10 is a device that can write on paper or the like and can simultaneously acquire writing coordinate data. The electronic pen 10 transmits coordinate data acquired by wire or wireless to the image processing apparatus 100. The pen tip of the electronic pen 10 can be changed. As the electronic pen 10, for example, a commercially available product such as an ultrasonic electronic pen, anotopen, and a pen tablet can be applied.

超音波型電子ペンは、ペン先から一定間隔(100回/秒程度)で超音波と赤外線のパルスを発信する。これを、2箇所の超音波受信機での時間差を用いて三角測量の原理でペン先の座標を計測する。   The ultrasonic electronic pen transmits ultrasonic and infrared pulses from the pen tip at a constant interval (about 100 times / second). Using the time difference between the two ultrasonic receivers, the coordinates of the pen tip are measured by the principle of triangulation.

アノトペンは、微小なドットが印刷された専用紙を用いる。ペン先には紙面を撮影するカメラが装着され、筆記中に撮影したドットパターンを用いて、ペン先の座標を認識する。   Anotopen uses special paper on which minute dots are printed. A camera for photographing the paper surface is attached to the pen tip, and the coordinates of the pen tip are recognized using a dot pattern photographed during writing.

ペンタブレットは、電磁界を発信・検出するタブレットを下敷きとして使用する。ペン先には通常コイルが内蔵され、筆記すると、電磁誘導によりペン先の座標をタブレットが検知可能になる。ペン先にはポールペン等を取り付けることが可能であり、紙への筆記と座標データ取得の両立が可能である。   Pen tablets use a tablet that transmits and detects electromagnetic fields as an underlay. The nib usually has a built-in coil, and when written, the tablet can detect the coordinates of the nib by electromagnetic induction. A pole pen or the like can be attached to the pen tip, and both writing on paper and coordinate data acquisition are possible.

スキャナ装置20は、紙面上の画像をスキャンして二次元に配置されたx,y座標に対して一つずつ画素値を読み込む。読み込まれる画素値がカラー画像の場合、画素値はR(赤色)、G(緑色)、B(青色)の3色の組で表される。   The scanner device 20 scans an image on a paper surface and reads pixel values one by one with respect to x and y coordinates arranged two-dimensionally. When the pixel value to be read is a color image, the pixel value is represented by a set of three colors of R (red), G (green), and B (blue).

読み込まれる画像がグレイ画像の場合、画素値は明度値を表すことが多い。RGBの3色のカラー画素値は、例えば明度値=0.299×R+0.587×G+0.114×Bの変換式を用いて明度値へ変換することができる。スキャナ装置20は、読み込んだ文書画像を画像処理装置100に送信する。   When the image to be read is a gray image, the pixel value often represents a brightness value. The color pixel values of the three colors RGB can be converted into lightness values using, for example, a lightness value = 0.299 × R + 0.587 × G + 0.114 × B. The scanner device 20 transmits the read document image to the image processing device 100.

画像処理装置100は、座標データから生成した各線幅の筆跡画像を用いて、文書画像内で筆跡部分に最も類似する筆跡画像を選択し、選択された筆跡画像を用いて筆跡部分を消去する。画像処理装置100は、筆跡部分を消去した文書画像を表示するよう制御してもよい。   The image processing apparatus 100 selects a handwriting image most similar to the handwriting portion in the document image using the handwriting image of each line width generated from the coordinate data, and erases the handwriting portion using the selected handwriting image. The image processing apparatus 100 may control to display a document image from which the handwriting portion has been deleted.

表示装置30は、例えばLCD(Liquid Crystal Display)等であり、画像処理装置100から取得した筆跡部分の消去後の文書画像を表示する。   The display device 30 is, for example, an LCD (Liquid Crystal Display) or the like, and displays the document image after erasing the handwritten portion acquired from the image processing device 100.

画像処理装置100は、ハードウェアとして、制御部101、主記憶部102、補助記憶部103、通信部104、ドライブ装置105を有する。各部は、バスを介して相互にデータ送受信可能に接続されている。   The image processing apparatus 100 includes a control unit 101, a main storage unit 102, an auxiliary storage unit 103, a communication unit 104, and a drive device 105 as hardware. Each unit is connected via a bus so that data can be transmitted / received to / from each other.

制御部101は、コンピュータの中で、各装置の制御やデータの演算、加工を行うCPU(Central Processing Unit)である。また、制御部101は、主記憶部102や補助記憶部103に記憶されたプログラムを実行する演算装置であり、入力装置や記憶装置からデータを受け取り、演算、加工した上で、出力装置や記憶装置に出力する。   The control unit 101 is a CPU (Central Processing Unit) that performs control of each device, calculation of data, and processing in a computer. The control unit 101 is an arithmetic device that executes a program stored in the main storage unit 102 or the auxiliary storage unit 103. The control unit 101 receives data from the input device or the storage device, calculates, processes the output device, the storage device, and the like. Output to the device.

主記憶部102は、例えば、ROM(Read Only Memory)やRAM(Random Access Memory)などである。主記憶部102は、制御部101が実行する基本ソフトウェアであるOSやアプリケーションソフトウェアなどのプログラムやデータを記憶又は一時保存する記憶装置である。   The main storage unit 102 is, for example, a ROM (Read Only Memory) or a RAM (Random Access Memory). The main storage unit 102 is a storage device that stores or temporarily stores programs and data such as an OS and application software that are basic software executed by the control unit 101.

補助記憶部103は、例えばHDD(Hard Disk Drive)などであり、アプリケーションソフトウェアなどに関連するデータを記憶する記憶装置である。補助記憶部103は、例えばスキャナ装置20から取得した文書画像を記憶する。   The auxiliary storage unit 103 is, for example, an HDD (Hard Disk Drive) or the like, and is a storage device that stores data related to application software. The auxiliary storage unit 103 stores, for example, a document image acquired from the scanner device 20.

通信部104は、有線又は無線で周辺機器とデータ通信を行う。通信部104は、例えばネットワークを介して、文字を含む画像を取得し、補助記憶部103に記憶する。   The communication unit 104 performs data communication with peripheral devices by wire or wireless. The communication unit 104 acquires an image including characters via a network, for example, and stores it in the auxiliary storage unit 103.

ドライブ装置105は、記録媒体106、例えばフレキシブルディスクやCD(Compact Disc)から所定のプログラムを読み出し、記憶装置にインストールする。   The drive device 105 reads a predetermined program from the recording medium 106, for example, a flexible disk or a CD (Compact Disc), and installs it in the storage device.

また、記録媒体106に、所定のプログラムを格納し、この記録媒体106に格納されたプログラムは、ドライブ装置105を介して画像処理装置100にインストールされる。インストールされた所定のプログラムは、画像処理装置100により実行可能となる。   In addition, a predetermined program is stored in the recording medium 106, and the program stored in the recording medium 106 is installed in the image processing apparatus 100 via the drive device 105. The installed predetermined program can be executed by the image processing apparatus 100.

なお、画像処理装置100は、スキャナ装置20及び表示装置30を別構成としたが、どちらか一方、又は両方を含む構成としてもよい。   Note that the image processing apparatus 100 has the scanner device 20 and the display device 30 configured separately, but may include either one or both.

<機能>
図7は、実施例における画像処理装置100の機能の一例を示すブロック図である。図7に示す例では、画像処理装置100は、画像取得手段201と、筆跡取得手段202と、生成手段203と、検索手段204と、選択手段205と、消去手段206とを有する。図7に示す各手段は、例えば制御部101が、補助記憶部103に記憶される筆記消去処理プログラムを主記憶部102にロードし、実行することで機能する。図7に示す各手段は、例えば制御部101及びワークメモリとしての主記憶部102により実現されうる。
<Function>
FIG. 7 is a block diagram illustrating an example of functions of the image processing apparatus 100 according to the embodiment. In the example illustrated in FIG. 7, the image processing apparatus 100 includes an image acquisition unit 201, a handwriting acquisition unit 202, a generation unit 203, a search unit 204, a selection unit 205, and an erasure unit 206. Each unit illustrated in FIG. 7 functions, for example, when the control unit 101 loads and executes a writing erasure processing program stored in the auxiliary storage unit 103 in the main storage unit 102. Each unit illustrated in FIG. 7 can be realized by, for example, the control unit 101 and the main storage unit 102 as a work memory.

画像取得手段201は、電子ペン10による筆跡を含む文書の文書画像をスキャナ装置20から取得する。画像取得手段201は、取得した文書画像を検索手段204及び消去手段206に出力する。   The image acquisition unit 201 acquires a document image of a document including a handwriting by the electronic pen 10 from the scanner device 20. The image acquisition unit 201 outputs the acquired document image to the search unit 204 and the deletion unit 206.

筆跡取得手段202は、電子ペン10による筆跡の座標データを電子ペン10から取得する。筆跡取得手段202は、取得した座標データを生成手段203に出力する。   The handwriting acquisition unit 202 acquires handwriting coordinate data from the electronic pen 10 from the electronic pen 10. The handwriting acquisition unit 202 outputs the acquired coordinate data to the generation unit 203.

生成手段203は、複数の異なる線幅を用いて、取得した座標データに基づく複数の筆跡画像を生成する。生成手段203は、生成した複数の筆跡画像を検索手段204に出力する。   The generation unit 203 generates a plurality of handwriting images based on the acquired coordinate data using a plurality of different line widths. The generation unit 203 outputs the generated plurality of handwriting images to the search unit 204.

検索手段204は、生成された筆跡画像毎に、この筆跡画像と類似する筆跡部分の画像を文書画像から検索する。検索手段204は、例えば、一般化ハフ変換を用いて検索を行う。また、検索手段204は、筆跡画像をテンプレートとし、文書画像内でパターンマッチング技術を用いて検索してもよい。検索手段204は、検索結果を選択手段205に出力する。   For each generated handwriting image, the searching unit 204 searches the document image for an image of a handwriting portion similar to the handwriting image. The search unit 204 performs a search using, for example, a generalized Hough transform. Further, the search unit 204 may use a handwriting image as a template and search using a pattern matching technique in the document image. The search unit 204 outputs the search result to the selection unit 205.

選択手段205は、文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択する。選択手段205は、例えば、筆跡画像毎に算出された一致度を表すスコア(得点)を用いて、スコアが最も高い筆跡画像を選択する。選択手段205は、選択した筆跡画像とその検索結果を消去手段206に出力する。   The selection unit 205 selects a handwriting image that is most similar to the image of the handwriting part in the document image. For example, the selection unit 205 selects a handwriting image having the highest score using a score (score) representing the degree of coincidence calculated for each handwriting image. The selecting unit 205 outputs the selected handwriting image and the search result to the erasing unit 206.

消去手段206は、選択された筆跡画像を用いて、文書画像から筆跡部分の画像を消去する。   The eraser 206 erases the image of the handwriting part from the document image using the selected handwriting image.

次に、実施例における各手段を用いて筆跡消去処理を行う例について説明する。図8は、実施例における筆跡消去処理の流れを説明する図である。図8に示す例と、図1に示す例と異なる点は、生成手段203が、複数の筆跡画像a207を生成することである。複数の筆跡画像a207は、異なる線幅により生成された筆跡画像である。   Next, an example in which the handwriting erasing process is performed using each unit in the embodiment will be described. FIG. 8 is a diagram for explaining the flow of handwriting erasing processing in the embodiment. The example shown in FIG. 8 is different from the example shown in FIG. 1 in that the generation unit 203 generates a plurality of handwriting images a207. The plurality of handwriting images a207 are handwriting images generated with different line widths.

検索手段204は、筆跡画像毎に検索を行うので、検索結果は、筆跡画像の数だけ得られる。選択手段205は、検索結果の中で、最もスコアが高い筆跡画像を選択する。つまり、選択手段205は、実際の筆跡部分と最も類似する線幅の筆跡画像を選択する。   Since the search means 204 performs a search for each handwriting image, the search results are obtained by the number of handwriting images. The selection means 205 selects the handwriting image with the highest score among the search results. That is, the selection unit 205 selects a handwriting image having a line width most similar to the actual handwriting part.

消去手段206は、文書画像中の筆跡部分の位置と線幅が得られるので、これらを用いて筆跡部分を文書画像から消去することで、元の資料の文書画像a204を生成することができる。次に、筆跡消去処理に関する各処理について具体的に説明する。   The erasing unit 206 can obtain the position and line width of the handwriting portion in the document image. By using these to erase the handwriting portion from the document image, the document image a204 of the original material can be generated. Next, each process related to the handwriting erasure process will be specifically described.

(座標データ取得処理)
電子ペン10は、超音波型電子ペンや、タブレット装置の上に紙文書を置いてスタイラスペンの先にボールペン先などを装着して筆記する形式など、市販品を用いることができる。電子ペン10は、例えば筆跡の座標値を一定間隔(例えば0.01秒間隔)で取得して、x座標値とy座標値のペアの配列を出力する機能を有するものを用いればよい。
(Coordinate data acquisition process)
The electronic pen 10 may be a commercially available product such as an ultrasonic electronic pen or a form in which a paper document is placed on a tablet device and a ballpoint pen tip is attached to the tip of a stylus pen. For example, the electronic pen 10 may have a function of acquiring handwriting coordinate values at regular intervals (for example, at intervals of 0.01 seconds) and outputting an array of pairs of x coordinate values and y coordinate values.

具体的には、座標データは、電子ペン10による筆記を開始した点(ペンダウン)から電子ペン10を上に上げた点(ペンアップ)までが文字の一画を表す。座標データは、このような座標値を時間順で並べた配列で表したものである。   Specifically, in the coordinate data, a point from a point at which writing with the electronic pen 10 is started (pen down) to a point at which the electronic pen 10 is raised (pen up) represents one stroke of characters. The coordinate data is represented by an array in which such coordinate values are arranged in time order.

図9は、座標データのデータ構造の一例を示す図である。図9に示す例では、座標点ごとにx座標、y座標、筆記状態が記録されている。x座標とy座標とは、2バイトの整数値で表されたものである。筆記状態は、0〜3のいずれかの値を取る。   FIG. 9 is a diagram illustrating an example of the data structure of the coordinate data. In the example shown in FIG. 9, the x coordinate, the y coordinate, and the writing state are recorded for each coordinate point. The x-coordinate and the y-coordinate are represented by 2-byte integer values. The writing state takes any value from 0 to 3.

図10は、筆記状態の意味を説明する図である。図10に示すように、「0」は、ペンが空中にあって筆記していない状態を示す。「1」は、ストロークの開始点を示す。「2」は、筆記中の座標点で、始点・終点のいずれでもない状態を示す。「3」は、ストロークの終点を示す。筆跡取得手段202は、図9に示すような座標データを電子ペン10から取得する。   FIG. 10 is a diagram for explaining the meaning of the writing state. As shown in FIG. 10, “0” indicates a state in which the pen is in the air and is not written. “1” indicates the start point of the stroke. “2” indicates a coordinate point that is being written and is neither a start point nor an end point. “3” indicates the end point of the stroke. The handwriting acquisition unit 202 acquires coordinate data as illustrated in FIG. 9 from the electronic pen 10.

(筆跡画像生成処理)
生成手段203は、座標データを入力として、後述の検索手段204が利用できるような筆跡画像を生成する。座標データは、座標点が離散的に並んだデータ(例えば図9参照)なので、座標点を線分で繋いだ状態が実際の筆跡を表す。
(Handwriting image generation processing)
The generation unit 203 generates a handwriting image that can be used by the search unit 204 described later, using the coordinate data as an input. Since the coordinate data is data in which coordinate points are discretely arranged (see, for example, FIG. 9), a state where coordinate points are connected by line segments represents an actual handwriting.

図11は、座標点を線分で繋いだ状態の一例を示す図である。図11に示すように、生成手段203は、まず座標データに含まれる座標点を線分で繋いでいく。次に、生成手段203は、座標点の間の画素を例えば黒画素で埋めることによって筆跡画像を生成する。具体的な手順は、以下に説明する。   FIG. 11 is a diagram illustrating an example of a state in which coordinate points are connected by line segments. As shown in FIG. 11, the generation unit 203 first connects the coordinate points included in the coordinate data with line segments. Next, the generation unit 203 generates a handwriting image by filling pixels between coordinate points with, for example, black pixels. A specific procedure will be described below.

生成手段203は、複数の線幅で筆跡画像を生成するが、ここでは一つの線幅wに対する筆跡画像生成の手順を示す。生成手段203は、まず、線幅w=1として、座標点間の線分と重なりのある画素を埋める。図12は、座標点の間を1画素で埋めた状態の一例を示す図である。図12に示すように、座標点を繋いだ線分上にある画素が、例えば黒画素で埋められる。埋める画素の色は黒に限らず、筆跡の色であればよい。   The generation unit 203 generates a handwriting image with a plurality of line widths. Here, a procedure for generating a handwriting image for one line width w is shown. First, the generation unit 203 fills pixels that overlap the line segments between the coordinate points with the line width w = 1. FIG. 12 is a diagram illustrating an example of a state in which a space between coordinate points is filled with one pixel. As shown in FIG. 12, pixels on a line segment connecting coordinate points are filled with, for example, black pixels. The color of the pixel to be filled is not limited to black, but may be any handwriting color.

次に、生成手段203は、線分と直交する方向に、設定されている線幅wの矢印を引き、それぞれの矢印の先端を点線で繋ぐ。図13は、筆跡の境界が決定された状態の一例を示す図である。図13に示すように、矢印と点線に囲まれた範囲内が筆跡を構成する画素となる。   Next, the generation unit 203 draws an arrow having a set line width w in a direction orthogonal to the line segment, and connects the tips of the arrows with dotted lines. FIG. 13 is a diagram illustrating an example of a state in which the handwriting boundary is determined. As shown in FIG. 13, the area surrounded by the arrow and the dotted line is a pixel constituting the handwriting.

次に、生成手段203は、囲まれた範囲が画素の半分を超えている部分を、黒画素で埋める。図14は、線幅wで画素を埋めた状態の一例を示す図である。図14に示すようにして、生成手段203は、設定された複数の線幅で筆跡画像を生成することができる。   Next, the generation unit 203 fills a portion where the enclosed range exceeds half of the pixels with black pixels. FIG. 14 is a diagram illustrating an example of a state where pixels are filled with a line width w. As shown in FIG. 14, the generation unit 203 can generate a handwriting image with a plurality of set line widths.

また、筆跡の線幅は、想定可能な線幅の範囲内で複数の値を設定すればよい。線幅の値は任意に設定できるが、例えば線の太さを0.2mm〜2mmの範囲と想定し、スキャン画像の解像度を200dpiとした場合、0.2mmは約1.57ピクセルに相当し、2mmは15.7ピクセルに相当する。   Moreover, what is necessary is just to set a some value within the range of the line width which can be assumed for the line width of a handwriting. The value of the line width can be set arbitrarily. For example, assuming that the line thickness is in the range of 0.2 mm to 2 mm and the resolution of the scanned image is 200 dpi, 0.2 mm corresponds to about 1.57 pixels. 2 mm corresponds to 15.7 pixels.

線幅は、若干の誤差を許容して整数化を行い、生成手段203は、例えば1〜16ピクセル幅の筆跡画像を生成すれば良い。生成手段203は、計算効率化のため、生成する筆跡画像の線幅を間引き、例えば1,4,7,10,13,16の6種類の線幅でのみ筆跡画像を生成してもよい。   The line width is converted to an integer by allowing a slight error, and the generation unit 203 may generate a handwriting image having a width of 1 to 16 pixels, for example. The generation means 203 may thin out the line width of the generated handwriting image to increase the calculation efficiency, and may generate the handwriting image only with, for example, six types of line widths of 1, 4, 7, 10, 13, and 16.

また、生成手段203は、スキャナ装置20からスキャンの解像度を取得できる場合、線幅の太さの範囲や、用いる線幅の間隔を文書画像の解像度に応じて変更してもよい。紙文書において同じ線幅でも、画像上のピクセル値に換算した線幅は解像度に比例する。例えば、200dpi画像で1ピクセル幅の線は、400dpi画像での2ピクセル幅と、紙上では同じ幅である。   In addition, when the scanning resolution can be acquired from the scanner device 20, the generation unit 203 may change the range of the line width and the interval of the line width to be used according to the resolution of the document image. Even with the same line width in a paper document, the line width converted to a pixel value on the image is proportional to the resolution. For example, a line that is 1 pixel wide in a 200 dpi image is the same width on paper as 2 pixels wide in a 400 dpi image.

したがって、線幅の太さの範囲は、解像度にほぼ比例して拡大や縮小するのが望ましい。一方で、後述する画像検索における一致度は、ピクセル値の相違によって左右されるので、用いる線幅の間隔は解像度に寄らず一定値を用いるのが望ましいと考えられる。このような基準に基づいて、生成手段203は、解像度によって線幅の設定を変更する。   Therefore, it is desirable that the range of the line width is enlarged or reduced almost in proportion to the resolution. On the other hand, since the degree of coincidence in the image search to be described later depends on the difference in pixel values, it is considered desirable to use a constant value for the interval of the line width used regardless of the resolution. Based on such a criterion, the generation unit 203 changes the line width setting according to the resolution.

まず、200dpiの場合の線幅の上限値を16ピクセルだとし、16ピクセルを基準とする。画像の解像度がDだとすると、線幅の上限値は、D×16/200で求めた値を四捨五入する。例えば解像度が300dpiであれば、線幅の上限値は、300×16/200=24となる。   First, the upper limit of the line width in the case of 200 dpi is 16 pixels, and 16 pixels is used as a reference. Assuming that the resolution of the image is D, the upper limit value of the line width is rounded to the value obtained by D × 16/200. For example, if the resolution is 300 dpi, the upper limit of the line width is 300 × 16/200 = 24.

線幅の最小値は、常に1だとして、間隔は3ピクセルとすると、生成手段203は、最小値の1ピクセルから順に、3ピクセル間隔で上限値を超えるまでの値を求める。例えば解像度が300dpiの場合、生成手段203は、1,4,7,10,13,16,19,22,25の9種類の線幅を用いればよい。ここでは、線幅の間隔を3ピクセルと一定値にしたが、生成手段203は、間隔を固定せず、用いる線幅の種類を6種類に固定し、最小値から最大値までを6等分し、近似した整数値を用いてもよい。以上のように、生成手段203は、文書画像の解像度に応じて、線幅の数及び/又は値を設定してもよい。   Assuming that the minimum value of the line width is always 1 and the interval is 3 pixels, the generation unit 203 obtains the values from the minimum value of 1 pixel until the upper limit value is exceeded at intervals of 3 pixels. For example, when the resolution is 300 dpi, the generation unit 203 may use nine types of line widths of 1, 4, 7, 10, 13, 16, 19, 22, and 25. Here, the interval between the line widths is set to a constant value of 3 pixels, but the generation unit 203 does not fix the interval, fixes the type of line width to be used to 6 types, and divides the minimum value to the maximum value into 6 equal parts An approximate integer value may be used. As described above, the generation unit 203 may set the number and / or value of line widths according to the resolution of the document image.

(検索処理)
検索手段204は、スキャンされた文書画像の中で、検索対象の筆跡画像に一致する位置を検索する。以降では、検索対象の筆跡画像を検索筆跡画像とも称す。
(Search process)
The search means 204 searches the scanned document image for a position that matches the handwriting image to be searched. Hereinafter, the handwriting image to be searched is also referred to as a search handwriting image.

図15は、検索の動作例を示す図である。検索手段204は、検索筆跡画像に対して基準点を設定し、この筆跡と一致するパターンを文書画像の中から見つける。検索手段204は、基準点の位置座標と、一致度の得点と、サイズとを出力する。検索手段204は、図15に示すように、検索筆跡画像の相対位置の原点を基準点として、x軸とy軸とを文書画像の対応する位置にマッピングする。   FIG. 15 is a diagram illustrating an example of a search operation. The retrieval unit 204 sets a reference point for the retrieved handwriting image and finds a pattern that matches the handwriting from the document image. The search means 204 outputs the position coordinates of the reference point, the score of coincidence, and the size. As shown in FIG. 15, the search unit 204 maps the x axis and the y axis to corresponding positions in the document image with the origin of the relative position of the search handwritten image as a reference point.

図15に示す例では、文書画像に追記された筆跡は、文字や罫線と重なっていることがあるため、他の画像と重なりがあっても検索できる技術が必要である。そのため、例えば一般化ハフ変換を用いることができる。   In the example shown in FIG. 15, the handwriting added to the document image may overlap with characters and ruled lines, and thus a technique capable of searching even if there is an overlap with other images is necessary. Therefore, for example, a generalized Hough transform can be used.

一般化ハフ変換では、文書画像の中で検索したい筆跡のサイズが変化していたり、回転したりしている場合でも検索は可能である。しかし、実施例では説明を簡単にするため、サイズ、方向とも変化が無いものとする。サイズ変化や回転の可能性がある場合には、検索手段204は、基準点の位置座標だけでなく、サイズと回転角も出力すればよい。   In the generalized Hough transform, the search can be performed even when the size of the handwriting to be searched in the document image has changed or rotated. However, in the embodiment, it is assumed that there is no change in size and direction in order to simplify the description. When there is a possibility of size change or rotation, the search unit 204 may output not only the position coordinates of the reference point but also the size and rotation angle.

ここで、検索手段204は、一般化ハフ変換を用いる方式の場合、検索筆跡画像から抽出したエッジ方向に基づいて基準点の位置にスコア(得点)を投票し、投票した値の総和が最も高い位置を検索位置とする。検索結果の得点は常に得られ、また、実施例では一つの検索筆跡画像に対して、一つの検索結果が得られるものとする。   Here, in the case of the method using the generalized Hough transform, the search means 204 votes the score (score) at the position of the reference point based on the edge direction extracted from the search handwriting image, and the sum of the voted values is the highest. Let the position be the search position. The score of the search result is always obtained, and in the embodiment, one search result is obtained for one search handwriting image.

図16は、線幅毎の検索結果の一例を示す図である。図16に示すように、検索結果には、線幅毎にスコア、位置座標、サイズが保持される。線幅は、例えば6種類の線幅を用いた場合の結果を示す。   FIG. 16 is a diagram illustrating an example of a search result for each line width. As shown in FIG. 16, the search result holds a score, position coordinates, and size for each line width. The line width indicates a result when, for example, six types of line widths are used.

線幅は、小さな値なので例えば1バイトで格納される。スコアは、満点(完全に一致)した場合に100点、全く一致しない場合が0点として、0〜100の値を取るものとする。スコアは、例えば1バイトでも表現できるが、スコアの値の範囲を変更する場合も考え、余裕を取って2バイトとする。   Since the line width is a small value, it is stored in 1 byte, for example. The score assumes a value of 0 to 100, with 100 points when the score is perfect (completely matched) and 0 when the score does not match at all. The score can be expressed by, for example, 1 byte, but considering the case where the range of the score value is changed, a margin is assumed to be 2 bytes.

位置座標は、基準点が文書画像中のどこで検出されたかを示す。位置座標は、x座標とy座標との組となるので、2バイト×2の領域を用いる。サイズは、検索筆跡画像の縦横の幅の長い方(長辺)が、文書画像中で対応する長さで表すものとする。検索手段204は、図16に示すような最終的な検索結果を選択手段205に出力する。   The position coordinates indicate where the reference point is detected in the document image. Since the position coordinates are a set of x coordinates and y coordinates, an area of 2 bytes × 2 is used. The size is expressed by the length corresponding to the longer one (long side) of the search handwriting image in the document image. The search means 204 outputs the final search result as shown in FIG.

(選択処理)
選択手段205は、複数の線幅で生成した複数の検索筆跡画像のうち、検索結果のスコアが最も大きい結果を選択する。先に述べたように、検索手段204は、一つの筆跡画像に対して一つの検索結果を出力するため、複数の線幅で筆跡画像を生成すると複数の検索結果(基準点の座標値)が得られる。この中で筆跡画像の消去に用いるのは一つの結果だけである。選択手段205では、複数の結果の中から最大スコアである結果を選択する。選択手段205は、選択した筆跡画像とその検索結果を消去手段206に出力する。
(Selection process)
The selection unit 205 selects a result having the highest search result score from a plurality of search handwriting images generated with a plurality of line widths. As described above, since the search unit 204 outputs one search result for one handwriting image, when a handwriting image is generated with a plurality of line widths, a plurality of search results (coordinate values of reference points) are obtained. can get. Of these, only one result is used to erase the handwritten image. The selection unit 205 selects a result having the maximum score from a plurality of results. The selecting unit 205 outputs the selected handwriting image and the search result to the erasing unit 206.

選択手段205は、図16に示す例を用いると、線幅w=7の場合が最も良い結果である。w=16は、スコアが低く、また位置座標も全く異なることから、正解ではない別の場所を検出してしまったことが分かる。w=1、16以外の線幅では、正解の筆跡を検出できているが、位置座標やサイズが少しずつずれているため、後段で筆跡を消去する際の精度に影響が及ぶ可能性がある。   When the example shown in FIG. 16 is used for the selection unit 205, the best result is obtained when the line width w = 7. Since w = 16 has a low score and the position coordinates are completely different, it can be seen that another place which is not correct is detected. For line widths other than w = 1 and 16, the correct handwriting can be detected, but the position coordinates and size are shifted little by little, which may affect the accuracy when the handwriting is erased later. .

(消去処理)
消去手段206は、スキャンされた文書画像から筆跡画像を消去する。消去手段206は、既に文書画像の中で筆跡画像の位置座標は分かっているので、その位置に検索画像を重ねれば、消去したい筆跡に属する画素が分かる。したがって、消去手段206は、筆跡に属する画素を背景色で塗り潰せば筆跡画像を消去することができる。ただし、カラー画像の場合には背景が白色とは限らないので、塗り潰す背景色を選択すればよい。
(Erase processing)
The erasing unit 206 erases the handwriting image from the scanned document image. Since the erasing unit 206 already knows the position coordinates of the handwriting image in the document image, the pixel belonging to the handwriting to be erased can be found by overlaying the search image at that position. Therefore, the erasing unit 206 can erase the handwriting image by painting the pixels belonging to the handwriting with the background color. However, in the case of a color image, the background is not necessarily white, so the background color to be filled may be selected.

仮に、文書画像が白黒画像で背景が白色であり、追記された筆跡が余白などの背景領域にのみ書かれていれば、消去手段206は、筆跡の画素を白で塗り潰すだけでよい。しかし、印刷文字や罫線などと重なって筆記されている場合は、単に画素を塗り潰しただけでは不自然な画像が生成される可能性がある。   If the document image is a black and white image and the background is white, and the additionally written handwriting is written only in a background area such as a margin, the erasing unit 206 only needs to fill the pixels of the handwriting with white. However, when writing is performed with overlapping printed characters or ruled lines, an unnatural image may be generated simply by painting the pixels.

図17は、単純に背景色で塗りつぶす例を示す図である。図17(A)は、追記前の画像の一部を示す。黒画素が文字の一部を示すものとする。図17(B)は、追記後の画像の位置を示す。追記された筆跡が文字の上に筆記されると、図17(B)に示すように文字画像と筆跡が重なる部分が生ずる。   FIG. 17 is a diagram illustrating an example of simply painting with a background color. FIG. 17A shows a part of an image before additional recording. It is assumed that the black pixel indicates a part of the character. FIG. 17B shows the position of the image after additional recording. When the additionally written handwriting is written on the character, a portion where the character image and the handwriting overlap is generated as shown in FIG.

図17(C)は、追記部分を背景色で塗り潰した画像の一部を示す。筆跡の画素が背景色で塗り潰されると、図17(C)に示すように、文字が途中で途切れてしまう。ただし、筆跡で重ね書きされた画素は、文字の画素か背景かを判断するための情報が失われている。よって、図17(C)に示す画像が、不適切な画像だとは限らないが、図17(C)に示す例では、図17(A)のような画像が生成された方が適切だと考えられる。また、カラー画像などのように、背景が白色のみとは限らない場合も考慮する必要がある。   FIG. 17C shows a part of an image in which a postscript portion is filled with a background color. When the pixels of the handwriting are filled with the background color, as shown in FIG. 17C, the characters are interrupted in the middle. However, the information for determining whether the pixel overwritten with the handwriting is the character pixel or the background is lost. Therefore, the image shown in FIG. 17C is not necessarily an inappropriate image, but in the example shown in FIG. 17C, it is more appropriate to generate an image as shown in FIG. it is conceivable that. It is also necessary to consider the case where the background is not limited to white, such as a color image.

実施例における消去手段206は、次の方法で、適切に背景色を塗り潰す処理を行う。消去手段206は、まず、筆跡に属する画像それぞれについて、その画素に最も近い、非筆跡の画素の色を求める。   The erasing unit 206 in the embodiment performs processing for appropriately filling the background color by the following method. The erasing unit 206 first obtains the color of the non-handwriting pixel closest to the pixel for each image belonging to the handwriting.

図18は、実施例による塗り潰し処理を説明する図である。図18(A)は、塗り潰し色の判定結果を示す。図18(A)に示す例では、白色の画素をA、黒色の画素をBで示している。消去手段206は、続いて、それぞれの画素について判定した画素の色で塗り潰す。図18(B)は、塗り潰し後の画像の一部を示す図である。図18(B)に示す例では、分かりやすくするために黒色で塗り潰した画素Bは、格子状の網模様で示している。   FIG. 18 is a diagram illustrating the filling process according to the embodiment. FIG. 18A shows the determination result of the fill color. In the example shown in FIG. 18A, a white pixel is indicated by A and a black pixel is indicated by B. Subsequently, the erasing unit 206 fills with the pixel color determined for each pixel. FIG. 18B is a diagram illustrating a part of an image after painting. In the example shown in FIG. 18B, the pixels B filled with black for easy understanding are shown in a grid-like net pattern.

消去手段206は、各画素を塗り潰す色として、その画素に最も近い、筆跡以外の画素の色を求める。図19は、塗り潰し色判定を説明する図である。図19に示す例では、例えば画素Cは、筆跡以外の画素で最も近いのは、上方向に2画素移動した位置の画素である。この場合、距離は2となる。   The erasing unit 206 obtains the color of the pixel other than the handwriting closest to the pixel as the color for filling each pixel. FIG. 19 is a diagram illustrating the fill color determination. In the example illustrated in FIG. 19, for example, the pixel C other than the handwriting is closest to a pixel at a position moved by two pixels in the upward direction. In this case, the distance is 2.

画素Dの場合は、上方向に3画素進むと背景である白画素が見つかり、それが最も近い画素となる。一方、画素Dから文字画素への距離は、一つ左に進んでから上に3画素進むために、距離は4となる。これにより、画素Dに最も近い画素は、距離が3である背景画素となる。上記の方法を用いて塗り潰し判定を行うと、図18(A)に示す結果となる。   In the case of the pixel D, when the pixel advances by 3 pixels in the upward direction, a white pixel as a background is found and becomes the closest pixel. On the other hand, the distance from the pixel D to the character pixel advances from one to the left and then advances upward by three pixels, so the distance is 4. As a result, the pixel closest to the pixel D becomes a background pixel having a distance of 3. When the fill determination is performed using the above method, the result shown in FIG.

また、消去手段206は、選択された筆跡画像よりも所定値だけ線幅が広い筆跡画像を用いて消去処理を行ってもよい。この理由は、実際の筆跡の線幅よりも少し細い線幅の筆跡画像が最適として選択される場合があり、筆跡画像による消去で筆跡の外縁が残ることを防止するためである。消去手段206は、実際の筆跡の線幅と一致する、又は実際の線幅よりも少し太い線幅の筆跡画像を用いるのが適切である。所定値は、予め実験等をして適切な値を設定しておけばよい。なお、消去手段206は、選択された筆跡画像よりも所定値だけ線幅が広い筆跡画像を生成手段203に生成させればよい。   Further, the erasing unit 206 may perform the erasing process using a handwriting image whose line width is larger than the selected handwriting image by a predetermined value. This is because a handwriting image having a line width slightly smaller than the line width of the actual handwriting may be selected as the optimum, and this prevents the outer edge of the handwriting from remaining after erasing with the handwriting image. It is appropriate that the erasing unit 206 uses a handwriting image having a line width that is equal to or slightly larger than the actual line width of the handwriting. The predetermined value may be set to an appropriate value through experiments or the like in advance. Note that the erasing unit 206 may cause the generation unit 203 to generate a handwriting image whose line width is larger by a predetermined value than the selected handwriting image.

筆跡が消去された画像は、表示装置30に表示されたり、主記憶部102や補助記憶部103に記憶されたりする。   The image from which the handwriting has been erased is displayed on the display device 30 or stored in the main storage unit 102 or the auxiliary storage unit 103.

以上の構成、処理によれば、電子ペンによる座標データから生成された筆跡画像を用いて、文書画像の筆跡部分を適切に消去することができる。   According to the above configuration and processing, the handwriting portion of the document image can be appropriately erased using the handwriting image generated from the coordinate data by the electronic pen.

<動作>
次に、実施例における筆跡消去処理の流れについて説明する。図20は、実施例における筆跡消去処理の一例を示すフローチャートである。図20に示すステップS101で、ユーザは、電子ペン10を用いて資料に筆記を行う。このとき、電子ペン10は、筆跡の座標データを取得し、画像処理装置100に送信する。画像処理装置100の筆跡取得手段202は、電子ペン10による座標データを取得する。
<Operation>
Next, the flow of handwriting erasure processing in the embodiment will be described. FIG. 20 is a flowchart illustrating an example of handwriting erasing processing in the embodiment. In step S <b> 101 shown in FIG. 20, the user writes on the material using the electronic pen 10. At this time, the electronic pen 10 acquires handwriting coordinate data and transmits it to the image processing apparatus 100. The handwriting acquisition unit 202 of the image processing apparatus 100 acquires coordinate data from the electronic pen 10.

ステップS102で、スキャナ装置20は、電子ペン10で筆記された資料をスキャンして文書画像を生成する。生成された文書画像は、画像処理装置100に送信される。画像処理装置100の画像取得手段201は、文書画像を取得する。   In step S <b> 102, the scanner device 20 scans the material written with the electronic pen 10 to generate a document image. The generated document image is transmitted to the image processing apparatus 100. The image acquisition unit 201 of the image processing apparatus 100 acquires a document image.

ステップS103で、生成手段203は、座標データに基づき、複数の異なる線幅を用いて複数の筆跡画像を生成する。筆跡画像生成処理は、図21を用いて後述する。   In step S103, the generation unit 203 generates a plurality of handwriting images using a plurality of different line widths based on the coordinate data. The handwriting image generation process will be described later with reference to FIG.

ステップS104で、検索手段204は、生成された筆跡画像毎に、文書画像の中から類似する部分画像を検索し、スコアを算出する。   In step S104, the retrieval unit 204 retrieves a similar partial image from the document image for each generated handwriting image, and calculates a score.

ステップS105で、選択手段205は、検索結果の中からスコアが一番高い線幅の筆跡画像を選択する。   In step S <b> 105, the selection unit 205 selects a handwritten image having a line width with the highest score from the search results.

ステップS106で、消去手段206は、選択された線幅の筆跡画像を用いて、文書画像の中から筆跡部分を消去する。筆跡を消去し、背景色で画素を埋める処理は、図22を用いて後述する。   In step S106, the erasing unit 206 erases the handwriting portion from the document image using the handwriting image having the selected line width. The process of erasing the handwriting and filling the pixels with the background color will be described later with reference to FIG.

以上の処理により、電子ペン10により取得された座標データを用いて、文書画像の中から筆跡部分を適切に消去することができる。   With the above processing, the handwriting portion can be appropriately erased from the document image using the coordinate data acquired by the electronic pen 10.

図21は、複数の筆跡画像を生成する処理の一例を示すフローチャートである。図21に示すステップS201で、生成手段203は、まず、N種類の線幅の値を配列W[i](i=1,...,N)に設定する。また、生成手段203は、変数iに1を設定する。   FIG. 21 is a flowchart illustrating an example of processing for generating a plurality of handwriting images. In step S201 shown in FIG. 21, the generation unit 203 first sets N types of line width values in an array W [i] (i = 1,..., N). Further, the generation unit 203 sets 1 to the variable i.

ステップS202で、生成手段203は、線幅wにW[i]の値を設定する。ステップS203で、生成手段203は、ストローク始点とその隣の点をそれぞれの線分の始点、終点に設定する。   In step S202, the generation unit 203 sets a value of W [i] for the line width w. In step S203, the generation unit 203 sets the stroke start point and the adjacent point as the start point and end point of each line segment.

ステップS204で、生成手段203は、線幅を1とし、線分を通る画素を埋める(例えば図12参照)。ステップS205で、生成手段203は、線幅w=1であるか否かを判定する。w=1であれば(ステップS205−YES)ステップS207に進み、w=1でなければ(ステップS205−NO)ステップS206に進む。   In step S204, the generation unit 203 sets the line width to 1 and fills pixels passing through the line segment (see, for example, FIG. 12). In step S205, the generation unit 203 determines whether or not the line width w = 1. If w = 1 (step S205—YES), the process proceeds to step S207, and if w = 1 is not satisfied (step S205—NO), the process proceeds to step S206.

ステップS206で、生成手段203は、線幅wの範囲で、線分を埋める(例えば図13,14参照)。   In step S206, the generation unit 203 fills the line segment within the range of the line width w (see, for example, FIGS. 13 and 14).

ステップS207で、生成手段203は、筆跡の終点に到達したか否かを判定する。終点に到達していれば(ステップS207−YES)ステップS209に進み、終点に送達していなければ(ステップS207−NO)ステップS208に進む。   In step S207, the generation unit 203 determines whether or not the handwriting end point has been reached. If the end point has been reached (step S207—YES), the process proceeds to step S209. If the end point has not been delivered (step S207—NO), the process proceeds to step S208.

ステップS208で、生成手段203は、線分の終点を次の始点とし、さらに、隣の点を線分の終点に設定する。   In step S208, the generation unit 203 sets the end point of the line segment as the next start point, and further sets the adjacent point as the end point of the line segment.

ステップS209で、生成手段203は、変数i=Nであるか否かを判定する。i=Nであれば(ステップS209−YES)この処理を終了し、i=Nでなければ(ステップS209−NO)ステップS210に進む。   In step S209, the generation unit 203 determines whether or not the variable i = N. If i = N (step S209—YES), this process ends. If i = N (step S209—NO), the process proceeds to step S210.

ステップS210で、生成手段203は、iの値を1増加させ、ステップS202に戻る。   In step S210, the generation unit 203 increments the value of i by 1, and returns to step S202.

以上の処理により、複数の線幅の筆跡画像を生成することができる。さらに、ステップS201において、生成手段203は、スキャナ装置20のスキャン時の解像度を取得した場合、この解像度に基づいて線幅の値や数を変更してもよい。   Through the above processing, handwriting images having a plurality of line widths can be generated. Furthermore, in step S201, when the generation unit 203 acquires the resolution at the time of scanning of the scanner device 20, the generation unit 203 may change the value and number of line widths based on this resolution.

図22は、筆跡消去後の画素埋め処理の一例を示すフローチャートである。以降では、消去した筆跡部分の画素を筆跡画素とも称す。図22に示すステップS301で、消去手段206は、全ての筆跡画素の色を「未定」に設定する。   FIG. 22 is a flowchart illustrating an example of pixel filling processing after handwriting erasure. Hereinafter, the erased handwriting pixel is also referred to as handwriting pixel. In step S301 shown in FIG. 22, the erasing means 206 sets the color of all the handwritten pixels to “undecided”.

ステップS302で、消去手段206は、「未定」の筆跡画素を1つ選んで、現在の処理対象画像に設定する。   In step S302, the erasing unit 206 selects one “undecided” handwriting pixel and sets it to the current processing target image.

ステップS303で、消去手段206は、現在の処理対象画像から最も近い画素の色を求める。   In step S303, the erasing unit 206 obtains the color of the pixel closest to the current processing target image.

ステップS304で、消去手段206は、最も近い画素が複数あるか否かを判定する。最も近い画素が複数あれば(ステップS304−YES)ステップS305に進み、最も近い画素が複数なければ(ステップS304−NO)ステップS306に進む。   In step S304, the erasing unit 206 determines whether there are a plurality of closest pixels. If there are a plurality of closest pixels (step S304—YES), the process proceeds to step S305, and if there are not a plurality of closest pixels (step S304—NO), the process proceeds to step S306.

ステップS305で、消去手段206は、最も近い複数の画素の平均の色を求める。ステップS306で、消去手段206は、ステップS303又はステップS305で求めた色を、現在の処理対象画像の色に設定する。   In step S305, the erasing unit 206 obtains the average color of the closest plurality of pixels. In step S306, the erasing unit 206 sets the color obtained in step S303 or S305 as the color of the current processing target image.

ステップS307で、消去手段206は、「未定」画素がないか否かを判定する。「未定」画素がなければ(ステップS307−YES)この処理を終了し、「未定」画素があれば(ステップS307−NO)ステップS302に戻る。   In step S307, the erasure unit 206 determines whether or not there is an “indeterminate” pixel. If there is no “undetermined” pixel (step S307—YES), this process is terminated. If there is an “undetermined” pixel (step S307—NO), the process returns to step S302.

以上の処理により、筆跡の重畳によって元文書の画素が上書きされているために文書画像の情報が一部失われている場合でも、文字の途切れのような不自然な現象を抑制して、比較的自然な文書画像を復元することができる。   By the above processing, even if some of the document image information is lost because the pixels of the original document are overwritten by handwriting superimposition, comparison is made by suppressing unnatural phenomena such as character breaks. A natural document image can be restored.

以上、実施例によれば、電子ペンによる座標データから生成された筆跡画像を用いて、文書画像の筆跡部分を適切に消去することができる。また、実施例によれば、スキャナ装置20からのスキャン時の解像度を取得できれば、解像度に応じて線幅の設定を変更することができる。   As described above, according to the embodiment, the handwriting portion of the document image can be appropriately erased using the handwriting image generated from the coordinate data by the electronic pen. Further, according to the embodiment, if the resolution at the time of scanning from the scanner device 20 can be acquired, the setting of the line width can be changed according to the resolution.

文書画像の筆跡部分を消去することで、文書画像の視認性が向上すると同時に、検索のために行う文字認識処理の精度も向上し、文書画像の利用価値を向上させることができる。   By erasing the handwriting part of the document image, the visibility of the document image is improved, and at the same time, the accuracy of character recognition processing for search is improved, and the utility value of the document image can be improved.

なお、前述した実施例で説明した画像処理を実現するためのプログラムを記録媒体に記録することで、実施例での画像処理をコンピュータに実施させることができる。例えば、このプログラムを記録媒体に記録し、このプログラムが記録された記録媒体をコンピュータに読み取らせて、前述した画像処理を実現させることも可能である。   In addition, by recording a program for realizing the image processing described in the above-described embodiment on a recording medium, the image processing in the embodiment can be performed by a computer. For example, it is possible to record the program on a recording medium and cause the computer to read the recording medium on which the program is recorded, thereby realizing the above-described image processing.

なお、実施例における画像処理装置100は、コンピュータ(Personal Computer)や、タブレット端末、スマートフォンなどのプロセッサとメモリとデータを取得するインタフェースを有する処理装置であれば適用可能である。また、スキャナ装置20に電子ペン10からの座標データを送信することで、スキャナ装置20でも上記画像処理を実行することができるように実装してもよい。   The image processing apparatus 100 according to the embodiment is applicable to any processing apparatus having a processor, a memory, and an interface for acquiring data, such as a computer (Personal Computer), a tablet terminal, and a smartphone. In addition, the scanner device 20 may be mounted so that the image processing can be executed by transmitting coordinate data from the electronic pen 10 to the scanner device 20.

なお、記録媒体は、CD−ROM、フレキシブルディスク、光磁気ディスク等の様に情報を光学的、電気的或いは磁気的に記録する記録媒体、ROM、フラッシュメモリ等の様に情報を電気的に記録する半導体メモリ等、様々なタイプの記録媒体を用いることができる。この記録媒体には、搬送波は含まれない。   The recording medium is a recording medium that records information optically, electrically, or magnetically, such as a CD-ROM, flexible disk, magneto-optical disk, etc., and information is electrically recorded such as ROM, flash memory, etc. Various types of recording media such as a semiconductor memory can be used. This recording medium does not include a carrier wave.

以上、実施例について詳述したが、特定の実施例に限定されるものではなく、特許請求の範囲に記載された範囲内において、種々の変形及び変更が可能である。また、前述した実施例の構成要素を全部又は複数を組み合わせることも可能である。   Although the embodiments have been described in detail above, the invention is not limited to the specific embodiments, and various modifications and changes can be made within the scope described in the claims. It is also possible to combine all or a plurality of the components of the above-described embodiments.

なお、以上の実施例に関し、さらに以下の付記を開示する。
(付記1)
電子ペンによる筆跡を含む文書の文書画像を取得する画像取得手段と、
前記電子ペンによる筆跡の座標データを取得する筆跡取得手段と、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成する生成手段と、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索する検索手段と、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択する選択手段と、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する消去手段と、
を備える画像処理装置。
(付記2)
前記生成手段は、
前記文書画像の解像度に応じて、線幅の数及び/又は値を設定する付記1記載の画像処理装置。
(付記3)
前記生成手段は、
前記文書画像の解像度から線幅の上限値を算出し、該上限値を用いて線幅の数を設定する付記2記載の画像処理装置。
(付記4)
前記消去手段は、
前記選択された筆跡画像よりも所定値だけ線幅が太い筆跡画像を用いて消去処理を行う付記1乃至3いずれか一項に記載の画像処理装置。
(付記5)
前記消去手段は、
消去した画素に対し、該消去した画素以外の画素で、最も近い画素の色を用いて色を復元する付記1乃至4いずれか一項に記載の画像処理装置。
(付記6)
電子ペンによる筆跡を含む文書の文書画像を取得し、
前記電子ペンによる筆跡の座標データを取得し、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成し、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索し、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択し、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する処理をコンピュータが実行する画像処理方法。
(付記7)
電子ペンによる筆跡を含む文書の文書画像を取得し、
前記電子ペンによる筆跡の座標データを取得し、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成し、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索し、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択し、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する処理をコンピュータに実行させるプログラム。
In addition, the following additional remarks are disclosed regarding the above Example.
(Appendix 1)
Image acquisition means for acquiring a document image of a document including handwriting by an electronic pen;
Handwriting acquisition means for acquiring coordinate data of handwriting by the electronic pen;
Generating means for generating a plurality of handwriting images based on the coordinate data using a plurality of different line widths;
Search means for searching for an image of a handwriting part similar to the handwriting image for each generated handwriting image from the document image;
Selecting means for selecting a handwriting image most similar to the image of the handwriting part in the document image;
Using the selected handwriting image, erasing means for erasing the image of the handwriting part from the document image,
An image processing apparatus comprising:
(Appendix 2)
The generating means includes
The image processing apparatus according to appendix 1, wherein the number and / or value of line widths are set according to the resolution of the document image.
(Appendix 3)
The generating means includes
The image processing apparatus according to appendix 2, wherein an upper limit value of a line width is calculated from the resolution of the document image, and the number of line widths is set using the upper limit value.
(Appendix 4)
The erasing means includes
The image processing apparatus according to any one of appendices 1 to 3, wherein an erasing process is performed using a handwriting image whose line width is larger by a predetermined value than the selected handwriting image.
(Appendix 5)
The erasing means includes
The image processing apparatus according to any one of appendices 1 to 4, wherein for the erased pixel, the color other than the erased pixel is used to restore the color using the color of the closest pixel.
(Appendix 6)
Obtain a document image of a document including handwriting with an electronic pen,
Acquire coordinate data of handwriting by the electronic pen,
Using a plurality of different line widths to generate a plurality of handwriting images based on the coordinate data,
For each generated handwriting image, search for an image of a handwriting part similar to the handwriting image from the document image,
Select the handwriting image most similar to the image of the handwriting part in the document image,
An image processing method in which a computer executes a process of deleting an image of a handwriting portion from the document image using a selected handwriting image.
(Appendix 7)
Obtain a document image of a document including handwriting with an electronic pen,
Acquire coordinate data of handwriting by the electronic pen,
Using a plurality of different line widths to generate a plurality of handwriting images based on the coordinate data,
For each generated handwriting image, search for an image of a handwriting part similar to the handwriting image from the document image,
Select the handwriting image most similar to the image of the handwriting part in the document image,
A program that causes a computer to execute a process of erasing an image of a handwriting portion from the document image using a selected handwriting image.

10 電子ペン
20 スキャナ装置
100 画像処理装置
101 制御部
102 主記憶部
103 補助記憶部
104 通信部
105 ドライブ装置
201 画像取得手段
202 筆跡取得手段
203 生成手段
204 検索手段
205 選択手段
206 消去手段
DESCRIPTION OF SYMBOLS 10 Electronic pen 20 Scanner apparatus 100 Image processing apparatus 101 Control part 102 Main memory part 103 Auxiliary memory part 104 Communication part 105 Drive apparatus 201 Image acquisition means 202 Handwriting acquisition means 203 Generation means 204 Search means 205 Selection means 206 Erase means

Claims (6)

電子ペンによる筆跡を含む文書の文書画像を取得する画像取得手段と、
前記電子ペンによる筆跡の座標データを取得する筆跡取得手段と、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成する生成手段と、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索する検索手段と、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択する選択手段と、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する消去手段と、
を備える画像処理装置。
Image acquisition means for acquiring a document image of a document including handwriting by an electronic pen;
Handwriting acquisition means for acquiring coordinate data of handwriting by the electronic pen;
Generating means for generating a plurality of handwriting images based on the coordinate data using a plurality of different line widths;
Search means for searching for an image of a handwriting part similar to the handwriting image for each generated handwriting image from the document image;
Selecting means for selecting a handwriting image most similar to the image of the handwriting part in the document image;
Using the selected handwriting image, erasing means for erasing the image of the handwriting part from the document image,
An image processing apparatus comprising:
前記生成手段は、
前記文書画像の解像度に応じて、線幅の数及び/又は値を設定する請求項1記載の画像処理装置。
The generating means includes
The image processing apparatus according to claim 1, wherein the number and / or value of line widths are set according to the resolution of the document image.
前記生成手段は、
前記文書画像の解像度から線幅の上限値を算出し、該上限値を用いて線幅の数を設定する請求項2記載の画像処理装置。
The generating means includes
The image processing apparatus according to claim 2, wherein an upper limit value of a line width is calculated from the resolution of the document image, and the number of line widths is set using the upper limit value.
前記消去手段は、
前記選択された筆跡画像よりも所定値だけ線幅が太い筆跡画像を用いて消去処理を行う請求項1乃至3いずれか一項に記載の画像処理装置。
The erasing means includes
4. The image processing apparatus according to claim 1, wherein the erasing process is performed using a handwriting image whose line width is larger by a predetermined value than the selected handwriting image. 5.
電子ペンによる筆跡を含む文書の文書画像を取得し、
前記電子ペンによる筆跡の座標データを取得し、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成し、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索し、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択し、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する処理をコンピュータが実行する画像処理方法。
Obtain a document image of a document including handwriting with an electronic pen,
Acquire coordinate data of handwriting by the electronic pen,
Using a plurality of different line widths to generate a plurality of handwriting images based on the coordinate data,
For each generated handwriting image, search for an image of a handwriting part similar to the handwriting image from the document image,
Select the handwriting image most similar to the image of the handwriting part in the document image,
An image processing method in which a computer executes a process of deleting an image of a handwriting portion from the document image using a selected handwriting image.
電子ペンによる筆跡を含む文書の文書画像を取得し、
前記電子ペンによる筆跡の座標データを取得し、
複数の異なる線幅を用いて、前記座標データに基づく複数の筆跡画像を生成し、
生成された筆跡画像毎に該筆跡画像と類似する筆跡部分の画像を前記文書画像から検索し、
前記文書画像内の筆跡部分の画像と最も類似する筆跡画像を選択し、
選択された筆跡画像を用いて、前記文書画像から筆跡部分の画像を消去する処理をコンピュータに実行させるプログラム。
Obtain a document image of a document including handwriting with an electronic pen,
Acquire coordinate data of handwriting by the electronic pen,
Using a plurality of different line widths to generate a plurality of handwriting images based on the coordinate data,
For each generated handwriting image, search for an image of a handwriting part similar to the handwriting image from the document image,
Select the handwriting image most similar to the image of the handwriting part in the document image,
A program that causes a computer to execute a process of erasing an image of a handwriting portion from the document image using a selected handwriting image.
JP2012190313A 2012-08-30 2012-08-30 Image processing apparatus, image processing method, and program Expired - Fee Related JP6019939B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012190313A JP6019939B2 (en) 2012-08-30 2012-08-30 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012190313A JP6019939B2 (en) 2012-08-30 2012-08-30 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2014048819A true JP2014048819A (en) 2014-03-17
JP6019939B2 JP6019939B2 (en) 2016-11-02

Family

ID=50608454

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012190313A Expired - Fee Related JP6019939B2 (en) 2012-08-30 2012-08-30 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6019939B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016071831A (en) * 2014-09-30 2016-05-09 英子 吉野 Information recording device and handwriting information processing
CN106155607A (en) * 2015-04-08 2016-11-23 北京壹人壹本信息科技有限公司 A kind of former person's handwriting multi-screen adaptation method, system and equipment
CN106155608A (en) * 2015-04-08 2016-11-23 北京壹人壹本信息科技有限公司 A kind of former person's handwriting storage and display packing, system and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06332611A (en) * 1993-05-21 1994-12-02 Casio Comput Co Ltd Handwriting input device
JP2001195045A (en) * 2000-01-07 2001-07-19 Nec Corp Method and device for image rendering of personal computer educational support system
JP2013172260A (en) * 2012-02-20 2013-09-02 Kyocera Document Solutions Inc Image processing apparatus and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06332611A (en) * 1993-05-21 1994-12-02 Casio Comput Co Ltd Handwriting input device
JP2001195045A (en) * 2000-01-07 2001-07-19 Nec Corp Method and device for image rendering of personal computer educational support system
JP2013172260A (en) * 2012-02-20 2013-09-02 Kyocera Document Solutions Inc Image processing apparatus and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016071831A (en) * 2014-09-30 2016-05-09 英子 吉野 Information recording device and handwriting information processing
CN106155607A (en) * 2015-04-08 2016-11-23 北京壹人壹本信息科技有限公司 A kind of former person's handwriting multi-screen adaptation method, system and equipment
CN106155608A (en) * 2015-04-08 2016-11-23 北京壹人壹本信息科技有限公司 A kind of former person's handwriting storage and display packing, system and equipment

Also Published As

Publication number Publication date
JP6019939B2 (en) 2016-11-02

Similar Documents

Publication Publication Date Title
US9405182B2 (en) Image processing device and image processing method
KR101312838B1 (en) Object of image capturing used in an image processing system
US9589333B2 (en) Image correction apparatus for correcting distortion of an image
JP5229050B2 (en) Document area extraction apparatus, method, and program from image
KR20140110584A (en) Method for providing augmented reality, machine-readable storage medium and portable terminal
US9207808B2 (en) Image processing apparatus, image processing method and storage medium
JP7262993B2 (en) Image processing system, image processing method, image processing apparatus
CN110431563B (en) Method and device for correcting image
JP6540280B2 (en) Image processing apparatus and computer program
US11245803B2 (en) Information processing apparatus and non-transitory computer readable medium storing information processing program
US20070064036A1 (en) Information processing apparatus, association method
JP6019939B2 (en) Image processing apparatus, image processing method, and program
JP2008234291A (en) Character recognition device and character recognition method
US7280693B2 (en) Document information input apparatus, document information input method, document information input program and recording medium
US10834281B2 (en) Document size detecting by matching between image of entire document and read size image
JP5094703B2 (en) Map matching apparatus, map matching method, and program
CN105025188B (en) Image processing system, image processing apparatus and image processing method
JP2017199288A (en) Image processing device, image processing method and program
US20150261430A1 (en) Document data distribution system and program
JP5794154B2 (en) Image processing program, image processing method, and image processing apparatus
JP2007272710A (en) Handwriting input system
JP2022090469A (en) Format defining device, format defining method, and program
JP2017208655A (en) Information processing system, information processing method and program
JP3885001B2 (en) Image processing method and image processing apparatus
JP4070486B2 (en) Image processing apparatus, image processing method, and program used to execute the method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160322

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160523

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160919

R150 Certificate of patent or registration of utility model

Ref document number: 6019939

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees